Message ID | 20100107044928.28605.62132.stgit@localhost.localdomain |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Date: Wed, 06 Jan 2010 20:49:29 -0800 > 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> Use a generic ethtool boolean flag or similar, not "yet another different-in-every-driver" module parameter please. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, 8 Jan 2010, David Miller wrote: > From: Jeff Kirsher <jeffrey.t.kirsher@intel.com> > Date: Wed, 06 Jan 2010 20:49:29 -0800 > > > 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> > > Use a generic ethtool boolean flag or similar, not "yet another > different-in-every-driver" module parameter please. Something added to the setflags routine perhaps? -PJ -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: "Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@intel.com> Date: Fri, 8 Jan 2010 00:28:17 -0800 (Pacific Standard Time) > On Fri, 8 Jan 2010, David Miller wrote: > >> Use a generic ethtool boolean flag or similar, not "yet another >> different-in-every-driver" module parameter please. > > Something added to the setflags routine perhaps? Yeah, something via 'struct ethtool_flags' is probably appropriate. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, 8 Jan 2010, David Miller wrote: > From: "Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@intel.com> > Date: Fri, 8 Jan 2010 00:28:17 -0800 (Pacific Standard Time) > > > On Fri, 8 Jan 2010, David Miller wrote: > > > >> Use a generic ethtool boolean flag or similar, not "yet another > >> different-in-every-driver" module parameter please. > > > > Something added to the setflags routine perhaps? > > Yeah, something via 'struct ethtool_flags' is probably appropriate. Cool. I'll respin and get rid of the module parameter. Thanks for the review, -PJ -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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;