diff options
| author | David S. Miller <davem@davemloft.net> | 2013-11-04 16:25:04 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-11-04 16:25:04 -0500 |
| commit | 6fcf018ae4491dc11b080892fa9f3dbd928fdbb9 (patch) | |
| tree | f28592676e295183581d59149fd1eac913b229a2 /net/openvswitch/datapath.h | |
| parent | 5a6e55c461db3364aa5be919101db972bc859133 (diff) | |
| parent | 8ddd094675cfd453fc9838caa46ea108a4107183 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch
Jesse Gross says:
====================
Open vSwitch
A set of updates for net-next/3.13. Major changes are:
* Restructure flow handling code to be more logically organized and
easier to read.
* Rehashing of the flow table is moved from a workqueue to flow
installation time. Before, heavy load could block the workqueue for
excessive periods of time.
* Additional debugging information is provided to help diagnose megaflows.
* It's now possible to match on TCP flags.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/datapath.h')
| -rw-r--r-- | net/openvswitch/datapath.h | 9 |
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 | */ |
| 49 | struct dp_stats_percpu { | 53 | struct 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; |
