netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, gospo@redhat.com,
	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	Luca Deri <deri@ntop.org>,
	Joseph Gasparakis <joseph.gasparakis@intel.com>
Subject: [net-next-2.6 PATCH 4/5] ixgbe: Add Flow Director configuration support as a mod parameter
Date: Wed, 06 Jan 2010 20:49:29 -0800	[thread overview]
Message-ID: <20100107044928.28605.62132.stgit@localhost.localdomain> (raw)
In-Reply-To: <20100107044741.28605.31414.stgit@localhost.localdomain>

From: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.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@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Luca Deri <deri@ntop.org>
CC: Joseph Gasparakis <joseph.gasparakis@intel.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@intel.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;


  parent reply	other threads:[~2010-01-07  4:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-07  4:48 [net-next-2.6 PATCH 1/5] ixgbe: Allocate driver resources per NUMA node Jeff Kirsher
2010-01-07  4:48 ` [net-next-2.6 PATCH 2/5] ixgbe: Make descriptor ring allocations NUMA-aware Jeff Kirsher
2010-01-08  8:21   ` David Miller
2010-01-08  8:25     ` Waskiewicz Jr, Peter P
2010-01-08  8:31       ` David Miller
2010-01-08  8:36         ` Waskiewicz Jr, Peter P
2010-01-07  4:49 ` [net-next-2.6 PATCH 3/5] ethtool: Introduce n-tuple filter programming support Jeff Kirsher
2010-01-08  8:23   ` David Miller
2010-01-08  8:34     ` Waskiewicz Jr, Peter P
2010-01-08  8:38       ` David Miller
2010-01-08  8:42         ` Waskiewicz Jr, Peter P
2010-01-11 19:32   ` Ben Hutchings
2010-01-12 19:13     ` Waskiewicz Jr, Peter P
2010-01-21  2:54       ` David Miller
2010-01-07  4:49 ` Jeff Kirsher [this message]
2010-01-08  8:24   ` [net-next-2.6 PATCH 4/5] ixgbe: Add Flow Director configuration support as a mod parameter David Miller
2010-01-08  8:28     ` Waskiewicz Jr, Peter P
2010-01-08  8:32       ` David Miller
2010-01-08  8:36         ` Waskiewicz Jr, Peter P
2010-01-07  4:49 ` [net-next-2.6 PATCH 5/5] ixgbe: Add support for the new ethtool n-tuple programming interface Jeff Kirsher
2010-01-08  8:26   ` David Miller
2010-01-14 11:02 ` [net-next-2.6 PATCH 1/5] ixgbe: Allocate driver resources per NUMA node Andi Kleen
2010-01-19 16:10   ` Waskiewicz Jr, Peter P
2010-01-19 19:34     ` Andi Kleen
2010-01-19 19:34       ` Waskiewicz Jr, Peter P

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100107044928.28605.62132.stgit@localhost.localdomain \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=deri@ntop.org \
    --cc=gospo@redhat.com \
    --cc=joseph.gasparakis@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=peter.p.waskiewicz.jr@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).