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 74F6CA0487 for ; Tue, 2 Jul 2019 12:17:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 30B811B965; Tue, 2 Jul 2019 12:17:06 +0200 (CEST) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40040.outbound.protection.outlook.com [40.107.4.40]) by dpdk.org (Postfix) with ESMTP id F410C1B964 for ; Tue, 2 Jul 2019 12:17:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3PHPPGQxuJY2pxz/sTf4Cv28gzXAPtZa0u5rbWAK/Zk=; b=aIh3ydzaR501boXP1X5hYcfYDWV/ujVL3MWPQ5EAN2c9jsGQegD6HngjqPMVSLSGWi+lmIIIueNDK5v2j8NyxNhMii4LnOFq+ro2zjP9pUuyp/ZfNl9Aixj+CaFfvNKfPCQOJZ/VL8RCxcmVQkKL/0wOylDW4RfnbYwSeJy82EY= Received: from AM4PR05MB3460.eurprd05.prod.outlook.com (10.171.187.153) by AM4PR05MB3347.eurprd05.prod.outlook.com (10.171.191.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2032.20; Tue, 2 Jul 2019 10:17:01 +0000 Received: from AM4PR05MB3460.eurprd05.prod.outlook.com ([fe80::7de4:132c:8c9:438]) by AM4PR05MB3460.eurprd05.prod.outlook.com ([fe80::7de4:132c:8c9:438%4]) with mapi id 15.20.2032.019; Tue, 2 Jul 2019 10:17:01 +0000 From: Dekel Peled To: Adrien Mazarguil CC: Andrew Rybchenko , "wenzhuo.lu@intel.com" , "jingjing.wu@intel.com" , "bernard.iremonger@intel.com" , Yongseok Koh , Shahaf Shuler , Slava Ovsiienko , "dev@dpdk.org" , Ori Kam Thread-Topic: [dpdk-dev] [PATCH] ethdev: support action with any config object type Thread-Index: AQHVMK13IGzgOkuDnE+KqGUE616AL6a3ALkggAAW+gCAAAUM8A== Date: Tue, 2 Jul 2019 10:17:01 +0000 Message-ID: References: <1389143e204e85c90b4fc124f9e561f43f78175e.1561989889.git.dekelp@mellanox.com> <7e07e792-edd4-b946-641d-4cff9cc2c830@solarflare.com> <20190702095716.GA4512@6wind.com> In-Reply-To: <20190702095716.GA4512@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=dekelp@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ffd496ab-b309-4fbf-dc52-08d6fed66c60 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM4PR05MB3347; x-ms-traffictypediagnostic: AM4PR05MB3347: x-ms-exchange-purlcount: 1 x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 008663486A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(4636009)(396003)(136003)(39860400002)(346002)(376002)(366004)(13464003)(199004)(189003)(52536014)(45080400002)(256004)(4326008)(305945005)(8676002)(6506007)(81156014)(81166006)(478600001)(5660300002)(53546011)(71200400001)(71190400001)(25786009)(73956011)(446003)(76176011)(14444005)(76116006)(33656002)(316002)(2906002)(26005)(186003)(54906003)(74316002)(102836004)(8936002)(66476007)(107886003)(66946007)(7736002)(66446008)(229853002)(66556008)(6246003)(64756008)(6306002)(11346002)(53936002)(486006)(9686003)(7696005)(99286004)(55016002)(966005)(6916009)(14454004)(66066001)(6436002)(68736007)(6116002)(476003)(3846002)(86362001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3347; H:AM4PR05MB3460.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: H2VNnYDPBHdt5Friy9A25zMVYHqOEv/H3e+nbxOqJb28dz+7aVoYjAL22V+NLIuAEsjG9NIdFCKvaCfbJgNGge/xuOIaYILFt+UWsBAtdCiBCtfbPn+L7CCP8bCV4nzunTitFIDKmb3R92DftpqZxp4Ku4bTt5xvTXPvk+8dCApcgjUmnrORjYPm1jHiUjRqnaqgyvrLj1SOUHBk8F9gTfONwhAXBVarE3r3TvuKjkP7gkAjvBVrcr8PedrLyvE2k5A/Tr2BjQIQ2Gvv/XIcemOevAddj2sdoCtisQxRSf176OBykJ8Ue9bN4B1ndckQc/FUEdP2BMnlPVNviogjUVOzcB0QxjxVuFwMvPXdpVB5FSqfAjzbGgOre2pC6KqVhDLnO+iI/TMwhDut3cn7Gjoc5X2g18Ujar/kwM9pHb4= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: ffd496ab-b309-4fbf-dc52-08d6fed66c60 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jul 2019 10:17:01.3158 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: dekelp@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3347 Subject: Re: [dpdk-dev] [PATCH] ethdev: support action with any config object type 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" Thanks, PSB. > -----Original Message----- > From: Adrien Mazarguil > Sent: Tuesday, July 2, 2019 12:57 PM > To: Dekel Peled > Cc: Andrew Rybchenko ; > wenzhuo.lu@intel.com; jingjing.wu@intel.com; > bernard.iremonger@intel.com; Yongseok Koh ; > Shahaf Shuler ; Slava Ovsiienko > ; dev@dpdk.org; Ori Kam > > Subject: Re: [dpdk-dev] [PATCH] ethdev: support action with any config > object type >=20 > On Tue, Jul 02, 2019 at 08:42:41AM +0000, Dekel Peled wrote: > > Thanks, PSB. > > > > > -----Original Message----- > > > From: Andrew Rybchenko > > > Sent: Tuesday, July 2, 2019 11:09 AM > > > To: Dekel Peled ; Adrien Mazarguil > > > ; wenzhuo.lu@intel.com; > > > jingjing.wu@intel.com; bernard.iremonger@intel.com; Yongseok Koh > > > ; Shahaf Shuler ; Slava > > > Ovsiienko ; arybchenko@solarflare.com > > > Cc: dev@dpdk.org; Ori Kam > > > Subject: Re: [dpdk-dev] [PATCH] ethdev: support action with any > > > config object type > > > > > > On 01.07.2019 17:10, Dekel Peled wrote: > > > > In current implementation, an action which requires parameters > > > > must accept them enclosed in a structure. > > > > Some actions require a single, trivial type parameter, but it > > > > still must be enclosed in a structure. > > > > This obligation results in multiple, action-specific structures, > > > > each containing a single trivial type parameter. > > > > > > > > This patch introduces a new approach, allowing an action > > > > configuration object of any type, trivial or a structure. > > > > > > > > This patch introduces, in test-pmd, a new macro ARG_ENTRY_HTON, to > > > > allow using a single argument, not enclosed in a structure. > > > > > > > > Signed-off-by: Dekel Peled > > > > > > The term "object" confuses me a bit, but I'm not a native speaker so > > > it could be just my wrong association. I'd prefer "configuration data= ". > > > > In previous version I wrote just "action configuration", and changed to > "action configuration object" per Adrien's suggestion. I think it is bett= er, but if > it causes confusion maybe it should be changed. > > > > Adrien, what do you think? Does "configuration data" carry the correct > meaning? >=20 > Well I'm no native speaker either but "object" is the term used in the C > standard with a well-defined meaning [1] and encompasses everything > (integers, floats, structures, unions, functions, pointers, arrays): >=20 > "region of data storage in the execution environment, the contents of wh= ich > can represent values" >=20 > I think it's a bit less vague than "data" because whenever objects are > mentioned in the standard, they always have a type. There's no such thing= as > a C object without one, and rte_flow puts a lot of emphasis on documentin= g > them. >=20 > int foo; > struct { ... } foo; > double foo; > char foo[]; > void *foo; >=20 > Whatever the type, would you refer to "foo" itself as an "object" or as > "data"? Understood, staying with "object". >=20 > Unrelated, but you must remove ARG_ENTRY_HTON from this patch since > there's no testpmd change in there that requires it. There's no tolerance= for > dead code in testpmd as it doesn't expose an API. OK, I'll remove it from this patch and add it to the relevant series. >=20 > Thanks. >=20 > [1] 3.14 "object" >=20 > https://eur03.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fwww. > open- > std.org%2Fjtc1%2Fsc22%2Fwg14%2Fwww%2Fdocs%2Fn1256.pdf&data > =3D02%7C01%7Cdekelp%40mellanox.com%7C305d2ae37a3b411ea91608d6fed3 > afbf%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C1%7C63697658247762 > 5253&sdata=3D8wcANpiGcjbhVMFHWs1wRB%2FnkvoSOawmHm8bkavY2 > U4%3D&reserved=3D0 >=20 > -- > Adrien Mazarguil > 6WIND