net/ice/base: support RSS for GTPoGRE
authorQi Zhang <qi.z.zhang@intel.com>
Tue, 10 Aug 2021 02:51:32 +0000 (10:51 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Wed, 11 Aug 2021 02:24:59 +0000 (04:24 +0200)
Support RSS for GTPoGRE inner fields hash.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
drivers/net/ice/base/ice_flow.c
drivers/net/ice/base/ice_flow.h

index 5b26d6c..e41082b 100644 (file)
@@ -3483,6 +3483,14 @@ ice_flow_set_rss_seg_info(struct ice_flow_seg_info *segs, u8 seg_cnt,
                segs[ICE_RSS_OUTER_HEADERS].hdrs |= ICE_FLOW_SEG_HDR_IPV6 |
                                                   ICE_FLOW_SEG_HDR_IPV_FRAG |
                                                   ICE_FLOW_SEG_HDR_IPV_OTHER;
+       else if (cfg->hdr_type == ICE_RSS_INNER_HEADERS_W_OUTER_IPV4_GRE)
+               segs[ICE_RSS_OUTER_HEADERS].hdrs |= ICE_FLOW_SEG_HDR_IPV4 |
+                                                  ICE_FLOW_SEG_HDR_GRE |
+                                                  ICE_FLOW_SEG_HDR_IPV_OTHER;
+       else if (cfg->hdr_type == ICE_RSS_INNER_HEADERS_W_OUTER_IPV6_GRE)
+               segs[ICE_RSS_OUTER_HEADERS].hdrs |= ICE_FLOW_SEG_HDR_IPV6 |
+                                                  ICE_FLOW_SEG_HDR_GRE |
+                                                  ICE_FLOW_SEG_HDR_IPV_OTHER;
 
        if (seg->hdrs & ~ICE_FLOW_RSS_SEG_HDR_VAL_MASKS &
            ~ICE_FLOW_RSS_HDRS_INNER_MASK & ~ICE_FLOW_SEG_HDR_IPV_OTHER &
index 878c79d..39408c5 100644 (file)
@@ -348,6 +348,10 @@ enum ice_rss_cfg_hdr_type {
        /* take inner headers as inputset for packet with outer ipv6. */
        ICE_RSS_INNER_HEADERS_W_OUTER_IPV6,
        /* take outer headers first then inner headers as inputset */
+       /* take inner as inputset for GTPoGRE with outer ipv4 + gre. */
+       ICE_RSS_INNER_HEADERS_W_OUTER_IPV4_GRE,
+       /* take inner as inputset for GTPoGRE with outer ipv6 + gre. */
+       ICE_RSS_INNER_HEADERS_W_OUTER_IPV6_GRE,
        ICE_RSS_ANY_HEADERS
 };