Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Unverified Commit 69fbbdf2 authored by Willem de Bruijn's avatar Willem de Bruijn Committed by basamaryan
Browse files

UPSTREAM: bpf: Add gso_size to __sk_buff



BPF programs may want to know whether an skb is gso. The canonical
answer is skb_is_gso(skb), which tests that gso_size != 0.

Expose this field in the same manner as gso_segs. That field itself
is not a sufficient signal, as the comment in skb_shared_info makes
clear: gso_segs may be zero, e.g., from dodgy sources.

Also prepare net/bpf/test_run for upcoming BPF_PROG_TEST_RUN tests
of the feature.

Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200303200503.226217-2-willemdebruijn.kernel@gmail.com



Note: backported without changes to net/bpf/test_run.c

(cherry picked from commit cf62089b0edd7e74a1f474844b4d9f7b5697fb5c)
Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
Change-Id: I1f7d1b49e5ac35f18546d468e3847deaae5056ca
parent f0e87199
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment