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 41E97A00C2; Sat, 25 Apr 2020 11:21:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8441E1C1BD; Sat, 25 Apr 2020 11:21:02 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 2C0CB1C1AA for ; Sat, 25 Apr 2020 11:20:59 +0200 (CEST) IronPort-SDR: BZ9IacEQOIZHWQw6F90JLlx71q9GyLX930gYgVAQ0FAfZgAMAjS0SSJ3H458AwgFEXShzfIFFb CG5FHHMfhFsg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2020 02:20:59 -0700 IronPort-SDR: vT74eEzgSvqHKSUYzipeIdtwdKSPM67g4dEk8sLzOMgEJ6pXhbs4TuylLF2MDa51JIVrbyRS3K KYH2H0WxWGZA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,315,1583222400"; d="scan'208";a="403668561" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by orsmga004.jf.intel.com with ESMTP; 25 Apr 2020 02:20:58 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX101.amr.corp.intel.com (10.22.225.128) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 25 Apr 2020 02:20:58 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.177) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 25 Apr 2020 02:20:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RIj3U0EH7etuztuRlCLrX2lh8PiHmRPkxlmiFWwHjUP8utbwgdUZZO2Eym38ofKWvSB8DvGR4CCtY0N2h7XeIFGXdgs/MOQfKh0LIvw2Unmyktcpp/3On08ccnpsVwp3NkyEY+RIYO6QfUaUlR0wKBT90Sw8/xuJkC13VZSuwqAdxzNi87U04XAflNk8NfJiFOWKziln6URJK893VACdWDJMCjkNV6UoxyR3bTn3i1AbZEBEDcOiHQylRhUNF5oSkzWqXGCGeqzPYMmX42Cueaw1PuH6GePXyI335wFKrQZqs8HMmw1CiVhIHB74ymnx5b6JOmbBzlcIOvcntz2oxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IauizJ2H/zFofxm/pbvr7JCdBpPdZcrIYI2P2S4Zh5E=; b=m+1iCNBp1sEUWeu7WO1DlAEGGGJapb3Pd3JtOVRWS6EYYP7GvcngVPbQFYhl20zs36RdQfJmVjdbq1CbVVmke+Jf342uWo5xKe7/4k9pXGgV0ngrRa+jw28nmxQFziMZ+z2Mrhtr6IPTkzHtvZ0TW19To3tEE+vpAgbAS7IpOhWs1iOLGWAzmtubk+5zvlB8lrPJqYqc6n5Jp1dkmDDNANbVL5b7ZxPtpMdAfffr8cWTBhEs2PYj+aejiR2+rALSoI8CZAyqbP8erkzqtdsS78VXFMeMBJRkFcnawlYE8gDRpRRfiRbqfUfNAn79KwOGD3t4a13btf2OChKolsjg7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IauizJ2H/zFofxm/pbvr7JCdBpPdZcrIYI2P2S4Zh5E=; b=fZieDqy8EkSFaz0bm+rcjlqFbgrqmcMnfQvQpJM+pv/aYRX3aQMl89Eh3El9YxoRR1VWTLmF4d/IXAvZv1T19Kor7bjNNUP8tXMsdNtcJFua+1HPSflkaKZgk///JTR4JweKgwXyGOdMxk+bfpZeu8TKnoFuxiffO9Vg8AMAKuo= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BYAPR11MB2664.namprd11.prod.outlook.com (2603:10b6:a02:c7::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13; Sat, 25 Apr 2020 09:20:57 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f8cb:58cd:e958:fff4]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f8cb:58cd:e958:fff4%6]) with mapi id 15.20.2937.020; Sat, 25 Apr 2020 09:20:57 +0000 From: "Ananyev, Konstantin" To: Stephen Hemminger , Honnappa Nagarahalli CC: "dev@dpdk.org" , nd Thread-Topic: [dpdk-dev] [PATCH v2 1/4] ring: future proof flag settings Thread-Index: AQHWGlwslknP95CvLUONVfaGWLAeRqiIkaaAgAAPWgCAAO+qwA== Date: Sat, 25 Apr 2020 09:20:56 +0000 Message-ID: References: <20200212230810.2837-1-stephen@networkplumber.org> <20200424171536.11535-1-stephen@networkplumber.org> <20200424171536.11535-2-stephen@networkplumber.org> <20200424120212.3ff081c8@hermes.lan> In-Reply-To: <20200424120212.3ff081c8@hermes.lan> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=konstantin.ananyev@intel.com; x-originating-ip: [192.198.151.173] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d4d702a8-d8df-4b12-a8ef-08d7e8f9f624 x-ms-traffictypediagnostic: BYAPR11MB2664: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4303; x-forefront-prvs: 0384275935 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3301.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(396003)(376002)(39860400002)(366004)(346002)(66446008)(54906003)(186003)(26005)(5660300002)(7696005)(86362001)(316002)(110136005)(6506007)(33656002)(52536014)(53546011)(71200400001)(66476007)(64756008)(4326008)(478600001)(8676002)(2906002)(55016002)(9686003)(66946007)(76116006)(66556008)(81156014)(8936002); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jxiqb8G+XWgP6CTN16yvvQOhwOhcTtSRG+VunrWqSz/FIBa1z7xryiIwUpnyI80imq4nnIYhNFRpn+7LYCB8gYyh8CNQS6UIsBTFVoRT28JsEcSE9ndgnRUQVEJJKl1DJeZqBSWSuLGPnhpiE4kZk/kvVrq7BnTnBZThKrfynU3MEcHXloWOzizBaXv3sE24/TcHlWzxCH1R+vCqUY9btaDy4zWhZ6wz4Vx8DLm5tqXGh/9Cs4r09VB47DGaZDpZ0iRFU7BJ8NYjF1714nLvyVOpAHIyuR8KLnI//NULKbABsqm0KbUQ1KX0q4uGHFBKe7xp7ZRnIi7gV081sjphbmhaalp8knzwtKpQGDFJ92KKpo7IjSi4lth8b/OQZc/nnErr6SM1ueKL/pGrmWWsrrWR1YY9sYIctk3y4+5+sM4ZEXUAfVg53a0QiOtwQEJs x-ms-exchange-antispam-messagedata: a/rCNQU+iZp7AEeojwS7y7FeQjGnnmh5bEXTgHCfKCE6pMjy8G08tRQ2HEgUJ7eTIPO6HxfDQydttJI+FhY5nLSbK/KVwsHtrWy6ZiVETCF93IY0LxG1rx/ZPATPPWsxBstJ5iINF9bMCTVdKTBPLhNfeGal70H7iJk5HVy1/0FPrcsoWZIZ5vtNHqhmbYL0a75OKxePPzuz7FMg+Fwm5gfCUPHej6cDmi0qyF8Qt2+XT3AhMBu9ZwM2zN2uJoBx/IosTfPWjY9u78RlRLfOFTBsr1RhQFOfJm35Uuac3bYd73WlK5GhSQe/NCdqeWkDVuCrGMAkx1s7XyVbiQ/lk/MQkK2A2I3bU5nlBip7dm+5ia/6RxMGpyfh0q/m0julXrY6o+ydxqcJqII98BTfji21X4NOB+9uZNih0hN7pu/uxF76v/nnuLXTPXQtMc9/NPLCaS2SR0iYUSRbLYDntl05fz78Xjkz+V1hQ7fh2BsFFwn9wKeCQrf+QGG3DKsPgcRCTI/BOfJNCoy3kWYDl+aYoD3BJJWYzmr2/QnukhPB9/srGWItmHKdQQvOwp/IGXXjiAbtnVK0sVPDg5DsIOEg3xbXWmZlSl0YsWJWQUAdzACq2UiUMA3dOarqaoQIfiRSNUkQnwYGTAC3+/h4YQ4N3TFOT1X4HiC25j2C8DCIl9y9Jbuc7YVQAiFLtCNRw1d1VuyObrvDpyA5ICPvC1C1t8epa5HtHwc/VbsygEMpifX6hken1lfyW8emqajFLcRTSz/4J+4zzIf9jhE1F/eAiUlHWlBus7M/WbAfyLgmrktTcz/KJ6IGK+PTiRW/ x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: d4d702a8-d8df-4b12-a8ef-08d7e8f9f624 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2020 09:20:56.9083 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: nXAJOBzFHnN4C4JMDpVS/92mkU+IB+3bNbcvbj6JXRQwyRDMu37pYvJbloU9nZ/X+ytMN22j9jPRF57BdrU+7AHwKOPJYaNmWRLNFNHkb2o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2664 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 1/4] ring: future proof flag settings 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" > -----Original Message----- > From: dev On Behalf Of Stephen Hemminger > Sent: Friday, April 24, 2020 8:02 PM > To: Honnappa Nagarahalli > Cc: dev@dpdk.org; nd > Subject: Re: [dpdk-dev] [PATCH v2 1/4] ring: future proof flag settings >=20 > On Fri, 24 Apr 2020 18:07:15 +0000 > Honnappa Nagarahalli wrote: >=20 > > > > > > > > > > All API's should check that they support the flag values passed. > > > These checks ensure that the extra bits can safely be used without ri= sk of ABI > > > breakage. > > > > > > Signed-off-by: Stephen Hemminger > > > --- > > > lib/librte_ring/rte_ring.c | 10 ++++++++++ > > > 1 file changed, 10 insertions(+) > > > > > > diff --git a/lib/librte_ring/rte_ring.c b/lib/librte_ring/rte_ring.c = index > > > ebe5ccf0de68..70685121581f 100644 > > > --- a/lib/librte_ring/rte_ring.c > > > +++ b/lib/librte_ring/rte_ring.c > > > @@ -42,6 +42,9 @@ static struct rte_tailq_elem rte_ring_tailq =3D { = }; > > > EAL_REGISTER_TAILQ(rte_ring_tailq) > > > > > > +/* mask of all valid flag values to ring_create() */ > > > +#define RING_F_MASK 0x007F > > Is it better to construct this using the actual flag #defines? >=20 > sure, but it gets long +1 to use public defines here.