> -----Original Message-----
> From: Xiaoyu Min <jack...@mellanox.com>
> Sent: Tuesday, November 5, 2019 3:43 PM
> To: Ori Kam <or...@mellanox.com>; Slava Ovsiienko
> <viachesl...@mellanox.com>; Thomas Monjalon <tho...@monjalon.net>;
> Adrien Mazarguil <adrien.mazarg...@6wind.com>; Ferruh Yigit
> <ferruh.yi...@intel.com>; Andrew Rybchenko <arybche...@solarflare.com>
> Cc: dev@dpdk.org; sta...@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: sta...@dpdk.org
> 
> Signed-off-by: Xiaoyu Min <jack...@mellanox.com>
> ---
>  v2:
>    * more clear commit message
> ---

Acked-by: Ori Kam <or...@mellanox.com>

Reply via email to