From: Simei Su Date: Tue, 7 Jul 2020 01:38:18 +0000 (+0800) Subject: net/ice: fix GTPU/PPPoE packets with no hash value X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d117de4600352246e2c9ef05a853dd34b1e27cf5;p=dpdk.git net/ice: fix GTPU/PPPoE packets with no hash value When RSS init, because of profile overlap, the GTPU_IPV4 packets don't hit GTPU_INNER_IPV4 profile which causes no hash value. Because of no PPPoE profile, the PPPoE packets also has no hash value. This patch solves this issue by pulling GTPU_IPV4 profile into inner ipv4 group and creating related PPPoE profile at the same time. Fixes: 4717a12cfaf1 ("net/ice: initialize and update RSS based on user config") Signed-off-by: Simei Su Acked-by: Qi Zhang --- diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 32c6b4dcf9..3534d18cae 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2521,6 +2521,82 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf) PMD_DRV_LOG(ERR, "%s SCTP_IPV6 rss flow fail %d", __func__, ret); } + + if (rss_hf & ETH_RSS_IPV4) { + ret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV4, + ICE_FLOW_SEG_HDR_GTPU_IP, 0); + if (ret) + PMD_DRV_LOG(ERR, "%s GTPU_IPV4 rss flow fail %d", + __func__, ret); + + ret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV4, + ICE_FLOW_SEG_HDR_PPPOE, 0); + if (ret) + PMD_DRV_LOG(ERR, "%s PPPoE_IPV4 rss flow fail %d", + __func__, ret); + } + + if (rss_hf & ETH_RSS_IPV6) { + ret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV6, + ICE_FLOW_SEG_HDR_GTPU_IP, 0); + if (ret) + PMD_DRV_LOG(ERR, "%s GTPU_IPV6 rss flow fail %d", + __func__, ret); + + ret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV6, + ICE_FLOW_SEG_HDR_PPPOE, 0); + if (ret) + PMD_DRV_LOG(ERR, "%s PPPoE_IPV6 rss flow fail %d", + __func__, ret); + } + + if (rss_hf & ETH_RSS_NONFRAG_IPV4_UDP) { + ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_UDP_IPV4, + ICE_FLOW_SEG_HDR_PPPOE, 0); + if (ret) + PMD_DRV_LOG(ERR, "%s PPPoE_IPV4_UDP rss flow fail %d", + __func__, ret); + } + + if (rss_hf & ETH_RSS_NONFRAG_IPV6_UDP) { + ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_UDP_IPV6, + ICE_FLOW_SEG_HDR_PPPOE, 0); + if (ret) + PMD_DRV_LOG(ERR, "%s PPPoE_IPV6_UDP rss flow fail %d", + __func__, ret); + } + + if (rss_hf & ETH_RSS_NONFRAG_IPV4_TCP) { + ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_TCP_IPV4, + ICE_FLOW_SEG_HDR_PPPOE, 0); + if (ret) + PMD_DRV_LOG(ERR, "%s PPPoE_IPV4_TCP rss flow fail %d", + __func__, ret); + } + + if (rss_hf & ETH_RSS_NONFRAG_IPV6_TCP) { + ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_TCP_IPV6, + ICE_FLOW_SEG_HDR_PPPOE, 0); + if (ret) + PMD_DRV_LOG(ERR, "%s PPPoE_IPV6_TCP rss flow fail %d", + __func__, ret); + } + + if (rss_hf & ETH_RSS_NONFRAG_IPV4_SCTP) { + ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_SCTP_IPV4, + ICE_FLOW_SEG_HDR_PPPOE, 0); + if (ret) + PMD_DRV_LOG(ERR, "%s PPPoE_IPV4_SCTP rss flow fail %d", + __func__, ret); + } + + if (rss_hf & ETH_RSS_NONFRAG_IPV6_SCTP) { + ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_SCTP_IPV6, + ICE_FLOW_SEG_HDR_PPPOE, 0); + if (ret) + PMD_DRV_LOG(ERR, "%s PPPoE_IPV6_SCTP rss flow fail %d", + __func__, ret); + } } static int ice_init_rss(struct ice_pf *pf)