aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/openvswitch.h
diff options
context:
space:
mode:
authorAndy Zhou <azhou@nicira.com>2013-10-22 13:42:46 -0400
committerJesse Gross <jesse@nicira.com>2013-10-22 13:42:46 -0400
commit1bd7116f1cb833c998cddb6b188df463342069d8 (patch)
tree4afeff18229a412b2ee5b72e3b0d10fc997ce1b6 /include/uapi/linux/openvswitch.h
parent618ed0c805b64c820279f50732110ab873221c3b (diff)
openvswitch: collect mega flow mask stats
Collect mega flow mask stats. ovs-dpctl show command can be used to display them for debugging and performance tuning. Signed-off-by: Andy Zhou <azhou@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'include/uapi/linux/openvswitch.h')
-rw-r--r--include/uapi/linux/openvswitch.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
index a74d375b439b..2cc4644f68ef 100644
--- a/include/uapi/linux/openvswitch.h
+++ b/include/uapi/linux/openvswitch.h
@@ -63,15 +63,18 @@ enum ovs_datapath_cmd {
63 * not be sent. 63 * not be sent.
64 * @OVS_DP_ATTR_STATS: Statistics about packets that have passed through the 64 * @OVS_DP_ATTR_STATS: Statistics about packets that have passed through the
65 * datapath. Always present in notifications. 65 * datapath. Always present in notifications.
66 * @OVS_DP_ATTR_MEGAFLOW_STATS: Statistics about mega flow masks usage for the
67 * datapath. Always present in notifications.
66 * 68 *
67 * These attributes follow the &struct ovs_header within the Generic Netlink 69 * These attributes follow the &struct ovs_header within the Generic Netlink
68 * payload for %OVS_DP_* commands. 70 * payload for %OVS_DP_* commands.
69 */ 71 */
70enum ovs_datapath_attr { 72enum ovs_datapath_attr {
71 OVS_DP_ATTR_UNSPEC, 73 OVS_DP_ATTR_UNSPEC,
72 OVS_DP_ATTR_NAME, /* name of dp_ifindex netdev */ 74 OVS_DP_ATTR_NAME, /* name of dp_ifindex netdev */
73 OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */ 75 OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */
74 OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */ 76 OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */
77 OVS_DP_ATTR_MEGAFLOW_STATS, /* struct ovs_dp_megaflow_stats */
75 __OVS_DP_ATTR_MAX 78 __OVS_DP_ATTR_MAX
76}; 79};
77 80
@@ -84,6 +87,14 @@ struct ovs_dp_stats {
84 __u64 n_flows; /* Number of flows present */ 87 __u64 n_flows; /* Number of flows present */
85}; 88};
86 89
90struct ovs_dp_megaflow_stats {
91 __u64 n_mask_hit; /* Number of masks used for flow lookups. */
92 __u32 n_masks; /* Number of masks for the datapath. */
93 __u32 pad0; /* Pad for future expension. */
94 __u64 pad1; /* Pad for future expension. */
95 __u64 pad2; /* Pad for future expension. */
96};
97
87struct ovs_vport_stats { 98struct ovs_vport_stats {
88 __u64 rx_packets; /* total packets received */ 99 __u64 rx_packets; /* total packets received */
89 __u64 tx_packets; /* total packets transmitted */ 100 __u64 tx_packets; /* total packets transmitted */