mbox series

[net,0/7,pull,request] Intel Wired LAN Driver Updates 2021-01-22

Message ID 20210122235734.447240-1-anthony.l.nguyen@intel.com
Headers show
Series Intel Wired LAN Driver Updates 2021-01-22 | expand

Message

Tony Nguyen Jan. 22, 2021, 11:57 p.m. UTC
This series contains updates to the ice and i40e driver.

Henry corrects setting an unspecified protocol to IPPROTO_NONE instead of
0 for IPv6 flexbytes filters for ice.

Nick fixes the IPv6 extension header being processed incorrectly and
updates the netdev->dev_addr if it exists in hardware as it may have been
modified outside the ice driver.

Piotr fixes the XDP ring used for XDP_TX as it was being used
inconsistently which could cause packets to not be transmitted for the ice
driver.

Brett ensures a user cannot request more channels than available LAN MSI-X
and fixes the minimum allocation logic as it was incorrectly trying to use
more MSI-X than allocated for ice.

Stefan Assmann minimizes the delay between getting and using the VSI
pointer to prevent a possible crash for i40e.

The following are changes since commit 35c715c30b95205e64311c3bb3525094cd3d7236:
  Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 100GbE

Brett Creeley (2):
  ice: Don't allow more channels than LAN MSI-X available
  ice: Fix MSI-X vector fallback logic

Henry Tieman (1):
  ice: fix FDir IPv6 flexbyte

Nick Nunley (2):
  ice: Implement flow for IPv6 next header (extension header)
  ice: update dev_addr in ice_set_mac_address even if HW filter exists

Piotr Raczynski (1):
  ice: use correct xdp_ring with XDP_TX action

Stefan Assmann (1):
  i40e: acquire VSI pointer only after VF is initialized

 .../net/ethernet/intel/i40e/i40e_virtchnl_pf.c   | 11 ++++-------
 drivers/net/ethernet/intel/ice/ice.h             |  4 +++-
 drivers/net/ethernet/intel/ice/ice_ethtool.c     |  8 ++++----
 .../net/ethernet/intel/ice/ice_ethtool_fdir.c    |  8 +++++++-
 drivers/net/ethernet/intel/ice/ice_lib.c         | 14 +++++++++-----
 drivers/net/ethernet/intel/ice/ice_main.c        | 16 +++++++++-------
 drivers/net/ethernet/intel/ice/ice_txrx.c        | 11 +++++++----
 7 files changed, 43 insertions(+), 29 deletions(-)

Comments

Jakub Kicinski Jan. 24, 2021, 3:52 a.m. UTC | #1
On Fri, 22 Jan 2021 15:57:31 -0800 Tony Nguyen wrote:
> From: Piotr Raczynski <piotr.raczynski@intel.com>

> 

> XDP queue number for XDP_TX action is used inconsistently

> and may result with no packets transmitted. Fix queue number

> used by the driver when doing XDP_TX, i.e. use receive queue

> number as in ice_finalize_xdp_rx.

> 

> Also, using smp_processor_id() is wrong here and won't

> work with less queues.

> 

> Fixes: efc2214b6047 ("ice: Add support for XDP")

> Signed-off-by: Piotr Raczynski <piotr.raczynski@intel.com>

> Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com>

> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>

> ---

>  drivers/net/ethernet/intel/ice/ice_txrx.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c

> index b6fa83c619dd..7946a90b2da7 100644

> --- a/drivers/net/ethernet/intel/ice/ice_txrx.c

> +++ b/drivers/net/ethernet/intel/ice/ice_txrx.c

> @@ -546,7 +546,7 @@ ice_run_xdp(struct ice_ring *rx_ring, struct xdp_buff *xdp,

>  	case XDP_PASS:

>  		break;

>  	case XDP_TX:

> -		xdp_ring = rx_ring->vsi->xdp_rings[smp_processor_id()];

> +		xdp_ring = rx_ring->vsi->xdp_rings[rx_ring->q_index];


But then what protects you from one CPU trying to use the tx ring from
XDP_TX and another from ice_xdp_xmit() ?

Also why does this code not check queue_index < vsi->num_xdp_txq
like ice_xdp_xmit() does?

Let me CC your local XDP experts whose tags I'm surprised not to see on
this patch.

>  		result = ice_xmit_xdp_buff(xdp, xdp_ring);

>  		break;

>  	case XDP_REDIRECT:
Tony Nguyen Jan. 26, 2021, 9:33 p.m. UTC | #2
On Sat, 2021-01-23 at 19:52 -0800, Jakub Kicinski wrote:
> On Fri, 22 Jan 2021 15:57:31 -0800 Tony Nguyen wrote:

> > From: Piotr Raczynski <piotr.raczynski@intel.com>

> > 

> > XDP queue number for XDP_TX action is used inconsistently

> > and may result with no packets transmitted. Fix queue number

> > used by the driver when doing XDP_TX, i.e. use receive queue

> > number as in ice_finalize_xdp_rx.

> > 

> > Also, using smp_processor_id() is wrong here and won't

> > work with less queues.

> > 

> > Fixes: efc2214b6047 ("ice: Add support for XDP")

> > Signed-off-by: Piotr Raczynski <piotr.raczynski@intel.com>

> > Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com>

> > Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>

> > ---

> >  drivers/net/ethernet/intel/ice/ice_txrx.c | 2 +-

> >  1 file changed, 1 insertion(+), 1 deletion(-)

> > 

> > diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c

> > b/drivers/net/ethernet/intel/ice/ice_txrx.c

> > index b6fa83c619dd..7946a90b2da7 100644

> > --- a/drivers/net/ethernet/intel/ice/ice_txrx.c

> > +++ b/drivers/net/ethernet/intel/ice/ice_txrx.c

> > @@ -546,7 +546,7 @@ ice_run_xdp(struct ice_ring *rx_ring, struct

> > xdp_buff *xdp,

> >  	case XDP_PASS:

> >  		break;

> >  	case XDP_TX:

> > -		xdp_ring = rx_ring->vsi->xdp_rings[smp_processor_id()];

> > +		xdp_ring = rx_ring->vsi->xdp_rings[rx_ring->q_index];

> 

> But then what protects you from one CPU trying to use the tx ring

> from

> XDP_TX and another from ice_xdp_xmit() ?

> 

> Also why does this code not check queue_index < vsi->num_xdp_txq

> like ice_xdp_xmit() does?


Hi Jakub

I'm still waiting for information from the author. I'm going to drop
this patch from the series and resubmit.

> Let me CC your local XDP experts whose tags I'm surprised not to see

> on

> this patch.


I'll add them to the XDP patches in the future.


Thanks,
Tony