[ovs-dev] [RFC PATCH] netdev-dpdk: Expose per rxq/txq basic statistics.

Maxime Coquelin maxime.coquelin at redhat.com
Fri Nov 19 09:40:00 UTC 2021

Hi Kevin, David,

On 11/18/21 16:31, Kevin Traynor wrote:
> On 15/10/2021 16:04, David Marchand wrote:
>> When troubleshooting multiqueue setups, having per queue statistics helps
>> checking packets repartition in rx and tx queues.
>> Per queue statistics are exported by most DPDK drivers (with capability
>> RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS). But since OVS only filters statistics
>> it exposes, there is nothing to request in DPDK API.
>> Extend existing filter with a regular expression.
>> string_ends_with() helper is not used anymore, and removed as a
>> consequence.
>> Querying statistics with
>> $ ovs-vsctl get interface dpdk0 statistics | \
>>    sed -e 's#[{}]##g' -e 's#, #\n#g'
>> and comparing gives:
>> @@ -13,7 +13,12 @@
>>   rx_phy_crc_errors=0
>>   rx_phy_in_range_len_errors=0
>>   rx_phy_symbol_errors=0
>> +rx_q0_bytes=0
>>   rx_q0_errors=0
>> +rx_q0_packets=0
>> +rx_q1_bytes=0
>> +rx_q1_errors=0
>> +rx_q1_packets=0
>>   rx_wqe_errors=0
>>   tx_broadcast_packets=0
>>   tx_bytes=0
>> @@ -27,3 +32,13 @@
>>   tx_pp_rearm_queue_errors=0
>>   tx_pp_timestamp_future_errors=0
>>   tx_pp_timestamp_past_errors=0
>> +tx_q0_bytes=0
>> +tx_q0_packets=0
>> +tx_q1_bytes=0
>> +tx_q1_packets=0
>> +tx_q2_bytes=0
>> +tx_q2_packets=0
>> +tx_q3_bytes=0
>> +tx_q3_packets=0
>> +tx_q4_bytes=0
>> +tx_q4_packets=0
>> Signed-off-by: David Marchand <david.marchand at redhat.com>
> The patch looks good but I tested with with ixgbe, and seeing something 
> I am unsure of. I changed the number of rxqs to 11 but I am only seeing 
> stats for q0. i'm not sure if this because there was no traffic yet 
> (even though there is also no traffic on q0). i will set up a traffic 
> gen and see what happens when the q1-q10 receives traffic.

I think the problem is that when port reconfiguration is called because
the number of queues changed, netdev_dpdk_clear_xstats() is not called.

So the next time netdev_dpdk_configure_xstats() is called, it returns
true early as it is already configured. So old configuration is keeped.

When increasing the number of queues, I think we get your behavior, i.e.
only previous number of queues counters are disaplayed. But when
decreasing the number of queues, I think rte_eth_xstats_get_by_id() will

I think calling netdev_dpdk_clear_xstats() in netdev_dpdk_reconfigure()
should fix your issue.


More information about the dev mailing list