<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/bpf/test_sockmap.c, branch linux-5.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-01-28T23:09:26Z</updated>
<entry>
<title>selftests: bpf: remove duplicated include</title>
<updated>2019-01-28T23:09:26Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2019-01-25T02:46:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cdd7b40642582f5130ea5ec20432175a70c8933e'/>
<id>urn:sha1:cdd7b40642582f5130ea5ec20432175a70c8933e</id>
<content type='text'>
Remove duplicated include.

Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf: test_sockmap, add options for msg_pop_data() helper</title>
<updated>2018-11-28T21:07:57Z</updated>
<author>
<name>John Fastabend</name>
<email>john.fastabend@gmail.com</email>
</author>
<published>2018-11-26T22:16:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1ade9abadfca0250c8256bb222a1cd5cc5fa8bbc'/>
<id>urn:sha1:1ade9abadfca0250c8256bb222a1cd5cc5fa8bbc</id>
<content type='text'>
Similar to msg_pull_data and msg_push_data add a set of options to
have msg_pop_data() exercised.

Signed-off-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf: test_sockmap add options to use msg_push_data</title>
<updated>2018-10-20T19:37:12Z</updated>
<author>
<name>John Fastabend</name>
<email>john.fastabend@gmail.com</email>
</author>
<published>2018-10-20T02:56:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=84fbfe026acaa6d91e2f71f1635992bf472e2496'/>
<id>urn:sha1:84fbfe026acaa6d91e2f71f1635992bf472e2496</id>
<content type='text'>
Add options to run msg_push_data, this patch creates two more flags
in test_sockmap that can be used to specify the offset and length
of bytes to be added. The new options are --txmsg_start_push to
specify where bytes should be inserted and --txmsg_end_push to
specify how many bytes. This is analagous to the options that are
used to pull data, --txmsg_start and --txmsg_end.

In addition to adding the options tests are added to the test
suit to run the tests similar to what was done for msg_pull_data.

Signed-off-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf: sockmap, add msg_peek tests to test_sockmap</title>
<updated>2018-10-17T00:30:32Z</updated>
<author>
<name>John Fastabend</name>
<email>john.fastabend@gmail.com</email>
</author>
<published>2018-10-16T18:08:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=753fb2ee09345e0730e610b2ee3a01964fe22a63'/>
<id>urn:sha1:753fb2ee09345e0730e610b2ee3a01964fe22a63</id>
<content type='text'>
Add tests that do a MSG_PEEK recv followed by a regular receive to
test flag support.

Signed-off-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf, tls: add tls header to tools infrastructure</title>
<updated>2018-10-16T15:10:01Z</updated>
<author>
<name>Daniel Borkmann</name>
<email>daniel@iogearbox.net</email>
</author>
<published>2018-10-16T13:59:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=421f4292f46e871cdcf8bdc3e6fdfcefe2e81a9d'/>
<id>urn:sha1:421f4292f46e871cdcf8bdc3e6fdfcefe2e81a9d</id>
<content type='text'>
Andrey reported a build error for the BPF kselftest suite when compiled on
a machine which does not have tls related header bits installed natively:

  test_sockmap.c:120:23: fatal error: linux/tls.h: No such file or directory
   #include &lt;linux/tls.h&gt;
                         ^
  compilation terminated.

Fix it by adding the header to the tools include infrastructure and add
definitions such as SOL_TLS that could potentially be missing.

Fixes: e9dd904708c4 ("bpf: add tls support for testing in test_sockmap")
Reported-by: Andrey Ignatov &lt;rdna@fb.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf: add tls support for testing in test_sockmap</title>
<updated>2018-10-15T19:23:19Z</updated>
<author>
<name>John Fastabend</name>
<email>john.fastabend@gmail.com</email>
</author>
<published>2018-10-13T00:46:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e9dd904708c463ff57d019f4482c48d057fa4d7e'/>
<id>urn:sha1:e9dd904708c463ff57d019f4482c48d057fa4d7e</id>
<content type='text'>
This adds a --ktls option to test_sockmap in order to enable the
combination of ktls and sockmap to run, which makes for another
batch of 648 test cases for both in combination.

