代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dpdk 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From e11bff8abbbe9cacc59fa64d3d2046b150c45a6d Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 21 Oct 2022 15:36:33 +0800
Subject: [PATCH 157/189] net/hns3: fix IPv4 and IPv6 RSS
Currently, hns3 driver use 'ipv4-other' and 'ipv6-other' as the flag
of IP packets to judge if enable RSS tuple field. But user may use
'RTE_ETH_RSS_IPV4' or 'RTE_ETH_RSS_IPV6' as the flag. So this patch
adds the processing of these macros.
Fixes: 806f1d5ab0e3 ("net/hns3: set RSS hash type input configuration")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_rss.c | 14 ++++++++++++++
drivers/net/hns3/hns3_rss.h | 2 ++
2 files changed, 16 insertions(+)
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index fc912ed2e8..e7e114727f 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -102,6 +102,10 @@ static const struct {
BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S) },
{ RTE_ETH_RSS_NONFRAG_IPV4_SCTP | RTE_ETH_RSS_L4_DST_ONLY,
BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D) },
+ { RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_L3_SRC_ONLY,
+ BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) },
+ { RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_L3_DST_ONLY,
+ BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) },
{ RTE_ETH_RSS_NONFRAG_IPV4_OTHER | RTE_ETH_RSS_L3_SRC_ONLY,
BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) },
{ RTE_ETH_RSS_NONFRAG_IPV4_OTHER | RTE_ETH_RSS_L3_DST_ONLY,
@@ -134,6 +138,10 @@ static const struct {
BIT_ULL(HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_S) },
{ RTE_ETH_RSS_NONFRAG_IPV6_SCTP | RTE_ETH_RSS_L4_DST_ONLY,
BIT_ULL(HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_D) },
+ { RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_L3_SRC_ONLY,
+ BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) },
+ { RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_L3_DST_ONLY,
+ BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) },
{ RTE_ETH_RSS_NONFRAG_IPV6_OTHER | RTE_ETH_RSS_L3_SRC_ONLY,
BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) },
{ RTE_ETH_RSS_NONFRAG_IPV6_OTHER | RTE_ETH_RSS_L3_DST_ONLY,
@@ -159,6 +167,9 @@ static const struct {
BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S) |
BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D) |
BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER) },
+ { RTE_ETH_RSS_IPV4,
+ BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) |
+ BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) },
{ RTE_ETH_RSS_NONFRAG_IPV4_OTHER,
BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) |
BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) },
@@ -177,6 +188,9 @@ static const struct {
BIT_ULL(HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_D) |
BIT_ULL(HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_S) |
BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER) },
+ { RTE_ETH_RSS_IPV6,
+ BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) |
+ BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) },
{ RTE_ETH_RSS_NONFRAG_IPV6_OTHER,
BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) |
BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) }
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index 5c288c8bb2..9471e7039d 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -9,11 +9,13 @@
#include <rte_flow.h>
#define HNS3_ETH_RSS_SUPPORT ( \
+ RTE_ETH_RSS_IPV4 | \
RTE_ETH_RSS_FRAG_IPV4 | \
RTE_ETH_RSS_NONFRAG_IPV4_TCP | \
RTE_ETH_RSS_NONFRAG_IPV4_UDP | \
RTE_ETH_RSS_NONFRAG_IPV4_SCTP | \
RTE_ETH_RSS_NONFRAG_IPV4_OTHER | \
+ RTE_ETH_RSS_IPV6 | \
RTE_ETH_RSS_FRAG_IPV6 | \
RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。