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 05106455F3; Thu, 11 Jul 2024 14:09:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A234742EA8; Thu, 11 Jul 2024 14:08:08 +0200 (CEST) Received: from egress-ip42a.ess.de.barracuda.com (egress-ip42a.ess.de.barracuda.com [18.185.115.201]) by mails.dpdk.org (Postfix) with ESMTP id D48A542E7C for ; Thu, 11 Jul 2024 14:07:59 +0200 (CEST) Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02lp2238.outbound.protection.outlook.com [104.47.11.238]) by mx-outbound41-230.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 11 Jul 2024 12:07:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mf1I3hFaC7xFzeCJR23gmthzY6FvnoNtUt5Y6m+p/EdhqHr0Usb8GAsMHbLz/a5OMa+SKO+h717DecpH6W4AD0J5MBfyk8ugugcuN/Pk1C6Uu89PEHFvV4bGocb1Le8H+RduOX1kkYQ5XqcerQaxH+d6/5PsbbPk7j5JQzum2M/CMvZ43CoRTKE0eB0GUQB8RUd5uZu/sNlW/x/2nZGzrFZhUrfCB8QPI0NVXMG41/uXNdM3JZ6+/LEdjUACgXGwuoD94uLivfidKxJkMOuj/jfUcsooZ6Ivj8bRVjWHyyrAxWgieHbSFBHDjBrht2B45Sw7hHKJeSFJBK5ZS7QLhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=BjN2UffLCfDPcjEpkF6Cpvy7TbA/ULUvy8uztioyL74=; b=vkx4q+4JQx+BzNmexIyJIZdgmKiq+FHQOo6UBLIbE91j9Q4znFCCRMFexWeRPavNNXC21k8c1UMby7i2ALcuHF8+/bOzjNv3AUndrCJ04EHqdnN30iYbLR/nPaiyD0eJH8pMJYIwQbPfGQZ/4+srOJRra9zPTnrKFAb45Hv3MqnhrPHyeah4NuGpHWgMb1gZTMGRyrux3PCy6xXIQLP2RALKqpwrW9qaexpnkFh/XhudgeJTmSvhUijXPXzYKLRquHu/sXZhDlY+W9YK0kKmbGs5wcLxIGx9bM0KSqaPTHqGCh7Oi9E8EP4Lk1ja6U9JRWl497Ol+UBnNCybHXWLZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 178.72.21.4) smtp.rcpttodomain=dpdk.org smtp.mailfrom=napatech.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=napatech.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=napatech.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BjN2UffLCfDPcjEpkF6Cpvy7TbA/ULUvy8uztioyL74=; b=DGXsHUumRiQlFr1i+lkrlI7YXqZEsIbbe0AWpMeJnav+VxQHiw0y/IXJcPLfyqKrZ3ad0vupxZcqv2SqyNofI2ke566vTTtXXx/v5gwdxPjW7ZH3uHoCt+wm3dSUiKp0EPRt7Gifx6kIj1Mk1rU6l5Lv6zakDA30Mr5VlgcKOKQ= Received: from AS9PR04CA0104.eurprd04.prod.outlook.com (2603:10a6:20b:50e::17) by DB8P190MB0697.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:125::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Thu, 11 Jul 2024 12:07:55 +0000 Received: from AMS0EPF0000019F.eurprd05.prod.outlook.com (2603:10a6:20b:50e:cafe::45) by AS9PR04CA0104.outlook.office365.com (2603:10a6:20b:50e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.22 via Frontend Transport; Thu, 11 Jul 2024 12:07:55 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 178.72.21.4) smtp.mailfrom=napatech.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=napatech.com; Received-SPF: Fail (protection.outlook.com: domain of napatech.com does not designate 178.72.21.4 as permitted sender) receiver=protection.outlook.com; client-ip=178.72.21.4; helo=localhost.localdomain; Received: from localhost.localdomain (178.72.21.4) by AMS0EPF0000019F.mail.protection.outlook.com (10.167.16.251) with Microsoft SMTP Server id 15.20.7762.17 via Frontend Transport; Thu, 11 Jul 2024 12:07:55 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, andrew.rybchenko@oktetlabs.ru, ferruh.yigit@amd.com Subject: [PATCH v6 12/21] net/ntnic: add support of the NT200A0X smartNIC Date: Thu, 11 Jul 2024 14:07:23 +0200 Message-ID: <20240711120737.698176-12-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240711120737.698176-1-sil-plv@napatech.com> References: <20240530144929.4127931-1-sil-plv@napatech.com> <20240711120737.698176-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF0000019F:EE_|DB8P190MB0697:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: e4b5119b-daa4-4da8-b78d-08dca1a21905 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?e81K8YtppZ4VV80ZvKiugqdVEPZnrxELjQXpcme27XjmqgmRNfhvW59AzqP1?= =?us-ascii?Q?mXoq+OmD0BnN2AttMxsJPwl5UkXdLq79OIwN0BOgWoLfOeSE74l7BX5XN8Ng?= =?us-ascii?Q?5m9vd3+HOCCP+1SCddJmPu5cu3K+o2+Qy39d/n6hbdXOIUrZLsw4kezAIGDs?= =?us-ascii?Q?J881QuEpYpQSCXQwKGjCSeoHfeeKk0aSatHjq2e00bgDLyw/ePAocB4bt0pl?= =?us-ascii?Q?oNesX0EYOBzZ+06wAkWujATyFljPswt64F5uu1c8C8yP0r2U7k2SRAnAlf5k?= =?us-ascii?Q?DeNDwWPrDkZfj45/oHFR+l7sSFsXKKDSDgvBqaCQyTA6t5js9+fppuCsaI8/?= =?us-ascii?Q?TMXAvzaPed1zUc0GI/Dokn5MxcjJXTFnBADRbWF4s1sSg6mpfAzvYgmksusB?= =?us-ascii?Q?4xTADSno9vvRrSP35+1ua7H38PozC6M92SnFq8cJgqKancO5e17KzQhNltdp?= =?us-ascii?Q?JAE0vXQ5OcqyCeRffFZQZAzfI8kupqFUGTZ01FX+eB8PhMlKtUyCP5VYmVnz?= =?us-ascii?Q?sTeqSbHITeiXiKIRxijN4pMPVPH9YQwFlznWtuYu/yUs21FHVwmD/K4PrUwc?= =?us-ascii?Q?WPIuDV1VK+CDZ+514D4PzL9f5a6RbrMCyVnYK40NaJFmvY2LnzLafAxPAl42?= =?us-ascii?Q?k2OUINJislbeUsQfuj6wp31fZcmEgzw7wNEV+xkTcDo7HdAKoIP8mNStg3gr?= =?us-ascii?Q?qXV6MDtEjPZ9AQl+Icy/POrEh+TUJNClISRQQ5q5U3UqlQxcSA2RRszTvlHT?= =?us-ascii?Q?qJOgjACGjya/bcciQrBeyHtBhCIc4LMPH2PPrA7s1MPvXE3FBdf7J2xeoHFW?= =?us-ascii?Q?/WlFgYKgvdudgH0DTQg5IJle9diIMn9WtXCt+HV5PCpPIv5qfhzFvt7kK07X?= =?us-ascii?Q?ksXDv7HlbZ9Z6wOBndRlGRp6bbCXyb/141kxmlfecpsYQ/GJa2l/Pr6APHyk?= =?us-ascii?Q?/RYIZN6nE5XrrHTWROj8eSpyOIO5XuIyErUR+orFlWO/mL5+tIe/0sVFgSh0?= =?us-ascii?Q?uzvxeLwSgfJhCD1zoEXCFMDlNiAoLJAyrQ0RJdUuwWhqwEairwQRfAxAL1Y2?= =?us-ascii?Q?pFxz+DVfA+UiurXnbrL14m/uM2x6NJxEM+s3rBhwCJPkOJdh2X3D3MYrnFq4?= =?us-ascii?Q?aoIWjFzh9No+drvnC9OsoztBoBT6ehuRdKmG2QAP25VluCmBiwoRCXT2q/6K?= =?us-ascii?Q?8CdXEqW6rKaZNB2lzd5Jp3Y8tTFQsdQxAYOgIaI4QrpUtpgXRkcKA4hh1P6m?= =?us-ascii?Q?QuNSbUKi9Sb03tk89CVb7qMHZgCDHCogAOYRRewD1ktZJU1ur/Bcxa7dq5ae?= =?us-ascii?Q?Xxkye5On8nygqidPrOmmPTTbivtXT4yQfv5aeVvnf148t0uKMjWp0cYsffPm?= =?us-ascii?Q?o1k7vmwrHk7CoJIvZ9Cb4OM08+xIkiBRUtGEzYoCUoNwL0euMgdWVQurmFE4?= =?us-ascii?Q?nur3QBT73jII+PByFAlN4ncrxZ3+4VyI?= X-Forefront-Antispam-Report: CIP:178.72.21.4; CTRY:DK; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:localhost.localdomain; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(82310400026)(1800799024)(36860700013); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: UYWNl2J3HSS4A8i1yHd1VH9zF7E/Ov8HNYpQb6nA/Q1XCZOucmvvdC44ZbF4JsSQD/KS5KcdJpM/bRllKTGY4/D94/XKKJEKJOUl3GaQwZtzd38sYNozWckz/6h+ykNerHA4S5Skk6BJa5/dKLxqXKbzIWL2nQGgmoHZacEBJIg6gegJILapbbYWgQIr6EiPDkxd8WrcL3KnOVG6tsnTY4udCou6GBm5GPQ+GmVg5xZTuhovTfY8u7+aDxYaR/k/w4ZuP+vkkbE7sCWsqgySjIhQafmARuM/fdItPb7HO8VTYwVvVRjGxu6/xswYBBOsRvlw3RJ+r1h70j+zSsUpzTJ7EMiDp4dWaufPvLaGDTLS6WLQJdUezZVpGIBncY+J0hT3ZE43mH/OxP17fLjwH+IZPonxpFrQ/78g1bgy2V75VjCLJ4ZkP2uaYaHDvCHpmj/CMs+lznbmgMUGA6t7BbkZoF2IWqa5JcWeupTcYhRx835JWTtKRBrY7b91KlZsf/olxB6ctKvvxic1t1BKvlIJs8Hd2C60UARMFSveIv48BlrCHpp+rvnSCvKa0D7AwQt2brHLsruN2q9+HSdnvRwANoVfttClFWXTieb1ybhK4iaJFGo6JBtohoR/YqBUqCuhnLIHf/G/pTg50ue1M4jOneuKugHNJ5tQB2R0QtQ= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2024 12:07:55.4784 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e4b5119b-daa4-4da8-b78d-08dca1a21905 X-MS-Exchange-CrossTenant-Id: c4540d0b-728a-4233-9da5-9ea30c7ec3ed X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=c4540d0b-728a-4233-9da5-9ea30c7ec3ed; Ip=[178.72.21.4]; Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF0000019F.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8P190MB0697 X-BESS-ID: 1720699677-310726-12653-23693-2 X-BESS-VER: 2019.1_20240702.1505 X-BESS-Apparent-Source-IP: 104.47.11.238 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVuZGFhZAVgZQ0DTN0DQx1SA1Od XM0tTcItUiOTnFyCDFPDHF0NzcPNFUqTYWAE7/9E1BAAAA X-BESS-Outbound-Spam-Score: 0.70 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.257551 [from cloudscan14-74.eu-central-1a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.00 BSF_BESS_OUTBOUND META: BESS Outbound 0.20 PR0N_SUBJECT META: Subject has letters around special characters (pr0n) X-BESS-Outbound-Spam-Status: SCORE=0.70 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_RULE7568M, BSF_BESS_OUTBOUND, PR0N_SUBJECT X-BESS-BRTS-Status: 1 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 ntnic support for NT200A0X NIC Signed-off-by: Serhii Iliushyk --- drivers/net/ntnic/adapter/nt4ga_adapter.c | 6 +++ drivers/net/ntnic/meson.build | 1 + .../net/ntnic/nthw/core/include/nthw_fpga.h | 7 +++ .../nthw/core/nt200a0x/nthw_fpga_nt200a0x.c | 54 +++++++++++++++++++ drivers/net/ntnic/nthw/core/nthw_fpga.c | 31 +++++++++++ drivers/net/ntnic/nthw/nthw_platform.c | 3 ++ drivers/net/ntnic/nthw/nthw_platform_drv.h | 2 + drivers/net/ntnic/ntnic_ethdev.c | 3 ++ 8 files changed, 107 insertions(+) create mode 100644 drivers/net/ntnic/nthw/core/nt200a0x/nthw_fpga_nt200a0x.c diff --git a/drivers/net/ntnic/adapter/nt4ga_adapter.c b/drivers/net/ntnic/adapter/nt4ga_adapter.c index 3b113b9850..bdad2b1e21 100644 --- a/drivers/net/ntnic/adapter/nt4ga_adapter.c +++ b/drivers/net/ntnic/adapter/nt4ga_adapter.c @@ -127,6 +127,12 @@ static int nt4ga_adapter_init(struct adapter_info_s *p_adapter_info) assert(fpga_info->n_fpga_prod_id > 0); switch (fpga_info->n_fpga_prod_id) { + /* NT200A01: 2x100G (Xilinx) */ + case 9563: /* NT200A02 (Cap) */ + NT_LOG(ERR, NTNIC, "NT200A02 100G link module uninitialized\n"); + res = -1; + break; + default: NT_LOG(ERR, NTNIC, "Unsupported FPGA product: %04d\n", fpga_info->n_fpga_prod_id); diff --git a/drivers/net/ntnic/meson.build b/drivers/net/ntnic/meson.build index 78f31097ab..e375c63bf8 100644 --- a/drivers/net/ntnic/meson.build +++ b/drivers/net/ntnic/meson.build @@ -25,6 +25,7 @@ sources = files( 'nthw/supported/nthw_fpga_9563_055_039_0000.c', 'nthw/supported/nthw_fpga_instances.c', 'nthw/supported/nthw_fpga_mod_str_map.c', + 'nthw/core/nt200a0x/nthw_fpga_nt200a0x.c', 'nthw/core/nthw_fpga.c', 'nthw/core/nthw_hif.c', 'nthw/core/nthw_iic.c', diff --git a/drivers/net/ntnic/nthw/core/include/nthw_fpga.h b/drivers/net/ntnic/nthw/core/include/nthw_fpga.h index 1943f6e225..ba86b4d8d2 100644 --- a/drivers/net/ntnic/nthw/core/include/nthw_fpga.h +++ b/drivers/net/ntnic/nthw/core/include/nthw_fpga.h @@ -18,5 +18,12 @@ int nthw_fpga_shutdown(struct fpga_info_s *p_fpga_info); int nthw_fpga_get_param_info(struct fpga_info_s *p_fpga_info, nthw_fpga_t *p_fpga); +struct nt200a0x_ops { + int (*nthw_fpga_nt200a0x_init)(struct fpga_info_s *p_fpga_info); +}; + +void register_nt200a0x_ops(struct nt200a0x_ops *ops); +struct nt200a0x_ops *get_nt200a0x_ops(void); +void nt200a0x_ops_init(void); #endif /* __NTHW_FPGA_H__ */ diff --git a/drivers/net/ntnic/nthw/core/nt200a0x/nthw_fpga_nt200a0x.c b/drivers/net/ntnic/nthw/core/nt200a0x/nthw_fpga_nt200a0x.c new file mode 100644 index 0000000000..7db6a03d88 --- /dev/null +++ b/drivers/net/ntnic/nthw/core/nt200a0x/nthw_fpga_nt200a0x.c @@ -0,0 +1,54 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2023 Napatech A/S + */ + +#include "ntlog.h" + +#include "nthw_fpga.h" +#include "ntnic_mod_reg.h" + +static int nthw_fpga_nt200a0x_init(struct fpga_info_s *p_fpga_info) +{ + assert(p_fpga_info); + + const char *const p_adapter_id_str = p_fpga_info->mp_adapter_id_str; + int res = -1; + + bool included = true; + + /* reset specific */ + switch (p_fpga_info->n_fpga_prod_id) { + case 9563: + included = false; + break; + + default: + NT_LOG(ERR, NTHW, "%s: Unsupported FPGA product: %04d\n", p_adapter_id_str, + p_fpga_info->n_fpga_prod_id); + res = -1; + break; + } + + if (!included) { + NT_LOG(ERR, NTHW, "%s: NOT INCLUDED FPGA product: %04d\n", p_adapter_id_str, + p_fpga_info->n_fpga_prod_id); + res = -1; + } + + if (res) { + NT_LOG_DBGX(ERR, NTHW, "%s: FPGA=%04d res=%d\n", p_adapter_id_str, + p_fpga_info->n_fpga_prod_id, res); + return res; + } + + return res; +} + +static struct nt200a0x_ops nt200a0x_ops = { .nthw_fpga_nt200a0x_init = nthw_fpga_nt200a0x_init }; + +void nt200a0x_ops_init(void) +{ + NT_LOG(INF, NTHW, "NT200A0X OPS INIT\n"); + register_nt200a0x_ops(&nt200a0x_ops); +} diff --git a/drivers/net/ntnic/nthw/core/nthw_fpga.c b/drivers/net/ntnic/nthw/core/nthw_fpga.c index df238ec4ef..98d29744cb 100644 --- a/drivers/net/ntnic/nthw/core/nthw_fpga.c +++ b/drivers/net/ntnic/nthw/core/nthw_fpga.c @@ -152,7 +152,18 @@ int nthw_fpga_init(struct fpga_info_s *p_fpga_info) nthw_rac_rab_flush(p_nthw_rac); p_fpga_info->mp_nthw_rac = p_nthw_rac; + bool included = true; + struct nt200a0x_ops *nt200a0x_ops = get_nt200a0x_ops(); + switch (p_fpga_info->n_nthw_adapter_id) { + case NT_HW_ADAPTER_ID_NT200A02: + if (nt200a0x_ops != NULL) + res = nt200a0x_ops->nthw_fpga_nt200a0x_init(p_fpga_info); + + else + included = false; + + break; default: NT_LOG(ERR, NTHW, "%s: Unsupported HW product id: %d\n", p_adapter_id_str, p_fpga_info->n_nthw_adapter_id); @@ -160,6 +171,12 @@ int nthw_fpga_init(struct fpga_info_s *p_fpga_info) break; } + if (!included) { + NT_LOG(ERR, NTHW, "%s: NOT INCLUDED HW product: %d\n", p_adapter_id_str, + p_fpga_info->n_nthw_adapter_id); + res = -1; + } + if (res) { NT_LOG(ERR, NTHW, "%s: status: 0x%08X\n", p_adapter_id_str, res); return res; @@ -220,3 +237,17 @@ int nthw_fpga_shutdown(struct fpga_info_s *p_fpga_info) return res; } + +static struct nt200a0x_ops *nt200a0x_ops; + +void register_nt200a0x_ops(struct nt200a0x_ops *ops) +{ + nt200a0x_ops = ops; +} + +struct nt200a0x_ops *get_nt200a0x_ops(void) +{ + if (nt200a0x_ops == NULL) + nt200a0x_ops_init(); + return nt200a0x_ops; +} diff --git a/drivers/net/ntnic/nthw/nthw_platform.c b/drivers/net/ntnic/nthw/nthw_platform.c index 181330dd37..33e18e549f 100644 --- a/drivers/net/ntnic/nthw/nthw_platform.c +++ b/drivers/net/ntnic/nthw/nthw_platform.c @@ -8,6 +8,9 @@ nthw_adapter_id_t nthw_platform_get_nthw_adapter_id(const uint16_t n_pci_device_id) { switch (n_pci_device_id) { + case NT_HW_PCI_DEVICE_ID_NT200A02: + return NT_HW_ADAPTER_ID_NT200A02; + default: return NT_HW_ADAPTER_ID_UNKNOWN; } diff --git a/drivers/net/ntnic/nthw/nthw_platform_drv.h b/drivers/net/ntnic/nthw/nthw_platform_drv.h index ab26d8149a..42eb0b8b05 100644 --- a/drivers/net/ntnic/nthw/nthw_platform_drv.h +++ b/drivers/net/ntnic/nthw/nthw_platform_drv.h @@ -9,9 +9,11 @@ #include #define NT_HW_PCI_VENDOR_ID (0x18f4) +#define NT_HW_PCI_DEVICE_ID_NT200A02 (0x1C5) enum nthw_adapter_id_e { NT_HW_ADAPTER_ID_UNKNOWN = 0, + NT_HW_ADAPTER_ID_NT200A02, }; typedef enum nthw_adapter_id_e nthw_adapter_id_t; diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c index 10b3c803ae..488c88c782 100644 --- a/drivers/net/ntnic/ntnic_ethdev.c +++ b/drivers/net/ntnic/ntnic_ethdev.c @@ -26,6 +26,7 @@ #define EXCEPTION_PATH_HID 0 static const struct rte_pci_id nthw_pci_id_map[] = { + { RTE_PCI_DEVICE(NT_HW_PCI_VENDOR_ID, NT_HW_PCI_DEVICE_ID_NT200A02) }, { .vendor_id = 0, }, /* sentinel */ @@ -486,9 +487,11 @@ nthw_pci_remove(struct rte_pci_device *pci_dev) static struct rte_pci_driver rte_nthw_pmd = { .id_table = nthw_pci_id_map, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING, .probe = nthw_pci_probe, .remove = nthw_pci_remove, }; RTE_PMD_REGISTER_PCI(net_ntnic, rte_nthw_pmd); +RTE_PMD_REGISTER_PCI_TABLE(net_ntnic, nthw_pci_id_map); RTE_PMD_REGISTER_KMOD_DEP(net_ntnic, "* vfio-pci"); -- 2.45.0