From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E9168A0A0C; Fri, 9 Apr 2021 11:28:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A301F407FF; Fri, 9 Apr 2021 11:28:41 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 116DE4014D; Fri, 9 Apr 2021 11:28:38 +0200 (CEST) IronPort-SDR: SuyfNEUes9E4sDlBFT2Cam+Jn6n82pU8yGZtN5vTSE3//DPJP3mH43CWrgK1uasyEXh8teL0qL yQpBkSP3+LVw== X-IronPort-AV: E=McAfee;i="6000,8403,9948"; a="191575777" X-IronPort-AV: E=Sophos;i="5.82,209,1613462400"; d="scan'208";a="191575777" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2021 02:28:38 -0700 IronPort-SDR: pYPwm+R1ixL/sD2q+3GkyVQ/ki573BFVxb4cUJUZuYyIEM3A+3/BRaoRFefulezZI58RomkYGW H5no4JHlz13g== X-IronPort-AV: E=Sophos;i="5.82,209,1613462400"; d="scan'208";a="459169719" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.203.45]) ([10.213.203.45]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2021 02:28:35 -0700 To: Ivan Malov , Gregory Etelson , dev@dpdk.org Cc: matan@nvidia.com, rasland@nvidia.com, stable@dpdk.org, Viacheslav Ovsiienko , Ori Kam , Thomas Monjalon , Andrew Rybchenko , Andy Moreton References: <20210408064823.12130-1-getelson@nvidia.com> <395f50f2-d8af-4a24-ae2a-728494ef2368@intel.com> From: Ferruh Yigit X-User: ferruhy Message-ID: Date: Fri, 9 Apr 2021 10:28:31 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] ethdev: fix VXLAN mask initialization value X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 4/8/2021 5:31 PM, Ivan Malov wrote: > 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 >> Acked-by: Viacheslav Ovsiienko > > Reviewed-by: Ivan Malov > Applied to dpdk-next-net/main, thanks.