* [dpdk-dev] [PATCH 0/3] net/ice: enable advanced RSS for PPPoE
@ 2020-06-12 2:20 Simei Su
2020-06-12 2:20 ` [dpdk-dev] [PATCH 1/3] ethdev: add new RSS offload types Simei Su
` (3 more replies)
0 siblings, 4 replies; 14+ messages in thread
From: Simei Su @ 2020-06-12 2:20 UTC (permalink / raw)
To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su
[PATCH 1/3] ethdev: add rss offload types.
[PATCH 2/3] app/testpmd: add cmdline support fo rss types.
[PATCH 3/3] net/ice: add RSS support for PPPoE control packets
and data packets in rte_flow.
Simei Su (3):
ethdev: add new RSS offload types
app/testpmd: support extended RSS offload types
net/ice: add RSS support for PPPoE
app/test-pmd/cmdline.c | 6 ++++--
app/test-pmd/config.c | 1 +
drivers/net/ice/ice_hash.c | 31 ++++++++++++++++++++++++++++++-
lib/librte_ethdev/rte_ethdev.h | 2 +-
4 files changed, 36 insertions(+), 4 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [dpdk-dev] [PATCH 1/3] ethdev: add new RSS offload types
2020-06-12 2:20 [dpdk-dev] [PATCH 0/3] net/ice: enable advanced RSS for PPPoE Simei Su
@ 2020-06-12 2:20 ` Simei Su
2020-07-01 13:28 ` Zhang, Qi Z
2020-06-12 2:20 ` [dpdk-dev] [PATCH 2/3] app/testpmd: support extended " Simei Su
` (2 subsequent siblings)
3 siblings, 1 reply; 14+ messages in thread
From: Simei Su @ 2020-06-12 2:20 UTC (permalink / raw)
To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su
This patch defines new RSS offload types for PPPoE and session id
is assumed to be the default RSS input set.
Signed-off-by: Simei Su <simei.su@intel.com>
---
lib/librte_ethdev/rte_ethdev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index a49242b..631b146 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -521,7 +521,7 @@ struct rte_eth_rss_conf {
#define ETH_RSS_AH (1ULL << 28)
#define ETH_RSS_L2TPV3 (1ULL << 29)
#define ETH_RSS_PFCP (1ULL << 30)
-
+#define ETH_RSS_PPPOE (1ULL << 31)
/*
* We use the following macros to combine with above ETH_RSS_* for
--
1.8.3.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [dpdk-dev] [PATCH 2/3] app/testpmd: support extended RSS offload types
2020-06-12 2:20 [dpdk-dev] [PATCH 0/3] net/ice: enable advanced RSS for PPPoE Simei Su
2020-06-12 2:20 ` [dpdk-dev] [PATCH 1/3] ethdev: add new RSS offload types Simei Su
@ 2020-06-12 2:20 ` 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
3 siblings, 0 replies; 14+ messages in thread
From: Simei Su @ 2020-06-12 2:20 UTC (permalink / raw)
To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su
This patch adds testpmd cmdline support for PPPoE.
Signed-off-by: Simei Su <simei.su@intel.com>
---
app/test-pmd/cmdline.c | 6 ++++--
app/test-pmd/config.c | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 996a498..1ac0b89 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2317,6 +2317,8 @@ struct cmd_config_rss {
rss_conf.rss_hf = ETH_RSS_AH;
else if (!strcmp(res->value, "pfcp"))
rss_conf.rss_hf = ETH_RSS_PFCP;
+ else if (!strcmp(res->value, "pppoe"))
+ rss_conf.rss_hf = ETH_RSS_PPPOE;
else if (!strcmp(res->value, "none"))
rss_conf.rss_hf = 0;
else if (!strcmp(res->value, "default"))
@@ -2490,7 +2492,7 @@ struct cmd_config_rss_hash_key {
"ipv6-tcp-ex#ipv6-udp-ex#"
"l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#"
"l2-src-only#l2-dst-only#s-vlan#c-vlan#"
- "l2tpv3#esp#ah#pfcp");
+ "l2tpv3#esp#ah#pfcp#pppoe");
cmdline_parse_token_string_t cmd_config_rss_hash_key_value =
TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
@@ -2503,7 +2505,7 @@ struct cmd_config_rss_hash_key {
"l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|"
"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only|"
"l2-src-only|l2-dst-only|s-vlan|c-vlan|"
- "l2tpv3|esp|ah|pfcp "
+ "l2tpv3|esp|ah|pfcp|pppoe "
"<string of hex digits (variable length, NIC dependent)>",
.tokens = {
(void *)&cmd_config_rss_hash_key_port,
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 5381207..ef04699 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -118,6 +118,7 @@
{ "ah", ETH_RSS_AH },
{ "l2tpv3", ETH_RSS_L2TPV3 },
{ "pfcp", ETH_RSS_PFCP },
+ { "pppoe", ETH_RSS_PPPOE },
{ NULL, 0 },
};
--
1.8.3.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [dpdk-dev] [PATCH 3/3] net/ice: add RSS support for PPPoE
2020-06-12 2:20 [dpdk-dev] [PATCH 0/3] net/ice: enable advanced RSS for PPPoE Simei Su
2020-06-12 2:20 ` [dpdk-dev] [PATCH 1/3] ethdev: add new RSS offload types Simei Su
2020-06-12 2:20 ` [dpdk-dev] [PATCH 2/3] app/testpmd: support extended " Simei Su
@ 2020-06-12 2:20 ` Simei Su
2020-07-02 5:11 ` [dpdk-dev] [PATCH v2 0/3] net/ice: enable advanced RSS " Simei Su
3 siblings, 0 replies; 14+ messages in thread
From: Simei Su @ 2020-06-12 2:20 UTC (permalink / raw)
To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su
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
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH 1/3] ethdev: add new RSS offload types
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
0 siblings, 1 reply; 14+ messages in thread
From: Zhang, Qi Z @ 2020-07-01 13:28 UTC (permalink / raw)
To: Su, Simei, Ye, Xiaolong, Xing, Beilei; +Cc: dev, Guo, Jia, Guo, Junfeng
> -----Original Message-----
> From: Su, Simei <simei.su@intel.com>
> Sent: Friday, June 12, 2020 10:20 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Ye, Xiaolong
> <xiaolong.ye@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>; Su, Simei <simei.su@intel.com>
> Subject: [PATCH 1/3] ethdev: add new RSS offload types
>
> This patch defines new RSS offload types for PPPoE and session id is assumed
> to be the default RSS input set.
Not sure if it is necessary to force the default RSS input set as session id for PPPoE,
So maybe reword to below:
Typically Session Id would be the RSS input set for a PPPoE packet, but as a hint each driver may have different default behavior
>
> Signed-off-by: Simei Su <simei.su@intel.com>
> ---
> lib/librte_ethdev/rte_ethdev.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index a49242b..631b146 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -521,7 +521,7 @@ struct rte_eth_rss_conf {
> #define ETH_RSS_AH (1ULL << 28)
> #define ETH_RSS_L2TPV3 (1ULL << 29)
> #define ETH_RSS_PFCP (1ULL << 30)
> -
> +#define ETH_RSS_PPPOE (1ULL << 31)
>
> /*
> * We use the following macros to combine with above ETH_RSS_* for
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH 1/3] ethdev: add new RSS offload types
2020-07-01 13:28 ` Zhang, Qi Z
@ 2020-07-02 1:14 ` Su, Simei
0 siblings, 0 replies; 14+ messages in thread
From: Su, Simei @ 2020-07-02 1:14 UTC (permalink / raw)
To: Zhang, Qi Z, Ye, Xiaolong, Xing, Beilei; +Cc: dev, Guo, Jia, Guo, Junfeng
Hi, Qi
> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Wednesday, July 1, 2020 9:28 PM
> To: Su, Simei <simei.su@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>;
> Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>
> Subject: RE: [PATCH 1/3] ethdev: add new RSS offload types
>
>
>
> > -----Original Message-----
> > From: Su, Simei <simei.su@intel.com>
> > Sent: Friday, June 12, 2020 10:20 AM
> > To: Zhang, Qi Z <qi.z.zhang@intel.com>; Ye, Xiaolong
> > <xiaolong.ye@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> > Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Guo, Junfeng
> > <junfeng.guo@intel.com>; Su, Simei <simei.su@intel.com>
> > Subject: [PATCH 1/3] ethdev: add new RSS offload types
> >
> > This patch defines new RSS offload types for PPPoE and session id is
> > assumed to be the default RSS input set.
>
> Not sure if it is necessary to force the default RSS input set as session id for
> PPPoE, So maybe reword to below:
> Typically Session Id would be the RSS input set for a PPPoE packet, but as a
> hint each driver may have different default behavior
>
I mean if we use ETH_RSS_PPPoE, itself represents the input set "session id". Maybe I can reword:
session id is assumed to be the default RSS input set for ETH_RSS_PPPoE.
Do you think it's ok ?
Br
Simei
> >
> > Signed-off-by: Simei Su <simei.su@intel.com>
> > ---
> > lib/librte_ethdev/rte_ethdev.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/librte_ethdev/rte_ethdev.h
> > b/lib/librte_ethdev/rte_ethdev.h index a49242b..631b146 100644
> > --- a/lib/librte_ethdev/rte_ethdev.h
> > +++ b/lib/librte_ethdev/rte_ethdev.h
> > @@ -521,7 +521,7 @@ struct rte_eth_rss_conf {
> > #define ETH_RSS_AH (1ULL << 28)
> > #define ETH_RSS_L2TPV3 (1ULL << 29)
> > #define ETH_RSS_PFCP (1ULL << 30)
> > -
> > +#define ETH_RSS_PPPOE (1ULL << 31)
> >
> > /*
> > * We use the following macros to combine with above ETH_RSS_* for
> > --
> > 1.8.3.1
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [dpdk-dev] [PATCH v2 0/3] net/ice: enable advanced RSS for PPPoE
2020-06-12 2:20 [dpdk-dev] [PATCH 0/3] net/ice: enable advanced RSS for PPPoE Simei Su
` (2 preceding siblings ...)
2020-06-12 2:20 ` [dpdk-dev] [PATCH 3/3] net/ice: add RSS support for PPPoE Simei Su
@ 2020-07-02 5:11 ` Simei Su
2020-07-02 5:11 ` [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS offload types Simei Su
` (3 more replies)
3 siblings, 4 replies; 14+ messages in thread
From: Simei Su @ 2020-07-02 5:11 UTC (permalink / raw)
To: qi.z.zhang, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, Simei Su
[PATCH v2 1/3] ethdev: add rss offload types.
[PATCH v2 2/3] app/testpmd: add cmdline support fo rss types.
[PATCH v2 3/3] net/ice: add RSS support for PPPoE control packets
and data packets in rte_flow.
v2:
* Refine commit log.
Simei Su (3):
ethdev: add new RSS offload types
app/testpmd: support extended RSS offload types
net/ice: add RSS support for PPPoE
app/test-pmd/cmdline.c | 6 ++++--
app/test-pmd/config.c | 1 +
drivers/net/ice/ice_hash.c | 31 ++++++++++++++++++++++++++++++-
lib/librte_ethdev/rte_ethdev.h | 2 +-
4 files changed, 36 insertions(+), 4 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS offload types
2020-07-02 5:11 ` [dpdk-dev] [PATCH v2 0/3] net/ice: enable advanced RSS " Simei Su
@ 2020-07-02 5:11 ` Simei Su
2020-07-03 13:50 ` Zhang, Qi Z
2020-07-02 5:11 ` [dpdk-dev] [PATCH v2 2/3] app/testpmd: support extended " Simei Su
` (2 subsequent siblings)
3 siblings, 1 reply; 14+ messages in thread
From: Simei Su @ 2020-07-02 5:11 UTC (permalink / raw)
To: qi.z.zhang, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, Simei Su
This patch defines new RSS offload types for PPPoE. Typically,
session id would be the RSS input set for a PPPoE packet, but
as a hint, each driver may have different default behaviors.
Signed-off-by: Simei Su <simei.su@intel.com>
---
lib/librte_ethdev/rte_ethdev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index a49242b..631b146 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -521,7 +521,7 @@ struct rte_eth_rss_conf {
#define ETH_RSS_AH (1ULL << 28)
#define ETH_RSS_L2TPV3 (1ULL << 29)
#define ETH_RSS_PFCP (1ULL << 30)
-
+#define ETH_RSS_PPPOE (1ULL << 31)
/*
* We use the following macros to combine with above ETH_RSS_* for
--
1.8.3.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [dpdk-dev] [PATCH v2 2/3] app/testpmd: support extended RSS offload types
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-02 5:11 ` Simei Su
2020-07-07 12:02 ` Ferruh Yigit
2020-07-02 5:11 ` [dpdk-dev] [PATCH v2 3/3] net/ice: add RSS support for PPPoE Simei Su
2020-07-07 0:24 ` [dpdk-dev] [PATCH v2 0/3] net/ice: enable advanced RSS " Zhang, Qi Z
3 siblings, 1 reply; 14+ messages in thread
From: Simei Su @ 2020-07-02 5:11 UTC (permalink / raw)
To: qi.z.zhang, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, Simei Su
This patch adds testpmd cmdline support for PPPoE.
Signed-off-by: Simei Su <simei.su@intel.com>
---
app/test-pmd/cmdline.c | 6 ++++--
app/test-pmd/config.c | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 996a498..1ac0b89 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2317,6 +2317,8 @@ struct cmd_config_rss {
rss_conf.rss_hf = ETH_RSS_AH;
else if (!strcmp(res->value, "pfcp"))
rss_conf.rss_hf = ETH_RSS_PFCP;
+ else if (!strcmp(res->value, "pppoe"))
+ rss_conf.rss_hf = ETH_RSS_PPPOE;
else if (!strcmp(res->value, "none"))
rss_conf.rss_hf = 0;
else if (!strcmp(res->value, "default"))
@@ -2490,7 +2492,7 @@ struct cmd_config_rss_hash_key {
"ipv6-tcp-ex#ipv6-udp-ex#"
"l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#"
"l2-src-only#l2-dst-only#s-vlan#c-vlan#"
- "l2tpv3#esp#ah#pfcp");
+ "l2tpv3#esp#ah#pfcp#pppoe");
cmdline_parse_token_string_t cmd_config_rss_hash_key_value =
TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
@@ -2503,7 +2505,7 @@ struct cmd_config_rss_hash_key {
"l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|"
"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only|"
"l2-src-only|l2-dst-only|s-vlan|c-vlan|"
- "l2tpv3|esp|ah|pfcp "
+ "l2tpv3|esp|ah|pfcp|pppoe "
"<string of hex digits (variable length, NIC dependent)>",
.tokens = {
(void *)&cmd_config_rss_hash_key_port,
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index a7112c9..a0f8ea9 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -118,6 +118,7 @@
{ "ah", ETH_RSS_AH },
{ "l2tpv3", ETH_RSS_L2TPV3 },
{ "pfcp", ETH_RSS_PFCP },
+ { "pppoe", ETH_RSS_PPPOE },
{ NULL, 0 },
};
--
1.8.3.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [dpdk-dev] [PATCH v2 3/3] net/ice: add RSS support for PPPoE
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-02 5:11 ` [dpdk-dev] [PATCH v2 2/3] app/testpmd: support extended " Simei Su
@ 2020-07-02 5:11 ` Simei Su
2020-07-07 0:24 ` [dpdk-dev] [PATCH v2 0/3] net/ice: enable advanced RSS " Zhang, Qi Z
3 siblings, 0 replies; 14+ messages in thread
From: Simei Su @ 2020-07-02 5:11 UTC (permalink / raw)
To: qi.z.zhang, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, Simei Su
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
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS offload types
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
0 siblings, 1 reply; 14+ messages in thread
From: Zhang, Qi Z @ 2020-07-03 13:50 UTC (permalink / raw)
To: Su, Simei, Xing, Beilei; +Cc: dev, Guo, Jia, Guo, Junfeng
> -----Original Message-----
> From: Su, Simei <simei.su@intel.com>
> Sent: Thursday, July 2, 2020 1:12 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>; Su, Simei <simei.su@intel.com>
> Subject: [PATCH v2 1/3] ethdev: add new RSS offload types
>
> This patch defines new RSS offload types for PPPoE. Typically, session id
> would be the RSS input set for a PPPoE packet, but as a hint, each driver may
> have different default behaviors.
>
> Signed-off-by: Simei Su <simei.su@intel.com>
> ---
> lib/librte_ethdev/rte_ethdev.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index a49242b..631b146 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -521,7 +521,7 @@ struct rte_eth_rss_conf {
> #define ETH_RSS_AH (1ULL << 28)
> #define ETH_RSS_L2TPV3 (1ULL << 29)
> #define ETH_RSS_PFCP (1ULL << 30)
> -
> +#define ETH_RSS_PPPOE (1ULL << 31)
>
> /*
> * We use the following macros to combine with above ETH_RSS_* for
> --
> 1.8.3.1
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/3] net/ice: enable advanced RSS for PPPoE
2020-07-02 5:11 ` [dpdk-dev] [PATCH v2 0/3] net/ice: enable advanced RSS " Simei Su
` (2 preceding siblings ...)
2020-07-02 5:11 ` [dpdk-dev] [PATCH v2 3/3] net/ice: add RSS support for PPPoE Simei Su
@ 2020-07-07 0:24 ` Zhang, Qi Z
3 siblings, 0 replies; 14+ messages in thread
From: Zhang, Qi Z @ 2020-07-07 0:24 UTC (permalink / raw)
To: Su, Simei, Xing, Beilei; +Cc: dev, Guo, Jia, Guo, Junfeng
> -----Original Message-----
> From: Su, Simei <simei.su@intel.com>
> Sent: Thursday, July 2, 2020 1:12 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>; Su, Simei <simei.su@intel.com>
> Subject: [PATCH v2 0/3] net/ice: enable advanced RSS for PPPoE
>
> [PATCH v2 1/3] ethdev: add rss offload types.
> [PATCH v2 2/3] app/testpmd: add cmdline support fo rss types.
> [PATCH v2 3/3] net/ice: add RSS support for PPPoE control packets
> and data packets in rte_flow.
>
> v2:
> * Refine commit log.
>
> Simei Su (3):
> ethdev: add new RSS offload types
> app/testpmd: support extended RSS offload types
> net/ice: add RSS support for PPPoE
>
> app/test-pmd/cmdline.c | 6 ++++--
> app/test-pmd/config.c | 1 +
> drivers/net/ice/ice_hash.c | 31
> ++++++++++++++++++++++++++++++-
> lib/librte_ethdev/rte_ethdev.h | 2 +-
> 4 files changed, 36 insertions(+), 4 deletions(-)
>
> --
> 1.8.3.1
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS offload types
2020-07-03 13:50 ` Zhang, Qi Z
@ 2020-07-07 9:50 ` Ferruh Yigit
0 siblings, 0 replies; 14+ messages in thread
From: Ferruh Yigit @ 2020-07-07 9:50 UTC (permalink / raw)
To: Zhang, Qi Z, Su, Simei, Xing, Beilei; +Cc: dev, Guo, Jia, Guo, Junfeng
On 7/3/2020 2:50 PM, Zhang, Qi Z wrote:
>
>
>> -----Original Message-----
>> From: Su, Simei <simei.su@intel.com>
>> Sent: Thursday, July 2, 2020 1:12 PM
>> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Xing, Beilei <beilei.xing@intel.com>
>> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Guo, Junfeng
>> <junfeng.guo@intel.com>; Su, Simei <simei.su@intel.com>
>> Subject: [PATCH v2 1/3] ethdev: add new RSS offload types
>>
>> This patch defines new RSS offload types for PPPoE. Typically, session id
>> would be the RSS input set for a PPPoE packet, but as a hint, each driver may
>> have different default behaviors.
>>
>> Signed-off-by: Simei Su <simei.su@intel.com>
>> ---
>> lib/librte_ethdev/rte_ethdev.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
>> index a49242b..631b146 100644
>> --- a/lib/librte_ethdev/rte_ethdev.h
>> +++ b/lib/librte_ethdev/rte_ethdev.h
>> @@ -521,7 +521,7 @@ struct rte_eth_rss_conf {
>> #define ETH_RSS_AH (1ULL << 28)
>> #define ETH_RSS_L2TPV3 (1ULL << 29)
>> #define ETH_RSS_PFCP (1ULL << 30)
>> -
>> +#define ETH_RSS_PPPOE (1ULL << 31)
>>
>> /*
>> * We use the following macros to combine with above ETH_RSS_* for
>> --
>> 1.8.3.1
>
> Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/3] app/testpmd: support extended RSS offload types
2020-07-02 5:11 ` [dpdk-dev] [PATCH v2 2/3] app/testpmd: support extended " Simei Su
@ 2020-07-07 12:02 ` Ferruh Yigit
0 siblings, 0 replies; 14+ messages in thread
From: Ferruh Yigit @ 2020-07-07 12:02 UTC (permalink / raw)
To: Simei Su, qi.z.zhang, beilei.xing; +Cc: dev, jia.guo, junfeng.guo
On 7/2/2020 6:11 AM, Simei Su wrote:
> This patch adds testpmd cmdline support for PPPoE.
>
> Signed-off-by: Simei Su <simei.su@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2020-07-07 12:02 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-12 2:20 [dpdk-dev] [PATCH 0/3] net/ice: enable advanced RSS for PPPoE 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 ` [dpdk-dev] [PATCH v2 3/3] net/ice: add RSS support for PPPoE Simei Su
2020-07-07 0:24 ` [dpdk-dev] [PATCH v2 0/3] net/ice: enable advanced RSS " Zhang, Qi Z
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.