2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

datapath: Replace "struct odp_action" by Netlink attributes.

In the medium term, we plan to migrate the datapath to use Netlink as its
communication channel.  In the short term, we need to be able to have
actions with 64-bit arguments but "struct odp_action" only has room for
48 bits.  So this patch shifts to variable-length arguments using Netlink
attributes, which starts in on the Netlink transition and makes 64-bit
arguments possible at the same time.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
Ben Pfaff
2010-12-10 10:40:58 -08:00
parent 7f8ca6459c
commit cdee00fd63
23 changed files with 587 additions and 590 deletions

View File

@@ -392,13 +392,13 @@ dpif_linux_flow_list(const struct dpif *dpif_, struct odp_flow flows[], int n)
static int
dpif_linux_execute(struct dpif *dpif_,
const union odp_action actions[], int n_actions,
const struct nlattr *actions, unsigned int actions_len,
const struct ofpbuf *buf)
{
struct odp_execute execute;
memset(&execute, 0, sizeof execute);
execute.actions = (union odp_action *) actions;
execute.n_actions = n_actions;
execute.actions = (struct nlattr *) actions;
execute.actions_len = actions_len;
execute.data = buf->data;
execute.length = buf->size;
return do_ioctl(dpif_, ODP_EXECUTE, &execute);