Correct and clarify 'steal'/'may_steal' in odp_execute_actions().

Reported-by: Ilya Maximets <[email protected]>
Signed-off-by: Darrell Ball <[email protected]>
---
 lib/odp-execute.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/odp-execute.c b/lib/odp-execute.c
index 1969f02..4901fa5 100644
--- a/lib/odp-execute.c
+++ b/lib/odp-execute.c
@@ -690,8 +690,12 @@ requires_datapath_assistance(const struct nlattr *a)
  * 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. */
+ * true 'steal' parameter then it must definitely free the packets passed into
+ * it.  The packet can be modified whether 'steal' is false or true.  If a
+ * packet is removed from the batch, then the fate of the packet is determined
+ * by the code that does this removal, irrespective of the value of 'steal'.
+ * Otherwise, if the packet is not removed from the batch and 'steal' is false
+ * the thief should clone the packet. */
 void
 odp_execute_actions(void *dp, struct dp_packet_batch *batch, bool steal,
                     const struct nlattr *actions, size_t actions_len,
-- 
1.9.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to