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 A3740A04B5; Mon, 2 Dec 2019 17:53:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 075B01BE80; Mon, 2 Dec 2019 17:53:35 +0100 (CET) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id 4BDAD1B9B7 for ; Mon, 2 Dec 2019 17:53:33 +0100 (CET) Received: by mail-pl1-f196.google.com with SMTP id k20so152152pll.13 for ; Mon, 02 Dec 2019 08:53:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=L2sUgxJxuVYWgAyCzoVCbjvLK18oQ4ia3X6VioVX9p4=; b=WmYXoFnBeCogo/qdk8xGW990Ybq+Kkp1aZr+A1F7/RsqvTrcDS5hg20Mk0LgXaDmLO wfG2UMVdQxoJdzcqyRnB3oLM0gWoN3WBit91dToQjvLVAgXLAGKewshkkgzksJJa/bDd pEHFs8ySSJRfYObqc6z62rWJoT47k5tDTd8mtBTHfGKJeDWqT0KMAvGEjbFW6VvwTGeD VGP+bIWEowVtO9dmJTJ8xQ8JSK+9J5/OtfOzX9zRonBF3lngD1qYFis6f/zIsr63NOn0 tdic93q6+65jEC7Slnvw3UAV9Jok+qtty2Sk/C0WHsYfS5F5tVAI1Rq2x8hpWeBi+tNk PULA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=L2sUgxJxuVYWgAyCzoVCbjvLK18oQ4ia3X6VioVX9p4=; b=nO3IEparBwMdWL+RIsUXYiyfdJ0Jp/9jINWLufhSZzhKOOLLheC0tWv+/P7iYqB7va CQN2AceH6+GQ2tfr0bkhKhD24X/lIGR6W16tWLoCNHpKH/zCRnEwEM4Zu7z9ZAkOWl0m 3NqRmX5FBgPcWRGmAy29qfR0jDkzKPs4xbK36MPKaSS+6a9xOMUQG7om6rAAqBnjPnVT sYnOZXmB8YRu3itgsw0mgz9Pvuurh3NUFT7fkQl8IlVs54rQo2AZ1EWqiJg7YWbGD3M1 SocRpOprtopK0Tn/ME8NarjZjiOW98YLfwn1OEdo8LG/GqPduyRhDgWtAVqlRY37/XlS ScHw== X-Gm-Message-State: APjAAAWjYrbsdLYKrvh82jwnP/JrSnkasTywvI4BTLOAh0Kz77l0Cj6z ph9hWs/+mKqQ8+h0kvbPXBS+QQ== X-Google-Smtp-Source: APXvYqwVy28ucZm35n0Zlpt1pia7pWwkup2YhGWrTjaZjQwAVHisIUSSn+tOmuGBBlzxklGW+xw6Gg== X-Received: by 2002:a17:90b:4391:: with SMTP id in17mr201810pjb.33.1575305612261; Mon, 02 Dec 2019 08:53:32 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id s11sm91105pgo.85.2019.12.02.08.53.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2019 08:53:32 -0800 (PST) Date: Mon, 2 Dec 2019 08:53:23 -0800 From: Stephen Hemminger To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: "Thomas Monjalon" , "Gavin Hu (Arm Technology China)" , "Joyce Kong (Arm Technology China)" , , , "Bruce Richardson" , "nd" , , "Honnappa Nagarahalli" , , , , , , Message-ID: <20191202085323.7a6f26bb@hermes.lan> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35C60C3D@smartserver.smartshare.dk> References: <1571125801-45773-1-git-send-email-joyce.kong@arm.com> <1574923458-14895-4-git-send-email-joyce.kong@arm.com> <3338244.xi9Rne9xir@xps> <98CBD80474FA8B44BF855DF32C47DC35C60C3D@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v5 3/6] net/axgbe: use common rte bitoperation APIs instead 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, 2 Dec 2019 10:24:32 +0100 Morten Br=C3=B8rup wrote: > Thomas, >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > > Sent: Monday, December 2, 2019 10:12 AM > >=20 > > 02/12/2019 07:09, Gavin Hu (Arm Technology China): =20 > > > Hi Bruce, Thomas, > > > > > > This series of patches was reported a compilation issue[1] on 32bit = =20 > > Ubuntu. =20 > > > On mainstream 64-bit OS, "unsigned long" is 64-bit in size and we =20 > > uses the 64-bit variant of APIs. But the 32-bit OS expect 32-bit > > 'unsigned long' arguments. =20 > > > This is where the error happens. =20 > >=20 > > Please could you be more specific? What is the exact error? =20 >=20 > The PMD has a private structure with an unsigned long field. >=20 > The patch for the PMD uses the 64 bit operations on this field. The patch= fails to compile for a 32 bit target, because the struct field is only 32 = bit there. >=20 > > =20 > > > My question is how 32-bit OSes shall we support, put another way, can= =20 > > we ignore this compilation issue? =20 > > > If we still need to care, how about making 'obsolete' of 'unsigned =20 > > long' and use 'uint32' instead to be multi-OS friendly? > >=20 > > Which unsigned long? > > If it is in the (not merged) bit API, it can still be changed no? > > =20 >=20 > The patch for the PMD can be changed to use the 64 or 32 bit operations d= epending on whether it is being compiled for a 64 or 32 bit target. >=20 > However, the question seems to be if we want to either 1) do something li= ke that, or 2) drop support for 32 bit targets, or 3) make these target dep= endent fields obsolete (i.e. ban the use of unsigned long) and require expl= icit sizes, e.g. uint32_t. The bitop library should not assume sizeof(unsigned long) =3D=3D 32 bit.