11 Nov, 2019

1 commit

  • Add support for the XDP_SHARED_UMEM mode to the xdpsock sample
    application. As libbpf does not have a built in XDP program for this
    mode, we use an explicitly loaded XDP program. This also serves as an
    example on how to write your own XDP program that can route to an
    AF_XDP socket.

    Signed-off-by: Magnus Karlsson
    Signed-off-by: Alexei Starovoitov
    Tested-by: William Tu
    Acked-by: Jonathan Lemon
    Link: https://lore.kernel.org/bpf/1573148860-30254-3-git-send-email-magnus.karlsson@intel.com

    Magnus Karlsson
     

26 Feb, 2019

1 commit

  • This commit converts the xdpsock sample application to use the AF_XDP
    functions present in libbpf. This cuts down the size of it by nearly
    300 lines of code.

    The default ring sizes plus the batch size has been increased and the
    size of the umem area has decreased. This so that the sample application
    will provide higher throughput. Note also that the shared umem code
    has been removed from the sample as this is not supported by libbpf
    at this point in time.

    Tested-by: Björn Töpel
    Signed-off-by: Magnus Karlsson
    Signed-off-by: Daniel Borkmann

    Magnus Karlsson
     

04 May, 2018

1 commit

  • This is a sample application for AF_XDP sockets. The application
    supports three different modes of operation: rxdrop, txonly and l2fwd.

    To show-case a simple round-robin load-balancing between a set of
    sockets in an xskmap, set the RR_LB compile time define option to 1 in
    "xdpsock.h".

    v2: The entries variable was calculated twice in {umem,xq}_nb_avail.

    Co-authored-by: Björn Töpel
    Signed-off-by: Björn Töpel
    Signed-off-by: Magnus Karlsson
    Signed-off-by: Alexei Starovoitov

    Magnus Karlsson