19 Aug, 2020

1 commit

  • [ Upstream commit eef8a42d6ce087d1c81c960ae0d14f955b742feb ]

    The `BPF_LOG_BUF_SIZE`'s value is `UINT32_MAX >> 8`, so define an array
    with it on stack caused an overflow.

    Signed-off-by: Wenbo Zhang
    Signed-off-by: Daniel Borkmann
    Acked-by: Andrii Nakryiko
    Link: https://lore.kernel.org/bpf/20200710092035.28919-1-ethercflow@gmail.com
    Signed-off-by: Sasha Levin

    Wenbo Zhang
     

01 Jul, 2020

2 commits

  • [ Upstream commit 6903cdae9f9f08d61e49c16cbef11c293e33a615 ]

    Memset on the pointer right after malloc can cause a NULL pointer
    deference if it failed to allocate memory. A simple fix is to
    replace malloc()/memset() pair with a simple call to calloc().

    Fixes: 0fca931a6f21 ("samples/bpf: program demonstrating access to xdp_rxq_info")
    Signed-off-by: Gaurav Singh
    Signed-off-by: Daniel Borkmann
    Acked-by: Jesper Dangaard Brouer
    Acked-by: John Fastabend
    Signed-off-by: Sasha Levin

    Gaurav Singh
     
  • [ Upstream commit 6a09815428547657f3ffd2f5c31ac2a191e7fdf3 ]

    xdp_redirect_cpu is currently failing in bpf_prog_load_xattr()
    allocating cpu_map map if CONFIG_NR_CPUS is less than 64 since
    cpu_map_alloc() requires max_entries to be less than NR_CPUS.
    Set cpu_map max_entries according to NR_CPUS in xdp_redirect_cpu_kern.c
    and get currently running cpus in xdp_redirect_cpu_user.c

    Signed-off-by: Lorenzo Bianconi
    Signed-off-by: Alexei Starovoitov
    Acked-by: Yonghong Song
    Link: https://lore.kernel.org/bpf/374472755001c260158c4e4b22f193bdd3c56fb7.1589300442.git.lorenzo@kernel.org
    Signed-off-by: Sasha Levin

    Lorenzo Bianconi
     

03 Jun, 2020

