summaryrefslogtreecommitdiff
path: root/docs/_include/interface-xdp.txt
blob: 34b46bdff6001ce39f2d9f540093169aa20a81e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.. cfgcmd:: set interfaces {{ var0 }} <interface> xdp

  Enable support for Linux :abbr:`XDP (eXpress Data Path)` on recent 1.4 rolling
  releases. You must enable it for every interface which should participate in
  the XDP forwarding.

  XDP is an eBPF based high performance data path merged in the Linux kernel
  since version 4.8. The idea behind XDP is to add an early hook in the RX path
  of the kernel, and let a user supplied eBPF program decide the fate of the
  packet. The hook is placed in the NIC driver just after the interrupt
  processing, and before any memory allocation needed by the network stack
  itself, because memory allocation can be an expensive operation.

  .. warning:: This is highly experimental!

  .. note:: Enabling this feature will break any form of NAT or Firewalling on
    this interface, as XDP is handled way earlier in the driver then iptables/
    nftables.

  Enabling this feature will only load the XDP router code as described here:
  https://blog.apnic.net/2020/04/30/how-to-build-an-xdp-based-bgp-peering-router/

  Example:

  .. code-block:: none

    set interfaces {{ var0 }} {{ var1 }} xdp