From fab512e09b7678017c319b7b12fe6a9a59d11eef Mon Sep 17 00:00:00 2001 From: Menglong Dong Date: Wed, 18 Oct 2023 10:41:57 +0800 Subject: [PATCH] nettrace: optimize the read in nft_do_chain() "_C(pkt, xt.state)" looks better than "_C(&(pkt->xt), state)". Signed-off-by: Menglong Dong --- src/progs/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/progs/core.c b/src/progs/core.c index ee8cc9c..18e77de 100644 --- a/src/progs/core.c +++ b/src/progs/core.c @@ -448,7 +448,7 @@ DEFINE_KPROBE_INIT(nft_do_chain, nft_do_chain, .arg_count = 2) if (!bpf_core_field_exists(pkt->xt)) state = _C((struct nft_pktinfo___new *)pkt, state); else - state = _C(&(pkt->xt), state); + state = _C(pkt, xt.state); } else { /* don't use CO-RE, as nft may be a module */ state = _(pkt->xt.state);