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 1224145538; Mon, 1 Jul 2024 14:56:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C9BD4427C0; Mon, 1 Jul 2024 14:56:41 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by mails.dpdk.org (Postfix) with ESMTP id 3AFBF42686 for ; Mon, 1 Jul 2024 14:56:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719838601; x=1751374601; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=DlI2OXxhlCdsIKZ/bPEqZLHYhG9S+ZZG1bim9hNVzN8=; b=HoiPnMfjZUFwVkKuZUOaV3lp1CH2jj2WOhn67eLPKMBpKh3D1yF5Ks3L o8a3DBISgZgMj7dfCbJDvYg093xh+a5QsziOmw12lszxdxPTVfVokYuJt pnKptwcL3TsRB+CRPztjriQi04LLV+Witfkb3DL6qRvhf2SueHUgexQZc tnpUPCOuIpnDv0ZkniyNpzDVnSjcDg++nMIffjwuUYh3crJ42o931s09/ p6lJ+binHfvZX8nR/F8tTa//enilScooLDoBT4WP8DdhCnSCPwRIbpttf aO0r5ipWsmDQ2ofjE/+5NcuybRqChoFa9mTdLlOTQVJitBUeTNV6lAy5O g==; X-CSE-ConnectionGUID: H6DZuFIhQJmPW78cFQJQfw== X-CSE-MsgGUID: AQmf+WtJRR+SMiTHtVhw5w== X-IronPort-AV: E=McAfee;i="6700,10204,11120"; a="16784992" X-IronPort-AV: E=Sophos;i="6.09,176,1716274800"; d="scan'208,217";a="16784992" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2024 05:56:38 -0700 X-CSE-ConnectionGUID: 0FymxhGWROydd3hJjMqQlQ== X-CSE-MsgGUID: mOz5DJw7SPy9TddErjWiLQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,176,1716274800"; d="scan'208,217";a="76703958" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmviesa001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 01 Jul 2024 05:56:37 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 1 Jul 2024 05:56:37 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 1 Jul 2024 05:56:36 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 1 Jul 2024 05:56:36 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.41) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 1 Jul 2024 05:56:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gr0193RSSS5sgEik/QmppX9wEh6MxvUxqB1ifH4sc51NDwT1wLNZ4VMmpEiw8VDxtiPHFMwlK32LnV7JLowZ2QRPdpiwwt3+RXXM0Bfi5P3y9urHZ4+oU9x9YcBuhvZRA2i4ZFq5K79aOqmXUsnoh0TKX0Q/gQUsIg2My5b7xg8OnUieLgVzaD3pC5ckI181Mbw/qyTcvQRrWGtyQRQj3mmTlPW6x7khAOt3qbdMkhS1NHZVcl3FH1SYsDudTlq5VYjebutOZnzcYI6Vl2bDr5n0fBIggRuiFmYQSUa48Z4bv02FWsSaBBixI5ROezH+yoWesdbjaZLAcFVcgIwEjQ== 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=HwmGQSwQHqeU3WqP6I88HGxQoE/ji9ZN/YHCH1v0AYg=; b=FRy4tJdHdjD31Y6eLJ3MFIriZhEaMC35U5Zw0eFxj7hHglHHMPgYOgCXv7UlcjM2ORtIal7TUCsE8pdhVQ0idKPNCsRQrJzitH4hTQiNmRfGC3Nw8nxKIisb0v8BhuK+eyoxzaZ1QEdqiD3eVOWnCBb/QuDbTaboM2bnbYbu09EMp+biO76+oSlv9Rr5a6xfzYOeV4staD5MD6PGbR+OnryTBBWSQUSsHqgSWllsYY1OdzfAoeI2NILiFprYPQPvcOQ9FP7KVgtJDLU+jLsHTsy8myU7REUy8BBQ7pgSXvGVpdixg8SP1kKXhYmvQB+Yg9YnkHkzHAIy8suEomM4HA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DS0PR11MB7458.namprd11.prod.outlook.com (2603:10b6:8:145::13) by PH7PR11MB7596.namprd11.prod.outlook.com (2603:10b6:510:27e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.29; Mon, 1 Jul 2024 12:56:34 +0000 Received: from DS0PR11MB7458.namprd11.prod.outlook.com ([fe80::1a9e:53a6:9603:8f79]) by DS0PR11MB7458.namprd11.prod.outlook.com ([fe80::1a9e:53a6:9603:8f79%5]) with mapi id 15.20.7719.028; Mon, 1 Jul 2024 12:56:34 +0000 From: "Ji, Kai" To: Jack Bond-Preston CC: "dev@dpdk.org" , Wathsala Vithanage Subject: Re: [PATCH v4 5/5] crypto/openssl: only set cipher padding once Thread-Topic: [PATCH v4 5/5] crypto/openssl: only set cipher padding once Thread-Index: AQHauNj+3LT4HAC3iEa4o0NVMVKR+7Hh+msj Date: Mon, 1 Jul 2024 12:56:34 +0000 Message-ID: References: <20240603160119.1279476-1-jack.bond-preston@foss.arm.com> <20240607124756.3968704-1-jack.bond-preston@foss.arm.com> <20240607124756.3968704-6-jack.bond-preston@foss.arm.com> In-Reply-To: <20240607124756.3968704-6-jack.bond-preston@foss.arm.com> Accept-Language: en-GB, en-US, en-IE Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DS0PR11MB7458:EE_|PH7PR11MB7596:EE_ x-ms-office365-filtering-correlation-id: 582e19c2-275e-4087-d01b-08dc99cd3c7e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|1800799024|366016|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?1pHeaKze4G0wW9r9uktZI0AQgDzUv85WudgRoRuJAImLhkirEmsNrID051q+?= =?us-ascii?Q?FLXpPTdGzzL8hDRwvs2WwR+AGAXpzJxhVQywWXY/UJzGHlGxJb8kI4GZXEHb?= =?us-ascii?Q?lelBzfFepqYdJwIGeIZQdXkXSF7QjDfA3aiYZnWtIeFYX5tpzPl9MZ6t+Nqu?= =?us-ascii?Q?MKNBgRoFzr2Cbmy8LKdSXkzmH/c63DtGoL0scp8WhGuOO8l3VdI5LZ8p7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ykyn9DcpLMzeLmJbC9fTl+3mDS?= =?us-ascii?Q?1L1Um1g4WNJqo2o6xjrkgCE2eRUe0/mrtLKsMAvvMh80X3/s5YSEHWRfEZNc?= =?us-ascii?Q?ij6tBkxBNW7dd0NliidKsv/Y47hZmrMVF1U7GGXi0QjxUAwvNTrL69t5MmO7?= =?us-ascii?Q?VC0r4e7r3KLZ8pH0eYniazj3TMvPvCdYfipCjm/jnE7avgLrLED0LsM+qS1X?= =?us-ascii?Q?i2idHjsSeUPsxRnWyuzVaqP4g78g1WdKTlZO+ZGjOFWo1PlsYrL8Ha08ZLyF?= =?us-ascii?Q?3/Wm6qvJiUyjGGmSaakNJcI3HY40f88feHfyKBk1e5iwifz2Fw=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7458.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Ms0YS/zL0VGn2zjzM8aGeLi4sl6GIf2fn//VzepmumhRW0JOGBxesDQsAuaY?= =?us-ascii?Q?u6/horwxGHFN2ksIF4nPPIo/fwrxeIJH8+zGdU1YpyVBIu4BFqL8dcOlcc4+?= =?us-ascii?Q?4MRJvdetvETov7TSNBRwpWNYWVvBFbUDZwWF5+R0Gl3IgaMxdpSwuk8bkOY/?= =?us-ascii?Q?zOGnOWOJ7z3/1GqDKFnyusQ0dW1uvCDseRcAR5n2uDPyQ8fjRgtE3RHdYdFU?= =?us-ascii?Q?Y8UMJsaHMX9h70nll7/M/y3MY42C7p+CGzEMWX9TSpiNU/CE40wyqykDrj8f?= =?us-ascii?Q?g/tubTnRGXnkEiqS7RovaKuYrju2tgU8zxmc9CoXCzYsH0ReMbLS/Q3vCUSQ?= =?us-ascii?Q?1rYYon651/LcI8Ei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ii?Q?vz3btk6B9191FIhIXv+XBLZhzYXw0AkKaqfxuuBFhr99TFWv8yz2UIXWKfQL?= =?us-ascii?Q?3R2Jme/ESsosIqvTQ/AV8Kkatsh5kaYtrhyoUnsWwBcu748Nz9ce79MkAb5a?= =?us-ascii?Q?AHYoFotkMrx2wxh3oa3cEvWkvceofRf+ouoA8wkrO005pCS/wnDJyT651N7M?= =?us-ascii?Q?dSHxekoZIqt5y7Be0vfxNK/EkH7EfYDUldAKlzzdSl5J3t12UPEs8ZKh4NaD?= =?us-ascii?Q?jcK4X8ZMP7hcGbSUaA2vTopLxIcl4RnNfkNxLmj/rmYEzcwF0kh0DfZ72EbC?= =?us-ascii?Q?15RaO42oSdyGCLrwSJ8=3D?= Content-Type: multipart/alternative; boundary="_000_DS0PR11MB74587C31B99403F887950DD981D32DS0PR11MB7458namp_" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7458.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 582e19c2-275e-4087-d01b-08dc99cd3c7e X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jul 2024 12:56:34.1837 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: CEBAOz/8PBLWT/QzbHrrAoLnp7vLYzuOAFVrV4FnLuQ0JI/zZEB/88xOWlMW/H4vDlvyNyyBwQITmXN/5MdCxQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7596 X-OriginatorOrg: intel.com 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 --_000_DS0PR11MB74587C31B99403F887950DD981D32DS0PR11MB7458namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Acked-by: Kai Ji ________________________________ From: Jack Bond-Preston Sent: 07 June 2024 13:47 To: Ji, Kai Cc: dev@dpdk.org ; Wathsala Vithanage Subject: [PATCH v4 5/5] crypto/openssl: only set cipher padding once Setting the cipher padding has a noticeable performance footprint, and it doesn't need to be done for every call to process_openssl_cipher_{en,de}crypt(). Setting it causes OpenSSL to set it on every future context re-init. Thus, for every buffer after the first one, the padding is being set twice. Instead, just set the cipher padding once - when configuring the session parameters - avoiding the unnecessary double setting behaviour. This is skipped for AEAD ciphers, where disabling padding is not necessary. Throughput performance uplift measurements for AES-CBC-128 encrypt on Ampere Altra Max platform: 1 worker lcore | buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift | |-----------------+---------------+--------------------+----------| | 64 | 2.97 | 3.72 | 25.2% | | 256 | 8.10 | 9.42 | 16.3% | | 1024 | 14.22 | 15.18 | 6.8% | | 2048 | 16.28 | 16.93 | 4.0% | | 4096 | 17.58 | 17.97 | 2.2% | 8 worker lcores | buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift | |-----------------+---------------+--------------------+----------| | 64 | 21.27 | 29.85 | 40.3% | | 256 | 60.05 | 75.53 | 25.8% | | 1024 | 110.11 | 121.56 | 10.4% | | 2048 | 128.05 | 135.40 | 5.7% | | 4096 | 139.45 | 143.76 | 3.1% | Signed-off-by: Jack Bond-Preston Reviewed-by: Wathsala Vithanage --- drivers/crypto/openssl/rte_openssl_pmd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/open= ssl/rte_openssl_pmd.c index 7e2e505222..101111e85b 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -619,6 +619,8 @@ openssl_set_session_cipher_parameters(struct openssl_se= ssion *sess, return -ENOTSUP; } + EVP_CIPHER_CTX_set_padding(sess->cipher.ctx, 0); + return 0; } @@ -1124,8 +1126,6 @@ process_openssl_cipher_encrypt(struct rte_mbuf *mbuf_= src, uint8_t *dst, if (EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, iv) <=3D 0) goto process_cipher_encrypt_err; - EVP_CIPHER_CTX_set_padding(ctx, 0); - if (process_openssl_encryption_update(mbuf_src, offset, &dst, srclen, ctx, inplace)) goto process_cipher_encrypt_err; @@ -1174,8 +1174,6 @@ process_openssl_cipher_decrypt(struct rte_mbuf *mbuf_= src, uint8_t *dst, if (EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, iv) <=3D 0) goto process_cipher_decrypt_err; - EVP_CIPHER_CTX_set_padding(ctx, 0); - if (process_openssl_decryption_update(mbuf_src, offset, &dst, srclen, ctx, inplace)) goto process_cipher_decrypt_err; -- 2.34.1 --_000_DS0PR11MB74587C31B99403F887950DD981D32DS0PR11MB7458namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Acked-by: Kai Ji <kai.ji@intel.com>

