From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0055.outbound.protection.outlook.com [104.47.37.55]) by dpdk.org (Postfix) with ESMTP id A3DD41B1F5 for ; Tue, 23 Oct 2018 10:48:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JTGixm+U/cRzmNike0Z/MuAjNgGOba+0qB87nEHBMTM=; b=ZQAWoX6tWPdj1vMajSD7rTmXn+5O/SSxEAwuDyed3uF5yYJeTJysPkVTl5C3OPOfYQsbtUOUqvQ7/llqI/nWSUuEujOcqAydjDsKyi27eDGWd8egXcKrjFWZrUhP3BYLAlTzRhYgAW+B8NODYsuC/moKqfov3lD7zT9tBjyES7Q= Received: from SN6PR07MB4911.namprd07.prod.outlook.com (52.135.77.157) by SN6PR07MB5215.namprd07.prod.outlook.com (52.135.101.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.30; Tue, 23 Oct 2018 08:48:05 +0000 Received: from SN6PR07MB4911.namprd07.prod.outlook.com ([fe80::cd76:e8cc:c0:ebf4]) by SN6PR07MB4911.namprd07.prod.outlook.com ([fe80::cd76:e8cc:c0:ebf4%3]) with mapi id 15.20.1250.028; Tue, 23 Oct 2018 08:48:05 +0000 From: "Joseph, Anoob" To: Thomas Monjalon CC: "Trahe, Fiona" , "dev@dpdk.org" , Akhil Goyal , "De Lara Guarch, Pablo" , "Murthy, Nidadavolu" , "Jacob, Jerin" , "Athreya, Narayana Prasad" , "Dwivedi, Ankur" , "Dabilpuram, Nithin" , "Jayaraman, Ragothaman" , "Srinivasan, Srisivasubramanian" , "Tejasree, Kondoj" Thread-Topic: [dpdk-dev] [PATCH v2 09/33] crypto/octeontx: adds symmetric capabilities Thread-Index: AQHURAQXt7UGG1IsGkSbqxBdoIIoq6T0dFMAgABligCACpPjAIAK5qUAgAtjfACAAErggIACiLSAgAqj7tCABCikAIADj1bggAA3+wCAAa2cQA== Date: Tue, 23 Oct 2018 08:48:05 +0000 Message-ID: References: <1528476325-15585-1-git-send-email-anoob.joseph@caviumnetworks.com> <348A99DA5F5B7549AA880327E580B4358965228A@IRSMSX101.ger.corp.intel.com> <3230031.dhaMjhjEo9@xps> In-Reply-To: <3230031.dhaMjhjEo9@xps> 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=Anoob.Joseph@cavium.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; SN6PR07MB5215; 6:YmNJETPRxuFHguGOeaG+j0Uvr/nDIEt3RToRLgMHtpIw6QAJ9qW2DzB9dvuHUqWxrKG+fHeMZYt9ZfkH/5I0o50ZTKbuvttZSefzb/BBafkdgV/FLiSjbgASy3GN7P50j12eB3AsOwH0DNsbArZ+PbJTTWYMX6oDFqSueaINhAf215SlKJinDBbDTXV0unJEvJr3r2Ha3hlzmOU9Z7bMIV28JoNYiUEDEY45j9h7Q/kd6SkJnHxCmR4l0Tjw4fq0OWViNUw/ujbHuK7ZScJ09bZ82v3u2kf0qRoX1CBFb0h0f8ixicHrjpIdZfu0w/6hSSwe+hZQQ8T2CN/JHJ5vYakicoDj5t5N6l5W7i+fNx7sBTY0KlbnroEQYF0dvBX6ARfkSY6cMDDE2JKwoshXPL7yMLsmc9stA7YyqnYgz08dL+n3fka86XzQUbe2dfYVhye3liATaSDw4v/6UHyCvQ==; 5:DYmzCFmo+Ib5zA8wED7tq0FwU0251ZMKQ4xRsdWuzBZ+wRNhZiEaK3tcq/1w7B5U2Jt/UxhCvEpdsXgE2dYDpdlCQgN1VKg+KTgzfzYjV6nHwKA6vKcWxjY3jz2R48J2qF45OxjxeEHiwpkXcz9P6TV2yD7Mb3/1YhZhNRa4fqA=; 7:mzm3uG7+KLsM/mWx91sbCaSdkEyW92hL43e9IvK4znGvm0EREz1HyCYei9FcHi1qIT0yLGf31FK9jNk9IGKasgw852+dCJDiEzGzKG+SkhhTvw8pOEd/je6nZ8oEVt4dSI6F7UjfeAupBZoppX+uoxXOp8XCjjaUh1L1QzS/RyS9ZSv8KXbjria5Hj25Em3CsaNMvql0uvBzPYttnOsDRMg5foUcTlMDEnhYyLCWFRdBcVrQ/CGxagLPFZN4em6t x-ms-office365-filtering-correlation-id: a1ea8026-3e09-47f7-8ed7-08d638c43fe9 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(5600074)(711020)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB5215; x-ms-traffictypediagnostic: SN6PR07MB5215: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699)(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(10201501046)(3002001)(93006095)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:SN6PR07MB5215; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB5215; x-forefront-prvs: 0834BAF534 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(136003)(376002)(366004)(346002)(13464003)(189003)(199004)(6116002)(3846002)(26005)(42882007)(68736007)(8676002)(81156014)(2906002)(81166006)(2900100001)(11346002)(5660300001)(102836004)(6506007)(53546011)(55236004)(446003)(8936002)(186003)(7696005)(99286004)(476003)(486006)(256004)(76176011)(66066001)(229853002)(478600001)(25786009)(5250100002)(106356001)(305945005)(316002)(54906003)(14454004)(107886003)(74316002)(6916009)(7736002)(93886005)(55016002)(72206003)(97736004)(33656002)(71200400001)(6246003)(9686003)(71190400001)(105586002)(6436002)(4326008)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB5215; H:SN6PR07MB4911.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 3rXxumVqWZSlu6v07BEwo+w6dcf8VOerIpdsIpUp2eIpVsmFADI/JzOyQdzT88iPfL9ZYL4jAUbiTqYYp270wiCR5jPfD/c4EKRLNyK0+5NVJqYaU+7V/E4w9cQPYWkIrzzXOT0PUiFPZYmelt7CaCjGLfL71EMww/PVyNh3/xAr793eYOfAXCLinStuMRPLTgwtsc9zpxRtUhlTM18tKt1yqQVq3fNzrZyt3rW15N6Uo2y1t1FY1+rShLMQeqbMNyFJgcBebm/FqDq1PQ8otKas9w0Acf3DQGH0f4igi/fEGTDBSjENzYvPm52syyCkvVS2uQlrzC5oCeCOOv0BGhrZ1KNx/4Co9o6/6iiLlsc= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1ea8026-3e09-47f7-8ed7-08d638c43fe9 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Oct 2018 08:48:05.4489 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB5215 Subject: Re: [dpdk-dev] [PATCH v2 09/33] crypto/octeontx: adds symmetric capabilities 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: , X-List-Received-Date: Tue, 23 Oct 2018 08:48:08 -0000 Hi Thomas, I had replaced macro with functions when I revised the patch. But when more= devices (with varying capabilities) need to be supported, this can get com= plicated. Macro approach would be simpler in that case. Right now QAT has m= acros and we would like to stick to what is being followed in the community= . Following would be the use case for macros, #define QAT_BASE_GEN1_SYM_CAPABILITIES, \ { CAPABILITES, \ ... \ } #define QAT_EXTRA_GEN2_SYM_CAPABILITIES \ { CAPABILITES, \ ... \ } static const struct rte_cryptodev_capabilities qat_gen1_sym_capabilities[] = =3D { QAT_BASE_GEN1_SYM_CAPABILITIES, RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() }; static const struct rte_cryptodev_capabilities qat_gen2_sym_capabilities[] = =3D { QAT_BASE_GEN1_SYM_CAPABILITIES, QAT_EXTRA_GEN2_SYM_CAPABILITIES, RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() }; Without the macros, we will be required to populate the array there itself = and would mean repetition of GEN1 capabilities. Either approach is fine for= us, but this could complicate things when we add support for ASYM. Since Q= AT is already doing this, is it fine to move to that approach as we add sup= port for ASYM? Or if QAT is to follow any other scheme, I'm fine with adopt= ing that as well. Whatever is simple and uniform would work.=20 Thanks, Anoob > -----Original Message----- > From: Thomas Monjalon > Sent: 22 October 2018 12:22 > To: Joseph, Anoob > Cc: Trahe, Fiona ; dev@dpdk.org; Akhil Goyal > ; De Lara Guarch, Pablo > ; Murthy, Nidadavolu > ; Jacob, Jerin > ; Athreya, Narayana Prasad > ; Dwivedi, Ankur > ; Dabilpuram, Nithin > ; Jayaraman, Ragothaman > ; Srinivasan, Srisivasubramanian > ; Tejasree, Kondoj > > Subject: Re: [dpdk-dev] [PATCH v2 09/33] crypto/octeontx: adds symmetric > capabilities >=20 > External Email >=20 > 22/10/2018 05:49, Joseph, Anoob: > > Hi Fiona, > > > > I do agree that your solution seems to be a neat way for organizing > capabilities. But Akhil & Thomas were against that idea and we had to com= e up > with one array with all capabilities. This would not scale well when we s= tart > supporting devices with varying capabilities. > > > > If your plan is to follow the same approach for asym support, maybe we = will > also follow suit and submit the required patches. > > > > @Akhil, Thomas, thoughts? >=20 > Generally speaking, macros are bad. >=20 > Why cannot you just write functions? > I don't understand your issue. >=20