From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7F94C43B84; Thu, 22 Feb 2024 21:52:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 10057402A2; Thu, 22 Feb 2024 21:52:15 +0100 (CET) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2083.outbound.protection.outlook.com [40.107.104.83]) by mails.dpdk.org (Postfix) with ESMTP id 8AE7B4027F for ; Thu, 22 Feb 2024 21:52:13 +0100 (CET) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Le49mmbGNldVy8DlLm8Fb1/yqwNxBQjHYHzJBAFtY7PDAXjk9TBFAGixPGkpwtJNgY8t6ae1VRO7JEcC0R5hEpDeC9IObfPzihzAo3ItWfB+zivCZ7adeMmddWvX5MZ5gXc+WVB0b9kRSZjTHr+fJBAssOK4lcCYr9lfbyX0AXjvRsm4PeIp6+VhTTS+bUHTCt1hhIYg1vuzxzE7/QZhM+zuzo8o5qo3DH6teNlmAkHXpfKbQm6j5Utkd+10exBddlHC8qNsuoCXZHXiucK2l49+uwvptieQHves1kTm/p+vsVnP1yPrqS3zvGCu1gVnrNglOCHerN4d/ZcIHe6V9g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xim6NDCCDmvpKiSYCOTd1JJ2lH/JnDEwWbcMTbE2Grc=; b=TyDovtXFf2w5KstFURE2m9UXJ/SPwtz2j6z3HYnTNeJx9adJVwaSIIJ/ssPN9Td9rXpX/I0nwJLrET4SofuhbKU1Q5QNrlRQslmL07PqnFhrUk2zokvYEYs51VApeWAhQa957w1aIs6NN5eEK7AmCFcKyg1YFILYvgWkREhtoD+5C+y4dTnL0PED7sOkQA5H+sbJkttMhY8b8e1QkMzTYIWXw7T21BfU3xxjyr07ekL4k0eafg0UAtELEydmiujQoKdNK35dTR1PC3r3iYZtO6x9z09YKJIPAiL7Dzvo36ZEysKhMxyWkKTs9a4i2JY52zEArXDKEk1nABCoqKboXA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=dpdk.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xim6NDCCDmvpKiSYCOTd1JJ2lH/JnDEwWbcMTbE2Grc=; b=hisQYs/DOVjLh2ZOlgO+VofWKOhtmcTZCgmKF1WsYXEhd0CL6qhRNxpbuQnUsBsV3WGqng/CSlFvpFu4ruDbmTiHxNVjytxSQsaQlI6fVzJSxa3rGRGQS3WV9ov3DL4cdHuRh7SpNx1b5xSkbBDxRmys9/yZc7HhxKS8gyX4/ec= Received: from AM0PR04CA0032.eurprd04.prod.outlook.com (2603:10a6:208:122::45) by AS8PR08MB8246.eurprd08.prod.outlook.com (2603:10a6:20b:524::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.21; Thu, 22 Feb 2024 20:52:10 +0000 Received: from AM4PEPF00025F9B.EURPRD83.prod.outlook.com (2603:10a6:208:122:cafe::49) by AM0PR04CA0032.outlook.office365.com (2603:10a6:208:122::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.42 via Frontend Transport; Thu, 22 Feb 2024 20:52:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM4PEPF00025F9B.mail.protection.outlook.com (10.167.16.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.0 via Frontend Transport; Thu, 22 Feb 2024 20:52:10 +0000 Received: ("Tessian outbound e358842a0ad8:v228"); Thu, 22 Feb 2024 20:52:10 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: ef62805ec6d7c723 X-CR-MTA-TID: 64aa7808 Received: from 3a3697e9cb7c.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1B1BB409-0322-4E41-8D58-C15A3761649B.1; Thu, 22 Feb 2024 20:52:03 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 3a3697e9cb7c.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 22 Feb 2024 20:52:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CgV3h6BwSGKEqyckVd/h8Jpdvi4ZKBYjFZwuKLGGeKVB7e0H8sL5h6oXflgSUj3qPgNwUfbFCo7A86JWFuVo7N+nidU4GUGWU+hjhreI5Nz8UG5q/vDnm3MfYYEfjmJ4FeNX2GgO4pIQf+/jvg4hWZtY5NxEVQhzjwmDoM66xxbTxfFZD+MA1qNyjG1Ixb4ahqhOd5eEDpLJZPTM0UCCbnWW6PG0QZzm+DOrzvyD0BSug0rpKztHX3wr4SQHTxIH/WVQhKYEUznxRVmBRerFgSMXtJH3LQ+gVlzurjU0qAH6+sJih4lMKd4HtysBnlDMW4EmV7x6gW15u4XnNVi4gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xim6NDCCDmvpKiSYCOTd1JJ2lH/JnDEwWbcMTbE2Grc=; b=SJ1QG43ZXQzmsg/8aCv//2+l37OS+ULM2EcEV3abL+RPo4ZMeGCEQNsXcCrhHIw2Et5h0frDBrO07Is/Kq6pXmWYJiIqZRokC5OyuDzygLlDVFccdZGEea6avw21jDFyMGRSWxfwRjlDyymfbxUKIQAbGM64SFq5ESuLwhjotpAGdijR/ZrkevKvZ0xucJv7dUEiksYSrayelXp+zuBRW31LcyqC+PM1VAlyZSUrFxX7NI3gL8cgZ5Jn8ifMG26SwCxHMyIS6uT1/FSi+2FNiadAkQO+zMoHHzqDM+q0led6nVFqJZGPLGnEJ0y/JiXYrHWTYIUFlk9DPJlGEw4pyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xim6NDCCDmvpKiSYCOTd1JJ2lH/JnDEwWbcMTbE2Grc=; b=hisQYs/DOVjLh2ZOlgO+VofWKOhtmcTZCgmKF1WsYXEhd0CL6qhRNxpbuQnUsBsV3WGqng/CSlFvpFu4ruDbmTiHxNVjytxSQsaQlI6fVzJSxa3rGRGQS3WV9ov3DL4cdHuRh7SpNx1b5xSkbBDxRmys9/yZc7HhxKS8gyX4/ec= Received: from AM0PR08MB5073.eurprd08.prod.outlook.com (2603:10a6:208:15c::27) by DB5PR08MB10048.eurprd08.prod.outlook.com (2603:10a6:10:48e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.24; Thu, 22 Feb 2024 20:52:01 +0000 Received: from AM0PR08MB5073.eurprd08.prod.outlook.com ([fe80::4313:26fc:de38:10d8]) by AM0PR08MB5073.eurprd08.prod.outlook.com ([fe80::4313:26fc:de38:10d8%3]) with mapi id 15.20.7316.023; Thu, 22 Feb 2024 20:52:00 +0000 From: Wathsala Wathawana Vithanage To: Ciara Power , "dev@dpdk.org" CC: "kai.ji@intel.com" , Pablo de Lara , nd Subject: RE: [PATCH 8/8] crypto/ipsec_mb: set and use session ID Thread-Topic: [PATCH 8/8] crypto/ipsec_mb: set and use session ID Thread-Index: AQHZdFMbFf8Vi/U1E0aIRKeRZk0gILEYuKsA Date: Thu, 22 Feb 2024 20:52:00 +0000 Message-ID: References: <20230421131221.1732314-1-ciara.power@intel.com> <20230421131221.1732314-9-ciara.power@intel.com> In-Reply-To: <20230421131221.1732314-9-ciara.power@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: A2700B24720BBD4DBDBEB31866A50A10.0 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: AM0PR08MB5073:EE_|DB5PR08MB10048:EE_|AM4PEPF00025F9B:EE_|AS8PR08MB8246:EE_ X-MS-Office365-Filtering-Correlation-Id: 3292dc1f-348a-47e1-eaa4-08dc33e823cf x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: kJR2t3AukwzTtjrO1bQwJ6FW8OX47lEoXc1yrYiiRQpTuNEttIfhViVe5T5aKxvBnCubnnnZKyzfIQzyfMcXIXuENNsOzIf0Q2v3hS6xcr/EAu5R4/tCVsHcpDuhct7Obzvmw3mVq0TcceUwaFDlmsrMZp+XJVtW9BlA+y6qIup6rEUptgAaNATpYUpNl4KrvSUx+JJO3wT691GjL7Oc+6d7mjwANDhX3ZvV9lytYPphqPxuTZLMFulrW2/WPvYsULdSEG09BxQyiDoOy/MtiVmAbpVLGpzBMQ1y7KL4ZrYgnOSOTBWi2hPsrDDuVcboiPpefNsl+0QbSrK8WdWBxQnvCyyMEdcMTqU4bYaqJauFhgDSrxIy8rx3R2TPGPuabpaVDJI4kr+3rK/FwtloK5blNRrbU+R+mLUlHx7Dqko9hqRocJgHSi1OdpPQXGwQGQyH5KnUCiI7vLhdcFVAr7NC/dNvD5/tx68Ey+NltePdWrVaUuMFtF3B9CJsY/gB5SJDjDpyPdPWL29oevuXMHppSGtIHYcYV0DuFdUOwLZSaoQlDCi2IAkbTzQd/M6m5OytqWsJ7Z1Vrtg2tHu/tfjX/1FcVMQYghPJf1SRoL80x3r+ZtgsVrSGXwFFtY52 X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR08MB5073.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(38070700009); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR08MB10048 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00025F9B.EURPRD83.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a3d159f5-6309-444e-ee36-08dc33e81e0e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JMPhhLAZXQJ5Hl03uxFZMLisGpfzVMC8ILS4kU5YFr74A1y+/YG9KWelB1GcRAlw/EHJD88nyMZTq7eKI8mWLSS1kJsrAxVofdvMkR0tu9B0zQnCSdupoGufah7rTjCZOh9MuT7AAjuuL+UWM49KIBQTW6h0PCplW0/pmh1VJ8Gk5z280bJ9UillGfRfLt7q0nQQgeImBU+JbqfjWmNMbrSbPFLS5w1dgbR79btrTv0U8azSpgzmtVsBxJe7r0LzTdgx4uue206TnZ/ZRC0H6/04anQKwT5C5Z1DKAmA/6TeoCi60d9epzUy8OWffKbo4gO5vukI5gYxesYVJu6Ib9wk/jNlBtaSF7g1jpjucao21HcfE9aWi40nGDDv9/ALHCjTgo1qdW05fS6jwag+GbmXr6qfpSdxhJIXg+aVlltm5Rih6IuJnUDCZZbzHGTxI9g4vI7AWXjGjhCv5vn+sHIHzlgCxpqocqevUHpW23JGl7A31mtXQ52WOT65JviuU23vTjeHLLP2S18bDRVife7E3Kzx9OiM0p3SJhyWzhUj30x86G2CtFubyitSDjyq9KwltajGCLwqiikJGSYN8y0ww4siMGZfg431lrMCVzqXX2edYZU5z5rKZXndcRLMlrrQ8ZZHA2q5ubbR9tBi6RFqK5UD7+DwfLO18qWPiJw= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(36860700004)(46966006)(40470700004); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2024 20:52:10.5556 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3292dc1f-348a-47e1-eaa4-08dc33e823cf X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM4PEPF00025F9B.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8246 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > From: Pablo de Lara >=20 > When creating a session, get the session ID that defines the fixed sessio= n > parameters and store it in the private data. > When retrieving IMB_JOB's, if their internal session ID matches the one i= n the > private session data, these fixed session parameters do not need to be fi= lled > again. >=20 > Signed-off-by: Pablo de Lara > Signed-off-by: Ciara Power Acked-by: Wathsala Vithanage > --- > drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 22 > ++++++++++++++++++++- > drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h | 2 ++ > 2 files changed, 23 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c > b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c > index f23016c9c3..8600f41897 100644 > --- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c > +++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c > @@ -845,6 +845,10 @@ aesni_mb_session_configure(IMB_MGR *mb_mgr, > } > } >=20 > +#if IMB_VERSION(1, 3, 0) < IMB_VERSION_NUM > + sess->session_id =3D imb_set_session(mb_mgr, &sess->template_job); > +#endif > + > return 0; > } >=20 > @@ -977,6 +981,10 @@ aesni_mb_set_docsis_sec_session_parameters( > goto error_exit; > } >=20 > +#if IMB_VERSION(1, 3, 0) < IMB_VERSION_NUM > + ipsec_sess->session_id =3D imb_set_session(mb_mgr, > +&ipsec_sess->template_job); #endif > + > error_exit: > free_mb_mgr(mb_mgr); > return ret; > @@ -1386,6 +1394,9 @@ set_gcm_job(IMB_MGR *mb_mgr, IMB_JOB *job, > const uint8_t sgl, > job->msg_len_to_hash_in_bytes =3D 0; > job->msg_len_to_cipher_in_bytes =3D 0; > job->cipher_start_src_offset_in_bytes =3D 0; > +#if IMB_VERSION(1, 3, 0) < IMB_VERSION_NUM > + imb_set_session(mb_mgr, job); > +#endif > } else { > job->hash_start_src_offset_in_bytes =3D > op->sym->aead.data.offset; > @@ -1470,7 +1481,10 @@ set_mb_job_params(IMB_JOB *job, struct > ipsec_mb_qp *qp, > const IMB_CIPHER_MODE cipher_mode =3D > session->template_job.cipher_mode; >=20 > - memcpy(job, &session->template_job, sizeof(IMB_JOB)); > +#if IMB_VERSION(1, 3, 0) < IMB_VERSION_NUM > + if (job->session_id !=3D session->session_id) #endif > + memcpy(job, &session->template_job, sizeof(IMB_JOB)); >=20 > if (!op->sym->m_dst) { > /* in-place operation */ > @@ -1510,6 +1524,9 @@ set_mb_job_params(IMB_JOB *job, struct > ipsec_mb_qp *qp, > job->u.GCM.ctx =3D &qp_data->gcm_sgl_ctx; > job->cipher_mode =3D IMB_CIPHER_GCM_SGL; > job->hash_alg =3D IMB_AUTH_GCM_SGL; > +#if IMB_VERSION(1, 3, 0) < IMB_VERSION_NUM > + imb_set_session(mb_mgr, job); > +#endif > } > break; > case IMB_AUTH_AES_GMAC_128: > @@ -1534,6 +1551,9 @@ set_mb_job_params(IMB_JOB *job, struct > ipsec_mb_qp *qp, > job->u.CHACHA20_POLY1305.ctx =3D &qp_data- > >chacha_sgl_ctx; > job->cipher_mode =3D > IMB_CIPHER_CHACHA20_POLY1305_SGL; > job->hash_alg =3D > IMB_AUTH_CHACHA20_POLY1305_SGL; > +#if IMB_VERSION(1, 3, 0) < IMB_VERSION_NUM > + imb_set_session(mb_mgr, job); > +#endif > } > break; > default: > diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h > b/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h > index ce9a6e4886..9b7c9edb6d 100644 > --- a/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h > +++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h > @@ -854,6 +854,8 @@ get_digest_byte_length(IMB_HASH_ALG algo) struct > aesni_mb_session { > IMB_JOB template_job; > /*< Template job structure */ > + uint32_t session_id; > + /*< IPSec MB session ID */ > struct { > uint16_t offset; > } iv; > -- > 2.25.1