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

datapath,daemon: Enable multi-dev XDP #17655

Merged
merged 3 commits into from
Oct 25, 2021
Merged

datapath,daemon: Enable multi-dev XDP #17655

merged 3 commits into from
Oct 25, 2021

Commits on Oct 25, 2021

  1. datapath,daemon: Enable multi-dev XDP

    This commit enables XDP (bpf_xdp) on all devices specified by --devices.
    Previously, only --direct-routing-device (or --devices if dev count = 1)
    could have been used to run bpf_xdp.
    
    To do so, we rely on the bpf_redirect() helper which performance
    (>= 5.5 Linux kernel) recently became on par with bpf_redirect_map()
    [1]. Therefore, it does not make sense to use the latter.
    
    The side effect of the enablement is that the --prefilter-device no
    longer makes sense. This will be addressed in a following commit.
    
    [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1d233886dd904edbf239eeffe435c3308ae97625
    
    Signed-off-by: Martynas Pumputis <m@lambda.lt>
    brb committed Oct 25, 2021
    Configuration menu
    Copy the full SHA
    688b70a View commit details
    Browse the repository at this point in the history
  2. test: Test XDP_REDIRECT in L4LB suite

    To test that, add another veth pair to the LB node (aka
    "kind-control-plane"), and steer the LB request through it (done by
    installing ip route: $LB_VIP via $ANOTHER_VETH_PAIR_IP).  After
    receiving the request, the LB node will do XDP_REDIRECT to the previous
    veth pair (identified by the --direct-routing-device) which is used to
    connect with the kind-worker which is running the service backend.
    
    Signed-off-by: Martynas Pumputis <m@lambda.lt>
    brb committed Oct 25, 2021
    Configuration menu
    Copy the full SHA
    c16c3d2 View commit details
    Browse the repository at this point in the history
  3. daemon: Deprecate --prefilter-{device,mode}

    Replace the enablement by the dedicated flag "--enable-xdp-prefilter",
    and the mode with the existing "--bpf-lb-acceleration".
    
    Ideally, we should deprecate the filter, but we cannot do it until the
    host-fw is supported by the XDP prog.
    
    Signed-off-by: Martynas Pumputis <m@lambda.lt>
    brb committed Oct 25, 2021
    Configuration menu
    Copy the full SHA
    05cdfcf View commit details
    Browse the repository at this point in the history