Skip to content

Commit bb91de4

Browse files
committed
perf beauty: Update copy of linux/socket.h with the kernel sources
To pick the changes in: Fixes: d32f89d ("net: add accept helper not installing fd") Fixes: bc49d81 ("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>
1 parent bf9f243 commit bb91de4

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • tools/perf/trace/beauty/include/linux

tools/perf/trace/beauty/include/linux/socket.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,11 @@ struct ucred {
223223
* reuses AF_INET address family
224224
*/
225225
#define AF_XDP 44 /* XDP sockets */
226+
#define AF_MCTP 45 /* Management component
227+
* transport protocol
228+
*/
226229

227-
#define AF_MAX 45 /* For now.. */
230+
#define AF_MAX 46 /* For now.. */
228231

229232
/* Protocol families, same as address families. */
230233
#define PF_UNSPEC AF_UNSPEC
@@ -274,6 +277,7 @@ struct ucred {
274277
#define PF_QIPCRTR AF_QIPCRTR
275278
#define PF_SMC AF_SMC
276279
#define PF_XDP AF_XDP
280+
#define PF_MCTP AF_MCTP
277281
#define PF_MAX AF_MAX
278282

279283
/* Maximum queue length specifiable by listen. */
@@ -421,6 +425,9 @@ extern int __sys_accept4_file(struct file *file, unsigned file_flags,
421425
struct sockaddr __user *upeer_sockaddr,
422426
int __user *upeer_addrlen, int flags,
423427
unsigned long nofile);
428+
extern struct file *do_accept(struct file *file, unsigned file_flags,
429+
struct sockaddr __user *upeer_sockaddr,
430+
int __user *upeer_addrlen, int flags);
424431
extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr,
425432
int __user *upeer_addrlen, int flags);
426433
extern int __sys_socket(int family, int type, int protocol);

0 commit comments

Comments
 (0)