]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: extend bpf tunnel test with tso
authorWillem de Bruijn <willemb@google.com>
Fri, 22 Mar 2019 18:32:53 +0000 (14:32 -0400)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 22 Mar 2019 20:52:44 +0000 (13:52 -0700)
commit373c3dcc57637e19c131a7521a8c83be50ae397a
treebf5124afef654cef89cdbfa723703dfff72ff1db
parentd115cb87be65b0e2ba2f3048c53d6ec0a62ac961
selftests/bpf: extend bpf tunnel test with tso

Segmentation offload takes a longer path. Verify that the feature
works with large packets.

The test succeeds if not setting dodgy in bpf_skb_adjust_room, as veth
TSO is permissive.

If not setting SKB_GSO_DODGY, this enables tunneled TSO offload on
supporting NICs.

The feature sets SKB_GSO_DODGY because the caller is untrusted. As a
result the packets traverse through the gso stack at least up to TCP.
And fail the gso_type validation, such as the skb->encapsulation check
in gre_gso_segment and the gso_type checks introduced in commit
b0c2e6c67265 ("gso: validate gso_type on ipip style tunnel").

This will be addressed in a follow-on feature patch. In the meantime,
disable the new gso tests.

Changes v1->v2:
  - not all netcat versions support flag '-q', use timeout instead

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_tc_tunnel.sh