From: Simon Horman <simon.horman@corigine.com>
To: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Cc: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH net-next 4/4] ice: use src VSI instead of src MAC in slow-path
Date: Sat, 1 Apr 2023 11:04:49 +0200 [thread overview]
Message-ID: <ZCfzsSmsrbRIBtsy@corigine.com> (raw)
In-Reply-To: <20230331105747.89612-5-michal.swiatkowski@linux.intel.com>
On Fri, Mar 31, 2023 at 12:57:47PM +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
> call from unroll context when running flag isn't set. Checking for
> sp_rule cover 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@linux.intel.com>
> Reviewed-by: Piotr Raczynski <piotr.raczynski@intel.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
...
> diff --git a/drivers/net/ethernet/intel/ice/ice_protocol_type.h b/drivers/net/ethernet/intel/ice/ice_protocol_type.h
> index 20f66be9ba5f..1b739e096d27 100644
> --- a/drivers/net/ethernet/intel/ice/ice_protocol_type.h
> +++ b/drivers/net/ethernet/intel/ice/ice_protocol_type.h
> @@ -256,7 +256,9 @@ struct ice_nvgre_hdr {
> * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> *
> * Source VSI = Source VSI of packet loopbacked in switch (for egress) (10b).
> - *
> + */
> +#define ICE_MDID_SOURCE_VSI_MASK 0x3ff
nit: GENMASK might be appropriate here.
> +/*
> * MDID 20
> * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> * |A|B|C|D|E|F|R|R|G|H|I|J|K|L|M|N|
...
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <simon.horman@corigine.com>
To: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
wojciech.drewek@intel.com, piotr.raczynski@intel.com
Subject: Re: [PATCH net-next 4/4] ice: use src VSI instead of src MAC in slow-path
Date: Sat, 1 Apr 2023 11:04:49 +0200 [thread overview]
Message-ID: <ZCfzsSmsrbRIBtsy@corigine.com> (raw)
In-Reply-To: <20230331105747.89612-5-michal.swiatkowski@linux.intel.com>
On Fri, Mar 31, 2023 at 12:57:47PM +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
> call from unroll context when running flag isn't set. Checking for
> sp_rule cover 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@linux.intel.com>
> Reviewed-by: Piotr Raczynski <piotr.raczynski@intel.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
...
> diff --git a/drivers/net/ethernet/intel/ice/ice_protocol_type.h b/drivers/net/ethernet/intel/ice/ice_protocol_type.h
> index 20f66be9ba5f..1b739e096d27 100644
> --- a/drivers/net/ethernet/intel/ice/ice_protocol_type.h
> +++ b/drivers/net/ethernet/intel/ice/ice_protocol_type.h
> @@ -256,7 +256,9 @@ struct ice_nvgre_hdr {
> * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> *
> * Source VSI = Source VSI of packet loopbacked in switch (for egress) (10b).
> - *
> + */
> +#define ICE_MDID_SOURCE_VSI_MASK 0x3ff
nit: GENMASK might be appropriate here.
> +/*
> * MDID 20
> * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> * |A|B|C|D|E|F|R|R|G|H|I|J|K|L|M|N|
...
next prev parent reply other threads:[~2023-04-01 9:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-31 10:57 [Intel-wired-lan] [PATCH net-next 0/4] ice: allow matching on metadata Michal Swiatkowski
2023-03-31 10:57 ` Michal Swiatkowski
2023-03-31 10:57 ` [Intel-wired-lan] [PATCH net-next 1/4] ice: define metadata to match in switch Michal Swiatkowski
2023-03-31 10:57 ` Michal Swiatkowski
2023-04-01 9:02 ` [Intel-wired-lan] " Simon Horman
2023-04-01 9:02 ` Simon Horman
2023-03-31 10:57 ` [Intel-wired-lan] [PATCH net-next 2/4] ice: remove redundant Rx field from rule info Michal Swiatkowski
2023-03-31 10:57 ` Michal Swiatkowski
2023-04-01 9:03 ` [Intel-wired-lan] " Simon Horman
2023-04-01 9:03 ` Simon Horman
2023-03-31 10:57 ` [Intel-wired-lan] [PATCH net-next 3/4] ice: allow matching on metadata Michal Swiatkowski
2023-03-31 10:57 ` Michal Swiatkowski
2023-04-01 9:04 ` [Intel-wired-lan] " Simon Horman
2023-04-01 9:04 ` Simon Horman
2023-03-31 10:57 ` [Intel-wired-lan] [PATCH net-next 4/4] ice: use src VSI instead of src MAC in slow-path Michal Swiatkowski
2023-03-31 10:57 ` Michal Swiatkowski
2023-04-01 9:04 ` Simon Horman [this message]
2023-04-01 9:04 ` Simon Horman
2023-04-03 6:01 ` [Intel-wired-lan] " Michal Swiatkowski
2023-04-03 6:01 ` Michal Swiatkowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZCfzsSmsrbRIBtsy@corigine.com \
--to=simon.horman@corigine.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.