[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100107044928.28605.62132.stgit@localhost.localdomain>
Date: Wed, 06 Jan 2010 20:49:29 -0800
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, gospo@...hat.com,
Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Luca Deri <deri@...p.org>,
Joseph Gasparakis <joseph.gasparakis@...el.com>
Subject: [net-next-2.6 PATCH 4/5] ixgbe: Add Flow Director configuration
support as a mod parameter
From: PJ Waskiewicz <peter.p.waskiewicz.jr@...el.com>
This patch adds the ability to change the Flow Director behavior in
ixgbe through a module parameter. ixgbe, on 82599 hardware, can support
hash-based or perfect-based filtering. It currently uses hash-based, and
should have a knob to enable perfect-based filtering.
This will be used in conjunction with the ethtool n-tuple filter
programming support.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
CC: Luca Deri <deri@...p.org>
CC: Joseph Gasparakis <joseph.gasparakis@...el.com>
---
drivers/net/ixgbe/ixgbe_main.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index ceeef52..13d413a 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -124,6 +124,11 @@ static struct notifier_block dca_notifier = {
};
#endif
+static unsigned int fdir_filter_mode;
+module_param(fdir_filter_mode, uint, 0);
+MODULE_PARM_DESC(fdir_filter_mode, "Flow Director filtering mode: 0 - hash, "
+ "1 - perfect");
+
MODULE_AUTHOR("Intel Corporation, <linux.nics@...el.com>");
MODULE_DESCRIPTION("Intel(R) 10 Gigabit PCI Express Network Driver");
MODULE_LICENSE("GPL");
@@ -4002,10 +4007,17 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter)
adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82599;
adapter->flags2 |= IXGBE_FLAG2_RSC_CAPABLE;
adapter->flags2 |= IXGBE_FLAG2_RSC_ENABLED;
- adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE;
+
+ if (fdir_filter_mode == 0) {
+ adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE;
+ adapter->atr_sample_rate = 20;
+ } else {
+ adapter->flags |= IXGBE_FLAG_FDIR_PERFECT_CAPABLE;
+ spin_lock_init(&adapter->fdir_perfect_lock);
+ }
+
adapter->ring_feature[RING_F_FDIR].indices =
IXGBE_MAX_FDIR_INDICES;
- adapter->atr_sample_rate = 20;
adapter->fdir_pballoc = 0;
#ifdef IXGBE_FCOE
adapter->flags |= IXGBE_FLAG_FCOE_CAPABLE;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists