Re: [PATCH v4 net-next] net: socket: use BIT() for MSG_*
On Tue, Mar 9, 2021 at 5:29 PM Menglong Dong wrote: > On Wed, Feb 24, 2021 at 4:30 AM Jakub Kicinski wrote: > > > ... > > Please repost when net-next reopens after 5.12-rc1 is cut. > > > > Look out for the announcement on the mailing list or check: > > http://vger.kernel.org/~davem/net-next.html > > > > RFC patches sent for review only are obviously welcome at any time. > > Is 'net-next' open? Can I resend this patch now? It seems that a long > time has passed. Should be. Usually the merge window takes from the last release (v5.11) till the first rc of the new cycle (v5.12-rc1). Now we are more than a week after v5.12-rc1. -- With Best Regards, Andy Shevchenko
Re: [PATCH v4 net-next] net: socket: use BIT() for MSG_*
Hello! On Wed, Feb 24, 2021 at 4:30 AM Jakub Kicinski wrote: > ... > Please repost when net-next reopens after 5.12-rc1 is cut. > > Look out for the announcement on the mailing list or check: > http://vger.kernel.org/~davem/net-next.html > > RFC patches sent for review only are obviously welcome at any time. Is 'net-next' open? Can I resend this patch now? It seems that a long time has passed. Thanks~ Menglong Dong
Re: [PATCH v4 net-next] net: socket: use BIT() for MSG_*
On Wed, 17 Feb 2021 14:54:27 +0800 menglong8.d...@gmail.com wrote: > From: Menglong Dong > > The bit mask for MSG_* seems a little confused here. Replace it > with BIT() to make it clear to understand. > > Signed-off-by: Menglong Dong # Form letter - net-next is closed We have already sent the networking pull request for 5.12 and therefore net-next is closed for new drivers, features, code refactoring and optimizations. We are currently accepting bug fixes only. Please repost when net-next reopens after 5.12-rc1 is cut. Look out for the announcement on the mailing list or check: http://vger.kernel.org/~davem/net-next.html RFC patches sent for review only are obviously welcome at any time.
[PATCH v4 net-next] net: socket: use BIT() for MSG_*
From: Menglong Dong The bit mask for MSG_* seems a little confused here. Replace it with BIT() to make it clear to understand. Signed-off-by: Menglong Dong --- v4: - CC netdev v3: - move changelog here v2: - use BIT() instead of BIT_MASK() --- include/linux/socket.h | 71 ++ 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/include/linux/socket.h b/include/linux/socket.h index 385894b4a8bb..e88859f38cd0 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -283,42 +283,45 @@ struct ucred { Added those for 1003.1g not all are supported yet */ -#define MSG_OOB1 -#define MSG_PEEK 2 -#define MSG_DONTROUTE 4 -#define MSG_TRYHARD 4 /* Synonym for MSG_DONTROUTE for DECnet */ -#define MSG_CTRUNC 8 -#define MSG_PROBE 0x10/* Do not send. Only probe path f.e. for MTU */ -#define MSG_TRUNC 0x20 -#define MSG_DONTWAIT 0x40/* Nonblocking io*/ -#define MSG_EOR 0x80 /* End of record */ -#define MSG_WAITALL0x100 /* Wait for a full request */ -#define MSG_FIN 0x200 -#define MSG_SYN0x400 -#define MSG_CONFIRM0x800 /* Confirm path validity */ -#define MSG_RST0x1000 -#define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */ -#define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ -#define MSG_MORE 0x8000 /* Sender will send more */ -#define MSG_WAITFORONE 0x1 /* recvmmsg(): block until 1+ packets avail */ -#define MSG_SENDPAGE_NOPOLICY 0x1 /* sendpage() internal : do no apply policy */ -#define MSG_SENDPAGE_NOTLAST 0x2 /* sendpage() internal : not the last page */ -#define MSG_BATCH 0x4 /* sendmmsg(): more messages coming */ -#define MSG_EOF MSG_FIN -#define MSG_NO_SHARED_FRAGS 0x8 /* sendpage() internal : page frags are not shared */ -#define MSG_SENDPAGE_DECRYPTED 0x10 /* sendpage() internal : page may carry - * plain text and require encryption - */ - -#define MSG_ZEROCOPY 0x400 /* Use user data in kernel path */ -#define MSG_FASTOPEN 0x2000 /* Send data in TCP SYN */ -#define MSG_CMSG_CLOEXEC 0x4000/* Set close_on_exec for file - descriptor received through - SCM_RIGHTS */ +#define MSG_OOBBIT(0) +#define MSG_PEEK BIT(1) +#define MSG_DONTROUTE BIT(2) +#define MSG_TRYHARDBIT(2) /* Synonym for MSG_DONTROUTE for DECnet */ +#define MSG_CTRUNC BIT(3) +#define MSG_PROBE BIT(4) /* Do not send. Only probe path f.e. for MTU */ +#define MSG_TRUNC BIT(5) +#define MSG_DONTWAIT BIT(6) /* Nonblocking io */ +#define MSG_EORBIT(7) /* End of record*/ +#define MSG_WAITALLBIT(8) /* Wait for a full request */ +#define MSG_FINBIT(9) +#define MSG_SYNBIT(10) +#define MSG_CONFIRMBIT(11) /* Confirm path validity*/ +#define MSG_RSTBIT(12) +#define MSG_ERRQUEUE BIT(13) /* Fetch message from error queue */ +#define MSG_NOSIGNAL BIT(14) /* Do not generate SIGPIPE */ +#define MSG_MORE BIT(15) /* Sender will send more*/ +#define MSG_WAITFORONE BIT(16) /* recvmmsg(): block until 1+ packets avail */ +#define MSG_SENDPAGE_NOPOLICY BIT(16) /* sendpage() internal : do no apply policy */ +#define MSG_SENDPAGE_NOTLAST BIT(17) /* sendpage() internal : not the last page */ +#define MSG_BATCH BIT(18) /* sendmmsg(): more messages coming */ +#define MSG_EOFMSG_FIN +#define MSG_NO_SHARED_FRAGSBIT(19) /* sendpage() internal : page frags +* are not shared +*/ +#define MSG_SENDPAGE_DECRYPTED BIT(20) /* sendpage() internal : page may carry +* plain text and require encryption +*/ + +#define MSG_ZEROCOPY BIT(26) /* Use user data in kernel path */ +#define MSG_FASTOPEN BIT(29) /* Send data in TCP SYN */ +#define MSG_CMSG_CLOEXEC BIT(30) /* Set close_on_exec for file +* descriptor received through +* SCM_RIGHTS +*/ #if defined(CONFIG_COMPAT) -#define MSG_CMSG_COMPAT0x8000 /* This message needs 32 bit fixups */ +#define MSG_CMSG_COMPATBIT(31) /* This message needs 32 bit fixups */ #else -#define MSG_CMSG_COMPAT0 /* We never have 32 bit fixups */ +#define MSG_CMSG_COMPAT0 /* We never have 32 bit fixups */ #endif -- 2.30.0