From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0085.outbound.protection.outlook.com [104.47.36.85]) by dpdk.org (Postfix) with ESMTP id 75C441B2F4 for ; Sat, 21 Oct 2017 17:54:43 +0200 (CEST) Received: from MWHPR03CA0006.namprd03.prod.outlook.com (10.175.133.144) by BN3PR03MB2354.namprd03.prod.outlook.com (10.166.74.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.156.4; Sat, 21 Oct 2017 15:54:41 +0000 Received: from BN1BFFO11FD008.protection.gbl (2a01:111:f400:7c10::1:195) by MWHPR03CA0006.outlook.office365.com (2603:10b6:300:117::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.77.21 via Frontend Transport; Sat, 21 Oct 2017 15:54:41 +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 BN1BFFO11FD008.mail.protection.outlook.com (10.58.144.71) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Sat, 21 Oct 2017 15:54:40 +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 v9LFsYLp003886; Sat, 21 Oct 2017 08:54:35 -0700 To: "Ananyev, Konstantin" , "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" References: <20171006181151.4758-1-akhil.goyal@nxp.com> <20171014221734.15511-1-akhil.goyal@nxp.com> <20171014221734.15511-2-akhil.goyal@nxp.com> <2601191342CEEE43887BDE71AB9772585FAAB11D@IRSMSX103.ger.corp.intel.com> From: Akhil Goyal Message-ID: <66a5a72d-ba2f-5310-6cd6-30980d5cb5e6@nxp.com> Date: Sat, 21 Oct 2017 21:24:34 +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: <2601191342CEEE43887BDE71AB9772585FAAB11D@IRSMSX103.ger.corp.intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131530748809827044; (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)(39380400002)(39860400002)(376002)(346002)(2980300002)(1109001)(1110001)(339900001)(3190300001)(189002)(199003)(24454002)(65826007)(77096006)(229853002)(93886005)(189998001)(31696002)(86362001)(36756003)(8936002)(2906002)(5660300001)(85426001)(33646002)(6246003)(104016004)(54906003)(2501003)(58126008)(53936002)(5890100001)(8656005)(8656005)(7416002)(97736004)(4326008)(316002)(110136005)(83506002)(2950100002)(50466002)(65806001)(305945005)(54356999)(50986999)(76176999)(53546010)(64126003)(498600001)(106466001)(105606002)(81166006)(68736007)(230700001)(81156014)(8676002)(65956001)(23676002)(15650500001)(356003)(47776003)(31686004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2354; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD008; 1:UUf4Vxdwvw9WbxiAjpNWJtKYg9ZGlnN8ydUf8lwH0Nd4m7V5e1KBBRzi1otjnPxHYxzhbTR1XCNylvBLESAQ+q6g2Utw4I02gBkiR1UYo+4juDEHByMkH8Mi+h+NflIx X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 22110794-973e-40dd-1024-08d5189c0a4c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4628075)(201703131517081)(2017052603199); SRVR:BN3PR03MB2354; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2354; 3:y2+6B4t+8u4tcrQOINdkM3fm5E+yzMuP2DNY2QscMZOQqh0Pys/TBBm20+ToqRXfbevxhfEO1+py/YAGZxDZzoUzJg71AsjRtOVbx5C4DZdxL9AG34r0YxOMNTKnJvKnPqPcm4q7TWR99ZKhQI4okZvuOm6qMZFrcTtd34C2AY6kgV/p10IkR8IHAfqjaBqPzUCY53ZmOKsDjQ8sVbSWWImnVkJR9NsyjHn1RNrytRTZniKK6fq77KKA9vj33//gGP5JQmzUREEJr6lWoQS6pOVvtHf5fpV+RzmpSePj3RUUQrSS/irhi9XXElaQF5slTF/rkNMQN1aOySSur4FEs/c7ouR3+i01xZaTP1VMJs8=; 25:tUkNDJ/BYx/saijV1qC+/G4DtVzluRSKV8De5vy2gHLvlu0Z2ae+hvMS/LaacdRbc3DVWB8z/FcaquWMkkydU1JL0IlV9ag0dbUi57RviwCj54X2xgfUydTI4k7OaekfhqdqyItnCIcvJEnfVda2VoZVDpKATvpObqy5Mb4BrtBTr0RBx0pGbzwYMqv2+nc7HqxrQDmRtVJ1Pl8sL0mNPPQIxqTBd3GzkSx0XoZpMbmDvPBC5vcEJpBdKvF7y3pcLW2O9npxa6zp2OJ/qz1cDMvnAmCqk4djhFCcp4gJ3l/DvIUzHzQAU0UUTil/96XQukZKKKZ6PDrfLyoLrU2NhQ== X-MS-TrafficTypeDiagnostic: BN3PR03MB2354: X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2354; 31:SzWDPZFyYFT6GTh7W4G1cDgTiEAjxxNwlatqbDsr/f04GsXJorAWhGE6dsRp68olmIyGZ7BB6+/oRftc8Ue3yavi8n5RiYbzFWDrmJ9rBEA2FbHK1MIsN65DixaOCuLKaS9kEDr221ANPyOtG4b8xb6A7Q3p6nsHIfhulVMrErg/AyO18fejEXsKE6NE3SnI3BS7EF8immwp4NXbYzHdPHD+AQG8IKvsch4KpYRjPzI=; 4:2OjYaWETz7CNtIvJwybiGK0gtT2CrfYeg41Owvs5IBIbhwu0b+ArEJCgG3o5YRUer5FNlsQmnf+EL0XYvRyqiAFIMK250axf+LKB7aplUV/CKksEXDjtz5W11qNZbp8rJK8ev87GQgTbCckEdtwCzfq+rST6uWexTaTDx2JrAChNQ18TbFZVamFbY9N7q14Ct6pDDXa3F+EHRn1thbwTytj9r9DOSXrMwi01F3/t4qr5zF8a2WEsCl/YisYHC/DASzCoPHKjdHhob3NbayHuEFxnJPMJmsDYPdsGKFu5T/Y= X-Exchange-Antispam-Report-Test: UriScan:(192374486261705); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(3231020)(6055026)(6096035)(20161123559100)(20161123565025)(20161123561025)(20161123556025)(20161123563025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR03MB2354; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR03MB2354; X-Forefront-PRVS: 046753C63C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20w5Dga36kNj+9w2xbbWbpdpJS2fergulmPVweiAQx2Hpo2Pydk6YR/ELHEkZd7L4L+AX+5B0X6rlWfF4gPvjMa4xo4oX6sK39IAfp56g7jscFcavubv6QDO75PJN19004oVih2J6ouQu9SwIrtyPh/7rgFgq5LZZR7Wpmzs/kg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2017 15:54:40.6863 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 22110794-973e-40dd-1024-08d5189c0a4c 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: BN3PR03MB2354 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: Sat, 21 Oct 2017 15:54:44 -0000 On 10/19/2017 3:00 PM, Ananyev, Konstantin wrote: > > >> + >> +/** >> + * 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 device 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 the >> + * 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 Ok would remove it in v5. > >> + /**< 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 */ >> +}; >