summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2019-01-30 15:27:20 +0100
committerXavier Simonart <xavier.simonart@intel.com>2019-01-30 15:27:20 +0100
commitebca0aa88acb2e2612e282f83114756bb86d76da (patch)
tree1d499dca32aed41fa322b64b73f5d5a34c95a6d5
parent8bffdf8c09100f8a923c37bd9be39a13cbc49862 (diff)
Fix memory leak in L3 submode
In L3 submodes, there were two memory leaks - when a L3 core was restarted, causing around 2MB leak and a potential issue after 256 start/stop - a potential mbuf leak when handling arp replies Those have been fixed Change-Id: I348478fa5967936297850432e93667e12b0adac4 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
-rw-r--r--VNFs/DPPD-PROX/handle_master.c2
-rw-r--r--VNFs/DPPD-PROX/packet_utils.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/VNFs/DPPD-PROX/handle_master.c b/VNFs/DPPD-PROX/handle_master.c
index 22527413..c6ae96b1 100644
--- a/VNFs/DPPD-PROX/handle_master.c
+++ b/VNFs/DPPD-PROX/handle_master.c
@@ -170,6 +170,8 @@ static inline void handle_arp_reply(struct task_base *tbase, struct rte_mbuf *mb
tx_ring_ip(tbase, ring, UPDATE_FROM_CTRL, mbuf, key);
}
task->external_ip_table[ret].nb_requests = 0;
+ } else {
+ tx_drop(mbuf);
}
}
}
diff --git a/VNFs/DPPD-PROX/packet_utils.c b/VNFs/DPPD-PROX/packet_utils.c
index e93f430c..a4762300 100644
--- a/VNFs/DPPD-PROX/packet_utils.c
+++ b/VNFs/DPPD-PROX/packet_utils.c
@@ -238,7 +238,7 @@ void task_start_l3(struct task_base *tbase, struct task_args *targ)
const int NB_CACHE_ARP_MBUF = 256;
struct prox_port_cfg *port = find_reachable_port(targ);
- if (port) {
+ if (port && (tbase->l3.arp_pool == NULL)) {
static char name[] = "arp0_pool";
tbase->l3.reachable_port_id = port - prox_port_cfg;
if (targ->local_ipv4) {