From: Simei Su <simei.su@intel.com>
To: qi.z.zhang@intel.com, beilei.xing@intel.com
Cc: dev@dpdk.org, jia.guo@intel.com, junfeng.guo@intel.com,
Simei Su <simei.su@intel.com>
Subject: [dpdk-dev] [PATCH v2 3/3] net/ice: add RSS support for PPPoE
Date: Thu, 2 Jul 2020 13:11:50 +0800 [thread overview]
Message-ID: <1593666710-343445-4-git-send-email-simei.su@intel.com> (raw)
In-Reply-To: <1593666710-343445-1-git-send-email-simei.su@intel.com>
This patch enables PPPoE control packets with src mac and session id
and PPPoE data packets with ip address and L4 port in rte_flow.
Signed-off-by: Simei Su <simei.su@intel.com>
---
drivers/net/ice/ice_hash.c | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 3d58b71..eaf6a35 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -114,6 +114,16 @@ struct rss_type_match_hdr hint_14 = {
ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_UDP};
struct rss_type_match_hdr hint_15 = {
ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_TCP};
+struct rss_type_match_hdr hint_16 = {
+ ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_IPV6};
+struct rss_type_match_hdr hint_17 = {
+ ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_NONFRAG_IPV6_UDP};
+struct rss_type_match_hdr hint_18 = {
+ ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_NONFRAG_IPV6_TCP};
+struct rss_type_match_hdr hint_19 = {
+ ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_NONFRAG_IPV6_SCTP};
+struct rss_type_match_hdr hint_20 = {
+ ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_ETH | ETH_RSS_PPPOE};
/* Supported pattern for os default package. */
static struct ice_pattern_match_item ice_hash_pattern_list_os[] = {
@@ -146,6 +156,11 @@ struct rss_type_match_hdr hint_15 = {
{pattern_eth_pppoes_ipv4_udp, ICE_INSET_NONE, &hint_11},
{pattern_eth_pppoes_ipv4_tcp, ICE_INSET_NONE, &hint_12},
{pattern_eth_pppoes_ipv4_sctp, ICE_INSET_NONE, &hint_13},
+ {pattern_eth_pppoes_ipv6, ICE_INSET_NONE, &hint_16},
+ {pattern_eth_pppoes_ipv6_udp, ICE_INSET_NONE, &hint_17},
+ {pattern_eth_pppoes_ipv6_tcp, ICE_INSET_NONE, &hint_18},
+ {pattern_eth_pppoes_ipv6_sctp, ICE_INSET_NONE, &hint_19},
+ {pattern_eth_pppoes, ICE_INSET_NONE, &hint_20},
};
/**
@@ -213,6 +228,9 @@ struct ice_hash_match_type ice_hash_type_list[] = {
{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_SRC_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_DST_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
{ETH_RSS_NONFRAG_IPV6_SCTP, ICE_HASH_SCTP_IPV6},
+ {ETH_RSS_ETH | ETH_RSS_L2_SRC_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_SA)},
+ {ETH_RSS_PPPOE, ICE_FLOW_HASH_PPPOE_SESS_ID},
+ {ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_L2_SRC_ONLY, ICE_FLOW_HASH_PPPOE_SESS_ID | BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_SA)},
};
static struct ice_flow_engine ice_hash_engine = {
@@ -331,6 +349,13 @@ struct ice_hash_match_type ice_hash_type_list[] = {
RTE_FLOW_ERROR_TYPE_ACTION, action,
"Not supported flow");
+ if ((rss_hf & ETH_RSS_ETH) && (rss_hf & ~ETH_RSS_PPPOE))
+ m->eth_rss_hint = ETH_RSS_ETH;
+ else if ((rss_hf & ETH_RSS_PPPOE) && (rss_hf & ~ETH_RSS_ETH))
+ m->eth_rss_hint = ETH_RSS_PPPOE;
+ else if ((rss_hf & ETH_RSS_ETH) && (rss_hf & ETH_RSS_PPPOE))
+ m->eth_rss_hint = ETH_RSS_ETH | ETH_RSS_PPPOE;
+
/* Check if rss types match pattern. */
if (rss->func != RTE_ETH_HASH_FUNCTION_SIMPLE_XOR) {
if (((rss_hf & ETH_RSS_IPV4) != m->eth_rss_hint) &&
@@ -340,7 +365,11 @@ struct ice_hash_match_type ice_hash_type_list[] = {
((rss_hf & ETH_RSS_IPV6) != m->eth_rss_hint) &&
((rss_hf & ETH_RSS_NONFRAG_IPV6_UDP) != m->eth_rss_hint) &&
((rss_hf & ETH_RSS_NONFRAG_IPV6_TCP) != m->eth_rss_hint) &&
- ((rss_hf & ETH_RSS_NONFRAG_IPV6_SCTP) != m->eth_rss_hint))
+ ((rss_hf & ETH_RSS_NONFRAG_IPV6_SCTP) != m->eth_rss_hint) &&
+ ((rss_hf & ETH_RSS_ETH) != m->eth_rss_hint) &&
+ ((rss_hf & ETH_RSS_PPPOE) != m->eth_rss_hint) &&
+ (((rss_hf & (ETH_RSS_ETH | ETH_RSS_PPPOE)) !=
+ m->eth_rss_hint)))
return rte_flow_error_set(error,
ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION,
action, "Not supported RSS types");
--
1.8.3.1
next prev parent reply other threads:[~2020-07-02 5:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-12 2:20 [dpdk-dev] [PATCH 0/3] net/ice: enable advanced RSS " Simei Su
2020-06-12 2:20 ` [dpdk-dev] [PATCH 1/3] ethdev: add new RSS offload types Simei Su
2020-07-01 13:28 ` Zhang, Qi Z
2020-07-02 1:14 ` Su, Simei
2020-06-12 2:20 ` [dpdk-dev] [PATCH 2/3] app/testpmd: support extended " Simei Su
2020-06-12 2:20 ` [dpdk-dev] [PATCH 3/3] net/ice: add RSS support for PPPoE Simei Su
2020-07-02 5:11 ` [dpdk-dev] [PATCH v2 0/3] net/ice: enable advanced RSS " Simei Su
2020-07-02 5:11 ` [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS offload types Simei Su
2020-07-03 13:50 ` Zhang, Qi Z
2020-07-07 9:50 ` Ferruh Yigit
2020-07-02 5:11 ` [dpdk-dev] [PATCH v2 2/3] app/testpmd: support extended " Simei Su
2020-07-07 12:02 ` Ferruh Yigit
2020-07-02 5:11 ` Simei Su [this message]
2020-07-07 0:24 ` [dpdk-dev] [PATCH v2 0/3] net/ice: enable advanced RSS for PPPoE Zhang, Qi Z
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=1593666710-343445-4-git-send-email-simei.su@intel.com \
--to=simei.su@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jia.guo@intel.com \
--cc=junfeng.guo@intel.com \
--cc=qi.z.zhang@intel.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).