Skip to content

ice: fix VF creation when !CONFIG_ICE_SWITCHDEV

Vincent Chen intel-wired-lan netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ice: allow creating VFs when !CONFIG_ICE_SWITCHDEVdrivers/net/ethernet/intel/ice/ice_sriov.c drivers/net/ethernet/intel/ice/ice_vf_lib.c+10 -72 replies
2/2ice: remove redundant switchdev check in ice_eswitch_attach_vf()drivers/net/ethernet/intel/ice/ice_eswitch.c+0 -32 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAleksandr LoktionovRafal Romanowski
1/2R-b T-b
2/2R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] ice: fix VF creation when !CONFIG_ICE_SWITCHDEV

This patch series fixes an issue where VF creation fails when CONFIG_ICE_SWITCHDEV is disabled.

When CONFIG_ICE_SWITCHDEV is disabled, the stub function ice_eswitch_attach_vf() returns -EOPNOTSUPP, causing VF initialization to fail even though basic VF functionality should work without switchdev support.

The fix is split into two patches:
1. Add switchdev mode checks at caller sites to fix the immediate issue while maintaining backward compatibility. This ensures ice_eswitch_attach_vf() is only called when switchdev mode is enabled, consistent with how ice_eswitch_attach_sf() is handled.
2. Remove the now-redundant internal switchdev check from ice_eswitch_attach_vf().

Vincent Chen (2):
ice: allow creating VFs when !CONFIG_ICE_SWITCHDEV
ice: remove redundant switchdev check in ice_eswitch_attach_vf()

 drivers/net/ethernet/intel/ice/ice_eswitch.c |  3 ---
 drivers/net/ethernet/intel/ice/ice_sriov.c   | 14 ++++++++------
 drivers/net/ethernet/intel/ice/ice_vf_lib.c  |  3 ++-
 3 files changed, 10 insertions(+), 10 deletions(-)
Signature · 1 line
2.34.1