<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/bpf/test_tc_tunnel.sh, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2022-10-21T02:05:50Z</updated>
<entry>
<title>selftests/bpf: fix missing BPF object files</title>
<updated>2022-10-21T02:05:50Z</updated>
<author>
<name>Wang Yufen</name>
<email>wangyufen@huawei.com</email>
</author>
<published>2022-10-20T03:05:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=98af3746026c3eccb51b43181c41e001fe73f7af'/>
<id>urn:sha1:98af3746026c3eccb51b43181c41e001fe73f7af</id>
<content type='text'>
After commit afef88e65554 ("selftests/bpf: Store BPF object files with
.bpf.o extension"), we should use *.bpf.o instead of *.o.

In addition, use the BPF_FILE variable to save the BPF object file name,
which can be better identified and modified.

Fixes: afef88e65554 ("selftests/bpf: Store BPF object files with .bpf.o extension")
Signed-off-by: Wang Yufen &lt;wangyufen@huawei.com&gt;
Acked-by: Stanislav Fomichev &lt;sdf@google.com&gt;
Link: https://lore.kernel.org/r/1666235134-562-1-git-send-email-wangyufen@huawei.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests, bpf: test_tc_tunnel.sh nc: Cannot use -p and -l</title>
<updated>2021-07-20T20:43:00Z</updated>
<author>
<name>Vincent Li</name>
<email>vincent.mc.li@gmail.com</email>
</author>
<published>2021-07-19T22:30:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=875fc315dbc3cdd3a5cab57b2bb7c1976ec8df44'/>
<id>urn:sha1:875fc315dbc3cdd3a5cab57b2bb7c1976ec8df44</id>
<content type='text'>
When run test_tc_tunnel.sh, it complains following error

ipip
encap 192.168.1.1 to 192.168.1.2, type ipip, mac none len 100
test basic connectivity
nc: cannot use -p and -l

nc man page has:

     -l  Listen for an incoming connection rather than initiating
         a connection to a remote host.Cannot be used together with
         any of the options -psxz. Additionally, any timeouts specified
         with the -w option are ignored.

Correct nc in server_listen().

Signed-off-by: Vincent Li &lt;vincent.mc.li@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Link: https://lore.kernel.org/bpf/20210719223022.66681-1-vincent.mc.li@gmail.com
</content>
</entry>
<entry>
<title>selftests, bpf: Extend test_tc_tunnel test with vxlan</title>
<updated>2021-03-05T22:58:59Z</updated>
<author>
<name>Xuesen Huang</name>
<email>huangxuesen@kuaishou.com</email>
</author>
<published>2021-03-05T12:33:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=256becd450172eec74566f1aa7819ce80181d7e1'/>
<id>urn:sha1:256becd450172eec74566f1aa7819ce80181d7e1</id>
<content type='text'>
Add BPF_F_ADJ_ROOM_ENCAP_L2_ETH flag to the existing tests which
encapsulates the ethernet as the inner l2 header.

Update a vxlan encapsulation test case.

Signed-off-by: Xuesen Huang &lt;huangxuesen@kuaishou.com&gt;
Signed-off-by: Li Wang &lt;wangli09@kuaishou.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Link: https://lore.kernel.org/bpf/20210305123347.15311-1-hxseverything@gmail.com
</content>
</entry>
<entry>
<title>selftests, bpf: Fix test_tc_tunnel hanging</title>
<updated>2019-11-18T20:31:49Z</updated>
<author>
<name>Jiri Benc</name>
<email>jbenc@redhat.com</email>
</author>
<published>2019-11-15T12:43:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3b054b7133b4ad93671c82e8d6185258e3f1a7a5'/>
<id>urn:sha1:3b054b7133b4ad93671c82e8d6185258e3f1a7a5</id>
<content type='text'>
When run_kselftests.sh is run, it hangs after test_tc_tunnel.sh. The reason
is test_tc_tunnel.sh ensures the server ('nc -l') is run all the time,
starting it again every time it is expected to terminate. The exception is
the final client_connect: the server is not started anymore, which ensures
no process is kept running after the test is finished.

For a sit test, though, the script is terminated prematurely without the
final client_connect and the 'nc' process keeps running. This in turn causes
the run_one function in kselftest/runner.sh to hang forever, waiting for the
runaway process to finish.

Ensure a remaining server is terminated on cleanup.

Fixes: f6ad6accaa99 ("selftests/bpf: expand test_tc_tunnel with SIT encap")
Signed-off-by: Jiri Benc &lt;jbenc@redhat.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Link: https://lore.kernel.org/bpf/60919291657a9ee89c708d8aababc28ebe1420be.1573821780.git.jbenc@redhat.com
</content>
</entry>
<entry>
<title>selftests/bpf: expand test_tc_tunnel with SIT encap</title>
<updated>2019-04-23T23:32:26Z</updated>
<author>
<name>Willem de Bruijn</name>
<email>willemb@google.com</email>
</author>
<published>2019-04-23T18:43:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f6ad6accaa99dfa7462d18687961b8421d707c1e'/>
<id>urn:sha1:f6ad6accaa99dfa7462d18687961b8421d707c1e</id>
<content type='text'>
So far, all BPF tc tunnel testcases encapsulate in the same network
protocol. Add an encap testcase that requires updating skb-&gt;protocol.

The 6in4 tunnel encapsulates an IPv6 packet inside an IPv4 tunnel.
Verify that bpf_skb_net_grow correctly updates skb-&gt;protocol to
select the right protocol handler in __netif_receive_skb_core.

The BPF program should also manually update the link layer header to
encode the right network protocol.

Changes v1-&gt;v2
  - improve documentation of non-obvious logic

Signed-off-by: Willem de Bruijn &lt;willemb@google.com&gt;
Tested-by: Alan Maguire &lt;alan.maguire@oracle.com&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>selftests_bpf: add L2 encap to test_tc_tunnel</title>
<updated>2019-04-11T20:50:57Z</updated>
<author>
<name>Alan Maguire</name>
<email>alan.maguire@oracle.com</email>
</author>
<published>2019-04-09T14:06:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3ec61df82ba0c2d2455da838ee46bf60f2256b56'/>
<id>urn:sha1:3ec61df82ba0c2d2455da838ee46bf60f2256b56</id>
<content type='text'>
Update test_tc_tunnel to verify adding inner L2 header
encapsulation (an MPLS label or ethernet header) works.

Signed-off-by: Alan Maguire &lt;alan.maguire@oracle.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>selftests_bpf: extend test_tc_tunnel for UDP encap</title>
<updated>2019-04-11T20:50:56Z</updated>
<author>
<name>Alan Maguire</name>
<email>alan.maguire@oracle.com</email>
</author>
<published>2019-04-09T14:06:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=166b5a7f2ca3803ab0a7bb33ac2300e616de2470'/>
<id>urn:sha1:166b5a7f2ca3803ab0a7bb33ac2300e616de2470</id>
<content type='text'>
commit 868d523535c2 ("bpf: add bpf_skb_adjust_room encap flags")
introduced support to bpf_skb_adjust_room for GSO-friendly GRE
and UDP encapsulation and later introduced associated test_tc_tunnel
tests.  Here those tests are extended to cover UDP encapsulation also.

Signed-off-by: Alan Maguire &lt;alan.maguire@oracle.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf: test_tc_tunnel.sh needs reverse path filtering disabled</title>
<updated>2019-03-25T14:01:54Z</updated>
<author>
<name>Alan Maguire</name>
<email>alan.maguire@oracle.com</email>
</author>
<published>2019-03-25T09:36:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0c4ea7f87abbdb56df616678bc23f10e51a0b4f8'/>
<id>urn:sha1:0c4ea7f87abbdb56df616678bc23f10e51a0b4f8</id>
<content type='text'>
test_tc_tunnel.sh sets up a pair of namespaces connected by a
veth pair to verify encap/decap using bpf_skb_adjust_room.  In
testing this, it uses tunnel links as the peer of the bpf-based
encap/decap.  However because the same IP header is used for inner
and outer IP, when packets arrive at the tunnel interface they will
be dropped by reverse path filtering as those packets are expected
on the veth interface (where the destination IP of the decapped
packet is configured).

To avoid this, ensure reverse path filtering is disabled for the
namespace using tunneling.

Fixes: 98cdabcd0798 ("selftests/bpf: bpf tunnel encap test")
Signed-off-by: Alan Maguire &lt;alan.maguire@oracle.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: convert bpf tunnel test to encap modes</title>
<updated>2019-03-22T20:52:45Z</updated>
<author>
<name>Willem de Bruijn</name>
<email>willemb@google.com</email>
</author>
<published>2019-03-22T18:33:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=75a1a9fa2e20de6319a19161ce4e2e1817d70e28'/>
<id>urn:sha1:75a1a9fa2e20de6319a19161ce4e2e1817d70e28</id>
<content type='text'>
Make the tests correctly annotate skbs with tunnel metadata.

This makes the gso tests succeed. Enable them.

Signed-off-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: convert bpf tunnel test to BPF_F_ADJ_ROOM_FIXED_GSO</title>
<updated>2019-03-22T20:52:45Z</updated>
<author>
<name>Willem de Bruijn</name>
<email>willemb@google.com</email>
</author>
<published>2019-03-22T18:32:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=94f16813e1b297d31f8fe6217cd9be19e080f998'/>
<id>urn:sha1:94f16813e1b297d31f8fe6217cd9be19e080f998</id>
<content type='text'>
Lower route MTU to ensure packets fit in device MTU after encap, then
skip the gso_size changes.

Signed-off-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
</feed>
