From: Sriharsha Basavapatna <[email protected]>
In dp_netdev_pmd_remove_flow() we schedule the deletion of an
offloaded flow, if a mark has been assigned to the flow. But if
this occurs in the window in which the offload thread completes
offloading the flow and assigns a mark to the flow, then we miss
deleting the flow. This problem has been observed while adding
and deleting flows in a loop. To fix this, always enqueue flow
deletion regardless of the flow->mark being set.
Fixes: 241bad15d99a("dpif-netdev: associate flow with a mark id")
Signed-off-by: Sriharsha Basavapatna <[email protected]>
Signed-off-by: Gaetan Rivet <[email protected]>
---
lib/dpif-netdev.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index b5702e6a1..bb03cf137 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -2927,6 +2927,10 @@ queue_netdev_flow_del(struct dp_netdev_pmd_thread *pmd,
{
struct dp_offload_thread_item *offload;
+ if (!netdev_is_flow_api_enabled()) {
+ return;
+ }
+
offload = dp_netdev_alloc_flow_offload(pmd, flow,
DP_NETDEV_FLOW_OFFLOAD_OP_DEL);
offload->timestamp = pmd->ctx.now;
@@ -3038,9 +3042,7 @@ dp_netdev_pmd_remove_flow(struct dp_netdev_pmd_thread
*pmd,
dp_netdev_simple_match_remove(pmd, flow);
cmap_remove(&pmd->flow_table, node, dp_netdev_flow_hash(&flow->ufid));
ccmap_dec(&pmd->n_flows, odp_to_u32(in_port));
- if (flow->mark != INVALID_FLOW_MARK) {
- queue_netdev_flow_del(pmd, flow);
- }
+ queue_netdev_flow_del(pmd, flow);
flow->dead = true;
dp_netdev_flow_unref(flow);
--
2.31.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev