From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0062.outbound.protection.outlook.com [104.47.32.62]) by dpdk.org (Postfix) with ESMTP id 425881B2EF for ; Sat, 21 Oct 2017 17:22:27 +0200 (CEST) Received: from BLUPR0301CA0015.namprd03.prod.outlook.com (10.162.113.153) by BN6PR03MB2691.namprd03.prod.outlook.com (10.173.144.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Sat, 21 Oct 2017 15:22:25 +0000 Received: from BN1BFFO11FD042.protection.gbl (2a01:111:f400:7c10::1:160) by BLUPR0301CA0015.outlook.office365.com (2a01:111:e400:5259::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.156.4 via Frontend Transport; Sat, 21 Oct 2017 15:22:25 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD042.mail.protection.outlook.com (10.58.144.105) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.156.4 via Frontend Transport; Sat, 21 Oct 2017 15:22:24 +0000 Received: from [10.214.81.196] ([10.214.81.196]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v9LFMHqq014025; Sat, 21 Oct 2017 08:22:18 -0700 To: "De Lara Guarch, Pablo" , "dev@dpdk.org" CC: "Doherty, Declan" , "hemant.agrawal@nxp.com" , "Nicolau, Radu" , "borisp@mellanox.com" , "aviadye@mellanox.com" , "thomas@monjalon.net" , "sandeep.malik@nxp.com" , "jerin.jacob@caviumnetworks.com" , "Mcnamara, John" , "Ananyev, Konstantin" , "shahafs@mellanox.com" , "olivier.matz@6wind.com" References: <20171003131413.23846-1-akhil.goyal@nxp.com> <20171006181151.4758-1-akhil.goyal@nxp.com> <20171006181151.4758-4-akhil.goyal@nxp.com> From: Akhil Goyal Message-ID: <9dabdf85-8bd5-26d7-25b2-3503772af2bf@nxp.com> Date: Sat, 21 Oct 2017 20:52:15 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131530729452499235; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(376002)(346002)(39380400002)(39860400002)(2980300002)(1110001)(1109001)(3190300001)(339900001)(24454002)(13464003)(189002)(199003)(93886005)(8656005)(8656005)(230700001)(229853002)(8936002)(65806001)(47776003)(31686004)(83506002)(53936002)(65956001)(97736004)(6246003)(106466001)(33646002)(23676002)(2501003)(2950100002)(105606002)(7416002)(6666003)(5660300001)(65826007)(36756003)(50986999)(356003)(31696002)(2906002)(81166006)(81156014)(54356999)(50466002)(76176999)(68736007)(8676002)(189998001)(305945005)(86362001)(4326008)(58126008)(110136005)(316002)(77096006)(53546010)(54906003)(15650500001)(64126003)(85426001)(498600001)(104016004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2691; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD042; 1:93oGKfiuLNA5X5awMa+NI5HDEveojg1WepPbOcdfDWUPmPa2U4T9Kyq7TgiUXLkLES6qxJNwcJay4i1u7ZZ5pBIoQ/pNwSVvxpLzWDZZQ/L3E7LN9rD7/vtrFq9bOxMf X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 54c33d37-e9db-4700-661b-08d518978874 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4628075)(201703131517081)(2017052603199); SRVR:BN6PR03MB2691; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2691; 3:t+yfxCDqOrdw6+rpQFt9uAc+vUtJHfPwiG9PUMFBN4ao/d+qUXRAm5HA7qjy4+5EGXQ9UMTBR8MuGd3DI9vekts4Z+3VIfgNq1M56gElD7xjLMY9DItieSpoKXQIOOYFprQeqVYkiSqc5UW/tNc+yNzrGsFT7bEO8H8DQV37FUQxFne1s9aL5QDjlzs6MvVIr0nw/bQldcP3TpMCrrcEbkG2+HuI2SVThRmkJA+sYm1zqH8+a2QnKf9jSGln0l5Jwc86sZ3NN9V2Lxsw3oJc2DCKr+ugLuWBeueX9ge8QljxW99amFXebP0sSqYHkL0+L7sq2ta+UbXjGki+54rqr9npnwQoq/9cJ5dEXq8ViQU=; 25:UtBxJIHAHrs91JPtg1xPzewma83ZsqO2TJvydKPQ+CoQZSlam8H5OsLZDsofVyMHW3/07Z93tpEtAUmkVw4mlBOuNUjWTNn4/kCR5Hd4AS/wsj54fNYAjB/NaqDQfg2gWWJrQTzs+hGcjbkowNFDds+aG6xx/CkOgAMS1UHG9You2CVhyPo6CAIElKWFK/0GqeLnIk8HH2GtOOQXbV+18cmtzcirgzN7C/JRSLry8WGimJee8xHl/nzzyABPtvLAI4pSBLCiqRzDgiN2knkpLP2aLiZT/v/ZyBXYOx+H8E+m4ehhv3nrYyDDkiEMVt4lGwrwAikNREWOW4n+BQdrJA== X-MS-TrafficTypeDiagnostic: BN6PR03MB2691: X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2691; 31:v7gpV6zeDhpuTu+7FSsoIRb0ZKHDXuOyrUUcJ7zHO+AMJLSOC1S3XtrGqS5uLOgdQT8S6DgQeUrI86k8F9/6u95oVNPBpwxXVqRIckpnD0qhvTCklmlApPfnyfmktHU6RMokp2yzJDfvPL4sl7kOtM6Bb1R3KoCBnTfq5qHRjKv8MDv80xqknNdfn5/H2+Iiom+YLEznfwu2xIuzS/y8zKshuht0mWkd42PC1Ao6Rus=; 4:tfG1vVwtiBJcj2MeXCzKFG1DfVEvtIy6DQUOKQsRaTpwziAugxjo2Lr6/H3YULG6P3d75dbwNtunQzw6fi1DMFl489LFU/6J5b9wa7lhIkXbl4pQr7SyocTGDwqFw3w7b0AdjHO1gWNWD1YcCkvV+VnHLhIy/fXad5FS4JT0e5+n+RkYOuEkJ+BJOv0cMGK6EAUN9Wm5aPU1YbSncP7oUymVgGaRFZVvVMNRVeb7yyBnQ3OXm1GHyR081oqzxzU4aiEYYhbUMFEr/iPZ0GMuPKGKV3J5PoFwQFEQf2qC9JfM+FMxMLOXLEvH9rEjGm6qpD7ZliAajCsJmf9rMY/1udTTqPtB3Pplx6SqmmAzK00= X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(185117386973197)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(3231020)(100000703101)(100105400095)(6055026)(6096035)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123559100)(20161123563025)(20161123561025)(20161123556025)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR03MB2691; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR03MB2691; X-Forefront-PRVS: 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yYAh4c3H1R+2+7UbEos3m6UHtztmJs8ilrbDjaEqHZv0p7GtXZr+9hdGae5GFNUDXtrb2GY0BPSzIoAj1uQgY8Ndu9aM8Bs4ly79K+LWU5DVXz5atIRSd0Zy3+cZIjFvdjk5KcGtKhI1gyR1cp3ae4Uydw+3ZR8+N1zctFx0RrfuFN4tBXmZpEVdOZqYxnVdH32Wgav4+liHdi6UVdAi+Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2017 15:22:24.8755 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2691 Subject: Re: [dpdk-dev] [PATCH v3 03/12] cryptodev: support security APIs 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: Sat, 21 Oct 2017 15:22:27 -0000 Hi Pablo, On 10/10/2017 7:13 PM, De Lara Guarch, Pablo wrote: > > >> -----Original Message----- >> From: Akhil Goyal [mailto:akhil.goyal@nxp.com] >> Sent: Friday, October 6, 2017 7:12 PM >> To: dev@dpdk.org >> Cc: Doherty, Declan ; De Lara Guarch, Pablo >> ; hemant.agrawal@nxp.com; Nicolau, >> Radu ; borisp@mellanox.com; >> aviadye@mellanox.com; thomas@monjalon.net; sandeep.malik@nxp.com; >> jerin.jacob@caviumnetworks.com; Mcnamara, John >> ; Ananyev, Konstantin >> ; shahafs@mellanox.com; >> olivier.matz@6wind.com >> Subject: [PATCH v3 03/12] cryptodev: support security APIs >> > > ... > >> diff --git a/lib/librte_cryptodev/rte_cryptodev.c >> b/lib/librte_cryptodev/rte_cryptodev.c >> index 327d7e8..7a7c936 100644 >> --- a/lib/librte_cryptodev/rte_cryptodev.c >> +++ b/lib/librte_cryptodev/rte_cryptodev.c >> @@ -488,6 +488,16 @@ rte_cryptodev_devices_get(const char >> *driver_name, uint8_t *devices, >> return count; >> } >> >> +uint16_t >> +rte_cryptodev_get_sec_id(uint8_t dev_id) { >> + if (rte_crypto_devices[dev_id].feature_flags & >> + RTE_CRYPTODEV_FF_SECURITY) >> + return rte_crypto_devices[dev_id].data->sec_id; >> + >> + return INVALID_SEC_ID; > > Is this better than returning an integer? > From a user point of view, I see better to check for negative, > and other similar functions, such as rte_cryptodev_get_dev_id, return an integer. > The API is replaced with another one in v4 which returns a pointer. Thanks, Akhil