Hi,

> -----Original Message-----
> From: Pattan, Reshma
> Sent: Tuesday, September 20, 2016 6:48 PM
> To: Kerlin, MarcinX <marcinx.kerlin at intel.com>; dev at dpdk.org
> Cc: thomas.monjalon at 6wind.com; De Lara Guarch, Pablo
> <pablo.de.lara.guarch at intel.com>; Kerlin, MarcinX
> <marcinx.kerlin at intel.com>
> Subject: RE: [dpdk-dev] [PATCH v2 1/2] librte_ether: ensure not overwrite
> device data in mp app
> 
> Hi,
> 
> > +
> > +   if (dev_data_id == RTE_MAX_ETHPORTS) {
> > +           RTE_PMD_DEBUG_TRACE("Reached maximum number of
> > Ethernet ports by all "
> > +                           "the processes\n");
> > +           return NULL;
> > +   }
> > +
> >
> 
> Can the log message be changed to ("Cannot allocate more than %d number of
> devices ", RTE_MAX_ETHPORTS).
> Instead of mentioning about the processes?

First message announces that it exceeded the limit in one application:
1)
        if (port_id == RTE_MAX_ETHPORTS) {
                RTE_PMD_DEBUG_TRACE("Reached maximum number of Ethernet 
ports\n");
                return NULL;
        }

Second announces that it exceeded the limit in all applications:
2)
        if (dev_data_id == RTE_MAX_ETHPORTS) {
                RTE_PMD_DEBUG_TRACE("Reached maximum number of Ethernet ports 
by all "
                                "the processes\n");
                return NULL;
        }


"Cannot allocate more than %d number of devices" In my opinion this message is 
general and 
says nothing other than first (1).

Maybe only leave such a message instead of the above 2, which check only common 
array as 
common array will be faster filled up than local to each process

        if (dev_data_id == RTE_MAX_ETHPORTS) {
                RTE_PMD_DEBUG_TRACE("Cannot allocate more than %d number of 
devices \n");
                return NULL;
        }

Regards,
Marcin

> 
> Thanks,
> Reshma

Reply via email to