Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpf: encap: send TO_OVERLAY trace before adding encapsulation #25828

Merged
merged 1 commit into from
Jun 2, 2023

Commits on Jun 1, 2023

  1. bpf: encap: send TO_OVERLAY trace before adding encapsulation

    When used from TC context, ctx_set_encap_info() merely adds the tunnel
    metadata without touching the packet content. So the send_trace_notify()
    still describes the content of the inner packet.
    
    But when called from XDP context, the ctx_set_encap_info() invocation
    pushes the actual tunnel headers. So the send_trace_notify() will report
    the *outer* packet.
    
    Move the trace statement slightly up, so that it consistently describes
    the inner packet. Note that we now get a trace entry when the
    subsequent ctx_set_encap_info() fails - so we would need to match any
    resulting drop notification against the preceding TRACE_TO_OVERLAY.
    
    Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
    julianwiedmann committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    3c2fd23 View commit details
    Browse the repository at this point in the history