* [PATCH 0/2] add support for RSS parsing of SCTP packet
@ 2023-02-21 5:52 Chaoyong He
2023-02-21 5:52 ` [PATCH 1/2] net/nfp: add support for RSS parsing of SCTP packets Chaoyong He
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Chaoyong He @ 2023-02-21 5:52 UTC (permalink / raw)
To: dev; +Cc: oss-drivers, niklas.soderlund, Chaoyong He
Add support for RSS parsing of SCTP packets and modify the logic to
return the right RSS configuration.
Depends-on: series-27102 ("net/nfp: standardize the use of RSS-related")
Long Wu (2):
net/nfp: add support for RSS parsing of SCTP packets
net/nfp: fix getting wrong RSS configuration
drivers/net/nfp/nfp_common.c | 20 +++++++++++++++++---
drivers/net/nfp/nfp_ctrl.h | 4 ++++
2 files changed, 21 insertions(+), 3 deletions(-)
--
2.29.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] net/nfp: add support for RSS parsing of SCTP packets
2023-02-21 5:52 [PATCH 0/2] add support for RSS parsing of SCTP packet Chaoyong He
@ 2023-02-21 5:52 ` Chaoyong He
2023-02-21 5:52 ` [PATCH 2/2] net/nfp: fix getting wrong RSS configuration Chaoyong He
2023-03-01 0:36 ` [PATCH 0/2] add support for RSS parsing of SCTP packet Ferruh Yigit
2 siblings, 0 replies; 4+ messages in thread
From: Chaoyong He @ 2023-02-21 5:52 UTC (permalink / raw)
To: dev; +Cc: oss-drivers, niklas.soderlund, Long Wu, Chaoyong He
From: Long Wu <long.wu@corigine.com>
Add support for RSS parsing SCTP packets, including ipv4/ipv6 SCTP
and ipv4/ipv6 tunnel SCTP packets.
Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
drivers/net/nfp/nfp_common.c | 16 +++++++++++++++-
drivers/net/nfp/nfp_ctrl.h | 4 ++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
index a1e37ada11..cfc38db65a 100644
--- a/drivers/net/nfp/nfp_common.c
+++ b/drivers/net/nfp/nfp_common.c
@@ -930,9 +930,11 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->flow_type_rss_offloads = RTE_ETH_RSS_IPV4 |
RTE_ETH_RSS_NONFRAG_IPV4_TCP |
RTE_ETH_RSS_NONFRAG_IPV4_UDP |
+ RTE_ETH_RSS_NONFRAG_IPV4_SCTP |
RTE_ETH_RSS_IPV6 |
RTE_ETH_RSS_NONFRAG_IPV6_TCP |
- RTE_ETH_RSS_NONFRAG_IPV6_UDP;
+ RTE_ETH_RSS_NONFRAG_IPV6_UDP |
+ RTE_ETH_RSS_NONFRAG_IPV6_SCTP;
dev_info->reta_size = NFP_NET_CFG_RSS_ITBL_SZ;
dev_info->hash_key_size = NFP_NET_CFG_RSS_KEY_SZ;
@@ -1336,6 +1338,9 @@ nfp_net_rss_hash_write(struct rte_eth_dev *dev,
if (rss_hf & RTE_ETH_RSS_NONFRAG_IPV4_UDP)
cfg_rss_ctrl |= NFP_NET_CFG_RSS_IPV4_UDP;
+ if (rss_hf & RTE_ETH_RSS_NONFRAG_IPV4_SCTP)
+ cfg_rss_ctrl |= NFP_NET_CFG_RSS_IPV4_SCTP;
+
if (rss_hf & RTE_ETH_RSS_IPV6)
cfg_rss_ctrl |= NFP_NET_CFG_RSS_IPV6;
@@ -1345,6 +1350,9 @@ nfp_net_rss_hash_write(struct rte_eth_dev *dev,
if (rss_hf & RTE_ETH_RSS_NONFRAG_IPV6_UDP)
cfg_rss_ctrl |= NFP_NET_CFG_RSS_IPV6_UDP;
+ if (rss_hf & RTE_ETH_RSS_NONFRAG_IPV6_SCTP)
+ cfg_rss_ctrl |= NFP_NET_CFG_RSS_IPV6_SCTP;
+
cfg_rss_ctrl |= NFP_NET_CFG_RSS_MASK;
cfg_rss_ctrl |= NFP_NET_CFG_RSS_TOEPLITZ;
@@ -1429,6 +1437,12 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
if (cfg_rss_ctrl & NFP_NET_CFG_RSS_IPV6)
rss_hf |= RTE_ETH_RSS_NONFRAG_IPV4_UDP | RTE_ETH_RSS_NONFRAG_IPV6_UDP;
+ if (cfg_rss_ctrl & NFP_NET_CFG_RSS_IPV4_SCTP)
+ rss_hf |= RTE_ETH_RSS_NONFRAG_IPV4_SCTP;
+
+ if (cfg_rss_ctrl & NFP_NET_CFG_RSS_IPV6_SCTP)
+ rss_hf |= RTE_ETH_RSS_NONFRAG_IPV6_SCTP;
+
/* Propagate current RSS hash functions to caller */
rss_conf->rss_hf = rss_hf;
diff --git a/drivers/net/nfp/nfp_ctrl.h b/drivers/net/nfp/nfp_ctrl.h
index bdc39f8974..75e4458a1b 100644
--- a/drivers/net/nfp/nfp_ctrl.h
+++ b/drivers/net/nfp/nfp_ctrl.h
@@ -56,6 +56,8 @@
#define NFP_NET_RSS_IPV4_UDP 7
#define NFP_NET_RSS_IPV6_UDP 8
#define NFP_NET_RSS_IPV6_EX_UDP 9
+#define NFP_NET_RSS_IPV4_SCTP 10
+#define NFP_NET_RSS_IPV6_SCTP 11
/*
* @NFP_NET_TXR_MAX: Maximum number of TX rings
@@ -236,6 +238,8 @@
#define NFP_NET_CFG_RSS_IPV4_UDP (1 << 11) /* RSS for IPv4/UDP */
#define NFP_NET_CFG_RSS_IPV6_TCP (1 << 12) /* RSS for IPv6/TCP */
#define NFP_NET_CFG_RSS_IPV6_UDP (1 << 13) /* RSS for IPv6/UDP */
+#define NFP_NET_CFG_RSS_IPV4_SCTP (1 << 14) /* RSS for IPv4/SCTP */
+#define NFP_NET_CFG_RSS_IPV6_SCTP (1 << 15) /* RSS for IPv6/SCTP */
#define NFP_NET_CFG_RSS_TOEPLITZ (1 << 24) /* Use Toeplitz hash */
#define NFP_NET_CFG_RSS_KEY (NFP_NET_CFG_RSS_BASE + 0x4)
#define NFP_NET_CFG_RSS_KEY_SZ 0x28
--
2.29.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] net/nfp: fix getting wrong RSS configuration
2023-02-21 5:52 [PATCH 0/2] add support for RSS parsing of SCTP packet Chaoyong He
2023-02-21 5:52 ` [PATCH 1/2] net/nfp: add support for RSS parsing of SCTP packets Chaoyong He
@ 2023-02-21 5:52 ` Chaoyong He
2023-03-01 0:36 ` [PATCH 0/2] add support for RSS parsing of SCTP packet Ferruh Yigit
2 siblings, 0 replies; 4+ messages in thread
From: Chaoyong He @ 2023-02-21 5:52 UTC (permalink / raw)
To: dev
Cc: oss-drivers, niklas.soderlund, Long Wu, louis.peens, stable, Chaoyong He
From: Long Wu <long.wu@corigine.com>
"NFP_NET_CFG_RSS_IPV4" and "NFP_NET_CFG_RSS_IPV6" represent that firmware
will calculate RSS base on l3 rather than udp or tcp information from
packets. So the logic of return RSS configuration in driver is wrong.
Modify code to return the right configuration.
Fixes: 934e4c60fbff ("nfp: add RSS")
Cc: louis.peens@corigine.com
Cc: stable@dpdk.org
Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
drivers/net/nfp/nfp_common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
index cfc38db65a..a025c67e3b 100644
--- a/drivers/net/nfp/nfp_common.c
+++ b/drivers/net/nfp/nfp_common.c
@@ -1420,7 +1420,7 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
cfg_rss_ctrl = nn_cfg_readl(hw, NFP_NET_CFG_RSS_CTRL);
if (cfg_rss_ctrl & NFP_NET_CFG_RSS_IPV4)
- rss_hf |= RTE_ETH_RSS_NONFRAG_IPV4_TCP | RTE_ETH_RSS_NONFRAG_IPV4_UDP;
+ rss_hf |= RTE_ETH_RSS_IPV4;
if (cfg_rss_ctrl & NFP_NET_CFG_RSS_IPV4_TCP)
rss_hf |= RTE_ETH_RSS_NONFRAG_IPV4_TCP;
@@ -1435,7 +1435,7 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
rss_hf |= RTE_ETH_RSS_NONFRAG_IPV6_UDP;
if (cfg_rss_ctrl & NFP_NET_CFG_RSS_IPV6)
- rss_hf |= RTE_ETH_RSS_NONFRAG_IPV4_UDP | RTE_ETH_RSS_NONFRAG_IPV6_UDP;
+ rss_hf |= RTE_ETH_RSS_IPV6;
if (cfg_rss_ctrl & NFP_NET_CFG_RSS_IPV4_SCTP)
rss_hf |= RTE_ETH_RSS_NONFRAG_IPV4_SCTP;
--
2.29.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] add support for RSS parsing of SCTP packet
2023-02-21 5:52 [PATCH 0/2] add support for RSS parsing of SCTP packet Chaoyong He
2023-02-21 5:52 ` [PATCH 1/2] net/nfp: add support for RSS parsing of SCTP packets Chaoyong He
2023-02-21 5:52 ` [PATCH 2/2] net/nfp: fix getting wrong RSS configuration Chaoyong He
@ 2023-03-01 0:36 ` Ferruh Yigit
2 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2023-03-01 0:36 UTC (permalink / raw)
To: Chaoyong He, dev; +Cc: oss-drivers, niklas.soderlund
On 2/21/2023 5:52 AM, Chaoyong He wrote:
> Add support for RSS parsing of SCTP packets and modify the logic to
> return the right RSS configuration.
>
> Depends-on: series-27102 ("net/nfp: standardize the use of RSS-related")
>
> Long Wu (2):
> net/nfp: add support for RSS parsing of SCTP packets
> net/nfp: fix getting wrong RSS configuration
Series applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-01 0:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-21 5:52 [PATCH 0/2] add support for RSS parsing of SCTP packet Chaoyong He
2023-02-21 5:52 ` [PATCH 1/2] net/nfp: add support for RSS parsing of SCTP packets Chaoyong He
2023-02-21 5:52 ` [PATCH 2/2] net/nfp: fix getting wrong RSS configuration Chaoyong He
2023-03-01 0:36 ` [PATCH 0/2] add support for RSS parsing of SCTP packet Ferruh Yigit
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).