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 6965542635; Mon, 25 Sep 2023 10:08:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5743E406B7; Mon, 25 Sep 2023 10:08:31 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by mails.dpdk.org (Postfix) with ESMTP id C68754067E for ; Mon, 25 Sep 2023 10:08:28 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y+50THA4jYEjoC/7RfK0otIAdTuFrC4I+vAfYI+/SgfQ1D6cjAN/y1PVpgIabuuRn1MAa3Ou62Z9JhjOkojstpu7YQZvLb9FBp/KoIBjRGLuWYN14rpdglBznzdC2y+gvUZm5Kmq/+9gGDr9qwjMS32RRw7xgPQ2lTM9SO0KbsGfxWg6A9FQdnFsQHe3hNhSgZz5UDptmLuFIRaHMFyTliJlWMWhMSD6rVD/j5Dt4IgI/o36ePDMHeDzFDLDZfC0y2t7dH8obVYKzmd9MtnfEHa8bs5JB1rE/15q43h4UIPhm79X9+dZJJ0uI8hpctE+ZlVNL6VaYl5WYKS5D8+SkA== 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=9wlT0r9TivD92DwhDff1Uw2ZMMUXtu8w/M2X1EjL5Y4=; b=DY0vOa+oONH2FZF4MLk6cZN7OLHMo7TPH/qt2904JgCEEDXOUfCMHf5VKk/dfI42MRTgP7/bwvNoeyFML9IplV7ifoiLwidHdB20p7l6anNSWV7ZLGTjL83K1pdKDjaiq0Ms0/s3m0n54W/zQpoUfBswuSt2RH0FIhgsgtHaDqesGqnkSXY0YvmfYtAj4mzklzZRKaMIEKooid3qdYeTMQyhd/eD7/6Sh3r73lWEk03zLUgXv1UzM+3GQsl3sHtudKw/KrRDgPN3CZCRdRyQ6xWq+on4p+EvW8bPKnK6o/sjcCpI3Z8tWXFkh2+DlDk+QQMD2EA9T0TsXO9Jt9kdIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=9wlT0r9TivD92DwhDff1Uw2ZMMUXtu8w/M2X1EjL5Y4=; b=GYWXRtsuD/pTGkyxNqnF6dAaRycwH3l6r7iDdBdzjvmcAg0TEtCMaSE7DPDT28vqKNmTDUHccmZtHkToHqi6weElPVTAyUhroyTP0bRMnNjOr7A1pzBJyBv902dTgvr4NuYRt7kvgaYw0xa5H1/3rlm6HxRgELGHdlItyQ/AKBGdRiTHTTj3bb0AZZ9sXWV1Nuef3HesxINIOT1u2zANUEea6eTJ4b1SfcvhgwzMKnu4gzBIZRc4Z5vAnZkddjqC6Do98Vte4hgDUgiB1mE/gAVYpfS/aWL6dHGlaZtYhkAeeZFvNF/3QLoQeZd7VM//kXX3aFLA8pKUrn2XuEZlzA== Received: from BYAPR03CA0005.namprd03.prod.outlook.com (2603:10b6:a02:a8::18) by MN0PR12MB6031.namprd12.prod.outlook.com (2603:10b6:208:3cd::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.28; Mon, 25 Sep 2023 08:08:27 +0000 Received: from CO1PEPF000044F2.namprd05.prod.outlook.com (2603:10b6:a02:a8:cafe::df) by BYAPR03CA0005.outlook.office365.com (2603:10b6:a02:a8::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.35 via Frontend Transport; Mon, 25 Sep 2023 08:08:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1PEPF000044F2.mail.protection.outlook.com (10.167.241.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.14 via Frontend Transport; Mon, 25 Sep 2023 08:08:26 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 25 Sep 2023 01:08:14 -0700 Received: from nvidia.com (10.126.231.35) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 25 Sep 2023 01:08:11 -0700 From: Haifei Luo To: CC: , , , , , Dariusz Sosnowski , Suanming Mou , Matan Azrad Subject: [PATCH v3 2/5] common/mlx5: extend HCA attribute query for NSH Date: Mon, 25 Sep 2023 11:07:43 +0300 Message-ID: <20230925080746.16438-3-haifeil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230925080746.16438-1-haifeil@nvidia.com> References: <20230925020921.4607-1-haifeil@nvidia.com> <20230925080746.16438-1-haifeil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail202.nvidia.com (10.129.68.7) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044F2:EE_|MN0PR12MB6031:EE_ X-MS-Office365-Filtering-Correlation-Id: 70c46571-c3f7-4a9e-2275-08dbbd9e98c6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +enYRjFXxdDs1sP2vFRJYGLGHad2spNQ1bbC3nDe90qVLL32FipEGpqfG02EwYKYfnHUbDWf/BFTMiYJTjdWvFa7gZk2riFyeH9A6Mp5iiHXFj9KT9qJQoXEcZ6wkAltCZMSwvuoWt7RC90SglUymjP2RuHQ/UxmEpO+w8VtqfVdh9YO8RJoU3mWU0c8+5d0Fq2pMAV8rH4LIIDl/VS4kfGNaSZseGUooDgHZJx1C8n0Vl0Ii2JNflOJG/MgS13Utkn5ksL0hoFyTKfF866yxrz5t2W8/Y0MUiG+xIiMjvBVfpkCMqseQuREIABl1Yrz40N2oOsNLgY6IQ8Cd6D9mU5xkVlhJ2Hm6LQMykjPyrIW5GA0gOMLLoY9n4Dhyv8G7mYawxcHn4uSxlOBFj/6YH3tH0CVXrLLJiXhxYdDJMtAwv1R3y6foj8ugW+BlKqQETelse1jccY4CMhILD+HWZpQOLovMgw9+jRFASMfXuX1dgSyyqe3yi28S8IzwCI9KV2Pn8J0ZwF7ez8SkXArCYTpt2EEAduhY0sJCJR7aUIckW3eg3t8f5iLrd7sS2UT3hUeazQWN4mfQC60aw3UwfehAGLUhqowxhY2Ez4Kif85MO0VYI/CCCGb4SLAGAf7KEUt6HtJ0acXQdEuRqpuA+syi8MS7oEW1rlzhdNlzCKHp/esh+IsEhwavNZbGwFs+X13F2OM929+Q2TE+nAS97Ygr8nYu23TURV5bUG6xjrjjzmg/RzEYrqocnZNRQR8 X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(346002)(136003)(39860400002)(376002)(396003)(230922051799003)(1800799009)(82310400011)(451199024)(186009)(36840700001)(40470700004)(46966006)(36756003)(83380400001)(40480700001)(40460700003)(86362001)(4326008)(55016003)(8676002)(5660300002)(16526019)(6666004)(7636003)(41300700001)(336012)(8936002)(2616005)(82740400003)(6286002)(26005)(426003)(107886003)(356005)(1076003)(7696005)(47076005)(36860700001)(70586007)(6916009)(2906002)(70206006)(316002)(54906003)(478600001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 08:08:26.7723 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70c46571-c3f7-4a9e-2275-08dbbd9e98c6 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044F2.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6031 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 Add NSH supporting field in two places: 1. New HCA capability indicating NSH is supported 2. New field in "mlx5_ifc_per_protocol_networking_offload_caps_bits" structure Signed-off-by: Haifei Luo Acked-by: Dariusz Sosnowski Acked-by: Suanming Mou --- drivers/common/mlx5/mlx5_devx_cmds.c | 3 +++ drivers/common/mlx5/mlx5_devx_cmds.h | 1 + drivers/common/mlx5/mlx5_prm.h | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index 66a77159a0..830199212e 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -1313,6 +1313,9 @@ mlx5_devx_cmd_query_hca_attr(void *ctx, attr->tunnel_stateless_gtp = MLX5_GET (per_protocol_networking_offload_caps, hcattr, tunnel_stateless_gtp); + attr->tunnel_stateless_vxlan_gpe_nsh = MLX5_GET + (per_protocol_networking_offload_caps, + hcattr, tunnel_stateless_vxlan_gpe_nsh); attr->rss_ind_tbl_cap = MLX5_GET (per_protocol_networking_offload_caps, hcattr, rss_ind_tbl_cap); diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h index e071cd841f..11772431ae 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.h +++ b/drivers/common/mlx5/mlx5_devx_cmds.h @@ -196,6 +196,7 @@ struct mlx5_hca_attr { uint32_t tunnel_stateless_geneve_rx:1; uint32_t geneve_max_opt_len:1; /* 0x0: 14DW, 0x1: 63DW */ uint32_t tunnel_stateless_gtp:1; + uint32_t tunnel_stateless_vxlan_gpe_nsh:1; uint32_t max_lso_cap; uint32_t scatter_fcs:1; uint32_t lro_cap:1; diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h index 51f426c614..f005877dd7 100644 --- a/drivers/common/mlx5/mlx5_prm.h +++ b/drivers/common/mlx5/mlx5_prm.h @@ -1964,7 +1964,9 @@ struct mlx5_ifc_per_protocol_networking_offload_caps_bits { u8 swp_lso[0x1]; u8 reserved_at_23[0x8]; u8 tunnel_stateless_gtp[0x1]; - u8 reserved_at_25[0x4]; + u8 reserved_at_25[0x2]; + u8 tunnel_stateless_vxlan_gpe_nsh[0x1]; + u8 reserved_at_28[0x1]; u8 max_vxlan_udp_ports[0x8]; u8 reserved_at_38[0x6]; u8 max_geneve_opt_len[0x1]; -- 2.27.0