aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_tc_tunnel.sh
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2019-03-22 14:32:48 -0400
committerAlexei Starovoitov <ast@kernel.org>2019-03-22 13:52:44 -0700
commit908adce6465394ea4a09c144507a40848e1d7db5 (patch)
tree66de746db63360ef93f6903622771305168f53c0 /tools/testing/selftests/bpf/test_tc_tunnel.sh
parentselftests: bpf: modify urandom_read and link it non-statically (diff)
downloadlinux-dev-908adce6465394ea4a09c144507a40848e1d7db5.tar.xz
linux-dev-908adce6465394ea4a09c144507a40848e1d7db5.zip
bpf: in bpf_skb_adjust_room avoid copy in tx fast path
bpf_skb_adjust_room calls skb_cow on grow. This expensive operation can be avoided in the fast path when the only other clone has released the header. This is the common case for TCP, where one headerless clone is kept on the retransmit queue. It is safe to do so even when touching the gso fields in skb_shinfo. Regular tunnel encap with iptunnel_handle_offloads takes the same optimization. The tcp stack unclones in the unlikely case that it accesses these fields through headerless clones packets on the retransmit queue (see __tcp_retransmit_skb). If any other clones are present, e.g., from packet sockets, skb_cow_head returns the same value as skb_cow(). Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/test_tc_tunnel.sh')
0 files changed, 0 insertions, 0 deletions