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 AE04E42630; Mon, 25 Sep 2023 04:10:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1387B402D3; Mon, 25 Sep 2023 04:10:06 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2045.outbound.protection.outlook.com [40.107.243.45]) by mails.dpdk.org (Postfix) with ESMTP id 0368F402E0 for ; Mon, 25 Sep 2023 04:10:05 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y4IXGDcgh6cSFIgKvfL1s0xriyjqZvC9JWRdzx25TfaWPDX1ulGPwBnyz3dVpwubIIH5K3rmJCVEiD2AeXg25QV3qTjwGy3AtJtetPIXn3GiH5Iodr8xPc0Scdz+eL8SLlD8/N2UwkTIHz4qkg/QMMdDXPuD84iuF44tmeso6O1/lTDjyu+6EucBDK84FTBNiwx5CGNWX4mGN++Z8Rdj7tIoX5OHab6MOndHyV5ehxK9WnOl1Mf59ASpguT9jec//dMXVWUZsBtqmonlGt7fPqkQ/h9gSustgYH7Ahb1ZjkLuhyqM+KnsT6rb7SktVYPw8ka8/cuEde5JH5daNvQiA== 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=4OKyyIw+6rLWCNedML7QhgX7PQIswKmXJZrul1fRbFc=; b=eqHBCzFHA6bBIVwW5pCbole8AL0NWsW5aVwQtu+zi1BbeNiipwOaLOaB1BrHBspyFp4Dhjbh2OxuBD0j4noH4GxC3XcuPhRkXluq7wMPPNVWSIyCypupl8vzhrpi7gFcoQC64arS79GFY0C8YcKQx7nL1Qi3gOR1OIMHXUem/vOPsR1L6qIbw35O7w8o5Drn6OjN7QcDeqmQnopEKxRaCxIRCNlmrVUQ3ueNyhHO4vVl/q/vQTUDRTI341IoTSudTd5MhMJAuLcdREyLgztrZftO6icB7O4Cq832c5bA8BDchkvsRGzt5DRxh8i2eoFECimzmFVb8Ve5v5mMm9Ivkw== 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=4OKyyIw+6rLWCNedML7QhgX7PQIswKmXJZrul1fRbFc=; b=f/LpjTMA+6ZuTYdTxycmj2yqEItFL6P8kkUTYFsz77+RVBwzM3Ry8TpLxt8P7FszmFRyLLuPbiDAcdnXcCc9TOvpnbnOPG9P+Xdybj6ANSONuSRIGz1cDXirxA3zKEO2fWh1tg9QxxlKsLdCmygJ/Kvv3VMNjoI6KH64ce/v1vzeiLafaHx7jSv86XYovYwA1LgOPEofeOXGIrEz4bTz2LNuur9Nqo0xFDgvX7seJyXiF9yJK2Uh+KipPhhqdd+0FnltXuzEj7jXZyeMJFTryhG8rquAlRk+IEef5/tWCwyyqb8gGS3ddPPMKACdWD650zoET7G0RahUAjsyZQPp4Q== Received: from MW4P223CA0018.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::23) by MN0PR12MB6003.namprd12.prod.outlook.com (2603:10b6:208:37f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.20; Mon, 25 Sep 2023 02:10:03 +0000 Received: from MWH0EPF000971E4.namprd02.prod.outlook.com (2603:10b6:303:80:cafe::f9) by MW4P223CA0018.outlook.office365.com (2603:10b6:303:80::23) 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 02:10:03 +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 MWH0EPF000971E4.mail.protection.outlook.com (10.167.243.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 02:10:02 +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; Sun, 24 Sep 2023 19:09:44 -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; Sun, 24 Sep 2023 19:09:41 -0700 From: Haifei Luo To: CC: , , , , , Dariusz Sosnowski , Matan Azrad , Suanming Mou Subject: [PATCH v2 2/5] common/mlx5: extend HCA attribute query for NSH Date: Mon, 25 Sep 2023 05:09:17 +0300 Message-ID: <20230925020921.4607-3-haifeil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230925020921.4607-1-haifeil@nvidia.com> References: <20230809074046.121807-1-haifeil@nvidia.com> <20230925020921.4607-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: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail202.nvidia.com (10.129.68.7) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E4:EE_|MN0PR12MB6003:EE_ X-MS-Office365-Filtering-Correlation-Id: ab755446-86ec-42ee-ed48-08dbbd6c8776 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JkpqzWp+HmS60X9HjK6wqUejcSRQewKNNhgUbrdgDH9ogwN2OH6VJDcnx7SYs9XqD+SUVBrzMZo3tJT5r8+ZhB5j1zACClKv0jJID6quTfA1Rho1vwm2boZo3d/ufrYsfB9wZXghg+GGVBPYBd5z9Eh/25dGZW8J6GsSAXso0nXHQpfLyQU1uJN1PSz3AiN2coNgHCz5WensspSh1nXoenz+MvkiQiPruaF5tIXCnrPsAipMvh4+X3LfwZOrQFSLlSaPrveOeX0WcTiM84ue1xe9X1vfFCyGhjWRH/1ZF+m4sUxF/QchbPQL7rRfatU2dgnGnrtg+t6PrHjbRzpNUVezlxVoCEt/ORHcMhc5XpsCxVfT0+tUnmYl57xOBQ1ISauf8nci/OMlUgLTwF3Q0ZlchBA2idSy4Gjoh6nulX06yljI/5e8Yv5zYqZfGXgRAazTV1yAlIdeAY8dsClSP0eWqRH6Qv1To3UfpfEG4JiFKQZTrkkCfa5od+zJlrP8O/K/xRoKhA1Wu4PUOC5q3/FTVUMS2cbrP8l3oo4y8vJf1A86GVM1p8cKEbu0Ymi127bE4hoaKmxI36wVgsx3p6frHP42OXKNI2xylA4UZx6NxTIQfs5AdNksvwyoFrzBaH4zRIzloekkoESgCOnjLlgUIwAkMln5kA2tYSlKXpPYJD/K2FlP/OY8Kuhfof0UsVdsCSeSh3n2d+Zu6ffPGMIRgPiO9OBpR8nZP8iSMXMdzfggA5aEEyhJspGczxCL 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)(396003)(376002)(39860400002)(136003)(230922051799003)(451199024)(1800799009)(186009)(82310400011)(36840700001)(46966006)(40470700004)(36860700001)(7636003)(36756003)(8936002)(41300700001)(70586007)(70206006)(86362001)(316002)(47076005)(4326008)(5660300002)(336012)(6916009)(8676002)(54906003)(83380400001)(478600001)(107886003)(356005)(16526019)(2616005)(6286002)(1076003)(26005)(40460700003)(82740400003)(426003)(6666004)(2906002)(55016003)(40480700001)(7696005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 02:10:02.8330 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ab755446-86ec-42ee-ed48-08dbbd6c8776 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: MWH0EPF000971E4.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6003 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 --- 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