[PATCH 04/10] net/nfp: improve the logic readability
Chaoyong He
chaoyong.he at corigine.com
Fri Oct 11 04:36:44 CEST 2024
> On Thu, 10 Oct 2024 17:17:10 +0800
> Chaoyong He <chaoyong.he at corigine.com> wrote:
>
> > +
> > +port_cleanup:
> > + for (uint32_t j = 0; j < i; j++) {
> > + struct rte_eth_dev *eth_dev;
> > +
> > + nfp_port_name_generate(port_name, sizeof(port_name), j,
> pf_dev);
> > + eth_dev = rte_eth_dev_get_by_name(port_name);
> > + if (eth_dev != NULL)
> > + rte_eth_dev_destroy(eth_dev, NULL);
> > + }
> > +
>
> You could skip the lookup if you kept an array of eth_dev's that were created?
Yes, it does make sense and sounds a good idea.
Maybe we can do it in a future patch rather than in this one?
Anyway, thanks for your review.
More information about the dev
mailing list