<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/samples/bpf, branch v5.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-10-31T20:39:15Z</updated>
<entry>
<title>samples/bpf: fix build by setting HAVE_ATTR_TEST to zero</title>
<updated>2019-10-31T20:39:15Z</updated>
<author>
<name>Björn Töpel</name>
<email>bjorn.topel@intel.com</email>
</author>
<published>2019-10-01T11:33:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=04ec044b7d30800296824783df7d9728d16d7567'/>
<id>urn:sha1:04ec044b7d30800296824783df7d9728d16d7567</id>
<content type='text'>
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 &lt;bjorn.topel@intel.com&gt;
Tested-by: KP Singh &lt;kpsingh@google.com&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexei Starovoitov &lt;ast@kernel.org&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: bpf@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: http://lore.kernel.org/bpf/20191001113307.27796-3-bjorn.topel@gmail.com
</content>
</entry>
<entry>
<title>samples/bpf: Add a workaround for asm_inline</title>
<updated>2019-10-03T15:37:11Z</updated>
<author>
<name>KP Singh</name>
<email>kpsingh@google.com</email>
</author>
<published>2019-10-02T19:16:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=98beb3edeb974e906a81f305d88f7bc96b2ec83e'/>
<id>urn:sha1:98beb3edeb974e906a81f305d88f7bc96b2ec83e</id>
<content type='text'>
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 &lt;revest@google.com&gt;
Signed-off-by: Florent Revest &lt;revest@google.com&gt;
Signed-off-by: KP Singh &lt;kpsingh@google.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Acked-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Link: https://lore.kernel.org/bpf/20191002191652.11432-1-kpsingh@chromium.org
</content>
</entry>
<entry>
<title>samples/bpf: Fix build for task_fd_query_user.c</title>
<updated>2019-10-03T14:27:03Z</updated>
<author>
<name>Björn Töpel</name>
<email>bjorn.topel@intel.com</email>
</author>
<published>2019-10-01T11:22:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e55190f26f92927e95aba22b069679311d5379ea'/>
<id>urn:sha1:e55190f26f92927e95aba22b069679311d5379ea</id>
<content type='text'>
Add missing include for &lt;linux/perf_event.h&gt; 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 &lt;kpsingh@google.com&gt;
Reported-by: Florent Revest &lt;revest@google.com&gt;
Signed-off-by: Björn Töpel &lt;bjorn.topel@intel.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Tested-by: KP Singh &lt;kpsingh@google.com&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Link: https://lore.kernel.org/bpf/20191001112249.27341-1-bjorn.topel@gmail.com
</content>
</entry>
<entry>
<title>samples/bpf: fix xdpsock l2fwd tx for unaligned mode</title>
<updated>2019-09-16T07:35:10Z</updated>
<author>
<name>Ciara Loftus</name>
<email>ciara.loftus@intel.com</email>
</author>
<published>2019-09-13T10:39:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a712e1363c8ecb4b504a888833ef91416314c36'/>
<id>urn:sha1:5a712e1363c8ecb4b504a888833ef91416314c36</id>
<content type='text'>
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 &lt;ciara.loftus@intel.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>samples/bpf: use hugepages in xdpsock app</title>
<updated>2019-08-30T23:08:27Z</updated>
<author>
<name>Kevin Laatz</name>
<email>kevin.laatz@intel.com</email>
</author>
<published>2019-08-27T02:25:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3945b37a975d22bed33b525f2933bac82424793d'/>
<id>urn:sha1:3945b37a975d22bed33b525f2933bac82424793d</id>
<content type='text'>
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 &lt;kevin.laatz@intel.com&gt;
Acked-by: Jonathan Lemon &lt;jonathan.lemon@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>samples/bpf: add buffer recycling for unaligned chunks to xdpsock</title>
<updated>2019-08-30T23:08:26Z</updated>
<author>
<name>Kevin Laatz</name>
<email>kevin.laatz@intel.com</email>
</author>
<published>2019-08-27T02:25:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=03895e63ff97447e5eab1b71ed46e3662a45bfe8'/>
<id>urn:sha1:03895e63ff97447e5eab1b71ed46e3662a45bfe8</id>
<content type='text'>
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 &lt;kevin.laatz@intel.com&gt;
Signed-off-by: Bruce Richardson &lt;bruce.richardson@intel.com&gt;
Acked-by: Jonathan Lemon &lt;jonathan.lemon@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>samples/bpf: add unaligned chunks mode support to xdpsock</title>
<updated>2019-08-30T23:08:26Z</updated>
<author>
<name>Kevin Laatz</name>
<email>kevin.laatz@intel.com</email>
</author>
<published>2019-08-27T02:25:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c543f54698229b50078b72760b9e8a4731cffa03'/>
<id>urn:sha1:c543f54698229b50078b72760b9e8a4731cffa03</id>
<content type='text'>
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 &lt;kevin.laatz@intel.com&gt;
Signed-off-by: Ciara Loftus &lt;ciara.loftus@intel.com&gt;
Acked-by: Jonathan Lemon &lt;jonathan.lemon@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>samples: bpf: syscall_nrs: use mmap2 if defined</title>
<updated>2019-08-21T12:31:38Z</updated>
<author>
<name>Ivan Khoronzhuk</name>
<email>ivan.khoronzhuk@linaro.org</email>
</author>
<published>2019-08-15T12:13:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bb4b5c08a8e0f854a313184498b22fa37dd087db'/>
<id>urn:sha1:bb4b5c08a8e0f854a313184498b22fa37dd087db</id>
<content type='text'>
For arm32 xdp sockets mmap2 is preferred, so use it if it's defined.
Declaration of __NR_mmap can be skipped and it breaks build.

Signed-off-by: Ivan Khoronzhuk &lt;ivan.khoronzhuk@linaro.org&gt;
Acked-by: Jonathan Lemon &lt;jonathan.lemon@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>samples/bpf: add use of need_wakeup flag in xdpsock</title>
<updated>2019-08-17T21:07:32Z</updated>
<author>
<name>Magnus Karlsson</name>
<email>magnus.karlsson@intel.com</email>
</author>
<published>2019-08-14T07:27:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=46738f73ea4f94906491cb8399bdeafa5b9cc5ec'/>
<id>urn:sha1:46738f73ea4f94906491cb8399bdeafa5b9cc5ec</id>
<content type='text'>
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 &lt;magnus.karlsson@intel.com&gt;
Acked-by: Jonathan Lemon &lt;jonathan.lemon@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>samples/bpf: xdp_fwd explain bpf_fib_lookup return codes</title>
<updated>2019-08-09T16:05:03Z</updated>
<author>
<name>Jesper Dangaard Brouer</name>
<email>brouer@redhat.com</email>
</author>
<published>2019-08-08T16:17:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=abcce733adb71013997fcb84142a5454ef133616'/>
<id>urn:sha1:abcce733adb71013997fcb84142a5454ef133616</id>
<content type='text'>
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 &lt;a.s.protopopov@gmail.com&gt;
Signed-off-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Reviewed-by: David Ahern &lt;dsahern@gmail.com&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Reviewed-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
</feed>
