[dpdk-dev] [PATCH v2] net/mlx5: fix resetting verbs hash fields

Matan Azrad matan at mellanox.com
Tue May 5 11:08:38 CEST 2020



> -----Original Message-----
> From: Ophir Munk <ophirmu at mellanox.com>
> Sent: Tuesday, May 5, 2020 9:16 AM
> To: dev at dpdk.org
> Cc: Ophir Munk <ophirmu at mellanox.com>; Raslan Darawsheh
> <rasland at mellanox.com>; Matan Azrad <matan at mellanox.com>
> Subject: [PATCH v2] net/mlx5: fix resetting verbs hash fields
> 
> The flow_verbs_translate() function accumulates hash fields while iterating
> through the flow items (SRC_IPV4, DST_IPV4, SRC_IPV6, DST_IPV6,
> SRC_PORT_TCP, DST_PORT_TCP, SRC_PORT_UDP, DST_PORT_UDP).
> Before this commit the dev_flow handle structure was reused in each new
> flow_verbs_translate() call, however the dev_flow->hash_fields variable
> was not reset before each call. As a result hash_fields from previous calls
> remained present in the current flow which lead to invalid combinations (e.g.
> simultaneous IPv4 and IPv6 specs). This scenario happens for example in the
> next flows sequence, when running in verbs mode (dv_flow_en=0).
> 
> flow create 0 ingress group 0 pattern eth / ipv4 / end <rss actions> flow
> create 0 ingress group 0 pattern eth / ipv6 / end <rss actions>
> 
> The fix is to reset dev_flow->hash_fields in flow_verbs_prepare().
> 
> Fixes: e7bfa3596a0a ("net/mlx5: separate the flow handle resource")
> 
> Signed-off-by: Ophir Munk <ophirmu at mellanox.com>
Acked-by: Matan Azrad <matan at mellanox.com>


More information about the dev mailing list