@@ -1301,6 +1301,12 @@ vDPA Drivers
T: git://dpdk.org/next/dpdk-next-virtio
F: drivers/vdpa/meson.build
+Corigine nfp vDPA
+M: Chaoyong He <chaoyong.he@corigine.com>
+F: drivers/vdpa/nfp/
+F: doc/guides/vpdadevs/nfp.rst
+F: doc/guides/vdpadevs/features/nfp.ini
+
Intel ifc
M: Xiao Wang <xiao.w.wang@intel.com>
F: drivers/vdpa/ifc/
new file mode 100644
@@ -0,0 +1,8 @@
+;
+; Supported features of the 'nfp' vDPA driver.
+;
+; Refer to default.ini for the full list of available driver features.
+;
+[Features]
+Linux = Y
+x86-64 = Y
@@ -14,4 +14,5 @@ which can be used from an application through vhost API.
features_overview
ifc
mlx5
+ nfp
sfc
new file mode 100644
@@ -0,0 +1,54 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright (c) 2023 Corigine, Inc.
+
+NFP vDPA driver
+===============
+
+The NFP vDPA (vhost data path acceleration) driver (**librte_nfp_vdpa**)
+provides support for the Netronome and Corigine's NFP-6xxx, NFP-4xxx
+and NFP-38xx product lines.
+
+NFP vDPA implementation
+-----------------------
+
+NFP VF device can be configured in the net device or vDPA mode.
+Adding "class=vdpa" parameter helps to specify that this device is to
+be used in vDPA mode. If this parameter is not specified, device
+will be probed by net/nfp driver and will used as a VF net device.
+
+This PMD uses (common/nfp) code to access the device firmware.
+
+Per-Device Parameters
+~~~~~~~~~~~~~~~~~~~~~
+
+The following per-device parameters can be passed via EAL PCI device
+allowlist option like "-a 02:00.0,arg1=value1,...".
+
+- ``class`` [net|vdpa] (default **net**)
+
+ Choose the mode of operation of nfp device.
+ **net** device will work as network device and will be probed by net/nfp driver.
+ **vdpa** device will work as vdpa device and will be probed by vdpa/nfp driver.
+ If this parameter is not specified then nfp device will operate as network device.
+
+Dynamic Logging Parameters
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+One may leverage EAL option "--log-level" to change default levels
+for the log types supported by the driver. The option is used with
+an argument typically consisting of two parts separated by a colon.
+
+Level value is the last part which takes a symbolic name (or integer).
+Log type is the former part which may shell match syntax.
+Depending on the choice of the expression, the given log level may
+be used either for some specific log type or for a subset of types.
+
+NFP vDPA PMD provides the following log types available for control:
+
+- ``pmd.vdpa.nfp.vdpa`` (default level is **notice**)
+
+ Affects driver-wide messages unrelated to any particular devices.
+
+- ``pmd.vdpa.nfp.core`` (default level is **notice**)
+
+ Affects the core logic of this PMD.
@@ -8,6 +8,7 @@ endif
drivers = [
'ifc',
'mlx5',
+ 'nfp',
'sfc',
]
std_deps = ['bus_pci', 'kvargs']
new file mode 100644
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2023 Corigine, Inc.
+
+if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
+ build = false
+ reason = 'only supported on 64-bit Linux'
+endif
+
+sources = files(
+ 'nfp_vdpa_log.c',
+)
+
+deps += ['vhost']
new file mode 100644
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2023 Corigine, Inc.
+ * All rights reserved.
+ */
+
+#include "nfp_vdpa_log.h"
+
+RTE_LOG_REGISTER_SUFFIX(nfp_logtype_core, core, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nfp_logtype_vdpa, vdpa, NOTICE);
new file mode 100644
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2023 Corigine, Inc.
+ * All rights reserved.
+ */
+
+#ifndef __NFP_VDPA_LOG_H__
+#define __NFP_VDPA_LOG_H__
+
+#include <rte_log.h>
+
+extern int nfp_logtype_vdpa;
+#define DRV_VDPA_LOG(level, fmt, args...) \
+ rte_log(RTE_LOG_ ## level, nfp_logtype_vdpa, \
+ "NFP_VDPA: %s(): " fmt "\n", __func__, ## args)
+
+extern int nfp_logtype_core;
+#define DRV_CORE_LOG(level, fmt, args...) \
+ rte_log(RTE_LOG_ ## level, nfp_logtype_core, \
+ "NFP_CORE: %s(): " fmt "\n", __func__, ## args)
+
+#endif /* __NFP_VDPA_LOG_H__ */