Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "net: socket: use BIT() for MSG_*"

This reverts commit 0bb3262c0248d44aea3be31076f44beb82a7b120.

Breaks things on mips64/qemu

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

+33 -36
+33 -36
include/linux/socket.h
··· 283 283 Added those for 1003.1g not all are supported yet 284 284 */ 285 285 286 - #define MSG_OOB BIT(0) 287 - #define MSG_PEEK BIT(1) 288 - #define MSG_DONTROUTE BIT(2) 289 - #define MSG_TRYHARD BIT(2) /* Synonym for MSG_DONTROUTE for DECnet */ 290 - #define MSG_CTRUNC BIT(3) 291 - #define MSG_PROBE BIT(4) /* Do not send. Only probe path f.e. for MTU */ 292 - #define MSG_TRUNC BIT(5) 293 - #define MSG_DONTWAIT BIT(6) /* Nonblocking io */ 294 - #define MSG_EOR BIT(7) /* End of record */ 295 - #define MSG_WAITALL BIT(8) /* Wait for a full request */ 296 - #define MSG_FIN BIT(9) 297 - #define MSG_SYN BIT(10) 298 - #define MSG_CONFIRM BIT(11) /* Confirm path validity */ 299 - #define MSG_RST BIT(12) 300 - #define MSG_ERRQUEUE BIT(13) /* Fetch message from error queue */ 301 - #define MSG_NOSIGNAL BIT(14) /* Do not generate SIGPIPE */ 302 - #define MSG_MORE BIT(15) /* Sender will send more */ 303 - #define MSG_WAITFORONE BIT(16) /* recvmmsg(): block until 1+ packets avail */ 304 - #define MSG_SENDPAGE_NOPOLICY BIT(16) /* sendpage() internal : do no apply policy */ 305 - #define MSG_SENDPAGE_NOTLAST BIT(17) /* sendpage() internal : not the last page */ 306 - #define MSG_BATCH BIT(18) /* sendmmsg(): more messages coming */ 307 - #define MSG_EOF MSG_FIN 308 - #define MSG_NO_SHARED_FRAGS BIT(19) /* sendpage() internal : page frags 309 - * are not shared 310 - */ 311 - #define MSG_SENDPAGE_DECRYPTED BIT(20) /* sendpage() internal : page may carry 312 - * plain text and require encryption 313 - */ 286 + #define MSG_OOB 1 287 + #define MSG_PEEK 2 288 + #define MSG_DONTROUTE 4 289 + #define MSG_TRYHARD 4 /* Synonym for MSG_DONTROUTE for DECnet */ 290 + #define MSG_CTRUNC 8 291 + #define MSG_PROBE 0x10 /* Do not send. Only probe path f.e. for MTU */ 292 + #define MSG_TRUNC 0x20 293 + #define MSG_DONTWAIT 0x40 /* Nonblocking io */ 294 + #define MSG_EOR 0x80 /* End of record */ 295 + #define MSG_WAITALL 0x100 /* Wait for a full request */ 296 + #define MSG_FIN 0x200 297 + #define MSG_SYN 0x400 298 + #define MSG_CONFIRM 0x800 /* Confirm path validity */ 299 + #define MSG_RST 0x1000 300 + #define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */ 301 + #define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ 302 + #define MSG_MORE 0x8000 /* Sender will send more */ 303 + #define MSG_WAITFORONE 0x10000 /* recvmmsg(): block until 1+ packets avail */ 304 + #define MSG_SENDPAGE_NOPOLICY 0x10000 /* sendpage() internal : do no apply policy */ 305 + #define MSG_SENDPAGE_NOTLAST 0x20000 /* sendpage() internal : not the last page */ 306 + #define MSG_BATCH 0x40000 /* sendmmsg(): more messages coming */ 307 + #define MSG_EOF MSG_FIN 308 + #define MSG_NO_SHARED_FRAGS 0x80000 /* sendpage() internal : page frags are not shared */ 309 + #define MSG_SENDPAGE_DECRYPTED 0x100000 /* sendpage() internal : page may carry 310 + * plain text and require encryption 311 + */ 314 312 315 - #define MSG_ZEROCOPY BIT(26) /* Use user data in kernel path */ 316 - #define MSG_FASTOPEN BIT(29) /* Send data in TCP SYN */ 317 - #define MSG_CMSG_CLOEXEC BIT(30) /* Set close_on_exec for file 318 - * descriptor received through 319 - * SCM_RIGHTS 320 - */ 313 + #define MSG_ZEROCOPY 0x4000000 /* Use user data in kernel path */ 314 + #define MSG_FASTOPEN 0x20000000 /* Send data in TCP SYN */ 315 + #define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exec for file 316 + descriptor received through 317 + SCM_RIGHTS */ 321 318 #if defined(CONFIG_COMPAT) 322 - #define MSG_CMSG_COMPAT BIT(31) /* This message needs 32 bit fixups */ 319 + #define MSG_CMSG_COMPAT 0x80000000 /* This message needs 32 bit fixups */ 323 320 #else 324 - #define MSG_CMSG_COMPAT 0 /* We never have 32 bit fixups */ 321 + #define MSG_CMSG_COMPAT 0 /* We never have 32 bit fixups */ 325 322 #endif 326 323 327 324