09/07/2025 17:01, Stephen Hemminger:
> On Tue, 8 Jul 2025 10:09:54 +0300
> Maayan Kashani <mkash...@nvidia.com> wrote:
> 
> > +static void
> > +exit_cleanup(void)
> > +{
> > +   unsigned int i;
> > +
> > +   RTE_LOG(INFO, APP, "Close ports.\n");
> > +   for (i = 0; i < num_ports; i++) {
> > +           if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
> > +                   if (rte_eth_dev_stop(ports[i]))
> > +                           rte_exit(EXIT_FAILURE, "Error stopping 
> > ports\n");
> > +                   if (rte_eth_dev_close(ports[i]))
> > +                           rte_exit(EXIT_FAILURE, "Error closing ports\n");
> > +           }
> > +   }
> 
> Could the ethdev cleanup be integrated into eal_cleanup() so applications
> don't have to care?

It would be a layer violation.
We could have a list of callbacks maybe.


Reply via email to