mbox series

[v2,intel-net,0/2] ice XDP fixes

Message ID 20210520063500.62037-1-maciej.fijalkowski@intel.com
Headers show
Series ice XDP fixes | expand

Message

Maciej Fijalkowski May 20, 2021, 6:34 a.m. UTC
[resending as v2, vim session got broken while editing patch]

Hi,

here are two small fixes around XDP support in ice driver.

Jamal reported that ice driver does not support XDP on his side. This
got me really puzzling and I had no clue what was going on. Turned that
this is the case when device is in 'safe mode', so let's add a dedicated
ndo_bpf for safe mode ops and make it clear to user what needs to be
fixed. I've described that in the commit message of patch 1 more
thoroughly.

Second issue was found during implementing XDP Tx fallback path for
unsufficient queue count case, which I will send on next week once I'm
back from woods. Hopefully.

Thanks!

Maciej Fijalkowski (2):
  ice: add ndo_bpf callback for safe mode netdev ops
  ice: parametrize functions responsible for Tx ring management

 drivers/net/ethernet/intel/ice/ice_lib.c  | 18 ++++++++++--------
 drivers/net/ethernet/intel/ice/ice_main.c | 15 +++++++++++++++
 2 files changed, 25 insertions(+), 8 deletions(-)

Comments

Bhandare, KiranX June 3, 2021, 4:15 a.m. UTC | #1
> -----Original Message-----

> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of

> Maciej Fijalkowski

> Sent: Thursday, May 20, 2021 12:05 PM

> To: intel-wired-lan@lists.osuosl.org

> Cc: netdev@vger.kernel.org; Jamal Hadi Salim <jhs@mojatatu.com>;

> bjorn@kernel.org; kuba@kernel.org; bpf@vger.kernel.org;

> davem@davemloft.net; Karlsson, Magnus <magnus.karlsson@intel.com>

> Subject: [Intel-wired-lan] [PATCH v2 intel-net 1/2] ice: add ndo_bpf callback

> for safe mode netdev ops

> 

> ice driver requires a programmable pipeline firmware package in order to

> have a support for advanced features. Otherwise, driver falls back to so

> called 'safe mode'. For that mode, ndo_bpf callback is not exposed and when

> user tries to load XDP program, the following happens:

> 

> $ sudo ./xdp1 enp179s0f1

> libbpf: Kernel error message: Underlying driver does not support XDP in

> native mode link set xdp fd failed

> 

> which is sort of confusing, as there is a native XDP support, but not in the

> current mode. Improve the user experience by providing the specific

> ndo_bpf callback dedicated for safe mode which will make use of extack to

> explicitly let the user know that the DDP package is missing and that's the

> reason that the XDP can't be loaded onto interface currently.

> 

> Cc: Jamal Hadi Salim <jhs@mojatatu.com>

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

> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>

> ---

>  drivers/net/ethernet/intel/ice/ice_main.c | 15 +++++++++++++++

>  1 file changed, 15 insertions(+)

> 


Tested-by: Kiran Bhandare <kiranx.bhandare@intel.com>  A Contingent Worker at Intel