[Intel-wired-lan] [PATCH net-next v4 5/5] ice: use src VSI instead of src MAC in slow-path

Leon Romanovsky leon at kernel.org
Sun Apr 9 10:34:06 UTC 2023


On Fri, Apr 07, 2023 at 06:52:19PM +0200, Michal Swiatkowski wrote:
> The use of a source MAC to direct packets from the VF to the corresponding
> port representor is only ok if there is only one MAC on a VF. To support
> this functionality when the number of MACs on a VF is greater, it is
> necessary to match a source VSI instead of a source MAC.
> 
> Let's use the new switch API that allows matching on metadata.
> 
> If MAC isn't used in match criteria there is no need to handle adding
> rule after virtchnl command. Instead add new rule while port representor
> is being configured.
> 
> Remove rule_added field, checking for sp_rule can be used instead.
> Remove also checking for switchdev running in deleting rule as it can be
> called from unroll context when running flag isn't set. Checking for
> sp_rule covers both context (with and without running flag).
> 
> Rules are added in eswitch configuration flow, so there is no need to
> have replay function.
> 
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski at linux.intel.com>
> Reviewed-by: Piotr Raczynski <piotr.raczynski at intel.com>
> Reviewed-by: Simon Horman <simon.horman at corigine.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_eswitch.c  | 83 ++++++-------------
>  drivers/net/ethernet/intel/ice/ice_eswitch.h  | 14 ----
>  .../ethernet/intel/ice/ice_protocol_type.h    |  5 +-
>  drivers/net/ethernet/intel/ice/ice_repr.c     | 17 ----
>  drivers/net/ethernet/intel/ice/ice_repr.h     |  5 +-
>  drivers/net/ethernet/intel/ice/ice_switch.c   |  6 ++
>  drivers/net/ethernet/intel/ice/ice_switch.h   |  1 +
>  drivers/net/ethernet/intel/ice/ice_vf_lib.c   |  3 -
>  drivers/net/ethernet/intel/ice/ice_virtchnl.c |  8 --
>  9 files changed, 40 insertions(+), 102 deletions(-)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro at nvidia.com>


More information about the Intel-wired-lan mailing list