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 8362EA0A02; Tue, 4 May 2021 19:57:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 595394067E; Tue, 4 May 2021 19:57:17 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2067.outbound.protection.outlook.com [40.107.220.67]) by mails.dpdk.org (Postfix) with ESMTP id 5CF0B410FB for ; Tue, 4 May 2021 19:57:16 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HcOJDcsCFm7vk4eSZEBRPfxhRoS+9x7598PF78uFihF+GDThSL53Uk1wPvmKs2IGw3LcfyH+aZ61e7c3mVJBevx0TSrnyJr2rJdTWizu4bEvzR1zkeEQzu1M/v31sdcWAq53NyvKmdd1tvkEYT30hfuc2NAuDCNrLRmbokOYqOeVyUvoL1HLUrVy16Om3ughhO1tG6fJjJodIJ/WPxIaBxWgG12WONAINMnMLqaeV6ilmcMTM8ZV0LFA8tlHmyKGPN0aNf2NyHlEoMBiPacPoHbuXprxpt2KXKc0Pjt24QLzkrF4zXjAnn3qP3cHAUWJo/FitUp8KT/H/8cKSdU0UA== 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=5+yMpMZHcpWxvo55rWEB6SjMiw3bv9AggldrRGEhyY8=; b=KWEQVMaSofDvp3MnXzjsO+5b7082omZbQ46jOf5WhUn/sE561emAjl45nwqWfxkCzYdzD8nuF44I9xuEwrrHjmrZgUYrGRzSdlv+y5JeCAWFrFq+bqxJ9SX18n5+vafNExrYxWSgvrQ6dMPvNGrJh+VxQtB/ogvweTLLneRqymS09F73S1lJ+PtgozOlZ05DMhgqe1852ieeB1CfJTQ9LIOgwzbKuJ1IrxIm1wWksz3qC65+EsNYvHcX7nddbkqUXJzAESIi3OFzxBBebJfUMHU4QH9HqaxrbAg17rBBE69iYIOhEf2EsJbCrdF+k3niaW8GUZyu4/9xTKwVh1uAFA== 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=5+yMpMZHcpWxvo55rWEB6SjMiw3bv9AggldrRGEhyY8=; b=RE7uY6mpS1b7wzjwM9HWIzJUPlqy9tF2Cp+2hqDZCc9SevdS7yZ401TPFfNPg+Uqh/0NN+aimhsYkAPE1+iMrqQYVaDxy+jnd4wgfUSs3JcDJlIy7VjMQ9UiK1cEKHo7SDAiu5dmWDh5SurYNv6HVm8fxaCBqlHM69itSw9iXN071Rz44lSiYATD0Z360mpifmA15LYFeirquJTS4F/+P6nOFNzL0Ept0hq6I90+ANhlMVuK+ETmxh6e+83Zys3aRPkrB+usSVJfGplqsxrEo8dj77QhHRVLZ4ld3XpizOSSY4yUbT50HY3Ax19HlRTW29Kuk0IVNZH+4PtUVzg/jQ== Received: from DM6PR02CA0142.namprd02.prod.outlook.com (2603:10b6:5:332::9) by DM6PR12MB4532.namprd12.prod.outlook.com (2603:10b6:5:2af::24) 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:57:14 +0000 Received: from DM6NAM11FT047.eop-nam11.prod.protection.outlook.com (2603:10b6:5:332:cafe::47) by DM6PR02CA0142.outlook.office365.com (2603:10b6:5:332::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Tue, 4 May 2021 17:57:14 +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 DM6NAM11FT047.mail.protection.outlook.com (10.13.172.139) 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:57:14 +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:57:12 +0000 From: Matan Azrad To: CC: , , , "Thomas Monjalon" , Dekel Peled Date: Tue, 4 May 2021 20:54:58 +0300 Message-ID: <20210504175500.3385811-14-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: 4143b41b-2771-441a-e10a-08d90f260c7c X-MS-TrafficTypeDiagnostic: DM6PR12MB4532: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1751; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +osLzw19U9NMouiVialnsfSoQ9MvLrStw+EEmionvrlsfK1uXf+WaUxP5Ou78Nc2v3Rh+ntlTz+LwimzCJFlX0BuWsoEAykYzAwFp/MkqPamZ/3KxI9TovV0wS2UPUT38RoNjwLsi8KzMwCCTc12x8qOENloxLmuDpWhYHm7p9lFTwUa3gf21lx9hRzdchVe37fpkyk6Un2Y9Rhuig/2BfC5hatMb8XyyUpnnV/No8oa7TY1YBQRG5f46e1X9b+bxQJBBA/RFKuh2uS+iD0SZ0LEH3pW8yp3YVhhRiqFhrhBmi1ETCOHw9KQRFy2M9R2QKmeK0BonS6xBbtRZYLQomez31tsrQ4ky+9ZOlxhKRgjem0AqwfaKIXVoNWuG/I1lmi5Ny/L/7xvViBSCPtTYjPXe+FeiexM+nsq6QZkVpYCUHMrmVaqDa1fV2LCvhgnHKwqqXCL99d6pbpnHX1d+BeUL94L+Dv5QhRMDueRZIuZE8PURDqGfQ24Ueo2qTUARFEC3XwVI/e/AIw1JSDwA/n5LHTzonUeRcgVLfLLeVEbIyIzKylYmsKgZWZ2v487iee4nC9sOzOen7HQgMvCeMlJK6TErIOnu0CpkDi/87Vr9J1FVxjGEdXpZ0ROrPyqH20YnSMtK9QWsAMfjFAzI94UMcUY+z2bHJfsoJFFqrc= 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)(39860400002)(346002)(396003)(136003)(376002)(46966006)(36840700001)(107886003)(7696005)(82740400003)(70206006)(6916009)(70586007)(36756003)(2906002)(82310400003)(4326008)(16526019)(6286002)(8936002)(26005)(1076003)(6666004)(186003)(336012)(426003)(36860700001)(7636003)(8676002)(2616005)(54906003)(316002)(47076005)(356005)(55016002)(5660300002)(36906005)(478600001)(83380400001)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2021 17:57:14.1141 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4143b41b-2771-441a-e10a-08d90f260c7c 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: DM6NAM11FT047.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4532 Subject: [dpdk-dev] [PATCH v3 13/15] common/mlx5: add crypto register structs and defs 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 Encryption key management requires use of several related registers. This patch adds the relevant structs and values, according to PRM definitions. Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_prm.h | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h index 432c8fdb63..c2cd2d9f70 100644 --- a/drivers/common/mlx5/mlx5_prm.h +++ b/drivers/common/mlx5/mlx5_prm.h @@ -3307,6 +3307,10 @@ enum { enum { MLX5_REGISTER_ID_MTUTC = 0x9055, + MLX5_CRYPTO_OPERATIONAL_REGISTER_ID = 0xC002, + MLX5_CRYPTO_COMMISSIONING_REGISTER_ID = 0xC003, + MLX5_IMPORT_KEK_HANDLE_REGISTER_ID = 0xC004, + MLX5_CREDENTIAL_HANDLE_REGISTER_ID = 0xC005, }; struct mlx5_ifc_register_mtutc_bits { @@ -3324,6 +3328,43 @@ struct mlx5_ifc_register_mtutc_bits { #define MLX5_MTUTC_TIMESTAMP_MODE_INTERNAL_TIMER 0 #define MLX5_MTUTC_TIMESTAMP_MODE_REAL_TIME 1 +struct mlx5_ifc_crypto_operational_register_bits { + u8 wrapped_crypto_operational[0x1]; + u8 reserved_at_1[0x1b]; + u8 kek_size[0x4]; + u8 reserved_at_20[0x20]; + u8 credential[0x140]; + u8 kek[0x100]; + u8 reserved_at_280[0x180]; +}; + +struct mlx5_ifc_crypto_commissioning_register_bits { + u8 token[0x1]; /* TODO: add size after PRM update */ +}; + +struct mlx5_ifc_import_kek_handle_register_bits { + struct mlx5_ifc_crypto_login_bits crypto_login_object; + struct mlx5_ifc_import_kek_bits import_kek_object; + u8 reserved_at_200[0x4]; + u8 write_operation[0x4]; + u8 import_kek_id[0x18]; + u8 reserved_at_220[0xe0]; +}; + +struct mlx5_ifc_credential_handle_register_bits { + struct mlx5_ifc_crypto_login_bits crypto_login_object; + struct mlx5_ifc_credential_bits credential_object; + u8 reserved_at_200[0x4]; + u8 write_operation[0x4]; + u8 credential_id[0x18]; + u8 reserved_at_220[0xe0]; +}; + +enum { + MLX5_REGISTER_ADD_OPERATION = 0x1, + MLX5_REGISTER_DELETE_OPERATION = 0x2, +}; + struct mlx5_ifc_parse_graph_arc_bits { u8 start_inner_tunnel[0x1]; u8 reserved_at_1[0x7]; -- 2.25.1