> -----Original Message-----
> From: Guo, Jia <jia....@intel.com>
> Sent: Friday, May 8, 2020 5:30 AM
> To: Xing, Beilei <beilei.x...@intel.com>; Wu, Jingjing <jingjing...@intel.com>
> Cc: Iremonger, Bernard <bernard.iremon...@intel.com>; Ye, Xiaolong
> <xiaolong...@intel.com>; Zhang, Qi Z <qi.z.zh...@intel.com>;
> dev@dpdk.org; Guo, Jia <jia....@intel.com>
> Subject: [PATCH] net/iavf: fix input set for rss hash
> 
> Since some specific rss hash type need to combine with the protocol hash
> type when configure a rss hash rule, so add the corresponding input set to
> support these case for iavf hash.
> 
> Fixes: 7be10c3004be ("net/iavf: add RSS configuration for VF")
> Signed-off-by: Jeff Guo <jia....@intel.com>
> ---
>  drivers/net/iavf/iavf_hash.c | 96
> ++++++++++++++++++++++++++++++++++++
>  1 file changed, 96 insertions(+)
> 
> diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index
> a1d0b8364..97370aa19 100644
> --- a/drivers/net/iavf/iavf_hash.c
> +++ b/drivers/net/iavf/iavf_hash.c
> @@ -594,11 +594,19 @@ struct iavf_hash_match_type
> iavf_hash_type_list[] = {
>       /* IPV4 */
>       {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2_SRC_ONLY,
> &hdrs_hint_eth_src},
>       {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2_DST_ONLY,
> &hdrs_hint_eth_dst},
> +     {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH | ETH_RSS_L2_SRC_ONLY,
> +                                             &hdrs_hint_eth_src},
> +     {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH | ETH_RSS_L2_DST_ONLY,
> +                                             &hdrs_hint_eth_dst},
>       {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH, &hdrs_hint_eth},
>       {IAVF_PATTERN_HINT_IPV4, ETH_RSS_S_VLAN, &hdrs_hint_svlan},
>       {IAVF_PATTERN_HINT_IPV4, ETH_RSS_C_VLAN, &hdrs_hint_cvlan},
>       {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L3_SRC_ONLY,
> &hdrs_hint_ipv4_src},
>       {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L3_DST_ONLY,
> &hdrs_hint_ipv4_dst},
> +     {IAVF_PATTERN_HINT_IPV4, ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY,
> +                                             &hdrs_hint_ipv4_src},
> +     {IAVF_PATTERN_HINT_IPV4, ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY,
> +                                             &hdrs_hint_ipv4_dst},
>       {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ESP, &hdrs_hint_ipv4_esp},
>       {IAVF_PATTERN_HINT_IPV4, ETH_RSS_AH, &hdrs_hint_ipv4_ah},
>       {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2TPV3,
> &hdrs_hint_ipv4_l2tpv3}, @@ -620,6 +628,23 @@ struct
> iavf_hash_match_type iavf_hash_type_list[] = {
>                                       &hdrs_hint_ipv4_dst_gtpu_dwn},
>       {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY,
>                                       &hdrs_hint_ipv4_dst},
> +     {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_IPV4 |
> ETH_RSS_L3_SRC_ONLY |
> +                     ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv4_src_udp_src_port},
> +     {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_IPV4 |
> ETH_RSS_L3_SRC_ONLY |
> +                     ETH_RSS_L4_DST_ONLY,
> &hdrs_hint_ipv4_src_udp_dst_port},
> +     {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_IPV4 |
> ETH_RSS_L3_SRC_ONLY |
> +                             ETH_RSS_GTPU, &hdrs_hint_ipv4_src_gtpu_up},
> +     {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_IPV4 |
> ETH_RSS_L3_SRC_ONLY,
> +                                     &hdrs_hint_ipv4_src},
> +     {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_IPV4 |
> ETH_RSS_L3_DST_ONLY |
> +                     ETH_RSS_L4_SRC_ONLY,

I think the protocol type should be ETH_RSS_NONFRAG_IPV4_UDP if level 4 
modification is involved.
And similar change also need be applied to TCP/SCTP... 

Reply via email to