From f60af49e4365e0bd8a5f8a19afa3b457a8db8a1d Mon Sep 17 00:00:00 2001 From: Trekkie Coder Date: Thu, 5 Dec 2024 14:43:28 +0900 Subject: [PATCH] loxilb-io/loxilb#877 Fixes to eBPF masquerading stats --- kernel/llb_kern_devif.c | 4 ++++ kernel/llb_kern_l3fwd.c | 1 + 2 files changed, 5 insertions(+) diff --git a/kernel/llb_kern_devif.c b/kernel/llb_kern_devif.c index c3150b6..f778a55 100644 --- a/kernel/llb_kern_devif.c +++ b/kernel/llb_kern_devif.c @@ -499,6 +499,10 @@ dp_ing_ct_main(void *ctx, struct xfi *xf) return DP_PASS; } #endif + } else { + if (xf->pm.fw_rid != 0) { + dp_do_map_stats(ctx, xf, LL_DP_FW4_STATS_MAP, xf->pm.fw_rid); + } } LL_DBG_PRINTK("[CTRK] start"); diff --git a/kernel/llb_kern_l3fwd.c b/kernel/llb_kern_l3fwd.c index d2a9673..93ff6f1 100644 --- a/kernel/llb_kern_l3fwd.c +++ b/kernel/llb_kern_l3fwd.c @@ -273,6 +273,7 @@ dp_do_ctops(void *ctx, struct xfi *xf, void *fa_, fa->ca.cidx = act->ca.cidx; fa->ca.fwrid = act->ca.fwrid; #endif + xf->pm.fw_rid = act->ca.fwrid; if (act->ca.act_type == DP_SET_DO_CT) { goto ct_trk;