Rather then prohibiting hash actions dpif_execute_helper_cb() execute them by passing them on to aux->dpif->dpif_class->execute() and save the updated packet metadata afterwards. It is assumed that if a hash is calculated it will be sored in the dp_hash field of the metadata.
This is in preparation for allowing execution of recirc actions in ovs-vswitchd. Signed-off-by: Simon Horman <ho...@verge.net.au> --- lib/dpif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dpif.c b/lib/dpif.c index 6a67127..026d92f 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -1146,12 +1146,14 @@ dpif_execute_helper_cb(void *aux_, struct ofpbuf *packet, switch ((enum ovs_action_attr)type) { case OVS_ACTION_ATTR_OUTPUT: case OVS_ACTION_ATTR_USERSPACE: + case OVS_ACTION_ATTR_HASH: execute.actions = action; execute.actions_len = NLA_ALIGN(action->nla_len); execute.packet = packet; execute.md = *md; execute.needs_help = false; aux->error = aux->dpif->dpif_class->execute(aux->dpif, &execute); + *md = execute.md; break; case OVS_ACTION_ATTR_RECIRC: @@ -1167,7 +1169,6 @@ dpif_execute_helper_cb(void *aux_, struct ofpbuf *packet, case OVS_ACTION_ATTR_SET: case OVS_ACTION_ATTR_SAMPLE: case OVS_ACTION_ATTR_UNSPEC: - case OVS_ACTION_ATTR_HASH: case __OVS_ACTION_ATTR_MAX: OVS_NOT_REACHED(); } -- 1.8.5.2 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev