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

Ilya Maximets i.maximets at samsung.com
Fri Jun 7 14:28:58 UTC 2019


On 07.06.2019 15:39, Sriram Vatala 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 display them when "--details" optional flag is passed  to
> “ovs-appctl dpctl/show -s” . The detailed stats will be available
> for both dpdk and vhostuser ports.
> 
> cmd Usage : "ovs-appctl dpctl/show -s --details" (OR)
>             "ovs-appctl dpctl/show --statistics --details"
> 
> Following are the details of the new counters :
> 
> queue_full : These are the packets dropped due to Transmit queue overrun.
> mtu_exceeded : These are the packets dropped due to MTU mismatch.
>                (i.e Pkt len > Max Dev MTU)
> qos : These are the packets dropped due to transmission/reception rate
>       exceeding the configured Egress/Ingress policer rate on the interface.
> 
> Signed-off-by: Sriram Vatala <sriram.v at altencalsoftlabs.com>
> ---
>  include/openvswitch/netdev.h |  8 ++++++++
>  lib/dpctl.c                  | 26 ++++++++++++++++++++++-
>  lib/dpctl.h                  |  5 +++++
>  lib/dpctl.man                |  8 ++++++--
>  lib/netdev-dpdk.c            | 49 +++++++++++++++++++++++++++++++++++++-------
>  5 files changed, 86 insertions(+), 10 deletions(-)

Hi, Sriram.
Thanks for working on OVS improvement.

I didn't look at the code yet, but one thing I wanted to mention is that
dpctl interface seems redundant here. It provides only basic statistics,
but you're adding some really specific stuff. Also, full port stats are
always available via db interface:

  ovs-vsctl get interface <iface> statistics

Your new stats counters will be there automatically.
I think, it's better to drop dpctl parts of this patch.

What do you think?

Best regards, Ilya Maximets.


More information about the dev mailing list