Subject: Re: [PATCH net-next] perf trace: fix MSG_SPLICE_PAGES build error

From: Jakub Kicinski <[email-masked]>
Date: Mon, 26 Jun 2023 14:27:34 -0700

On Mon, 26 Jun 2023 11:02:39 +0200 Matthieu Baerts wrote:
> Our MPTCP CI and Stephen got this error:
> 
>     In file included from builtin-trace.c:907:
>     trace/beauty/msg_flags.c: In function 'syscall_arg__scnprintf_msg_flags':
>     trace/beauty/msg_flags.c:28:21: error: 'MSG_SPLICE_PAGES' undeclared (first use in this function)
>        28 |         if (flags & MSG_##n) {           |                     ^~~~
>     trace/beauty/msg_flags.c:50:9: note: in expansion of macro 'P_MSG_FLAG'
>        50 |         P_MSG_FLAG(SPLICE_PAGES);
>           |         ^~~~~~~~~~
>     trace/beauty/msg_flags.c:28:21: note: each undeclared identifier is reported only once for each function it appears in
>        28 |         if (flags & MSG_##n) {           |                     ^~~~
>     trace/beauty/msg_flags.c:50:9: note: in expansion of macro 'P_MSG_FLAG'
>        50 |         P_MSG_FLAG(SPLICE_PAGES);
>           |         ^~~~~~~~~~
> 
> The fix is similar to what was done with MSG_FASTOPEN: the new macro is
> defined if it is not defined in the system headers.
> 
> Fixes: b848b26c6672 ("net: Kill MSG_SENDPAGE_NOTLAST")
> Reported-by: Stephen Rothwell <[email-masked]>
> Closes: https://lore.kernel.org/r/[email-masked]/
> Signed-off-by: Matthieu Baerts <[email-masked]>
> ---
> 
> Notes:
>     @David: I solved it like that in MPTCP tree. Does it work for you too?
> 
>     I guess tools/perf/trace/beauty/include/linux/socket.h file still needs
>     to be updated, not just to add MSG_SPLICE_PAGES but also other
>     modifications done in this file. Maybe best to sync with Arnaldo because
>     he might do it soon during the coming merge window I guess.
> 
> Cc: David Howells <[email-masked]>
> Cc: Arnaldo Carvalho de Melo <[email-masked]>

Hi Arnaldo, are you okay with us taking this into the networking tree?
Or do you prefer to sync the header after everything lands in Linus's
tree?