diff options
author | Mat Martineau <mathew.j.martineau@linux.intel.com> | 2020-01-09 07:59:15 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-09 18:41:41 -0800 |
commit | bf9765145b856fa2e238a5b8a54453795ba30ad6 (patch) | |
tree | 183b344b23e0e55bbb6582521eefdacb3d79d460 /include/trace/events/sock.h | |
parent | e9cdced78dc20c1592c1fb98ed064943007a46c5 (diff) | |
download | linux-bf9765145b856fa2e238a5b8a54453795ba30ad6.tar.gz |
sock: Make sk_protocol a 16-bit value
Match the 16-bit width of skbuff->protocol. Fills an 8-bit hole so sizeof(struct sock) does not change. Also take care of BPF field access for sk_type/sk_protocol. Both of them are now outside the bitfield, so we can use load instructions without further shifting/masking. v5 -> v6: - update eBPF accessors, too (Intel's kbuild test robot) v2 -> v3: - keep 'sk_type' 2 bytes aligned (Eric) v1 -> v2: - preserve sk_pacing_shift as bit field (Eric) Cc: Alexei Starovoitov <ast@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: bpf@vger.kernel.org Co-developed-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Co-developed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/trace/events/sock.h')
-rw-r--r-- | include/trace/events/sock.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/trace/events/sock.h b/include/trace/events/sock.h index 51fe9f6719eb..3ff12b90048d 100644 --- a/include/trace/events/sock.h +++ b/include/trace/events/sock.h @@ -147,7 +147,7 @@ TRACE_EVENT(inet_sock_set_state, __field(__u16, sport) __field(__u16, dport) __field(__u16, family) - __field(__u8, protocol) + __field(__u16, protocol) __array(__u8, saddr, 4) __array(__u8, daddr, 4) __array(__u8, saddr_v6, 16) |