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 9692B43016; Wed, 9 Aug 2023 09:41:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 71B6943273; Wed, 9 Aug 2023 09:41:39 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2065.outbound.protection.outlook.com [40.107.92.65]) by mails.dpdk.org (Postfix) with ESMTP id 4D48F43261 for ; Wed, 9 Aug 2023 09:41:37 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jTa6PR8nMaQpLdN9noudj/E+PqoN/id6P5i/u6WUQaKrz+OEXvFkQL6rPQo4fLL9vef0gbeT6W85i82L21AuoqapoZCJCrQXjrd4kENN3XK6TBz6J+lyELfxs/Euag/VQfdKfjvdedWiAV4m6GIhSiA4NRd8qEB9AqOJVQcX0k2qDaKHnRmYVj0c22sY5kg6EDH2BaFWCq0QWHeyFT7Uin/XC8sqKKZYAijc3FhXewBlptaiPUYFSLRPkz++P6B0kl5PYW2UNRwQ3rBEW2sJX+JcqTE2joT6eJm+lD1FuTnZsOcGnrR3ltywj2zGH8AMvxKhvll/9ShHk9v/wFpBGQ== 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=jf7cdNkcGo2KqyvJZiSMIl7EWgjQEV3JfZnOamgKRB8=; b=DcA08N/JgEKaq+77Fugrj2F5T8i1nQHVZl/WKEgKwEIQyrmhSdCETF8cs+771aHDi7jFw8qo1ynHOV3d3ybmUBcH+p353FG/3xDRJManpIgM68yGV14pRQZHrJFKccD8RWg50OCLnyjdw/0fPjRwNUXUDuTarw0sDRislTAJE6cv/hyA0/3QOpjG7kxmbR4vbQR7Wk0Je4Dwq6Oy1XLIfpQTzwfPLtw5AiAjCqzQsIoqj3AqA4jCu/fFalBRpW3V7fWjTBWoPmukp3VMOCCW1nPbCJjS/OCJuuAE7A1SFPW3rST6KJG7NNLjuLYgCV35Mkobrxt+8ajv5JHobEBUcg== 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=jf7cdNkcGo2KqyvJZiSMIl7EWgjQEV3JfZnOamgKRB8=; b=FfqhfpeERy27ynR1xJwp9RQ99mPEnxFnCg0EHZhGmKbHE2PlrvZQONlMntbZY5O5ub7knzAfSxRhngIQ+EZnpNOEWII212fvyqWrOs0sCeHfRuev+CYkjMY2Jzh7zH+qCNMLbNBbh3WTl9cfUngvWYZEJ4YAi6T5kHx52RL2UU0ssxAOoDVpcUJ1i+cLJeN7QKJDsF7XPitqkBLHf4pefRAAfh8Pot+V6cEApyQlnd8h+I6U4otLbMk0JAfcSY5LoSrj6RuXndyMW9c49cGryZOhX0b0dM7kupjpk6RvIzXHF8p4JSKLWCQbtxIzBHoJ+FIjTtt9V/RnnHYTQEXeNA== Received: from SJ0PR13CA0059.namprd13.prod.outlook.com (2603:10b6:a03:2c2::34) by CH0PR12MB5236.namprd12.prod.outlook.com (2603:10b6:610:d3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.28; Wed, 9 Aug 2023 07:41:35 +0000 Received: from MWH0EPF000989EB.namprd02.prod.outlook.com (2603:10b6:a03:2c2:cafe::d) by SJ0PR13CA0059.outlook.office365.com (2603:10b6:a03:2c2::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.16 via Frontend Transport; Wed, 9 Aug 2023 07:41:35 +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 MWH0EPF000989EB.mail.protection.outlook.com (10.167.241.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 9 Aug 2023 07:41:35 +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.5; Wed, 9 Aug 2023 00:41:20 -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.37; Wed, 9 Aug 2023 00:41:17 -0700 From: Haifei Luo To: , , , , Suanming Mou CC: , , , , Subject: [PATCH 2/5] common/mlx5: extend HCA attribute query for NSH Date: Wed, 9 Aug 2023 10:40:43 +0300 Message-ID: <20230809074046.121807-3-haifeil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230809074046.121807-1-haifeil@nvidia.com> References: <20230809074046.121807-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: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989EB:EE_|CH0PR12MB5236:EE_ X-MS-Office365-Filtering-Correlation-Id: c5133bb9-4773-4917-6618-08db98ac0ec8 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iKcHZgwm8J0dvjwNDmD0X3tirofmyDVtnV6xZ26rwF/aW0qIwFfV8qcrmxI+a4rrdnovpUPFsYgi+RpK9mXsLwoKQlQyE9CnZnON7DYW3Q0CS2yGlv37XWt7IBHs1EvmQ3iH8W8mgy4+xRBLXA+l1jBvDcsUzRT/Of6yp3RaD3SiPRw1f/ZNl+23d0mihJUrmIk2H5jaqvFJ5vgC1u6y8UZ5CPwmOkFDeBCaHiqmqXID0IOmJhk0fOJT2dfv8XPqbb5v//QsNQxXCDIY4QIqkozAoJTd4LNfbzr+ODX8hqmmThyxjgtqsvB4kuJr09mvaO+/CEw8iS+IVe8O9zP4dJ/bk7rG0Lf2cRj0h/kabtMC2e3KOwbbSnLrwK8/ak04SrsbID+dXo4qYay+rGiucdd/HpI5ghx/Uemswps8N1kqXxbH0I37lBTZj2y0l2wh59o5F+M0IzFFixAXxNbAWcbMCkHYstczbmHqMaXS+VU/4QA0xT0g6FOYR/HvkLNXOW9pmvU83T/ILir1zuyPOuwQjzINo09wuUnHx0nEGAxR6JS5vcIs9s7ZVmBqPDC6nd9TBez4mJJkpBhqGqgPXem8gAeZ0VI22x0k5c4eSIhfnrLS4v3k9/QbiRVIwSLmQmFQPoBEVG5LGNN/B94kmu/4GP1Ae7aGFoQ3UrjTfU84xoT5GuKI7PIhi0lFFq6eevHJpMMukPVDKqMgdf0Sy4LS7nNS3E2wTwbfT+dIkhB79CW3eI/aUMeZnWcgfYCW 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:(13230028)(4636009)(346002)(396003)(39860400002)(136003)(376002)(451199021)(82310400008)(1800799006)(186006)(40470700004)(46966006)(36840700001)(1076003)(40480700001)(55016003)(26005)(107886003)(40460700003)(110136005)(54906003)(36756003)(5660300002)(86362001)(2906002)(4326008)(6636002)(70206006)(70586007)(8676002)(8936002)(316002)(41300700001)(6666004)(7696005)(478600001)(356005)(82740400003)(7636003)(426003)(36860700001)(83380400001)(47076005)(336012)(6286002)(16526019)(2616005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2023 07:41:35.2087 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c5133bb9-4773-4917-6618-08db98ac0ec8 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: MWH0EPF000989EB.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5236 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 --- 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.34.1