17 Star 12 Fork 76

src-openEuler/dpdk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0041-net-hns3-disable-SCTP-verification-tag-for-RSS-hash-input.patch 3.37 KB
一键复制 编辑 原始数据 按行查看 历史
huangdengdui 提交于 2024-05-10 16:25 . sync some patch from upstreaming
From 3645f3c0b1ad5fc6d5408d30822ad0244f0801a8 Mon Sep 17 00:00:00 2001
From: Jie Hai <[email protected]>
Date: Wed, 3 Apr 2024 18:16:23 +0800
Subject: [PATCH 41/42] net/hns3: disable SCTP verification tag for RSS hash
input
[ upstream commit 47d5fa9a91989c4671ecb8c3a7e767572846570c ]
When the symmetric RSS algorithm is used, the same packet is
expected to be hashed to the same queue in the upstream and
downstream directions.
The problem is that it could map the packets in the same SCTP
connection to different NIC RX queues depending on the direction
of packets. This is because the verification Tag is used as the
RSS hash input for the SCTP packets, and the value depends on the
peer end of the SCTP connection and could not be symmetrically
used in the hardware-implemented RSS algorithm.
In addition, the ethdev framework doesn't support setting SCTP
V-tag as the RSS hash input. So disable it for all RSS hash
algorithms.
Signed-off-by: Jie Hai <[email protected]>
---
drivers/net/hns3/hns3_rss.c | 6 ++----
drivers/net/hns3/hns3_rss.h | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 15feb26..3eae4ca 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -153,8 +153,7 @@ static const struct {
BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_S) |
BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_D) |
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),
+ BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D),
HNS3_RSS_TUPLE_IPV4_SCTP_M },
/* IPV6-FRAG */
@@ -274,8 +273,7 @@ static const struct {
BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S) |
BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D) |
BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_D) |
- BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S) |
- BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER),
+ BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S),
HNS3_RSS_TUPLE_IPV6_SCTP_M },
};
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index 9d182a8..0755760 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -49,7 +49,6 @@ enum hns3_tuple_field {
HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S,
HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_D,
HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_S,
- HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER,
/* IPV4 ENABLE FIELD */
HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D = 24,
@@ -74,7 +73,6 @@ enum hns3_tuple_field {
HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S,
HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D,
HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S,
- HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER,
/* IPV6 ENABLE FIELD */
HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D = 56,
@@ -96,12 +94,12 @@ enum hns3_tuple_field {
#define HNS3_RSS_TUPLE_IPV4_TCP_M GENMASK(3, 0)
#define HNS3_RSS_TUPLE_IPV4_UDP_M GENMASK(11, 8)
-#define HNS3_RSS_TUPLE_IPV4_SCTP_M GENMASK(20, 16)
+#define HNS3_RSS_TUPLE_IPV4_SCTP_M GENMASK(19, 16)
#define HNS3_RSS_TUPLE_IPV4_NONF_M GENMASK(25, 24)
#define HNS3_RSS_TUPLE_IPV4_FLAG_M GENMASK(27, 26)
#define HNS3_RSS_TUPLE_IPV6_TCP_M GENMASK(35, 32)
#define HNS3_RSS_TUPLE_IPV6_UDP_M GENMASK(43, 40)
-#define HNS3_RSS_TUPLE_IPV6_SCTP_M GENMASK(52, 48)
+#define HNS3_RSS_TUPLE_IPV6_SCTP_M GENMASK(51, 48)
#define HNS3_RSS_TUPLE_IPV6_NONF_M GENMASK(57, 56)
#define HNS3_RSS_TUPLE_IPV6_FLAG_M GENMASK(59, 58)
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/dpdk.git
[email protected]:src-openeuler/dpdk.git
src-openeuler
dpdk
dpdk
master

搜索帮助