diff options
| author | Ben Pfaff <blp@nicira.com> | 2010-12-10 10:40:58 -0800 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2010-12-10 11:13:32 -0800 |
| commit | cdee00fd635d1e0f1eeb5d9c009daeb59abd4777 (patch) | |
| tree | 49ef94d30bcb995fa1070c3aa770a9a515b26b0a /utilities/ovs-dpctl.c | |
| parent | 7f8ca6459c37ede8faf13f730bcd4d9f05dfd13b (diff) | |
| download | openvswitch-cdee00fd635d1e0f1eeb5d9c009daeb59abd4777.tar.gz | |
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>
Diffstat (limited to 'utilities/ovs-dpctl.c')
| -rw-r--r-- | utilities/ovs-dpctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c index bed50faa2..8f2a2bc65 100644 --- a/utilities/ovs-dpctl.c +++ b/utilities/ovs-dpctl.c @@ -478,11 +478,11 @@ do_dump_flows(int argc OVS_UNUSED, char *argv[]) ds_init(&ds); for (i = 0; i < n_flows; i++) { struct odp_flow *f = &flows[i]; - enum { MAX_ACTIONS = 4096 / sizeof(union odp_action) }; - union odp_action actions[MAX_ACTIONS]; + enum { MAX_ACTIONS = 4096 }; /* An arbitrary but large number. */ + struct nlattr actions[MAX_ACTIONS]; f->actions = actions; - f->n_actions = MAX_ACTIONS; + f->actions_len = sizeof actions; if (!dpif_flow_get(dpif, f)) { ds_clear(&ds); format_odp_flow(&ds, f); |
