From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id DC5E6A00BE;
	Mon, 27 Apr 2020 15:37:10 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 91CEE1D444;
	Mon, 27 Apr 2020 15:37:10 +0200 (CEST)
Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com
 [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 664231D424
 for <dev@dpdk.org>; Mon, 27 Apr 2020 15:37:09 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1587994628;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=rh4AhZ0Svc08GpJx0Xah+vlNH1700fqKTxWvlv5cGcs=;
 b=i+LQW0v0DzbYXBZ7BqFYA0oLnUxMqc6AQl43x2T0ofmfAaVTgNl3KRGU6bV60s06YW/UKR
 +fUHu2Xh4DLIu7JJg/6wT3zzO+QaETarRhrBzes8iBb7whHi4dBSE80GEifXNbMz5D1gEc
 XUW5G5wyn98xauOIH2HYQLYcaWP3VIs=
Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com
 [209.85.222.69]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-487-t6eAM2dVMPq_03se0nyNvQ-1; Mon, 27 Apr 2020 09:37:07 -0400
X-MC-Unique: t6eAM2dVMPq_03se0nyNvQ-1
Received: by mail-ua1-f69.google.com with SMTP id r20so9182457uah.15
 for <dev@dpdk.org>; Mon, 27 Apr 2020 06:37:07 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=IONxDToXXGNjXIm+cz7YwE/WBQbxEZKSHVOa4bNbAo8=;
 b=Wp+EKj1s2fTavgbWnMroQ0iN+Q5bpHVBv5xVF9ozQXPkypd+wNrmL9LQZgbZ9HZ+1Z
 T5lQK3jzcvoVq9/d/vKlSbsuLd7WhWoCZQKVcEe+qVLHpwu+nRDVyTRBUW3lA6ByZHF+
 NoFK6nKq16Iuk3roxF88Z7FOhAUqQKhyFMPSGjalylM+Bf6Qo8nosIj9O+TsGN2IeyQT
 8F+D6EqRFn1UH+7jJhIzs/eVVBlYlLmW1Cu+qED5zS8P4LlDtyHMH+apVVSmnlfZZPzn
 gDVJi71n5L+ypdw36jcVdYNO1jM3hiDNxLRrZuGhOAvxTnEyWbQIzwoDH4bG+X0TKqnZ
 BF0A==
X-Gm-Message-State: AGi0Pub7kuxuRr3VMmK7HoDjTWve+JaG27iAcGS9tnw240wkwuSI7uVI
 0NVF8m2ToIUOQGjt94DTDYWYmD76q/7STjWK6C5IFvb/AZNtNUJ3eOc7eINSxgSQs/Gv7rqDeXc
 Vch1gaQE/3fW9LLBOEFM=
X-Received: by 2002:ab0:5ad1:: with SMTP id x17mr15804601uae.126.1587994626721; 
 Mon, 27 Apr 2020 06:37:06 -0700 (PDT)
X-Google-Smtp-Source: APiQypJ/vOe42VOXJv6QWnqKrMiX/fhMTBj5l1EavikidWD6K3elieyXo+Dx02tsylLALphTh6AbOZEXUSjX6ZKJg9Q=
X-Received: by 2002:ab0:5ad1:: with SMTP id x17mr15804571uae.126.1587994626361; 
 Mon, 27 Apr 2020 06:37:06 -0700 (PDT)
MIME-Version: 1.0
References: <20200427132341.27681-1-david.marchand@redhat.com>
 <20200427132341.27681-4-david.marchand@redhat.com>
 <20200427133413.GA1848@bricha3-MOBL.ger.corp.intel.com>
In-Reply-To: <20200427133413.GA1848@bricha3-MOBL.ger.corp.intel.com>
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 27 Apr 2020 15:36:55 +0200
Message-ID: <CAJFAV8zeh7nuC3wDZa6BsKyQ_G30G7DUr3oZHWLomKCev4CPcw@mail.gmail.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev <dev@dpdk.org>, Ori Kam <orika@mellanox.com>, 
 Thomas Monjalon <thomas@monjalon.net>, Ferruh Yigit <ferruh.yigit@intel.com>, 
 Andrew Rybchenko <arybchenko@solarflare.com>, Xiao Zhang <xiao.zhang@intel.com>
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Mon, Apr 27, 2020 at 3:34 PM Bruce Richardson
<bruce.richardson@intel.com> 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 <david.marchand@redhat.com>
> > ---
> >  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 =3D {
> >       .s_field =3D 0x01,
> > -     .seid =3D RTE_BE64(0xffffffffffffffff),
> > +     .seid =3D RTE_BE64(UINT64_C(0xffffffffffffffff)),
>
> Rather than cast, why not put "ULL" at the end. If we are going to cast,
> why not just put "-1" in to save some digits.

I preferred this form in the hope future developers who want
0x0fffffffffffffff will copy/paste this.

--=20
David Marchand