diff options
author | Arnaldo Carvalho de Melo | 2021-09-06 11:57:46 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo | 2021-09-10 10:42:49 -0300 |
commit | bb91de44693b1c10fe2f9e668506b01e88efed0e (patch) | |
tree | 6fa510538c9bcdc104f2f90bad3f9e84d6903b9d | |
parent | bf9f243f23e6623f310ba03fbb14e10ec3a61290 (diff) |
perf beauty: Update copy of linux/socket.h with the kernel sources
To pick the changes in:
Fixes: d32f89da7fa8ccc8 ("net: add accept helper not installing fd")
Fixes: bc49d8169aa72295 ("mctp: Add MCTP base")
This automagically adds support for the AF_MCTP protocol domain:
$ tools/perf/trace/beauty/socket.sh > before
$ cp include/linux/socket.h tools/perf/trace/beauty/include/linux/socket.h
$ tools/perf/trace/beauty/socket.sh > after
$ diff -u before after
--- before 2021-09-06 11:57:14.972747200 -0300
+++ after 2021-09-06 11:57:30.541920222 -0300
@@ -44,4 +44,5 @@
[42] = "QIPCRTR",
[43] = "SMC",
[44] = "XDP",
+ [45] = "MCTP",
};
$
This will allow 'perf trace' to translate 45 into "MCTP" as is done with
the other domains:
# perf trace -e socket*
0.000 chronyd/1029 socket(family: INET, type: DGRAM|CLOEXEC|NONBLOCK, protocol: IP) = 4
^C#
This addresses this perf build warning:
Warning: Kernel ABI header at 'tools/perf/trace/beauty/include/linux/socket.h' differs from latest version at 'include/linux/socket.h'
diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h
Cc: David S. Miller <davem@davemloft.net>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jeremy Kerr <jk@codeconstruct.com.au>
Cc: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/trace/beauty/include/linux/socket.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/trace/beauty/include/linux/socket.h b/tools/perf/trace/beauty/include/linux/socket.h index 0d8e3dcb7f88..041d6032a348 100644 --- a/tools/perf/trace/beauty/include/linux/socket.h +++ b/tools/perf/trace/beauty/include/linux/socket.h @@ -223,8 +223,11 @@ struct ucred { * reuses AF_INET address family */ #define AF_XDP 44 /* XDP sockets */ +#define AF_MCTP 45 /* Management component + * transport protocol + */ -#define AF_MAX 45 /* For now.. */ +#define AF_MAX 46 /* For now.. */ /* Protocol families, same as address families. */ #define PF_UNSPEC AF_UNSPEC @@ -274,6 +277,7 @@ struct ucred { #define PF_QIPCRTR AF_QIPCRTR #define PF_SMC AF_SMC #define PF_XDP AF_XDP +#define PF_MCTP AF_MCTP #define PF_MAX AF_MAX /* Maximum queue length specifiable by listen. */ @@ -421,6 +425,9 @@ extern int __sys_accept4_file(struct file *file, unsigned file_flags, struct sockaddr __user *upeer_sockaddr, int __user *upeer_addrlen, int flags, unsigned long nofile); +extern struct file *do_accept(struct file *file, unsigned file_flags, + struct sockaddr __user *upeer_sockaddr, + int __user *upeer_addrlen, int flags); extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr, int __user *upeer_addrlen, int flags); extern int __sys_socket(int family, int type, int protocol); |