DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Gregory Etelson <getelson@nvidia.com>, dev@dpdk.org
Cc: matan@nvidia.com, rasland@nvidia.com, stable@dpdk.org,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	Ori Kam <orika@nvidia.com>, Thomas Monjalon <thomas@monjalon.net>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Ivan Malov <ivan.malov@oktetlabs.ru>,
	Andy Moreton <amoreton@xilinx.com>
Subject: Re: [dpdk-dev] [PATCH] ethdev: fix VXLAN mask initialization value
Date: Thu, 8 Apr 2021 16:35:15 +0100
Message-ID: <395f50f2-d8af-4a24-ae2a-728494ef2368@intel.com> (raw)
In-Reply-To: <20210408064823.12130-1-getelson@nvidia.com>

On 4/8/2021 7:48 AM, Gregory Etelson wrote:
> In GCC compiler, __builtin_constant_p(exp) is a function.
> The function returns the integer 1 if the argument is known to be
> a compile-time constant.
> Therefore, __builtin_constant_p(0xffffff << 8) returned 1.
> As the result, rte_flow_item_vxlan_mask was initiated to
> {{
>    {flags = 0x0, rsvd0 = {0x0, 0x0, 0x0},
>     vni = {0x0, 0x0, 0x0}, rsvd1 = 0x1},
>    hdr = {vx_flags = 0x0, vx_vni = 0x1000000}}}
> }}
> GCC fails initialization
> rte_flow_item_vxlan_mask.hdr.vni = (0xffffff << 8)
> with "initializer element is not a constant expression" error.
> Use immediate 0xffffff00 value instead.
> 
> Cc: stable@dpdk.org
> Fixes: 43af98e687cf ("ethdev: reuse VXLAN header definition in flow item")
> 
> Signed-off-by: Gregory Etelson <getelson@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

  reply	other threads:[~2021-04-08 15:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08  6:48 Gregory Etelson
2021-04-08 15:35 ` Ferruh Yigit [this message]
2021-04-08 16:31   ` Ivan Malov
2021-04-09  9:28     ` Ferruh Yigit

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=395f50f2-d8af-4a24-ae2a-728494ef2368@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=amoreton@xilinx.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=getelson@nvidia.com \
    --cc=ivan.malov@oktetlabs.ru \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git