From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 807762935 for ; Thu, 19 Oct 2017 11:30:29 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Oct 2017 02:30:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,400,1503385200"; d="scan'208";a="1207538884" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by fmsmga001.fm.intel.com with ESMTP; 19 Oct 2017 02:30:26 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.49]) by IRSMSX107.ger.corp.intel.com ([169.254.10.239]) with mapi id 14.03.0319.002; Thu, 19 Oct 2017 10:30:24 +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 01/12] lib/rte_security: add security library Thread-Index: AQHTRTqnXGIJNXeUuEWNgrZby5Dp/qLq7pjw Date: Thu, 19 Oct 2017 09:30:23 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772585FAAB11D@IRSMSX103.ger.corp.intel.com> References: <20171006181151.4758-1-akhil.goyal@nxp.com> <20171014221734.15511-1-akhil.goyal@nxp.com> <20171014221734.15511-2-akhil.goyal@nxp.com> In-Reply-To: <20171014221734.15511-2-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmViZTZmYjUtY2NkNi00ZWUxLTg4NzAtN2YyNjM5M2QxZmRmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InFURUxNSjRFekpvbFBTcnVjbmd1WEhnb21FRkdkRnNhNVdhQ3l6MmtTREU9In0= 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 01/12] lib/rte_security: add security library 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:30:29 -0000 > + > +/** > + * Security context for crypto/eth devices > + * > + * Security instance for each driver to register security operations. > + * The application can get the security context from the crypto/eth devi= ce id > + * using the APIs rte_cryptodev_get_sec_ctx()/rte_eth_dev_get_sec_ctx() > + * This structure is used to identify the device(crypto/eth) for which t= he > + * security operations need to be performed. > + */ > +struct rte_security_ctx { > + enum { > + RTE_SECURITY_INSTANCE_INVALID, > + /**< Security context is invalid */ > + RTE_SECURITY_INSTANCE_VALID > + /**< Security context is valid */ > + } state; As a nit - why do you need state now? As I understand if device doesn't have its security context setup properly, then rte_eth_dev_get_sec_ctx() would just return 0. Konstantin=20 > + /**< Current state of security context */ > + void *device; > + /**< Crypto/ethernet device attached */ > + struct rte_security_ops *ops; > + /**< Pointer to security ops for the device */ > + uint16_t sess_cnt; > + /**< Number of sessions attached to this context */ > +};