On Wed, 12 Nov 2025 at 09:56, David Marchand <[email protected]> wrote:
> On Wed, 12 Nov 2025 at 09:44, Maxime Leroy <[email protected]> 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

Reply via email to