X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fodp-execute.h;h=91f0c51839c195585f13d36e724136b64b93e710;hb=0ef165ecb57943e17a8ee8270df68ffb8d032e29;hp=89dd66bd4c0077c086139a3f45d4d245b44eadcc;hpb=f094af7b17631ce688595d7cf70235a3eed9798c;p=sliver-openvswitch.git diff --git a/lib/odp-execute.h b/lib/odp-execute.h index 89dd66bd4..91f0c5183 100644 --- a/lib/odp-execute.h +++ b/lib/odp-execute.h @@ -18,19 +18,25 @@ #ifndef EXECUTE_ACTIONS_H #define EXECUTE_ACTIONS_H 1 +#include #include #include +#include "openvswitch/types.h" -struct flow; struct nlattr; struct ofpbuf; +struct pkt_metadata; -void -odp_execute_actions(void *dp, struct ofpbuf *packet, struct flow *key, +typedef void (*odp_execute_cb)(void *dp, struct ofpbuf *packet, + struct pkt_metadata *, + const struct nlattr *action, bool may_steal); + +/* Actions that need to be executed in the context of a datapath are handed + * to 'dp_execute_action', if non-NULL. Currently this is called only for + * actions OVS_ACTION_ATTR_OUTPUT and OVS_ACTION_ATTR_USERSPACE so + * 'dp_execute_action' needs to handle only these. */ +void odp_execute_actions(void *dp, struct ofpbuf *packet, bool steal, + struct pkt_metadata *, const struct nlattr *actions, size_t actions_len, - void (*output)(void *dp, struct ofpbuf *packet, - uint32_t out_port), - void (*userspace)(void *dp, struct ofpbuf *packet, - const struct flow *key, - const struct nlattr *a)); + odp_execute_cb dp_execute_action); #endif