Hi, > -----Original Message----- > From: Bing Zhao <[email protected]> > Sent: Saturday, July 24, 2021 4:27 PM > To: Slava Ovsiienko <[email protected]>; Matan Azrad > <[email protected]> > Cc: [email protected]; Ori Kam <[email protected]>; Raslan Darawsheh > <[email protected]>; [email protected] > 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: [email protected] > > Signed-off-by: Bing Zhao <[email protected]> > Acked-by: Viacheslav Ovsiienko <[email protected]>
Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh

