All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tobias Klauser <tklauser@distanz.ch>
To: Paolo Abeni <pabeni@redhat.com>
Cc: David Laight <David.Laight@ACULAB.COM>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Akhmat Karakotov <hmukos@yandex-team.ru>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH v2] socket: Use __u8 instead of u8 in uapi socket.h
Date: Tue, 31 May 2022 11:44:23 +0200	[thread overview]
Message-ID: <20220531094423.eylqehirkrxgqxbz@distanz.ch> (raw)
In-Reply-To: <7e77647a5c3c538ae6beb668083e1b6090dccb62.camel@redhat.com>

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'.

  reply	other threads:[~2022-05-31  9:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2022-05-31  9:43 ` [PATCH v3] socket: Don't use u8 type " Tobias Klauser
2022-06-02  0:40   ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220531094423.eylqehirkrxgqxbz@distanz.ch \
    --to=tklauser@distanz.ch \
    --cc=David.Laight@ACULAB.COM \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hmukos@yandex-team.ru \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.