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: nodeport: provide L4 ports for SNAT in LB egress path #26550

Merged

Commits on Jun 29, 2023

  1. bpf: nodeport: provide L4 ports for SNAT in LB egress path

    For LB traffic that gets forwarded to a remote backend in non-DSR mode,
    tail_nodeport_nat_egress_ipv*() calls snat_v*_nat() to perform SNAT on the
    packet. Under the covers, this extracts a fresh CT tuple to look up / build
    a SNAT entry.
    
    But for LB traffic we don't require any of the ICMP handling in that code
    path, and we already extract a CT tuple for building tunnel headers in XDP
    mode. So we can optimize this code path, and provide a fully populated CT
    tuple to the SNAT helper.
    
    One additional benefit is that we fix handling for fragmented IPv4 packets,
    as lb4_extract_tuple() knows how to extract their L4 ports while
    snat_v4_nat() doesn't.
    
    Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
    julianwiedmann committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    4650a70 View commit details
    Browse the repository at this point in the history