From 9f5b36926b74109974e7c3ce9bb3a0a7d676c46c Mon Sep 17 00:00:00 2001 From: Dmitry Valter Date: Mon, 5 Sep 2022 15:30:18 +0000 Subject: vlib: don't leak node frames on refork Free node frames in worker mains on refork. Otherwise these frames are never returned to free pool and it causes massive memory leaks if performed under traffic load Type: fix Signed-off-by: Dmitry Valter Change-Id: I15cbf024a3f4b4082445fd5e5aaa10bfcf77f363 --- src/vnet/ipfix-export/flow_report.c | 3 +-- src/vnet/unix/tuntap.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/vnet') diff --git a/src/vnet/ipfix-export/flow_report.c b/src/vnet/ipfix-export/flow_report.c index cf23ccd7815..de4c72c437f 100644 --- a/src/vnet/ipfix-export/flow_report.c +++ b/src/vnet/ipfix-export/flow_report.c @@ -484,8 +484,7 @@ flow_report_process_send (vlib_main_t *vm, flow_report_main_t *frm, vlib_put_frame_to_node (vm, next_node, nf); else { - vlib_node_runtime_t *rt = vlib_node_get_runtime (vm, next_node); - vlib_frame_free (vm, rt, nf); + vlib_frame_free (vm, nf); } } } diff --git a/src/vnet/unix/tuntap.c b/src/vnet/unix/tuntap.c index 1ce13e79254..b75b1f670b9 100644 --- a/src/vnet/unix/tuntap.c +++ b/src/vnet/unix/tuntap.c @@ -912,7 +912,7 @@ tuntap_punt_frame (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { tuntap_tx (vm, node, frame); - vlib_frame_free (vm, node, frame); + vlib_frame_free (vm, frame); } /** @@ -930,7 +930,7 @@ tuntap_nopunt_frame (vlib_main_t * vm, u32 *buffers = vlib_frame_vector_args (frame); uword n_packets = frame->n_vectors; vlib_buffer_free (vm, buffers, n_packets); - vlib_frame_free (vm, node, frame); + vlib_frame_free (vm, frame); } /* *INDENT-OFF* */ -- cgit 1.2.3-korg