From: Jack Bond-Preston <= ;jack.bond-preston@foss.arm.com>
Sent: 07 June 2024 13:47
To: Ji, Kai <kai.ji@intel.com>
Cc: dev@dpdk.org <dev@dpdk.org>; Wathsala Vithanage <wathsa= la.vithanage@arm.com>
Subject: [PATCH v4 5/5] crypto/openssl: only set cipher padding once=
 
Setting the cipher padding has a noticeable perfor= mance footprint,
and it doesn't need to be done for every call to
process_openssl_cipher_{en,de}crypt(). Setting it causes OpenSSL to set
it on every future context re-init. Thus, for every buffer after the
first one, the padding is being set twice.

Instead, just set the cipher padding once - when configuring the session parameters - avoiding the unnecessary double setting behaviour. This is
skipped for AEAD ciphers, where disabling padding is not necessary.

Throughput performance uplift measurements for AES-CBC-128 encrypt on
Ampere Altra Max platform:
1 worker lcore
|   buffer sz (B) |   prev (Gbps) |   optimis= ed (Gbps) |   uplift |
|-----------------+---------------+--------------------+----------|
|            &n= bsp; 64 |          2.97 | = ;            &n= bsp; 3.72 |    25.2% |
|             2= 56 |          8.10 | &nbs= p;             = 9.42 |    16.3% |
|            1024 |&= nbsp;        14.22 |   &n= bsp;          15.18 | &nb= sp;   6.8% |
|            2048 |&= nbsp;        16.28 |   &n= bsp;          16.93 | &nb= sp;   4.0% |
|            4096 |&= nbsp;        17.58 |   &n= bsp;          17.97 | &nb= sp;   2.2% |

