From: Jiawen Wu <jiawenwu@trustnetic.com>
To: dev@dpdk.org
Cc: zaiyuwang@trustnetic.com, Jiawen Wu <jiawenwu@trustnetic.com>
Subject: [PATCH 05/12] net/ngbe: support RSS offload for SCTP port
Date: Fri, 6 Jun 2025 16:01:10 +0800 [thread overview]
Message-ID: <40D036CA37F79251+20250606080117.183198-6-jiawenwu@trustnetic.com> (raw)
In-Reply-To: <20250606080117.183198-1-jiawenwu@trustnetic.com>
Add support for IPv4/IPv6 SCTP RSS offload.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/base/ngbe_regs.h | 2 ++
drivers/net/ngbe/ngbe_ethdev.h | 2 ++
drivers/net/ngbe/ngbe_rxtx.c | 8 ++++++++
3 files changed, 12 insertions(+)
diff --git a/drivers/net/ngbe/base/ngbe_regs.h b/drivers/net/ngbe/base/ngbe_regs.h
index b1295280a7..3c123049b7 100644
--- a/drivers/net/ngbe/base/ngbe_regs.h
+++ b/drivers/net/ngbe/base/ngbe_regs.h
@@ -452,6 +452,8 @@
#define NGBE_RACTL_RSSMASK MS(16, 0xFFFF)
#define NGBE_RACTL_RSSIPV4TCP MS(16, 0x1)
#define NGBE_RACTL_RSSIPV4 MS(17, 0x1)
+#define NGBE_RACTL_RSSIPV4SCTP MS(18, 0x1)
+#define NGBE_RACTL_RSSIPV6SCTP MS(19, 0x1)
#define NGBE_RACTL_RSSIPV6 MS(20, 0x1)
#define NGBE_RACTL_RSSIPV6TCP MS(21, 0x1)
#define NGBE_RACTL_RSSIPV4UDP MS(22, 0x1)
diff --git a/drivers/net/ngbe/ngbe_ethdev.h b/drivers/net/ngbe/ngbe_ethdev.h
index 37c6459f51..faff57ef34 100644
--- a/drivers/net/ngbe/ngbe_ethdev.h
+++ b/drivers/net/ngbe/ngbe_ethdev.h
@@ -40,9 +40,11 @@
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_SCTP | \
RTE_ETH_RSS_IPV6_EX | \
RTE_ETH_RSS_IPV6_TCP_EX | \
RTE_ETH_RSS_IPV6_UDP_EX)
diff --git a/drivers/net/ngbe/ngbe_rxtx.c b/drivers/net/ngbe/ngbe_rxtx.c
index a372bf2963..3dd268e5bc 100644
--- a/drivers/net/ngbe/ngbe_rxtx.c
+++ b/drivers/net/ngbe/ngbe_rxtx.c
@@ -2652,6 +2652,10 @@ ngbe_dev_rss_hash_update(struct rte_eth_dev *dev,
if (rss_hf & RTE_ETH_RSS_NONFRAG_IPV6_UDP ||
rss_hf & RTE_ETH_RSS_IPV6_UDP_EX)
mrqc |= NGBE_RACTL_RSSIPV6UDP;
+ if (rss_hf & RTE_ETH_RSS_NONFRAG_IPV4_SCTP)
+ mrqc |= NGBE_RACTL_RSSIPV4SCTP;
+ if (rss_hf & RTE_ETH_RSS_NONFRAG_IPV6_SCTP)
+ mrqc |= NGBE_RACTL_RSSIPV6SCTP;
if (rss_hf)
mrqc |= NGBE_RACTL_RSSENA;
@@ -2704,6 +2708,10 @@ ngbe_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
if (mrqc & NGBE_RACTL_RSSIPV6UDP)
rss_hf |= RTE_ETH_RSS_NONFRAG_IPV6_UDP |
RTE_ETH_RSS_IPV6_UDP_EX;
+ if (mrqc & NGBE_RACTL_RSSIPV4SCTP)
+ rss_hf |= RTE_ETH_RSS_NONFRAG_IPV4_SCTP;
+ if (mrqc & NGBE_RACTL_RSSIPV6SCTP)
+ rss_hf |= RTE_ETH_RSS_NONFRAG_IPV6_SCTP;
if (!(mrqc & NGBE_RACTL_RSSENA))
rss_hf = 0;
--
2.48.1
next prev parent reply other threads:[~2025-06-06 8:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250606080117.183198-1-jiawenwu@trustnetic.com>
2025-06-06 8:01 ` [PATCH 01/12] net/txgbe: support flow filter for VF Jiawen Wu
2025-06-06 8:01 ` [PATCH 02/12] net/txgbe: refactor FDIR filter to improve functionality Jiawen Wu
2025-06-06 16:23 ` Stephen Hemminger
2025-06-06 8:01 ` [PATCH 03/12] net/txgbe: fix reserved extra FDIR headroom Jiawen Wu
2025-06-06 8:01 ` [PATCH 04/12] net/txgbe: support RSS offload for SCTP port Jiawen Wu
2025-06-06 8:01 ` Jiawen Wu [this message]
2025-06-06 8:01 ` [PATCH 06/12] net/txgbe: fix MAC control frame forwarding Jiawen Wu
2025-06-06 8:01 ` [PATCH 07/12] net/ngbe: " Jiawen Wu
2025-06-06 8:01 ` [PATCH 08/12] net/txgbe: fix incorrect device statistics Jiawen Wu
2025-06-06 8:01 ` [PATCH 09/12] net/ngbe: " Jiawen Wu
2025-06-06 8:01 ` [PATCH 10/12] net/txgbe: restrict VLAN strip configuration on VF Jiawen Wu
2025-06-06 8:01 ` [PATCH 11/12] net/ngbe: " Jiawen Wu
2025-06-06 8:01 ` [PATCH 12/12] net/txgbe: add missing LRO flag in mbuf when LRO enabled Jiawen Wu
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=40D036CA37F79251+20250606080117.183198-6-jiawenwu@trustnetic.com \
--to=jiawenwu@trustnetic.com \
--cc=dev@dpdk.org \
--cc=zaiyuwang@trustnetic.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).