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
277277 OVS_VPORT_ATTR_PAD,
278278 OVS_VPORT_ATTR_IFINDEX,
279279 OVS_VPORT_ATTR_NETNSID,
280+ OVS_VPORT_ATTR_UPCALL_STATS,
280281 __OVS_VPORT_ATTR_MAX
281282 };
282283
283284 #define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1)
284285
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+ */
291+enum 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+
285299 enum {
286300 OVS_VXLAN_EXT_UNSPEC,
287301 OVS_VXLAN_EXT_GBP, /* Flag or __u32 */