Hi, > -----Original Message----- > From: Dariusz Sosnowski <dsosnow...@nvidia.com> > Sent: Friday, August 4, 2023 8:16 PM > To: Matan Azrad <ma...@nvidia.com>; Slava Ovsiienko > <viachesl...@nvidia.com>; Ori Kam <or...@nvidia.com>; Suanming Mou > <suanmi...@nvidia.com>; Jiawei(Jonny) Wang <jiaw...@nvidia.com> > Cc: dev@dpdk.org > Subject: [PATCH] net/mlx5: fix bond resource release > > When a port is spawned on top of mlx5 bonding device, the following TIS > objects are created: > > - TIS with index 0 - for default HW hash bonding mode, > - TIS with index 1 - for sending packets on 1st physical port, > - TIS with index 2 - for sending packets on 2nd physical port, > - and so on. > > These TIS objects are used according to configured Tx queue affinity, which > was set up using rte_eth_dev_map_aggr_tx_affinity() API. > > Before this patch, when DPDK was compiled in debug mode and > RTE_LIBRTE_MLX5_DEBUG macro was declared, applications were asserting > on failed call to destroy the TD object (on which TIS objects are dependent) > during closing of the ports. > Failure was caused by the fact that when TD object was destroyed, not all TIS > objects were destroyed yet. This was caused by "off-by-one" > issue in mlx5_free_shared_dev_ctx(). > This function was releasing n TIS objects, but it should release n + 1 > objects, > where n is number of aggregated ports. > (n + 1, because there are n TIS objects for each physical port and 1 TIS > object > for default HW hash mode). > > This patch fixes this issue in resource release of TIS objects. > > Fixes: ce306af6341b ("net/mlx5: enhance Tx queue affinity") > Cc: jiaw...@nvidia.com > > Signed-off-by: Dariusz Sosnowski <dsosnow...@nvidia.com> > ---
Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh