[Intel-wired-lan] [PATCH net-next v4 5/5] ice: use src VSI instead of src MAC in slow-path
Buvaneswaran, Sujai
sujai.buvaneswaran at intel.com
Mon Apr 24 06:35:11 UTC 2023
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Michal Swiatkowski
> Sent: Friday, April 7, 2023 10:22 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: pmenzel at molgen.mpg.de; netdev at vger.kernel.org; Simon Horman
> <simon.horman at corigine.com>
> Subject: [Intel-wired-lan] [PATCH net-next v4 5/5] ice: use src VSI instead of
> src MAC in slow-path
>
> 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(-)
>
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran at intel.com>
More information about the Intel-wired-lan
mailing list