From: David Ahern <dsahern@gmail.com>
To: Andrea Mayer <andrea.mayer@uniroma2.it>,
"David S. Miller" <davem@davemloft.net>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
David Ahern <dsahern@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: Colin Ian King <colin.king@canonical.com>,
Stefano Salsano <stefano.salsano@uniroma2.it>,
Paolo Lungaroni <paolo.lungaroni@cnit.it>,
Ahmed Abdelsalam <ahabdels.dev@GMAIL.COM>
Subject: Re: [PATCH net-next] seg6: fool-proof the processing of SRv6 behavior attributes
Date: Wed, 3 Feb 2021 08:59:40 -0700 [thread overview]
Message-ID: <6fe3beb2-4306-11cd-83ce-66072db81346@gmail.com> (raw)
In-Reply-To: <20210202185648.11654-1-andrea.mayer@uniroma2.it>
On 2/2/21 11:56 AM, Andrea Mayer wrote:
> diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c
> index b07f7c1c82a4..7cc50d506902 100644
> --- a/net/ipv6/seg6_local.c
> +++ b/net/ipv6/seg6_local.c
> @@ -31,6 +31,9 @@
> #include <linux/etherdevice.h>
> #include <linux/bpf.h>
>
> +#define SEG6_F_ATTR(i) BIT(i)
> +#define SEG6_LOCAL_MAX_SUPP 32
> +
SEG6_LOCAL_MAX_SUPP should not be needed; it can be derived from the type:
BUILD_BUG_ON(BITS_PER_TYPE(unsigned long) > SEG6_LOCAL_MAX)
The use of BIT() looks fine.
next prev parent reply other threads:[~2021-02-03 16:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 18:56 [PATCH net-next] seg6: fool-proof the processing of SRv6 behavior attributes Andrea Mayer
2021-02-03 15:59 ` David Ahern [this message]
2021-02-04 2:27 ` Andrea Mayer
2021-02-04 3:00 ` David Ahern
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=6fe3beb2-4306-11cd-83ce-66072db81346@gmail.com \
--to=dsahern@gmail.com \
--cc=ahabdels.dev@GMAIL.COM \
--cc=andrea.mayer@uniroma2.it \
--cc=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paolo.lungaroni@cnit.it \
--cc=stefano.salsano@uniroma2.it \
--cc=yoshfuji@linux-ipv6.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).