From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 89506A00BE; Mon, 27 Apr 2020 15:43:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 580651D514; Mon, 27 Apr 2020 15:43:59 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id EBDFA1C295 for ; Mon, 27 Apr 2020 15:43:57 +0200 (CEST) IronPort-SDR: x5k20E+rl3SN/NrA9SMwM7p8jOamWhpWafW+p2jUJkxjjhZRlHi/X0hQ4pLdJk48UUKhCAp+0Y YXBTQhnvCOJg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2020 06:43:57 -0700 IronPort-SDR: g065ZbGvN/eOhallsprNHM8zkP58ToSDMnsYM5aGQSYMpmuwtxZ6ybBihF6+4izr0U5xSEj3jU Kgus4ARlqXFA== X-IronPort-AV: E=Sophos;i="5.73,324,1583222400"; d="scan'208";a="431779884" Received: from bricha3-mobl.ger.corp.intel.com ([10.249.32.186]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 27 Apr 2020 06:43:54 -0700 Date: Mon, 27 Apr 2020 14:43:51 +0100 From: Bruce Richardson To: David Marchand Cc: Andrew Rybchenko , dev , Ori Kam , Thomas Monjalon , Ferruh Yigit , Xiao Zhang Message-ID: <20200427134351.GC1848@bricha3-MOBL.ger.corp.intel.com> References: <20200427132341.27681-1-david.marchand@redhat.com> <20200427132341.27681-4-david.marchand@redhat.com> <20200427133413.GA1848@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dpdk-dev] [PATCH 3/3] ethdev: fix build warning on 64-bit value X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Mon, Apr 27, 2020 at 03:40:30PM +0200, David Marchand wrote: > On Mon, Apr 27, 2020 at 3:39 PM Andrew Rybchenko > wrote: > > > > On 4/27/20 4:34 PM, Bruce Richardson wrote: > > > On Mon, Apr 27, 2020 at 03:23:41PM +0200, David Marchand wrote: > > >> Building OVS with dpdk, sparse complains about 64-bit constant being > > >> passed as a normal integer that can't fit it: > > >> error: constant 0xffffffffffffffff is so big it is unsigned long > > >> > > >> Fixes: ecbc8570131d ("ethdev: add PFCP header to flow API") > > >> > > >> Signed-off-by: David Marchand > > >> --- > > >> lib/librte_ethdev/rte_flow.h | 2 +- > > >> 1 file changed, 1 insertion(+), 1 deletion(-) > > >> > > >> diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h > > >> index 132b44edc6..1fb94f35e8 100644 > > >> --- a/lib/librte_ethdev/rte_flow.h > > >> +++ b/lib/librte_ethdev/rte_flow.h > > >> @@ -1534,7 +1534,7 @@ struct rte_flow_item_pfcp { > > >> #ifndef __cplusplus > > >> static const struct rte_flow_item_pfcp rte_flow_item_pfcp_mask = { > > >> .s_field = 0x01, > > >> - .seid = RTE_BE64(0xffffffffffffffff), > > >> + .seid = RTE_BE64(UINT64_C(0xffffffffffffffff)), > > > Rather than cast, why not put "ULL" at the end. > > > > It is not a cast as far as I can see, it is exactly ULL (or UL): > > /usr/include/stdint.h > > # if __WORDSIZE == 64 > > # define UINT64_C(c) c ## UL > > # else > > # define UINT64_C(c) c ## ULL > > # endif > > Yes. > Thanks. I'd prefer just sticking on the "ULL" myself as it's shorter, but this is ok.