On 29/04/2016 14:43, David Harton (dharton) wrote:
[..]
>> +            /* RX Priority Stats */
>> +            for (stat = 0; stat < IXGBE_NB_RXQ_PRIO_STATS; stat++) {
>> +                    for (i = 0; i < 8; i++) {
>
> 8 seems magical.  Is there a constant somewhere that can be used?

Not that I'm aware of. I've made it a #define as a small cleanup.


>> +static int ixgbevf_dev_xstats_names(__rte_unused struct rte_eth_dev *dev,
>> +    struct rte_eth_xstats_name *ptr_names, __rte_unused unsigned limit)
>> +{
>> +    unsigned i;
>> +
>> +    if (limit < IXGBEVF_NB_XSTATS)
>
> Think this check has to be removed since rte_eth_xstats_count() calls with
> limit == 0.

Well spotted. It should only error-out if ptr_names is non-NULL.

As an aside, I am wondering whether getting stats counts should itself 
be a seperate driver hook.


..Remy

Reply via email to