[dpdk-dev] [PATCH v3] net/nfb: new netcope driver

David Marchand david.marchand at redhat.com
Mon Mar 4 13:48:31 CET 2019


On Mon, Mar 4, 2019 at 1:35 PM David Marchand <david.marchand at redhat.com>
wrote:

>
>
> On Mon, Mar 4, 2019 at 1:30 PM Rastislav Černay <cernay at netcope.com>
> wrote:
>
>> >>> What is the point of adding when i >= RTE_ETHDEV_QUEUE_STAT_CNTRS ?
>>
>> struct rte_eth_stats {
>> ...
>> uint64_t q_opackets[RTE_ETHDEV_QUEUE_STAT_CNTRS]
>> ...
>> }
>>
>> As there can be more queues (nb_tx) then RTE_ETHDEV_QUEUE_STAT_CNTRS
>> (16) and struct rte_eth_stats eth_stats is allocated statically,
>> there is need to check so it does not write garbage somewhere.
>>
>
> How about looping on min(nb_tx, RTE_ETHDEV_QUEUE_STAT_CNTRS) ?
>

Or add the tx_queue[i].tx_xxx; to the associated global stats and only
fills q_xxx depending on the check.


-- 
David Marchand


More information about the dev mailing list