[v2] ethdev: add support for RSS based on IPv6 flow label
Checks
Commit Message
On supporting hardware, the 20-bit Flow Label field in the
IPv6 header can be used to perform RSS in the ingress path.
Flow label values can be chosen such that they can be
used as part of the input to a hash function used in a load
distribution scheme.
On supporting hardware, the 20-bit Flow Label field in the
IPv6 header can be used to perform RSS in the ingress path.
Example to configure IPv6 flow label based RSS:
flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-flow-label end / end
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
v1->v2:
Combined ethdev and testmd patches into single patch as suggested.
---
app/test-pmd/cmdline.c | 8 ++++----
app/test-pmd/config.c | 1 +
lib/ethdev/rte_ethdev.h | 1 +
3 files changed, 6 insertions(+), 4 deletions(-)
Comments
On 2/8/2024 10:06 PM, Ajit Khaparde wrote:
> On supporting hardware, the 20-bit Flow Label field in the
> IPv6 header can be used to perform RSS in the ingress path.
>
> Flow label values can be chosen such that they can be
> used as part of the input to a hash function used in a load
> distribution scheme.
>
> On supporting hardware, the 20-bit Flow Label field in the
> IPv6 header can be used to perform RSS in the ingress path.
>
> Example to configure IPv6 flow label based RSS:
>
> flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-flow-label end / end
>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
> v1->v2:
> Combined ethdev and testmd patches into single patch as suggested.
> ---
> app/test-pmd/cmdline.c | 8 ++++----
> app/test-pmd/config.c | 1 +
> lib/ethdev/rte_ethdev.h | 1 +
> 3 files changed, 6 insertions(+), 4 deletions(-)
>
testpmd documentation needs to be updated for updated commands:
'doc/guides/testpmd_app_ug/testpmd_funcs.rst'
On Thu, Feb 8, 2024 at 2:23 PM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
>
> On 2/8/2024 10:06 PM, Ajit Khaparde wrote:
> > On supporting hardware, the 20-bit Flow Label field in the
> > IPv6 header can be used to perform RSS in the ingress path.
> >
> > Flow label values can be chosen such that they can be
> > used as part of the input to a hash function used in a load
> > distribution scheme.
> >
> > On supporting hardware, the 20-bit Flow Label field in the
> > IPv6 header can be used to perform RSS in the ingress path.
> >
> > Example to configure IPv6 flow label based RSS:
> >
> > flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-flow-label end / end
> >
> > Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> > ---
> > v1->v2:
> > Combined ethdev and testmd patches into single patch as suggested.
> > ---
> > app/test-pmd/cmdline.c | 8 ++++----
> > app/test-pmd/config.c | 1 +
> > lib/ethdev/rte_ethdev.h | 1 +
> > 3 files changed, 6 insertions(+), 4 deletions(-)
> >
>
> testpmd documentation needs to be updated for updated commands:
> 'doc/guides/testpmd_app_ug/testpmd_funcs.rst'
ACK.
>
>
@@ -715,7 +715,7 @@ static void cmd_help_long_parsed(void *parsed_result,
"port config all rss (all|default|level-default|level-outer|level-inner|"
"ip|tcp|udp|sctp|tunnel|vlan|none|"
"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
- "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|"
+ "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|ipv6-flow-label|"
"l2-payload|port|vxlan|geneve|nvgre|gtpu|eth|s-vlan|c-vlan|"
"esp|ah|l2tpv3|pfcp|pppoe|ecpri|mpls|ipv4-chksum|l4-chksum|"
"l2tpv2|l3-pre96|l3-pre64|l3-pre56|l3-pre48|l3-pre40|l3-pre32|"
@@ -2133,7 +2133,7 @@ static cmdline_parse_inst_t cmd_config_rss = {
"all|default|level-default|level-outer|level-inner|"
"ip|tcp|udp|sctp|tunnel|vlan|none|"
"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
- "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|"
+ "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|ipv6-flow-label|"
"l2-payload|port|vxlan|geneve|nvgre|gtpu|eth|s-vlan|c-vlan|"
"esp|ah|l2tpv3|pfcp|pppoe|ecpri|mpls|ipv4-chksum|l4-chksum|"
"l2tpv2|l3-pre96|l3-pre64|l3-pre56|l3-pre48|l3-pre40|l3-pre32|"
@@ -2249,7 +2249,7 @@ static cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type =
"ipv4#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#"
"ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-udp#"
"ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#"
- "ipv6-tcp-ex#ipv6-udp-ex#"
+ "ipv6-tcp-ex#ipv6-udp-ex#ipv6-flow-label#"
"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#pppoe#gtpu#ecpri#mpls#l2tpv2");
@@ -2262,7 +2262,7 @@ static cmdline_parse_inst_t cmd_config_rss_hash_key = {
.help_str = "port config <port_id> rss-hash-key "
"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|"
- "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|"
+ "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|ipv6-flow-label|"
"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|pppoe|gtpu|ecpri|mpls|l2tpv2 "
@@ -148,6 +148,7 @@ const struct rss_type_info rss_type_table[] = {
{ "l4-src-only", RTE_ETH_RSS_L4_SRC_ONLY },
{ "l3-dst-only", RTE_ETH_RSS_L3_DST_ONLY },
{ "l3-src-only", RTE_ETH_RSS_L3_SRC_ONLY },
+ { "ipv6-flow-label", RTE_ETH_RSS_IPV6_FLOW_LABEL },
{ NULL, 0},
};
@@ -587,6 +587,7 @@ struct rte_eth_rss_conf {
#define RTE_ETH_RSS_L4_CHKSUM RTE_BIT64(35)
#define RTE_ETH_RSS_L2TPV2 RTE_BIT64(36)
+#define RTE_ETH_RSS_IPV6_FLOW_LABEL RTE_BIT64(37)
/*
* We use the following macros to combine with above RTE_ETH_RSS_* for