diff options
author | yanlong <dyl_wlc@163.com> | 2023-11-19 06:19:42 -0800 |
---|---|---|
committer | Damjan Marion <dmarion@0xa5.net> | 2023-12-05 10:09:46 +0000 |
commit | 7fa1674c1973fb924422f676e20d5b7a19907340 (patch) | |
tree | 35e7c661c7497c765b5dd7784198f55f16c26858 /src/vnet/l2/l2_rw.c | |
parent | 7521d6745a82ec6dc179decb34a1e76a5726ab4c (diff) |
l2: resolve l2 rewrite entry 'hit_count' always being 0 bug
The hit_count does not implement the corresponding processing logic, and here the missing is fixed
Type: fix
Fixes: missing
Change-Id: I04a8e11d6b48c2a15c371cbeb2467fa89a9d82bb
Signed-off-by: yanlong <dyl_wlc@163.com>
Diffstat (limited to 'src/vnet/l2/l2_rw.c')
-rw-r--r-- | src/vnet/l2/l2_rw.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/l2/l2_rw.c b/src/vnet/l2/l2_rw.c index 2fb0e55bf39..7921d0e4884 100644 --- a/src/vnet/l2/l2_rw.c +++ b/src/vnet/l2/l2_rw.c @@ -109,6 +109,7 @@ l2_rw_rewrite (l2_rw_entry_t * rwe, u8 * h) /* FALLTHROUGH */ case 1: d[0] = (d[0] & ~rwe->mask[0]) | rwe->value[0]; + rwe->hit_count++; break; default: abort (); @@ -332,6 +333,7 @@ l2_rw_mod_entry (u32 * index, return 0; } + e->hit_count = 0; e->skip_n_vectors = skip / sizeof (u32x4); skip -= e->skip_n_vectors * sizeof (u32x4); e->rewrite_n_vectors = (skip + len - 1) / sizeof (u32x4) + 1; |