From: Rongyin <[email protected]>

Code Source From: Self Code

Description:

      add megaflow_to_mark disassociate when flow del

Jira:  #[Optional]
市场项目编号(名称):[Optional]
---
 lib/dpif-netdev.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 73367ab..623e1c8 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -2618,7 +2618,7 @@ dp_netdev_pmd_remove_flow(struct dp_netdev_pmd_thread 
*pmd,
     struct cmap_node *node = CONST_CAST(struct cmap_node *, &flow->node);
     struct dpcls *cls;
     odp_port_t in_port = flow->flow.in_port.odp_port;
-    uint32_t mark ;
+    uint32_t mark = INVALID_FLOW_MARK;
 
     cls = dp_netdev_pmd_lookup_dpcls(pmd, in_port);
     ovs_assert(cls != NULL);
@@ -2632,7 +2632,15 @@ dp_netdev_pmd_remove_flow(struct dp_netdev_pmd_thread 
*pmd,
         if (mark != INVALID_FLOW_MARK) {
             flow_mark_free(mark);
         }
+        /* As we would to del flow, so disassociate mapping between
+         * mageflow and mark(this mark value is fail offloaded value)
+         * for succeed offload mark, this procesure is done in queue_
+         * netdev_flow_del
+         */
+        megaflow_to_mark_disassociate(&flow->ufid);
     }
+    VLOG_DBG("TIMO DBG: flow del ufid:"UUID_FMT" mark:%u \n",
+          UUID_ARGS((struct uuid *)&flow->ufid),mark);
     if (flow->mark != INVALID_FLOW_MARK) {
         queue_netdev_flow_del(pmd, flow);
     }
-- 
1.8.3.1



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

Reply via email to