8 worker lcores
|   buffer sz (B) |   prev (Gbps) |   optimis= ed (Gbps) |   uplift |
|-----------------+---------------+--------------------+----------|
|            &n= bsp; 64 |         21.27 | &nbs= p;            29.85 = |    40.3% |
|             2= 56 |         60.05 |  &nb= sp;           75.53 |&nbs= p;   25.8% |
|            1024 |&= nbsp;       110.11 |    &= nbsp;        121.56 |    = 10.4% |
|            2048 |&= nbsp;       128.05 |    &= nbsp;        135.40 |   &= nbsp; 5.7% |
|            4096 |&= nbsp;       139.45 |    &= nbsp;        143.76 |   &= nbsp; 3.1% |

Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/open= ssl/rte_openssl_pmd.c
index 7e2e505222..101111e85b 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -619,6 +619,8 @@ openssl_set_session_cipher_parameters(struct openssl_se= ssion *sess,
            &nb= sp;    return -ENOTSUP;
         }
 
+       EVP_CIPHER_CTX_set_padding(sess->c= ipher.ctx, 0);
+
         return 0;
 }
 
@@ -1124,8 +1126,6 @@ process_openssl_cipher_encrypt(struct rte_mbuf *mbuf_= src, uint8_t *dst,
         if (EVP_EncryptInit_ex(ctx= , NULL, NULL, NULL, iv) <=3D 0)
            &nb= sp;    goto process_cipher_encrypt_err;
 
-       EVP_CIPHER_CTX_set_padding(ctx, 0); -
         if (process_openssl_encryp= tion_update(mbuf_src, offset, &dst,
            &nb= sp;            srcle= n, ctx, inplace))
            &nb= sp;    goto process_cipher_encrypt_err;
@@ -1174,8 +1174,6 @@ process_openssl_cipher_decrypt(struct rte_mbuf *mbuf_= src, uint8_t *dst,
         if (EVP_DecryptInit_ex(ctx= , NULL, NULL, NULL, iv) <=3D 0)
            &nb= sp;    goto process_cipher_decrypt_err;
 
-       EVP_CIPHER_CTX_set_padding(ctx, 0); -
         if (process_openssl_decryp= tion_update(mbuf_src, offset, &dst,
            &nb= sp;            srcle= n, ctx, inplace))
            &nb= sp;    goto process_cipher_decrypt_err;
--
2.34.1

--_000_DS0PR11MB74587C31B99403F887950DD981D32DS0PR11MB7458namp_--