From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akhil Goyal Subject: Re: [PATCH v4 06/12] ethdev: support security APIs Date: Sat, 21 Oct 2017 21:30:57 +0530 Message-ID: <62779229-7c2f-f293-99f7-17cb4b6f5b26@nxp.com> References: <20171006181151.4758-1-akhil.goyal@nxp.com> <20171014221734.15511-1-akhil.goyal@nxp.com> <20171014221734.15511-7-akhil.goyal@nxp.com> <2601191342CEEE43887BDE71AB9772585FAAB0F4@IRSMSX103.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit 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" , "shahafs@mellanox.com" , "olivier.matz@6wind.com" To: "Ananyev, Konstantin" , "dev@dpdk.org" Return-path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0046.outbound.protection.outlook.com [104.47.33.46]) by dpdk.org (Postfix) with ESMTP id DDDCF1B2F7 for ; Sat, 21 Oct 2017 18:01:06 +0200 (CEST) In-Reply-To: <2601191342CEEE43887BDE71AB9772585FAAB0F4@IRSMSX103.ger.corp.intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Konstantin, On 10/19/2017 2:53 PM, Ananyev, Konstantin wrote: > Hi guys, > >> -----Original Message----- >> From: Akhil Goyal [mailto:akhil.goyal@nxp.com] >> Sent: Saturday, October 14, 2017 11:17 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 v4 06/12] ethdev: support security APIs >> >> From: Declan Doherty >> >> rte_flow_action type and ethdev updated to support rte_security >> sessions for crypto offload to ethernet device. >> >> Signed-off-by: Boris Pismenny >> Signed-off-by: Aviad Yehezkel >> Signed-off-by: Radu Nicolau >> Signed-off-by: Declan Doherty >> --- >> lib/librte_ether/rte_ethdev.c | 11 +++++++++++ >> lib/librte_ether/rte_ethdev.h | 18 ++++++++++++++++-- >> lib/librte_ether/rte_ethdev_version.map | 1 + >> 3 files changed, 28 insertions(+), 2 deletions(-) >> >> diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c >> index 0b1e928..9520f1e 100644 >> --- a/lib/librte_ether/rte_ethdev.c >> +++ b/lib/librte_ether/rte_ethdev.c >> @@ -301,6 +301,17 @@ rte_eth_dev_socket_id(uint16_t port_id) >> return rte_eth_devices[port_id].data->numa_node; >> } >> >> +void * >> +rte_eth_dev_get_sec_ctx(uint8_t port_id) >> +{ >> + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, NULL); >> + >> + if (rte_eth_devices[port_id].data->dev_flags & RTE_ETH_DEV_SECURITY) > > > As you don't currently support MP, it is probably worth to add somewhere > (here or at PMD layer) check for process type. > Something like: > if (rte_eal_process_type() != RTE_PROC_PRIMARY) > return NULL; > or so. > Konstantin > > The MP issue is resolved as per my understanding in the v4. SO I believe this check is not required anymore. Do you see any issue in MP. -Akhil