Skip to content

Commit

Permalink
nettrace: optimize the read in nft_do_chain()
Browse files Browse the repository at this point in the history
"_C(pkt, xt.state)" looks better than "_C(&(pkt->xt), state)".

Signed-off-by: Menglong Dong <[email protected]>
  • Loading branch information
menglongdong committed Oct 18, 2023
1 parent 60eec9d commit fab512e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/progs/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fab512e

Please sign in to comment.