01 Sep, 2017

1 commit

  • Fix compilation error below:

    $ make samples/bpf/

    LLVM ERROR: 'xdp_redirect_dummy' label emitted multiple times to
    assembly file
    make[1]: *** [samples/bpf/xdp_redirect_kern.o] Error 1
    make: *** [samples/bpf/] Error 2

    Fixes: 306da4e685b4 ("samples/bpf: xdp_redirect load XDP dummy prog on TX device")
    Signed-off-by: Tariq Toukan
    Acked-by: Jesper Dangaard Brouer
    Acked-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Tariq Toukan
     

30 Aug, 2017

1 commit

  • For supporting XDP_REDIRECT, a device driver must (obviously)
    implement the "TX" function ndo_xdp_xmit(). An additional requirement
    is you cannot TX out a device, unless it also have a xdp bpf program
    attached. This dependency is caused by the driver code need to setup
    XDP resources before it can ndo_xdp_xmit.

    Update bpf samples xdp_redirect and xdp_redirect_map to automatically
    attach a dummy XDP program to the configured ifindex_out device. Use
    the XDP flag XDP_FLAGS_UPDATE_IF_NOEXIST on the dummy load, to avoid
    overriding an existing XDP prog on the device.

    Signed-off-by: Jesper Dangaard Brouer
    Signed-off-by: David S. Miller

    Jesper Dangaard Brouer
     

18 Jul, 2017

1 commit

  • This implements a sample program for testing bpf_redirect. It reports
    the number of packets redirected per second and as input takes the
    ifindex of the device to run the xdp program on and the ifindex of the
    interface to redirect packets to.

    Signed-off-by: John Fastabend
    Tested-by: Andy Gospodarek
    Acked-by: Daniel Borkmann
    Acked-by: Jesper Dangaard Brouer
    Signed-off-by: David S. Miller

    John Fastabend