From 8e7127d2befe7af70dac5f4c1a25691c40e4b06f Mon Sep 17 00:00:00 2001 From: "Anand H. Krishnan" Date: Fri, 29 Apr 2016 09:47:27 +0530 Subject: [PATCH] Before initiating eviction, wait for the reverse flow to move from HOLD If the reverse flow action is HOLD, it is possible that we might not flush the packets that are in the hold queue when we do eviction. There is also an unidentified case where such flows remain in the table in the eviction marked state. Also, free the vrouter operation request structure once the request is done. Change-Id: I75d54367c7f7a3b32c3a09332be4f01a64e06d2a Partial-BUG: #1570203 --- dp-core/vr_flow.c | 4 +++- dp-core/vrouter.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dp-core/vr_flow.c b/dp-core/vr_flow.c index 5a10f2334..13f496a54 100644 --- a/dp-core/vr_flow.c +++ b/dp-core/vr_flow.c @@ -689,7 +689,9 @@ vr_flow_mark_evict(struct vrouter *router, struct vr_flow_entry *fe, /* no modification. hence...*/ rfe = NULL; } else { - if ((rfe->fe_rflow == index) || (rfe->fe_rflow < 0)) { + /* we do not want hold flows to be evicted, just yet */ + if (((rfe->fe_rflow == index) || (rfe->fe_rflow < 0)) && + (rfe->fe_action != VR_FLOW_ACTION_HOLD)) { evict_forward_flow = __vr_flow_mark_evict(router, rfe); } } diff --git a/dp-core/vrouter.c b/dp-core/vrouter.c index 7b832e7e0..32b412cd9 100644 --- a/dp-core/vrouter.c +++ b/dp-core/vrouter.c @@ -262,6 +262,8 @@ vrouter_ops_destroy(vrouter_ops *req) req->vo_build_info = NULL; } + vr_free(req, VR_VROUTER_REQ_OBJECT); + return; }