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 A98F1A0579; Thu, 8 Apr 2021 17:35:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 563C7141108; Thu, 8 Apr 2021 17:35:25 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 906CB4068B; Thu, 8 Apr 2021 17:35:23 +0200 (CEST) IronPort-SDR: GGI1I7iqg4YfmS/Qj6IcE4cl+XLz9m0D7bjMI8l7oMOEwGjIpv3WajozXbp/d346OKpLsiKgUt sFP/VAZSXvIw== X-IronPort-AV: E=McAfee;i="6000,8403,9948"; a="191413676" X-IronPort-AV: E=Sophos;i="5.82,206,1613462400"; d="scan'208";a="191413676" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2021 08:35:22 -0700 IronPort-SDR: tL4/NmdRd5+OCHMrx3NgD5n8XiWGKYl8ZjORE2kLd7CopnyxC3WfF+VlI1TefwiB6LdxprSGlT ZhLZypgJYv2g== X-IronPort-AV: E=Sophos;i="5.82,206,1613462400"; d="scan'208";a="380296566" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.203.5]) ([10.213.203.5]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2021 08:35:19 -0700 To: Gregory Etelson , dev@dpdk.org Cc: matan@nvidia.com, rasland@nvidia.com, stable@dpdk.org, Viacheslav Ovsiienko , Ori Kam , Thomas Monjalon , Andrew Rybchenko , Ivan Malov , Andy Moreton References: <20210408064823.12130-1-getelson@nvidia.com> From: Ferruh Yigit X-User: ferruhy Message-ID: <395f50f2-d8af-4a24-ae2a-728494ef2368@intel.com> Date: Thu, 8 Apr 2021 16:35:15 +0100 MIME-Version: 1.0 In-Reply-To: <20210408064823.12130-1-getelson@nvidia.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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 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: Ferruh Yigit