* Re: [net-next v2 02/15] i40evf: correctly program RSS HLUT table
@ 2014-03-19 8:08 Or Gerlitz
2014-03-19 8:14 ` Jeff Kirsher
0 siblings, 1 reply; 4+ messages in thread
From: Or Gerlitz @ 2014-03-19 8:08 UTC (permalink / raw)
To: Jeff Kirsher
Cc: David Miller, Mitch Williams, netdev@vger.kernel.org,
gospo@redhat.com, sassmann@redhat.com, Catherine Sullivan
On Wed, Mar 19, 2014 at 5:42 AM, Jeff Kirsher
<jeffrey.t.kirsher@intel.com> wrote:
> From: Mitch Williams <mitch.a.williams@intel.com>
>
> The HLUT programming loop in in i40evf_configure_rss was a) overly-
> complicated, and b) just plain broken. Most of the entries ended up being
> not written at all, so most of the flows ended up at queue zero.
In the V2 cover letter you wrote
dropped patch Mitch's patch "i40evf: correctly program RSS HLUT table"
so what is this patch?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [net-next v2 02/15] i40evf: correctly program RSS HLUT table
2014-03-19 8:08 [net-next v2 02/15] i40evf: correctly program RSS HLUT table Or Gerlitz
@ 2014-03-19 8:14 ` Jeff Kirsher
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Kirsher @ 2014-03-19 8:14 UTC (permalink / raw)
To: Or Gerlitz
Cc: David Miller, Mitch Williams, netdev@vger.kernel.org,
gospo@redhat.com, sassmann@redhat.com, Catherine Sullivan
[-- Attachment #1: Type: text/plain, Size: 765 bytes --]
On Wed, 2014-03-19 at 10:08 +0200, Or Gerlitz wrote:
> On Wed, Mar 19, 2014 at 5:42 AM, Jeff Kirsher
> <jeffrey.t.kirsher@intel.com> wrote:
> > From: Mitch Williams <mitch.a.williams@intel.com>
> >
> > The HLUT programming loop in in i40evf_configure_rss was a) overly-
> > complicated, and b) just plain broken. Most of the entries ended up being
> > not written at all, so most of the flows ended up at queue zero.
>
> In the V2 cover letter you wrote
>
> dropped patch Mitch's patch "i40evf: correctly program RSS HLUT table"
>
> so what is this patch?
Sorry, that was may bad. In v2 I dropped patch 3 which was "i40evf:
Support RSS option in ethtool" patch. I referenced the wrong patch in
the cover letter, thanks for noticing that Or.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [net-next v2 00/15][pull request] Intel Wired LAN Driver Updates
@ 2014-03-19 3:41 Jeff Kirsher
2014-03-19 3:42 ` [net-next v2 02/15] i40evf: correctly program RSS HLUT table Jeff Kirsher
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Kirsher @ 2014-03-19 3:41 UTC (permalink / raw)
To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann
This series contains updates to i40e, i40evf, e1000e, ixgbe and ixgbevf.
Mitch adds support for the VF link state ndo which allows the PF driver
to control the virtual link state of the VF devices. Added
support for viewing and modifying RSS hash options and RSS hash look-up
table programming through ethtool for i40evf. Fixed complaint about
the use of min() where min_t() should be used in i40evf.
Anjali adds support for ethtool -k option for NTUPLE control for i40e.
Elizabeth cleans up and refactors i40e_open() to separate out the VSI
code into its own i40e_vsi_open().
Jesse enables the hardware feature head write back to avoid updating the
descriptor ring by marking each descriptor with a DD bit and instead
writes a memory location with an update to where the driver should clean
up to in i40e and i40evf. Reduces context descriptors for i40e/i40evf
since we do not need context descriptors for every packet, only for
TSO or timesync.
Dan Carpenter fixes a potential array underflow in i40e_vc_process_vf_msg().
Dave fixes an e1000e hardware unit hang where the check for pending Tx work
when link is lost was mistakenly moved to be done only when link is first
detected to be lost. Fixed a problem with poor network performance on
certain silicon in e1000e when configured for 100M HDX performance.
Carolyn adds register defines needed for time sync functions and the code
to call the updated defines.
Jacob adds the ixgbe function for writing PCI config word and checks
whether the adapter has been removed first.
Mark adds the bit __IXGBEVF_REMOVING to indicate that the module is being
removed because the __IXGBEVF_DOWN bit had been overloaded for this
purpose, but leads to trouble. ixgbevf_down function can now prevent
multiple executions by doing test_and_set_bit on __IXGBEVF_DOWN.
v2:
- dropped patch Mitch's patch "i40evf: correctly program RSS HLUT table"
based on feedback from Ben Hutchings so that Mitch can re-work the
patch solution
The following are changes since commit 8cfad496c4257441710735ccef622f3829870164:
ieee802154: properly unshare skbs in ieee802154 *_rcv functions
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master
Anjali Singhai Jain (1):
i40e: Patch to enable Ethtool/netdev feature flag for NTUPLE control
Carolyn Wyborny (1):
igb: Add register defines needed for time sync functions
Catherine Sullivan (1):
i40e/i40evf: Bump build versions
Dan Carpenter (1):
i40e: potential array underflow in i40e_vc_process_vf_msg()
David Ertman (2):
e1000e: Fix Hardware Unit Hang
e1000e: Fix Explicitly set Transmit Control Register
Elizabeth Kappler (1):
i40e: Refactor and cleanup i40e_open(), adding i40e_vsi_open()
Jacob Keller (1):
ixgbe: add ixgbe_write_pci_cfg_word with ixgbe_removed check
Jesse Brandeburg (2):
i40e/i40evf: enable hardware feature head write back
i40e/i40evf: reduce context descriptors
Mark Rustad (2):
ixgbevf: Indicate removal state explicitly
ixgbevf: Protect ixgbevf_down with __IXGBEVF_DOWN bit
Mitch Williams (3):
i40e: support VF link state ndo
i40evf: correctly program RSS HLUT table
i40evf: use min_t
drivers/net/ethernet/intel/e1000e/netdev.c | 42 +++++++---
drivers/net/ethernet/intel/i40e/i40e.h | 4 +-
drivers/net/ethernet/intel/i40e/i40e_main.c | 89 ++++++++++++++++++---
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 48 ++++++++++--
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 91 ++++++++++++++++++++--
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 4 +
drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 48 ++++++++++--
drivers/net/ethernet/intel/i40evf/i40evf_main.c | 23 +++---
drivers/net/ethernet/intel/igb/e1000_defines.h | 70 ++++++++++++++++-
drivers/net/ethernet/intel/igb/e1000_regs.h | 9 +++
drivers/net/ethernet/intel/igb/igb_ptp.c | 4 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 6 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_common.h | 1 +
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 9 +++
drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 5 +-
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 18 +++--
16 files changed, 400 insertions(+), 71 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [net-next v2 02/15] i40evf: correctly program RSS HLUT table
2014-03-19 3:41 [net-next v2 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
@ 2014-03-19 3:42 ` Jeff Kirsher
2014-03-19 18:07 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Kirsher @ 2014-03-19 3:42 UTC (permalink / raw)
To: davem
Cc: Mitch Williams, netdev, gospo, sassmann, Catherine Sullivan,
Jeff Kirsher
From: Mitch Williams <mitch.a.williams@intel.com>
The HLUT programming loop in in i40evf_configure_rss was a) overly-
complicated, and b) just plain broken. Most of the entries ended up being
not written at all, so most of the flows ended up at queue zero.
Refactor the HLUT programming loop to simply walk through the registers
and write four values to each one, incrementing through the number of
available queues.
Change-ID: I75766179bc67e4e997187794f3144e28c83fd00d
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40evf/i40evf_main.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index d62e27f..7cb0cda 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1414,6 +1414,7 @@ restart_watchdog:
schedule_work(&adapter->adminq_task);
}
+#define NEXT_QUEUE(_j) (++_j >= adapter->vsi_res->num_queue_pairs ? _j = 0 : _j)
/**
* i40evf_configure_rss - Prepare for RSS if used
* @adapter: board private structure
@@ -1444,15 +1445,13 @@ static void i40evf_configure_rss(struct i40evf_adapter *adapter)
wr32(hw, I40E_VFQF_HENA(1), (u32)(hena >> 32));
/* Populate the LUT with max no. of queues in round robin fashion */
- for (i = 0, j = 0; i < I40E_VFQF_HLUT_MAX_INDEX; i++, j++) {
- if (j == adapter->vsi_res->num_queue_pairs)
- j = 0;
- /* lut = 4-byte sliding window of 4 lut entries */
- lut = (lut << 8) | (j &
- ((0x1 << 8) - 1));
- /* On i = 3, we have 4 entries in lut; write to the register */
- if ((i & 3) == 3)
- wr32(hw, I40E_VFQF_HLUT(i >> 2), lut);
+ j = adapter->vsi_res->num_queue_pairs;
+ for (i = 0; i <= I40E_VFQF_HLUT_MAX_INDEX; i++) {
+ lut = NEXT_QUEUE(j);
+ lut |= NEXT_QUEUE(j) << 8;
+ lut |= NEXT_QUEUE(j) << 16;
+ lut |= NEXT_QUEUE(j) << 24;
+ wr32(hw, I40E_VFQF_HLUT(i), lut);
}
i40e_flush(hw);
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [net-next v2 02/15] i40evf: correctly program RSS HLUT table
2014-03-19 3:42 ` [net-next v2 02/15] i40evf: correctly program RSS HLUT table Jeff Kirsher
@ 2014-03-19 18:07 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2014-03-19 18:07 UTC (permalink / raw)
To: jeffrey.t.kirsher
Cc: mitch.a.williams, netdev, gospo, sassmann, catherine.sullivan
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 18 Mar 2014 20:42:00 -0700
> +#define NEXT_QUEUE(_j) (++_j >= adapter->vsi_res->num_queue_pairs ? _j = 0 : _j)
I would strong recommend breaking the increment out of the test
and using a function rather than a macro:
static int next_queue(struct i40evf_adapter *adapter, int j)
{
j += 1;
return j >= adapter->vsi_res->num_queue_pairs ? 0 : j;
}
..
j = next_queue(adapter, j);
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-19 18:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-19 8:08 [net-next v2 02/15] i40evf: correctly program RSS HLUT table Or Gerlitz
2014-03-19 8:14 ` Jeff Kirsher
-- strict thread matches above, loose matches on Subject: below --
2014-03-19 3:41 [net-next v2 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2014-03-19 3:42 ` [net-next v2 02/15] i40evf: correctly program RSS HLUT table Jeff Kirsher
2014-03-19 18:07 ` David Miller
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).