[dpdk-stable] [PATCH 20.11] net/ice: fix RSS for L2 packet
Xueming(Steven) Li
xuemingl at nvidia.com
Sun Jun 20 16:15:32 CEST 2021
Applied, thanks for the backport
> -----Original Message-----
> From: stable <stable-bounces at dpdk.org> On Behalf Of Wenjun Wu
> Sent: Thursday, June 17, 2021 10:56 AM
> To: stable at dpdk.org; qiming.yang at intel.com; qi.z.zhang at intel.com
> Cc: Wenjun Wu <wenjun1.wu at 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 at 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
More information about the stable
mailing list