[dpdk-stable] [PATCH v2] ethdev: fix expand RSS flows

Ori Kam orika at mellanox.com
Wed Nov 6 11:12:29 CET 2019



> -----Original Message-----
> From: Xiaoyu Min <jackmin at mellanox.com>
> Sent: Tuesday, November 5, 2019 3:43 PM
> To: Ori Kam <orika at mellanox.com>; Slava Ovsiienko
> <viacheslavo at mellanox.com>; Thomas Monjalon <thomas at monjalon.net>;
> Adrien Mazarguil <adrien.mazarguil at 6wind.com>; Ferruh Yigit
> <ferruh.yigit at intel.com>; Andrew Rybchenko <arybchenko at solarflare.com>
> Cc: dev at dpdk.org; stable at dpdk.org
> Subject: [PATCH v2] ethdev: fix expand RSS flows
> 
> rte_flow_expand_rss expands rte_flow item list based on the RSS
> types. In another word, some additional rules are added if the user
> specified items are not complete enough according to the RSS type,
> for example:
> 
>   ... pattern eth / end actions rss type tcp end ...
> 
> User only provides item eth but want to do RSS on tcp traffic.
> The pattern is not complete enough to filter TCP traffic only.
> This will be a problem for some HWs.
> So some PMDs use rte_flow_expand_rss to expand above user provided
> flow to:
> 
>   ... pattern eth / end actions rss types tcp
>   ... pattern eth / ipv4 / tcp / end actions rss types tcp ...
>   ... pattern eth / ipv6 / tcp / end actions rss types tcp ...
> 
> in order to filter TCP traffic only and do RSS correctly.
> 
> However the current expansion cannot handle pattern as below, which
> provides ethertype or ip next proto instead of providing an item:
> 
>   ... pattern eth type is 0x86DD / end actions rss types tcp ...
> 
> rte_flow_expand_rss will expand above flow to:
> 
>   ... pattern eth type is 0x86DD / ipv4 / tcp end ...
> 
> which has conflicting values: 0x86DD vs. ipv4 and some HWs will refuse
> to create flow.
> 
> This patch will fix above by checking the last item's spec and to
> expand RSS flows correctly.
> 
> Currently only support to complete item list based on ether type or ip
> next proto.
> 
> Fixes: 4ed05fcd441b ("ethdev: add flow API to expand RSS flows")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Xiaoyu Min <jackmin at mellanox.com>
> ---
>  v2:
>    * more clear commit message
> ---

Acked-by: Ori Kam <orika at mellanox.com>


More information about the stable mailing list