History

net: openvswitch: Add support to count upcall packets

Add support to count upall packets, when kmod of openvswitch upcall to count the number of packets for upcall succeed and failed, which is a better way to see how many packets upcalled on every interfaces.

wangchuanlei committed 3 years ago

Commit 1933ea31 parent e47877c4 files · +121 −0Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/openvswitch.h+14−0
@@ -277,11 +277,25 @@ enum ovs_vport_attr { · 276 unmodified lines
277 OVS_VPORT_ATTR_PAD,277 OVS_VPORT_ATTR_PAD,
278 OVS_VPORT_ATTR_IFINDEX,278 OVS_VPORT_ATTR_IFINDEX,
279 OVS_VPORT_ATTR_NETNSID,279 OVS_VPORT_ATTR_NETNSID,
280 OVS_VPORT_ATTR_UPCALL_STATS,
280 __OVS_VPORT_ATTR_MAX281 __OVS_VPORT_ATTR_MAX
281};282};
282 283
283#define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1)284#define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1)
284 285
286/**
287 * enum ovs_vport_upcall_attr - attributes for %OVS_VPORT_UPCALL* commands
288 * @OVS_VPORT_UPCALL_SUCCESS: 64-bit upcall success packets.
289 * @OVS_VPORT_UPCALL_FAIL: 64-bit upcall fail packets.
290 */
291enum ovs_vport_upcall_attr {
292 OVS_VPORT_UPCALL_ATTR_SUCCESS,
293 OVS_VPORT_UPCALL_ATTR_FAIL,
294 __OVS_VPORT_UPCALL_ATTR_MAX
295};
296
297#define OVS_VPORT_UPCALL_ATTR_MAX (__OVS_VPORT_UPCALL_ATTR_MAX - 1)
298
285enum {299enum {
286 OVS_VXLAN_EXT_UNSPEC,300 OVS_VXLAN_EXT_UNSPEC,
287 OVS_VXLAN_EXT_GBP, /* Flag or __u32 */301 OVS_VXLAN_EXT_GBP, /* Flag or __u32 */