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 75D76426E8; Sun, 8 Oct 2023 05:11:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB53C402DF; Sun, 8 Oct 2023 05:11:29 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2054.outbound.protection.outlook.com [40.107.93.54]) by mails.dpdk.org (Postfix) with ESMTP id A2EEC402C2 for ; Sun, 8 Oct 2023 05:11:27 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KRdV8915aCb/C1P3pfckPR2mT7tEJTsJwQqI9+4uEET/AU9PXu2ow9CVtx3gtg2QW8mbHZPVD2hmQiUnfaJL6b1I7hlHUGgj01rkYN1BJ2siUdPjkOAll+5SfM3/T7wvrtnWZvid+LlLLIo7saCadmB5plo+mcOTtB3R2Lb4l2YREvWfw/GNTDSOsiJcT9zRRfstogYj2aqJUr+lhneYxs2yhGEABiIQhxvqrlYEqGdRIpwfGJ7Q/4E9yIlQRrGNHJVQFGBtuU7g153z074IvAt3kfb3e4K8qaxrgB9NfwRq/wCTXnaUGF89sGIE70V8T6UzT2vVwC0ptpojndiGhg== 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=Yz/pRuHmSVc1XmhbsOm0+cG+4jzVcM2eP+sC/VzPFFS3tcwTcv/DMRP/VaEmwPfxrYE5xGD72TRL2IXiELr4eHpGXfgjdTygr4zkWIdqZrJ+P1BROckOd66lcztAxaJr2s/sH6InANps5Z0Xdd63mbgV37rLxM2g2/6G14w4nIIwv+8fTmUiVxyUsjEhCj3DGXI+K2C4sVfo3T80Hjt0wy0XKLO6bvDkL12Kgm0qMWMdw/3AU/z3G8dBs7PrlsGTOsnVFNbaF8gpmhtdGMX4lwtp9XsKN2S+B4YsTizhUxbqCo292gVflp40/ERApaqQ/A72gkLuX3C2DupJzEMxcQ== 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=QK2D64PTsKjAR7d60oh6y6GQnTeF5Qhj63a91lnylhJyIXpy4kM6DNfBRaSZrdLlFHF6RTb4WYq80ID3RJ3ISVBNfrbR1IC8PUsP1+fxoOvtBxPoAMtDIAw/5fe7yYRkuNmA9Upcdir005bwomGDUSqXcS7wlK7aFrEqMwUOocswGp7N2emQLY6EQ12I3dYVyzhwUXFcq5915peLJZ0AfPFj6CqFXQrOdyBF2h18hMTy9DRQNueEaY0hnTM5q67ufLt4FQl0SX5yIzuXHWo9sT34VpfQunYNzOV1jNeM5rGgiuBU9dqLVJJI1D7gT35vEGOzP1Q12eFIh1mioe7OFw== Received: from BYAPR05CA0056.namprd05.prod.outlook.com (2603:10b6:a03:74::33) by PH8PR12MB6937.namprd12.prod.outlook.com (2603:10b6:510:1bc::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.36; Sun, 8 Oct 2023 03:11:25 +0000 Received: from MWH0EPF000971E7.namprd02.prod.outlook.com (2603:10b6:a03:74:cafe::80) by BYAPR05CA0056.outlook.office365.com (2603:10b6:a03:74::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.20 via Frontend Transport; Sun, 8 Oct 2023 03:11:25 +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 MWH0EPF000971E7.mail.protection.outlook.com (10.167.243.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.14 via Frontend Transport; Sun, 8 Oct 2023 03:11:25 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) 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; Sat, 7 Oct 2023 20:11:13 -0700 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sat, 7 Oct 2023 20:11:10 -0700 From: Haifei Luo To: CC: , , , , , Dariusz Sosnowski , Suanming Mou , Matan Azrad Subject: [PATCH v4 2/5] common/mlx5: extend HCA attribute query for NSH Date: Sun, 8 Oct 2023 06:10:26 +0300 Message-ID: <20231008031029.30850-3-haifeil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231008031029.30850-1-haifeil@nvidia.com> References: <20230925080746.16438-1-haifeil@nvidia.com> <20231008031029.30850-1-haifeil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E7:EE_|PH8PR12MB6937:EE_ X-MS-Office365-Filtering-Correlation-Id: b304befc-127b-4839-92ee-08dbc7ac41a7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FDtW0x6E2VYgzwdeu2wADno/LzUbzgQZoTqjt0KMOyUyeNUFHGB2GdryG8MONgrFrRIS2nk/jTdcusotOqK8yDJyJHtCuy39ImH+mr/42NQe2VY7Lp38j53riuyv3nUHSGXtVquHDz7bhk6K5kmf5pWxQcUxG0ktUfeIFtNLaJcACtHVUPFP0zLQ6Prvy4ocEg79VZA506OGF7mQrqkQ5RgoC19nhIH8fTJKYNt02/e1R/+ppU1ahsK7YQjvxzR8XHXiqC3DBgViEUsdtaHpVaLa1WLfP0t07sUfQjR+skI+5btjjdHcPcLoe8B7UXCtjZnn12+QHkzpurf26wuyY2OQIz5MFfZH54bugmhbB833oFG3l7bh8Gus4GrA+rkS92IvZQoBUqgEDY4Mgf1hh7ueqG6IHqLmv/EZM6D050iHemh1u3eQM/pjUnC0hPi9dpi9y6A7GMh8iG9BGX1Ek/GrwC8YfMZ2yS0aNveBW1/6ympahp8C/CZL1pVOL7VwRANsl+ZnQHBM/LBFuM+NWn3aANTWTOfWei7HqrG8EUqmS3gOm1YTyLoq/xBahWrn6JibB7p3NDvdKSdAVVRiWWSm5jNQVaw+XvP6FqHQOTvl19L4eEu288bXezeAoT0S8d6yDKTuv5X+mhoqogcKMq5YAogdZFVbNPsIrwW+uw72AJ25GeUL8fqD3tyCBpQq1EglbyVJZfwtoabp/f4OBJ4ApeeqQEVm4TH6EXnbh+O7F22SjC9ulCJ8id+sPeih 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)(376002)(346002)(39860400002)(136003)(396003)(230922051799003)(1800799009)(64100799003)(451199024)(186009)(82310400011)(40470700004)(36840700001)(46966006)(2616005)(1076003)(6286002)(26005)(336012)(16526019)(426003)(40460700003)(55016003)(36756003)(40480700001)(86362001)(82740400003)(356005)(7636003)(107886003)(83380400001)(4326008)(2906002)(478600001)(8676002)(6666004)(7696005)(47076005)(36860700001)(41300700001)(5660300002)(6916009)(316002)(8936002)(54906003)(70586007)(70206006); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2023 03:11:25.1141 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b304befc-127b-4839-92ee-08dbc7ac41a7 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: MWH0EPF000971E7.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6937 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