Signed-off-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf: use --cgroup in test_suite if supplied</title>
<updated>2018-08-29T15:29:55Z</updated>
<author>
<name>John Fastabend</name>
<email>john.fastabend@gmail.com</email>
</author>
<published>2018-08-28T16:10:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7d2c6cfc5411207f1094e7ca5e63e711dc76d1ff'/>
<id>urn:sha1:7d2c6cfc5411207f1094e7ca5e63e711dc76d1ff</id>
<content type='text'>
If the user supplies a --cgroup value in the arguments when running
the test_suite go ahaead and run the self tests there. I use this
to test with multiple cgroup users.

Signed-off-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf: sockmap test remove shutdown() calls</title>
<updated>2018-08-29T15:29:54Z</updated>
<author>
<name>John Fastabend</name>
<email>john.fastabend@gmail.com</email>
</author>
<published>2018-08-28T16:10:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b5d83fec732dc98e37b22e8b20a7943aa0bb55d9'/>
<id>urn:sha1:b5d83fec732dc98e37b22e8b20a7943aa0bb55d9</id>
<content type='text'>
Currently, we do a shutdown(sk, SHUT_RDWR) on both peer sockets and
a shutdown on the sender as well. However, this is incorrect and can
occasionally cause issues if you happen to have bad timing. First
peer1 or peer2 may still be in use depending on the test and timing.
Second we really should only be closing the read side and/or write
side depending on if the test is receiving or sending.

But, really none of this is needed just remove the shutdown calls.

Signed-off-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf, sockmap: fix cork timeout for select due to epipe</title>
<updated>2018-08-08T19:06:17Z</updated>
<author>
<name>Daniel Borkmann</name>
<email>daniel@iogearbox.net</email>
</author>
<published>2018-08-08T17:23:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3c6ed988fd8b66eec8e5ab2b624818865d2712ca'/>
<id>urn:sha1:3c6ed988fd8b66eec8e5ab2b624818865d2712ca</id>
<content type='text'>
I ran into the same issue as a009f1f396d0 ("selftests/bpf:
test_sockmap, timing improvements") where I had a broken
pipe error on the socket due to remote end timing out on
select and then shutting down it's sockets while the other
side was still sending. We may need to do a bigger rework
in general on the test_sockmap.c, but for now increase it
to a more suitable timeout.

Fixes: a18fda1a62c3 ("bpf: reduce runtime of test_sockmap tests")
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools/bpf: fix test_sockmap failure</title>
<updated>2018-06-21T22:31:42Z</updated>
<author>
<name>Yonghong Song</name>
<email>yhs@fb.com</email>
</author>
<published>2018-06-21T17:02:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3e1a61b30c6a3a31314570c0c418a6bf84b056b1'/>
<id>urn:sha1:3e1a61b30c6a3a31314570c0c418a6bf84b056b1</id>
<content type='text'>
On one of our production test machine, when running
bpf selftest test_sockmap, I got the following error:
  # sudo ./test_sockmap
  libbpf: failed to create map (name: 'sock_map'): Operation not permitted
  libbpf: failed to load object 'test_sockmap_kern.o'
  libbpf: Can't get the 0th fd from program sk_skb1: only -1 instances
  ......
  load_bpf_file: (-1) Operation not permitted
  ERROR: (-1) load bpf failed

The error is due to not-big-enough rlimit
  struct rlimit r = {10 * 1024 * 1024, RLIM_INFINITY};

The test already includes "bpf_rlimit.h", which sets current
and max rlimit to RLIM_INFINITY. Let us just use it.

Signed-off-by: Yonghong Song &lt;yhs@fb.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
</feed>
