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 B5FDBA0524; Fri, 5 Feb 2021 17:50:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 81C5040682; Fri, 5 Feb 2021 17:50:21 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id F10294067B for ; Fri, 5 Feb 2021 17:50:18 +0100 (CET) IronPort-SDR: N4R7aaQNiTy7AXrDFKG+JabltLs2XGSQ4j3QRvVE28ZMHWPZ3Oc3oliMghOZdTws79xI2ALD7G XXDNWDIYdaEQ== X-IronPort-AV: E=McAfee;i="6000,8403,9885"; a="177952149" X-IronPort-AV: E=Sophos;i="5.81,155,1610438400"; d="scan'208";a="177952149" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2021 08:50:18 -0800 IronPort-SDR: oSqI4Mda2jLqy6x2Y8salwNEXvkvUgTU2dJ7HSLkKd+A7Yfe75DC+pHU647mROKR80XC+p2BgM QjG/2xtgjAXA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,155,1610438400"; d="scan'208";a="576756931" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga005.jf.intel.com with ESMTP; 05 Feb 2021 08:50:15 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 5 Feb 2021 08:50:15 -0800 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 5 Feb 2021 08:50:15 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Fri, 5 Feb 2021 08:50:15 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Fri, 5 Feb 2021 08:50:14 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IkR7NO2Oe7uWWKq+ufhNlG3p8Et84sUtdjY4+7dWQfQvl7HZKw4OyuPVxyBQeiJQztdSQPKd7jUrsFsxYCbjFkLzjgD7T/8dZU3UpUuZ1kMxEMaIXNjzdKMmMb1VEdALH4bHBin5BrUrWmeouqysRn80YUZiKJ0uVNdNDQaz6diqTZBfU7q4KsPON3pt05nep1hocaGgSmTCIOAo8mbc3yZBlVIk8MPWYoLm54AE4bpwL4kCkJ0NKC8uVpz5Cp1DcT8Z/jFiB08Y5mio/umsbeAOpX+WHM+Krn1dAP09FNk6g1sw8xlHg9URfrRYhpH3dBLWDapSngo0sRypxTI03w== 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-SenderADCheck; bh=e29gqnmkTnSBnZ5qycP9a/GudkUjGogiioOgAiWcL/o=; b=Z16lEZdF7YRELgX1mKiWDjMEY7wexmqlzZMtbp4J5GhQ7JpM3P7hbbgQkpzMdOIX2gyXnUNAc+7YeJlJKUug3ufTBgPmoynTWfzbiefPxmepPV+Q/nwcv/Btm9M3yGQweYk4Q6RRuscoTloHAl9ZafkH8WrG/RmduQ3aAtAosBQ8cggoMXv1HHBUnr/faxc3ImHFR8Ew8sYgGTvp7Yk+hw2GGzNN5iNcfJ2S2TG7LSx5k14xdpPfnSoVlPa/Z64cPH9ripHjIhcyB8gBELQriRSyOuLPODTKBau92F/Ur+iIuCe1O8/7jW7u170MioC46ifMD4m08HeSM51FGXrckA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e29gqnmkTnSBnZ5qycP9a/GudkUjGogiioOgAiWcL/o=; b=LKDZZBBZWLxqJc9evUtcU1ZMXtxkSTa4C8aDwyYmkuK447hVhYtFcyI9H2hFm3d6RwzeVwo4pjn+dxf2BWxImivMQWGGEWZ8Da23v5t4XG16rNN7/nbz/72IqJIVKVmtTQLypgiC4E9TEZmTVlOhekEd7BApjZkyDiMoipc2X44= Received: from BL0PR11MB3043.namprd11.prod.outlook.com (2603:10b6:208:33::19) by MN2PR11MB4744.namprd11.prod.outlook.com (2603:10b6:208:263::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.17; Fri, 5 Feb 2021 16:50:10 +0000 Received: from BL0PR11MB3043.namprd11.prod.outlook.com ([fe80::d4b2:ee79:7a97:301b]) by BL0PR11MB3043.namprd11.prod.outlook.com ([fe80::d4b2:ee79:7a97:301b%5]) with mapi id 15.20.3805.027; Fri, 5 Feb 2021 16:50:10 +0000 From: "Zhang, Roy Fan" To: Matan Azrad , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "Doherty, Declan" , Somalapuram Amaranath , "Ruifeng Wang" , Ajit Khaparde , Anoob Joseph , "Griffin, John" , "De Lara Guarch, Pablo" , Michael Shamis , Nagadheeraj Rottela , Ankur Dwivedi , Gagandeep Singh , "Jay Zhou" Thread-Topic: [PATCH] cryptodev: support multiple cipher block sizes Thread-Index: AQHW+wLl+j+dDTKmvEadSU1JSiaZLKpJwNWw Date: Fri, 5 Feb 2021 16:50:10 +0000 Message-ID: References: <1612449252-395208-1-git-send-email-matan@nvidia.com> In-Reply-To: <1612449252-395208-1-git-send-email-matan@nvidia.com> Accept-Language: zh-Hans-HK, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [95.44.220.85] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f299d3c5-cf24-484e-bbd1-08d8c9f619e7 x-ms-traffictypediagnostic: MN2PR11MB4744: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: FxeSAAWOJiEOd3yyhZxd+Dj23niPeSWtxfQ92TfDtYz7smIoIGWduJK8toPG1cmrtq9f7MTy31SHjM+l5SyuZqBAuS3l44vfaNL+62Z2M0bF/UGxQ9pMhL1I6YvT2vKnjsRU8AACt2j4niSadQUYPyqvyFFx2DrnWlapVdfPSm/fP3vv8HEEw11BOLjztLIIV3vKyEegnqBUG7yLvIrmMaHX1DpovDjhhj6PgMsYau3bghYJIBZIMqOvEk2PBfG/Xkzl7ieCs6IvPTCM+BRdB9z3HpK/ta8XSRTBJgFjotQlBrjA0uFPYiyDem5Kxmb7wPgemyT8TJT6NaLMXwNkE+cOCBPA0pVSC4MwTDuJIPso1J5xCQALanQSrwTVvg3JIZckuGvyIEvkv4PM8rjhVnY94R6OdJ8KA4elHHk8ZTSXZpdB/8PH3RvBGdEjO1Vdr+KR0kDlDur3wD0UOtDqUi/EstoP8osdVSGKKRhVyyHELr6zFsLpAOgDUeHjgUofXnca5sGjD8syA6ctrD4nkQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR11MB3043.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(396003)(366004)(136003)(346002)(39860400002)(2906002)(66946007)(8936002)(316002)(9686003)(54906003)(186003)(52536014)(53546011)(8676002)(478600001)(5660300002)(6506007)(26005)(76116006)(4326008)(66556008)(55016002)(66476007)(83380400001)(64756008)(71200400001)(33656002)(7416002)(86362001)(7696005)(110136005)(66446008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?Windows-1252?Q?vCumUeOw8VIanjxgJKR+2210YT/y7CHFojefbOvuVwYpQQUJ/4V3OY32?= =?Windows-1252?Q?ppA8WlF2BXUalDPBHEBp8zQll27O1Au+zMEzCwyXyWjC1hNdYU2kfnm7?= =?Windows-1252?Q?q0xw7PpgkFceDPjFOvZ18J6TCxp9cx5TbibZ8uatv6pkXWbhP7c1Xdcc?= =?Windows-1252?Q?qh5MeQQK6+GGVowSgeFGZPpC992tGUVkSZI8yQ7DebBrmUyLyd0OT8uy?= =?Windows-1252?Q?WmMYG9LbPbN7CJX5fxpawwZ0U0Jwb2Iqm3tX6fEZt3peg31BXsi1LSXc?= =?Windows-1252?Q?VdFEtrbpoXt336e29r+kOPGSivwm1+b6or0cTmlva799gQ9fMaTKaJut?= =?Windows-1252?Q?kz8oDxo2Z3o9UrUDnjFZXcEUM3OX+U3Hbj30Tq/h1hSwRCHTf6kPBz5C?= =?Windows-1252?Q?syAebN2/Ed7TDzi+LrC8TfC+Oro2rIyNrZ/B2NW/+tvZZ2Ixu+i4sxen?= =?Windows-1252?Q?u58CtM0udkjiQ2AEEtEFG6kbpGkWSFuT4OAE/uRPTDC4sRxJ8edqliLF?= =?Windows-1252?Q?xuxgUlG/OK/ldUuv7AIJYdRZogNFgdhwlkNMJBry1rIHCxwq7iLpHnH7?= =?Windows-1252?Q?ge8UXVjloki31djY7lsK1C1xqfHOA3/BIYZr1eH41UQWY/pDOg4HTSYX?= =?Windows-1252?Q?OOu7vE5ra4OiEqenvy1qwsnZDFLfqHCo9EF9tXIde0IQ5E8/OVbkqpdM?= =?Windows-1252?Q?kwreFHPi1+0G3seVG8r/hSlnUbroTOFd+UcvcCHpoU2Ajd6NoS+oHOAQ?= =?Windows-1252?Q?JyprEGH9i9lRUQfk6m6/+5qTicrhKjQrpkTFq67OX57Iqn41pmlQT0fE?= =?Windows-1252?Q?a2f+5sxz2AKrXMTkX28C6cwoynRJzelTEY+6ZhXIi0r6gMQlWAagxWIr?= =?Windows-1252?Q?CDyHKUuIKXXSA6HH6k1XvYRlhulzdUeRd9F357oed2kEeT6bZEwZqMxF?= =?Windows-1252?Q?bF37gCoHj4LaKHTg1o1XWThmYho7HW/Yi5ITWkhv1Y2GlPJ4Z5b7KUtS?= =?Windows-1252?Q?RlCeQhaMD2LwSyrE3KN85afSKYtK2gjIRLa4pP9EU/iT0oJuMVdRd595?= =?Windows-1252?Q?CdbiIbk6nNULnaNL7NB5pQdDs/PoU9Gk9ZALr3TJgba87eXxa734Bgbo?= =?Windows-1252?Q?CyUB3xdrfvOBbTw9EwRjIkS1wBkhRVo5Kr+WCTUe16Xqzkss5J6GFb2V?= =?Windows-1252?Q?dI2pQj2J7uJK3pkxpyIqvzfvJvObCogtSXaLZBKhwdw1u6aA+RCzKuPb?= =?Windows-1252?Q?OmizD0iZVfhTAJO4KBnxEFMEcyMM28MSGAd/vm/wwSggoFsJ1qo/Uf9r?= =?Windows-1252?Q?c0OdhVtYe38Ore6GQbRREdRdcWe5XXxUZZdZIfEbFp8wvE2x6ZYqzNvz?= =?Windows-1252?Q?3syi0xIoKYnwikvKr6p6aZAAQDWbKtHHmh44QmNiV33gLRrRi9Ko/JOS?= Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL0PR11MB3043.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f299d3c5-cf24-484e-bbd1-08d8c9f619e7 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Feb 2021 16:50:10.5277 (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: r587XDZ1/2dXuqWenLlVdsin2Ranf3aYY5OvmqttV1A64EhAF2P61wZ+uB36TsYFW7NP3nLYlOReWKBJmHidjA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4744 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] cryptodev: support multiple cipher block sizes 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 Sender: "dev" Hi Matan, It is a good idea to be able to show the varied block sizes of each PMD/alg= o. > -----Original Message----- > From: Matan Azrad > Sent: Thursday, February 4, 2021 2:34 PM > To: dev@dpdk.org > Cc: akhil.goyal@nxp.com; Doherty, Declan ; > Somalapuram Amaranath ; Ruifeng Wang > ; Ajit Khaparde ; > Anoob Joseph ; Zhang, Roy Fan > ; Griffin, John ; De Lar= a > Guarch, Pablo ; Michael Shamis > ; Nagadheeraj Rottela > ; Ankur Dwivedi ; > Gagandeep Singh ; Jay Zhou > Subject: [PATCH] cryptodev: support multiple cipher block sizes [SNIP]=20 > +#define RTE_CRYPTO_CIPHER_BSF_ALL 0x1 > +/* All the sizes from the algorithm standard */ > +#define RTE_CRYPTO_CIPHER_BSF_512_BYTES 0x2 > +#define RTE_CRYPTO_CIPHER_BSF_520_BYTES 0x4 > +#define RTE_CRYPTO_CIPHER_BSF_4048_BYTES 0x8 > +#define RTE_CRYPTO_CIPHER_BSF_4096_BYTES 0x10 > +#define RTE_CRYPTO_CIPHER_BSF_4160_BYTES 0x20 > +#define RTE_CRYPTO_CIPHER_BSF_1M_BYTES 0x40 > + > +/** > * Symmetric Crypto Capability > */ > struct rte_cryptodev_symmetric_capability { > @@ -122,11 +135,19 @@ struct rte_cryptodev_symmetric_capability { > enum rte_crypto_cipher_algorithm algo; > /**< cipher algorithm */ > uint16_t block_size; > - /**< algorithm block size */ > + /**< > + * algorithm block size > + * For algorithms support more than single block size, > + * this is the default block size supported by the > + * driver, all the supported sizes are reflected in the > + * bsf field. > + */ > struct rte_crypto_param_range key_size; > /**< cipher key size range */ > struct rte_crypto_param_range iv_size; > /**< Initialisation vector data size range */ > + uint32_t bsf; > + /**< Block size flags */ The doubt I have is limited block sizes 32-bit bsf can represents. Although= it is good enough now for AES-XTS but it already used 1/4 of all available= representation of the different block sizes. If we are to include more blo= ck sizes for different algorithms we really don't have much room left. Also bsf seems to be a duplication to existing block_size.=20 There should be a better way to describe varied block sizes in capability. > } cipher; > /**< Symmetric Cipher transform capabilities */ > struct { > -- > 1.8.3.1 Regards, Fan