2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

datapath: Convert ODP_FLOW_* and ODP_EXECUTE to put dp_idx into message.

When the datapath moves to the Netlink protocol it won't have a minor
number to use, so we have to put the dp_idx in the message.

This also changes the kernel implementation of ODP_FLOW_FLUSH to do the
datapath locking inside flush_flows() instead of inside openvswitch_ioctl()
but doesn't change that command's userspace interface, which still passes
a datapath number as the ioctl argument.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
Ben Pfaff
2011-01-18 16:54:27 -08:00
parent 693c4a0112
commit 9c52546b52
4 changed files with 259 additions and 160 deletions

View File

@@ -272,6 +272,7 @@ struct odp_key_arp {
};
struct odp_flow {
uint32_t dp_idx;
struct odp_flow_stats stats;
struct nlattr *key;
uint32_t key_len;
@@ -301,6 +302,7 @@ struct odp_flow_put {
* unspecified.
*/
struct odp_flow_dump {
uint32_t dp_idx;
struct odp_flow *flow;
uint32_t state[2];
};
@@ -329,6 +331,8 @@ enum odp_action_type {
#define ODPAT_MAX (__ODPAT_MAX - 1)
struct odp_execute {
uint32_t dp_idx;
struct nlattr *actions;
uint32_t actions_len;