[v3] net/iavf: fix invalid RSS combinations rule can be created
Checks
Commit Message
Currently, when use 'flow' command to create a rule that combine with
several RSS types, even the RSS type combination is invalid, it also
be created successfully.
Here list some invalid RSS combinations:
- ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
- ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP
- ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4
- ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_UDP
- ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_TCP
- ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6
- ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_UDP
- ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_TCP
So, this patch adds these combinations in 'invalid_rss_comb'
array to do valid check, if the combination check failed,
the rule will be created unsuccessful.
Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")
Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
---
v3:
- update the comments.
v2:
- add invalid RSS combinations.
drivers/net/iavf/iavf_hash.c | 8 ++++++++
1 file changed, 8 insertions(+)
@@ -806,7 +806,15 @@ static void iavf_refine_proto_hdrs(struct virtchnl_proto_hdrs *proto_hdrs,
static uint64_t invalid_rss_comb[] = {
ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP,
+ ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP,
ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP,
+ ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP,
+ ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4,
+ ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_UDP,
+ ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_TCP,
+ ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6,
+ ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_UDP,
+ ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_TCP,
RTE_ETH_RSS_L3_PRE32 | RTE_ETH_RSS_L3_PRE40 |
RTE_ETH_RSS_L3_PRE48 | RTE_ETH_RSS_L3_PRE56 |
RTE_ETH_RSS_L3_PRE96