[ovs-dev] [PATCH v2] Detailed packet drop statistics per dpdk and vhostuser ports

Kevin Traynor ktraynor at redhat.com
Tue Jun 18 19:38:35 UTC 2019


On 18/06/2019 15:05, Kevin Traynor wrote:
> Hi Sriram,
> 
> On 14/06/2019 14:38, Sriram Vatala via dev wrote:
>> OVS may be unable to transmit packets for multiple reasons and
>> today there is a single counter to track packets dropped due to
>> any of those reasons. The most common reason is that a VM is
>> unable to read packets fast enough causing the vhostuser port
>> transmit queue on the OVS side to become full. This manifests
>> as a problem with VNFs not receiving all packets. Having a
>> separate drop counter to track packets dropped because the
>> transmit queue is full will clearly indicate that the problem
>> is on the VM side and not in OVS. Similarly maintaining separate
>> counters for all possible drops helps in indicating sensible
>> cause for packet drops.
>>
>> This patch adds counters to track packets dropped due to all
>> possible reasons and these counters are displayed along with
>> other stats in "ovs-vsctl get interface <iface> statistics"
>> command. The detailed stats will be available for both dpdk and
>> vhostuser ports.
>>
>> Following are the details of the new counters :
>>
>> tx_qfull_drops : These are the packets dropped due to
>> transmit queue overrun.
>>
> 
> I'm not sure about this name, you would need to know that it was the
> only reason rte_eth_tx_burst() and rte_vhost_enqueue_burst() will not
> send pkts
> 
>> tx_mtu_exceeded_drops : These are the packets dropped due
>> to MTU mismatch (i.e Pkt len > Max Dev MTU).
>>
>> tx_qos_drops/rx_qos_drops : These are the packets dropped due
>> to transmission/reception rate exceeding the configured
>> Egress/Ingress policer rate on the interface.
>>
> 
> I think you also need to update vswitchd.xml with some docs for these stats
> 

Actually, it doesn't seem needed there, perhaps something in the dpdk docs

<snip>

>> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
>> index 0702cc6..2cb5558 100644
>> --- a/vswitchd/bridge.c
>> +++ b/vswitchd/bridge.c
>> @@ -2407,7 +2407,11 @@ iface_refresh_stats(struct iface *iface)
>>      IFACE_STAT(rx_undersized_errors,    "rx_undersized_errors")     \
>>      IFACE_STAT(rx_oversize_errors,      "rx_oversize_errors")       \
>>      IFACE_STAT(rx_fragmented_errors,    "rx_fragmented_errors")     \
>> -    IFACE_STAT(rx_jabber_errors,        "rx_jabber_errors")
>> +    IFACE_STAT(rx_jabber_errors,        "rx_jabber_errors")         \
>> +    IFACE_STAT(rx_qos_drops,            "rx_qos_drops")             \
>> +    IFACE_STAT(tx_qfull_drops,          "tx_qfull_drops")           \
>> +    IFACE_STAT(tx_qos_drops,            "tx_qos_drops")             \
>> +    IFACE_STAT(tx_mtu_drops,            "tx_mtu_exceeded_drops")
>>  
>>  #define IFACE_STAT(MEMBER, NAME) + 1
>>      enum { N_IFACE_STATS = IFACE_STATS };
>>
> 
> What about updating show_dpif() to print with ovs-appctl dpctl/show -s ?
> 

scratch that comment, I since saw the discussion on v1

> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> 



More information about the dev mailing list