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 C685EA0A0C for ; Thu, 8 Apr 2021 18:31:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B2D3F141155; Thu, 8 Apr 2021 18:31:37 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 78A9D4068B; Thu, 8 Apr 2021 18:31:34 +0200 (CEST) Received: from [192.168.45.100] (unknown [188.242.7.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id CD15E7F53B; Thu, 8 Apr 2021 19:31:33 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru CD15E7F53B DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1617899493; bh=1k+35ibl6la1ZkMK89dG4fa2KQ+Cru25OJDczYdoIJs=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=jsig7M9h4VBZe0kCu9qXNQ5xhnnyT18dmyaE/8XY71LkMRMU/ViXg9+iz1vmloAhZ JQOJpLLqUv9nSynvsoI2ZBVTSsaJ8iZKXoUe3yv8RRlYzspEurTC3ZgHMB0xGhoECe wHY8KmM+AAeLEN1a03TL1SzfM9T9nxWEiXHL28Sc= To: 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 , Ferruh Yigit References: <20210408064823.12130-1-getelson@nvidia.com> <395f50f2-d8af-4a24-ae2a-728494ef2368@intel.com> From: Ivan Malov Message-ID: Date: Thu, 8 Apr 2021 19:31:31 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <395f50f2-d8af-4a24-ae2a-728494ef2368@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH] ethdev: fix VXLAN mask initialization value X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 -- Ivan M