On Sun, Nov 29, 2026 at 01:53:10PM +0000, Anurag Mandal wrote:
> VF representor ports are never released.
> 
> They have no close callback, so rte_eth_dev_close()
> returns -ENOTSUP before releasing the port.
> On device removal, eth_ixgbe_pci_remove() looks up
> the port by the PCI device name, which always finds
> the PF, so the representor branch is dead code.
> Each representor leaks its port and private data,
> and its MAC address pointer is left pointing into the
> per-VF data of the PF, which is freed when the PF is
> closed.
> 
> Add a close callback for representors, and release them
> before the PF on device removal.
> As close may also be called from a secondary process,
> only clear the shared MAC address pointer in the primary.
> 
> Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports")
> Cc: [email protected]
> 
> Signed-off-by: Anurag Mandal <[email protected]>
> ---
>  drivers/net/intel/ixgbe/ixgbe_ethdev.c         | 17 ++++++++---------
>  drivers/net/intel/ixgbe/ixgbe_vf_representor.c |  5 ++++-
>  2 files changed, 12 insertions(+), 10 deletions(-)
> 
Some AI feedback on this patch, worth checking out.

PCI removal ignores a failed child destroy and proceeds to remove the PF.
The new ixgbe_ethdev.c:1722 discards the return value. ethdev_driver.c:387
can fail, yet PCI removal returns the PF removal result. That can report
successful removal while a representor remains registered. Check the return
and stop before removing the PF if a child could not be destroyed

Reply via email to