<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/samples/bpf, branch v5.11</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.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-12-10T22:13:43Z</updated>
<entry>
<title>samples/bpf: Fix possible hang in xdpsock with multiple threads</title>
<updated>2020-12-10T22:13:43Z</updated>
<author>
<name>Magnus Karlsson</name>
<email>magnus.karlsson@intel.com</email>
</author>
<published>2020-12-10T16:34:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=092fde0f863b72b67c4d6dc03844f5658fc00a35'/>
<id>urn:sha1:092fde0f863b72b67c4d6dc03844f5658fc00a35</id>
<content type='text'>
Fix a possible hang in xdpsock that can occur when using multiple
threads. In this case, one or more of the threads might get stuck in
the while-loop in tx_only after the user has signaled the main thread
to stop execution. In this case, no more Tx packets will be sent, so a
thread might get stuck in the aforementioned while-loop. Fix this by
introducing a test inside the while-loop to check if the benchmark has
been terminated. If so, return from the function.

Fixes: cd9e72b6f210 ("samples/bpf: xdpsock: Add option to specify batch size")
Signed-off-by: Magnus Karlsson &lt;magnus.karlsson@intel.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/20201210163407.22066-1-magnus.karlsson@gmail.com
</content>
</entry>
<entry>
<title>samples/bpf: Fix spelling mistake "recieving" -&gt; "receiving"</title>
<updated>2020-12-03T20:18:02Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2020-12-03T11:44:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2faa7328f53b36b2b171501154bba3fd66d8f5da'/>
<id>urn:sha1:2faa7328f53b36b2b171501154bba3fd66d8f5da</id>
<content type='text'>
There is a spelling mistake in an error message. Fix it.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Björn Töpel &lt;bjorn.topel@intel.com&gt;
Link: https://lore.kernel.org/bpf/20201203114452.1060017-1-colin.king@canonical.com
</content>
</entry>
<entry>
<title>samples/bpf: Sample application for eBPF load and socket creation split</title>
<updated>2020-12-03T18:37:59Z</updated>
<author>
<name>Mariusz Dudek</name>
<email>mariuszx.dudek@intel.com</email>
</author>
<published>2020-12-03T09:05:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3627d9702d789804a1f4c5a52eabdae810cd9def'/>
<id>urn:sha1:3627d9702d789804a1f4c5a52eabdae810cd9def</id>
<content type='text'>
Introduce a sample program to demonstrate the control and data
plane split. For the control plane part a new program called
xdpsock_ctrl_proc is introduced. For the data plane part, some code
was added to xdpsock_user.c to act as the data plane entity.

Application xdpsock_ctrl_proc works as control entity with sudo
privileges (CAP_SYS_ADMIN and CAP_NET_ADMIN are sufficient) and the
extended xdpsock as data plane entity with CAP_NET_RAW capability
only.

Usage example:

sudo ./samples/bpf/xdpsock_ctrl_proc -i &lt;interface&gt;

sudo ./samples/bpf/xdpsock -i &lt;interface&gt; -q &lt;queue_id&gt;
	-n &lt;interval&gt; -N -l -R

Signed-off-by: Mariusz Dudek &lt;mariuszx.dudek@intel.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Magnus Karlsson &lt;magnus.karlsson@intel.com&gt;
Link: https://lore.kernel.org/bpf/20201203090546.11976-3-mariuszx.dudek@intel.com
</content>
</entry>
<entry>
<title>bpf: samples: Do not touch RLIMIT_MEMLOCK</title>
<updated>2020-12-03T02:32:47Z</updated>
<author>
<name>Roman Gushchin</name>
<email>guro@fb.com</email>
</author>
<published>2020-12-01T21:59:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5b0764b2d34510bc87d33a580da98f77789ac36f'/>
<id>urn:sha1:5b0764b2d34510bc87d33a580da98f77789ac36f</id>
<content type='text'>
Since bpf is not using rlimit memlock for the memory accounting
and control, do not change the limit in sample applications.

Signed-off-by: Roman Gushchin &lt;guro@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Link: https://lore.kernel.org/bpf/20201201215900.3569844-35-guro@fb.com
</content>
</entry>
<entry>
<title>samples/bpf: Add option to set the busy-poll budget</title>
<updated>2020-11-30T23:09:26Z</updated>
<author>
<name>Björn Töpel</name>
<email>bjorn.topel@intel.com</email>
</author>
<published>2020-11-30T18:52:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=41bf900fe2a0cd56bdc3639ac73d509d52826149'/>
<id>urn:sha1:41bf900fe2a0cd56bdc3639ac73d509d52826149</id>
<content type='text'>
Support for the SO_BUSY_POLL_BUDGET setsockopt, via the batching
option ('b').

