aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/datapath.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/openvswitch/datapath.h')
-rw-r--r--net/openvswitch/datapath.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h
index 4d109c176ef3..d3d14a58aa91 100644
--- a/net/openvswitch/datapath.h
+++ b/net/openvswitch/datapath.h
@@ -27,6 +27,7 @@
27#include <linux/u64_stats_sync.h> 27#include <linux/u64_stats_sync.h>
28 28
29#include "flow.h" 29#include "flow.h"
30#include "flow_table.h"
30#include "vport.h" 31#include "vport.h"
31 32
32#define DP_MAX_PORTS USHRT_MAX 33#define DP_MAX_PORTS USHRT_MAX
@@ -45,11 +46,15 @@
45 * @n_lost: Number of received packets that had no matching flow in the flow 46 * @n_lost: Number of received packets that had no matching flow in the flow
46 * table that could not be sent to userspace (normally due to an overflow in 47 * table that could not be sent to userspace (normally due to an overflow in
47 * one of the datapath's queues). 48 * one of the datapath's queues).
49 * @n_mask_hit: Number of masks looked up for flow match.
50 * @n_mask_hit / (@n_hit + @n_missed) will be the average masks looked
51 * up per packet.
48 */ 52 */
49struct dp_stats_percpu { 53struct dp_stats_percpu {
50 u64 n_hit; 54 u64 n_hit;
51 u64 n_missed; 55 u64 n_missed;
52 u64 n_lost; 56 u64 n_lost;
57 u64 n_mask_hit;
53 struct u64_stats_sync sync; 58 struct u64_stats_sync sync;
54}; 59};
55 60
@@ -57,7 +62,7 @@ struct dp_stats_percpu {
57 * struct datapath - datapath for flow-based packet switching 62 * struct datapath - datapath for flow-based packet switching
58 * @rcu: RCU callback head for deferred destruction. 63 * @rcu: RCU callback head for deferred destruction.
59 * @list_node: Element in global 'dps' list. 64 * @list_node: Element in global 'dps' list.
60 * @table: Current flow table. Protected by ovs_mutex and RCU. 65 * @table: flow table.
61 * @ports: Hash table for ports. %OVSP_LOCAL port always exists. Protected by 66 * @ports: Hash table for ports. %OVSP_LOCAL port always exists. Protected by
62 * ovs_mutex and RCU. 67 * ovs_mutex and RCU.
63 * @stats_percpu: Per-CPU datapath statistics. 68 * @stats_percpu: Per-CPU datapath statistics.
@@ -71,7 +76,7 @@ struct datapath {
71 struct list_head list_node; 76 struct list_head list_node;
72 77
73 /* Flow table. */ 78 /* Flow table. */
74 struct flow_table __rcu *table; 79 struct flow_table table;
75 80
76 /* Switch ports. */ 81 /* Switch ports. */
77 struct hlist_head *ports; 82 struct hlist_head *ports;