bpf: Fix marker to skip nodeport when punting to proxy#43069
Conversation
|
/test |
julianwiedmann
left a comment
There was a problem hiding this comment.
A BPF test for this particular path could be similar as the existing XDP test for a local backend (
cilium/bpf/tests/xdp_nodeport_lb4_nat_lb.c
Line 171 in c625631
Yeap agree, I likely won't get to it before LPC, but will look into this afterwards. |
Julian spotted that setting ctx_skip_nodeport_set(ctx) is not having the desired effect for the case when there is XDP used on the node. The ctx_skip_nodeport_set() marker is not transferred to the skb and as a result the service lookup would happen twice instead of just in the XDP layer resulting in higher per-packet cost. The latter lookup in the tcx layer for such packets is unnecessary. Therefore, use the correct ctx_set_xfer(ctx, XFER_PKT_NO_SVC). Reported-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
8c17cd3 to
a2016fb
Compare
1343c59 to
d91a30b
Compare
Add a test where the backend is local with the service L7 proxy delegate. We expect the service to be passed up the stack unmodified. XFER_PKT_NO_SVC is set to skip tcx service handling a second time. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
d91a30b to
736edd0
Compare
Add a test where the backend is remote with the service L7 proxy delegate. We expect the service to be NATed and sent out the node. XFER_PKT_NO_SVC is /not/ set in this case given the backend is not part of the local endpoint map. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
100be2c to
a6a4a97
Compare
|
/test |
|
👋 Backporter here. I've encountered significant conflicts when trying to backport this PR to v1.18, as the target hunks of the first commit seem to have diverged significantly between the two branches. Marking as |
Yep, I'll take care of it. |
(see commit msg)