summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/reass
diff options
context:
space:
mode:
authorzhengdelun <xszhengdelun@gmail.com>2020-05-22 15:42:28 +0800
committerDave Barach <openvpp@barachs.net>2020-06-10 11:09:59 +0000
commitce53363d2018071df00ffddf2ffa13c4229139a8 (patch)
treef1977cbaf245bb6d289b0722d8773a2090ef9d52 /src/vnet/ip/reass
parentd6ba3ca2517a77f3177a29abae3642b2b686b26b (diff)
ip: reassembly: LRU algorithm should eliminate the longest unused nodes
Type: fix Signed-off-by: zhengdelun <xszhengdelun@gmail.com> Change-Id: I3f6240b4c0798f85960acc55a193a0cbf0c67ea4
Diffstat (limited to 'src/vnet/ip/reass')
-rw-r--r--src/vnet/ip/reass/ip4_sv_reass.c2
-rw-r--r--src/vnet/ip/reass/ip6_sv_reass.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/ip/reass/ip4_sv_reass.c b/src/vnet/ip/reass/ip4_sv_reass.c
index b41498e2296..e7effb88d17 100644
--- a/src/vnet/ip/reass/ip4_sv_reass.c
+++ b/src/vnet/ip/reass/ip4_sv_reass.c
@@ -331,7 +331,7 @@ ip4_sv_reass_find_or_create (vlib_main_t * vm, ip4_sv_reass_main_t * rm,
if (rt->reass_n >= rm->max_reass_n && rm->max_reass_n)
{
- reass = pool_elt_at_index (rt->pool, rt->lru_last);
+ reass = pool_elt_at_index (rt->pool, rt->lru_first);
ip4_sv_reass_free (vm, rm, rt, reass);
}
diff --git a/src/vnet/ip/reass/ip6_sv_reass.c b/src/vnet/ip/reass/ip6_sv_reass.c
index 6d707af1f94..7c13f4b7fac 100644
--- a/src/vnet/ip/reass/ip6_sv_reass.c
+++ b/src/vnet/ip/reass/ip6_sv_reass.c
@@ -329,7 +329,7 @@ ip6_sv_reass_find_or_create (vlib_main_t * vm, vlib_node_runtime_t * node,
if (rt->reass_n >= rm->max_reass_n)
{
- reass = pool_elt_at_index (rt->pool, rt->lru_last);
+ reass = pool_elt_at_index (rt->pool, rt->lru_first);
ip6_sv_reass_free (vm, rm, rt, reass);
}