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 EBC18A0A02; Tue, 4 May 2021 19:56:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4C004068E; Tue, 4 May 2021 19:56:06 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2049.outbound.protection.outlook.com [40.107.237.49]) by mails.dpdk.org (Postfix) with ESMTP id 026304068E for ; Tue, 4 May 2021 19:56:05 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YsSpJupdjRj97xsF6dKsJSAGpFs4PYLiWDdhJy9QDadL8BiIn2y5EAVXNX21w/euD2j8ymVFStB1F+7sXKn3cx8erbZwjDu3wzPm1HM5GxtcqvYvwwdjGDppyCcpkIWDR3x73aePt4dhuBliMalnkYqmU2Kau+7p7VWmlOb0oKmA+NIK1hVrlNHUR9knxRdfbHouLt0mSb7L+HcFfmrQJBO1r0dNCwO6gWx9JOS1tAIt0m+wtEu75VOWlaCOaODmBlc1vqreRtNrNx7t0LDfoPbanaQdzzp8J7/bjgSNFHdZuB4AlQHbA38YGZIrUmGykHDSZaLbnnA4Mo2VhIbtcQ== 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=xI/cBrNreW1ghKjOyMAG24nLoCDig9vyRrCXyiNA+p0=; b=E+K+RyTFf1wNBquX4LZSS3FNjnslDskK5F1F2GxyttaeW2sTJ38lMhg4ODJPbVQzle9KzCCmT292eNikqUsBNPb5V2cY5xuMAX0AEbMHjKqx/572nnQp/RqktDAXsz2RNRXBtEilEpIQKDtzx+jNY2u46CrEhA8VCCY2e8jVivQk1d5cQsmSG1I2JEtGyXsuJa/iFiXo4muJTATcf32kr55npRdHVqlx6mXYWcFsqDR5IvCbw4taOCgJDcfq81bWk4fa1DOJk0mNTAgqa1T5tHwaylQ8SPymBbm1KzfhUxljizEObzjqFHsp2sU+b6UmUXtirgAgAry7dfbV3i/kHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=monjalon.net smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xI/cBrNreW1ghKjOyMAG24nLoCDig9vyRrCXyiNA+p0=; b=TgKtX2Gb3vykKMsxJPXSNGHSVZZpJC63b+YTiH7/byUZkGe1dYdZc3WP/82GbdqOZ6g1LigYD+VDapmn9DlPutRokQOadl60rl2YCATWpBfe5RM47fLCxawmoHB9MRs+33d9bhyH2sWiKtXW3kWV4m2iIgotIjCGjDdtvWwB8ugIRNhUZNCE7UyNBXTqlYZUiCIpLal4gi7Xi45kGEEV+NlB4XDbvgA+HsI8ucm/JPrshLU01kqVlhcMXkO5DSBJBs9CCj2NSvyDCaib+7YBz/ZBo2BGDwPy9aErDOlZ5UdLnVvV+sfXk5xy97m5zg56IrD4T+AsjVFfXGiGvK9XCw== Received: from DM5PR12CA0008.namprd12.prod.outlook.com (2603:10b6:4:1::18) by DM6PR12MB4153.namprd12.prod.outlook.com (2603:10b6:5:212::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.41; Tue, 4 May 2021 17:56:01 +0000 Received: from DM6NAM11FT045.eop-nam11.prod.protection.outlook.com (2603:10b6:4:1:cafe::cc) by DM5PR12CA0008.outlook.office365.com (2603:10b6:4:1::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24 via Frontend Transport; Tue, 4 May 2021 17:56:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT045.mail.protection.outlook.com (10.13.173.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4087.32 via Frontend Transport; Tue, 4 May 2021 17:56:01 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 4 May 2021 17:55:59 +0000 From: Matan Azrad To: CC: , , , "Thomas Monjalon" , Dekel Peled Date: Tue, 4 May 2021 20:54:49 +0300 Message-ID: <20210504175500.3385811-5-matan@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210504175500.3385811-1-matan@nvidia.com> References: <20210429154335.2820028-1-matan@nvidia.com> <20210504175500.3385811-1-matan@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4bb89a94-eba6-45ec-4bad-08d90f25e0ed X-MS-TrafficTypeDiagnostic: DM6PR12MB4153: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3826; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qDlwM0464bS30uO7eRrv5xFF2kuZZ/zT9hHPnVXVyurKNm6BSay07xnmpQ9bW4sjPwAQ4lypSaatYXo5qJ4VZkF7B9vXNn7ET5c32QOG109NF4czGzzyEEf7XmxJ1H1wP7olzP44jn7C+KTuUD8hWoBFle3iRdNM/bMXCi2sK6luvTAns3tkdG1SVqiFpKYeMUCHhbf5wMP7cWdKge6JIAWPB8drhnyRMi8zkpnc/pRc0BEIndiZlyWwsGwem1mBaav/BiMz2txFlUqikjMbqolj3h7Y1T3irXOctPcwGFC4qtPh1E72+2S7pfWkz7pbqsNYts7pWzflOMtiIn0xLEQgRFwiBTjPFA1Xu2gW/P0BoauG3RGc/y2LaBZOzPevNB66CmjTtAn8jU8+E8dTm0NkjyZ+CBPIw3i2EHVUGyxDa7p4R2ogkQUXe+nCkFNUGKJp6qafxf3FAqx2PSY16FtNRICfRmTDv4Fy6x0fLuhD8DCHR0o+iL56yu9BGp8HhcncapjbbEOw65XsL5Y6mT3YtjOfar21lReF4XgeJTLY5Z9xqIjKerU9l06/sIvJHCrOb5KNjbbmCUaFSNSedyArMLmZJNvYC+j1jrwkiYWIGhMLM89yDZdb3xbp2aGMWIlshrkVTzoK42tKYkqBA6nc6BdC9mDWIkfV7iasNtI= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(376002)(136003)(39860400002)(396003)(346002)(36840700001)(46966006)(4326008)(2616005)(26005)(5660300002)(356005)(8936002)(478600001)(70586007)(70206006)(2906002)(36756003)(7636003)(86362001)(55016002)(16526019)(1076003)(82310400003)(186003)(83380400001)(6286002)(7696005)(36906005)(336012)(316002)(47076005)(6916009)(36860700001)(426003)(107886003)(82740400003)(54906003)(6666004)(8676002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2021 17:56:01.0420 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4bb89a94-eba6-45ec-4bad-08d90f25e0ed X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT045.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4153 Subject: [dpdk-dev] [PATCH v3 04/15] common/mlx5: add HCA cap for AES-XTS crypto 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" From: Dekel Peled Update the PRM structure and HCA capabilities reading, to include relevant capabilities for AES-XTS crypto. Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.c | 3 +++ drivers/common/mlx5/mlx5_devx_cmds.h | 2 ++ drivers/common/mlx5/mlx5_prm.h | 5 ++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index a0bf0d3009..7ca767944e 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -771,6 +771,9 @@ mlx5_devx_cmd_query_hca_attr(void *ctx, MLX5_GET(cmd_hca_cap, hcattr, umr_indirect_mkey_disabled); attr->umr_modify_entity_size_disabled = MLX5_GET(cmd_hca_cap, hcattr, umr_modify_entity_size_disabled); + attr->crypto = MLX5_GET(cmd_hca_cap, hcattr, crypto); + if (attr->crypto) + attr->aes_xts = MLX5_GET(cmd_hca_cap, hcattr, aes_xts); if (attr->qos.sup) { MLX5_SET(query_hca_cap_in, in, op_mod, MLX5_GET_HCA_CAP_OP_MOD_QOS_CAP | diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h index 870bdb6b30..28ade5bbc4 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.h +++ b/drivers/common/mlx5/mlx5_devx_cmds.h @@ -137,6 +137,8 @@ struct mlx5_hca_attr { uint32_t qp_ts_format:2; uint32_t regex:1; uint32_t reg_c_preserve:1; + uint32_t crypto:1; /* Crypto engine is supported. */ + uint32_t aes_xts:1; /* AES-XTS crypto is supported. */ uint32_t regexp_num_of_engines; uint32_t log_max_ft_sampler_num:8; uint32_t geneve_tlv_opt; diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h index 2e5e42f6e9..a8fbfbb0f5 100644 --- a/drivers/common/mlx5/mlx5_prm.h +++ b/drivers/common/mlx5/mlx5_prm.h @@ -1427,7 +1427,10 @@ struct mlx5_ifc_cmd_hca_cap_bits { u8 sq_ts_format[0x2]; u8 rq_ts_format[0x2]; u8 reserved_at_444[0x1C]; - u8 reserved_at_460[0x10]; + u8 reserved_at_460[0x8]; + u8 aes_xts[0x1]; + u8 crypto[0x1]; + u8 reserved_at_46a[0x6]; u8 max_num_eqs[0x10]; u8 reserved_at_480[0x3]; u8 log_max_l2_table[0x5]; -- 2.25.1