diff mbox series

[ovs-dev] show "rx_missed_errors" counter in interface statisics

Message ID e5389fc0-7aa7-459c-aa35-f23218dddea6.txfh2007@aliyun.com
State Accepted
Headers show
Series [ovs-dev] show "rx_missed_errors" counter in interface statisics | expand

Commit Message

Li,Rongqing via dev Sept. 3, 2019, 11:28 a.m. UTC
Hi all:

    Currently OVS maintains several Statistics counters per interface. "rx_missed_errors" counter is amount them and collects pkts not received due to local resource constaints. Many ovs netdevs support collecting this counter, such as netdev-linux, netdev-dpdk, netdev-bsd and so on. But as far as I know, this counter can't be read by command "ovs-vsctl list interface <int-name>|grep statistics". I have found the root cause(may be I was wrong) is in task "iface_refresh_stats", the "rx_missed_errors" is not in the macro IFACE_STATS. So even if this counter is updated by netdev, it woundn't be read by users.

    This simple patch tries to solve this problem, many thanks for your kindly reminder. 
   
Signed-off-by: Liu Chang <liuchang@cmss.chinamobile.com>

Comments

Ben Pfaff Sept. 25, 2019, 10:15 p.m. UTC | #1
On Tue, Sep 03, 2019 at 07:28:26PM +0800, txfh2007 via dev wrote:
> Hi all:
> 
>     Currently OVS maintains several Statistics counters per interface. "rx_missed_errors" counter is amount them and collects pkts not received due to local resource constaints. Many ovs netdevs support collecting this counter, such as netdev-linux, netdev-dpdk, netdev-bsd and so on. But as far as I know, this counter can't be read by command "ovs-vsctl list interface <int-name>|grep statistics". I have found the root cause(may be I was wrong) is in task "iface_refresh_stats", the "rx_missed_errors" is not in the macro IFACE_STATS. So even if this counter is updated by netdev, it woundn't be read by users.
> 
>     This simple patch tries to solve this problem, many thanks for your kindly reminder. 

Thanks, applied to master.
diff mbox series

Patch

diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index d921c4e..55d30bf 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -2393,6 +2393,7 @@  iface_refresh_stats(struct iface *iface)
     IFACE_STAT(rx_frame_errors,         "rx_frame_err")             \
     IFACE_STAT(rx_over_errors,          "rx_over_err")              \
     IFACE_STAT(rx_crc_errors,           "rx_crc_err")               \
+    IFACE_STAT(rx_missed_errors,        "rx_missed_errors")         \
     IFACE_STAT(collisions,              "collisions")               \
     IFACE_STAT(rx_1_to_64_packets,      "rx_1_to_64_packets")       \
     IFACE_STAT(rx_65_to_127_packets,    "rx_65_to_127_packets")     \