From: "Xueming(Steven) Li" <xuemingl@nvidia.com>
To: Wenjun Wu <wenjun1.wu@intel.com>,
"stable@dpdk.org" <stable@dpdk.org>,
"qiming.yang@intel.com" <qiming.yang@intel.com>,
"qi.z.zhang@intel.com" <qi.z.zhang@intel.com>
Subject: Re: [dpdk-stable] [PATCH 20.11] net/ice: fix RSS for L2 packet
Date: Sun, 20 Jun 2021 14:15:32 +0000 [thread overview]
Message-ID: <DM4PR12MB53739B13A40BC64F02156CCAA10B9@DM4PR12MB5373.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20210617025623.1026715-1-wenjun1.wu@intel.com>
Applied, thanks for the backport
> -----Original Message-----
> From: stable <stable-bounces@dpdk.org> On Behalf Of Wenjun Wu
> Sent: Thursday, June 17, 2021 10:56 AM
> To: stable@dpdk.org; qiming.yang@intel.com; qi.z.zhang@intel.com
> Cc: Wenjun Wu <wenjun1.wu@intel.com>
> Subject: [dpdk-stable] [PATCH 20.11] net/ice: fix RSS for L2 packet
>
> RSS support for L2 non-ip packets is missing in previous versions.
>
> However, due to code refactor, the fix [1] in main branch cannot be applied directly. This patch fixes this issue in stable versions.
>
> [1] https://patchwork.dpdk.org/patch/94066/
>
> Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
>
> Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
> ---
> drivers/net/ice/base/ice_flow.c | 2 +-
> drivers/net/ice/ice_hash.c | 14 ++++++++++++++
> 2 files changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index 548d998546..c75f58659c 100644
> --- a/drivers/net/ice/base/ice_flow.c
> +++ b/drivers/net/ice/base/ice_flow.c
> @@ -3233,7 +3233,7 @@ ice_flow_add_fld_raw(struct ice_flow_seg_info *seg, u16 off, u8 len, }
>
> #define ICE_FLOW_RSS_SEG_HDR_L2_MASKS \ -(ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_VLAN)
> +(ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_ETH_NON_IP |
> +ICE_FLOW_SEG_HDR_VLAN)
>
> #define ICE_FLOW_RSS_SEG_HDR_L3_MASKS \
> (ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV6) diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
> index fe3e06c579..1bb7d2c7c6 100644
> --- a/drivers/net/ice/ice_hash.c
> +++ b/drivers/net/ice/ice_hash.c
> @@ -312,6 +312,9 @@ struct rss_type_match_hdr hint_eth_pppoes_ipv6_tcp = { struct rss_type_match_hdr hint_eth_pppoes = {
> ICE_FLOW_SEG_HDR_PPPOE,
> ETH_RSS_ETH | ETH_RSS_PPPOE};
> +struct rss_type_match_hdr hint_ethertype = {
> + ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_ETH_NON_IP,
> + ETH_RSS_ETH};
>
> /* Supported pattern for os default package. */ static struct ice_pattern_match_item ice_hash_pattern_list_os[] = { @@ -444,6
> +447,8 @@ static struct ice_pattern_match_item ice_hash_pattern_list_comms[] = {
> &hint_eth_pppoes_ipv6_tcp},
> {pattern_eth_pppoes, ICE_INSET_NONE,
> &hint_eth_pppoes},
> + {pattern_ethertype, ICE_INSET_NONE,
> + &hint_ethertype},
> };
>
> /**
> @@ -1140,6 +1145,15 @@ ice_hash_parse_action(struct ice_pattern_match_item *pattern_match_item,
> "Not supported flow");
> }
>
> + /* update hash field for eth-non-ip. */
> + if (rss_type & ETH_RSS_ETH) {
> + if (hash_meta->pkt_hdr &
> + ICE_FLOW_SEG_HDR_ETH_NON_IP) {
> + hash_meta->hash_flds |=
> + BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_TYPE);
> + }
> + }
> +
> /* update hash field for nat-t esp. */
> if (rss_type & ETH_RSS_ESP &&
> (m->eth_rss_hint & ETH_RSS_NONFRAG_IPV4_UDP ||
> --
> 2.25.1
prev parent reply other threads:[~2021-06-20 14:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 2:56 Wenjun Wu
2021-06-20 14:15 ` Xueming(Steven) Li [this message]
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=DM4PR12MB53739B13A40BC64F02156CCAA10B9@DM4PR12MB5373.namprd12.prod.outlook.com \
--to=xuemingl@nvidia.com \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@intel.com \
--cc=stable@dpdk.org \
--cc=wenjun1.wu@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).