Signed-off-by: Björn Töpel &lt;bjorn.topel@intel.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Magnus Karlsson &lt;magnus.karlsson@intel.com&gt;
Link: https://lore.kernel.org/bpf/20201130185205.196029-11-bjorn.topel@gmail.com
</content>
</entry>
<entry>
<title>samples/bpf: Add busy-poll support to xdpsock</title>
<updated>2020-11-30T23:09:25Z</updated>
<author>
<name>Björn Töpel</name>
<email>bjorn.topel@intel.com</email>
</author>
<published>2020-11-30T18:52:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b35fc1482ceb2f36bedd1587c3cfea3167baa2f1'/>
<id>urn:sha1:b35fc1482ceb2f36bedd1587c3cfea3167baa2f1</id>
<content type='text'>
Add a new option to xdpsock, 'B', for busy-polling. This option will
also set the batching size, 'b' option, to the busy-poll budget.

Signed-off-by: Björn Töpel &lt;bjorn.topel@intel.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Magnus Karlsson &lt;magnus.karlsson@intel.com&gt;
Link: https://lore.kernel.org/bpf/20201130185205.196029-10-bjorn.topel@gmail.com
</content>
</entry>
<entry>
<title>samples/bpf: Use recvfrom() in xdpsock/l2fwd</title>
<updated>2020-11-30T23:09:25Z</updated>
<author>
<name>Björn Töpel</name>
<email>bjorn.topel@intel.com</email>
</author>
<published>2020-11-30T18:52:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=284cbc61f851bf86326b28acfe6d161691d4a4ed'/>
<id>urn:sha1:284cbc61f851bf86326b28acfe6d161691d4a4ed</id>
<content type='text'>
Start using recvfrom() the l2fwd scenario, instead of poll() which is
more expensive and need additional knobs for busy-polling.

Signed-off-by: Björn Töpel &lt;bjorn.topel@intel.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Magnus Karlsson &lt;magnus.karlsson@intel.com&gt;
Link: https://lore.kernel.org/bpf/20201130185205.196029-9-bjorn.topel@gmail.com
</content>
</entry>
<entry>
<title>samples/bpf: Use recvfrom() in xdpsock/rxdrop</title>
<updated>2020-11-30T23:09:25Z</updated>
<author>
<name>Björn Töpel</name>
<email>bjorn.topel@intel.com</email>
</author>
<published>2020-11-30T18:52:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f2d2728220ac6482c69c5f018ec09bafd688e7d1'/>
<id>urn:sha1:f2d2728220ac6482c69c5f018ec09bafd688e7d1</id>
<content type='text'>
Start using recvfrom() the rxdrop scenario.

Signed-off-by: Björn Töpel &lt;bjorn.topel@intel.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Magnus Karlsson &lt;magnus.karlsson@intel.com&gt;
Link: https://lore.kernel.org/bpf/20201130185205.196029-8-bjorn.topel@gmail.com
</content>
</entry>
<entry>
<title>samples: bpf: Remove bpf_load loader completely</title>
<updated>2020-11-27T03:33:36Z</updated>
<author>
<name>Daniel T. Lee</name>
<email>danieltimlee@gmail.com</email>
</author>
<published>2020-11-24T09:03:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ceb5dea5654354fb4e6e393c99f1d0bf4debab0e'/>
<id>urn:sha1:ceb5dea5654354fb4e6e393c99f1d0bf4debab0e</id>
<content type='text'>
Numerous refactoring that rewrites BPF programs written with bpf_load
to use the libbpf loader was finally completed, resulting in BPF
programs using bpf_load within the kernel being completely no longer
present.

This commit removes bpf_load, an outdated bpf loader that is difficult
to keep up with the latest kernel BPF and causes confusion.

Also, this commit removes the unused trace_helper and bpf_load from
samples/bpf target objects from Makefile.

Signed-off-by: Daniel T. Lee &lt;danieltimlee@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20201124090310.24374-8-danieltimlee@gmail.com
</content>
</entry>
<entry>
<title>samples: bpf: Fix lwt_len_hist reusing previous BPF map</title>
<updated>2020-11-27T03:33:36Z</updated>
<author>
<name>Daniel T. Lee</name>
<email>danieltimlee@gmail.com</email>
</author>
<published>2020-11-24T09:03:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0afe0a998c40085a6342e1aeb4c510cccba46caf'/>
<id>urn:sha1:0afe0a998c40085a6342e1aeb4c510cccba46caf</id>
<content type='text'>
Currently, lwt_len_hist's map lwt_len_hist_map is uses pinning, and the
map isn't cleared on test end. This leds to reuse of that map for
each test, which prevents the results of the test from being accurate.

This commit fixes the problem by removing of pinned map from bpffs.
Also, this commit add the executable permission to shell script
files.

Fixes: f74599f7c5309 ("bpf: Add tests and samples for LWT-BPF")
Signed-off-by: Daniel T. Lee &lt;danieltimlee@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20201124090310.24374-7-danieltimlee@gmail.com
</content>
</entry>
</feed>
