]> git.droids-corp.org - dpdk.git/commitdiff
net/bnxt: fix RSS action parser
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Tue, 26 Oct 2021 05:14:32 +0000 (22:14 -0700)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Wed, 27 Oct 2021 01:50:39 +0000 (03:50 +0200)
Minor fixes are needed in the RTE_FLOW RSS action parser.
1. Update the comment in the parser to indicate RSS level 1 implies RSS
   on outer header.
2. RSS action will not be supported if level is > 1.
3. RSS action will not be supported if user or application specifies
   MARK or COUNT action.
4. If RSS types is not specified i.e., is 0, the best effort RSS should
   use IPv4 and IPv6 headers. Currently we are considering only IPv4.

Fixes: 239695f754cb ("net/bnxt: enhance RSS action support")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
drivers/net/bnxt/bnxt_flow.c

index ced697a7398042a87bf5a24ed6b0b06a9a5674ee..09b134253377f2253657661e9fabc99b73874015 100644 (file)
@@ -1084,10 +1084,6 @@ bnxt_validate_rss_action(const struct rte_flow_action actions[])
                        break;
                case RTE_FLOW_ACTION_TYPE_RSS:
                        break;
-               case RTE_FLOW_ACTION_TYPE_MARK:
-                       break;
-               case RTE_FLOW_ACTION_TYPE_COUNT:
-                       break;
                default:
                        return -ENOTSUP;
                }
@@ -1151,11 +1147,10 @@ bnxt_vnic_rss_cfg_update(struct bnxt *bp,
        }
 
        /* Currently RSS hash on inner and outer headers are supported.
-        * 0 => Default setting
-        * 1 => Inner
-        * 2 => Outer
+        * 0 => Default (innermost RSS) setting
+        * 1 => Outermost
         */
-       if (rss->level > 2) {
+       if (rss->level > 1) {
                rte_flow_error_set(error,
                                   ENOTSUP,
                                   RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1177,7 +1172,7 @@ bnxt_vnic_rss_cfg_update(struct bnxt *bp,
        }
 
        /* If RSS types is 0, use a best effort configuration */
-       types = rss->types ? rss->types : RTE_ETH_RSS_IPV4;
+       types = rss->types ? rss->types : RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_IPV6;
 
        hash_type = bnxt_rte_to_hwrm_hash_types(types);