[dpdk-dev] [PATCH] net/mlx5: fix queue leaking in hairpin auto bind checking

Raslan Darawsheh rasland at nvidia.com
Wed Jul 28 09:22:16 CEST 2021


Hi,
> -----Original Message-----
> From: Bing Zhao <bingz at nvidia.com>
> Sent: Saturday, July 24, 2021 4:27 PM
> To: Slava Ovsiienko <viacheslavo at nvidia.com>; Matan Azrad
> <matan at nvidia.com>
> Cc: dev at dpdk.org; Ori Kam <orika at nvidia.com>; Raslan Darawsheh
> <rasland at nvidia.com>; stable at dpdk.org
> Subject: [PATCH] net/mlx5: fix queue leaking in hairpin auto bind checking
> 
> During the start up stage, the hairpin auto bind was executed for
> each port. All the Tx and Rx queues configured for this port should
> be checked to confirm if the auto bind of hairpin is needed.
> 1. The queue is hairpin queue.
> 2. The peer port is the same one and the peer queue should also be
>    with hairpin type.
> 3. The manual bind attribute is not set for this queue.
> 
> If the queue is not a hairpin queue or it doesn't need to be bound
> automatically, the reference count should be decreased by 1 since
> the count was increased when calling the mlx5_*xq_get().
> When the peer port is not the same, it means that no auto bind is
> supported and the mlx5_*xq_release() was missed in the current
> implementation.
> 
> By calling the release function before continue, the count is
> correct when calling the device close.
> 
> Fixes: aa8bea0e3455 ("net/mlx5: add conditional hairpin auto bind")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Bing Zhao <bingz at nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh



More information about the dev mailing list