[ovs-dev] [patch v3] odp-execute: Correct and clarify 'steal' parameter.
Darrell Ball
dlu998 at gmail.com
Thu May 17 06:08:48 UTC 2018
Correct and clarify 'steal'/'may_steal' comments in
odp_execute_actions().
Reported-by: Ilya Maximets <i.maximets at samsung.com>
Signed-off-by: Darrell Ball <dlu998 at gmail.com>
---
v1->v3: Correct the last sentence which somehow is not getting
penned as intended.
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..919d04e 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
+ * then the packet could either be cloned or not. */
void
odp_execute_actions(void *dp, struct dp_packet_batch *batch, bool steal,
const struct nlattr *actions, size_t actions_len,
--
1.9.1
More information about the dev
mailing list