Skip to content

mlx5: Make eswitch_offloads a compile option

Jes Sorensen netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7mlx5: Allow support for eswitch offloads to be disableddrivers/net/ethernet/mellanox/mlx5/core/Kconfig drivers/net/ethernet/mellanox/mlx5/core/eswitch.h drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +1 more+30 -10 replies
2/7mlx5: eswitch vlan functionality is only called if SRIOV_OFFLOADS is setdrivers/net/ethernet/mellanox/mlx5/core/eswitch.h drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c+15 -00 replies
3/7mlx5: Disable {add,del}_offloaded_rule() code if eswitch offloads are disableddrivers/net/ethernet/mellanox/mlx5/core/eswitch.h drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c+18 -10 replies
4/7mlx5: Stub out eswitch offload vport functionsdrivers/net/ethernet/mellanox/mlx5/core/eswitch.h drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c+21 -10 replies
5/7mlx5: Stub out create_vport_rx_rule when eswitch_offloads disableddrivers/net/ethernet/mellanox/mlx5/core/eswitch.h drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c+9 -40 replies
6/7mlx5: Stub out sqs2vport functionsdrivers/net/ethernet/mellanox/mlx5/core/eswitch.h drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c+14 -20 replies
7/7mlx5: Do not build eswitch_offloads if CONFIG_MLX5_EN_ESWITCH_OFFLOADS is setdrivers/net/ethernet/mellanox/mlx5/core/Makefile drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c+3 -1012 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] mlx5: Make eswitch_offloads a compile option

Hi,

This changes the code to allow for eswitch_offloads to be compile time option, reducing the size of the driver module for those who do not need it.

The patches do it step by step by introducing stubs and then finally gets rid of all the #ifdefs once the code can compile and link without including eswitch_offloads.o

Unlike the patches that were discussed on the list back in January, this does not try to remove eswitch support. It simply allows the offloads to be disabled.

Cheers,
Jes

Jes Sorensen (7):
mlx5: Allow support for eswitch offloads to be disabled
mlx5: eswitch vlan functionality is only called if SRIOV_OFFLOADS is
set
mlx5: Disable {add,del}_offloaded_rule() code if eswitch offloads are
disabled
mlx5: Stub out eswitch offload vport functions
mlx5: Stub out create_vport_rx_rule when eswitch_offloads disabled
mlx5: Stub out sqs2vport functions
mlx5: Do not build eswitch_offloads if CONFIG_MLX5_EN_ESWITCH_OFFLOADS
is set

 drivers/net/ethernet/mellanox/mlx5/core/Kconfig    | 10 +++
 drivers/net/ethernet/mellanox/mlx5/core/Makefile   |  4 +-
 drivers/net/ethernet/mellanox/mlx5/core/eswitch.h  | 80 +++++++++++++++++++++-
 .../ethernet/mellanox/mlx5/core/eswitch_offloads.c |  1 +
 drivers/net/ethernet/mellanox/mlx5/core/main.c     |  2 +-
 5 files changed, 94 insertions(+), 3 deletions(-)
Signature · 1 line
2.9.4