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

patch/optimize(bpf): improve lan hijack datapath performance #466

Merged
merged 3 commits into from
Mar 8, 2024

Commits on Mar 4, 2024

  1. bpf: Parse skb->data only once

    Previously we parsed skb->data for twice: wan_egress/lan_ingress and
    dae0peer_ingress. This is because the limit of bpf_sk_assign: we have to
    call it within the netns where the socket is.
    
    This patch manages to parse skb->data only once at
    wan_egress/lan_ingress, where we leave a value in skb->cb[1] to tell
    dae0peer_ingress:
    1. if skb->cb[1] == TCP, then it's a new TCP conn, assign skb to TCP
       listener;
    2. if skb->cb[1] == UDP, then it's a UDP, assign skb to UDP listener;
    3. else it's an establised TCP conn, stack can take care of socket
       lookup;
    jschwinger233 committed Mar 4, 2024
    Configuration menu
    Copy the full SHA
    769d2a4 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2024

  1. Configuration menu
    Copy the full SHA
    5badabf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8cc3e8a View commit details
    Browse the repository at this point in the history