From: Stephen Hemminger <stephen@networkplumber.org>
To: Shachar Beiser <shacharbe@mellanox.com>
Cc: dev@dpdk.org, Adrien Mazarguil <adrien.mazarguil@6wind.com>,
Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Subject: Re: [dpdk-dev] [PATCH 1/2] lib/net: add IPv6 header fields macros
Date: Sun, 31 Dec 2017 09:37:54 -0800 [thread overview]
Message-ID: <20171231093754.0d14f88b@xeon-e3> (raw)
In-Reply-To: <07cfe9a606927b551c3530a2b910ef88547d9118.1514705637.git.shacharbe@mellanox.com>
On Sun, 31 Dec 2017 07:34:29 +0000
Shachar Beiser <shacharbe@mellanox.com> wrote:
> +/* IPv6 vtc_flow: IPv / TC / flow_label */
> +#define IPV6_HDR_FL_SHIFT (0)
> +#define IPV6_HDR_TC_SHIFT (20)
No parenthesis needed around simple numeric values.
> +#define IPV6_HDR_FL_MASK ((1 << IPV6_HDR_TC_SHIFT) - 1)
If you use ((1u << IPV6_HDR_TC_SHFIT - 1)
then the mask will be unsigned which probably what you want.
> +#define IPV6_HDR_TC_MASK (0xf << IPV6_HDR_TC_SHIFT)
next prev parent reply other threads:[~2017-12-31 17:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-31 7:34 Shachar Beiser
2017-12-31 7:34 ` [dpdk-dev] [PATCH 2/2] net/mlx5: fix IPv6 header fields Shachar Beiser
2018-01-02 19:56 ` Yongseok Koh
2017-12-31 17:37 ` Stephen Hemminger [this message]
2018-01-16 9:17 ` [dpdk-dev] [PATCH v2 1/2] lib/net: add IPv6 header fields macros Shahaf Shuler
2018-01-17 16:53 ` Ferruh Yigit
2018-01-18 13:57 ` Olivier Matz
2018-01-18 15:07 ` Ferruh Yigit
2018-01-16 9:17 ` [dpdk-dev] [PATCH v2 2/2] net/mlx5: fix IPv6 header fields Shahaf Shuler
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=20171231093754.0d14f88b@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=nelio.laranjeiro@6wind.com \
--cc=shacharbe@mellanox.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 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).