diff options
author | wangchuanlei <wangchuanlei@inspur.com> | 2023-01-18 20:31:17 -0500 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2023-01-31 17:40:50 +0100 |
commit | e22e1f6725b99007b469fcccdbb48f525f302757 (patch) | |
tree | 8e541be074d57ff5e23b6d13a0f58c5d057fa7eb /include | |
parent | e1e5eac5b0167c65c802bd60ed37605b1e1c9c92 (diff) | |
download | openvswitch-e22e1f6725b99007b469fcccdbb48f525f302757.tar.gz |
dpctl: Add support to count upcall packets.
Add support to count upcall packets per port, both succeed and failed,
which is a better way to see how many packets upcalled on each interface.
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: wangchuanlei <wangchuanlei@inspur.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/openvswitch.h | 14 | ||||
-rw-r--r-- | include/openvswitch/netdev.h | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/openvswitch.h b/include/linux/openvswitch.h index 8bb5abdc8..bc8f74991 100644 --- a/include/linux/openvswitch.h +++ b/include/linux/openvswitch.h @@ -301,11 +301,25 @@ enum ovs_vport_attr { OVS_VPORT_ATTR_PAD, OVS_VPORT_ATTR_IFINDEX, OVS_VPORT_ATTR_NETNSID, + OVS_VPORT_ATTR_UPCALL_STATS, __OVS_VPORT_ATTR_MAX }; #define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1) +/** + * enum ovs_vport_upcall_attr - attributes for %OVS_VPORT_UPCALL* commands + * @OVS_VPORT_UPCALL_ATTR_SUCCESS: 64-bit upcall success packets. + * @OVS_VPORT_UPCALL_ATTR_FAIL: 64-bit upcall fail packets. + */ +enum ovs_vport_upcall_attr { + OVS_VPORT_UPCALL_ATTR_SUCCESS, + OVS_VPORT_UPCALL_ATTR_FAIL, + __OVS_VPORT_UPCALL_ATTR_MAX, +}; + +#define OVS_VPORT_UPCALL_ATTR_MAX (__OVS_VPORT_UPCALL_ATTR_MAX - 1) + enum { OVS_VXLAN_EXT_UNSPEC, OVS_VXLAN_EXT_GBP, diff --git a/include/openvswitch/netdev.h b/include/openvswitch/netdev.h index cf48f8691..cafd6fd7b 100644 --- a/include/openvswitch/netdev.h +++ b/include/openvswitch/netdev.h @@ -87,6 +87,10 @@ struct netdev_stats { uint64_t rx_oversize_errors; uint64_t rx_fragmented_errors; uint64_t rx_jabber_errors; + + /* Datapath upcall statistics. */ + uint64_t upcall_packets; /* Rx packets forwarded to userspace. */ + uint64_t upcall_errors; /* Rx packets failed forwarding to userspace. */ }; /* Structure representation of custom statistics counter */ |