From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 567351B1AA for ; Thu, 19 Oct 2017 11:23:34 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Oct 2017 02:23:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,400,1503385200"; d="scan'208";a="164443906" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by fmsmga005.fm.intel.com with ESMTP; 19 Oct 2017 02:23:29 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX151.ger.corp.intel.com (163.33.192.59) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 19 Oct 2017 10:23:29 +0100 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.49]) by irsmsx111.ger.corp.intel.com ([169.254.2.30]) with mapi id 14.03.0319.002; Thu, 19 Oct 2017 10:23:29 +0100 From: "Ananyev, Konstantin" To: Akhil Goyal , "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" , "shahafs@mellanox.com" , "olivier.matz@6wind.com" Thread-Topic: [PATCH v4 06/12] ethdev: support security APIs Thread-Index: AQHTRTq6qvmrsTvHV0KGb3ZUg0z20aLq6+5g Date: Thu, 19 Oct 2017 09:23:28 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772585FAAB0F4@IRSMSX103.ger.corp.intel.com> References: <20171006181151.4758-1-akhil.goyal@nxp.com> <20171014221734.15511-1-akhil.goyal@nxp.com> <20171014221734.15511-7-akhil.goyal@nxp.com> In-Reply-To: <20171014221734.15511-7-akhil.goyal@nxp.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOGIzYTU1ZDgtZmVhNy00MTdiLWE3ZGEtZmNmNDA2NTRkOTEzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkE1RFo4UDNVanZMWXRJNWFrekdWZkhUcEkrcVdBVXpYY1wvRlN4ekZIakxrPSJ9 x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 06/12] ethdev: 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: Thu, 19 Oct 2017 09:23:34 -0000 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@mell= anox.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 >=20 > From: Declan Doherty >=20 > rte_flow_action type and ethdev updated to support rte_security > sessions for crypto offload to ethernet device. >=20 > 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(-) >=20 > 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; > } >=20 > +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() !=3D RTE_PROC_PRIMARY) return NULL; or so. Konstantin