[PATCH 4/5] net/dpaa2: remove ethdev device in bus device

David Marchand david.marchand at redhat.com
Wed Nov 12 10:04:44 CET 2025


On Wed, 12 Nov 2025 at 09:56, David Marchand <david.marchand at redhat.com> wrote:
> On Wed, 12 Nov 2025 at 09:44, Maxime Leroy <maxime at leroys.fr> wrote:
> > I don’t think dpaa2_tx_sg_pool should be freed in rte_dpaa2_remove; it
> > should be freed in dpaa2_dev_close instead.
> > For symmetry, dpaa2_tx_sg_pool should also be allocated directly in
> > dpaa2_dev_init.
>
> Indeed, moving the dpaa2_tx_sg_pool handling in dev_init/dev_close is
> more self contained, and looks cleaner.

On this topic, in rte_dpaa2_probe:

    /* Invoke PMD device initialization function */
    diag = dpaa2_dev_init(eth_dev);
    if (!diag) {
        diag = dpaa2_tx_sg_pool_init();
        if (diag)
            return diag;

On dpaa2_tx_sg_pool_init() failure, a eth_dev is leaked.
Worth fixing while moving around the code related to dpaa2_tx_sg_pool.


-- 
David Marchand



More information about the dev mailing list