1 commit

  • [ Upstream commit 23ad04669f81f958e9a4121b0266228d2eb3c357 ]

    GCC 10 is very strict about symbol clash, and lwt_len_hist_user contains
    a symbol which clashes with libbpf:

    /usr/bin/ld: samples/bpf/lwt_len_hist_user.o:(.bss+0x0): multiple definition of `bpf_log_buf'; samples/bpf/bpf_load.o:(.bss+0x8c0): first defined here
    collect2: error: ld returned 1 exit status

    bpf_log_buf here seems to be a leftover, so removing it.

    Signed-off-by: Matteo Croce
    Signed-off-by: Alexei Starovoitov
    Acked-by: Yonghong Song
    Link: https://lore.kernel.org/bpf/20200511113234.80722-1-mcroce@redhat.com
    Signed-off-by: Sasha Levin

    Matteo Croce
     

24 Feb, 2020

1 commit

  • [ Upstream commit 450278977acbf494a20367c22fbb38729772d1fc ]

    It seems Clang can in some cases turn on stack protection by default, which
    doesn't work with BPF. This was reported once before[0], but it seems the
    flag to explicitly turn off the stack protector wasn't added to the
    Makefile, so do that now.

    The symptom of this is compile errors like the following:

    error: :0:0: in function bpf_prog1 i32 (%struct.__sk_buff*): A call to built-in function '__stack_chk_fail' is not supported.

    [0] https://www.spinics.net/lists/netdev/msg556400.html

    Signed-off-by: Toke Høiland-Jørgensen
    Signed-off-by: Alexei Starovoitov
    Link: https://lore.kernel.org/bpf/20191216103819.359535-1-toke@redhat.com
    Signed-off-by: Sasha Levin

    Toke Høiland-Jørgensen
     

11 Feb, 2020

2 commits

  • commit f9e6bfdbaf0cf304d72c70a05d81acac01a04f48 upstream.

    When sample xdp_redirect_cpu was converted to use libbpf, the
    tracepoints used by this sample were not getting attached automatically
    like with bpf_load.c. The BPF-maps was still getting loaded, thus
    nobody notice that the tracepoints were not updating these maps.

    This fix doesn't use the new skeleton code, as this bug was introduced
    in v5.1 and stable might want to backport this. E.g. Red Hat QA uses
    this sample as part of their testing.

    Fixes: bbaf6029c49c ("samples/bpf: Convert XDP samples to libbpf usage")
    Signed-off-by: Jesper Dangaard Brouer
    Signed-off-by: Alexei Starovoitov
    Acked-by: Andrii Nakryiko
    Link: https://lore.kernel.org/bpf/157685877642.26195.2798780195186786841.stgit@firesoul
    Signed-off-by: Greg Kroah-Hartman

    Jesper Dangaard Brouer
     
  • commit b2e5e93ae8af6a34bca536cdc4b453ab1e707b8b upstream.

    The 'clean' rule in the samples/bpf Makefile tries to remove backup
    files (ending in ~). However, if no such files exist, it will instead try
    to remove the user's home directory. While the attempt is mostly harmless,
    it does lead to a somewhat scary warning like this:

    rm: cannot remove '~': Is a directory

    Fix this by using find instead of shell expansion to locate any actual
    backup files that need to be removed.

    Fixes: b62a796c109c ("samples/bpf: allow make to be run from samples/bpf/ directory")
    Signed-off-by: Toke Høiland-Jørgensen
    Signed-off-by: Alexei Starovoitov
    Acked-by: Jesper Dangaard Brouer
    Link: https://lore.kernel.org/bpf/157952560126.1683545.7273054725976032511.stgit@toke.dk
    Signed-off-by: Greg Kroah-Hartman

    Toke Høiland-Jørgensen
     

26 Jan, 2020

2 commits

  • commit edbca120a8cdfa5a5793707e33497aa5185875ca upstream.

    In the days of using bpf_load.c the order in which the 'maps' sections
    were defines in BPF side (*_kern.c) file, were used by userspace side
    to identify the map via using the map order as an index. In effect the
    order-index is created based on the order the maps sections are stored
    in the ELF-object file, by the LLVM compiler.

    This have also carried over in libbpf via API bpf_map__next(NULL, obj)
    to extract maps in the order libbpf parsed the ELF-object file.

    When BTF based maps were introduced a new section type ".maps" were
    created. I found that the LLVM compiler doesn't create the ".maps"
    sections in the order they are defined in the C-file. The order in the
    ELF file is based on the order the map pointer is referenced in the code.

    This combination of changes lead to xdp_rxq_info mixing up the map
    file-descriptors in userspace, resulting in very broken behaviour, but
    without warning the user.

    This patch fix issue by instead using bpf_object__find_map_by_name()
    to find maps via their names. (Note, this is the ELF name, which can
    be longer than the name the kernel retains).

    Fixes: be5bca44aa6b ("samples: bpf: convert some XDP samples from bpf_load to libbpf")
    Fixes: 451d1dc886b5 ("samples: bpf: update map definition to new syntax BTF-defined map")
    Signed-off-by: Jesper Dangaard Brouer
    Signed-off-by: Alexei Starovoitov
    Acked-by: Toke Høiland-Jørgensen
    Acked-by: Andrii Nakryiko
    Link: https://lore.kernel.org/bpf/157529025128.29832.5953245340679936909.stgit@firesoul
    Signed-off-by: Greg Kroah-Hartman

    Jesper Dangaard Brouer
     
  • commit 451d1dc886b548d6e18c933adca326c1307023c9 upstream.

    Since, the new syntax of BTF-defined map has been introduced,
    the syntax for using maps under samples directory are mixed up.
    For example, some are already using the new syntax, and some are using
    existing syntax by calling them as 'legacy'.

    As stated at commit abd29c931459 ("libbpf: allow specifying map
    definitions using BTF"), the BTF-defined map has more compatablility
    with extending supported map definition features.

    The commit doesn't replace all of the map to new BTF-defined map,
    because some of the samples still use bpf_load instead of libbpf, which
    can't properly create BTF-defined map.

    This will only updates the samples which uses libbpf API for loading bpf
    program. (ex. bpf_prog_load_xattr)

    Signed-off-by: Daniel T. Lee
    Acked-by: Andrii Nakryiko
    Signed-off-by: Alexei Starovoitov
    Signed-off-by: Greg Kroah-Hartman

    Daniel T. Lee
     

12 Jan, 2020

2 commits

  • [ Upstream commit fe3300897cbfd76c6cb825776e5ac0ca50a91ca4 ]

    Currently, open() is called from the user program and it calls the syscall
    'sys_openat', not the 'sys_open'. This leads to an error of the program
    of user side, due to the fact that the counter maps are zero since no
    function such 'sys_open' is called.

    This commit adds the kernel bpf program which are attached to the
    tracepoint 'sys_enter_openat' and 'sys_enter_openat'.

    Fixes: 1da236b6be963 ("bpf: add a test case for syscalls/sys_{enter|exit}_* tracepoints")
    Signed-off-by: Daniel T. Lee
    Signed-off-by: Alexei Starovoitov
    Signed-off-by: Sasha Levin

    Daniel T. Lee
     
  • [ Upstream commit bba1b2a890253528c45aa66cf856f289a215bfbc ]

    Previously, when this sample is added, commit 1c47910ef8013
    ("samples/bpf: add perf_event+bpf example"), a symbol 'sys_read' and
    'sys_write' has been used without no prefixes. But currently there are
    no exact symbols with these under kallsyms and this leads to failure.

    This commit changes exact compare to substring compare to keep compatible
    with exact symbol or prefixed symbol.

    Fixes: 1c47910ef8013 ("samples/bpf: add perf_event+bpf example")
    Signed-off-by: Daniel T. Lee
    Signed-off-by: Alexei Starovoitov
    Link: https://lore.kernel.org/bpf/20191205080114.19766-2-danieltimlee@gmail.com
    Signed-off-by: Sasha Levin

    Daniel T. Lee
     

01 Nov, 2019

1 commit

  • To remove that test_attr__{enabled/open} are used by perf-sys.h, we
    set HAVE_ATTR_TEST to zero.

    Signed-off-by: Björn Töpel
    Tested-by: KP Singh
    Acked-by: Song Liu
    Cc: Adrian Hunter
    Cc: Alexei Starovoitov
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: bpf@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Daniel Borkmann
    Link: http://lore.kernel.org/bpf/20191001113307.27796-3-bjorn.topel@gmail.com

    Björn Töpel
     

03 Oct, 2019

2 commits

  • This was added in commit eb111869301e ("compiler-types.h: add asm_inline
    definition") and breaks samples/bpf as clang does not support asm __inline.

    Fixes: eb111869301e ("compiler-types.h: add asm_inline definition")
    Co-developed-by: Florent Revest
    Signed-off-by: Florent Revest
    Signed-off-by: KP Singh
    Signed-off-by: Daniel Borkmann
    Acked-by: Song Liu
    Acked-by: Andrii Nakryiko
    Link: https://lore.kernel.org/bpf/20191002191652.11432-1-kpsingh@chromium.org

    KP Singh
     
  • Add missing include for which was removed from
    perf-sys.h in commit 91854f9a077e ("perf tools: Move everything
    related to sys_perf_event_open() to perf-sys.h").

    Fixes: 91854f9a077e ("perf tools: Move everything related to sys_perf_event_open() to perf-sys.h")
    Reported-by: KP Singh
    Reported-by: Florent Revest
    Signed-off-by: Björn Töpel
    Signed-off-by: Daniel Borkmann
    Tested-by: KP Singh
    Acked-by: Song Liu
    Link: https://lore.kernel.org/bpf/20191001112249.27341-1-bjorn.topel@gmail.com

    Björn Töpel
     

16 Sep, 2019

1 commit

  • Preserve the offset of the address of the received descriptor, and include
    it in the address set for the tx descriptor, so the kernel can correctly
    locate the start of the packet data.

    Fixes: 03895e63ff97 ("samples/bpf: add buffer recycling for unaligned chunks to xdpsock")
    Signed-off-by: Ciara Loftus
    Signed-off-by: Daniel Borkmann

    Ciara Loftus
     

31 Aug, 2019

3 commits

  • This patch modifies xdpsock to use mmap instead of posix_memalign. With
    this change, we can use hugepages when running the application in unaligned
    chunks mode. Using hugepages makes it more likely that we have physically
    contiguous memory, which supports the unaligned chunk mode better.

    Signed-off-by: Kevin Laatz
    Acked-by: Jonathan Lemon
    Signed-off-by: Daniel Borkmann

    Kevin Laatz
     
  • This patch adds buffer recycling support for unaligned buffers. Since we
    don't mask the addr to 2k at umem_reg in unaligned mode, we need to make
    sure we give back the correct (original) addr to the fill queue. We achieve
    this using the new descriptor format and associated masks. The new format
    uses the upper 16-bits for the offset and the lower 48-bits for the addr.
    Since we have a field for the offset, we no longer need to modify the
    actual address. As such, all we have to do to get back the original address
    is mask for the lower 48 bits (i.e. strip the offset and we get the address
    on it's own).

    Signed-off-by: Kevin Laatz
    Signed-off-by: Bruce Richardson
    Acked-by: Jonathan Lemon
    Signed-off-by: Daniel Borkmann

    Kevin Laatz
     
  • This patch adds support for the unaligned chunks mode. The addition of the
    unaligned chunks option will allow users to run the application with more
    relaxed chunk placement in the XDP umem.

    Unaligned chunks mode can be used with the '-u' or '--unaligned' command
    line options.

    Signed-off-by: Kevin Laatz
    Signed-off-by: Ciara Loftus
    Acked-by: Jonathan Lemon
    Signed-off-by: Daniel Borkmann

    Kevin Laatz
     

21 Aug, 2019

1 commit


18 Aug, 2019

1 commit

  • This commit adds using the need_wakeup flag to the xdpsock sample
    application. It is turned on by default as we think it is a feature
    that seems to always produce a performance benefit, if the application
    has been written taking advantage of it. It can be turned off in the
    sample app by using the '-m' command line option.

    The txpush and l2fwd sub applications have also been updated to
    support poll() with multiple sockets.

    Signed-off-by: Magnus Karlsson
    Acked-by: Jonathan Lemon
    Signed-off-by: Daniel Borkmann

    Magnus Karlsson
     

10 Aug, 2019

3 commits

  • Make it clear that this XDP program depend on the network
    stack to do the ARP resolution. This is connected with the
    BPF_FIB_LKUP_RET_NO_NEIGH return code from bpf_fib_lookup().

    Another common mistake (seen via XDP-tutorial) is that users
    don't realize that sysctl net.ipv{4,6}.conf.all.forwarding
    setting is honored by bpf_fib_lookup.

    Reported-by: Anton Protopopov
    Signed-off-by: Jesper Dangaard Brouer
    Reviewed-by: David Ahern
    Acked-by: Yonghong Song
    Reviewed-by: Toke Høiland-Jørgensen
    Signed-off-by: Daniel Borkmann

    Jesper Dangaard Brouer
     
  • This address the TODO in samples/bpf/xdp_fwd_kern.c, which points out
    that the chosen egress index should be checked for existence in the
    devmap. This can now be done via taking advantage of Toke's work in
    commit 0cdbb4b09a06 ("devmap: Allow map lookups from eBPF").

    This change makes xdp_fwd more practically usable, as this allows for
    a mixed environment, where IP-forwarding fallback to network stack, if
    the egress device isn't configured to use XDP.

    Signed-off-by: Jesper Dangaard Brouer
    Reviewed-by: David Ahern
    Reviewed-by: Toke Høiland-Jørgensen
    Acked-by: Yonghong Song
    Signed-off-by: Daniel Borkmann

    Jesper Dangaard Brouer
     
  • The devmap name 'tx_port' came from a copy-paste from xdp_redirect_map
    which only have a single TX port. Change name to xdp_tx_ports
    to make it more descriptive.

    Signed-off-by: Jesper Dangaard Brouer
    Reviewed-by: David Ahern
    Acked-by: Yonghong Song
    Reviewed-by: Toke Høiland-Jørgensen
    Signed-off-by: Daniel Borkmann

    Jesper Dangaard Brouer
     

24 Jul, 2019

2 commits


16 Jul, 2019

1 commit

  • While $ARCH can be relatively flexible (see Makefile and
    tools/scripts/Makefile.arch), $SRCARCH always corresponds to a directory
    name under arch/.

    Therefore, build samples with -D__TARGET_ARCH_$(SRCARCH), since that
    matches the expectations of bpf_helpers.h.

    Signed-off-by: Ilya Leoshkevich
    Acked-by: Vasily Gorbik
    Acked-by: Andrii Nakryiko
    Signed-off-by: Daniel Borkmann

    Ilya Leoshkevich
     

09 Jul, 2019

1 commit


04 Jul, 2019

1 commit

  • Daniel Borkmann says:

    ====================
    pull-request: bpf 2019-07-03

    The following pull-request contains BPF updates for your *net* tree.

    The main changes are:

    1) Fix the interpreter to properly handle BPF_ALU32 | BPF_ARSH
    on BE architectures, from Jiong.

    2) Fix several bugs in the x32 BPF JIT for handling shifts by 0,
    from Luke and Xi.

    3) Fix NULL pointer deref in btf_type_is_resolve_source_only(),
    from Stanislav.

    4) Properly handle the check that forwarding is enabled on the device
    in bpf_ipv6_fib_lookup() helper code, from Anton.

    5) Fix UAPI bpf_prog_info fields alignment for archs that have 16 bit
    alignment such as m68k, from Baruch.

    6) Fix kernel hanging in unregister_netdevice loop while unregistering
    device bound to XDP socket, from Ilya.

    7) Properly terminate tail update in xskq_produce_flush_desc(), from Nathan.

    8) Fix broken always_inline handling in test_lwt_seg6local, from Jiri.

    9) Fix bpftool to use correct argument in cgroup errors, from Jakub.

    10) Fix detaching dummy prog in XDP redirect sample code, from Prashant.

    11) Add Jonathan to AF_XDP reviewers, from Björn.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

03 Jul, 2019

3 commits

  • Copy-paste, should be detach, not attach.

    Signed-off-by: Stanislav Fomichev
    Acked-by: Soheil Hassas Yeganeh
    Acked-by: Yuchung Cheng
    Signed-off-by: Daniel Borkmann

    Stanislav Fomichev
     
  • Uses new RTT callback to dump stats every second.

    $ mkdir -p /tmp/cgroupv2
    $ mount -t cgroup2 none /tmp/cgroupv2
    $ mkdir -p /tmp/cgroupv2/foo
    $ echo $$ >> /tmp/cgroupv2/foo/cgroup.procs
    $ bpftool prog load ./tcp_dumpstats_kern.o /sys/fs/bpf/tcp_prog
    $ bpftool cgroup attach /tmp/cgroupv2/foo sock_ops pinned /sys/fs/bpf/tcp_prog
    $ bpftool prog tracelog
    $ # run neper/netperf/etc

    Used neper to compare performance with and without this program attached
    and didn't see any noticeable performance impact.

    Sample output:
    -0 [015] ..s. 2074.128800: 0: dsack_dups=0 delivered=242526
    -0 [015] ..s. 2074.128808: 0: delivered_ce=0 icsk_retransmits=0
    -0 [015] ..s. 2075.130133: 0: dsack_dups=0 delivered=323599
    -0 [015] ..s. 2075.130138: 0: delivered_ce=0 icsk_retransmits=0
    -0 [005] .Ns. 2076.131440: 0: dsack_dups=0 delivered=404648
    -0 [005] .Ns. 2076.131447: 0: delivered_ce=0 icsk_retransmits=0

    Cc: Eric Dumazet
    Cc: Priyaranjan Jha
    Cc: Yuchung Cheng
    Cc: Soheil Hassas Yeganeh
    Acked-by: Soheil Hassas Yeganeh
    Acked-by: Yuchung Cheng
    Signed-off-by: Stanislav Fomichev
    Signed-off-by: Daniel Borkmann

    Stanislav Fomichev
     
  • Adds support for fq's Earliest Departure Time to HBM (Host Bandwidth
    Manager). Includes a new BPF program supporting EDT, and also updates
    corresponding programs.

    It will drop packets with an EDT of more than 500us in the future
    unless the packet belongs to a flow with less than 2 packets in flight.
    This is done so each flow has at least 2 packets in flight, so they
    will not starve, and also to help prevent delayed ACK timeouts.

    It will also work with ECN enabled traffic, where the packets will be
    CE marked if their EDT is more than 50us in the future.

    The table below shows some performance numbers. The flows are back to
    back RPCS. One server sending to another, either 2 or 4 flows.
    One flow is a 10KB RPC, the rest are 1MB RPCs. When there are more
    than one flow of a given RPC size, the numbers represent averages.

    The rate limit applies to all flows (they are in the same cgroup).
    Tests ending with "-edt" ran with the new BPF program supporting EDT.
    Tests ending with "-hbt" ran on top HBT qdisc with the specified rate
    (i.e. no HBM). The other tests ran with the HBM BPF program included
    in the HBM patch-set.

    EDT has limited value when using DCTCP, but it helps in many cases when
    using Cubic. It usually achieves larger link utilization and lower
    99% latencies for the 1MB RPCs.
    HBM ends up queueing a lot of packets with its default parameter values,
    reducing the goodput of the 10KB RPCs and increasing their latency. Also,
    the RTTs seen by the flows are quite large.

    Aggr 10K 10K 10K 1MB 1MB 1MB
    Limit rate drops RTT rate P90 P99 rate P90 P99
    Test rate Flows Mbps % us Mbps us us Mbps ms ms
    -------- ---- ----- ---- ----- --- ---- ---- ---- ---- ---- ----
    cubic 1G 2 904 0.02 108 257 511 539 647 13.4 24.5
    cubic-edt 1G 2 982 0.01 156 239 656 967 743 14.0 17.2
    dctcp 1G 2 977 0.00 105 324 408 744 653 14.5 15.9
    dctcp-edt 1G 2 981 0.01 142 321 417 811 660 15.7 17.0
    cubic-htb 1G 2 919 0.00 1825 40 2822 4140 879 9.7 9.9

    cubic 200M 2 155 0.30 220 81 532 655 74 283 450
    cubic-edt 200M 2 188 0.02 222 87 1035 1095 101 84 85
    dctcp 200M 2 188 0.03 111 77 912 939 111 76 325
    dctcp-edt 200M 2 188 0.03 217 74 1416 1738 114 76 79
    cubic-htb 200M 2 188 0.00 5015 8 14ms 15ms 180 48 50

    cubic 1G 4 952 0.03 110 165 516 546 262 38 154
    cubic-edt 1G 4 973 0.01 190 111 1034 1314 287 65 79
    dctcp 1G 4 951 0.00 103 180 617 905 257 37 38
    dctcp-edt 1G 4 967 0.00 163 151 732 1126 272 43 55
    cubic-htb 1G 4 914 0.00 3249 13 7ms 8ms 300 29 34

    cubic 5G 4 4236 0.00 134 305 490 624 1310 10 17
    cubic-edt 5G 4 4865 0.00 156 306 425 759 1520 10 16
    dctcp 5G 4 4936 0.00 128 485 221 409 1484 7 9
    dctcp-edt 5G 4 4924 0.00 148 390 392 623 1508 11 26

    v1 -> v2: Incorporated Andrii's suggestions
    v2 -> v3: Incorporated Yonghong's suggestions
    v3 -> v4: Removed credit update that is not needed

    Signed-off-by: Lawrence Brakmo
    Acked-by: Yonghong Song
    Signed-off-by: Daniel Borkmann

    brakmo
     

28 Jun, 2019

1 commit

  • The typical XDP memory scheme is one packet per page. Change the AF_XDP
    frame size in libbpf to 4096, which is the page size on x86, to allow
    libbpf to be used with the drivers with the packet-per-page scheme.

    Add a command line option -f to xdpsock to allow to specify a custom
    frame size.

    Signed-off-by: Maxim Mikityanskiy
    Signed-off-by: Tariq Toukan
    Acked-by: Saeed Mahameed
    Signed-off-by: Daniel Borkmann

    Maxim Mikityanskiy
     

26 Jun, 2019

1 commit

  • Currently, each xdp samples are inconsistent in the use.
    Most of the samples fetch the interface with it's name.
    (ex. xdp1, xdp2skb, xdp_redirect_cpu, xdp_sample_pkts, etc.)

    But some of the xdp samples are fetching the interface with
    ifindex by command argument.

    This commit enables xdp samples to fetch interface with it's name
    without changing the original index interface fetching.
    ( fetching in the same way as xdp_sample_pkts_user.c does.)

    Signed-off-by: Daniel T. Lee
    Acked-by: Toke Høiland-Jørgensen
    Acked-by: Jesper Dangaard Brouer
    Acked-by: Song Liu
    Signed-off-by: Daniel Borkmann

    Daniel T. Lee
     

25 Jun, 2019

1 commit


24 Jun, 2019

1 commit

  • When we terminate xdp_redirect, it ends up with following message:
    "Program on iface OUT changed, not removing"
    This results in dummy prog still attached to OUT interface.
    It is because signal handler checks if the programs are the same that
    we had attached. But while fetching dummy_prog_id, current code uses
    prog_fd instead of dummy_prog_fd. This patch passes the correct fd.

    Fixes: 3b7a8ec2dec3 ("samples/bpf: Check the prog id before exiting")
    Signed-off-by: Prashant Bhole
    Acked-by: Toke Høiland-Jørgensen
    Signed-off-by: Daniel Borkmann

    Prashant Bhole
     

22 Jun, 2019

2 commits

  • Minor SPDX change conflict.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Pull still more SPDX updates from Greg KH:
    "Another round of SPDX updates for 5.2-rc6

    Here is what I am guessing is going to be the last "big" SPDX update
    for 5.2. It contains all of the remaining GPLv2 and GPLv2+ updates
    that were "easy" to determine by pattern matching. The ones after this
    are going to be a bit more difficult and the people on the spdx list
    will be discussing them on a case-by-case basis now.

    Another 5000+ files are fixed up, so our overall totals are:
    Files checked: 64545
    Files with SPDX: 45529

    Compared to the 5.1 kernel which was:
    Files checked: 63848
    Files with SPDX: 22576

    This is a huge improvement.

    Also, we deleted another 20000 lines of boilerplate license crud,
    always nice to see in a diffstat"

    * tag 'spdx-5.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: (65 commits)
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 507
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 506
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 505
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 504
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 503
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 502
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 501
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 499
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 498
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 497
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 496
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 495
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 491
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 490
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 489
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 488
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 487
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 486
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 485
    ...

    Linus Torvalds
     

20 Jun, 2019

1 commit

  • Alexei Starovoitov says:

    ====================
    pull-request: bpf-next 2019-06-19

    The following pull-request contains BPF updates for your *net-next* tree.

    The main changes are:

    1) new SO_REUSEPORT_DETACH_BPF setsocktopt, from Martin.

    2) BTF based map definition, from Andrii.

    3) support bpf_map_lookup_elem for xskmap, from Jonathan.

    4) bounded loops and scalar precision logic in the verifier, from Alexei.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

19 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    gplv2

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 58 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081207.556988620@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

18 Jun, 2019

1 commit