And rte_eth_dev_info.flow_type_rss_offloads is populated in terms of
RTE_ETH_RSS_* bits. If PMD sets RTE_ETH_RSS_L3_SRC_ONLY to
dev_info->flow_type_rss_offloads. testpmd will display "user defined 63"
when run 'show port info 0'. Because testpmd use flowtype_to_str()
to display the supported RSS offload of PMD. In fact, the function is
used to display flow type in FDIR commands. This patch uses the
RTE_ETH_RSS_* bits to display supported RSS offload of PMD.
Fixes: b12964f621dc ("ethdev: unification of RSS offload types")
Cc: sta...@dpdk.org
Signed-off-by: Huisong Li <lihuis...@huawei.com>
Signed-off-by: Ferruh Yigit <ferruh.yi...@xilinx.com>
---
app/test-pmd/config.c | 85 ++++++++++++++++++++++++++++++++++++++-----
1 file changed, 75 insertions(+), 10 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 72d2606d19..d290ca3a06 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -86,6 +86,56 @@ static const struct {
},
};
+const struct rss_type_info rss_offload_table[] = {
+ {"ipv4", RTE_ETH_RSS_IPV4},
+ {"ipv4-frag", RTE_ETH_RSS_FRAG_IPV4},
+ {"ipv4-tcp", RTE_ETH_RSS_NONFRAG_IPV4_TCP},
+ {"ipv4-udp", RTE_ETH_RSS_NONFRAG_IPV4_UDP},
+ {"ipv4-sctp", RTE_ETH_RSS_NONFRAG_IPV4_SCTP},
+ {"ipv4-other", RTE_ETH_RSS_NONFRAG_IPV4_OTHER},
+ {"ipv6", RTE_ETH_RSS_IPV6},
+ {"ipv6-frag", RTE_ETH_RSS_FRAG_IPV6},
+ {"ipv6-tcp", RTE_ETH_RSS_NONFRAG_IPV6_TCP},
+ {"ipv6-udp", RTE_ETH_RSS_NONFRAG_IPV6_UDP},
+ {"ipv6-sctp", RTE_ETH_RSS_NONFRAG_IPV6_SCTP},
+ {"ipv6-other", RTE_ETH_RSS_NONFRAG_IPV6_OTHER},
+ {"l2_payload", RTE_ETH_RSS_L2_PAYLOAD},
+ {"ipv6-ex", RTE_ETH_RSS_IPV6_EX},
+ {"ipv6-tcp-ex", RTE_ETH_RSS_IPV6_TCP_EX},
+ {"ipv6-udp-ex", RTE_ETH_RSS_IPV6_UDP_EX},
+ {"port", RTE_ETH_RSS_PORT},
+ {"vxlan", RTE_ETH_RSS_VXLAN},
+ {"geneve", RTE_ETH_RSS_GENEVE},
+ {"nvgre", RTE_ETH_RSS_NVGRE},
+ {"gtpu", RTE_ETH_RSS_GTPU},
+ {"eth", RTE_ETH_RSS_ETH},
+ {"s-vlan", RTE_ETH_RSS_S_VLAN},
+ {"c-vlan", RTE_ETH_RSS_C_VLAN},
+ {"esp", RTE_ETH_RSS_ESP},
+ {"ah", RTE_ETH_RSS_AH},
+ {"l2tpv3", RTE_ETH_RSS_L2TPV3},
+ {"pfcp", RTE_ETH_RSS_PFCP},
+ {"pppoe", RTE_ETH_RSS_PPPOE},
+ {"ecpri", RTE_ETH_RSS_ECPRI},
+ {"mpls", RTE_ETH_RSS_MPLS},
+ {"ipv4-chksum", RTE_ETH_RSS_IPV4_CHKSUM},
+ {"l4-chksum", RTE_ETH_RSS_L4_CHKSUM},
+ {"l2tpv2", RTE_ETH_RSS_L2TPV2},
+ {"l3-pre96", RTE_ETH_RSS_L3_PRE96},
+ {"l3-pre64", RTE_ETH_RSS_L3_PRE64},
+ {"l3-pre56", RTE_ETH_RSS_L3_PRE56},
+ {"l3-pre48", RTE_ETH_RSS_L3_PRE48},
+ {"l3-pre40", RTE_ETH_RSS_L3_PRE40},
+ {"l3-pre32", RTE_ETH_RSS_L3_PRE32},
+ {"l2-dst-only", RTE_ETH_RSS_L2_DST_ONLY},
+ {"l2-src-only", RTE_ETH_RSS_L2_SRC_ONLY},
+ {"l4-dst-only", RTE_ETH_RSS_L4_DST_ONLY},
+ {"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},
+ {NULL, 0},
+};
+