diff options
author | Ben Pfaff <blp@ovn.org> | 2017-11-29 14:14:50 -0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-11-30 11:02:23 -0800 |
commit | 78b76327d45f0df26293021806e436e7c111af48 (patch) | |
tree | f6192a0940fe79238eb4e2a6f40dac1c059968b1 /lib | |
parent | e5fd79c5bba5fc92dbba4fd9a9b2bd6cf576f9b4 (diff) | |
download | openvswitch-78b76327d45f0df26293021806e436e7c111af48.tar.gz |
odp-execute: Add helpful comment to odp_execute_actions().
It wasn't obvious how ownership transferred to odp_execute_actions() or
to its callback.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/odp-execute.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/odp-execute.c b/lib/odp-execute.c index 1090fa832..44e669138 100644 --- a/lib/odp-execute.c +++ b/lib/odp-execute.c @@ -665,6 +665,15 @@ requires_datapath_assistance(const struct nlattr *a) return false; } +/* Executes all of the 'actions_len' bytes of datapath actions in 'actions' on + * the packets in 'batch'. If 'steal' is true, possibly modifies and + * definitely free the packets in 'batch', otherwise leaves 'batch' unchanged. + * + * Some actions (e.g. output actions) can only be executed by a datapath. This + * function implements those actions by passing the action and the packets to + * 'dp_execute_action' (along with 'dp'). If 'dp_execute_action' is passed a + * true 'may_steal' parameter then it may possibly modify and must definitely + * free the packets passed into it, otherwise it must leave them unchanged. */ void odp_execute_actions(void *dp, struct dp_packet_batch *batch, bool steal, const struct nlattr *actions, size_t actions_len, |