* [PATCH] socket: Use __u8 instead of u8 in uapi socket.h
@ 2022-05-25 8:51 Tobias Klauser
2022-05-25 13:21 ` kernel test robot
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Tobias Klauser @ 2022-05-25 8:51 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet; +Cc: Akhmat Karakotov, netdev
Use the uapi variant of the u8 type.
Fixes: 26859240e4ee ("txhash: Add socket option to control TX hash rethink behavior")
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
include/uapi/linux/socket.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/socket.h b/include/uapi/linux/socket.h
index 51d6bb2f6765..c272bfcfc479 100644
--- a/include/uapi/linux/socket.h
+++ b/include/uapi/linux/socket.h
@@ -31,7 +31,7 @@ struct __kernel_sockaddr_storage {
#define SOCK_BUF_LOCK_MASK (SOCK_SNDBUF_LOCK | SOCK_RCVBUF_LOCK)
-#define SOCK_TXREHASH_DEFAULT ((u8)-1)
+#define SOCK_TXREHASH_DEFAULT ((__u8)-1)
#define SOCK_TXREHASH_DISABLED 0
#define SOCK_TXREHASH_ENABLED 1
--
2.36.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] socket: Use __u8 instead of u8 in uapi socket.h
2022-05-25 8:51 [PATCH] socket: Use __u8 instead of u8 in uapi socket.h Tobias Klauser
@ 2022-05-25 13:21 ` kernel test robot
2022-05-30 8:14 ` [PATCH v2] " Tobias Klauser
2022-05-31 9:43 ` [PATCH v3] socket: Don't use u8 type " Tobias Klauser
2 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2022-05-25 13:21 UTC (permalink / raw)
To: Tobias Klauser, David S. Miller, Eric Dumazet
Cc: kbuild-all, netdev, Akhmat Karakotov
Hi Tobias,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
[also build test WARNING on net/master horms-ipvs/master linus/master v5.18 next-20220525]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Tobias-Klauser/socket-Use-__u8-instead-of-u8-in-uapi-socket-h/20220525-170053
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 57d7becda9c9e612e6b00676f2eecfac3e719e88
config: x86_64-randconfig-a015 (https://download.01.org/0day-ci/archive/20220525/202205252127.cfqhpFVS-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/283fe3009b96069f17a813f86db8b48d12b5014e
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Tobias-Klauser/socket-Use-__u8-instead-of-u8-in-uapi-socket-h/20220525-170053
git checkout 283fe3009b96069f17a813f86db8b48d12b5014e
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> usr/include/linux/socket.h:34: found __[us]{8,16,32,64} type without #include <linux/types.h>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] socket: Use __u8 instead of u8 in uapi socket.h
2022-05-25 8:51 [PATCH] socket: Use __u8 instead of u8 in uapi socket.h Tobias Klauser
2022-05-25 13:21 ` kernel test robot
@ 2022-05-30 8:14 ` Tobias Klauser
2022-05-30 8:20 ` David Laight
2022-05-31 9:43 ` [PATCH v3] socket: Don't use u8 type " Tobias Klauser
2 siblings, 1 reply; 8+ messages in thread
From: Tobias Klauser @ 2022-05-30 8:14 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet; +Cc: Akhmat Karakotov, netdev
Use the uapi variant of the u8 type.
Fixes: 26859240e4ee ("txhash: Add socket option to control TX hash rethink behavior")
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
v2: add missing <linux/types.h> include as reported by kernel test robot
include/uapi/linux/socket.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/socket.h b/include/uapi/linux/socket.h
index 51d6bb2f6765..62a32040ad4f 100644
--- a/include/uapi/linux/socket.h
+++ b/include/uapi/linux/socket.h
@@ -2,6 +2,8 @@
#ifndef _UAPI_LINUX_SOCKET_H
#define _UAPI_LINUX_SOCKET_H
+#include <linux/types.h>
+
/*
* Desired design of maximum size and alignment (see RFC2553)
*/
@@ -31,7 +33,7 @@ struct __kernel_sockaddr_storage {
#define SOCK_BUF_LOCK_MASK (SOCK_SNDBUF_LOCK | SOCK_RCVBUF_LOCK)
-#define SOCK_TXREHASH_DEFAULT ((u8)-1)
+#define SOCK_TXREHASH_DEFAULT ((__u8)-1)
#define SOCK_TXREHASH_DISABLED 0
#define SOCK_TXREHASH_ENABLED 1
--
2.36.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* RE: [PATCH v2] socket: Use __u8 instead of u8 in uapi socket.h
2022-05-30 8:14 ` [PATCH v2] " Tobias Klauser
@ 2022-05-30 8:20 ` David Laight
2022-05-31 9:24 ` Paolo Abeni
0 siblings, 1 reply; 8+ messages in thread
From: David Laight @ 2022-05-30 8:20 UTC (permalink / raw)
To: 'Tobias Klauser', David S. Miller, Eric Dumazet
Cc: Akhmat Karakotov, netdev
From: Tobias Klauser
> Sent: 30 May 2022 09:15
>
> Use the uapi variant of the u8 type.
>
> Fixes: 26859240e4ee ("txhash: Add socket option to control TX hash rethink behavior")
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
> v2: add missing <linux/types.h> include as reported by kernel test robot
>
> include/uapi/linux/socket.h | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/socket.h b/include/uapi/linux/socket.h
> index 51d6bb2f6765..62a32040ad4f 100644
> --- a/include/uapi/linux/socket.h
> +++ b/include/uapi/linux/socket.h
> @@ -2,6 +2,8 @@
> #ifndef _UAPI_LINUX_SOCKET_H
> #define _UAPI_LINUX_SOCKET_H
>
> +#include <linux/types.h>
> +
> /*
> * Desired design of maximum size and alignment (see RFC2553)
> */
> @@ -31,7 +33,7 @@ struct __kernel_sockaddr_storage {
>
> #define SOCK_BUF_LOCK_MASK (SOCK_SNDBUF_LOCK | SOCK_RCVBUF_LOCK)
>
> -#define SOCK_TXREHASH_DEFAULT ((u8)-1)
> +#define SOCK_TXREHASH_DEFAULT ((__u8)-1)
I can't help feeling that 255u (or 0xffu) would be a better
way to describe that value.
David
> #define SOCK_TXREHASH_DISABLED 0
> #define SOCK_TXREHASH_ENABLED 1
>
> --
> 2.36.1
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] socket: Use __u8 instead of u8 in uapi socket.h
2022-05-30 8:20 ` David Laight
@ 2022-05-31 9:24 ` Paolo Abeni
2022-05-31 9:44 ` Tobias Klauser
0 siblings, 1 reply; 8+ messages in thread
From: Paolo Abeni @ 2022-05-31 9:24 UTC (permalink / raw)
To: David Laight, 'Tobias Klauser', David S. Miller, Eric Dumazet
Cc: Akhmat Karakotov, netdev
On Mon, 2022-05-30 at 08:20 +0000, David Laight wrote:
> From: Tobias Klauser
> > Sent: 30 May 2022 09:15
> >
> > Use the uapi variant of the u8 type.
> >
> > Fixes: 26859240e4ee ("txhash: Add socket option to control TX hash rethink behavior")
> > Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> > ---
> > v2: add missing <linux/types.h> include as reported by kernel test robot
> >
> > include/uapi/linux/socket.h | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/uapi/linux/socket.h b/include/uapi/linux/socket.h
> > index 51d6bb2f6765..62a32040ad4f 100644
> > --- a/include/uapi/linux/socket.h
> > +++ b/include/uapi/linux/socket.h
> > @@ -2,6 +2,8 @@
> > #ifndef _UAPI_LINUX_SOCKET_H
> > #define _UAPI_LINUX_SOCKET_H
> >
> > +#include <linux/types.h>
> > +
> > /*
> > * Desired design of maximum size and alignment (see RFC2553)
> > */
> > @@ -31,7 +33,7 @@ struct __kernel_sockaddr_storage {
> >
> > #define SOCK_BUF_LOCK_MASK (SOCK_SNDBUF_LOCK | SOCK_RCVBUF_LOCK)
> >
> > -#define SOCK_TXREHASH_DEFAULT ((u8)-1)
> > +#define SOCK_TXREHASH_DEFAULT ((__u8)-1)
>
> I can't help feeling that 255u (or 0xffu) would be a better
> way to describe that value.
Even plain '255' would do. Additionally, any of the above will avoid
the additional header dependency.
Thanks,
Paolo
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3] socket: Don't use u8 type in uapi socket.h
2022-05-25 8:51 [PATCH] socket: Use __u8 instead of u8 in uapi socket.h Tobias Klauser
2022-05-25 13:21 ` kernel test robot
2022-05-30 8:14 ` [PATCH v2] " Tobias Klauser
@ 2022-05-31 9:43 ` Tobias Klauser
2022-06-02 0:40 ` patchwork-bot+netdevbpf
2 siblings, 1 reply; 8+ messages in thread
From: Tobias Klauser @ 2022-05-31 9:43 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Paolo Abeni, David Laight
Cc: Akhmat Karakotov, netdev
Use plain 255 instead, which also avoid introducing an additional header
dependency on <linux/types.h>
Fixes: 26859240e4ee ("txhash: Add socket option to control TX hash rethink behavior")
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
v3: changed to plain 255 as suggested by David Laight and Paolo Abeni
include/uapi/linux/socket.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/socket.h b/include/uapi/linux/socket.h
index 51d6bb2f6765..d3fcd3b5ec53 100644
--- a/include/uapi/linux/socket.h
+++ b/include/uapi/linux/socket.h
@@ -31,7 +31,7 @@ struct __kernel_sockaddr_storage {
#define SOCK_BUF_LOCK_MASK (SOCK_SNDBUF_LOCK | SOCK_RCVBUF_LOCK)
-#define SOCK_TXREHASH_DEFAULT ((u8)-1)
+#define SOCK_TXREHASH_DEFAULT 255
#define SOCK_TXREHASH_DISABLED 0
#define SOCK_TXREHASH_ENABLED 1
--
2.36.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2] socket: Use __u8 instead of u8 in uapi socket.h
2022-05-31 9:24 ` Paolo Abeni
@ 2022-05-31 9:44 ` Tobias Klauser
0 siblings, 0 replies; 8+ messages in thread
From: Tobias Klauser @ 2022-05-31 9:44 UTC (permalink / raw)
To: Paolo Abeni
Cc: David Laight, David S. Miller, Eric Dumazet, Akhmat Karakotov, netdev
On 2022-05-31 at 11:24:46 +0200, Paolo Abeni <pabeni@redhat.com> wrote:
> On Mon, 2022-05-30 at 08:20 +0000, David Laight wrote:
> > From: Tobias Klauser
> > > Sent: 30 May 2022 09:15
> > >
> > > Use the uapi variant of the u8 type.
> > >
> > > Fixes: 26859240e4ee ("txhash: Add socket option to control TX hash rethink behavior")
> > > Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> > > ---
> > > v2: add missing <linux/types.h> include as reported by kernel test robot
> > >
> > > include/uapi/linux/socket.h | 4 +++-
> > > 1 file changed, 3 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/include/uapi/linux/socket.h b/include/uapi/linux/socket.h
> > > index 51d6bb2f6765..62a32040ad4f 100644
> > > --- a/include/uapi/linux/socket.h
> > > +++ b/include/uapi/linux/socket.h
> > > @@ -2,6 +2,8 @@
> > > #ifndef _UAPI_LINUX_SOCKET_H
> > > #define _UAPI_LINUX_SOCKET_H
> > >
> > > +#include <linux/types.h>
> > > +
> > > /*
> > > * Desired design of maximum size and alignment (see RFC2553)
> > > */
> > > @@ -31,7 +33,7 @@ struct __kernel_sockaddr_storage {
> > >
> > > #define SOCK_BUF_LOCK_MASK (SOCK_SNDBUF_LOCK | SOCK_RCVBUF_LOCK)
> > >
> > > -#define SOCK_TXREHASH_DEFAULT ((u8)-1)
> > > +#define SOCK_TXREHASH_DEFAULT ((__u8)-1)
> >
> > I can't help feeling that 255u (or 0xffu) would be a better
> > way to describe that value.
>
> Even plain '255' would do. Additionally, any of the above will avoid
> the additional header dependency.
Thanks, I've sent v3 changing it to plain '255'.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3] socket: Don't use u8 type in uapi socket.h
2022-05-31 9:43 ` [PATCH v3] socket: Don't use u8 type " Tobias Klauser
@ 2022-06-02 0:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-06-02 0:40 UTC (permalink / raw)
To: Tobias Klauser; +Cc: davem, edumazet, pabeni, David.Laight, hmukos, netdev
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 31 May 2022 11:43:45 +0200 you wrote:
> Use plain 255 instead, which also avoid introducing an additional header
> dependency on <linux/types.h>
>
> Fixes: 26859240e4ee ("txhash: Add socket option to control TX hash rethink behavior")
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
> v3: changed to plain 255 as suggested by David Laight and Paolo Abeni
>
> [...]
Here is the summary with links:
- [v3] socket: Don't use u8 type in uapi socket.h
https://git.kernel.org/netdev/net/c/8d3398ba2a0d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-06-02 0:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25 8:51 [PATCH] socket: Use __u8 instead of u8 in uapi socket.h Tobias Klauser
2022-05-25 13:21 ` kernel test robot
2022-05-30 8:14 ` [PATCH v2] " Tobias Klauser
2022-05-30 8:20 ` David Laight
2022-05-31 9:24 ` Paolo Abeni
2022-05-31 9:44 ` Tobias Klauser
2022-05-31 9:43 ` [PATCH v3] socket: Don't use u8 type " Tobias Klauser
2022-06-02 0:40 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.