summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndy Zhou <azhou@nicira.com>2013-10-21 14:37:33 -0700
committerJesse Gross <jesse@nicira.com>2013-10-22 10:19:52 -0700
commit4fa72a95722f74ebee61254f06bb171e9207f9c1 (patch)
treea9717aa83e87d9433b01e2a88ceeab38329e56dd /include/linux
parentf4faf4baf7a22316d5a083af57557a97f9c93775 (diff)
downloadopenvswitch-4fa72a95722f74ebee61254f06bb171e9207f9c1.tar.gz
datapath: collect mega flow mask stats
Collect mega flow mask stats. ovs-dpctl show command can be used to display them. Signed-off-by: Andy Zhou <azhou@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/openvswitch.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/include/linux/openvswitch.h b/include/linux/openvswitch.h
index 09c26b56f..f46d9d033 100644
--- a/include/linux/openvswitch.h
+++ b/include/linux/openvswitch.h
@@ -83,15 +83,18 @@ enum ovs_datapath_cmd {
* not be sent.
* @OVS_DP_ATTR_STATS: Statistics about packets that have passed through the
* datapath. Always present in notifications.
+ * @OVS_DP_ATTR_MEGAFLOW_STATS: Statistics about mega flow masks usage for the
+ * datapath. Always present in notifications.
*
* These attributes follow the &struct ovs_header within the Generic Netlink
* payload for %OVS_DP_* commands.
*/
enum ovs_datapath_attr {
OVS_DP_ATTR_UNSPEC,
- OVS_DP_ATTR_NAME, /* name of dp_ifindex netdev */
- OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */
- OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */
+ OVS_DP_ATTR_NAME, /* name of dp_ifindex netdev */
+ OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */
+ OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */
+ OVS_DP_ATTR_MEGAFLOW_STATS, /* struct ovs_dp_megaflow_stats */
__OVS_DP_ATTR_MAX
};
@@ -104,6 +107,14 @@ struct ovs_dp_stats {
__u64 n_flows; /* Number of flows present */
};
+struct ovs_dp_megaflow_stats {
+ __u64 n_mask_hit; /* Number of masks used for flow lookups. */
+ __u32 n_masks; /* Number of masks for the datapath. */
+ __u32 pad0; /* Pad for future expension. */
+ __u64 pad1; /* Pad for future expension. */
+ __u64 pad2; /* Pad for future expension. */
+};
+
struct ovs_vport_stats {
__u64 rx_packets; /* total packets received */
__u64 tx_packets; /* total packets transmitted */