Support RSS for GTPoGRE inner fields hash.

Signed-off-by: Junfeng Guo <junfeng....@intel.com>
Signed-off-by: Qi Zhang <qi.z.zh...@intel.com>
---
 drivers/net/ice/base/ice_flow.c | 8 ++++++++
 drivers/net/ice/base/ice_flow.h | 4 ++++
 2 files changed, 12 insertions(+)

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 5b26d6c8b2..e41082b6ba 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -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 &
diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h
index 878c79d19e..39408c5634 100644
--- a/drivers/net/ice/base/ice_flow.h
+++ b/drivers/net/ice/base/ice_flow.h
@@ -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
 };
 
-- 
2.26.2

Reply via email to