Skip to contentSkip to conversation

net/ntnic: initial commit which adds register defines

PATCH Superseded Mykola Kostenok 9 participants 142 messages Aug 16, 2023 – Apr 4, 2024 Page 1 of 4

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/8 net/ntnic: initial commit which adds register defines

From: Christian Koue Muf <[email protected]>

The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.

---
 drivers/net/meson.build                       |    1 +
 drivers/net/ntnic/include/fpga_model.h        |   99 +
 drivers/net/ntnic/meson.build                 |   29 +
 drivers/net/ntnic/nthw/nthw_register.h        |   19 +
 .../supported/nthw_fpga_9563_055_024_0000.c   | 4190 ++++++++++
 .../nthw/supported/nthw_fpga_instances.h      |   14 +
 .../nthw/supported/nthw_fpga_modules_defs.h   |  166 +
 .../supported/nthw_fpga_parameters_defs.h     |  209 +
 .../nthw/supported/nthw_fpga_registers_defs.h | 7277 +++++++++++++++++
 9 files changed, 12004 insertions(+)
 create mode 100644 drivers/net/ntnic/include/fpga_model.h
 create mode 100644 drivers/net/ntnic/meson.build
 create mode 100644 drivers/net/ntnic/nthw/nthw_register.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_024_0000.c
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_instances.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_modules_defs.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_parameters_defs.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_registers_defs.h
drivers/net/meson.build +1 -0
index bd38b533c5..fb6d34b782 100644
@@ -45,6 +45,7 @@ drivers = [
         'nfb',
         'nfp',
         'ngbe',
+        'ntnic',
         'null',
         'octeontx',
         'octeon_ep',
drivers/net/ntnic/include/fpga_model.h new file +99 -0

99 lines not on this page · raw message

drivers/net/ntnic/meson.build new file +29 -0
new file mode 100644
index 0000000000..99569c2843
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2020-2023 Napatech A/S
+
+# cflags
+cflags += [
+    '-std=c11',
+]
+
+# includes
+includes = [
+    include_directories('.'),
+    include_directories('include'),
+    include_directories('nthw'),
+    include_directories('nthw/supported'),
+]
+
+# all sources
+sources = files(
+    'nthw/supported/nthw_fpga_9563_055_024_0000.c',
+)
+
+if is_variable('default_cflags')
+      cflags += default_cflags
+else
+      cflags += machine_args
+      cflags += ['-DALLOW_INTERNAL_API']
+endif
+
+# END
drivers/net/ntnic/nthw/nthw_register.h new file +19 -0
new file mode 100644
index 0000000000..5cdbd9fc5d
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef NTHW_REGISTER_H_
+#define NTHW_REGISTER_H_
+
+#include <unistd.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <inttypes.h>
+
+#include "fpga_model.h"
+
+#include "nthw_fpga_modules_defs.h"
+#include "nthw_fpga_parameters_defs.h"
+#include "nthw_fpga_registers_defs.h"
+
+#endif /* NTHW_REGISTER_H_ */
drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_024_0000.c new file +4190 -0

2,846 lines not on this page · raw message

drivers/net/ntnic/nthw/supported/nthw_fpga_instances.h new file +14 -0
new file mode 100644
index 0000000000..1d707d6925

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/supported/nthw_fpga_modules_defs.h new file +166 -0

166 lines not on this page · raw message

drivers/net/ntnic/nthw/supported/nthw_fpga_parameters_defs.h new file +209 -0

209 lines not on this page · raw message

drivers/net/ntnic/nthw/supported/nthw_fpga_registers_defs.h new file +7277 -0

7,277 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#1 lore raw

PATCH 2/8 net/ntnic: adds core registers and fpga functionality

From: Christian Koue Muf <[email protected]>

Includes functionality to reset, initialize, program, and collect stats for the NTNIC FPGA.

---
 drivers/net/ntnic/include/nthw_bus.h          |   10 +
 drivers/net/ntnic/meson.build                 |   32 +
 .../net/ntnic/nthw/core/nthw_clock_profiles.c |    9 +
 .../net/ntnic/nthw/core/nthw_clock_profiles.h |   39 +
 drivers/net/ntnic/nthw/core/nthw_core.h       |   31 +
 drivers/net/ntnic/nthw/core/nthw_fpga.c       |  914 +++++++++
 drivers/net/ntnic/nthw/core/nthw_fpga.h       |   47 +
 .../net/ntnic/nthw/core/nthw_fpga_nt200a0x.c  |   46 +
 .../net/ntnic/nthw/core/nthw_fpga_nt200a0x.h  |   14 +
 drivers/net/ntnic/nthw/core/nthw_fpga_rst.c   |   10 +
 drivers/net/ntnic/nthw/core/nthw_fpga_rst.h   |   17 +
 .../net/ntnic/nthw/core/nthw_fpga_rst9563.c   |  241 +++
 .../ntnic/nthw/core/nthw_fpga_rst_nt200a0x.c  |  674 +++++++
 .../ntnic/nthw/core/nthw_fpga_rst_nt200a0x.h  |   89 +
 drivers/net/ntnic/nthw/core/nthw_gpio_phy.c   |  271 +++
 drivers/net/ntnic/nthw/core/nthw_gpio_phy.h   |   57 +
 drivers/net/ntnic/nthw/core/nthw_hif.c        |  342 ++++
 drivers/net/ntnic/nthw/core/nthw_hif.h        |  156 ++
 drivers/net/ntnic/nthw/core/nthw_iic.c        |  570 ++++++
 drivers/net/ntnic/nthw/core/nthw_iic.h        |  101 +
 drivers/net/ntnic/nthw/core/nthw_mac_pcs.c    | 1034 ++++++++++
 drivers/net/ntnic/nthw/core/nthw_mac_pcs.h    |  261 +++
 .../net/ntnic/nthw/core/nthw_mac_pcs_xxv.c    | 1631 ++++++++++++++++
 .../net/ntnic/nthw/core/nthw_mac_pcs_xxv.h    |  291 +++
 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.c  |  121 ++
 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.h  |   51 +
 drivers/net/ntnic/nthw/core/nthw_pci_ta.c     |   99 +
 drivers/net/ntnic/nthw/core/nthw_pci_ta.h     |   40 +
 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.c  |  127 ++
 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.h  |   55 +
 drivers/net/ntnic/nthw/core/nthw_pcie3.c      |  274 +++
 drivers/net/ntnic/nthw/core/nthw_pcie3.h      |  100 +
 drivers/net/ntnic/nthw/core/nthw_sdc.c        |  177 ++
 drivers/net/ntnic/nthw/core/nthw_sdc.h        |   43 +
 drivers/net/ntnic/nthw/core/nthw_si5340.c     |  206 ++
 drivers/net/ntnic/nthw/core/nthw_si5340.h     |   34 +
 drivers/net/ntnic/nthw/core/nthw_spi_v3.c     |  380 ++++
 drivers/net/ntnic/nthw/core/nthw_spi_v3.h     |  106 ++
 drivers/net/ntnic/nthw/core/nthw_spim.c       |  117 ++
 drivers/net/ntnic/nthw/core/nthw_spim.h       |   52 +
 drivers/net/ntnic/nthw/core/nthw_spis.c       |  147 ++
 drivers/net/ntnic/nthw/core/nthw_spis.h       |   63 +
 drivers/net/ntnic/nthw/core/nthw_tsm.c        |  179 ++
 drivers/net/ntnic/nthw/core/nthw_tsm.h        |   53 +
 drivers/net/ntnic/nthw/nthw_dbs.c             | 1301 +++++++++++++
 drivers/net/ntnic/nthw/nthw_dbs.h             |  313 +++
 drivers/net/ntnic/nthw/nthw_drv.h             |   82 +
 drivers/net/ntnic/nthw/nthw_epp.c             |  335 ++++
 drivers/net/ntnic/nthw/nthw_epp.h             |   99 +
 drivers/net/ntnic/nthw/nthw_fpga_model.c      | 1677 +++++++++++++++++
 drivers/net/ntnic/nthw/nthw_fpga_model.h      |  308 +++
 drivers/net/ntnic/nthw/nthw_helper.h          |   21 +
 drivers/net/ntnic/nthw/nthw_platform.c        |   35 +
 drivers/net/ntnic/nthw/nthw_platform_drv.h    |   42 +
 drivers/net/ntnic/nthw/nthw_profile.h         |   15 +
 drivers/net/ntnic/nthw/nthw_rac.c             |  976 ++++++++++
 drivers/net/ntnic/nthw/nthw_rac.h             |  159 ++
 drivers/net/ntnic/nthw/nthw_register.h        |    2 +
 drivers/net/ntnic/nthw/nthw_stat.c            |  266 +++
 drivers/net/ntnic/nthw/nthw_stat.h            |   72 +
 drivers/net/ntnic/ntlog/include/ntlog.h       |  162 ++
 drivers/net/ntnic/ntlog/ntlog.c               |  114 ++
 drivers/net/ntnic/ntutil/include/nt_util.h    |   71 +
 drivers/net/ntnic/ntutil/nt_util.c            |   77 +
 64 files changed, 15438 insertions(+)
 create mode 100644 drivers/net/ntnic/include/nthw_bus.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_clock_profiles.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_clock_profiles.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_core.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst9563.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gpio_phy.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gpio_phy.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_hif.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_hif.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_iic.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_iic.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_ta.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_ta.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pcie3.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pcie3.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_sdc.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_sdc.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_si5340.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_si5340.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spi_v3.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spi_v3.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spim.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spim.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spis.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spis.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_tsm.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_tsm.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_dbs.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_dbs.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_drv.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_epp.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_epp.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_fpga_model.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_fpga_model.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_helper.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_platform.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_platform_drv.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_profile.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_rac.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_rac.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_stat.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_stat.h
 create mode 100644 drivers/net/ntnic/ntlog/include/ntlog.h
 create mode 100644 drivers/net/ntnic/ntlog/ntlog.c
 create mode 100644 drivers/net/ntnic/ntutil/include/nt_util.h
 create mode 100644 drivers/net/ntnic/ntutil/nt_util.c
drivers/net/ntnic/include/nthw_bus.h new file +10 -0
new file mode 100644
index 0000000000..975cc95e78
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_BUS_H__
+#define __NTHW_BUS_H__
+
+typedef uint8_t rab_bus_id_t;
+
+#endif /* __NTHW_BUS_H__ */
drivers/net/ntnic/meson.build +32 -0
index 99569c2843..65064f44ab 100644
@@ -10,13 +10,45 @@ cflags += [
 includes = [
     include_directories('.'),
     include_directories('include'),
+    include_directories('ntlog/include'),
+    include_directories('ntutil/include'),
     include_directories('nthw'),
+    include_directories('nthw/core'),
     include_directories('nthw/supported'),
 ]
 
 # all sources
 sources = files(
+    'nthw/core/nthw_clock_profiles.c',
+    'nthw/core/nthw_fpga.c',
+    'nthw/core/nthw_fpga_nt200a0x.c',
+    'nthw/core/nthw_fpga_rst.c',
+    'nthw/core/nthw_fpga_rst9563.c',
+    'nthw/core/nthw_fpga_rst_nt200a0x.c',
+    'nthw/core/nthw_gpio_phy.c',
+    'nthw/core/nthw_hif.c',
+    'nthw/core/nthw_iic.c',
+    'nthw/core/nthw_mac_pcs.c',
+    'nthw/core/nthw_mac_pcs_xxv.c',
+    'nthw/core/nthw_pci_rd_tg.c',
+    'nthw/core/nthw_pci_ta.c',
+    'nthw/core/nthw_pci_wr_tg.c',
+    'nthw/core/nthw_pcie3.c',
+    'nthw/core/nthw_sdc.c',
+    'nthw/core/nthw_si5340.c',
+    'nthw/core/nthw_spi_v3.c',
+    'nthw/core/nthw_spim.c',
+    'nthw/core/nthw_spis.c',
+    'nthw/core/nthw_tsm.c',
+    'nthw/nthw_fpga_model.c',
+    'nthw/nthw_dbs.c',
+    'nthw/nthw_epp.c',
+    'nthw/nthw_platform.c',
+    'nthw/nthw_rac.c',
+    'nthw/nthw_stat.c',
     'nthw/supported/nthw_fpga_9563_055_024_0000.c',
+    'ntlog/ntlog.c',
+    'ntutil/nt_util.c',
 )
 
 if is_variable('default_cflags')
drivers/net/ntnic/nthw/core/nthw_clock_profiles.c new file +9 -0
new file mode 100644
index 0000000000..efdcc222a8
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#include "nthw_clock_profiles.h"
+
+/* Clock profile for NT200A02 2x40G, 2x100G */
+const int n_data_si5340_nt200a02_u23_v5;
+const clk_profile_data_fmt2_t *p_data_si5340_nt200a02_u23_v5;
drivers/net/ntnic/nthw/core/nthw_clock_profiles.h new file +39 -0
new file mode 100644
index 0000000000..4252f69e92
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_CLOCK_PROFILES_H__
+#define __NTHW_CLOCK_PROFILES_H__
+
+#include <stdint.h>
+
+#include "nthw_helper.h"
+
+#define clk_profile_size_error_msg "size test failed"
+
+typedef struct {
+	unsigned char reg_addr;
+	unsigned char reg_val;
+	unsigned char reg_mask;
+} clk_profile_data_fmt0_t;
+
+typedef struct {
+	uint16_t reg_addr;
+	uint8_t reg_val;
+} clk_profile_data_fmt1_t;
+
+typedef struct {
+	unsigned int reg_addr;
+	unsigned char reg_val;
+} clk_profile_data_fmt2_t;
+
+typedef enum {
+	CLK_PROFILE_DATA_FMT_0,
+	CLK_PROFILE_DATA_FMT_1,
+	CLK_PROFILE_DATA_FMT_2
+} clk_profile_data_fmt_t;
+
+extern const int n_data_si5340_nt200a02_u23_v5;
+extern const  clk_profile_data_fmt2_t *p_data_si5340_nt200a02_u23_v5;
+
+#endif /* __NTHW_CLOCK_PROFILES_H__ */
drivers/net/ntnic/nthw/core/nthw_core.h new file +31 -0
new file mode 100644
index 0000000000..798a95d5cf
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_CORE_H__
+#define __NTHW_CORE_H__
+
+#include "nthw_helper.h"
+
+#include "nthw_platform_drv.h"
+#include "nthw_fpga_model.h"
+#include "nthw_hif.h"
+#include "nthw_pcie3.h"
+#include "nthw_pci_rd_tg.h"
+#include "nthw_pci_wr_tg.h"
+#include "nthw_pci_ta.h"
+#include "nthw_iic.h"
+
+#include "nthw_gpio_phy.h"
+#include "nthw_mac_pcs.h"
+#include "nthw_mac_pcs_xxv.h"
+#include "nthw_sdc.h"
+
+#include "nthw_spim.h"
+#include "nthw_spis.h"
+
+#include "nthw_tsm.h"
+
+#include "nthw_si5340.h"
+
+#endif /* __NTHW_CORE_H__ */
drivers/net/ntnic/nthw/core/nthw_fpga.c new file +914 -0

914 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga.h new file +47 -0

47 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.c new file +46 -0

46 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.h new file +14 -0
new file mode 100644
index 0000000000..ff324bee39
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_FPGA_NT200A0X_H__
+#define __NTHW_FPGA_NT200A0X_H__
+
+int nthw_fpga_nt200a0x_init(struct fpga_info_s *p_fpga_info);
+
+/* NT200A02: 9563 */
+int nthw_fpga_rst9563_init(struct fpga_info_s *p_fpga_info,
+			  struct nthw_fpga_rst_nt200a0x *const p);
+
+#endif /* __NTHW_FPGA_NT200A0X_H__ */
drivers/net/ntnic/nthw/core/nthw_fpga_rst.c new file +10 -0
new file mode 100644
index 0000000000..66c148bab2
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#include "ntlog.h"
+
+#include "nthw_fpga.h"
+#include "nthw_fpga_nt200a0x.h"
+
+#include "nthw_fpga_rst.h"
drivers/net/ntnic/nthw/core/nthw_fpga_rst.h new file +17 -0
new file mode 100644
index 0000000000..2099c4b677
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_FPGA_RST_H__
+#define __NTHW_FPGA_RST_H__
+
+#include "nthw_drv.h"
+
+#include "nthw_fpga_model.h"
+
+#include "nthw_rac.h"
+#include "nthw_iic.h"
+
+#include "nthw_fpga_rst_nt200a0x.h"
+
+#endif /* __NTHW_FPGA_RST_H__ */
drivers/net/ntnic/nthw/core/nthw_fpga_rst9563.c new file +241 -0

241 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.c new file +674 -0

674 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.h new file +89 -0

89 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_gpio_phy.c new file +271 -0

271 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_gpio_phy.h new file +57 -0

57 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_hif.c new file +342 -0

342 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_hif.h new file +156 -0

144 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_iic.c new file +570 -0

570 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_iic.h new file +101 -0

101 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs.c new file +1034 -0

1,034 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs.h new file +261 -0

261 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.c new file +1631 -0

1,631 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.h new file +291 -0

291 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.c new file +121 -0

121 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.h new file +51 -0

51 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_ta.c new file +99 -0

99 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_ta.h new file +40 -0
new file mode 100644
index 0000000000..7968cad9fa

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.c new file +127 -0

127 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.h new file +55 -0

55 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pcie3.c new file +274 -0

274 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pcie3.h new file +100 -0

100 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_sdc.c new file +177 -0

177 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_sdc.h new file +43 -0

43 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_si5340.c new file +206 -0

206 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_si5340.h new file +34 -0
new file mode 100644
index 0000000000..f588b5b825

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_spi_v3.c new file +380 -0

380 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spi_v3.h new file +106 -0

106 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spim.c new file +117 -0

117 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spim.h new file +52 -0

52 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spis.c new file +147 -0

147 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spis.h new file +63 -0

63 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_tsm.c new file +179 -0

179 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_tsm.h new file +53 -0

53 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_dbs.c new file +1301 -0

1,301 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_dbs.h new file +313 -0

313 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_drv.h new file +82 -0

82 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_epp.c new file +335 -0

335 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_epp.h new file +99 -0

99 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_fpga_model.c new file +1677 -0

1,677 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_fpga_model.h new file +308 -0

308 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_helper.h new file +21 -0
new file mode 100644
index 0000000000..22f6a0d471

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_platform.c new file +35 -0
new file mode 100644
index 0000000000..203947e03a

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_platform_drv.h new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_profile.h new file +15 -0
new file mode 100644
index 0000000000..2fcb7b4adf

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_rac.c new file +976 -0

976 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_rac.h new file +159 -0

159 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_register.h +2 -0
index 5cdbd9fc5d..4fe3496b9f 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_stat.c new file +266 -0

266 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_stat.h new file +72 -0

72 lines not on this page · raw message

drivers/net/ntnic/ntlog/include/ntlog.h new file +162 -0

162 lines not on this page · raw message

drivers/net/ntnic/ntlog/ntlog.c new file +114 -0

114 lines not on this page · raw message

drivers/net/ntnic/ntutil/include/nt_util.h new file +71 -0

71 lines not on this page · raw message

drivers/net/ntnic/ntutil/nt_util.c new file +77 -0

77 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#2 lore raw

PATCH 3/8 net/ntnic: adds NT200A02 adapter support

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The PMD is designed to support multiple different adapters, and this commit adds support for NT200A02 2x100G. Sensor and NIM code is included.

---
 .../net/ntnic/adapter/common_adapter_defs.h   |   14 +
 drivers/net/ntnic/adapter/nt4ga_adapter.c     |  477 ++++
 drivers/net/ntnic/adapter/nt4ga_adapter.h     |  108 +
 drivers/net/ntnic/adapter/nt4ga_filter.h      |   15 +
 drivers/net/ntnic/adapter/nt4ga_link.c        |  178 ++
 drivers/net/ntnic/adapter/nt4ga_link.h        |  179 ++
 drivers/net/ntnic/adapter/nt4ga_link_100g.c   |  825 +++++++
 drivers/net/ntnic/adapter/nt4ga_link_100g.h   |   12 +
 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.c   |  598 +++++
 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.h   |   41 +
 drivers/net/ntnic/adapter/nt4ga_stat.c        |  705 ++++++
 drivers/net/ntnic/adapter/nt4ga_stat.h        |  202 ++
 drivers/net/ntnic/meson.build                 |   24 +
 drivers/net/ntnic/nim/i2c_nim.c               | 1974 +++++++++++++++++
 drivers/net/ntnic/nim/i2c_nim.h               |  122 +
 drivers/net/ntnic/nim/nim_defines.h           |  146 ++
 drivers/net/ntnic/nim/nt_link_speed.c         |  105 +
 drivers/net/ntnic/nim/nt_link_speed.h         |   34 +
 drivers/net/ntnic/nim/qsfp_registers.h        |   57 +
 drivers/net/ntnic/nim/qsfp_sensors.c          |  174 ++
 drivers/net/ntnic/nim/qsfp_sensors.h          |   18 +
 drivers/net/ntnic/nim/sfp_p_registers.h       |  100 +
 drivers/net/ntnic/nim/sfp_sensors.c           |  288 +++
 drivers/net/ntnic/nim/sfp_sensors.h           |   18 +
 .../net/ntnic/nthw/core/nthw_clock_profiles.c |   11 +-
 drivers/net/ntnic/nthw/core/nthw_core.h       |    2 +
 drivers/net/ntnic/nthw/core/nthw_gmf.c        |  290 +++
 drivers/net/ntnic/nthw/core/nthw_gmf.h        |   93 +
 .../nthw/core/nthw_nt200a02_u23_si5340_v5.h   |  344 +++
 drivers/net/ntnic/nthw/core/nthw_rmc.c        |  156 ++
 drivers/net/ntnic/nthw/core/nthw_rmc.h        |   57 +
 .../ntnic/sensors/avr_sensors/avr_sensors.c   |  104 +
 .../ntnic/sensors/avr_sensors/avr_sensors.h   |   22 +
 .../sensors/board_sensors/board_sensors.c     |   48 +
 .../sensors/board_sensors/board_sensors.h     |   18 +
 .../net/ntnic/sensors/board_sensors/tempmon.c |   42 +
 .../net/ntnic/sensors/board_sensors/tempmon.h |   16 +
 .../ntnic/sensors/nim_sensors/nim_sensors.c   |   54 +
 .../ntnic/sensors/nim_sensors/nim_sensors.h   |   19 +
 drivers/net/ntnic/sensors/ntavr/avr_intf.h    |   89 +
 drivers/net/ntnic/sensors/ntavr/ntavr.c       |   78 +
 drivers/net/ntnic/sensors/ntavr/ntavr.h       |   32 +
 drivers/net/ntnic/sensors/sensor_types.h      |  259 +++
 drivers/net/ntnic/sensors/sensors.c           |  273 +++
 drivers/net/ntnic/sensors/sensors.h           |  127 ++
 drivers/net/ntnic/sensors/stream_info.h       |   86 +
 46 files changed, 8632 insertions(+), 2 deletions(-)
 create mode 100644 drivers/net/ntnic/adapter/common_adapter_defs.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_adapter.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_adapter.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_filter.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link_100g.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link_100g.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_stat.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_stat.h
 create mode 100644 drivers/net/ntnic/nim/i2c_nim.c
 create mode 100644 drivers/net/ntnic/nim/i2c_nim.h
 create mode 100644 drivers/net/ntnic/nim/nim_defines.h
 create mode 100644 drivers/net/ntnic/nim/nt_link_speed.c
 create mode 100644 drivers/net/ntnic/nim/nt_link_speed.h
 create mode 100644 drivers/net/ntnic/nim/qsfp_registers.h
 create mode 100644 drivers/net/ntnic/nim/qsfp_sensors.c
 create mode 100644 drivers/net/ntnic/nim/qsfp_sensors.h
 create mode 100644 drivers/net/ntnic/nim/sfp_p_registers.h
 create mode 100644 drivers/net/ntnic/nim/sfp_sensors.c
 create mode 100644 drivers/net/ntnic/nim/sfp_sensors.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gmf.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gmf.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_nt200a02_u23_si5340_v5.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_rmc.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_rmc.h
 create mode 100644 drivers/net/ntnic/sensors/avr_sensors/avr_sensors.c
 create mode 100644 drivers/net/ntnic/sensors/avr_sensors/avr_sensors.h
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/board_sensors.c
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/board_sensors.h
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/tempmon.c
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/tempmon.h
 create mode 100644 drivers/net/ntnic/sensors/nim_sensors/nim_sensors.c
 create mode 100644 drivers/net/ntnic/sensors/nim_sensors/nim_sensors.h
 create mode 100644 drivers/net/ntnic/sensors/ntavr/avr_intf.h
 create mode 100644 drivers/net/ntnic/sensors/ntavr/ntavr.c
 create mode 100644 drivers/net/ntnic/sensors/ntavr/ntavr.h
 create mode 100644 drivers/net/ntnic/sensors/sensor_types.h
 create mode 100644 drivers/net/ntnic/sensors/sensors.c
 create mode 100644 drivers/net/ntnic/sensors/sensors.h
 create mode 100644 drivers/net/ntnic/sensors/stream_info.h
drivers/net/ntnic/adapter/common_adapter_defs.h new file +14 -0
new file mode 100644
index 0000000000..79167806f1
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef _COMMON_ADAPTER_DEFS_H_
+#define _COMMON_ADAPTER_DEFS_H_
+
+/*
+ * Declarations shared by NT adapter types.
+ */
+#define NUM_ADAPTER_MAX (8)
+#define NUM_ADAPTER_PORTS_MAX (128)
+
+#endif /* _COMMON_ADAPTER_DEFS_H_ */
drivers/net/ntnic/adapter/nt4ga_adapter.c new file +477 -0

477 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_adapter.h new file +108 -0

108 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_filter.h new file +15 -0
new file mode 100644
index 0000000000..ad7e7d8c71
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef NT4GA_FILTER_H_
+#define NT4GA_FILTER_H_
+
+typedef struct nt4ga_filter_s {
+	int n_intf_cnt;
+	int n_queues_per_intf_cnt;
+
+	struct flow_nic_dev *mp_flow_device;
+} nt4ga_filter_t;
+
+#endif /* NT4GA_FILTER_H_ */
drivers/net/ntnic/adapter/nt4ga_link.c new file +178 -0

178 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_link.h new file +179 -0

179 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_link_100g.c new file +825 -0

825 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_link_100g.h new file +12 -0
new file mode 100644
index 0000000000..803b3454b7
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef NT4GA_LINK_100G_H_
+#define NT4GA_LINK_100G_H_
+
+#include "nthw_drv.h"
+
+int nt4ga_link_100g_ports_init(adapter_info_t *p_adapter_info, nt_fpga_t *p_fpga);
+
+#endif /* NT4GA_LINK_100G_H_ */
drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.c new file +598 -0

598 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.h new file +41 -0

41 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_stat.c new file +705 -0

553 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_stat.h new file +202 -0

202 lines not on this page · raw message

drivers/net/ntnic/meson.build +24 -0
index 65064f44ab..383ff15390 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nim/i2c_nim.c new file +1974 -0

1,974 lines not on this page · raw message

drivers/net/ntnic/nim/i2c_nim.h new file +122 -0

122 lines not on this page · raw message

drivers/net/ntnic/nim/nim_defines.h new file +146 -0

146 lines not on this page · raw message

drivers/net/ntnic/nim/nt_link_speed.c new file +105 -0

105 lines not on this page · raw message

drivers/net/ntnic/nim/nt_link_speed.h new file +34 -0
new file mode 100644
index 0000000000..969e3fb867

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nim/qsfp_registers.h new file +57 -0

57 lines not on this page · raw message

drivers/net/ntnic/nim/qsfp_sensors.c new file +174 -0

174 lines not on this page · raw message

drivers/net/ntnic/nim/qsfp_sensors.h new file +18 -0
new file mode 100644
index 0000000000..de64b978cb

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nim/sfp_p_registers.h new file +100 -0

100 lines not on this page · raw message

drivers/net/ntnic/nim/sfp_sensors.c new file +288 -0

288 lines not on this page · raw message

drivers/net/ntnic/nim/sfp_sensors.h new file +18 -0
new file mode 100644
index 0000000000..ab56027dc8

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_clock_profiles.c +9 -2
index efdcc222a8..bd7cd2a27c 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_core.h +2 -0
index 798a95d5cf..025b6b61cc 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_gmf.c new file +290 -0

290 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_gmf.h new file +93 -0

93 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_nt200a02_u23_si5340_v5.h new file +344 -0

344 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_rmc.c new file +156 -0

156 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_rmc.h new file +57 -0

57 lines not on this page · raw message

drivers/net/ntnic/sensors/avr_sensors/avr_sensors.c new file +104 -0

104 lines not on this page · raw message

drivers/net/ntnic/sensors/avr_sensors/avr_sensors.h new file +22 -0
new file mode 100644
index 0000000000..b8c37a12cb

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/board_sensors/board_sensors.c new file +48 -0

48 lines not on this page · raw message

drivers/net/ntnic/sensors/board_sensors/board_sensors.h new file +18 -0
new file mode 100644
index 0000000000..a7f75b7ae4

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/board_sensors/tempmon.c new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/sensors/board_sensors/tempmon.h new file +16 -0
new file mode 100644
index 0000000000..6f2017b714

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/nim_sensors/nim_sensors.c new file +54 -0

54 lines not on this page · raw message

drivers/net/ntnic/sensors/nim_sensors/nim_sensors.h new file +19 -0
new file mode 100644
index 0000000000..c68c9aa924

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/ntavr/avr_intf.h new file +89 -0

89 lines not on this page · raw message

drivers/net/ntnic/sensors/ntavr/ntavr.c new file +78 -0

78 lines not on this page · raw message

drivers/net/ntnic/sensors/ntavr/ntavr.h new file +32 -0
new file mode 100644
index 0000000000..b7a7aeb908

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/sensor_types.h new file +259 -0

259 lines not on this page · raw message

drivers/net/ntnic/sensors/sensors.c new file +273 -0

273 lines not on this page · raw message

drivers/net/ntnic/sensors/sensors.h new file +127 -0

127 lines not on this page · raw message

drivers/net/ntnic/sensors/stream_info.h new file +86 -0

86 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#3 lore raw

PATCH 4/8 net/ntnic: adds flow related FPGA functionality

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The PMD will control the registers used for flow programming, and this commit adds support for this.

---
 drivers/net/ntnic/meson.build                 |   21 +
 .../ntnic/nthw/flow_filter/flow_nthw_cat.c    | 1107 ++++++++++++++++
 .../ntnic/nthw/flow_filter/flow_nthw_cat.h    |  372 ++++++
 .../ntnic/nthw/flow_filter/flow_nthw_csu.c    |  146 +++
 .../ntnic/nthw/flow_filter/flow_nthw_csu.h    |   42 +
 .../ntnic/nthw/flow_filter/flow_nthw_flm.c    | 1140 +++++++++++++++++
 .../ntnic/nthw/flow_filter/flow_nthw_flm.h    |  422 ++++++
 .../ntnic/nthw/flow_filter/flow_nthw_hfu.c    |  293 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_hfu.h    |  100 ++
 .../ntnic/nthw/flow_filter/flow_nthw_hsh.c    |  254 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_hsh.h    |   81 ++
 .../ntnic/nthw/flow_filter/flow_nthw_hst.c    |  202 +++
 .../ntnic/nthw/flow_filter/flow_nthw_hst.h    |   72 ++
 .../ntnic/nthw/flow_filter/flow_nthw_ifr.c    |   93 ++
 .../ntnic/nthw/flow_filter/flow_nthw_ifr.h    |   39 +
 .../ntnic/nthw/flow_filter/flow_nthw_info.c   |  341 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_info.h   |  104 ++
 .../ntnic/nthw/flow_filter/flow_nthw_ioa.c    |  234 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_ioa.h    |   80 ++
 .../net/ntnic/nthw/flow_filter/flow_nthw_km.c |  686 ++++++++++
 .../net/ntnic/nthw/flow_filter/flow_nthw_km.h |  224 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_pdb.c    |  230 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_pdb.h    |   84 ++
 .../ntnic/nthw/flow_filter/flow_nthw_qsl.c    |  355 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_qsl.h    |  121 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rmc.c    |  112 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rmc.h    |   40 +
 .../ntnic/nthw/flow_filter/flow_nthw_roa.c    |  294 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_roa.h    |  109 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c |  132 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h |   53 +
 .../ntnic/nthw/flow_filter/flow_nthw_slc.c    |  109 ++
 .../ntnic/nthw/flow_filter/flow_nthw_slc.h    |   46 +
 .../ntnic/nthw/flow_filter/flow_nthw_slc_lr.c |  109 ++
 .../ntnic/nthw/flow_filter/flow_nthw_slc_lr.h |   46 +
 .../ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c |  394 ++++++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h |   72 ++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_ins.c |   96 ++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_ins.h |   42 +
 .../ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c |  165 +++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h |   70 +
 41 files changed, 8732 insertions(+)
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h
drivers/net/ntnic/meson.build +21 -0
index 383ff15390..c184d5d4b5 100644
@@ -17,6 +17,7 @@ includes = [
     include_directories('nthw'),
     include_directories('nthw/core'),
     include_directories('nthw/supported'),
+    include_directories('nthw/flow_filter'),
     include_directories('sensors'),
     include_directories('sensors/avr_sensors'),
     include_directories('sensors/board_sensors'),
@@ -58,6 +59,26 @@ sources = files(
     'nthw/core/nthw_spim.c',
     'nthw/core/nthw_spis.c',
     'nthw/core/nthw_tsm.c',
+    'nthw/flow_filter/flow_nthw_cat.c',
+    'nthw/flow_filter/flow_nthw_csu.c',
+    'nthw/flow_filter/flow_nthw_flm.c',
+    'nthw/flow_filter/flow_nthw_hfu.c',
+    'nthw/flow_filter/flow_nthw_hsh.c',
+    'nthw/flow_filter/flow_nthw_hst.c',
+    'nthw/flow_filter/flow_nthw_ifr.c',
+    'nthw/flow_filter/flow_nthw_info.c',
+    'nthw/flow_filter/flow_nthw_ioa.c',
+    'nthw/flow_filter/flow_nthw_km.c',
+    'nthw/flow_filter/flow_nthw_pdb.c',
+    'nthw/flow_filter/flow_nthw_qsl.c',
+    'nthw/flow_filter/flow_nthw_rmc.c',
+    'nthw/flow_filter/flow_nthw_roa.c',
+    'nthw/flow_filter/flow_nthw_rpp_lr.c',
+    'nthw/flow_filter/flow_nthw_slc.c',
+    'nthw/flow_filter/flow_nthw_slc_lr.c',
+    'nthw/flow_filter/flow_nthw_tx_cpy.c',
+    'nthw/flow_filter/flow_nthw_tx_ins.c',
+    'nthw/flow_filter/flow_nthw_tx_rpl.c',
     'nthw/nthw_fpga_model.c',
     'nthw/nthw_dbs.c',
     'nthw/nthw_epp.c',
drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c new file +1107 -0

1,107 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.h new file +372 -0

372 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c new file +146 -0

146 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.h new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.c new file +1140 -0

1,140 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.h new file +422 -0

160 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.c new file +293 -0

293 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.h new file +100 -0

100 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c new file +254 -0

254 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h new file +81 -0

81 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.c new file +202 -0

202 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.h new file +72 -0

72 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c new file +93 -0

93 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h new file +39 -0
new file mode 100644
index 0000000000..626ca3d193

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.c new file +341 -0

341 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.h new file +104 -0

104 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.c new file +234 -0

234 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.h new file +80 -0

80 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.c new file +686 -0

686 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.h new file +224 -0

224 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.c new file +230 -0

230 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.h new file +84 -0

84 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.c new file +355 -0

355 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.h new file +121 -0

121 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.c new file +112 -0

112 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.h new file +40 -0
new file mode 100644
index 0000000000..57d5776002

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.c new file +294 -0

294 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.h new file +109 -0

109 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c new file +132 -0

132 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h new file +53 -0

53 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.c new file +109 -0

109 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.h new file +46 -0

46 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.c new file +109 -0

109 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.h new file +46 -0

46 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c new file +394 -0

394 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h new file +72 -0

72 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.c new file +96 -0

96 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.h new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c new file +165 -0

165 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h new file +70 -0

70 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#4 lore raw

PATCH 5/8 net/ntnic: adds FPGA abstraction layer

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The FPGA abstraction layer limits the need to rewrite flow logic when new FPGA modules are created.

---
 drivers/net/ntnic/meson.build                 |   21 +
 .../ntnic/nthw/flow_api/flow_api_actions.c    |  205 ++
 .../ntnic/nthw/flow_api/flow_api_actions.h    |  284 +++
 .../ntnic/nthw/flow_api/flow_api_backend.c    |  182 ++
 .../ntnic/nthw/flow_api/flow_api_backend.h    | 1818 +++++++++++++++++
 .../net/ntnic/nthw/flow_api/flow_api_engine.h |  475 +++++
 .../ntnic/nthw/flow_api/flow_api_nic_setup.h  |   32 +
 .../nthw/flow_api/flow_engine/flow_group.c    |  125 ++
 .../nthw/flow_api/flow_engine/flow_hasher.c   |  213 ++
 .../nthw/flow_api/flow_engine/flow_hasher.h   |   20 +
 .../nthw/flow_api/flow_engine/flow_kcc.c      |  434 ++++
 .../ntnic/nthw/flow_api/flow_engine/flow_km.c | 1438 +++++++++++++
 .../nthw/flow_api/flow_engine/flow_tunnel.c   |  787 +++++++
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c   | 1789 ++++++++++++++++
 .../nthw/flow_api/hw_mod/hw_mod_cat_v18.h     |  138 ++
 .../nthw/flow_api/hw_mod/hw_mod_cat_v21.h     |   88 +
 .../nthw/flow_api/hw_mod/hw_mod_cat_v22.h     |   83 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c   | 1099 ++++++++++
 .../nthw/flow_api/hw_mod/hw_mod_flm_v17.h     |  274 +++
 .../nthw/flow_api/hw_mod/hw_mod_flm_v20.h     |  102 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c   |  195 ++
 .../nthw/flow_api/hw_mod/hw_mod_hsh_v5.h      |   36 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c   |  178 ++
 .../nthw/flow_api/hw_mod/hw_mod_hst_v2.h      |   32 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c   |  271 +++
 .../nthw/flow_api/hw_mod/hw_mod_ioa_v4.h      |   36 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_km.c    |  629 ++++++
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h |   93 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c   |  219 ++
 .../nthw/flow_api/hw_mod/hw_mod_pdb_v9.h      |   39 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c   |  348 ++++
 .../nthw/flow_api/hw_mod/hw_mod_qsl_v7.h      |   45 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c   |  112 +
 .../nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h    |   20 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c   |  358 ++++
 .../nthw/flow_api/hw_mod/hw_mod_roa_v6.h      |   49 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c   |  132 ++
 .../nthw/flow_api/hw_mod/hw_mod_slc_lr.c      |  132 ++
 .../nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h   |   19 +
 .../nthw/flow_api/hw_mod/hw_mod_slc_v1.h      |   19 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c   |  983 +++++++++
 .../nthw/flow_api/hw_mod/hw_mod_tpe_v1.h      |  103 +
 .../nthw/flow_api/hw_mod/hw_mod_tpe_v2.h      |   37 +
 .../nthw/flow_api/stream_binary_flow_api.h    |  697 +++++++
 44 files changed, 14389 insertions(+)
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_actions.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_actions.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_backend.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_backend.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_engine.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_nic_setup.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_group.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_kcc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_km.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_tunnel.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v18.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v21.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v22.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v17.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v20.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh_v5.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst_v2.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa_v4.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb_v9.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl_v7.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa_v6.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_v1.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v1.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v2.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/stream_binary_flow_api.h
drivers/net/ntnic/meson.build +21 -0
index c184d5d4b5..387481bb4a 100644
@@ -17,6 +17,7 @@ includes = [
     include_directories('nthw'),
     include_directories('nthw/core'),
     include_directories('nthw/supported'),
+    include_directories('nthw/flow_api'),
     include_directories('nthw/flow_filter'),
     include_directories('sensors'),
     include_directories('sensors/avr_sensors'),
@@ -59,6 +60,26 @@ sources = files(
     'nthw/core/nthw_spim.c',
     'nthw/core/nthw_spis.c',
     'nthw/core/nthw_tsm.c',
+    'nthw/flow_api/flow_api_actions.c',
+    'nthw/flow_api/flow_api_backend.c',
+    'nthw/flow_api/flow_engine/flow_group.c',
+    'nthw/flow_api/flow_engine/flow_hasher.c',
+    'nthw/flow_api/flow_engine/flow_kcc.c',
+    'nthw/flow_api/flow_engine/flow_km.c',
+    'nthw/flow_api/flow_engine/flow_tunnel.c',
+    'nthw/flow_api/hw_mod/hw_mod_cat.c',
+    'nthw/flow_api/hw_mod/hw_mod_flm.c',
+    'nthw/flow_api/hw_mod/hw_mod_hsh.c',
+    'nthw/flow_api/hw_mod/hw_mod_hst.c',
+    'nthw/flow_api/hw_mod/hw_mod_ioa.c',
+    'nthw/flow_api/hw_mod/hw_mod_km.c',
+    'nthw/flow_api/hw_mod/hw_mod_pdb.c',
+    'nthw/flow_api/hw_mod/hw_mod_qsl.c',
+    'nthw/flow_api/hw_mod/hw_mod_rmc.c',
+    'nthw/flow_api/hw_mod/hw_mod_roa.c',
+    'nthw/flow_api/hw_mod/hw_mod_slc.c',
+    'nthw/flow_api/hw_mod/hw_mod_slc_lr.c',
+    'nthw/flow_api/hw_mod/hw_mod_tpe.c',
     'nthw/flow_filter/flow_nthw_cat.c',
     'nthw/flow_filter/flow_nthw_csu.c',
     'nthw/flow_filter/flow_nthw_flm.c',
drivers/net/ntnic/nthw/flow_api/flow_api_actions.c new file +205 -0

205 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_actions.h new file +284 -0

284 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_backend.c new file +182 -0

182 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_backend.h new file +1818 -0

1,818 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_engine.h new file +475 -0

475 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_nic_setup.h new file +32 -0
new file mode 100644
index 0000000000..c4db0f4c5c
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_group.c new file +125 -0

125 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.c new file +213 -0

213 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.h new file +20 -0
new file mode 100644
index 0000000000..6365a396d2

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_kcc.c new file +434 -0

434 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_km.c new file +1438 -0

1,438 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_tunnel.c new file +787 -0

787 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c new file +1789 -0

1,789 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v18.h new file +138 -0

138 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v21.h new file +88 -0

88 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v22.h new file +83 -0

83 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c new file +1099 -0

1,099 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v17.h new file +274 -0

274 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v20.h new file +102 -0

102 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c new file +195 -0

195 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh_v5.h new file +36 -0
new file mode 100644
index 0000000000..8588750ff0

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c new file +178 -0

178 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst_v2.h new file +32 -0
new file mode 100644
index 0000000000..230c70b56d

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c new file +271 -0

271 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa_v4.h new file +36 -0
new file mode 100644
index 0000000000..309b53ff76

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c new file +629 -0

629 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h new file +93 -0

93 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c new file +219 -0

219 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb_v9.h new file +39 -0
new file mode 100644
index 0000000000..b14c10bc53

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c new file +348 -0

348 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl_v7.h new file +45 -0

45 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c new file +112 -0

112 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h new file +20 -0
new file mode 100644
index 0000000000..8f90695821

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c new file +358 -0

358 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa_v6.h new file +49 -0

49 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c new file +132 -0

132 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr.c new file +132 -0

132 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h new file +19 -0
new file mode 100644
index 0000000000..d03b206e6d

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_v1.h new file +19 -0
new file mode 100644
index 0000000000..01f60bfb18

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c new file +983 -0

983 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v1.h new file +103 -0

103 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v2.h new file +37 -0
new file mode 100644
index 0000000000..c56cad8d89

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/stream_binary_flow_api.h new file +697 -0

697 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#5 lore raw

PATCH 6/8 net/ntnic: adds flow logic

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

This logic layer takes rte_flow style patterns and actions as input, and programs the FPGA accordingly.

---
 drivers/net/ntnic/adapter/nt4ga_adapter.c     |   13 +
 drivers/net/ntnic/adapter/nt4ga_stat.c        |   20 +-
 drivers/net/ntnic/meson.build                 |    4 +
 drivers/net/ntnic/nthw/flow_api/flow_api.c    | 1306 +++++
 drivers/net/ntnic/nthw/flow_api/flow_api.h    |  291 +
 .../nthw/flow_api/flow_api_profile_inline.c   | 5118 +++++++++++++++++
 .../nthw/flow_api/flow_api_profile_inline.h   |   56 +
 .../net/ntnic/nthw/flow_filter/flow_backend.c | 3205 +++++++++++
 .../net/ntnic/nthw/flow_filter/flow_backend.h |   15 +
 .../net/ntnic/nthw/flow_filter/flow_filter.c  |   39 +
 .../net/ntnic/nthw/flow_filter/flow_filter.h  |   16 +
 11 files changed, 10078 insertions(+), 5 deletions(-)
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_backend.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_backend.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_filter.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_filter.h
drivers/net/ntnic/adapter/nt4ga_adapter.c +13 -0
index 259aae2831..f9493202c3 100644
@@ -10,6 +10,8 @@
 #include "nt4ga_pci_ta_tg.h"
 #include "nt4ga_link_100g.h"
 
+#include "flow_filter.h"
+
 /* Sensors includes */
 #include "board_sensors.h"
 #include "avr_sensors.h"
@@ -306,6 +308,17 @@ int nt4ga_adapter_init(struct adapter_info_s *p_adapter_info)
 	n_nim_ports = fpga_info->n_nims;
 	assert(n_nim_ports >= 1);
 
+	/* Nt4ga Init Filter */
+	nt4ga_filter_t *p_filter = &p_adapter_info->nt4ga_filter;
+
+	res = flow_filter_init(p_fpga, &p_filter->mp_flow_device,
+			     p_adapter_info->adapter_no);
+	if (res != 0) {
+		NT_LOG(ERR, ETHDEV, "%s: Cannot initialize filter\n",
+		       p_adapter_id_str);
+		return res;
+	}
+
 	/*
 	 * HIF/PCI TA/TG
 	 */
drivers/net/ntnic/adapter/nt4ga_stat.c +15 -5
index b61c73ea12..2c822c6b97 100644
@@ -7,6 +7,7 @@
 #include "nthw_drv.h"
 #include "nthw_fpga.h"
 #include "nt4ga_adapter.h"
+#include "flow_filter.h"
 
 #define NO_FLAGS 0
 
@@ -16,12 +17,13 @@ static inline uint64_t timestamp2ns(uint64_t ts)
 	return ((ts >> 32) * 1000000000) + (ts & 0xffffffff);
 }
 
-static int nt4ga_stat_collect_cap_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
+static int nt4ga_stat_collect_cap_v1_stats(struct adapter_info_s *p_adapter_info,
+				   nt4ga_stat_t *p_nt4ga_stat,
 				   uint32_t *p_stat_dma_virtual);
 static int nt4ga_stat_collect_virt_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
 				    uint32_t *p_stat_dma_virtual);
 
-int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info _unused,
+int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info,
 		      nt4ga_stat_t *p_nt4ga_stat)
 {
 	nthw_stat_t *p_nthw_stat = p_nt4ga_stat->mp_nthw_stat;
@@ -39,7 +41,7 @@ int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info _unused,
 	} else {
 		p_nt4ga_stat->last_timestamp =
 			timestamp2ns(*p_nthw_stat->mp_timestamp);
-		nt4ga_stat_collect_cap_v1_stats(p_nt4ga_stat,
+		nt4ga_stat_collect_cap_v1_stats(p_adapter_info, p_nt4ga_stat,
 					       p_nt4ga_stat->p_stat_dma_virtual);
 	}
 	return 0;
@@ -198,7 +200,9 @@ int nt4ga_stat_setup(struct adapter_info_s *p_adapter_info)
 			return -1;
 		}
 
-		p_nt4ga_stat->flm_stat_ver = 0;
+		struct flow_nic_dev *ndev =
+				p_adapter_info->nt4ga_filter.mp_flow_device;
+		p_nt4ga_stat->flm_stat_ver = ndev->be.flm.ver;
 
 		p_nt4ga_stat->mp_stat_structs_flm =
 			calloc(1, sizeof(struct flm_counters_v1));
@@ -394,10 +398,12 @@ static int nt4ga_stat_collect_virt_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
 }
 
 /* Called with stat mutex locked */
-static int nt4ga_stat_collect_cap_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
+static int nt4ga_stat_collect_cap_v1_stats(struct adapter_info_s *p_adapter_info,
+					   nt4ga_stat_t *p_nt4ga_stat,
 					   uint32_t *p_stat_dma_virtual)
 {
 	nthw_stat_t *p_nthw_stat = p_nt4ga_stat->mp_nthw_stat;
+	struct flow_nic_dev *ndev = p_adapter_info->nt4ga_filter.mp_flow_device;
 
 	const int n_rx_ports = p_nt4ga_stat->mn_rx_ports;
 	const int n_tx_ports = p_nt4ga_stat->mn_tx_ports;
@@ -701,5 +707,9 @@ static int nt4ga_stat_collect_cap_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
 		p_nt4ga_stat->a_port_tx_drops_total[p] += new_drop_events_sum;
 	}
 
+	/* _update and get FLM stats */
+	flow_get_flm_stats(ndev, (uint64_t *)p_nt4ga_stat->mp_stat_structs_flm,
+			   sizeof(struct flm_counters_v1) / sizeof(uint64_t));
+
 	return 0;
 }
drivers/net/ntnic/meson.build +4 -0
index 387481bb4a..a9892615c9 100644
@@ -60,8 +60,10 @@ sources = files(
     'nthw/core/nthw_spim.c',
     'nthw/core/nthw_spis.c',
     'nthw/core/nthw_tsm.c',
+    'nthw/flow_api/flow_api.c',
     'nthw/flow_api/flow_api_actions.c',
     'nthw/flow_api/flow_api_backend.c',
+    'nthw/flow_api/flow_api_profile_inline.c',
     'nthw/flow_api/flow_engine/flow_group.c',
     'nthw/flow_api/flow_engine/flow_hasher.c',
     'nthw/flow_api/flow_engine/flow_kcc.c',
@@ -80,6 +82,8 @@ sources = files(
     'nthw/flow_api/hw_mod/hw_mod_slc.c',
     'nthw/flow_api/hw_mod/hw_mod_slc_lr.c',
     'nthw/flow_api/hw_mod/hw_mod_tpe.c',
+    'nthw/flow_filter/flow_backend.c',
+    'nthw/flow_filter/flow_filter.c',
     'nthw/flow_filter/flow_nthw_cat.c',
     'nthw/flow_filter/flow_nthw_csu.c',
     'nthw/flow_filter/flow_nthw_flm.c',
drivers/net/ntnic/nthw/flow_api/flow_api.c new file +1306 -0

1,306 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api.h new file +291 -0

291 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.c new file +5118 -0

1,298 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.h new file +56 -0

56 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_backend.c new file +3205 -0

3,205 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_backend.h new file +15 -0
new file mode 100644
index 0000000000..17fdcada3f

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_filter.c new file +39 -0
new file mode 100644
index 0000000000..90aeb71bd7

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_filter.h new file +16 -0
new file mode 100644
index 0000000000..8ea21a614a

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#6 lore raw

PATCH 7/8 net/ntnic: adds ethdev and makes PMD available

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

Hooks into the DPDK API, and make the PMD available to use. Also adds documentation as .rst and .ini files.

---
 .mailmap                                      |    2 +
 MAINTAINERS                                   |    7 +
 doc/guides/nics/features/ntnic.ini            |   56 +
 doc/guides/nics/ntnic.rst                     |  235 +
 drivers/net/ntnic/include/ntdrv_4ga.h         |   23 +
 drivers/net/ntnic/include/ntos_system.h       |   23 +
 drivers/net/ntnic/meson.build                 |   13 +
 drivers/net/ntnic/ntnic_dbsconfig.c           | 1670 +++++++
 drivers/net/ntnic/ntnic_dbsconfig.h           |  251 +
 drivers/net/ntnic/ntnic_ethdev.c              | 4258 +++++++++++++++++
 drivers/net/ntnic/ntnic_ethdev.h              |  357 ++
 .../net/ntnic/ntnic_filter/create_elements.h  | 1194 +++++
 drivers/net/ntnic/ntnic_filter/ntnic_filter.c |  656 +++
 drivers/net/ntnic/ntnic_filter/ntnic_filter.h |   14 +
 drivers/net/ntnic/ntnic_hshconfig.c           |  102 +
 drivers/net/ntnic/ntnic_hshconfig.h           |    9 +
 drivers/net/ntnic/ntnic_meter.c               |  811 ++++
 drivers/net/ntnic/ntnic_meter.h               |   10 +
 drivers/net/ntnic/ntnic_vdpa.c                |  365 ++
 drivers/net/ntnic/ntnic_vdpa.h                |   21 +
 drivers/net/ntnic/ntnic_vf.c                  |   83 +
 drivers/net/ntnic/ntnic_vf.h                  |   17 +
 drivers/net/ntnic/ntnic_vf_vdpa.c             | 1246 +++++
 drivers/net/ntnic/ntnic_vf_vdpa.h             |   25 +
 drivers/net/ntnic/ntnic_vfio.c                |  321 ++
 drivers/net/ntnic/ntnic_vfio.h                |   31 +
 drivers/net/ntnic/ntnic_xstats.c              |  703 +++
 drivers/net/ntnic/ntnic_xstats.h              |   22 +
 28 files changed, 12525 insertions(+)
 create mode 100644 doc/guides/nics/features/ntnic.ini
 create mode 100644 doc/guides/nics/ntnic.rst
 create mode 100644 drivers/net/ntnic/include/ntdrv_4ga.h
 create mode 100644 drivers/net/ntnic/include/ntos_system.h
 create mode 100644 drivers/net/ntnic/ntnic_dbsconfig.c
 create mode 100644 drivers/net/ntnic/ntnic_dbsconfig.h
 create mode 100644 drivers/net/ntnic/ntnic_ethdev.c
 create mode 100644 drivers/net/ntnic/ntnic_ethdev.h
 create mode 100644 drivers/net/ntnic/ntnic_filter/create_elements.h
 create mode 100644 drivers/net/ntnic/ntnic_filter/ntnic_filter.c
 create mode 100644 drivers/net/ntnic/ntnic_filter/ntnic_filter.h
 create mode 100644 drivers/net/ntnic/ntnic_hshconfig.c
 create mode 100644 drivers/net/ntnic/ntnic_hshconfig.h
 create mode 100644 drivers/net/ntnic/ntnic_meter.c
 create mode 100644 drivers/net/ntnic/ntnic_meter.h
 create mode 100644 drivers/net/ntnic/ntnic_vdpa.c
 create mode 100644 drivers/net/ntnic/ntnic_vdpa.h
 create mode 100644 drivers/net/ntnic/ntnic_vf.c
 create mode 100644 drivers/net/ntnic/ntnic_vf.h
 create mode 100644 drivers/net/ntnic/ntnic_vf_vdpa.c
 create mode 100644 drivers/net/ntnic/ntnic_vf_vdpa.h
 create mode 100644 drivers/net/ntnic/ntnic_vfio.c
 create mode 100644 drivers/net/ntnic/ntnic_vfio.h
 create mode 100644 drivers/net/ntnic/ntnic_xstats.c
 create mode 100644 drivers/net/ntnic/ntnic_xstats.h
.mailmap +2 -0
index 864d33ee46..be8880971d 100644
@@ -227,6 +227,7 @@ Chintu Hetam <[email protected]>
 Choonho Son <[email protected]>
 Chris Metcalf <[email protected]>
 Christian Ehrhardt <[email protected]>
+Christian Koue Muf <[email protected]>
 Christian Maciocco <[email protected]>
 Christophe Fontaine <[email protected]>
 Christophe Grosse <[email protected]>
@@ -967,6 +968,7 @@ Mukesh Dua <[email protected]>
 Murphy Yang <[email protected]>
 Murthy NSSR <[email protected]>
 Muthurajan Jayakumar <[email protected]>
+Mykola Kostenok <[email protected]>
 Nachiketa Prachanda <[email protected]> <[email protected]>
 Nagadheeraj Rottela <[email protected]>
 Naga Harish K S V <[email protected]>
MAINTAINERS +7 -0
index 8c3f2c993f..02aca74173 100644
@@ -1053,6 +1053,13 @@ F: drivers/net/memif/
 F: doc/guides/nics/memif.rst
 F: doc/guides/nics/features/memif.ini
 
+NTNIC PMD
+M: Mykola Kostenok <[email protected]>
+M: Christiam Muf <[email protected]>
+F: drivers/net/ntnic/
+F: doc/guides/nics/ntnic.rst
+F: doc/guides/nics/features/ntnic.ini
+
 
 Crypto Drivers
 --------------
doc/guides/nics/features/ntnic.ini new file +56 -0

56 lines not on this page · raw message

doc/guides/nics/ntnic.rst new file +235 -0

235 lines not on this page · raw message

drivers/net/ntnic/include/ntdrv_4ga.h new file +23 -0
new file mode 100644
index 0000000000..e9c38fc330
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTDRV_4GA_H__
+#define __NTDRV_4GA_H__
+
+#include "nthw_drv.h"
+#include "nt4ga_adapter.h"
+#include "nthw_platform_drv.h"
+
+typedef struct ntdrv_4ga_s {
+	uint32_t pciident;
+	struct adapter_info_s adapter_info;
+	char *p_drv_name;
+
+	volatile bool b_shutdown;
+	pthread_mutex_t stat_lck;
+	pthread_t stat_thread;
+	pthread_t flm_thread;
+} ntdrv_4ga_t;
+
+#endif /* __NTDRV_4GA_H__ */
drivers/net/ntnic/include/ntos_system.h new file +23 -0
new file mode 100644
index 0000000000..0adfe86cc3
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTOS_SYSTEM_H__
+#define __NTOS_SYSTEM_H__
+
+#include "include/ntdrv_4ga.h"
+
+/*
+ * struct drv_s for DPDK (clone of kernel struct)
+ * keep it as close as possible to original kernel struct
+ */
+struct drv_s {
+	int adapter_no;
+	struct rte_pci_device *p_dev;
+	struct ntdrv_4ga_s ntdrv;
+
+	int n_eth_dev_init_count;
+	int probe_finished;
+};
+
+#endif /* __NTOS_SYSTEM_H__ */
drivers/net/ntnic/meson.build +13 -0
index a9892615c9..faaba95af3 100644
@@ -26,6 +26,9 @@ includes = [
     include_directories('sensors/ntavr'),
 ]
 
+# deps
+deps += 'vhost'
+
 # all sources
 sources = files(
     'adapter/nt4ga_adapter.c',
@@ -112,6 +115,16 @@ sources = files(
     'nthw/nthw_stat.c',
     'nthw/supported/nthw_fpga_9563_055_024_0000.c',
     'ntlog/ntlog.c',
+    'ntnic_dbsconfig.c',
+    'ntnic_ethdev.c',
+    'ntnic_filter/ntnic_filter.c',
+    'ntnic_hshconfig.c',
+    'ntnic_meter.c',
+    'ntnic_vdpa.c',
+    'ntnic_vf.c',
+    'ntnic_vfio.c',
+    'ntnic_vf_vdpa.c',
+    'ntnic_xstats.c',
     'ntutil/nt_util.c',
     'sensors/avr_sensors/avr_sensors.c',
     'sensors/board_sensors/board_sensors.c',
drivers/net/ntnic/ntnic_dbsconfig.c new file +1670 -0

1,670 lines not on this page · raw message

drivers/net/ntnic/ntnic_dbsconfig.h new file +251 -0

251 lines not on this page · raw message

drivers/net/ntnic/ntnic_ethdev.c new file +4258 -0

690 lines not on this page · raw message

drivers/net/ntnic/ntnic_ethdev.h new file +357 -0

357 lines not on this page · raw message

drivers/net/ntnic/ntnic_filter/create_elements.h new file +1194 -0

1,194 lines not on this page · raw message

drivers/net/ntnic/ntnic_filter/ntnic_filter.c new file +656 -0

656 lines not on this page · raw message

drivers/net/ntnic/ntnic_filter/ntnic_filter.h new file +14 -0
new file mode 100644
index 0000000000..cf4207e5de

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_hshconfig.c new file +102 -0

102 lines not on this page · raw message

drivers/net/ntnic/ntnic_hshconfig.h new file +9 -0
new file mode 100644
index 0000000000..d4d7337d23

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_meter.c new file +811 -0

811 lines not on this page · raw message

drivers/net/ntnic/ntnic_meter.h new file +10 -0
new file mode 100644
index 0000000000..9484c9ee20

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_vdpa.c new file +365 -0

365 lines not on this page · raw message

drivers/net/ntnic/ntnic_vdpa.h new file +21 -0
new file mode 100644
index 0000000000..7acc2c8e4b

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_vf.c new file +83 -0

83 lines not on this page · raw message

drivers/net/ntnic/ntnic_vf.h new file +17 -0
new file mode 100644
index 0000000000..84be3bd71f

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_vf_vdpa.c new file +1246 -0

1,246 lines not on this page · raw message

drivers/net/ntnic/ntnic_vf_vdpa.h new file +25 -0
new file mode 100644
index 0000000000..561e3bf7cf

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_vfio.c new file +321 -0

321 lines not on this page · raw message

drivers/net/ntnic/ntnic_vfio.h new file +31 -0
new file mode 100644
index 0000000000..5d8a63d364

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_xstats.c new file +703 -0

703 lines not on this page · raw message

drivers/net/ntnic/ntnic_xstats.h new file +22 -0
new file mode 100644
index 0000000000..0a82a1a677

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#7 lore raw

PATCH 8/8 net/ntnic: adds socket connection to PMD

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The socket connection is used by Napatech's tools for monitoring and rte_flow programming from other processes.

---
 drivers/net/ntnic/meson.build                 |   24 +
 .../ntconnect/include/ntconn_mod_helper.h     |   97 ++
 .../net/ntnic/ntconnect/include/ntconnect.h   |   96 ++
 .../ntnic/ntconnect/include/ntconnect_api.h   |   87 ++
 .../ntconnect/include/ntconnect_api_adapter.h |  221 +++
 .../ntconnect/include/ntconnect_api_flow.h    |  168 +++
 .../ntconnect/include/ntconnect_api_meter.h   |   89 ++
 .../include/ntconnect_api_statistic.h         |  173 +++
 .../ntconnect/include/ntconnect_api_test.h    |   18 +
 drivers/net/ntnic/ntconnect/ntconn_server.c   |   97 ++
 drivers/net/ntnic/ntconnect/ntconnect.c       |  641 ++++++++
 .../ntnic/ntconnect_modules/ntconn_adapter.c  |  775 ++++++++++
 .../net/ntnic/ntconnect_modules/ntconn_flow.c | 1310 +++++++++++++++++
 .../ntnic/ntconnect_modules/ntconn_meter.c    |  517 +++++++
 .../ntnic/ntconnect_modules/ntconn_modules.h  |   19 +
 .../net/ntnic/ntconnect_modules/ntconn_stat.c |  876 +++++++++++
 .../net/ntnic/ntconnect_modules/ntconn_test.c |  146 ++
 17 files changed, 5354 insertions(+)
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconn_mod_helper.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_adapter.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_flow.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_meter.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_statistic.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_test.h
 create mode 100644 drivers/net/ntnic/ntconnect/ntconn_server.c
 create mode 100644 drivers/net/ntnic/ntconnect/ntconnect.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_adapter.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_flow.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_meter.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_modules.h
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_stat.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_test.c
drivers/net/ntnic/meson.build +24 -0
index faaba95af3..262ce436b9 100644
@@ -1,11 +1,27 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020-2023 Napatech A/S
 
+# config object
+ntnic_conf = configuration_data()
+
+# transfer options into config object
+ntnic_conf.set('NT_TOOLS', true)
+
 # cflags
 cflags += [
     '-std=c11',
 ]
 
+# check option 'debug' (boolean flag derived from meson buildtype)
+if get_option('debug')
+    cflags += '-DDEBUG'
+endif
+
+# check nt_tools build option
+if ntnic_conf.get('NT_TOOLS')
+    cflags += '-DNT_TOOLS'
+endif
+
 # includes
 includes = [
     include_directories('.'),
@@ -19,6 +35,7 @@ includes = [
     include_directories('nthw/supported'),
     include_directories('nthw/flow_api'),
     include_directories('nthw/flow_filter'),
+    include_directories('ntconnect/include'),
     include_directories('sensors'),
     include_directories('sensors/avr_sensors'),
     include_directories('sensors/board_sensors'),
@@ -40,6 +57,13 @@ sources = files(
     'nim/nt_link_speed.c',
     'nim/qsfp_sensors.c',
     'nim/sfp_sensors.c',
+    'ntconnect/ntconn_server.c',
+    'ntconnect/ntconnect.c',
+    'ntconnect_modules/ntconn_adapter.c',
+    'ntconnect_modules/ntconn_flow.c',
+    'ntconnect_modules/ntconn_meter.c',
+    'ntconnect_modules/ntconn_stat.c',
+    'ntconnect_modules/ntconn_test.c',
     'nthw/core/nthw_clock_profiles.c',
     'nthw/core/nthw_fpga.c',
     'nthw/core/nthw_fpga_nt200a0x.c',
drivers/net/ntnic/ntconnect/include/ntconn_mod_helper.h new file +97 -0

97 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect.h new file +96 -0

96 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api.h new file +87 -0

87 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_adapter.h new file +221 -0

221 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_flow.h new file +168 -0

168 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_meter.h new file +89 -0

89 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_statistic.h new file +173 -0

173 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_test.h new file +18 -0
new file mode 100644
index 0000000000..44cacbd931
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef _NTCONNECT_TEST_FILTER_H_
+#define _NTCONNECT_TEST_FILTER_H_
+
+/*
+ * Create structures allocating the space to carry through ntconnect interface
+ */
+
+struct test_s {
+	int number;
+	int status;
+	uint64_t test[];
+};
+
+#endif /* _NTCONNECT_TEST_FILTER_H_ */
drivers/net/ntnic/ntconnect/ntconn_server.c new file +97 -0

97 lines not on this page · raw message

drivers/net/ntnic/ntconnect/ntconnect.c new file +641 -0

641 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_adapter.c new file +775 -0

775 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_flow.c new file +1310 -0

491 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_meter.c new file +517 -0

517 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_modules.h new file +19 -0
new file mode 100644
index 0000000000..ea379015fe

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntconnect_modules/ntconn_stat.c new file +876 -0

876 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_test.c new file +146 -0

146 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#8 lore raw

Re: [PATCH 8/8] net/ntnic: adds socket connection to PMD

Quoted 7 lines · On Wed, 16 Aug 2023 15:25:52 +0200 Mykola Kostenok <[email protected]> wrote:

From: Christian Koue Muf <[email protected]>

The socket connection is used by Napatech's tools for monitoring and rte_flow programming from other processes.

I would prefer that this be general and work with other PMD's. Why is existing telemetry model not good enough?

#9 lore raw

RE: [PATCH 8/8] net/ntnic: adds socket connection to PMD

Quoted 5 lines · Stephen Hemminger
Quoted 2 lines · On Wed, 16 Aug 2023 15:25:52 +0200 Mykola Kostenok <[email protected]> wrote:

From: Christian Koue Muf <[email protected]>

Quoted 8 lines
Quoted 5 lines

The socket connection is used by Napatech's tools for monitoring and rte_flow programming from other processes.

I would prefer that this be general and work with other PMD's. Why is existing telemetry model not good enough?

The existing telemetry is good enough in many cases. The problems arise in multi-container environments. The design of Napatech's adapters is that they only have 1 PF, which is owned by a single process in a single container. Other containers will only have access to VFs, which do not provide any metrics. The ntconnect socket will allow remote applications to access data from the application that owns the PF.

I understand your concerns for security. My suggestion would be to disable the code using meson.build config by default.

#10 lore raw

Re: [PATCH 8/8] net/ntnic: adds socket connection to PMD

In reply to Mykola Kostenok
Quoted 7 lines · On Wed, 16 Aug 2023 15:25:52 +0200 Mykola Kostenok <[email protected]> wrote:

From: Christian Koue Muf <[email protected]>

The socket connection is used by Napatech's tools for monitoring and rte_flow programming from other processes.

Also, a proprietary socket API introduces a whole new security attack surface.

#11 lore raw

PATCH v2 1/8 net/ntnic: initial commit which adds register defines

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.

---
 drivers/net/meson.build                       |    1 +
 drivers/net/ntnic/include/fpga_model.h        |   99 +
 drivers/net/ntnic/meson.build                 |   29 +
 drivers/net/ntnic/nthw/nthw_register.h        |   19 +
 .../supported/nthw_fpga_9563_055_024_0000.c   | 4190 ++++++++++
 .../nthw/supported/nthw_fpga_instances.h      |   14 +
 .../nthw/supported/nthw_fpga_modules_defs.h   |  166 +
 .../supported/nthw_fpga_parameters_defs.h     |  209 +
 .../nthw/supported/nthw_fpga_registers_defs.h | 7277 +++++++++++++++++
 9 files changed, 12004 insertions(+)
 create mode 100644 drivers/net/ntnic/include/fpga_model.h
 create mode 100644 drivers/net/ntnic/meson.build
 create mode 100644 drivers/net/ntnic/nthw/nthw_register.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_024_0000.c
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_instances.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_modules_defs.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_parameters_defs.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_registers_defs.h
drivers/net/meson.build +1 -0
index bd38b533c5..fb6d34b782 100644
@@ -45,6 +45,7 @@ drivers = [
         'nfb',
         'nfp',
         'ngbe',
+        'ntnic',
         'null',
         'octeontx',
         'octeon_ep',
drivers/net/ntnic/include/fpga_model.h new file +99 -0

99 lines not on this page · raw message

drivers/net/ntnic/meson.build new file +29 -0
new file mode 100644
index 0000000000..99569c2843
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2020-2023 Napatech A/S
+
+# cflags
+cflags += [
+    '-std=c11',
+]
+
+# includes
+includes = [
+    include_directories('.'),
+    include_directories('include'),
+    include_directories('nthw'),
+    include_directories('nthw/supported'),
+]
+
+# all sources
+sources = files(
+    'nthw/supported/nthw_fpga_9563_055_024_0000.c',
+)
+
+if is_variable('default_cflags')
+      cflags += default_cflags
+else
+      cflags += machine_args
+      cflags += ['-DALLOW_INTERNAL_API']
+endif
+
+# END
drivers/net/ntnic/nthw/nthw_register.h new file +19 -0
new file mode 100644
index 0000000000..5cdbd9fc5d
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef NTHW_REGISTER_H_
+#define NTHW_REGISTER_H_
+
+#include <unistd.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <inttypes.h>
+
+#include "fpga_model.h"
+
+#include "nthw_fpga_modules_defs.h"
+#include "nthw_fpga_parameters_defs.h"
+#include "nthw_fpga_registers_defs.h"
+
+#endif /* NTHW_REGISTER_H_ */
drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_024_0000.c new file +4190 -0

2,846 lines not on this page · raw message

drivers/net/ntnic/nthw/supported/nthw_fpga_instances.h new file +14 -0
new file mode 100644
index 0000000000..1d707d6925

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/supported/nthw_fpga_modules_defs.h new file +166 -0

166 lines not on this page · raw message

drivers/net/ntnic/nthw/supported/nthw_fpga_parameters_defs.h new file +209 -0

209 lines not on this page · raw message

drivers/net/ntnic/nthw/supported/nthw_fpga_registers_defs.h new file +7277 -0

7,277 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#12 lore raw

PATCH v2 2/8 net/ntnic: adds core registers and fpga functionality

From: Christian Koue Muf <[email protected]>

Includes functionality to reset, initialize, program, and collect stats for the NTNIC FPGA.

---
v2:
* Fixed WARNING:TYPO_SPELLING
* Fix compilation for Fedora38

---
 drivers/net/ntnic/include/nthw_bus.h          |   10 +
 drivers/net/ntnic/meson.build                 |   32 +
 .../net/ntnic/nthw/core/nthw_clock_profiles.c |    9 +
 .../net/ntnic/nthw/core/nthw_clock_profiles.h |   39 +
 drivers/net/ntnic/nthw/core/nthw_core.h       |   31 +
 drivers/net/ntnic/nthw/core/nthw_fpga.c       |  914 +++++++++
 drivers/net/ntnic/nthw/core/nthw_fpga.h       |   47 +
 .../net/ntnic/nthw/core/nthw_fpga_nt200a0x.c  |   46 +
 .../net/ntnic/nthw/core/nthw_fpga_nt200a0x.h  |   14 +
 drivers/net/ntnic/nthw/core/nthw_fpga_rst.c   |   10 +
 drivers/net/ntnic/nthw/core/nthw_fpga_rst.h   |   17 +
 .../net/ntnic/nthw/core/nthw_fpga_rst9563.c   |  241 +++
 .../ntnic/nthw/core/nthw_fpga_rst_nt200a0x.c  |  674 +++++++
 .../ntnic/nthw/core/nthw_fpga_rst_nt200a0x.h  |   89 +
 drivers/net/ntnic/nthw/core/nthw_gpio_phy.c   |  271 +++
 drivers/net/ntnic/nthw/core/nthw_gpio_phy.h   |   57 +
 drivers/net/ntnic/nthw/core/nthw_hif.c        |  342 ++++
 drivers/net/ntnic/nthw/core/nthw_hif.h        |  156 ++
 drivers/net/ntnic/nthw/core/nthw_iic.c        |  570 ++++++
 drivers/net/ntnic/nthw/core/nthw_iic.h        |  101 +
 drivers/net/ntnic/nthw/core/nthw_mac_pcs.c    | 1034 ++++++++++
 drivers/net/ntnic/nthw/core/nthw_mac_pcs.h    |  261 +++
 .../net/ntnic/nthw/core/nthw_mac_pcs_xxv.c    | 1631 ++++++++++++++++
 .../net/ntnic/nthw/core/nthw_mac_pcs_xxv.h    |  291 +++
 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.c  |  121 ++
 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.h  |   51 +
 drivers/net/ntnic/nthw/core/nthw_pci_ta.c     |   99 +
 drivers/net/ntnic/nthw/core/nthw_pci_ta.h     |   40 +
 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.c  |  127 ++
 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.h  |   55 +
 drivers/net/ntnic/nthw/core/nthw_pcie3.c      |  274 +++
 drivers/net/ntnic/nthw/core/nthw_pcie3.h      |  100 +
 drivers/net/ntnic/nthw/core/nthw_sdc.c        |  177 ++
 drivers/net/ntnic/nthw/core/nthw_sdc.h        |   43 +
 drivers/net/ntnic/nthw/core/nthw_si5340.c     |  206 ++
 drivers/net/ntnic/nthw/core/nthw_si5340.h     |   34 +
 drivers/net/ntnic/nthw/core/nthw_spi_v3.c     |  380 ++++
 drivers/net/ntnic/nthw/core/nthw_spi_v3.h     |  106 ++
 drivers/net/ntnic/nthw/core/nthw_spim.c       |  117 ++
 drivers/net/ntnic/nthw/core/nthw_spim.h       |   52 +
 drivers/net/ntnic/nthw/core/nthw_spis.c       |  147 ++
 drivers/net/ntnic/nthw/core/nthw_spis.h       |   63 +
 drivers/net/ntnic/nthw/core/nthw_tsm.c        |  179 ++
 drivers/net/ntnic/nthw/core/nthw_tsm.h        |   53 +
 drivers/net/ntnic/nthw/nthw_dbs.c             | 1301 +++++++++++++
 drivers/net/ntnic/nthw/nthw_dbs.h             |  313 +++
 drivers/net/ntnic/nthw/nthw_drv.h             |   82 +
 drivers/net/ntnic/nthw/nthw_epp.c             |  335 ++++
 drivers/net/ntnic/nthw/nthw_epp.h             |   99 +
 drivers/net/ntnic/nthw/nthw_fpga_model.c      | 1677 +++++++++++++++++
 drivers/net/ntnic/nthw/nthw_fpga_model.h      |  308 +++
 drivers/net/ntnic/nthw/nthw_helper.h          |   21 +
 drivers/net/ntnic/nthw/nthw_platform.c        |   35 +
 drivers/net/ntnic/nthw/nthw_platform_drv.h    |   42 +
 drivers/net/ntnic/nthw/nthw_profile.h         |   15 +
 drivers/net/ntnic/nthw/nthw_rac.c             |  976 ++++++++++
 drivers/net/ntnic/nthw/nthw_rac.h             |  161 ++
 drivers/net/ntnic/nthw/nthw_register.h        |    2 +
 drivers/net/ntnic/nthw/nthw_stat.c            |  266 +++
 drivers/net/ntnic/nthw/nthw_stat.h            |   72 +
 drivers/net/ntnic/ntlog/include/ntlog.h       |  162 ++
 drivers/net/ntnic/ntlog/ntlog.c               |  114 ++
 drivers/net/ntnic/ntutil/include/nt_util.h    |   71 +
 drivers/net/ntnic/ntutil/nt_util.c            |   77 +
 64 files changed, 15440 insertions(+)
 create mode 100644 drivers/net/ntnic/include/nthw_bus.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_clock_profiles.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_clock_profiles.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_core.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst9563.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gpio_phy.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gpio_phy.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_hif.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_hif.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_iic.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_iic.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_ta.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_ta.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pcie3.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pcie3.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_sdc.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_sdc.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_si5340.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_si5340.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spi_v3.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spi_v3.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spim.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spim.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spis.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spis.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_tsm.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_tsm.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_dbs.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_dbs.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_drv.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_epp.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_epp.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_fpga_model.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_fpga_model.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_helper.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_platform.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_platform_drv.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_profile.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_rac.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_rac.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_stat.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_stat.h
 create mode 100644 drivers/net/ntnic/ntlog/include/ntlog.h
 create mode 100644 drivers/net/ntnic/ntlog/ntlog.c
 create mode 100644 drivers/net/ntnic/ntutil/include/nt_util.h
 create mode 100644 drivers/net/ntnic/ntutil/nt_util.c
drivers/net/ntnic/include/nthw_bus.h new file +10 -0
new file mode 100644
index 0000000000..975cc95e78
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_BUS_H__
+#define __NTHW_BUS_H__
+
+typedef uint8_t rab_bus_id_t;
+
+#endif /* __NTHW_BUS_H__ */
drivers/net/ntnic/meson.build +32 -0
index 99569c2843..65064f44ab 100644
@@ -10,13 +10,45 @@ cflags += [
 includes = [
     include_directories('.'),
     include_directories('include'),
+    include_directories('ntlog/include'),
+    include_directories('ntutil/include'),
     include_directories('nthw'),
+    include_directories('nthw/core'),
     include_directories('nthw/supported'),
 ]
 
 # all sources
 sources = files(
+    'nthw/core/nthw_clock_profiles.c',
+    'nthw/core/nthw_fpga.c',
+    'nthw/core/nthw_fpga_nt200a0x.c',
+    'nthw/core/nthw_fpga_rst.c',
+    'nthw/core/nthw_fpga_rst9563.c',
+    'nthw/core/nthw_fpga_rst_nt200a0x.c',
+    'nthw/core/nthw_gpio_phy.c',
+    'nthw/core/nthw_hif.c',
+    'nthw/core/nthw_iic.c',
+    'nthw/core/nthw_mac_pcs.c',
+    'nthw/core/nthw_mac_pcs_xxv.c',
+    'nthw/core/nthw_pci_rd_tg.c',
+    'nthw/core/nthw_pci_ta.c',
+    'nthw/core/nthw_pci_wr_tg.c',
+    'nthw/core/nthw_pcie3.c',
+    'nthw/core/nthw_sdc.c',
+    'nthw/core/nthw_si5340.c',
+    'nthw/core/nthw_spi_v3.c',
+    'nthw/core/nthw_spim.c',
+    'nthw/core/nthw_spis.c',
+    'nthw/core/nthw_tsm.c',
+    'nthw/nthw_fpga_model.c',
+    'nthw/nthw_dbs.c',
+    'nthw/nthw_epp.c',
+    'nthw/nthw_platform.c',
+    'nthw/nthw_rac.c',
+    'nthw/nthw_stat.c',
     'nthw/supported/nthw_fpga_9563_055_024_0000.c',
+    'ntlog/ntlog.c',
+    'ntutil/nt_util.c',
 )
 
 if is_variable('default_cflags')
drivers/net/ntnic/nthw/core/nthw_clock_profiles.c new file +9 -0
new file mode 100644
index 0000000000..efdcc222a8
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#include "nthw_clock_profiles.h"
+
+/* Clock profile for NT200A02 2x40G, 2x100G */
+const int n_data_si5340_nt200a02_u23_v5;
+const clk_profile_data_fmt2_t *p_data_si5340_nt200a02_u23_v5;
drivers/net/ntnic/nthw/core/nthw_clock_profiles.h new file +39 -0
new file mode 100644
index 0000000000..4252f69e92
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_CLOCK_PROFILES_H__
+#define __NTHW_CLOCK_PROFILES_H__
+
+#include <stdint.h>
+
+#include "nthw_helper.h"
+
+#define clk_profile_size_error_msg "size test failed"
+
+typedef struct {
+	unsigned char reg_addr;
+	unsigned char reg_val;
+	unsigned char reg_mask;
+} clk_profile_data_fmt0_t;
+
+typedef struct {
+	uint16_t reg_addr;
+	uint8_t reg_val;
+} clk_profile_data_fmt1_t;
+
+typedef struct {
+	unsigned int reg_addr;
+	unsigned char reg_val;
+} clk_profile_data_fmt2_t;
+
+typedef enum {
+	CLK_PROFILE_DATA_FMT_0,
+	CLK_PROFILE_DATA_FMT_1,
+	CLK_PROFILE_DATA_FMT_2
+} clk_profile_data_fmt_t;
+
+extern const int n_data_si5340_nt200a02_u23_v5;
+extern const  clk_profile_data_fmt2_t *p_data_si5340_nt200a02_u23_v5;
+
+#endif /* __NTHW_CLOCK_PROFILES_H__ */
drivers/net/ntnic/nthw/core/nthw_core.h new file +31 -0
new file mode 100644
index 0000000000..798a95d5cf
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_CORE_H__
+#define __NTHW_CORE_H__
+
+#include "nthw_helper.h"
+
+#include "nthw_platform_drv.h"
+#include "nthw_fpga_model.h"
+#include "nthw_hif.h"
+#include "nthw_pcie3.h"
+#include "nthw_pci_rd_tg.h"
+#include "nthw_pci_wr_tg.h"
+#include "nthw_pci_ta.h"
+#include "nthw_iic.h"
+
+#include "nthw_gpio_phy.h"
+#include "nthw_mac_pcs.h"
+#include "nthw_mac_pcs_xxv.h"
+#include "nthw_sdc.h"
+
+#include "nthw_spim.h"
+#include "nthw_spis.h"
+
+#include "nthw_tsm.h"
+
+#include "nthw_si5340.h"
+
+#endif /* __NTHW_CORE_H__ */
drivers/net/ntnic/nthw/core/nthw_fpga.c new file +914 -0

914 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga.h new file +47 -0

47 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.c new file +46 -0

46 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.h new file +14 -0
new file mode 100644
index 0000000000..ff324bee39
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_FPGA_NT200A0X_H__
+#define __NTHW_FPGA_NT200A0X_H__
+
+int nthw_fpga_nt200a0x_init(struct fpga_info_s *p_fpga_info);
+
+/* NT200A02: 9563 */
+int nthw_fpga_rst9563_init(struct fpga_info_s *p_fpga_info,
+			  struct nthw_fpga_rst_nt200a0x *const p);
+
+#endif /* __NTHW_FPGA_NT200A0X_H__ */
drivers/net/ntnic/nthw/core/nthw_fpga_rst.c new file +10 -0
new file mode 100644
index 0000000000..66c148bab2
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#include "ntlog.h"
+
+#include "nthw_fpga.h"
+#include "nthw_fpga_nt200a0x.h"
+
+#include "nthw_fpga_rst.h"
drivers/net/ntnic/nthw/core/nthw_fpga_rst.h new file +17 -0
new file mode 100644
index 0000000000..2099c4b677
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_FPGA_RST_H__
+#define __NTHW_FPGA_RST_H__
+
+#include "nthw_drv.h"
+
+#include "nthw_fpga_model.h"
+
+#include "nthw_rac.h"
+#include "nthw_iic.h"
+
+#include "nthw_fpga_rst_nt200a0x.h"
+
+#endif /* __NTHW_FPGA_RST_H__ */
drivers/net/ntnic/nthw/core/nthw_fpga_rst9563.c new file +241 -0

241 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.c new file +674 -0

674 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.h new file +89 -0

89 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_gpio_phy.c new file +271 -0

271 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_gpio_phy.h new file +57 -0

57 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_hif.c new file +342 -0

342 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_hif.h new file +156 -0

144 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_iic.c new file +570 -0

570 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_iic.h new file +101 -0

101 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs.c new file +1034 -0

1,034 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs.h new file +261 -0

261 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.c new file +1631 -0

1,631 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.h new file +291 -0

291 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.c new file +121 -0

121 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.h new file +51 -0

51 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_ta.c new file +99 -0

99 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_ta.h new file +40 -0
new file mode 100644
index 0000000000..7968cad9fa

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.c new file +127 -0

127 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.h new file +55 -0

55 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pcie3.c new file +274 -0

274 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pcie3.h new file +100 -0

100 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_sdc.c new file +177 -0

177 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_sdc.h new file +43 -0

43 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_si5340.c new file +206 -0

206 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_si5340.h new file +34 -0
new file mode 100644
index 0000000000..f588b5b825

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_spi_v3.c new file +380 -0

380 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spi_v3.h new file +106 -0

106 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spim.c new file +117 -0

117 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spim.h new file +52 -0

52 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spis.c new file +147 -0

147 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spis.h new file +63 -0

63 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_tsm.c new file +179 -0

179 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_tsm.h new file +53 -0

53 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_dbs.c new file +1301 -0

1,301 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_dbs.h new file +313 -0

313 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_drv.h new file +82 -0

82 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_epp.c new file +335 -0

335 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_epp.h new file +99 -0

99 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_fpga_model.c new file +1677 -0

1,677 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_fpga_model.h new file +308 -0

308 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_helper.h new file +21 -0
new file mode 100644
index 0000000000..22f6a0d471

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_platform.c new file +35 -0
new file mode 100644
index 0000000000..203947e03a

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_platform_drv.h new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_profile.h new file +15 -0
new file mode 100644
index 0000000000..2fcb7b4adf

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_rac.c new file +976 -0

976 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_rac.h new file +161 -0

161 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_register.h +2 -0
index 5cdbd9fc5d..4fe3496b9f 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_stat.c new file +266 -0

266 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_stat.h new file +72 -0

72 lines not on this page · raw message

drivers/net/ntnic/ntlog/include/ntlog.h new file +162 -0

162 lines not on this page · raw message

drivers/net/ntnic/ntlog/ntlog.c new file +114 -0

114 lines not on this page · raw message

drivers/net/ntnic/ntutil/include/nt_util.h new file +71 -0

71 lines not on this page · raw message

drivers/net/ntnic/ntutil/nt_util.c new file +77 -0

77 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#13 lore raw

PATCH v2 3/8 net/ntnic: adds NT200A02 adapter support

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The PMD is designed to support multiple different adapters, and this commit adds support for NT200A02 2x100G. Sensor and NIM code is included.

---
v2:
* Fixed WARNING:TYPO_SPELLING

---
 .../net/ntnic/adapter/common_adapter_defs.h   |   14 +
 drivers/net/ntnic/adapter/nt4ga_adapter.c     |  477 ++++
 drivers/net/ntnic/adapter/nt4ga_adapter.h     |  108 +
 drivers/net/ntnic/adapter/nt4ga_filter.h      |   15 +
 drivers/net/ntnic/adapter/nt4ga_link.c        |  178 ++
 drivers/net/ntnic/adapter/nt4ga_link.h        |  179 ++
 drivers/net/ntnic/adapter/nt4ga_link_100g.c   |  825 +++++++
 drivers/net/ntnic/adapter/nt4ga_link_100g.h   |   12 +
 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.c   |  598 +++++
 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.h   |   41 +
 drivers/net/ntnic/adapter/nt4ga_stat.c        |  705 ++++++
 drivers/net/ntnic/adapter/nt4ga_stat.h        |  202 ++
 drivers/net/ntnic/meson.build                 |   24 +
 drivers/net/ntnic/nim/i2c_nim.c               | 1974 +++++++++++++++++
 drivers/net/ntnic/nim/i2c_nim.h               |  122 +
 drivers/net/ntnic/nim/nim_defines.h           |  146 ++
 drivers/net/ntnic/nim/nt_link_speed.c         |  105 +
 drivers/net/ntnic/nim/nt_link_speed.h         |   34 +
 drivers/net/ntnic/nim/qsfp_registers.h        |   57 +
 drivers/net/ntnic/nim/qsfp_sensors.c          |  174 ++
 drivers/net/ntnic/nim/qsfp_sensors.h          |   18 +
 drivers/net/ntnic/nim/sfp_p_registers.h       |  100 +
 drivers/net/ntnic/nim/sfp_sensors.c           |  288 +++
 drivers/net/ntnic/nim/sfp_sensors.h           |   18 +
 .../net/ntnic/nthw/core/nthw_clock_profiles.c |   11 +-
 drivers/net/ntnic/nthw/core/nthw_core.h       |    2 +
 drivers/net/ntnic/nthw/core/nthw_gmf.c        |  290 +++
 drivers/net/ntnic/nthw/core/nthw_gmf.h        |   93 +
 .../nthw/core/nthw_nt200a02_u23_si5340_v5.h   |  344 +++
 drivers/net/ntnic/nthw/core/nthw_rmc.c        |  156 ++
 drivers/net/ntnic/nthw/core/nthw_rmc.h        |   57 +
 .../ntnic/sensors/avr_sensors/avr_sensors.c   |  104 +
 .../ntnic/sensors/avr_sensors/avr_sensors.h   |   22 +
 .../sensors/board_sensors/board_sensors.c     |   48 +
 .../sensors/board_sensors/board_sensors.h     |   18 +
 .../net/ntnic/sensors/board_sensors/tempmon.c |   42 +
 .../net/ntnic/sensors/board_sensors/tempmon.h |   16 +
 .../ntnic/sensors/nim_sensors/nim_sensors.c   |   54 +
 .../ntnic/sensors/nim_sensors/nim_sensors.h   |   19 +
 drivers/net/ntnic/sensors/ntavr/avr_intf.h    |   89 +
 drivers/net/ntnic/sensors/ntavr/ntavr.c       |   78 +
 drivers/net/ntnic/sensors/ntavr/ntavr.h       |   32 +
 drivers/net/ntnic/sensors/sensor_types.h      |  259 +++
 drivers/net/ntnic/sensors/sensors.c           |  273 +++
 drivers/net/ntnic/sensors/sensors.h           |  127 ++
 drivers/net/ntnic/sensors/stream_info.h       |   86 +
 46 files changed, 8632 insertions(+), 2 deletions(-)
 create mode 100644 drivers/net/ntnic/adapter/common_adapter_defs.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_adapter.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_adapter.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_filter.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link_100g.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link_100g.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_stat.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_stat.h
 create mode 100644 drivers/net/ntnic/nim/i2c_nim.c
 create mode 100644 drivers/net/ntnic/nim/i2c_nim.h
 create mode 100644 drivers/net/ntnic/nim/nim_defines.h
 create mode 100644 drivers/net/ntnic/nim/nt_link_speed.c
 create mode 100644 drivers/net/ntnic/nim/nt_link_speed.h
 create mode 100644 drivers/net/ntnic/nim/qsfp_registers.h
 create mode 100644 drivers/net/ntnic/nim/qsfp_sensors.c
 create mode 100644 drivers/net/ntnic/nim/qsfp_sensors.h
 create mode 100644 drivers/net/ntnic/nim/sfp_p_registers.h
 create mode 100644 drivers/net/ntnic/nim/sfp_sensors.c
 create mode 100644 drivers/net/ntnic/nim/sfp_sensors.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gmf.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gmf.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_nt200a02_u23_si5340_v5.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_rmc.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_rmc.h
 create mode 100644 drivers/net/ntnic/sensors/avr_sensors/avr_sensors.c
 create mode 100644 drivers/net/ntnic/sensors/avr_sensors/avr_sensors.h
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/board_sensors.c
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/board_sensors.h
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/tempmon.c
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/tempmon.h
 create mode 100644 drivers/net/ntnic/sensors/nim_sensors/nim_sensors.c
 create mode 100644 drivers/net/ntnic/sensors/nim_sensors/nim_sensors.h
 create mode 100644 drivers/net/ntnic/sensors/ntavr/avr_intf.h
 create mode 100644 drivers/net/ntnic/sensors/ntavr/ntavr.c
 create mode 100644 drivers/net/ntnic/sensors/ntavr/ntavr.h
 create mode 100644 drivers/net/ntnic/sensors/sensor_types.h
 create mode 100644 drivers/net/ntnic/sensors/sensors.c
 create mode 100644 drivers/net/ntnic/sensors/sensors.h
 create mode 100644 drivers/net/ntnic/sensors/stream_info.h
drivers/net/ntnic/adapter/common_adapter_defs.h new file +14 -0
new file mode 100644
index 0000000000..79167806f1
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef _COMMON_ADAPTER_DEFS_H_
+#define _COMMON_ADAPTER_DEFS_H_
+
+/*
+ * Declarations shared by NT adapter types.
+ */
+#define NUM_ADAPTER_MAX (8)
+#define NUM_ADAPTER_PORTS_MAX (128)
+
+#endif /* _COMMON_ADAPTER_DEFS_H_ */
drivers/net/ntnic/adapter/nt4ga_adapter.c new file +477 -0

477 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_adapter.h new file +108 -0

108 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_filter.h new file +15 -0
new file mode 100644
index 0000000000..ad7e7d8c71
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef NT4GA_FILTER_H_
+#define NT4GA_FILTER_H_
+
+typedef struct nt4ga_filter_s {
+	int n_intf_cnt;
+	int n_queues_per_intf_cnt;
+
+	struct flow_nic_dev *mp_flow_device;
+} nt4ga_filter_t;
+
+#endif /* NT4GA_FILTER_H_ */
drivers/net/ntnic/adapter/nt4ga_link.c new file +178 -0

178 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_link.h new file +179 -0

179 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_link_100g.c new file +825 -0

825 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_link_100g.h new file +12 -0
new file mode 100644
index 0000000000..803b3454b7
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef NT4GA_LINK_100G_H_
+#define NT4GA_LINK_100G_H_
+
+#include "nthw_drv.h"
+
+int nt4ga_link_100g_ports_init(adapter_info_t *p_adapter_info, nt_fpga_t *p_fpga);
+
+#endif /* NT4GA_LINK_100G_H_ */
drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.c new file +598 -0

598 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.h new file +41 -0

41 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_stat.c new file +705 -0

553 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_stat.h new file +202 -0

202 lines not on this page · raw message

drivers/net/ntnic/meson.build +24 -0
index 65064f44ab..383ff15390 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nim/i2c_nim.c new file +1974 -0

1,974 lines not on this page · raw message

drivers/net/ntnic/nim/i2c_nim.h new file +122 -0

122 lines not on this page · raw message

drivers/net/ntnic/nim/nim_defines.h new file +146 -0

146 lines not on this page · raw message

drivers/net/ntnic/nim/nt_link_speed.c new file +105 -0

105 lines not on this page · raw message

drivers/net/ntnic/nim/nt_link_speed.h new file +34 -0
new file mode 100644
index 0000000000..969e3fb867

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nim/qsfp_registers.h new file +57 -0

57 lines not on this page · raw message

drivers/net/ntnic/nim/qsfp_sensors.c new file +174 -0

174 lines not on this page · raw message

drivers/net/ntnic/nim/qsfp_sensors.h new file +18 -0
new file mode 100644
index 0000000000..de64b978cb

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nim/sfp_p_registers.h new file +100 -0

100 lines not on this page · raw message

drivers/net/ntnic/nim/sfp_sensors.c new file +288 -0

288 lines not on this page · raw message

drivers/net/ntnic/nim/sfp_sensors.h new file +18 -0
new file mode 100644
index 0000000000..ab56027dc8

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_clock_profiles.c +9 -2
index efdcc222a8..bd7cd2a27c 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_core.h +2 -0
index 798a95d5cf..025b6b61cc 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_gmf.c new file +290 -0

290 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_gmf.h new file +93 -0

93 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_nt200a02_u23_si5340_v5.h new file +344 -0

344 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_rmc.c new file +156 -0

156 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_rmc.h new file +57 -0

57 lines not on this page · raw message

drivers/net/ntnic/sensors/avr_sensors/avr_sensors.c new file +104 -0

104 lines not on this page · raw message

drivers/net/ntnic/sensors/avr_sensors/avr_sensors.h new file +22 -0
new file mode 100644
index 0000000000..b8c37a12cb

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/board_sensors/board_sensors.c new file +48 -0

48 lines not on this page · raw message

drivers/net/ntnic/sensors/board_sensors/board_sensors.h new file +18 -0
new file mode 100644
index 0000000000..a7f75b7ae4

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/board_sensors/tempmon.c new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/sensors/board_sensors/tempmon.h new file +16 -0
new file mode 100644
index 0000000000..6f2017b714

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/nim_sensors/nim_sensors.c new file +54 -0

54 lines not on this page · raw message

drivers/net/ntnic/sensors/nim_sensors/nim_sensors.h new file +19 -0
new file mode 100644
index 0000000000..c68c9aa924

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/ntavr/avr_intf.h new file +89 -0

89 lines not on this page · raw message

drivers/net/ntnic/sensors/ntavr/ntavr.c new file +78 -0

78 lines not on this page · raw message

drivers/net/ntnic/sensors/ntavr/ntavr.h new file +32 -0
new file mode 100644
index 0000000000..b7a7aeb908

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/sensor_types.h new file +259 -0

259 lines not on this page · raw message

drivers/net/ntnic/sensors/sensors.c new file +273 -0

273 lines not on this page · raw message

drivers/net/ntnic/sensors/sensors.h new file +127 -0

127 lines not on this page · raw message

drivers/net/ntnic/sensors/stream_info.h new file +86 -0

86 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#14 lore raw

PATCH v2 4/8 net/ntnic: adds flow related FPGA functionality

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The PMD will control the registers used for flow programming, and this commit adds support for this.

---
v2:
* Fixed compilation with Fedora 38

---
 drivers/net/ntnic/meson.build                 |   21 +
 .../ntnic/nthw/flow_filter/flow_nthw_cat.c    | 1107 ++++++++++++++++
 .../ntnic/nthw/flow_filter/flow_nthw_cat.h    |  372 ++++++
 .../ntnic/nthw/flow_filter/flow_nthw_csu.c    |  146 +++
 .../ntnic/nthw/flow_filter/flow_nthw_csu.h    |   42 +
 .../ntnic/nthw/flow_filter/flow_nthw_flm.c    | 1140 +++++++++++++++++
 .../ntnic/nthw/flow_filter/flow_nthw_flm.h    |  422 ++++++
 .../ntnic/nthw/flow_filter/flow_nthw_hfu.c    |  293 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_hfu.h    |  100 ++
 .../ntnic/nthw/flow_filter/flow_nthw_hsh.c    |  254 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_hsh.h    |   81 ++
 .../ntnic/nthw/flow_filter/flow_nthw_hst.c    |  202 +++
 .../ntnic/nthw/flow_filter/flow_nthw_hst.h    |   72 ++
 .../ntnic/nthw/flow_filter/flow_nthw_ifr.c    |   93 ++
 .../ntnic/nthw/flow_filter/flow_nthw_ifr.h    |   39 +
 .../ntnic/nthw/flow_filter/flow_nthw_info.c   |  341 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_info.h   |  104 ++
 .../ntnic/nthw/flow_filter/flow_nthw_ioa.c    |  234 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_ioa.h    |   80 ++
 .../net/ntnic/nthw/flow_filter/flow_nthw_km.c |  685 ++++++++++
 .../net/ntnic/nthw/flow_filter/flow_nthw_km.h |  224 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_pdb.c    |  230 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_pdb.h    |   84 ++
 .../ntnic/nthw/flow_filter/flow_nthw_qsl.c    |  355 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_qsl.h    |  121 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rmc.c    |  112 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rmc.h    |   40 +
 .../ntnic/nthw/flow_filter/flow_nthw_roa.c    |  294 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_roa.h    |  109 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c |  132 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h |   53 +
 .../ntnic/nthw/flow_filter/flow_nthw_slc.c    |  109 ++
 .../ntnic/nthw/flow_filter/flow_nthw_slc.h    |   46 +
 .../ntnic/nthw/flow_filter/flow_nthw_slc_lr.c |  109 ++
 .../ntnic/nthw/flow_filter/flow_nthw_slc_lr.h |   46 +
 .../ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c |  394 ++++++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h |   72 ++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_ins.c |   96 ++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_ins.h |   42 +
 .../ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c |  165 +++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h |   70 +
 41 files changed, 8731 insertions(+)
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h
drivers/net/ntnic/meson.build +21 -0
index 383ff15390..c184d5d4b5 100644
@@ -17,6 +17,7 @@ includes = [
     include_directories('nthw'),
     include_directories('nthw/core'),
     include_directories('nthw/supported'),
+    include_directories('nthw/flow_filter'),
     include_directories('sensors'),
     include_directories('sensors/avr_sensors'),
     include_directories('sensors/board_sensors'),
@@ -58,6 +59,26 @@ sources = files(
     'nthw/core/nthw_spim.c',
     'nthw/core/nthw_spis.c',
     'nthw/core/nthw_tsm.c',
+    'nthw/flow_filter/flow_nthw_cat.c',
+    'nthw/flow_filter/flow_nthw_csu.c',
+    'nthw/flow_filter/flow_nthw_flm.c',
+    'nthw/flow_filter/flow_nthw_hfu.c',
+    'nthw/flow_filter/flow_nthw_hsh.c',
+    'nthw/flow_filter/flow_nthw_hst.c',
+    'nthw/flow_filter/flow_nthw_ifr.c',
+    'nthw/flow_filter/flow_nthw_info.c',
+    'nthw/flow_filter/flow_nthw_ioa.c',
+    'nthw/flow_filter/flow_nthw_km.c',
+    'nthw/flow_filter/flow_nthw_pdb.c',
+    'nthw/flow_filter/flow_nthw_qsl.c',
+    'nthw/flow_filter/flow_nthw_rmc.c',
+    'nthw/flow_filter/flow_nthw_roa.c',
+    'nthw/flow_filter/flow_nthw_rpp_lr.c',
+    'nthw/flow_filter/flow_nthw_slc.c',
+    'nthw/flow_filter/flow_nthw_slc_lr.c',
+    'nthw/flow_filter/flow_nthw_tx_cpy.c',
+    'nthw/flow_filter/flow_nthw_tx_ins.c',
+    'nthw/flow_filter/flow_nthw_tx_rpl.c',
     'nthw/nthw_fpga_model.c',
     'nthw/nthw_dbs.c',
     'nthw/nthw_epp.c',
drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c new file +1107 -0

1,107 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.h new file +372 -0

372 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c new file +146 -0

146 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.h new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.c new file +1140 -0

1,140 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.h new file +422 -0

160 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.c new file +293 -0

293 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.h new file +100 -0

100 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c new file +254 -0

254 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h new file +81 -0

81 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.c new file +202 -0

202 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.h new file +72 -0

72 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c new file +93 -0

93 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h new file +39 -0
new file mode 100644
index 0000000000..626ca3d193

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.c new file +341 -0

341 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.h new file +104 -0

104 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.c new file +234 -0

234 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.h new file +80 -0

80 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.c new file +685 -0

685 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.h new file +224 -0

224 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.c new file +230 -0

230 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.h new file +84 -0

84 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.c new file +355 -0

355 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.h new file +121 -0

121 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.c new file +112 -0

112 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.h new file +40 -0
new file mode 100644
index 0000000000..57d5776002

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.c new file +294 -0

294 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.h new file +109 -0

109 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c new file +132 -0

132 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h new file +53 -0

53 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.c new file +109 -0

109 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.h new file +46 -0

46 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.c new file +109 -0

109 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.h new file +46 -0

46 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c new file +394 -0

394 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h new file +72 -0

72 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.c new file +96 -0

96 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.h new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c new file +165 -0

165 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h new file +70 -0

70 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#15 lore raw

PATCH v2 5/8 net/ntnic: adds FPGA abstraction layer

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The FPGA abstraction layer limits the need to rewrite flow logic when new FPGA modules are created.

---
v2:
* Fixed compilation with Fedora 38
* Fixed WARNING:TYPO_SPELLING

---
 drivers/net/ntnic/meson.build                 |   21 +
 .../ntnic/nthw/flow_api/flow_api_actions.c    |  205 ++
 .../ntnic/nthw/flow_api/flow_api_actions.h    |  284 +++
 .../ntnic/nthw/flow_api/flow_api_backend.c    |  182 ++
 .../ntnic/nthw/flow_api/flow_api_backend.h    | 1818 +++++++++++++++++
 .../net/ntnic/nthw/flow_api/flow_api_engine.h |  475 +++++
 .../ntnic/nthw/flow_api/flow_api_nic_setup.h  |   32 +
 .../nthw/flow_api/flow_engine/flow_group.c    |  125 ++
 .../nthw/flow_api/flow_engine/flow_hasher.c   |  213 ++
 .../nthw/flow_api/flow_engine/flow_hasher.h   |   20 +
 .../nthw/flow_api/flow_engine/flow_kcc.c      |  434 ++++
 .../ntnic/nthw/flow_api/flow_engine/flow_km.c | 1434 +++++++++++++
 .../nthw/flow_api/flow_engine/flow_tunnel.c   |  787 +++++++
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c   | 1789 ++++++++++++++++
 .../nthw/flow_api/hw_mod/hw_mod_cat_v18.h     |  138 ++
 .../nthw/flow_api/hw_mod/hw_mod_cat_v21.h     |   88 +
 .../nthw/flow_api/hw_mod/hw_mod_cat_v22.h     |   83 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c   | 1099 ++++++++++
 .../nthw/flow_api/hw_mod/hw_mod_flm_v17.h     |  274 +++
 .../nthw/flow_api/hw_mod/hw_mod_flm_v20.h     |  102 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c   |  195 ++
 .../nthw/flow_api/hw_mod/hw_mod_hsh_v5.h      |   36 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c   |  178 ++
 .../nthw/flow_api/hw_mod/hw_mod_hst_v2.h      |   32 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c   |  271 +++
 .../nthw/flow_api/hw_mod/hw_mod_ioa_v4.h      |   36 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_km.c    |  629 ++++++
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h |   93 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c   |  219 ++
 .../nthw/flow_api/hw_mod/hw_mod_pdb_v9.h      |   39 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c   |  348 ++++
 .../nthw/flow_api/hw_mod/hw_mod_qsl_v7.h      |   45 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c   |  112 +
 .../nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h    |   20 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c   |  358 ++++
 .../nthw/flow_api/hw_mod/hw_mod_roa_v6.h      |   49 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c   |  132 ++
 .../nthw/flow_api/hw_mod/hw_mod_slc_lr.c      |  132 ++
 .../nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h   |   19 +
 .../nthw/flow_api/hw_mod/hw_mod_slc_v1.h      |   19 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c   |  983 +++++++++
 .../nthw/flow_api/hw_mod/hw_mod_tpe_v1.h      |  103 +
 .../nthw/flow_api/hw_mod/hw_mod_tpe_v2.h      |   37 +
 .../nthw/flow_api/stream_binary_flow_api.h    |  697 +++++++
 44 files changed, 14385 insertions(+)
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_actions.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_actions.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_backend.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_backend.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_engine.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_nic_setup.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_group.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_kcc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_km.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_tunnel.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v18.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v21.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v22.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v17.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v20.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh_v5.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst_v2.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa_v4.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb_v9.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl_v7.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa_v6.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_v1.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v1.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v2.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/stream_binary_flow_api.h
drivers/net/ntnic/meson.build +21 -0
index c184d5d4b5..387481bb4a 100644
@@ -17,6 +17,7 @@ includes = [
     include_directories('nthw'),
     include_directories('nthw/core'),
     include_directories('nthw/supported'),
+    include_directories('nthw/flow_api'),
     include_directories('nthw/flow_filter'),
     include_directories('sensors'),
     include_directories('sensors/avr_sensors'),
@@ -59,6 +60,26 @@ sources = files(
     'nthw/core/nthw_spim.c',
     'nthw/core/nthw_spis.c',
     'nthw/core/nthw_tsm.c',
+    'nthw/flow_api/flow_api_actions.c',
+    'nthw/flow_api/flow_api_backend.c',
+    'nthw/flow_api/flow_engine/flow_group.c',
+    'nthw/flow_api/flow_engine/flow_hasher.c',
+    'nthw/flow_api/flow_engine/flow_kcc.c',
+    'nthw/flow_api/flow_engine/flow_km.c',
+    'nthw/flow_api/flow_engine/flow_tunnel.c',
+    'nthw/flow_api/hw_mod/hw_mod_cat.c',
+    'nthw/flow_api/hw_mod/hw_mod_flm.c',
+    'nthw/flow_api/hw_mod/hw_mod_hsh.c',
+    'nthw/flow_api/hw_mod/hw_mod_hst.c',
+    'nthw/flow_api/hw_mod/hw_mod_ioa.c',
+    'nthw/flow_api/hw_mod/hw_mod_km.c',
+    'nthw/flow_api/hw_mod/hw_mod_pdb.c',
+    'nthw/flow_api/hw_mod/hw_mod_qsl.c',
+    'nthw/flow_api/hw_mod/hw_mod_rmc.c',
+    'nthw/flow_api/hw_mod/hw_mod_roa.c',
+    'nthw/flow_api/hw_mod/hw_mod_slc.c',
+    'nthw/flow_api/hw_mod/hw_mod_slc_lr.c',
+    'nthw/flow_api/hw_mod/hw_mod_tpe.c',
     'nthw/flow_filter/flow_nthw_cat.c',
     'nthw/flow_filter/flow_nthw_csu.c',
     'nthw/flow_filter/flow_nthw_flm.c',
drivers/net/ntnic/nthw/flow_api/flow_api_actions.c new file +205 -0

205 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_actions.h new file +284 -0

284 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_backend.c new file +182 -0

182 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_backend.h new file +1818 -0

1,818 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_engine.h new file +475 -0

475 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_nic_setup.h new file +32 -0
new file mode 100644
index 0000000000..c4db0f4c5c
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_group.c new file +125 -0

125 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.c new file +213 -0

213 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.h new file +20 -0
new file mode 100644
index 0000000000..6365a396d2

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_kcc.c new file +434 -0

434 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_km.c new file +1434 -0

1,434 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_tunnel.c new file +787 -0

787 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c new file +1789 -0

1,789 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v18.h new file +138 -0

138 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v21.h new file +88 -0

88 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v22.h new file +83 -0

83 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c new file +1099 -0

1,099 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v17.h new file +274 -0

274 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v20.h new file +102 -0

102 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c new file +195 -0

195 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh_v5.h new file +36 -0
new file mode 100644
index 0000000000..8588750ff0

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c new file +178 -0

178 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst_v2.h new file +32 -0
new file mode 100644
index 0000000000..230c70b56d

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c new file +271 -0

271 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa_v4.h new file +36 -0
new file mode 100644
index 0000000000..309b53ff76

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c new file +629 -0

629 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h new file +93 -0

93 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c new file +219 -0

219 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb_v9.h new file +39 -0
new file mode 100644
index 0000000000..b14c10bc53

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c new file +348 -0

348 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl_v7.h new file +45 -0

45 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c new file +112 -0

112 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h new file +20 -0
new file mode 100644
index 0000000000..8f90695821

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c new file +358 -0

358 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa_v6.h new file +49 -0

49 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c new file +132 -0

132 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr.c new file +132 -0

132 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h new file +19 -0
new file mode 100644
index 0000000000..d03b206e6d

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_v1.h new file +19 -0
new file mode 100644
index 0000000000..01f60bfb18

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c new file +983 -0

983 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v1.h new file +103 -0

103 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v2.h new file +37 -0
new file mode 100644
index 0000000000..c56cad8d89

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/stream_binary_flow_api.h new file +697 -0

697 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#16 lore raw

PATCH v2 6/8 net/ntnic: adds flow logic

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

This logic layer takes rte_flow style patterns and actions as input, and programs the FPGA accordingly.

---
v2:
* Fixed WARNING:TYPO_SPELLING

---
 drivers/net/ntnic/adapter/nt4ga_adapter.c     |   13 +
 drivers/net/ntnic/adapter/nt4ga_stat.c        |   20 +-
 drivers/net/ntnic/meson.build                 |    4 +
 drivers/net/ntnic/nthw/flow_api/flow_api.c    | 1306 +++++
 drivers/net/ntnic/nthw/flow_api/flow_api.h    |  291 +
 .../nthw/flow_api/flow_api_profile_inline.c   | 5118 +++++++++++++++++
 .../nthw/flow_api/flow_api_profile_inline.h   |   56 +
 .../net/ntnic/nthw/flow_filter/flow_backend.c | 3205 +++++++++++
 .../net/ntnic/nthw/flow_filter/flow_backend.h |   15 +
 .../net/ntnic/nthw/flow_filter/flow_filter.c  |   39 +
 .../net/ntnic/nthw/flow_filter/flow_filter.h  |   16 +
 11 files changed, 10078 insertions(+), 5 deletions(-)
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_backend.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_backend.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_filter.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_filter.h
drivers/net/ntnic/adapter/nt4ga_adapter.c +13 -0
index 259aae2831..f9493202c3 100644
@@ -10,6 +10,8 @@
 #include "nt4ga_pci_ta_tg.h"
 #include "nt4ga_link_100g.h"
 
+#include "flow_filter.h"
+
 /* Sensors includes */
 #include "board_sensors.h"
 #include "avr_sensors.h"
@@ -306,6 +308,17 @@ int nt4ga_adapter_init(struct adapter_info_s *p_adapter_info)
 	n_nim_ports = fpga_info->n_nims;
 	assert(n_nim_ports >= 1);
 
+	/* Nt4ga Init Filter */
+	nt4ga_filter_t *p_filter = &p_adapter_info->nt4ga_filter;
+
+	res = flow_filter_init(p_fpga, &p_filter->mp_flow_device,
+			     p_adapter_info->adapter_no);
+	if (res != 0) {
+		NT_LOG(ERR, ETHDEV, "%s: Cannot initialize filter\n",
+		       p_adapter_id_str);
+		return res;
+	}
+
 	/*
 	 * HIF/PCI TA/TG
 	 */
drivers/net/ntnic/adapter/nt4ga_stat.c +15 -5
index b61c73ea12..2c822c6b97 100644
@@ -7,6 +7,7 @@
 #include "nthw_drv.h"
 #include "nthw_fpga.h"
 #include "nt4ga_adapter.h"
+#include "flow_filter.h"
 
 #define NO_FLAGS 0
 
@@ -16,12 +17,13 @@ static inline uint64_t timestamp2ns(uint64_t ts)
 	return ((ts >> 32) * 1000000000) + (ts & 0xffffffff);
 }
 
-static int nt4ga_stat_collect_cap_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
+static int nt4ga_stat_collect_cap_v1_stats(struct adapter_info_s *p_adapter_info,
+				   nt4ga_stat_t *p_nt4ga_stat,
 				   uint32_t *p_stat_dma_virtual);
 static int nt4ga_stat_collect_virt_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
 				    uint32_t *p_stat_dma_virtual);
 
-int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info _unused,
+int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info,
 		      nt4ga_stat_t *p_nt4ga_stat)
 {
 	nthw_stat_t *p_nthw_stat = p_nt4ga_stat->mp_nthw_stat;
@@ -39,7 +41,7 @@ int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info _unused,
 	} else {
 		p_nt4ga_stat->last_timestamp =
 			timestamp2ns(*p_nthw_stat->mp_timestamp);
-		nt4ga_stat_collect_cap_v1_stats(p_nt4ga_stat,
+		nt4ga_stat_collect_cap_v1_stats(p_adapter_info, p_nt4ga_stat,
 					       p_nt4ga_stat->p_stat_dma_virtual);
 	}
 	return 0;
@@ -198,7 +200,9 @@ int nt4ga_stat_setup(struct adapter_info_s *p_adapter_info)
 			return -1;
 		}
 
-		p_nt4ga_stat->flm_stat_ver = 0;
+		struct flow_nic_dev *ndev =
+				p_adapter_info->nt4ga_filter.mp_flow_device;
+		p_nt4ga_stat->flm_stat_ver = ndev->be.flm.ver;
 
 		p_nt4ga_stat->mp_stat_structs_flm =
 			calloc(1, sizeof(struct flm_counters_v1));
@@ -394,10 +398,12 @@ static int nt4ga_stat_collect_virt_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
 }
 
 /* Called with stat mutex locked */
-static int nt4ga_stat_collect_cap_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
+static int nt4ga_stat_collect_cap_v1_stats(struct adapter_info_s *p_adapter_info,
+					   nt4ga_stat_t *p_nt4ga_stat,
 					   uint32_t *p_stat_dma_virtual)
 {
 	nthw_stat_t *p_nthw_stat = p_nt4ga_stat->mp_nthw_stat;
+	struct flow_nic_dev *ndev = p_adapter_info->nt4ga_filter.mp_flow_device;
 
 	const int n_rx_ports = p_nt4ga_stat->mn_rx_ports;
 	const int n_tx_ports = p_nt4ga_stat->mn_tx_ports;
@@ -701,5 +707,9 @@ static int nt4ga_stat_collect_cap_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
 		p_nt4ga_stat->a_port_tx_drops_total[p] += new_drop_events_sum;
 	}
 
+	/* _update and get FLM stats */
+	flow_get_flm_stats(ndev, (uint64_t *)p_nt4ga_stat->mp_stat_structs_flm,
+			   sizeof(struct flm_counters_v1) / sizeof(uint64_t));
+
 	return 0;
 }
drivers/net/ntnic/meson.build +4 -0
index 387481bb4a..a9892615c9 100644
@@ -60,8 +60,10 @@ sources = files(
     'nthw/core/nthw_spim.c',
     'nthw/core/nthw_spis.c',
     'nthw/core/nthw_tsm.c',
+    'nthw/flow_api/flow_api.c',
     'nthw/flow_api/flow_api_actions.c',
     'nthw/flow_api/flow_api_backend.c',
+    'nthw/flow_api/flow_api_profile_inline.c',
     'nthw/flow_api/flow_engine/flow_group.c',
     'nthw/flow_api/flow_engine/flow_hasher.c',
     'nthw/flow_api/flow_engine/flow_kcc.c',
@@ -80,6 +82,8 @@ sources = files(
     'nthw/flow_api/hw_mod/hw_mod_slc.c',
     'nthw/flow_api/hw_mod/hw_mod_slc_lr.c',
     'nthw/flow_api/hw_mod/hw_mod_tpe.c',
+    'nthw/flow_filter/flow_backend.c',
+    'nthw/flow_filter/flow_filter.c',
     'nthw/flow_filter/flow_nthw_cat.c',
     'nthw/flow_filter/flow_nthw_csu.c',
     'nthw/flow_filter/flow_nthw_flm.c',
drivers/net/ntnic/nthw/flow_api/flow_api.c new file +1306 -0

1,306 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api.h new file +291 -0

291 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.c new file +5118 -0

1,298 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.h new file +56 -0

56 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_backend.c new file +3205 -0

3,205 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_backend.h new file +15 -0
new file mode 100644
index 0000000000..17fdcada3f

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_filter.c new file +39 -0
new file mode 100644
index 0000000000..90aeb71bd7

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_filter.h new file +16 -0
new file mode 100644
index 0000000000..8ea21a614a

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#17 lore raw

PATCH v2 7/8 net/ntnic: adds ethdev and makes PMD available

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

Hooks into the DPDK API, and make the PMD available to use. Also adds documentation as .rst and .ini files.

---
v2:
* Fixed WARNING:TYPO_SPELLING
* Fix supported platform list

---
 .mailmap                                      |    2 +
 MAINTAINERS                                   |    7 +
 doc/guides/nics/features/ntnic.ini            |   50 +
 doc/guides/nics/ntnic.rst                     |  235 +
 drivers/net/ntnic/include/ntdrv_4ga.h         |   23 +
 drivers/net/ntnic/include/ntos_system.h       |   23 +
 drivers/net/ntnic/meson.build                 |   13 +
 drivers/net/ntnic/ntnic_dbsconfig.c           | 1670 +++++++
 drivers/net/ntnic/ntnic_dbsconfig.h           |  251 +
 drivers/net/ntnic/ntnic_ethdev.c              | 4258 +++++++++++++++++
 drivers/net/ntnic/ntnic_ethdev.h              |  357 ++
 .../net/ntnic/ntnic_filter/create_elements.h  | 1194 +++++
 drivers/net/ntnic/ntnic_filter/ntnic_filter.c |  656 +++
 drivers/net/ntnic/ntnic_filter/ntnic_filter.h |   14 +
 drivers/net/ntnic/ntnic_hshconfig.c           |  102 +
 drivers/net/ntnic/ntnic_hshconfig.h           |    9 +
 drivers/net/ntnic/ntnic_meter.c               |  811 ++++
 drivers/net/ntnic/ntnic_meter.h               |   10 +
 drivers/net/ntnic/ntnic_vdpa.c                |  365 ++
 drivers/net/ntnic/ntnic_vdpa.h                |   21 +
 drivers/net/ntnic/ntnic_vf.c                  |   83 +
 drivers/net/ntnic/ntnic_vf.h                  |   17 +
 drivers/net/ntnic/ntnic_vf_vdpa.c             | 1246 +++++
 drivers/net/ntnic/ntnic_vf_vdpa.h             |   25 +
 drivers/net/ntnic/ntnic_vfio.c                |  321 ++
 drivers/net/ntnic/ntnic_vfio.h                |   31 +
 drivers/net/ntnic/ntnic_xstats.c              |  703 +++
 drivers/net/ntnic/ntnic_xstats.h              |   22 +
 28 files changed, 12519 insertions(+)
 create mode 100644 doc/guides/nics/features/ntnic.ini
 create mode 100644 doc/guides/nics/ntnic.rst
 create mode 100644 drivers/net/ntnic/include/ntdrv_4ga.h
 create mode 100644 drivers/net/ntnic/include/ntos_system.h
 create mode 100644 drivers/net/ntnic/ntnic_dbsconfig.c
 create mode 100644 drivers/net/ntnic/ntnic_dbsconfig.h
 create mode 100644 drivers/net/ntnic/ntnic_ethdev.c
 create mode 100644 drivers/net/ntnic/ntnic_ethdev.h
 create mode 100644 drivers/net/ntnic/ntnic_filter/create_elements.h
 create mode 100644 drivers/net/ntnic/ntnic_filter/ntnic_filter.c
 create mode 100644 drivers/net/ntnic/ntnic_filter/ntnic_filter.h
 create mode 100644 drivers/net/ntnic/ntnic_hshconfig.c
 create mode 100644 drivers/net/ntnic/ntnic_hshconfig.h
 create mode 100644 drivers/net/ntnic/ntnic_meter.c
 create mode 100644 drivers/net/ntnic/ntnic_meter.h
 create mode 100644 drivers/net/ntnic/ntnic_vdpa.c
 create mode 100644 drivers/net/ntnic/ntnic_vdpa.h
 create mode 100644 drivers/net/ntnic/ntnic_vf.c
 create mode 100644 drivers/net/ntnic/ntnic_vf.h
 create mode 100644 drivers/net/ntnic/ntnic_vf_vdpa.c
 create mode 100644 drivers/net/ntnic/ntnic_vf_vdpa.h
 create mode 100644 drivers/net/ntnic/ntnic_vfio.c
 create mode 100644 drivers/net/ntnic/ntnic_vfio.h
 create mode 100644 drivers/net/ntnic/ntnic_xstats.c
 create mode 100644 drivers/net/ntnic/ntnic_xstats.h
.mailmap +2 -0
index 864d33ee46..be8880971d 100644
@@ -227,6 +227,7 @@ Chintu Hetam <[email protected]>
 Choonho Son <[email protected]>
 Chris Metcalf <[email protected]>
 Christian Ehrhardt <[email protected]>
+Christian Koue Muf <[email protected]>
 Christian Maciocco <[email protected]>
 Christophe Fontaine <[email protected]>
 Christophe Grosse <[email protected]>
@@ -967,6 +968,7 @@ Mukesh Dua <[email protected]>
 Murphy Yang <[email protected]>
 Murthy NSSR <[email protected]>
 Muthurajan Jayakumar <[email protected]>
+Mykola Kostenok <[email protected]>
 Nachiketa Prachanda <[email protected]> <[email protected]>
 Nagadheeraj Rottela <[email protected]>
 Naga Harish K S V <[email protected]>
MAINTAINERS +7 -0
index 8c3f2c993f..02aca74173 100644
@@ -1053,6 +1053,13 @@ F: drivers/net/memif/
 F: doc/guides/nics/memif.rst
 F: doc/guides/nics/features/memif.ini
 
+NTNIC PMD
+M: Mykola Kostenok <[email protected]>
+M: Christiam Muf <[email protected]>
+F: drivers/net/ntnic/
+F: doc/guides/nics/ntnic.rst
+F: doc/guides/nics/features/ntnic.ini
+
 
 Crypto Drivers
 --------------
doc/guides/nics/features/ntnic.ini new file +50 -0

50 lines not on this page · raw message

doc/guides/nics/ntnic.rst new file +235 -0

235 lines not on this page · raw message

drivers/net/ntnic/include/ntdrv_4ga.h new file +23 -0
new file mode 100644
index 0000000000..e9c38fc330
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTDRV_4GA_H__
+#define __NTDRV_4GA_H__
+
+#include "nthw_drv.h"
+#include "nt4ga_adapter.h"
+#include "nthw_platform_drv.h"
+
+typedef struct ntdrv_4ga_s {
+	uint32_t pciident;
+	struct adapter_info_s adapter_info;
+	char *p_drv_name;
+
+	volatile bool b_shutdown;
+	pthread_mutex_t stat_lck;
+	pthread_t stat_thread;
+	pthread_t flm_thread;
+} ntdrv_4ga_t;
+
+#endif /* __NTDRV_4GA_H__ */
drivers/net/ntnic/include/ntos_system.h new file +23 -0
new file mode 100644
index 0000000000..0adfe86cc3
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTOS_SYSTEM_H__
+#define __NTOS_SYSTEM_H__
+
+#include "include/ntdrv_4ga.h"
+
+/*
+ * struct drv_s for DPDK (clone of kernel struct)
+ * keep it as close as possible to original kernel struct
+ */
+struct drv_s {
+	int adapter_no;
+	struct rte_pci_device *p_dev;
+	struct ntdrv_4ga_s ntdrv;
+
+	int n_eth_dev_init_count;
+	int probe_finished;
+};
+
+#endif /* __NTOS_SYSTEM_H__ */
drivers/net/ntnic/meson.build +13 -0
index a9892615c9..faaba95af3 100644
@@ -26,6 +26,9 @@ includes = [
     include_directories('sensors/ntavr'),
 ]
 
+# deps
+deps += 'vhost'
+
 # all sources
 sources = files(
     'adapter/nt4ga_adapter.c',
@@ -112,6 +115,16 @@ sources = files(
     'nthw/nthw_stat.c',
     'nthw/supported/nthw_fpga_9563_055_024_0000.c',
     'ntlog/ntlog.c',
+    'ntnic_dbsconfig.c',
+    'ntnic_ethdev.c',
+    'ntnic_filter/ntnic_filter.c',
+    'ntnic_hshconfig.c',
+    'ntnic_meter.c',
+    'ntnic_vdpa.c',
+    'ntnic_vf.c',
+    'ntnic_vfio.c',
+    'ntnic_vf_vdpa.c',
+    'ntnic_xstats.c',
     'ntutil/nt_util.c',
     'sensors/avr_sensors/avr_sensors.c',
     'sensors/board_sensors/board_sensors.c',
drivers/net/ntnic/ntnic_dbsconfig.c new file +1670 -0

1,670 lines not on this page · raw message

drivers/net/ntnic/ntnic_dbsconfig.h new file +251 -0

251 lines not on this page · raw message

drivers/net/ntnic/ntnic_ethdev.c new file +4258 -0

696 lines not on this page · raw message

drivers/net/ntnic/ntnic_ethdev.h new file +357 -0

357 lines not on this page · raw message

drivers/net/ntnic/ntnic_filter/create_elements.h new file +1194 -0

1,194 lines not on this page · raw message

drivers/net/ntnic/ntnic_filter/ntnic_filter.c new file +656 -0

656 lines not on this page · raw message

drivers/net/ntnic/ntnic_filter/ntnic_filter.h new file +14 -0
new file mode 100644
index 0000000000..cf4207e5de

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_hshconfig.c new file +102 -0

102 lines not on this page · raw message

drivers/net/ntnic/ntnic_hshconfig.h new file +9 -0
new file mode 100644
index 0000000000..d4d7337d23

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_meter.c new file +811 -0

811 lines not on this page · raw message

drivers/net/ntnic/ntnic_meter.h new file +10 -0
new file mode 100644
index 0000000000..9484c9ee20

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_vdpa.c new file +365 -0

365 lines not on this page · raw message

drivers/net/ntnic/ntnic_vdpa.h new file +21 -0
new file mode 100644
index 0000000000..7acc2c8e4b

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_vf.c new file +83 -0

83 lines not on this page · raw message

drivers/net/ntnic/ntnic_vf.h new file +17 -0
new file mode 100644
index 0000000000..84be3bd71f

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_vf_vdpa.c new file +1246 -0

1,246 lines not on this page · raw message

drivers/net/ntnic/ntnic_vf_vdpa.h new file +25 -0
new file mode 100644
index 0000000000..561e3bf7cf

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_vfio.c new file +321 -0

321 lines not on this page · raw message

drivers/net/ntnic/ntnic_vfio.h new file +31 -0
new file mode 100644
index 0000000000..5d8a63d364

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_xstats.c new file +703 -0

703 lines not on this page · raw message

drivers/net/ntnic/ntnic_xstats.h new file +22 -0
new file mode 100644
index 0000000000..0a82a1a677

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#18 lore raw

PATCH v2 8/8 net/ntnic: adds socket connection to PMD

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The socket connection is used by Napatech's tools for monitoring and rte_flow programming from other processes.

---
v2:
* Fixed WARNING:TYPO_SPELLING

---
 drivers/net/ntnic/meson.build                 |   24 +
 .../ntconnect/include/ntconn_mod_helper.h     |   97 ++
 .../net/ntnic/ntconnect/include/ntconnect.h   |   96 ++
 .../ntnic/ntconnect/include/ntconnect_api.h   |   87 ++
 .../ntconnect/include/ntconnect_api_adapter.h |  221 +++
 .../ntconnect/include/ntconnect_api_flow.h    |  168 +++
 .../ntconnect/include/ntconnect_api_meter.h   |   89 ++
 .../include/ntconnect_api_statistic.h         |  173 +++
 .../ntconnect/include/ntconnect_api_test.h    |   18 +
 drivers/net/ntnic/ntconnect/ntconn_server.c   |   97 ++
 drivers/net/ntnic/ntconnect/ntconnect.c       |  641 ++++++++
 .../ntnic/ntconnect_modules/ntconn_adapter.c  |  775 ++++++++++
 .../net/ntnic/ntconnect_modules/ntconn_flow.c | 1310 +++++++++++++++++
 .../ntnic/ntconnect_modules/ntconn_meter.c    |  517 +++++++
 .../ntnic/ntconnect_modules/ntconn_modules.h  |   19 +
 .../net/ntnic/ntconnect_modules/ntconn_stat.c |  876 +++++++++++
 .../net/ntnic/ntconnect_modules/ntconn_test.c |  146 ++
 17 files changed, 5354 insertions(+)
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconn_mod_helper.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_adapter.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_flow.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_meter.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_statistic.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_test.h
 create mode 100644 drivers/net/ntnic/ntconnect/ntconn_server.c
 create mode 100644 drivers/net/ntnic/ntconnect/ntconnect.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_adapter.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_flow.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_meter.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_modules.h
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_stat.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_test.c
drivers/net/ntnic/meson.build +24 -0
index faaba95af3..262ce436b9 100644
@@ -1,11 +1,27 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020-2023 Napatech A/S
 
+# config object
+ntnic_conf = configuration_data()
+
+# transfer options into config object
+ntnic_conf.set('NT_TOOLS', true)
+
 # cflags
 cflags += [
     '-std=c11',
 ]
 
+# check option 'debug' (boolean flag derived from meson buildtype)
+if get_option('debug')
+    cflags += '-DDEBUG'
+endif
+
+# check nt_tools build option
+if ntnic_conf.get('NT_TOOLS')
+    cflags += '-DNT_TOOLS'
+endif
+
 # includes
 includes = [
     include_directories('.'),
@@ -19,6 +35,7 @@ includes = [
     include_directories('nthw/supported'),
     include_directories('nthw/flow_api'),
     include_directories('nthw/flow_filter'),
+    include_directories('ntconnect/include'),
     include_directories('sensors'),
     include_directories('sensors/avr_sensors'),
     include_directories('sensors/board_sensors'),
@@ -40,6 +57,13 @@ sources = files(
     'nim/nt_link_speed.c',
     'nim/qsfp_sensors.c',
     'nim/sfp_sensors.c',
+    'ntconnect/ntconn_server.c',
+    'ntconnect/ntconnect.c',
+    'ntconnect_modules/ntconn_adapter.c',
+    'ntconnect_modules/ntconn_flow.c',
+    'ntconnect_modules/ntconn_meter.c',
+    'ntconnect_modules/ntconn_stat.c',
+    'ntconnect_modules/ntconn_test.c',
     'nthw/core/nthw_clock_profiles.c',
     'nthw/core/nthw_fpga.c',
     'nthw/core/nthw_fpga_nt200a0x.c',
drivers/net/ntnic/ntconnect/include/ntconn_mod_helper.h new file +97 -0

97 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect.h new file +96 -0

96 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api.h new file +87 -0

87 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_adapter.h new file +221 -0

221 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_flow.h new file +168 -0

168 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_meter.h new file +89 -0

89 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_statistic.h new file +173 -0

173 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_test.h new file +18 -0
new file mode 100644
index 0000000000..44cacbd931
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef _NTCONNECT_TEST_FILTER_H_
+#define _NTCONNECT_TEST_FILTER_H_
+
+/*
+ * Create structures allocating the space to carry through ntconnect interface
+ */
+
+struct test_s {
+	int number;
+	int status;
+	uint64_t test[];
+};
+
+#endif /* _NTCONNECT_TEST_FILTER_H_ */
drivers/net/ntnic/ntconnect/ntconn_server.c new file +97 -0

97 lines not on this page · raw message

drivers/net/ntnic/ntconnect/ntconnect.c new file +641 -0

641 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_adapter.c new file +775 -0

775 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_flow.c new file +1310 -0

491 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_meter.c new file +517 -0

517 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_modules.h new file +19 -0
new file mode 100644
index 0000000000..ea379015fe

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntconnect_modules/ntconn_stat.c new file +876 -0

876 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_test.c new file +146 -0

146 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#19 lore raw
In reply to Mykola Kostenok
Quoted 28 lines · Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.

---
 drivers/net/meson.build                       |    1 +
 drivers/net/ntnic/include/fpga_model.h        |   99 +
 drivers/net/ntnic/meson.build                 |   29 +
 drivers/net/ntnic/nthw/nthw_register.h        |   19 +
 .../supported/nthw_fpga_9563_055_024_0000.c   | 4190 ++++++++++
 .../nthw/supported/nthw_fpga_instances.h      |   14 +
 .../nthw/supported/nthw_fpga_modules_defs.h   |  166 +
 .../supported/nthw_fpga_parameters_defs.h     |  209 +
 .../nthw/supported/nthw_fpga_registers_defs.h | 7277 +++++++++++++++++
 9 files changed, 12004 insertions(+)
 create mode 100644 drivers/net/ntnic/include/fpga_model.h
 create mode 100644 drivers/net/ntnic/meson.build
 create mode 100644 drivers/net/ntnic/nthw/nthw_register.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_024_0000.c
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_instances.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_modules_defs.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_parameters_defs.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_registers_defs.h

...

drivers/net/ntnic/meson.build line 7

Quoted 13 lines
drivers/net/ntnic/meson.build new file +7 -0
new file mode 100644
index 0000000000..99569c2843
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2020-2023 Napatech A/S
+
+# cflags
+cflags += [
+    '-std=c11',
+]

shouldn't be needed dpdk requires c11 conformant compiler and configures it in the root project meson.build with c_std=c11

#20 lore raw

Thanks. Good catch. Accepted.

Quoted 99 lines

-----Original Message-----
From: Tyler Retzlaff <[email protected]>
Sent: Friday, August 18, 2023 1:09 AM
To: Mykola Kostenok <[email protected]>
Cc: [email protected]; Christian Koue Muf <[email protected]>
Subject: Re: [PATCH v2 1/8] net/ntnic: initial commit which adds register defines

Quoted 10 lines · Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.

---

drivers/net/https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fmeson.bu ild&c=E,1,c156wt4VMYHsQ_FY06uE-B1pGyaYNwecOQ-XgYTxQ- sEVxXYcRzmo8p5zvB3AoN4L_0P4vtVDdYAe8fufFu83lS8RGCTi26L_5wJg6s9-
x5sIzJg&typo=1 | 1 +

Quoted 2 lines
 drivers/net/ntnic/include/fpga_model.h        |   99 +

drivers/net/ntnic/https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fme son.build&c=E,1,ZYui3lhpAaB9drSKM2VpYXdH_wzEWBpNMmZdLjmC19weBv afwLSTVbJz- CEi4jjp1YlftAt12gX0UAKmypCNhhDaAZNmziRKxEv3a69raQ,,&typo=1
| 29 +

Quoted 10 lines
 drivers/net/ntnic/nthw/nthw_register.h        |   19 +
 .../supported/nthw_fpga_9563_055_024_0000.c   | 4190 ++++++++++
 .../nthw/supported/nthw_fpga_instances.h      |   14 +
 .../nthw/supported/nthw_fpga_modules_defs.h   |  166 +
 .../supported/nthw_fpga_parameters_defs.h     |  209 +
 .../nthw/supported/nthw_fpga_registers_defs.h | 7277
+++++++++++++++++
 9 files changed, 12004 insertions(+)
 create mode 100644 drivers/net/ntnic/include/fpga_model.h
 create mode 100644
Quoted 2 lines

drivers/net/ntnic/https://linkprotect.cudasvc.com/url?a=https%3a%2f%2f

meson.build&c=E,1,qiO2jreaEnViAwfKF0yAabA5ltx6OuQTyXPKL1CEOtHAJNv4 1EcJ

Quoted 1 line

fd8PkWWUu7_1joAueaPENflIstjA1nB7iHDBk8g3mUvawgO-

g6qgJw,,&typo=1

Quoted 12 lines
 create mode 100644 drivers/net/ntnic/nthw/nthw_register.h
 create mode 100644
drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_024_0000.c
 create mode 100644
drivers/net/ntnic/nthw/supported/nthw_fpga_instances.h
 create mode 100644
drivers/net/ntnic/nthw/supported/nthw_fpga_modules_defs.h
 create mode 100644
drivers/net/ntnic/nthw/supported/nthw_fpga_parameters_defs.h
 create mode 100644

drivers/net/ntnic/nthw/supported/nthw_fpga_registers_defs.h

...

Quoted 3 lines

diff --git a/drivers/net/ntnic/https://linkprotect.cudasvc.com/url?a=https%3a%2f% 2fmeson.build&c=E,1,wjptlM2nMhsaqMywVruBxBf7Iwa4gnfYg0S6VTIF-

NwOmhEZbH

Quoted 1 line

kPCwsilEoTcVmtpWO81GLKY8FuRSm-qE1r5zKd-

17oCsAXdsYuPlaJNTlyx6WJy1D4zO9x

Quoted 3 lines

l5g,&typo=1 b/drivers/net/ntnic/https://linkprotect.cudasvc.com/url?a=https%3a%2f% 2fmeson.build&c=E,1,Vr72t7YiUD4v0n-

Lhyp4R59sZz3UaPNjF0lvx7NtZF12XRido9

Quoted 1 line

eNWpHDZ-yu-163BxDRG_bu6Hrd47xG6AdPy_U51jZkjSS68uUh0DYrhZxK-

qnNuORuGoE,

drivers/net/ntnic/https://linkprotect.cudasvc.com/url?a=https%3a

Quoted 6 lines

&typo=1
new file mode 100644
index 0000000000..99569c2843

drivers/net/ntnic/https://linkprotect.cudasvc.com/url?a=https%3a new file +1 -0
+++ %2f%2fmeson.build&c=E,1,cf8efsbrpf4Grj2N8OcSe-

QexkKqF2_tzOZ4hOLUzB

Quoted 1 line

+++

RYRr6AjKPAC6xDsNYOzZm5fReuyiydIkeuWUs4tdzMJR79dQs_0r2jDA11AToOX ZOI

drivers/net/ntnic/https://linkprotect.cudasvc.com/url?a=https%3a line 7

Quoted 9 lines

+++ xUW5VSKbc0Qz&typo=1

drivers/net/ntnic/https://linkprotect.cudasvc.com/url?a=https%3a new file +7 -0
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2020-2023
+Napatech A/S
+
+# cflags
+cflags += [
+    '-std=c11',
+]

shouldn't be needed dpdk requires c11 conformant compiler and configures it in the root project
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fmeson.build&c=E,1,U
ys7NUWLsmYbHeZHmrhnTMRhOY3f5VWdjL-nsQdprcA9- 4V3RJhX5rDcrpNRQ8ajaA4EYFBy7WUFJQcEVsZPnN69jt6S- ZrbNuvDTeEbvwjaYLsUjwUSg0Y,&typo=1 with c_std=c11

#21 lore raw

PATCH v4 1/8 net/ntnic: initial commit which adds register defines

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.

---
v3:
* Fixed not needed cflags as suggested in comments.

---
 drivers/net/meson.build                       |    1 +
 drivers/net/ntnic/include/fpga_model.h        |   99 +
 drivers/net/ntnic/meson.build                 |   24 +
 drivers/net/ntnic/nthw/nthw_register.h        |   19 +
 .../supported/nthw_fpga_9563_055_024_0000.c   | 4190 ++++++++++
 .../nthw/supported/nthw_fpga_instances.h      |   14 +
 .../nthw/supported/nthw_fpga_modules_defs.h   |  166 +
 .../supported/nthw_fpga_parameters_defs.h     |  209 +
 .../nthw/supported/nthw_fpga_registers_defs.h | 7277 +++++++++++++++++
 9 files changed, 11999 insertions(+)
 create mode 100644 drivers/net/ntnic/include/fpga_model.h
 create mode 100644 drivers/net/ntnic/meson.build
 create mode 100644 drivers/net/ntnic/nthw/nthw_register.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_024_0000.c
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_instances.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_modules_defs.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_parameters_defs.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_registers_defs.h
drivers/net/meson.build +1 -0
index bd38b533c5..fb6d34b782 100644
@@ -45,6 +45,7 @@ drivers = [
         'nfb',
         'nfp',
         'ngbe',
+        'ntnic',
         'null',
         'octeontx',
         'octeon_ep',
drivers/net/ntnic/include/fpga_model.h new file +99 -0

99 lines not on this page · raw message

drivers/net/ntnic/meson.build new file +24 -0
new file mode 100644
index 0000000000..686d344d91
@@ -0,0 +1,24 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2020-2023 Napatech A/S
+
+# includes
+includes = [
+    include_directories('.'),
+    include_directories('include'),
+    include_directories('nthw'),
+    include_directories('nthw/supported'),
+]
+
+# all sources
+sources = files(
+    'nthw/supported/nthw_fpga_9563_055_024_0000.c',
+)
+
+if is_variable('default_cflags')
+      cflags += default_cflags
+else
+      cflags += machine_args
+      cflags += ['-DALLOW_INTERNAL_API']
+endif
+
+# END
drivers/net/ntnic/nthw/nthw_register.h new file +19 -0
new file mode 100644
index 0000000000..5cdbd9fc5d
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef NTHW_REGISTER_H_
+#define NTHW_REGISTER_H_
+
+#include <unistd.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <inttypes.h>
+
+#include "fpga_model.h"
+
+#include "nthw_fpga_modules_defs.h"
+#include "nthw_fpga_parameters_defs.h"
+#include "nthw_fpga_registers_defs.h"
+
+#endif /* NTHW_REGISTER_H_ */
drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_024_0000.c new file +4190 -0

2,851 lines not on this page · raw message

drivers/net/ntnic/nthw/supported/nthw_fpga_instances.h new file +14 -0
new file mode 100644
index 0000000000..1d707d6925

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/supported/nthw_fpga_modules_defs.h new file +166 -0

166 lines not on this page · raw message

drivers/net/ntnic/nthw/supported/nthw_fpga_parameters_defs.h new file +209 -0

209 lines not on this page · raw message

drivers/net/ntnic/nthw/supported/nthw_fpga_registers_defs.h new file +7277 -0

7,277 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#22 lore raw

PATCH v4 2/8 net/ntnic: adds core registers and fpga functionality

From: Christian Koue Muf <[email protected]>

Includes functionality to reset, initialize, program, and collect stats for the NTNIC FPGA.

---
v2:
* Fixed WARNING:TYPO_SPELLING
* Fix compilation for Fedora38
v3:
* Fixed WARNING:TYPO_SPELLING
* Fix compilation for Fedora38

---
 drivers/net/ntnic/include/nthw_bus.h          |   10 +
 drivers/net/ntnic/meson.build                 |   32 +
 .../net/ntnic/nthw/core/nthw_clock_profiles.c |    9 +
 .../net/ntnic/nthw/core/nthw_clock_profiles.h |   39 +
 drivers/net/ntnic/nthw/core/nthw_core.h       |   31 +
 drivers/net/ntnic/nthw/core/nthw_fpga.c       |  914 +++++++++
 drivers/net/ntnic/nthw/core/nthw_fpga.h       |   47 +
 .../net/ntnic/nthw/core/nthw_fpga_nt200a0x.c  |   46 +
 .../net/ntnic/nthw/core/nthw_fpga_nt200a0x.h  |   14 +
 drivers/net/ntnic/nthw/core/nthw_fpga_rst.c   |   10 +
 drivers/net/ntnic/nthw/core/nthw_fpga_rst.h   |   17 +
 .../net/ntnic/nthw/core/nthw_fpga_rst9563.c   |  241 +++
 .../ntnic/nthw/core/nthw_fpga_rst_nt200a0x.c  |  674 +++++++
 .../ntnic/nthw/core/nthw_fpga_rst_nt200a0x.h  |   89 +
 drivers/net/ntnic/nthw/core/nthw_gpio_phy.c   |  271 +++
 drivers/net/ntnic/nthw/core/nthw_gpio_phy.h   |   57 +
 drivers/net/ntnic/nthw/core/nthw_hif.c        |  342 ++++
 drivers/net/ntnic/nthw/core/nthw_hif.h        |  156 ++
 drivers/net/ntnic/nthw/core/nthw_iic.c        |  570 ++++++
 drivers/net/ntnic/nthw/core/nthw_iic.h        |  101 +
 drivers/net/ntnic/nthw/core/nthw_mac_pcs.c    | 1034 ++++++++++
 drivers/net/ntnic/nthw/core/nthw_mac_pcs.h    |  261 +++
 .../net/ntnic/nthw/core/nthw_mac_pcs_xxv.c    | 1631 ++++++++++++++++
 .../net/ntnic/nthw/core/nthw_mac_pcs_xxv.h    |  291 +++
 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.c  |  121 ++
 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.h  |   51 +
 drivers/net/ntnic/nthw/core/nthw_pci_ta.c     |   99 +
 drivers/net/ntnic/nthw/core/nthw_pci_ta.h     |   40 +
 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.c  |  127 ++
 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.h  |   55 +
 drivers/net/ntnic/nthw/core/nthw_pcie3.c      |  274 +++
 drivers/net/ntnic/nthw/core/nthw_pcie3.h      |  100 +
 drivers/net/ntnic/nthw/core/nthw_sdc.c        |  177 ++
 drivers/net/ntnic/nthw/core/nthw_sdc.h        |   43 +
 drivers/net/ntnic/nthw/core/nthw_si5340.c     |  206 ++
 drivers/net/ntnic/nthw/core/nthw_si5340.h     |   34 +
 drivers/net/ntnic/nthw/core/nthw_spi_v3.c     |  380 ++++
 drivers/net/ntnic/nthw/core/nthw_spi_v3.h     |  106 ++
 drivers/net/ntnic/nthw/core/nthw_spim.c       |  117 ++
 drivers/net/ntnic/nthw/core/nthw_spim.h       |   52 +
 drivers/net/ntnic/nthw/core/nthw_spis.c       |  147 ++
 drivers/net/ntnic/nthw/core/nthw_spis.h       |   63 +
 drivers/net/ntnic/nthw/core/nthw_tsm.c        |  179 ++
 drivers/net/ntnic/nthw/core/nthw_tsm.h        |   53 +
 drivers/net/ntnic/nthw/nthw_dbs.c             | 1301 +++++++++++++
 drivers/net/ntnic/nthw/nthw_dbs.h             |  313 +++
 drivers/net/ntnic/nthw/nthw_drv.h             |   82 +
 drivers/net/ntnic/nthw/nthw_epp.c             |  335 ++++
 drivers/net/ntnic/nthw/nthw_epp.h             |   99 +
 drivers/net/ntnic/nthw/nthw_fpga_model.c      | 1677 +++++++++++++++++
 drivers/net/ntnic/nthw/nthw_fpga_model.h      |  308 +++
 drivers/net/ntnic/nthw/nthw_helper.h          |   21 +
 drivers/net/ntnic/nthw/nthw_platform.c        |   35 +
 drivers/net/ntnic/nthw/nthw_platform_drv.h    |   42 +
 drivers/net/ntnic/nthw/nthw_profile.h         |   15 +
 drivers/net/ntnic/nthw/nthw_rac.c             |  976 ++++++++++
 drivers/net/ntnic/nthw/nthw_rac.h             |  161 ++
 drivers/net/ntnic/nthw/nthw_register.h        |    2 +
 drivers/net/ntnic/nthw/nthw_stat.c            |  266 +++
 drivers/net/ntnic/nthw/nthw_stat.h            |   72 +
 drivers/net/ntnic/ntlog/include/ntlog.h       |  162 ++
 drivers/net/ntnic/ntlog/ntlog.c               |  115 ++
 drivers/net/ntnic/ntutil/include/nt_util.h    |   71 +
 drivers/net/ntnic/ntutil/nt_util.c            |   77 +
 64 files changed, 15441 insertions(+)
 create mode 100644 drivers/net/ntnic/include/nthw_bus.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_clock_profiles.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_clock_profiles.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_core.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst9563.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gpio_phy.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gpio_phy.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_hif.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_hif.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_iic.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_iic.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_ta.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_ta.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pcie3.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pcie3.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_sdc.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_sdc.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_si5340.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_si5340.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spi_v3.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spi_v3.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spim.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spim.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spis.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spis.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_tsm.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_tsm.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_dbs.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_dbs.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_drv.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_epp.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_epp.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_fpga_model.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_fpga_model.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_helper.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_platform.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_platform_drv.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_profile.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_rac.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_rac.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_stat.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_stat.h
 create mode 100644 drivers/net/ntnic/ntlog/include/ntlog.h
 create mode 100644 drivers/net/ntnic/ntlog/ntlog.c
 create mode 100644 drivers/net/ntnic/ntutil/include/nt_util.h
 create mode 100644 drivers/net/ntnic/ntutil/nt_util.c
drivers/net/ntnic/include/nthw_bus.h new file +10 -0
new file mode 100644
index 0000000000..975cc95e78
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_BUS_H__
+#define __NTHW_BUS_H__
+
+typedef uint8_t rab_bus_id_t;
+
+#endif /* __NTHW_BUS_H__ */
drivers/net/ntnic/meson.build +32 -0
index 686d344d91..46913c0c74 100644
@@ -5,13 +5,45 @@
 includes = [
     include_directories('.'),
     include_directories('include'),
+    include_directories('ntlog/include'),
+    include_directories('ntutil/include'),
     include_directories('nthw'),
+    include_directories('nthw/core'),
     include_directories('nthw/supported'),
 ]
 
 # all sources
 sources = files(
+    'nthw/core/nthw_clock_profiles.c',
+    'nthw/core/nthw_fpga.c',
+    'nthw/core/nthw_fpga_nt200a0x.c',
+    'nthw/core/nthw_fpga_rst.c',
+    'nthw/core/nthw_fpga_rst9563.c',
+    'nthw/core/nthw_fpga_rst_nt200a0x.c',
+    'nthw/core/nthw_gpio_phy.c',
+    'nthw/core/nthw_hif.c',
+    'nthw/core/nthw_iic.c',
+    'nthw/core/nthw_mac_pcs.c',
+    'nthw/core/nthw_mac_pcs_xxv.c',
+    'nthw/core/nthw_pci_rd_tg.c',
+    'nthw/core/nthw_pci_ta.c',
+    'nthw/core/nthw_pci_wr_tg.c',
+    'nthw/core/nthw_pcie3.c',
+    'nthw/core/nthw_sdc.c',
+    'nthw/core/nthw_si5340.c',
+    'nthw/core/nthw_spi_v3.c',
+    'nthw/core/nthw_spim.c',
+    'nthw/core/nthw_spis.c',
+    'nthw/core/nthw_tsm.c',
+    'nthw/nthw_fpga_model.c',
+    'nthw/nthw_dbs.c',
+    'nthw/nthw_epp.c',
+    'nthw/nthw_platform.c',
+    'nthw/nthw_rac.c',
+    'nthw/nthw_stat.c',
     'nthw/supported/nthw_fpga_9563_055_024_0000.c',
+    'ntlog/ntlog.c',
+    'ntutil/nt_util.c',
 )
 
 if is_variable('default_cflags')
drivers/net/ntnic/nthw/core/nthw_clock_profiles.c new file +9 -0
new file mode 100644
index 0000000000..efdcc222a8
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#include "nthw_clock_profiles.h"
+
+/* Clock profile for NT200A02 2x40G, 2x100G */
+const int n_data_si5340_nt200a02_u23_v5;
+const clk_profile_data_fmt2_t *p_data_si5340_nt200a02_u23_v5;
drivers/net/ntnic/nthw/core/nthw_clock_profiles.h new file +39 -0
new file mode 100644
index 0000000000..4252f69e92
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_CLOCK_PROFILES_H__
+#define __NTHW_CLOCK_PROFILES_H__
+
+#include <stdint.h>
+
+#include "nthw_helper.h"
+
+#define clk_profile_size_error_msg "size test failed"
+
+typedef struct {
+	unsigned char reg_addr;
+	unsigned char reg_val;
+	unsigned char reg_mask;
+} clk_profile_data_fmt0_t;
+
+typedef struct {
+	uint16_t reg_addr;
+	uint8_t reg_val;
+} clk_profile_data_fmt1_t;
+
+typedef struct {
+	unsigned int reg_addr;
+	unsigned char reg_val;
+} clk_profile_data_fmt2_t;
+
+typedef enum {
+	CLK_PROFILE_DATA_FMT_0,
+	CLK_PROFILE_DATA_FMT_1,
+	CLK_PROFILE_DATA_FMT_2
+} clk_profile_data_fmt_t;
+
+extern const int n_data_si5340_nt200a02_u23_v5;
+extern const  clk_profile_data_fmt2_t *p_data_si5340_nt200a02_u23_v5;
+
+#endif /* __NTHW_CLOCK_PROFILES_H__ */
drivers/net/ntnic/nthw/core/nthw_core.h new file +31 -0
new file mode 100644
index 0000000000..798a95d5cf
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_CORE_H__
+#define __NTHW_CORE_H__
+
+#include "nthw_helper.h"
+
+#include "nthw_platform_drv.h"
+#include "nthw_fpga_model.h"
+#include "nthw_hif.h"
+#include "nthw_pcie3.h"
+#include "nthw_pci_rd_tg.h"
+#include "nthw_pci_wr_tg.h"
+#include "nthw_pci_ta.h"
+#include "nthw_iic.h"
+
+#include "nthw_gpio_phy.h"
+#include "nthw_mac_pcs.h"
+#include "nthw_mac_pcs_xxv.h"
+#include "nthw_sdc.h"
+
+#include "nthw_spim.h"
+#include "nthw_spis.h"
+
+#include "nthw_tsm.h"
+
+#include "nthw_si5340.h"
+
+#endif /* __NTHW_CORE_H__ */
drivers/net/ntnic/nthw/core/nthw_fpga.c new file +914 -0

914 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga.h new file +47 -0

47 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.c new file +46 -0

46 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.h new file +14 -0
new file mode 100644
index 0000000000..ff324bee39
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_FPGA_NT200A0X_H__
+#define __NTHW_FPGA_NT200A0X_H__
+
+int nthw_fpga_nt200a0x_init(struct fpga_info_s *p_fpga_info);
+
+/* NT200A02: 9563 */
+int nthw_fpga_rst9563_init(struct fpga_info_s *p_fpga_info,
+			  struct nthw_fpga_rst_nt200a0x *const p);
+
+#endif /* __NTHW_FPGA_NT200A0X_H__ */
drivers/net/ntnic/nthw/core/nthw_fpga_rst.c new file +10 -0
new file mode 100644
index 0000000000..66c148bab2
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#include "ntlog.h"
+
+#include "nthw_fpga.h"
+#include "nthw_fpga_nt200a0x.h"
+
+#include "nthw_fpga_rst.h"
drivers/net/ntnic/nthw/core/nthw_fpga_rst.h new file +17 -0
new file mode 100644
index 0000000000..2099c4b677
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_FPGA_RST_H__
+#define __NTHW_FPGA_RST_H__
+
+#include "nthw_drv.h"
+
+#include "nthw_fpga_model.h"
+
+#include "nthw_rac.h"
+#include "nthw_iic.h"
+
+#include "nthw_fpga_rst_nt200a0x.h"
+
+#endif /* __NTHW_FPGA_RST_H__ */
drivers/net/ntnic/nthw/core/nthw_fpga_rst9563.c new file +241 -0

241 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.c new file +674 -0

674 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.h new file +89 -0

89 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_gpio_phy.c new file +271 -0

271 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_gpio_phy.h new file +57 -0

57 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_hif.c new file +342 -0

342 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_hif.h new file +156 -0

144 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_iic.c new file +570 -0

570 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_iic.h new file +101 -0

101 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs.c new file +1034 -0

1,034 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs.h new file +261 -0

261 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.c new file +1631 -0

1,631 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.h new file +291 -0

291 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.c new file +121 -0

121 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.h new file +51 -0

51 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_ta.c new file +99 -0

99 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_ta.h new file +40 -0
new file mode 100644
index 0000000000..7968cad9fa

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.c new file +127 -0

127 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.h new file +55 -0

55 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pcie3.c new file +274 -0

274 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pcie3.h new file +100 -0

100 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_sdc.c new file +177 -0

177 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_sdc.h new file +43 -0

43 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_si5340.c new file +206 -0

206 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_si5340.h new file +34 -0
new file mode 100644
index 0000000000..f588b5b825

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_spi_v3.c new file +380 -0

380 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spi_v3.h new file +106 -0

106 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spim.c new file +117 -0

117 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spim.h new file +52 -0

52 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spis.c new file +147 -0

147 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spis.h new file +63 -0

63 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_tsm.c new file +179 -0

179 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_tsm.h new file +53 -0

53 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_dbs.c new file +1301 -0

1,301 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_dbs.h new file +313 -0

313 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_drv.h new file +82 -0

82 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_epp.c new file +335 -0

335 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_epp.h new file +99 -0

99 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_fpga_model.c new file +1677 -0

1,677 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_fpga_model.h new file +308 -0

308 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_helper.h new file +21 -0
new file mode 100644
index 0000000000..22f6a0d471

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_platform.c new file +35 -0
new file mode 100644
index 0000000000..203947e03a

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_platform_drv.h new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_profile.h new file +15 -0
new file mode 100644
index 0000000000..2fcb7b4adf

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_rac.c new file +976 -0

976 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_rac.h new file +161 -0

161 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_register.h +2 -0
index 5cdbd9fc5d..4fe3496b9f 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_stat.c new file +266 -0

266 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_stat.h new file +72 -0

72 lines not on this page · raw message

drivers/net/ntnic/ntlog/include/ntlog.h new file +162 -0

162 lines not on this page · raw message

drivers/net/ntnic/ntlog/ntlog.c new file +115 -0

115 lines not on this page · raw message

drivers/net/ntnic/ntutil/include/nt_util.h new file +71 -0

71 lines not on this page · raw message

drivers/net/ntnic/ntutil/nt_util.c new file +77 -0

77 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#23 lore raw

PATCH v4 3/8 net/ntnic: adds NT200A02 adapter support

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The PMD is designed to support multiple different adapters, and this commit adds support for NT200A02 2x100G. Sensor and NIM code is included.

---
v2:
* Fixed WARNING:TYPO_SPELLING

---
 .../net/ntnic/adapter/common_adapter_defs.h   |   14 +
 drivers/net/ntnic/adapter/nt4ga_adapter.c     |  477 ++++
 drivers/net/ntnic/adapter/nt4ga_adapter.h     |  108 +
 drivers/net/ntnic/adapter/nt4ga_filter.h      |   15 +
 drivers/net/ntnic/adapter/nt4ga_link.c        |  178 ++
 drivers/net/ntnic/adapter/nt4ga_link.h        |  179 ++
 drivers/net/ntnic/adapter/nt4ga_link_100g.c   |  825 +++++++
 drivers/net/ntnic/adapter/nt4ga_link_100g.h   |   12 +
 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.c   |  598 +++++
 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.h   |   41 +
 drivers/net/ntnic/adapter/nt4ga_stat.c        |  705 ++++++
 drivers/net/ntnic/adapter/nt4ga_stat.h        |  202 ++
 drivers/net/ntnic/meson.build                 |   24 +
 drivers/net/ntnic/nim/i2c_nim.c               | 1974 +++++++++++++++++
 drivers/net/ntnic/nim/i2c_nim.h               |  122 +
 drivers/net/ntnic/nim/nim_defines.h           |  146 ++
 drivers/net/ntnic/nim/nt_link_speed.c         |  105 +
 drivers/net/ntnic/nim/nt_link_speed.h         |   34 +
 drivers/net/ntnic/nim/qsfp_registers.h        |   57 +
 drivers/net/ntnic/nim/qsfp_sensors.c          |  174 ++
 drivers/net/ntnic/nim/qsfp_sensors.h          |   18 +
 drivers/net/ntnic/nim/sfp_p_registers.h       |  100 +
 drivers/net/ntnic/nim/sfp_sensors.c           |  288 +++
 drivers/net/ntnic/nim/sfp_sensors.h           |   18 +
 .../net/ntnic/nthw/core/nthw_clock_profiles.c |   11 +-
 drivers/net/ntnic/nthw/core/nthw_core.h       |    2 +
 drivers/net/ntnic/nthw/core/nthw_gmf.c        |  290 +++
 drivers/net/ntnic/nthw/core/nthw_gmf.h        |   93 +
 .../nthw/core/nthw_nt200a02_u23_si5340_v5.h   |  344 +++
 drivers/net/ntnic/nthw/core/nthw_rmc.c        |  156 ++
 drivers/net/ntnic/nthw/core/nthw_rmc.h        |   57 +
 .../ntnic/sensors/avr_sensors/avr_sensors.c   |  104 +
 .../ntnic/sensors/avr_sensors/avr_sensors.h   |   22 +
 .../sensors/board_sensors/board_sensors.c     |   48 +
 .../sensors/board_sensors/board_sensors.h     |   18 +
 .../net/ntnic/sensors/board_sensors/tempmon.c |   42 +
 .../net/ntnic/sensors/board_sensors/tempmon.h |   16 +
 .../ntnic/sensors/nim_sensors/nim_sensors.c   |   54 +
 .../ntnic/sensors/nim_sensors/nim_sensors.h   |   19 +
 drivers/net/ntnic/sensors/ntavr/avr_intf.h    |   89 +
 drivers/net/ntnic/sensors/ntavr/ntavr.c       |   78 +
 drivers/net/ntnic/sensors/ntavr/ntavr.h       |   32 +
 drivers/net/ntnic/sensors/sensor_types.h      |  259 +++
 drivers/net/ntnic/sensors/sensors.c           |  273 +++
 drivers/net/ntnic/sensors/sensors.h           |  127 ++
 drivers/net/ntnic/sensors/stream_info.h       |   86 +
 46 files changed, 8632 insertions(+), 2 deletions(-)
 create mode 100644 drivers/net/ntnic/adapter/common_adapter_defs.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_adapter.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_adapter.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_filter.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link_100g.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link_100g.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_stat.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_stat.h
 create mode 100644 drivers/net/ntnic/nim/i2c_nim.c
 create mode 100644 drivers/net/ntnic/nim/i2c_nim.h
 create mode 100644 drivers/net/ntnic/nim/nim_defines.h
 create mode 100644 drivers/net/ntnic/nim/nt_link_speed.c
 create mode 100644 drivers/net/ntnic/nim/nt_link_speed.h
 create mode 100644 drivers/net/ntnic/nim/qsfp_registers.h
 create mode 100644 drivers/net/ntnic/nim/qsfp_sensors.c
 create mode 100644 drivers/net/ntnic/nim/qsfp_sensors.h
 create mode 100644 drivers/net/ntnic/nim/sfp_p_registers.h
 create mode 100644 drivers/net/ntnic/nim/sfp_sensors.c
 create mode 100644 drivers/net/ntnic/nim/sfp_sensors.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gmf.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gmf.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_nt200a02_u23_si5340_v5.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_rmc.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_rmc.h
 create mode 100644 drivers/net/ntnic/sensors/avr_sensors/avr_sensors.c
 create mode 100644 drivers/net/ntnic/sensors/avr_sensors/avr_sensors.h
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/board_sensors.c
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/board_sensors.h
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/tempmon.c
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/tempmon.h
 create mode 100644 drivers/net/ntnic/sensors/nim_sensors/nim_sensors.c
 create mode 100644 drivers/net/ntnic/sensors/nim_sensors/nim_sensors.h
 create mode 100644 drivers/net/ntnic/sensors/ntavr/avr_intf.h
 create mode 100644 drivers/net/ntnic/sensors/ntavr/ntavr.c
 create mode 100644 drivers/net/ntnic/sensors/ntavr/ntavr.h
 create mode 100644 drivers/net/ntnic/sensors/sensor_types.h
 create mode 100644 drivers/net/ntnic/sensors/sensors.c
 create mode 100644 drivers/net/ntnic/sensors/sensors.h
 create mode 100644 drivers/net/ntnic/sensors/stream_info.h
drivers/net/ntnic/adapter/common_adapter_defs.h new file +14 -0
new file mode 100644
index 0000000000..79167806f1
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef _COMMON_ADAPTER_DEFS_H_
+#define _COMMON_ADAPTER_DEFS_H_
+
+/*
+ * Declarations shared by NT adapter types.
+ */
+#define NUM_ADAPTER_MAX (8)
+#define NUM_ADAPTER_PORTS_MAX (128)
+
+#endif /* _COMMON_ADAPTER_DEFS_H_ */
drivers/net/ntnic/adapter/nt4ga_adapter.c new file +477 -0

477 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_adapter.h new file +108 -0

108 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_filter.h new file +15 -0
new file mode 100644
index 0000000000..ad7e7d8c71
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef NT4GA_FILTER_H_
+#define NT4GA_FILTER_H_
+
+typedef struct nt4ga_filter_s {
+	int n_intf_cnt;
+	int n_queues_per_intf_cnt;
+
+	struct flow_nic_dev *mp_flow_device;
+} nt4ga_filter_t;
+
+#endif /* NT4GA_FILTER_H_ */
drivers/net/ntnic/adapter/nt4ga_link.c new file +178 -0

178 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_link.h new file +179 -0

179 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_link_100g.c new file +825 -0

825 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_link_100g.h new file +12 -0
new file mode 100644
index 0000000000..803b3454b7
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef NT4GA_LINK_100G_H_
+#define NT4GA_LINK_100G_H_
+
+#include "nthw_drv.h"
+
+int nt4ga_link_100g_ports_init(adapter_info_t *p_adapter_info, nt_fpga_t *p_fpga);
+
+#endif /* NT4GA_LINK_100G_H_ */
drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.c new file +598 -0

598 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.h new file +41 -0

41 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_stat.c new file +705 -0

553 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_stat.h new file +202 -0

202 lines not on this page · raw message

drivers/net/ntnic/meson.build +24 -0
index 46913c0c74..ae43254f9f 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nim/i2c_nim.c new file +1974 -0

1,974 lines not on this page · raw message

drivers/net/ntnic/nim/i2c_nim.h new file +122 -0

122 lines not on this page · raw message

drivers/net/ntnic/nim/nim_defines.h new file +146 -0

146 lines not on this page · raw message

drivers/net/ntnic/nim/nt_link_speed.c new file +105 -0

105 lines not on this page · raw message

drivers/net/ntnic/nim/nt_link_speed.h new file +34 -0
new file mode 100644
index 0000000000..969e3fb867

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nim/qsfp_registers.h new file +57 -0

57 lines not on this page · raw message

drivers/net/ntnic/nim/qsfp_sensors.c new file +174 -0

174 lines not on this page · raw message

drivers/net/ntnic/nim/qsfp_sensors.h new file +18 -0
new file mode 100644
index 0000000000..de64b978cb

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nim/sfp_p_registers.h new file +100 -0

100 lines not on this page · raw message

drivers/net/ntnic/nim/sfp_sensors.c new file +288 -0

288 lines not on this page · raw message

drivers/net/ntnic/nim/sfp_sensors.h new file +18 -0
new file mode 100644
index 0000000000..ab56027dc8

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_clock_profiles.c +9 -2
index efdcc222a8..bd7cd2a27c 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_core.h +2 -0
index 798a95d5cf..025b6b61cc 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_gmf.c new file +290 -0

290 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_gmf.h new file +93 -0

93 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_nt200a02_u23_si5340_v5.h new file +344 -0

344 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_rmc.c new file +156 -0

156 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_rmc.h new file +57 -0

57 lines not on this page · raw message

drivers/net/ntnic/sensors/avr_sensors/avr_sensors.c new file +104 -0

104 lines not on this page · raw message

drivers/net/ntnic/sensors/avr_sensors/avr_sensors.h new file +22 -0
new file mode 100644
index 0000000000..b8c37a12cb

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/board_sensors/board_sensors.c new file +48 -0

48 lines not on this page · raw message

drivers/net/ntnic/sensors/board_sensors/board_sensors.h new file +18 -0
new file mode 100644
index 0000000000..a7f75b7ae4

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/board_sensors/tempmon.c new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/sensors/board_sensors/tempmon.h new file +16 -0
new file mode 100644
index 0000000000..6f2017b714

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/nim_sensors/nim_sensors.c new file +54 -0

54 lines not on this page · raw message

drivers/net/ntnic/sensors/nim_sensors/nim_sensors.h new file +19 -0
new file mode 100644
index 0000000000..c68c9aa924

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/ntavr/avr_intf.h new file +89 -0

89 lines not on this page · raw message

drivers/net/ntnic/sensors/ntavr/ntavr.c new file +78 -0

78 lines not on this page · raw message

drivers/net/ntnic/sensors/ntavr/ntavr.h new file +32 -0
new file mode 100644
index 0000000000..b7a7aeb908

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/sensor_types.h new file +259 -0

259 lines not on this page · raw message

drivers/net/ntnic/sensors/sensors.c new file +273 -0

273 lines not on this page · raw message

drivers/net/ntnic/sensors/sensors.h new file +127 -0

127 lines not on this page · raw message

drivers/net/ntnic/sensors/stream_info.h new file +86 -0

86 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#24 lore raw

PATCH v4 4/8 net/ntnic: adds flow related FPGA functionality

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The PMD will control the registers used for flow programming, and this commit adds support for this.

---
v2:
* Fixed compilation with Fedora 38

---
 drivers/net/ntnic/meson.build                 |   21 +
 .../ntnic/nthw/flow_filter/flow_nthw_cat.c    | 1107 ++++++++++++++++
 .../ntnic/nthw/flow_filter/flow_nthw_cat.h    |  372 ++++++
 .../ntnic/nthw/flow_filter/flow_nthw_csu.c    |  146 +++
 .../ntnic/nthw/flow_filter/flow_nthw_csu.h    |   42 +
 .../ntnic/nthw/flow_filter/flow_nthw_flm.c    | 1140 +++++++++++++++++
 .../ntnic/nthw/flow_filter/flow_nthw_flm.h    |  422 ++++++
 .../ntnic/nthw/flow_filter/flow_nthw_hfu.c    |  293 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_hfu.h    |  100 ++
 .../ntnic/nthw/flow_filter/flow_nthw_hsh.c    |  254 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_hsh.h    |   81 ++
 .../ntnic/nthw/flow_filter/flow_nthw_hst.c    |  202 +++
 .../ntnic/nthw/flow_filter/flow_nthw_hst.h    |   72 ++
 .../ntnic/nthw/flow_filter/flow_nthw_ifr.c    |   93 ++
 .../ntnic/nthw/flow_filter/flow_nthw_ifr.h    |   39 +
 .../ntnic/nthw/flow_filter/flow_nthw_info.c   |  341 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_info.h   |  104 ++
 .../ntnic/nthw/flow_filter/flow_nthw_ioa.c    |  234 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_ioa.h    |   80 ++
 .../net/ntnic/nthw/flow_filter/flow_nthw_km.c |  685 ++++++++++
 .../net/ntnic/nthw/flow_filter/flow_nthw_km.h |  224 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_pdb.c    |  230 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_pdb.h    |   84 ++
 .../ntnic/nthw/flow_filter/flow_nthw_qsl.c    |  355 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_qsl.h    |  121 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rmc.c    |  112 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rmc.h    |   40 +
 .../ntnic/nthw/flow_filter/flow_nthw_roa.c    |  294 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_roa.h    |  109 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c |  132 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h |   53 +
 .../ntnic/nthw/flow_filter/flow_nthw_slc.c    |  109 ++
 .../ntnic/nthw/flow_filter/flow_nthw_slc.h    |   46 +
 .../ntnic/nthw/flow_filter/flow_nthw_slc_lr.c |  109 ++
 .../ntnic/nthw/flow_filter/flow_nthw_slc_lr.h |   46 +
 .../ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c |  394 ++++++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h |   72 ++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_ins.c |   96 ++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_ins.h |   42 +
 .../ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c |  165 +++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h |   70 +
 41 files changed, 8731 insertions(+)
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h
drivers/net/ntnic/meson.build +21 -0
index ae43254f9f..085bcf768e 100644
@@ -12,6 +12,7 @@ includes = [
     include_directories('nthw'),
     include_directories('nthw/core'),
     include_directories('nthw/supported'),
+    include_directories('nthw/flow_filter'),
     include_directories('sensors'),
     include_directories('sensors/avr_sensors'),
     include_directories('sensors/board_sensors'),
@@ -53,6 +54,26 @@ sources = files(
     'nthw/core/nthw_spim.c',
     'nthw/core/nthw_spis.c',
     'nthw/core/nthw_tsm.c',
+    'nthw/flow_filter/flow_nthw_cat.c',
+    'nthw/flow_filter/flow_nthw_csu.c',
+    'nthw/flow_filter/flow_nthw_flm.c',
+    'nthw/flow_filter/flow_nthw_hfu.c',
+    'nthw/flow_filter/flow_nthw_hsh.c',
+    'nthw/flow_filter/flow_nthw_hst.c',
+    'nthw/flow_filter/flow_nthw_ifr.c',
+    'nthw/flow_filter/flow_nthw_info.c',
+    'nthw/flow_filter/flow_nthw_ioa.c',
+    'nthw/flow_filter/flow_nthw_km.c',
+    'nthw/flow_filter/flow_nthw_pdb.c',
+    'nthw/flow_filter/flow_nthw_qsl.c',
+    'nthw/flow_filter/flow_nthw_rmc.c',
+    'nthw/flow_filter/flow_nthw_roa.c',
+    'nthw/flow_filter/flow_nthw_rpp_lr.c',
+    'nthw/flow_filter/flow_nthw_slc.c',
+    'nthw/flow_filter/flow_nthw_slc_lr.c',
+    'nthw/flow_filter/flow_nthw_tx_cpy.c',
+    'nthw/flow_filter/flow_nthw_tx_ins.c',
+    'nthw/flow_filter/flow_nthw_tx_rpl.c',
     'nthw/nthw_fpga_model.c',
     'nthw/nthw_dbs.c',
     'nthw/nthw_epp.c',
drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c new file +1107 -0

1,107 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.h new file +372 -0

372 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c new file +146 -0

146 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.h new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.c new file +1140 -0

1,140 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.h new file +422 -0

160 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.c new file +293 -0

293 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.h new file +100 -0

100 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c new file +254 -0

254 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h new file +81 -0

81 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.c new file +202 -0

202 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.h new file +72 -0

72 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c new file +93 -0

93 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h new file +39 -0
new file mode 100644
index 0000000000..626ca3d193

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.c new file +341 -0

341 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.h new file +104 -0

104 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.c new file +234 -0

234 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.h new file +80 -0

80 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.c new file +685 -0

685 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.h new file +224 -0

224 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.c new file +230 -0

230 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.h new file +84 -0

84 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.c new file +355 -0

355 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.h new file +121 -0

121 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.c new file +112 -0

112 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.h new file +40 -0
new file mode 100644
index 0000000000..57d5776002

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.c new file +294 -0

294 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.h new file +109 -0

109 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c new file +132 -0

132 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h new file +53 -0

53 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.c new file +109 -0

109 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.h new file +46 -0

46 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.c new file +109 -0

109 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.h new file +46 -0

46 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c new file +394 -0

394 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h new file +72 -0

72 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.c new file +96 -0

96 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.h new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c new file +165 -0

165 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h new file +70 -0

70 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#25 lore raw

PATCH v4 5/8 net/ntnic: adds FPGA abstraction layer

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The FPGA abstraction layer limits the need to rewrite flow logic when new FPGA modules are created.

---
v2:
* Fixed compilation with Fedora 38
* Fixed WARNING:TYPO_SPELLING

---
 drivers/net/ntnic/meson.build                 |   21 +
 .../ntnic/nthw/flow_api/flow_api_actions.c    |  205 ++
 .../ntnic/nthw/flow_api/flow_api_actions.h    |  284 +++
 .../ntnic/nthw/flow_api/flow_api_backend.c    |  182 ++
 .../ntnic/nthw/flow_api/flow_api_backend.h    | 1818 +++++++++++++++++
 .../net/ntnic/nthw/flow_api/flow_api_engine.h |  475 +++++
 .../ntnic/nthw/flow_api/flow_api_nic_setup.h  |   32 +
 .../nthw/flow_api/flow_engine/flow_group.c    |  125 ++
 .../nthw/flow_api/flow_engine/flow_hasher.c   |  213 ++
 .../nthw/flow_api/flow_engine/flow_hasher.h   |   20 +
 .../nthw/flow_api/flow_engine/flow_kcc.c      |  434 ++++
 .../ntnic/nthw/flow_api/flow_engine/flow_km.c | 1434 +++++++++++++
 .../nthw/flow_api/flow_engine/flow_tunnel.c   |  787 +++++++
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c   | 1789 ++++++++++++++++
 .../nthw/flow_api/hw_mod/hw_mod_cat_v18.h     |  138 ++
 .../nthw/flow_api/hw_mod/hw_mod_cat_v21.h     |   88 +
 .../nthw/flow_api/hw_mod/hw_mod_cat_v22.h     |   83 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c   | 1099 ++++++++++
 .../nthw/flow_api/hw_mod/hw_mod_flm_v17.h     |  274 +++
 .../nthw/flow_api/hw_mod/hw_mod_flm_v20.h     |  102 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c   |  195 ++
 .../nthw/flow_api/hw_mod/hw_mod_hsh_v5.h      |   36 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c   |  178 ++
 .../nthw/flow_api/hw_mod/hw_mod_hst_v2.h      |   32 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c   |  271 +++
 .../nthw/flow_api/hw_mod/hw_mod_ioa_v4.h      |   36 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_km.c    |  629 ++++++
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h |   93 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c   |  219 ++
 .../nthw/flow_api/hw_mod/hw_mod_pdb_v9.h      |   39 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c   |  348 ++++
 .../nthw/flow_api/hw_mod/hw_mod_qsl_v7.h      |   45 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c   |  112 +
 .../nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h    |   20 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c   |  358 ++++
 .../nthw/flow_api/hw_mod/hw_mod_roa_v6.h      |   49 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c   |  132 ++
 .../nthw/flow_api/hw_mod/hw_mod_slc_lr.c      |  132 ++
 .../nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h   |   19 +
 .../nthw/flow_api/hw_mod/hw_mod_slc_v1.h      |   19 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c   |  983 +++++++++
 .../nthw/flow_api/hw_mod/hw_mod_tpe_v1.h      |  103 +
 .../nthw/flow_api/hw_mod/hw_mod_tpe_v2.h      |   37 +
 .../nthw/flow_api/stream_binary_flow_api.h    |  697 +++++++
 44 files changed, 14385 insertions(+)
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_actions.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_actions.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_backend.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_backend.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_engine.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_nic_setup.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_group.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_kcc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_km.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_tunnel.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v18.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v21.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v22.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v17.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v20.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh_v5.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst_v2.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa_v4.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb_v9.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl_v7.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa_v6.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_v1.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v1.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v2.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/stream_binary_flow_api.h
drivers/net/ntnic/meson.build +21 -0
index 085bcf768e..bdfaf75190 100644
@@ -12,6 +12,7 @@ includes = [
     include_directories('nthw'),
     include_directories('nthw/core'),
     include_directories('nthw/supported'),
+    include_directories('nthw/flow_api'),
     include_directories('nthw/flow_filter'),
     include_directories('sensors'),
     include_directories('sensors/avr_sensors'),
@@ -54,6 +55,26 @@ sources = files(
     'nthw/core/nthw_spim.c',
     'nthw/core/nthw_spis.c',
     'nthw/core/nthw_tsm.c',
+    'nthw/flow_api/flow_api_actions.c',
+    'nthw/flow_api/flow_api_backend.c',
+    'nthw/flow_api/flow_engine/flow_group.c',
+    'nthw/flow_api/flow_engine/flow_hasher.c',
+    'nthw/flow_api/flow_engine/flow_kcc.c',
+    'nthw/flow_api/flow_engine/flow_km.c',
+    'nthw/flow_api/flow_engine/flow_tunnel.c',
+    'nthw/flow_api/hw_mod/hw_mod_cat.c',
+    'nthw/flow_api/hw_mod/hw_mod_flm.c',
+    'nthw/flow_api/hw_mod/hw_mod_hsh.c',
+    'nthw/flow_api/hw_mod/hw_mod_hst.c',
+    'nthw/flow_api/hw_mod/hw_mod_ioa.c',
+    'nthw/flow_api/hw_mod/hw_mod_km.c',
+    'nthw/flow_api/hw_mod/hw_mod_pdb.c',
+    'nthw/flow_api/hw_mod/hw_mod_qsl.c',
+    'nthw/flow_api/hw_mod/hw_mod_rmc.c',
+    'nthw/flow_api/hw_mod/hw_mod_roa.c',
+    'nthw/flow_api/hw_mod/hw_mod_slc.c',
+    'nthw/flow_api/hw_mod/hw_mod_slc_lr.c',
+    'nthw/flow_api/hw_mod/hw_mod_tpe.c',
     'nthw/flow_filter/flow_nthw_cat.c',
     'nthw/flow_filter/flow_nthw_csu.c',
     'nthw/flow_filter/flow_nthw_flm.c',
drivers/net/ntnic/nthw/flow_api/flow_api_actions.c new file +205 -0

205 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_actions.h new file +284 -0

284 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_backend.c new file +182 -0

182 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_backend.h new file +1818 -0

1,818 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_engine.h new file +475 -0

475 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_nic_setup.h new file +32 -0
new file mode 100644
index 0000000000..c4db0f4c5c
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_group.c new file +125 -0

125 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.c new file +213 -0

213 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.h new file +20 -0
new file mode 100644
index 0000000000..6365a396d2

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_kcc.c new file +434 -0

434 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_km.c new file +1434 -0

1,434 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_tunnel.c new file +787 -0

787 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c new file +1789 -0

1,789 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v18.h new file +138 -0

138 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v21.h new file +88 -0

88 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v22.h new file +83 -0

83 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c new file +1099 -0

1,099 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v17.h new file +274 -0

274 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v20.h new file +102 -0

102 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c new file +195 -0

195 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh_v5.h new file +36 -0
new file mode 100644
index 0000000000..8588750ff0

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c new file +178 -0

178 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst_v2.h new file +32 -0
new file mode 100644
index 0000000000..230c70b56d

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c new file +271 -0

271 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa_v4.h new file +36 -0
new file mode 100644
index 0000000000..309b53ff76

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c new file +629 -0

629 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h new file +93 -0

93 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c new file +219 -0

219 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb_v9.h new file +39 -0
new file mode 100644
index 0000000000..b14c10bc53

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c new file +348 -0

348 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl_v7.h new file +45 -0

45 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c new file +112 -0

112 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h new file +20 -0
new file mode 100644
index 0000000000..8f90695821

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c new file +358 -0

358 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa_v6.h new file +49 -0

49 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c new file +132 -0

132 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr.c new file +132 -0

132 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h new file +19 -0
new file mode 100644
index 0000000000..d03b206e6d

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_v1.h new file +19 -0
new file mode 100644
index 0000000000..01f60bfb18

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c new file +983 -0

983 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v1.h new file +103 -0

103 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v2.h new file +37 -0
new file mode 100644
index 0000000000..c56cad8d89

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/stream_binary_flow_api.h new file +697 -0

697 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#26 lore raw

PATCH v4 6/8 net/ntnic: adds flow logic

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

This logic layer takes rte_flow style patterns and actions as input, and programs the FPGA accordingly.

---
v2:
* Fixed WARNING:TYPO_SPELLING

---
 drivers/net/ntnic/adapter/nt4ga_adapter.c     |   13 +
 drivers/net/ntnic/adapter/nt4ga_stat.c        |   20 +-
 drivers/net/ntnic/meson.build                 |    4 +
 drivers/net/ntnic/nthw/flow_api/flow_api.c    | 1306 +++++
 drivers/net/ntnic/nthw/flow_api/flow_api.h    |  291 +
 .../nthw/flow_api/flow_api_profile_inline.c   | 5118 +++++++++++++++++
 .../nthw/flow_api/flow_api_profile_inline.h   |   56 +
 .../net/ntnic/nthw/flow_filter/flow_backend.c | 3205 +++++++++++
 .../net/ntnic/nthw/flow_filter/flow_backend.h |   15 +
 .../net/ntnic/nthw/flow_filter/flow_filter.c  |   39 +
 .../net/ntnic/nthw/flow_filter/flow_filter.h  |   16 +
 11 files changed, 10078 insertions(+), 5 deletions(-)
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_backend.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_backend.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_filter.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_filter.h
drivers/net/ntnic/adapter/nt4ga_adapter.c +13 -0
index 259aae2831..f9493202c3 100644
@@ -10,6 +10,8 @@
 #include "nt4ga_pci_ta_tg.h"
 #include "nt4ga_link_100g.h"
 
+#include "flow_filter.h"
+
 /* Sensors includes */
 #include "board_sensors.h"
 #include "avr_sensors.h"
@@ -306,6 +308,17 @@ int nt4ga_adapter_init(struct adapter_info_s *p_adapter_info)
 	n_nim_ports = fpga_info->n_nims;
 	assert(n_nim_ports >= 1);
 
+	/* Nt4ga Init Filter */
+	nt4ga_filter_t *p_filter = &p_adapter_info->nt4ga_filter;
+
+	res = flow_filter_init(p_fpga, &p_filter->mp_flow_device,
+			     p_adapter_info->adapter_no);
+	if (res != 0) {
+		NT_LOG(ERR, ETHDEV, "%s: Cannot initialize filter\n",
+		       p_adapter_id_str);
+		return res;
+	}
+
 	/*
 	 * HIF/PCI TA/TG
 	 */
drivers/net/ntnic/adapter/nt4ga_stat.c +15 -5
index b61c73ea12..2c822c6b97 100644
@@ -7,6 +7,7 @@
 #include "nthw_drv.h"
 #include "nthw_fpga.h"
 #include "nt4ga_adapter.h"
+#include "flow_filter.h"
 
 #define NO_FLAGS 0
 
@@ -16,12 +17,13 @@ static inline uint64_t timestamp2ns(uint64_t ts)
 	return ((ts >> 32) * 1000000000) + (ts & 0xffffffff);
 }
 
-static int nt4ga_stat_collect_cap_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
+static int nt4ga_stat_collect_cap_v1_stats(struct adapter_info_s *p_adapter_info,
+				   nt4ga_stat_t *p_nt4ga_stat,
 				   uint32_t *p_stat_dma_virtual);
 static int nt4ga_stat_collect_virt_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
 				    uint32_t *p_stat_dma_virtual);
 
-int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info _unused,
+int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info,
 		      nt4ga_stat_t *p_nt4ga_stat)
 {
 	nthw_stat_t *p_nthw_stat = p_nt4ga_stat->mp_nthw_stat;
@@ -39,7 +41,7 @@ int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info _unused,
 	} else {
 		p_nt4ga_stat->last_timestamp =
 			timestamp2ns(*p_nthw_stat->mp_timestamp);
-		nt4ga_stat_collect_cap_v1_stats(p_nt4ga_stat,
+		nt4ga_stat_collect_cap_v1_stats(p_adapter_info, p_nt4ga_stat,
 					       p_nt4ga_stat->p_stat_dma_virtual);
 	}
 	return 0;
@@ -198,7 +200,9 @@ int nt4ga_stat_setup(struct adapter_info_s *p_adapter_info)
 			return -1;
 		}
 
-		p_nt4ga_stat->flm_stat_ver = 0;
+		struct flow_nic_dev *ndev =
+				p_adapter_info->nt4ga_filter.mp_flow_device;
+		p_nt4ga_stat->flm_stat_ver = ndev->be.flm.ver;
 
 		p_nt4ga_stat->mp_stat_structs_flm =
 			calloc(1, sizeof(struct flm_counters_v1));
@@ -394,10 +398,12 @@ static int nt4ga_stat_collect_virt_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
 }
 
 /* Called with stat mutex locked */
-static int nt4ga_stat_collect_cap_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
+static int nt4ga_stat_collect_cap_v1_stats(struct adapter_info_s *p_adapter_info,
+					   nt4ga_stat_t *p_nt4ga_stat,
 					   uint32_t *p_stat_dma_virtual)
 {
 	nthw_stat_t *p_nthw_stat = p_nt4ga_stat->mp_nthw_stat;
+	struct flow_nic_dev *ndev = p_adapter_info->nt4ga_filter.mp_flow_device;
 
 	const int n_rx_ports = p_nt4ga_stat->mn_rx_ports;
 	const int n_tx_ports = p_nt4ga_stat->mn_tx_ports;
@@ -701,5 +707,9 @@ static int nt4ga_stat_collect_cap_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
 		p_nt4ga_stat->a_port_tx_drops_total[p] += new_drop_events_sum;
 	}
 
+	/* _update and get FLM stats */
+	flow_get_flm_stats(ndev, (uint64_t *)p_nt4ga_stat->mp_stat_structs_flm,
+			   sizeof(struct flm_counters_v1) / sizeof(uint64_t));
+
 	return 0;
 }
drivers/net/ntnic/meson.build +4 -0
index bdfaf75190..fde385d929 100644
@@ -55,8 +55,10 @@ sources = files(
     'nthw/core/nthw_spim.c',
     'nthw/core/nthw_spis.c',
     'nthw/core/nthw_tsm.c',
+    'nthw/flow_api/flow_api.c',
     'nthw/flow_api/flow_api_actions.c',
     'nthw/flow_api/flow_api_backend.c',
+    'nthw/flow_api/flow_api_profile_inline.c',
     'nthw/flow_api/flow_engine/flow_group.c',
     'nthw/flow_api/flow_engine/flow_hasher.c',
     'nthw/flow_api/flow_engine/flow_kcc.c',
@@ -75,6 +77,8 @@ sources = files(
     'nthw/flow_api/hw_mod/hw_mod_slc.c',
     'nthw/flow_api/hw_mod/hw_mod_slc_lr.c',
     'nthw/flow_api/hw_mod/hw_mod_tpe.c',
+    'nthw/flow_filter/flow_backend.c',
+    'nthw/flow_filter/flow_filter.c',
     'nthw/flow_filter/flow_nthw_cat.c',
     'nthw/flow_filter/flow_nthw_csu.c',
     'nthw/flow_filter/flow_nthw_flm.c',
drivers/net/ntnic/nthw/flow_api/flow_api.c new file +1306 -0

1,306 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api.h new file +291 -0

291 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.c new file +5118 -0

1,298 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.h new file +56 -0

56 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_backend.c new file +3205 -0

3,205 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_backend.h new file +15 -0
new file mode 100644
index 0000000000..17fdcada3f

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_filter.c new file +39 -0
new file mode 100644
index 0000000000..90aeb71bd7

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_filter.h new file +16 -0
new file mode 100644
index 0000000000..8ea21a614a

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#27 lore raw

PATCH v4 7/8 net/ntnic: adds ethdev and makes PMD available

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

Hooks into the DPDK API, and make the PMD available to use. Also adds documentation as .rst and .ini files.

---
v2:
* Fixed WARNING:TYPO_SPELLING
* Fix supported platform list
v3:
* Fix Fedora 38 compilation issues

---
 .mailmap                                      |    2 +
 MAINTAINERS                                   |    7 +
 doc/guides/nics/features/ntnic.ini            |   50 +
 doc/guides/nics/ntnic.rst                     |  235 +
 drivers/net/ntnic/include/ntdrv_4ga.h         |   23 +
 drivers/net/ntnic/include/ntos_system.h       |   23 +
 drivers/net/ntnic/meson.build                 |   13 +
 drivers/net/ntnic/ntnic_dbsconfig.c           | 1670 +++++++
 drivers/net/ntnic/ntnic_dbsconfig.h           |  251 +
 drivers/net/ntnic/ntnic_ethdev.c              | 4256 +++++++++++++++++
 drivers/net/ntnic/ntnic_ethdev.h              |  357 ++
 .../net/ntnic/ntnic_filter/create_elements.h  | 1190 +++++
 drivers/net/ntnic/ntnic_filter/ntnic_filter.c |  656 +++
 drivers/net/ntnic/ntnic_filter/ntnic_filter.h |   14 +
 drivers/net/ntnic/ntnic_hshconfig.c           |  102 +
 drivers/net/ntnic/ntnic_hshconfig.h           |    9 +
 drivers/net/ntnic/ntnic_meter.c               |  811 ++++
 drivers/net/ntnic/ntnic_meter.h               |   10 +
 drivers/net/ntnic/ntnic_vdpa.c                |  365 ++
 drivers/net/ntnic/ntnic_vdpa.h                |   21 +
 drivers/net/ntnic/ntnic_vf.c                  |   83 +
 drivers/net/ntnic/ntnic_vf.h                  |   17 +
 drivers/net/ntnic/ntnic_vf_vdpa.c             | 1246 +++++
 drivers/net/ntnic/ntnic_vf_vdpa.h             |   25 +
 drivers/net/ntnic/ntnic_vfio.c                |  321 ++
 drivers/net/ntnic/ntnic_vfio.h                |   31 +
 drivers/net/ntnic/ntnic_xstats.c              |  703 +++
 drivers/net/ntnic/ntnic_xstats.h              |   22 +
 28 files changed, 12513 insertions(+)
 create mode 100644 doc/guides/nics/features/ntnic.ini
 create mode 100644 doc/guides/nics/ntnic.rst
 create mode 100644 drivers/net/ntnic/include/ntdrv_4ga.h
 create mode 100644 drivers/net/ntnic/include/ntos_system.h
 create mode 100644 drivers/net/ntnic/ntnic_dbsconfig.c
 create mode 100644 drivers/net/ntnic/ntnic_dbsconfig.h
 create mode 100644 drivers/net/ntnic/ntnic_ethdev.c
 create mode 100644 drivers/net/ntnic/ntnic_ethdev.h
 create mode 100644 drivers/net/ntnic/ntnic_filter/create_elements.h
 create mode 100644 drivers/net/ntnic/ntnic_filter/ntnic_filter.c
 create mode 100644 drivers/net/ntnic/ntnic_filter/ntnic_filter.h
 create mode 100644 drivers/net/ntnic/ntnic_hshconfig.c
 create mode 100644 drivers/net/ntnic/ntnic_hshconfig.h
 create mode 100644 drivers/net/ntnic/ntnic_meter.c
 create mode 100644 drivers/net/ntnic/ntnic_meter.h
 create mode 100644 drivers/net/ntnic/ntnic_vdpa.c
 create mode 100644 drivers/net/ntnic/ntnic_vdpa.h
 create mode 100644 drivers/net/ntnic/ntnic_vf.c
 create mode 100644 drivers/net/ntnic/ntnic_vf.h
 create mode 100644 drivers/net/ntnic/ntnic_vf_vdpa.c
 create mode 100644 drivers/net/ntnic/ntnic_vf_vdpa.h
 create mode 100644 drivers/net/ntnic/ntnic_vfio.c
 create mode 100644 drivers/net/ntnic/ntnic_vfio.h
 create mode 100644 drivers/net/ntnic/ntnic_xstats.c
 create mode 100644 drivers/net/ntnic/ntnic_xstats.h
.mailmap +2 -0
index 864d33ee46..be8880971d 100644
@@ -227,6 +227,7 @@ Chintu Hetam <[email protected]>
 Choonho Son <[email protected]>
 Chris Metcalf <[email protected]>
 Christian Ehrhardt <[email protected]>
+Christian Koue Muf <[email protected]>
 Christian Maciocco <[email protected]>
 Christophe Fontaine <[email protected]>
 Christophe Grosse <[email protected]>
@@ -967,6 +968,7 @@ Mukesh Dua <[email protected]>
 Murphy Yang <[email protected]>
 Murthy NSSR <[email protected]>
 Muthurajan Jayakumar <[email protected]>
+Mykola Kostenok <[email protected]>
 Nachiketa Prachanda <[email protected]> <[email protected]>
 Nagadheeraj Rottela <[email protected]>
 Naga Harish K S V <[email protected]>
MAINTAINERS +7 -0
index 8c3f2c993f..02aca74173 100644
@@ -1053,6 +1053,13 @@ F: drivers/net/memif/
 F: doc/guides/nics/memif.rst
 F: doc/guides/nics/features/memif.ini
 
+NTNIC PMD
+M: Mykola Kostenok <[email protected]>
+M: Christiam Muf <[email protected]>
+F: drivers/net/ntnic/
+F: doc/guides/nics/ntnic.rst
+F: doc/guides/nics/features/ntnic.ini
+
 
 Crypto Drivers
 --------------
doc/guides/nics/features/ntnic.ini new file +50 -0

50 lines not on this page · raw message

doc/guides/nics/ntnic.rst new file +235 -0

235 lines not on this page · raw message

drivers/net/ntnic/include/ntdrv_4ga.h new file +23 -0
new file mode 100644
index 0000000000..e9c38fc330
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTDRV_4GA_H__
+#define __NTDRV_4GA_H__
+
+#include "nthw_drv.h"
+#include "nt4ga_adapter.h"
+#include "nthw_platform_drv.h"
+
+typedef struct ntdrv_4ga_s {
+	uint32_t pciident;
+	struct adapter_info_s adapter_info;
+	char *p_drv_name;
+
+	volatile bool b_shutdown;
+	pthread_mutex_t stat_lck;
+	pthread_t stat_thread;
+	pthread_t flm_thread;
+} ntdrv_4ga_t;
+
+#endif /* __NTDRV_4GA_H__ */
drivers/net/ntnic/include/ntos_system.h new file +23 -0
new file mode 100644
index 0000000000..0adfe86cc3
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTOS_SYSTEM_H__
+#define __NTOS_SYSTEM_H__
+
+#include "include/ntdrv_4ga.h"
+
+/*
+ * struct drv_s for DPDK (clone of kernel struct)
+ * keep it as close as possible to original kernel struct
+ */
+struct drv_s {
+	int adapter_no;
+	struct rte_pci_device *p_dev;
+	struct ntdrv_4ga_s ntdrv;
+
+	int n_eth_dev_init_count;
+	int probe_finished;
+};
+
+#endif /* __NTOS_SYSTEM_H__ */
drivers/net/ntnic/meson.build +13 -0
index fde385d929..40ab25899e 100644
@@ -21,6 +21,9 @@ includes = [
     include_directories('sensors/ntavr'),
 ]
 
+# deps
+deps += 'vhost'
+
 # all sources
 sources = files(
     'adapter/nt4ga_adapter.c',
@@ -107,6 +110,16 @@ sources = files(
     'nthw/nthw_stat.c',
     'nthw/supported/nthw_fpga_9563_055_024_0000.c',
     'ntlog/ntlog.c',
+    'ntnic_dbsconfig.c',
+    'ntnic_ethdev.c',
+    'ntnic_filter/ntnic_filter.c',
+    'ntnic_hshconfig.c',
+    'ntnic_meter.c',
+    'ntnic_vdpa.c',
+    'ntnic_vf.c',
+    'ntnic_vfio.c',
+    'ntnic_vf_vdpa.c',
+    'ntnic_xstats.c',
     'ntutil/nt_util.c',
     'sensors/avr_sensors/avr_sensors.c',
     'sensors/board_sensors/board_sensors.c',
drivers/net/ntnic/ntnic_dbsconfig.c new file +1670 -0

1,670 lines not on this page · raw message

drivers/net/ntnic/ntnic_dbsconfig.h new file +251 -0

251 lines not on this page · raw message

drivers/net/ntnic/ntnic_ethdev.c new file +4256 -0

696 lines not on this page · raw message

drivers/net/ntnic/ntnic_ethdev.h new file +357 -0

357 lines not on this page · raw message

drivers/net/ntnic/ntnic_filter/create_elements.h new file +1190 -0

1,190 lines not on this page · raw message

drivers/net/ntnic/ntnic_filter/ntnic_filter.c new file +656 -0

656 lines not on this page · raw message

drivers/net/ntnic/ntnic_filter/ntnic_filter.h new file +14 -0
new file mode 100644
index 0000000000..cf4207e5de

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_hshconfig.c new file +102 -0

102 lines not on this page · raw message

drivers/net/ntnic/ntnic_hshconfig.h new file +9 -0
new file mode 100644
index 0000000000..d4d7337d23

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_meter.c new file +811 -0

811 lines not on this page · raw message

drivers/net/ntnic/ntnic_meter.h new file +10 -0
new file mode 100644
index 0000000000..9484c9ee20

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_vdpa.c new file +365 -0

365 lines not on this page · raw message

drivers/net/ntnic/ntnic_vdpa.h new file +21 -0
new file mode 100644
index 0000000000..7acc2c8e4b

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_vf.c new file +83 -0

83 lines not on this page · raw message

drivers/net/ntnic/ntnic_vf.h new file +17 -0
new file mode 100644
index 0000000000..84be3bd71f

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_vf_vdpa.c new file +1246 -0

1,246 lines not on this page · raw message

drivers/net/ntnic/ntnic_vf_vdpa.h new file +25 -0
new file mode 100644
index 0000000000..561e3bf7cf

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_vfio.c new file +321 -0

321 lines not on this page · raw message

drivers/net/ntnic/ntnic_vfio.h new file +31 -0
new file mode 100644
index 0000000000..5d8a63d364

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_xstats.c new file +703 -0

703 lines not on this page · raw message

drivers/net/ntnic/ntnic_xstats.h new file +22 -0
new file mode 100644
index 0000000000..0a82a1a677

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#28 lore raw

PATCH v4 8/8 net/ntnic: adds socket connection to PMD

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The socket connection is used by Napatech's tools for monitoring and rte_flow programming from other processes.

---
v2:
* Fixed WARNING:TYPO_SPELLING
v4:
* Fixed Alpine build

---
 drivers/net/ntnic/meson.build                 |   24 +
 .../ntconnect/include/ntconn_mod_helper.h     |   97 ++
 .../net/ntnic/ntconnect/include/ntconnect.h   |   96 ++
 .../ntnic/ntconnect/include/ntconnect_api.h   |   87 ++
 .../ntconnect/include/ntconnect_api_adapter.h |  221 +++
 .../ntconnect/include/ntconnect_api_flow.h    |  168 +++
 .../ntconnect/include/ntconnect_api_meter.h   |   89 ++
 .../include/ntconnect_api_statistic.h         |  173 +++
 .../ntconnect/include/ntconnect_api_test.h    |   18 +
 drivers/net/ntnic/ntconnect/ntconn_server.c   |   97 ++
 drivers/net/ntnic/ntconnect/ntconnect.c       |  641 ++++++++
 .../ntnic/ntconnect_modules/ntconn_adapter.c  |  775 ++++++++++
 .../net/ntnic/ntconnect_modules/ntconn_flow.c | 1310 +++++++++++++++++
 .../ntnic/ntconnect_modules/ntconn_meter.c    |  517 +++++++
 .../ntnic/ntconnect_modules/ntconn_modules.h  |   19 +
 .../net/ntnic/ntconnect_modules/ntconn_stat.c |  876 +++++++++++
 .../net/ntnic/ntconnect_modules/ntconn_test.c |  146 ++
 17 files changed, 5354 insertions(+)
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconn_mod_helper.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_adapter.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_flow.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_meter.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_statistic.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_test.h
 create mode 100644 drivers/net/ntnic/ntconnect/ntconn_server.c
 create mode 100644 drivers/net/ntnic/ntconnect/ntconnect.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_adapter.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_flow.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_meter.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_modules.h
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_stat.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_test.c
drivers/net/ntnic/meson.build +24 -0
index 40ab25899e..b09bb91914 100644
@@ -1,6 +1,22 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020-2023 Napatech A/S
 
+# config object
+ntnic_conf = configuration_data()
+
+# transfer options into config object
+ntnic_conf.set('NT_TOOLS', true)
+
+# check option 'debug' (boolean flag derived from meson buildtype)
+if get_option('debug')
+    cflags += '-DDEBUG'
+endif
+
+# check nt_tools build option
+if ntnic_conf.get('NT_TOOLS')
+    cflags += '-DNT_TOOLS'
+endif
+
 # includes
 includes = [
     include_directories('.'),
@@ -14,6 +30,7 @@ includes = [
     include_directories('nthw/supported'),
     include_directories('nthw/flow_api'),
     include_directories('nthw/flow_filter'),
+    include_directories('ntconnect/include'),
     include_directories('sensors'),
     include_directories('sensors/avr_sensors'),
     include_directories('sensors/board_sensors'),
@@ -35,6 +52,13 @@ sources = files(
     'nim/nt_link_speed.c',
     'nim/qsfp_sensors.c',
     'nim/sfp_sensors.c',
+    'ntconnect/ntconn_server.c',
+    'ntconnect/ntconnect.c',
+    'ntconnect_modules/ntconn_adapter.c',
+    'ntconnect_modules/ntconn_flow.c',
+    'ntconnect_modules/ntconn_meter.c',
+    'ntconnect_modules/ntconn_stat.c',
+    'ntconnect_modules/ntconn_test.c',
     'nthw/core/nthw_clock_profiles.c',
     'nthw/core/nthw_fpga.c',
     'nthw/core/nthw_fpga_nt200a0x.c',
drivers/net/ntnic/ntconnect/include/ntconn_mod_helper.h new file +97 -0

97 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect.h new file +96 -0

96 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api.h new file +87 -0

87 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_adapter.h new file +221 -0

221 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_flow.h new file +168 -0

168 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_meter.h new file +89 -0

89 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_statistic.h new file +173 -0

173 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_test.h new file +18 -0
new file mode 100644
index 0000000000..44cacbd931
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef _NTCONNECT_TEST_FILTER_H_
+#define _NTCONNECT_TEST_FILTER_H_
+
+/*
+ * Create structures allocating the space to carry through ntconnect interface
+ */
+
+struct test_s {
+	int number;
+	int status;
+	uint64_t test[];
+};
+
+#endif /* _NTCONNECT_TEST_FILTER_H_ */
drivers/net/ntnic/ntconnect/ntconn_server.c new file +97 -0

97 lines not on this page · raw message

drivers/net/ntnic/ntconnect/ntconnect.c new file +641 -0

641 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_adapter.c new file +775 -0

775 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_flow.c new file +1310 -0

496 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_meter.c new file +517 -0

517 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_modules.h new file +19 -0
new file mode 100644
index 0000000000..ea379015fe

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntconnect_modules/ntconn_stat.c new file +876 -0

876 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_test.c new file +146 -0

146 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#29 lore raw

PATCH v5 1/8 net/ntnic: initial commit which adds register defines

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.

---
v3:
* Fixed not needed cflags as suggested in comments. v5:
* Disable build for unsupported platforms.

---
 drivers/net/meson.build                       |    1 +
 drivers/net/ntnic/include/fpga_model.h        |   99 +
 drivers/net/ntnic/meson.build                 |   30 +
 drivers/net/ntnic/nthw/nthw_register.h        |   19 +
 .../supported/nthw_fpga_9563_055_024_0000.c   | 4190 ++++++++++
 .../nthw/supported/nthw_fpga_instances.h      |   14 +
 .../nthw/supported/nthw_fpga_modules_defs.h   |  166 +
 .../supported/nthw_fpga_parameters_defs.h     |  209 +
 .../nthw/supported/nthw_fpga_registers_defs.h | 7277 +++++++++++++++++
 9 files changed, 12005 insertions(+)
 create mode 100644 drivers/net/ntnic/include/fpga_model.h
 create mode 100644 drivers/net/ntnic/meson.build
 create mode 100644 drivers/net/ntnic/nthw/nthw_register.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_024_0000.c
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_instances.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_modules_defs.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_parameters_defs.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_registers_defs.h
drivers/net/meson.build +1 -0
index bd38b533c5..fb6d34b782 100644
@@ -45,6 +45,7 @@ drivers = [
         'nfb',
         'nfp',
         'ngbe',
+        'ntnic',
         'null',
         'octeontx',
         'octeon_ep',
drivers/net/ntnic/include/fpga_model.h new file +99 -0

99 lines not on this page · raw message

drivers/net/ntnic/meson.build new file +30 -0
new file mode 100644
index 0000000000..f83c868a57
@@ -0,0 +1,30 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2020-2023 Napatech A/S
+
+if not is_linux or not dpdk_conf.has('RTE_ARCH_X86_64') or not dpdk_conf.has('RTE_ARCH_64')
+    build = false
+    reason = 'only supported on x86_64 and aarch64 linux'
+    subdir_done()
+endif
+
+# includes
+includes = [
+    include_directories('.'),
+    include_directories('include'),
+    include_directories('nthw'),
+    include_directories('nthw/supported'),
+]
+
+# all sources
+sources = files(
+    'nthw/supported/nthw_fpga_9563_055_024_0000.c',
+)
+
+if is_variable('default_cflags')
+      cflags += default_cflags
+else
+      cflags += machine_args
+      cflags += ['-DALLOW_INTERNAL_API']
+endif
+
+# END
drivers/net/ntnic/nthw/nthw_register.h new file +19 -0
new file mode 100644
index 0000000000..5cdbd9fc5d
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef NTHW_REGISTER_H_
+#define NTHW_REGISTER_H_
+
+#include <unistd.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <inttypes.h>
+
+#include "fpga_model.h"
+
+#include "nthw_fpga_modules_defs.h"
+#include "nthw_fpga_parameters_defs.h"
+#include "nthw_fpga_registers_defs.h"
+
+#endif /* NTHW_REGISTER_H_ */
drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_024_0000.c new file +4190 -0

2,845 lines not on this page · raw message

drivers/net/ntnic/nthw/supported/nthw_fpga_instances.h new file +14 -0
new file mode 100644
index 0000000000..1d707d6925

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/supported/nthw_fpga_modules_defs.h new file +166 -0

166 lines not on this page · raw message

drivers/net/ntnic/nthw/supported/nthw_fpga_parameters_defs.h new file +209 -0

209 lines not on this page · raw message

drivers/net/ntnic/nthw/supported/nthw_fpga_registers_defs.h new file +7277 -0

7,277 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#30 lore raw

PATCH v5 2/8 net/ntnic: adds core registers and fpga functionality

From: Christian Koue Muf <[email protected]>

Includes functionality to reset, initialize, program, and collect stats for the NTNIC FPGA.

---
v2:
* Fixed WARNING:TYPO_SPELLING
* Fix compilation for Fedora38
v3:
* Fixed WARNING:TYPO_SPELLING
* Fix compilation for Fedora38

---
 drivers/net/ntnic/include/nthw_bus.h          |   10 +
 drivers/net/ntnic/meson.build                 |   32 +
 .../net/ntnic/nthw/core/nthw_clock_profiles.c |    9 +
 .../net/ntnic/nthw/core/nthw_clock_profiles.h |   39 +
 drivers/net/ntnic/nthw/core/nthw_core.h       |   31 +
 drivers/net/ntnic/nthw/core/nthw_fpga.c       |  914 +++++++++
 drivers/net/ntnic/nthw/core/nthw_fpga.h       |   47 +
 .../net/ntnic/nthw/core/nthw_fpga_nt200a0x.c  |   46 +
 .../net/ntnic/nthw/core/nthw_fpga_nt200a0x.h  |   14 +
 drivers/net/ntnic/nthw/core/nthw_fpga_rst.c   |   10 +
 drivers/net/ntnic/nthw/core/nthw_fpga_rst.h   |   17 +
 .../net/ntnic/nthw/core/nthw_fpga_rst9563.c   |  241 +++
 .../ntnic/nthw/core/nthw_fpga_rst_nt200a0x.c  |  674 +++++++
 .../ntnic/nthw/core/nthw_fpga_rst_nt200a0x.h  |   89 +
 drivers/net/ntnic/nthw/core/nthw_gpio_phy.c   |  271 +++
 drivers/net/ntnic/nthw/core/nthw_gpio_phy.h   |   57 +
 drivers/net/ntnic/nthw/core/nthw_hif.c        |  342 ++++
 drivers/net/ntnic/nthw/core/nthw_hif.h        |  156 ++
 drivers/net/ntnic/nthw/core/nthw_iic.c        |  570 ++++++
 drivers/net/ntnic/nthw/core/nthw_iic.h        |  101 +
 drivers/net/ntnic/nthw/core/nthw_mac_pcs.c    | 1034 ++++++++++
 drivers/net/ntnic/nthw/core/nthw_mac_pcs.h    |  261 +++
 .../net/ntnic/nthw/core/nthw_mac_pcs_xxv.c    | 1631 ++++++++++++++++
 .../net/ntnic/nthw/core/nthw_mac_pcs_xxv.h    |  291 +++
 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.c  |  121 ++
 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.h  |   51 +
 drivers/net/ntnic/nthw/core/nthw_pci_ta.c     |   99 +
 drivers/net/ntnic/nthw/core/nthw_pci_ta.h     |   40 +
 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.c  |  127 ++
 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.h  |   55 +
 drivers/net/ntnic/nthw/core/nthw_pcie3.c      |  274 +++
 drivers/net/ntnic/nthw/core/nthw_pcie3.h      |  100 +
 drivers/net/ntnic/nthw/core/nthw_sdc.c        |  177 ++
 drivers/net/ntnic/nthw/core/nthw_sdc.h        |   43 +
 drivers/net/ntnic/nthw/core/nthw_si5340.c     |  206 ++
 drivers/net/ntnic/nthw/core/nthw_si5340.h     |   34 +
 drivers/net/ntnic/nthw/core/nthw_spi_v3.c     |  380 ++++
 drivers/net/ntnic/nthw/core/nthw_spi_v3.h     |  106 ++
 drivers/net/ntnic/nthw/core/nthw_spim.c       |  117 ++
 drivers/net/ntnic/nthw/core/nthw_spim.h       |   52 +
 drivers/net/ntnic/nthw/core/nthw_spis.c       |  147 ++
 drivers/net/ntnic/nthw/core/nthw_spis.h       |   63 +
 drivers/net/ntnic/nthw/core/nthw_tsm.c        |  179 ++
 drivers/net/ntnic/nthw/core/nthw_tsm.h        |   53 +
 drivers/net/ntnic/nthw/nthw_dbs.c             | 1301 +++++++++++++
 drivers/net/ntnic/nthw/nthw_dbs.h             |  313 +++
 drivers/net/ntnic/nthw/nthw_drv.h             |   82 +
 drivers/net/ntnic/nthw/nthw_epp.c             |  335 ++++
 drivers/net/ntnic/nthw/nthw_epp.h             |   99 +
 drivers/net/ntnic/nthw/nthw_fpga_model.c      | 1677 +++++++++++++++++
 drivers/net/ntnic/nthw/nthw_fpga_model.h      |  308 +++
 drivers/net/ntnic/nthw/nthw_helper.h          |   21 +
 drivers/net/ntnic/nthw/nthw_platform.c        |   35 +
 drivers/net/ntnic/nthw/nthw_platform_drv.h    |   42 +
 drivers/net/ntnic/nthw/nthw_profile.h         |   15 +
 drivers/net/ntnic/nthw/nthw_rac.c             |  976 ++++++++++
 drivers/net/ntnic/nthw/nthw_rac.h             |  161 ++
 drivers/net/ntnic/nthw/nthw_register.h        |    2 +
 drivers/net/ntnic/nthw/nthw_stat.c            |  266 +++
 drivers/net/ntnic/nthw/nthw_stat.h            |   72 +
 drivers/net/ntnic/ntlog/include/ntlog.h       |  162 ++
 drivers/net/ntnic/ntlog/ntlog.c               |  115 ++
 drivers/net/ntnic/ntutil/include/nt_util.h    |   71 +
 drivers/net/ntnic/ntutil/nt_util.c            |   77 +
 64 files changed, 15441 insertions(+)
 create mode 100644 drivers/net/ntnic/include/nthw_bus.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_clock_profiles.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_clock_profiles.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_core.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst9563.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gpio_phy.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gpio_phy.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_hif.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_hif.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_iic.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_iic.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_ta.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_ta.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pcie3.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pcie3.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_sdc.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_sdc.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_si5340.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_si5340.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spi_v3.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spi_v3.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spim.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spim.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spis.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spis.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_tsm.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_tsm.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_dbs.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_dbs.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_drv.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_epp.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_epp.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_fpga_model.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_fpga_model.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_helper.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_platform.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_platform_drv.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_profile.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_rac.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_rac.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_stat.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_stat.h
 create mode 100644 drivers/net/ntnic/ntlog/include/ntlog.h
 create mode 100644 drivers/net/ntnic/ntlog/ntlog.c
 create mode 100644 drivers/net/ntnic/ntutil/include/nt_util.h
 create mode 100644 drivers/net/ntnic/ntutil/nt_util.c
drivers/net/ntnic/include/nthw_bus.h new file +10 -0
new file mode 100644
index 0000000000..975cc95e78
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_BUS_H__
+#define __NTHW_BUS_H__
+
+typedef uint8_t rab_bus_id_t;
+
+#endif /* __NTHW_BUS_H__ */
drivers/net/ntnic/meson.build +32 -0
index f83c868a57..0a72e46174 100644
@@ -11,13 +11,45 @@ endif
 includes = [
     include_directories('.'),
     include_directories('include'),
+    include_directories('ntlog/include'),
+    include_directories('ntutil/include'),
     include_directories('nthw'),
+    include_directories('nthw/core'),
     include_directories('nthw/supported'),
 ]
 
 # all sources
 sources = files(
+    'nthw/core/nthw_clock_profiles.c',
+    'nthw/core/nthw_fpga.c',
+    'nthw/core/nthw_fpga_nt200a0x.c',
+    'nthw/core/nthw_fpga_rst.c',
+    'nthw/core/nthw_fpga_rst9563.c',
+    'nthw/core/nthw_fpga_rst_nt200a0x.c',
+    'nthw/core/nthw_gpio_phy.c',
+    'nthw/core/nthw_hif.c',
+    'nthw/core/nthw_iic.c',
+    'nthw/core/nthw_mac_pcs.c',
+    'nthw/core/nthw_mac_pcs_xxv.c',
+    'nthw/core/nthw_pci_rd_tg.c',
+    'nthw/core/nthw_pci_ta.c',
+    'nthw/core/nthw_pci_wr_tg.c',
+    'nthw/core/nthw_pcie3.c',
+    'nthw/core/nthw_sdc.c',
+    'nthw/core/nthw_si5340.c',
+    'nthw/core/nthw_spi_v3.c',
+    'nthw/core/nthw_spim.c',
+    'nthw/core/nthw_spis.c',
+    'nthw/core/nthw_tsm.c',
+    'nthw/nthw_fpga_model.c',
+    'nthw/nthw_dbs.c',
+    'nthw/nthw_epp.c',
+    'nthw/nthw_platform.c',
+    'nthw/nthw_rac.c',
+    'nthw/nthw_stat.c',
     'nthw/supported/nthw_fpga_9563_055_024_0000.c',
+    'ntlog/ntlog.c',
+    'ntutil/nt_util.c',
 )
 
 if is_variable('default_cflags')
drivers/net/ntnic/nthw/core/nthw_clock_profiles.c new file +9 -0
new file mode 100644
index 0000000000..efdcc222a8
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#include "nthw_clock_profiles.h"
+
+/* Clock profile for NT200A02 2x40G, 2x100G */
+const int n_data_si5340_nt200a02_u23_v5;
+const clk_profile_data_fmt2_t *p_data_si5340_nt200a02_u23_v5;
drivers/net/ntnic/nthw/core/nthw_clock_profiles.h new file +39 -0
new file mode 100644
index 0000000000..4252f69e92
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_CLOCK_PROFILES_H__
+#define __NTHW_CLOCK_PROFILES_H__
+
+#include <stdint.h>
+
+#include "nthw_helper.h"
+
+#define clk_profile_size_error_msg "size test failed"
+
+typedef struct {
+	unsigned char reg_addr;
+	unsigned char reg_val;
+	unsigned char reg_mask;
+} clk_profile_data_fmt0_t;
+
+typedef struct {
+	uint16_t reg_addr;
+	uint8_t reg_val;
+} clk_profile_data_fmt1_t;
+
+typedef struct {
+	unsigned int reg_addr;
+	unsigned char reg_val;
+} clk_profile_data_fmt2_t;
+
+typedef enum {
+	CLK_PROFILE_DATA_FMT_0,
+	CLK_PROFILE_DATA_FMT_1,
+	CLK_PROFILE_DATA_FMT_2
+} clk_profile_data_fmt_t;
+
+extern const int n_data_si5340_nt200a02_u23_v5;
+extern const  clk_profile_data_fmt2_t *p_data_si5340_nt200a02_u23_v5;
+
+#endif /* __NTHW_CLOCK_PROFILES_H__ */
drivers/net/ntnic/nthw/core/nthw_core.h new file +31 -0
new file mode 100644
index 0000000000..798a95d5cf
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_CORE_H__
+#define __NTHW_CORE_H__
+
+#include "nthw_helper.h"
+
+#include "nthw_platform_drv.h"
+#include "nthw_fpga_model.h"
+#include "nthw_hif.h"
+#include "nthw_pcie3.h"
+#include "nthw_pci_rd_tg.h"
+#include "nthw_pci_wr_tg.h"
+#include "nthw_pci_ta.h"
+#include "nthw_iic.h"
+
+#include "nthw_gpio_phy.h"
+#include "nthw_mac_pcs.h"
+#include "nthw_mac_pcs_xxv.h"
+#include "nthw_sdc.h"
+
+#include "nthw_spim.h"
+#include "nthw_spis.h"
+
+#include "nthw_tsm.h"
+
+#include "nthw_si5340.h"
+
+#endif /* __NTHW_CORE_H__ */
drivers/net/ntnic/nthw/core/nthw_fpga.c new file +914 -0

914 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga.h new file +47 -0

47 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.c new file +46 -0

46 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.h new file +14 -0
new file mode 100644
index 0000000000..ff324bee39
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_FPGA_NT200A0X_H__
+#define __NTHW_FPGA_NT200A0X_H__
+
+int nthw_fpga_nt200a0x_init(struct fpga_info_s *p_fpga_info);
+
+/* NT200A02: 9563 */
+int nthw_fpga_rst9563_init(struct fpga_info_s *p_fpga_info,
+			  struct nthw_fpga_rst_nt200a0x *const p);
+
+#endif /* __NTHW_FPGA_NT200A0X_H__ */
drivers/net/ntnic/nthw/core/nthw_fpga_rst.c new file +10 -0
new file mode 100644
index 0000000000..66c148bab2
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#include "ntlog.h"
+
+#include "nthw_fpga.h"
+#include "nthw_fpga_nt200a0x.h"
+
+#include "nthw_fpga_rst.h"
drivers/net/ntnic/nthw/core/nthw_fpga_rst.h new file +17 -0
new file mode 100644
index 0000000000..2099c4b677
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_FPGA_RST_H__
+#define __NTHW_FPGA_RST_H__
+
+#include "nthw_drv.h"
+
+#include "nthw_fpga_model.h"
+
+#include "nthw_rac.h"
+#include "nthw_iic.h"
+
+#include "nthw_fpga_rst_nt200a0x.h"
+
+#endif /* __NTHW_FPGA_RST_H__ */
drivers/net/ntnic/nthw/core/nthw_fpga_rst9563.c new file +241 -0

241 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.c new file +674 -0

674 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.h new file +89 -0

89 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_gpio_phy.c new file +271 -0

271 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_gpio_phy.h new file +57 -0

57 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_hif.c new file +342 -0

342 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_hif.h new file +156 -0

144 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_iic.c new file +570 -0

570 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_iic.h new file +101 -0

101 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs.c new file +1034 -0

1,034 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs.h new file +261 -0

261 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.c new file +1631 -0

1,631 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.h new file +291 -0

291 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.c new file +121 -0

121 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.h new file +51 -0

51 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_ta.c new file +99 -0

99 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_ta.h new file +40 -0
new file mode 100644
index 0000000000..7968cad9fa

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.c new file +127 -0

127 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.h new file +55 -0

55 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pcie3.c new file +274 -0

274 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pcie3.h new file +100 -0

100 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_sdc.c new file +177 -0

177 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_sdc.h new file +43 -0

43 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_si5340.c new file +206 -0

206 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_si5340.h new file +34 -0
new file mode 100644
index 0000000000..f588b5b825

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_spi_v3.c new file +380 -0

380 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spi_v3.h new file +106 -0

106 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spim.c new file +117 -0

117 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spim.h new file +52 -0

52 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spis.c new file +147 -0

147 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spis.h new file +63 -0

63 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_tsm.c new file +179 -0

179 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_tsm.h new file +53 -0

53 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_dbs.c new file +1301 -0

1,301 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_dbs.h new file +313 -0

313 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_drv.h new file +82 -0

82 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_epp.c new file +335 -0

335 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_epp.h new file +99 -0

99 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_fpga_model.c new file +1677 -0

1,677 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_fpga_model.h new file +308 -0

308 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_helper.h new file +21 -0
new file mode 100644
index 0000000000..22f6a0d471

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_platform.c new file +35 -0
new file mode 100644
index 0000000000..203947e03a

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_platform_drv.h new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_profile.h new file +15 -0
new file mode 100644
index 0000000000..2fcb7b4adf

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_rac.c new file +976 -0

976 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_rac.h new file +161 -0

161 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_register.h +2 -0
index 5cdbd9fc5d..4fe3496b9f 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_stat.c new file +266 -0

266 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_stat.h new file +72 -0

72 lines not on this page · raw message

drivers/net/ntnic/ntlog/include/ntlog.h new file +162 -0

162 lines not on this page · raw message

drivers/net/ntnic/ntlog/ntlog.c new file +115 -0

115 lines not on this page · raw message

drivers/net/ntnic/ntutil/include/nt_util.h new file +71 -0

71 lines not on this page · raw message

drivers/net/ntnic/ntutil/nt_util.c new file +77 -0

77 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#31 lore raw

PATCH v5 3/8 net/ntnic: adds NT200A02 adapter support

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The PMD is designed to support multiple different adapters, and this commit adds support for NT200A02 2x100G. Sensor and NIM code is included.

---
v2:
* Fixed WARNING:TYPO_SPELLING

---
 .../net/ntnic/adapter/common_adapter_defs.h   |   14 +
 drivers/net/ntnic/adapter/nt4ga_adapter.c     |  477 ++++
 drivers/net/ntnic/adapter/nt4ga_adapter.h     |  108 +
 drivers/net/ntnic/adapter/nt4ga_filter.h      |   15 +
 drivers/net/ntnic/adapter/nt4ga_link.c        |  178 ++
 drivers/net/ntnic/adapter/nt4ga_link.h        |  179 ++
 drivers/net/ntnic/adapter/nt4ga_link_100g.c   |  825 +++++++
 drivers/net/ntnic/adapter/nt4ga_link_100g.h   |   12 +
 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.c   |  598 +++++
 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.h   |   41 +
 drivers/net/ntnic/adapter/nt4ga_stat.c        |  705 ++++++
 drivers/net/ntnic/adapter/nt4ga_stat.h        |  202 ++
 drivers/net/ntnic/meson.build                 |   24 +
 drivers/net/ntnic/nim/i2c_nim.c               | 1974 +++++++++++++++++
 drivers/net/ntnic/nim/i2c_nim.h               |  122 +
 drivers/net/ntnic/nim/nim_defines.h           |  146 ++
 drivers/net/ntnic/nim/nt_link_speed.c         |  105 +
 drivers/net/ntnic/nim/nt_link_speed.h         |   34 +
 drivers/net/ntnic/nim/qsfp_registers.h        |   57 +
 drivers/net/ntnic/nim/qsfp_sensors.c          |  174 ++
 drivers/net/ntnic/nim/qsfp_sensors.h          |   18 +
 drivers/net/ntnic/nim/sfp_p_registers.h       |  100 +
 drivers/net/ntnic/nim/sfp_sensors.c           |  288 +++
 drivers/net/ntnic/nim/sfp_sensors.h           |   18 +
 .../net/ntnic/nthw/core/nthw_clock_profiles.c |   11 +-
 drivers/net/ntnic/nthw/core/nthw_core.h       |    2 +
 drivers/net/ntnic/nthw/core/nthw_gmf.c        |  290 +++
 drivers/net/ntnic/nthw/core/nthw_gmf.h        |   93 +
 .../nthw/core/nthw_nt200a02_u23_si5340_v5.h   |  344 +++
 drivers/net/ntnic/nthw/core/nthw_rmc.c        |  156 ++
 drivers/net/ntnic/nthw/core/nthw_rmc.h        |   57 +
 .../ntnic/sensors/avr_sensors/avr_sensors.c   |  104 +
 .../ntnic/sensors/avr_sensors/avr_sensors.h   |   22 +
 .../sensors/board_sensors/board_sensors.c     |   48 +
 .../sensors/board_sensors/board_sensors.h     |   18 +
 .../net/ntnic/sensors/board_sensors/tempmon.c |   42 +
 .../net/ntnic/sensors/board_sensors/tempmon.h |   16 +
 .../ntnic/sensors/nim_sensors/nim_sensors.c   |   54 +
 .../ntnic/sensors/nim_sensors/nim_sensors.h   |   19 +
 drivers/net/ntnic/sensors/ntavr/avr_intf.h    |   89 +
 drivers/net/ntnic/sensors/ntavr/ntavr.c       |   78 +
 drivers/net/ntnic/sensors/ntavr/ntavr.h       |   32 +
 drivers/net/ntnic/sensors/sensor_types.h      |  259 +++
 drivers/net/ntnic/sensors/sensors.c           |  273 +++
 drivers/net/ntnic/sensors/sensors.h           |  127 ++
 drivers/net/ntnic/sensors/stream_info.h       |   86 +
 46 files changed, 8632 insertions(+), 2 deletions(-)
 create mode 100644 drivers/net/ntnic/adapter/common_adapter_defs.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_adapter.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_adapter.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_filter.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link_100g.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link_100g.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_stat.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_stat.h
 create mode 100644 drivers/net/ntnic/nim/i2c_nim.c
 create mode 100644 drivers/net/ntnic/nim/i2c_nim.h
 create mode 100644 drivers/net/ntnic/nim/nim_defines.h
 create mode 100644 drivers/net/ntnic/nim/nt_link_speed.c
 create mode 100644 drivers/net/ntnic/nim/nt_link_speed.h
 create mode 100644 drivers/net/ntnic/nim/qsfp_registers.h
 create mode 100644 drivers/net/ntnic/nim/qsfp_sensors.c
 create mode 100644 drivers/net/ntnic/nim/qsfp_sensors.h
 create mode 100644 drivers/net/ntnic/nim/sfp_p_registers.h
 create mode 100644 drivers/net/ntnic/nim/sfp_sensors.c
 create mode 100644 drivers/net/ntnic/nim/sfp_sensors.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gmf.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gmf.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_nt200a02_u23_si5340_v5.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_rmc.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_rmc.h
 create mode 100644 drivers/net/ntnic/sensors/avr_sensors/avr_sensors.c
 create mode 100644 drivers/net/ntnic/sensors/avr_sensors/avr_sensors.h
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/board_sensors.c
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/board_sensors.h
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/tempmon.c
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/tempmon.h
 create mode 100644 drivers/net/ntnic/sensors/nim_sensors/nim_sensors.c
 create mode 100644 drivers/net/ntnic/sensors/nim_sensors/nim_sensors.h
 create mode 100644 drivers/net/ntnic/sensors/ntavr/avr_intf.h
 create mode 100644 drivers/net/ntnic/sensors/ntavr/ntavr.c
 create mode 100644 drivers/net/ntnic/sensors/ntavr/ntavr.h
 create mode 100644 drivers/net/ntnic/sensors/sensor_types.h
 create mode 100644 drivers/net/ntnic/sensors/sensors.c
 create mode 100644 drivers/net/ntnic/sensors/sensors.h
 create mode 100644 drivers/net/ntnic/sensors/stream_info.h
drivers/net/ntnic/adapter/common_adapter_defs.h new file +14 -0
new file mode 100644
index 0000000000..79167806f1
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef _COMMON_ADAPTER_DEFS_H_
+#define _COMMON_ADAPTER_DEFS_H_
+
+/*
+ * Declarations shared by NT adapter types.
+ */
+#define NUM_ADAPTER_MAX (8)
+#define NUM_ADAPTER_PORTS_MAX (128)
+
+#endif /* _COMMON_ADAPTER_DEFS_H_ */
drivers/net/ntnic/adapter/nt4ga_adapter.c new file +477 -0

477 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_adapter.h new file +108 -0

108 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_filter.h new file +15 -0
new file mode 100644
index 0000000000..ad7e7d8c71
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef NT4GA_FILTER_H_
+#define NT4GA_FILTER_H_
+
+typedef struct nt4ga_filter_s {
+	int n_intf_cnt;
+	int n_queues_per_intf_cnt;
+
+	struct flow_nic_dev *mp_flow_device;
+} nt4ga_filter_t;
+
+#endif /* NT4GA_FILTER_H_ */
drivers/net/ntnic/adapter/nt4ga_link.c new file +178 -0

178 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_link.h new file +179 -0

179 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_link_100g.c new file +825 -0

825 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_link_100g.h new file +12 -0
new file mode 100644
index 0000000000..803b3454b7
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef NT4GA_LINK_100G_H_
+#define NT4GA_LINK_100G_H_
+
+#include "nthw_drv.h"
+
+int nt4ga_link_100g_ports_init(adapter_info_t *p_adapter_info, nt_fpga_t *p_fpga);
+
+#endif /* NT4GA_LINK_100G_H_ */
drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.c new file +598 -0

598 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.h new file +41 -0

41 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_stat.c new file +705 -0

553 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_stat.h new file +202 -0

202 lines not on this page · raw message

drivers/net/ntnic/meson.build +24 -0
index 0a72e46174..a8bf67af10 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nim/i2c_nim.c new file +1974 -0

1,974 lines not on this page · raw message

drivers/net/ntnic/nim/i2c_nim.h new file +122 -0

122 lines not on this page · raw message

drivers/net/ntnic/nim/nim_defines.h new file +146 -0

146 lines not on this page · raw message

drivers/net/ntnic/nim/nt_link_speed.c new file +105 -0

105 lines not on this page · raw message

drivers/net/ntnic/nim/nt_link_speed.h new file +34 -0
new file mode 100644
index 0000000000..969e3fb867

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nim/qsfp_registers.h new file +57 -0

57 lines not on this page · raw message

drivers/net/ntnic/nim/qsfp_sensors.c new file +174 -0

174 lines not on this page · raw message

drivers/net/ntnic/nim/qsfp_sensors.h new file +18 -0
new file mode 100644
index 0000000000..de64b978cb

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nim/sfp_p_registers.h new file +100 -0

100 lines not on this page · raw message

drivers/net/ntnic/nim/sfp_sensors.c new file +288 -0

288 lines not on this page · raw message

drivers/net/ntnic/nim/sfp_sensors.h new file +18 -0
new file mode 100644
index 0000000000..ab56027dc8

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_clock_profiles.c +9 -2
index efdcc222a8..bd7cd2a27c 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_core.h +2 -0
index 798a95d5cf..025b6b61cc 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_gmf.c new file +290 -0

290 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_gmf.h new file +93 -0

93 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_nt200a02_u23_si5340_v5.h new file +344 -0

344 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_rmc.c new file +156 -0

156 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_rmc.h new file +57 -0

57 lines not on this page · raw message

drivers/net/ntnic/sensors/avr_sensors/avr_sensors.c new file +104 -0

104 lines not on this page · raw message

drivers/net/ntnic/sensors/avr_sensors/avr_sensors.h new file +22 -0
new file mode 100644
index 0000000000..b8c37a12cb

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/board_sensors/board_sensors.c new file +48 -0

48 lines not on this page · raw message

drivers/net/ntnic/sensors/board_sensors/board_sensors.h new file +18 -0
new file mode 100644
index 0000000000..a7f75b7ae4

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/board_sensors/tempmon.c new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/sensors/board_sensors/tempmon.h new file +16 -0
new file mode 100644
index 0000000000..6f2017b714

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/nim_sensors/nim_sensors.c new file +54 -0

54 lines not on this page · raw message

drivers/net/ntnic/sensors/nim_sensors/nim_sensors.h new file +19 -0
new file mode 100644
index 0000000000..c68c9aa924

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/ntavr/avr_intf.h new file +89 -0

89 lines not on this page · raw message

drivers/net/ntnic/sensors/ntavr/ntavr.c new file +78 -0

78 lines not on this page · raw message

drivers/net/ntnic/sensors/ntavr/ntavr.h new file +32 -0
new file mode 100644
index 0000000000..b7a7aeb908

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/sensor_types.h new file +259 -0

259 lines not on this page · raw message

drivers/net/ntnic/sensors/sensors.c new file +273 -0

273 lines not on this page · raw message

drivers/net/ntnic/sensors/sensors.h new file +127 -0

127 lines not on this page · raw message

drivers/net/ntnic/sensors/stream_info.h new file +86 -0

86 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#32 lore raw

PATCH v5 4/8 net/ntnic: adds flow related FPGA functionality

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The PMD will control the registers used for flow programming, and this commit adds support for this.

---
v2:
* Fixed compilation with Fedora 38

---
 drivers/net/ntnic/meson.build                 |   21 +
 .../ntnic/nthw/flow_filter/flow_nthw_cat.c    | 1107 ++++++++++++++++
 .../ntnic/nthw/flow_filter/flow_nthw_cat.h    |  372 ++++++
 .../ntnic/nthw/flow_filter/flow_nthw_csu.c    |  146 +++
 .../ntnic/nthw/flow_filter/flow_nthw_csu.h    |   42 +
 .../ntnic/nthw/flow_filter/flow_nthw_flm.c    | 1140 +++++++++++++++++
 .../ntnic/nthw/flow_filter/flow_nthw_flm.h    |  422 ++++++
 .../ntnic/nthw/flow_filter/flow_nthw_hfu.c    |  293 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_hfu.h    |  100 ++
 .../ntnic/nthw/flow_filter/flow_nthw_hsh.c    |  254 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_hsh.h    |   81 ++
 .../ntnic/nthw/flow_filter/flow_nthw_hst.c    |  202 +++
 .../ntnic/nthw/flow_filter/flow_nthw_hst.h    |   72 ++
 .../ntnic/nthw/flow_filter/flow_nthw_ifr.c    |   93 ++
 .../ntnic/nthw/flow_filter/flow_nthw_ifr.h    |   39 +
 .../ntnic/nthw/flow_filter/flow_nthw_info.c   |  341 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_info.h   |  104 ++
 .../ntnic/nthw/flow_filter/flow_nthw_ioa.c    |  234 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_ioa.h    |   80 ++
 .../net/ntnic/nthw/flow_filter/flow_nthw_km.c |  685 ++++++++++
 .../net/ntnic/nthw/flow_filter/flow_nthw_km.h |  224 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_pdb.c    |  230 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_pdb.h    |   84 ++
 .../ntnic/nthw/flow_filter/flow_nthw_qsl.c    |  355 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_qsl.h    |  121 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rmc.c    |  112 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rmc.h    |   40 +
 .../ntnic/nthw/flow_filter/flow_nthw_roa.c    |  294 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_roa.h    |  109 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c |  132 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h |   53 +
 .../ntnic/nthw/flow_filter/flow_nthw_slc.c    |  109 ++
 .../ntnic/nthw/flow_filter/flow_nthw_slc.h    |   46 +
 .../ntnic/nthw/flow_filter/flow_nthw_slc_lr.c |  109 ++
 .../ntnic/nthw/flow_filter/flow_nthw_slc_lr.h |   46 +
 .../ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c |  394 ++++++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h |   72 ++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_ins.c |   96 ++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_ins.h |   42 +
 .../ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c |  165 +++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h |   70 +
 41 files changed, 8731 insertions(+)
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h
drivers/net/ntnic/meson.build +21 -0
index a8bf67af10..96d8c7b49d 100644
@@ -18,6 +18,7 @@ includes = [
     include_directories('nthw'),
     include_directories('nthw/core'),
     include_directories('nthw/supported'),
+    include_directories('nthw/flow_filter'),
     include_directories('sensors'),
     include_directories('sensors/avr_sensors'),
     include_directories('sensors/board_sensors'),
@@ -59,6 +60,26 @@ sources = files(
     'nthw/core/nthw_spim.c',
     'nthw/core/nthw_spis.c',
     'nthw/core/nthw_tsm.c',
+    'nthw/flow_filter/flow_nthw_cat.c',
+    'nthw/flow_filter/flow_nthw_csu.c',
+    'nthw/flow_filter/flow_nthw_flm.c',
+    'nthw/flow_filter/flow_nthw_hfu.c',
+    'nthw/flow_filter/flow_nthw_hsh.c',
+    'nthw/flow_filter/flow_nthw_hst.c',
+    'nthw/flow_filter/flow_nthw_ifr.c',
+    'nthw/flow_filter/flow_nthw_info.c',
+    'nthw/flow_filter/flow_nthw_ioa.c',
+    'nthw/flow_filter/flow_nthw_km.c',
+    'nthw/flow_filter/flow_nthw_pdb.c',
+    'nthw/flow_filter/flow_nthw_qsl.c',
+    'nthw/flow_filter/flow_nthw_rmc.c',
+    'nthw/flow_filter/flow_nthw_roa.c',
+    'nthw/flow_filter/flow_nthw_rpp_lr.c',
+    'nthw/flow_filter/flow_nthw_slc.c',
+    'nthw/flow_filter/flow_nthw_slc_lr.c',
+    'nthw/flow_filter/flow_nthw_tx_cpy.c',
+    'nthw/flow_filter/flow_nthw_tx_ins.c',
+    'nthw/flow_filter/flow_nthw_tx_rpl.c',
     'nthw/nthw_fpga_model.c',
     'nthw/nthw_dbs.c',
     'nthw/nthw_epp.c',
drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c new file +1107 -0

1,107 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.h new file +372 -0

372 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c new file +146 -0

146 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.h new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.c new file +1140 -0

1,140 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.h new file +422 -0

160 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.c new file +293 -0

293 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.h new file +100 -0

100 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c new file +254 -0

254 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h new file +81 -0

81 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.c new file +202 -0

202 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.h new file +72 -0

72 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c new file +93 -0

93 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h new file +39 -0
new file mode 100644
index 0000000000..626ca3d193

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.c new file +341 -0

341 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.h new file +104 -0

104 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.c new file +234 -0

234 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.h new file +80 -0

80 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.c new file +685 -0

685 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.h new file +224 -0

224 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.c new file +230 -0

230 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.h new file +84 -0

84 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.c new file +355 -0

355 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.h new file +121 -0

121 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.c new file +112 -0

112 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.h new file +40 -0
new file mode 100644
index 0000000000..57d5776002

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.c new file +294 -0

294 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.h new file +109 -0

109 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c new file +132 -0

132 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h new file +53 -0

53 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.c new file +109 -0

109 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.h new file +46 -0

46 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.c new file +109 -0

109 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.h new file +46 -0

46 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c new file +394 -0

394 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h new file +72 -0

72 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.c new file +96 -0

96 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.h new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c new file +165 -0

165 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h new file +70 -0

70 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#33 lore raw

PATCH v5 5/8 net/ntnic: adds FPGA abstraction layer

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The FPGA abstraction layer limits the need to rewrite flow logic when new FPGA modules are created.

---
v2:
* Fixed compilation with Fedora 38
* Fixed WARNING:TYPO_SPELLING

---
 drivers/net/ntnic/meson.build                 |   21 +
 .../ntnic/nthw/flow_api/flow_api_actions.c    |  205 ++
 .../ntnic/nthw/flow_api/flow_api_actions.h    |  284 +++
 .../ntnic/nthw/flow_api/flow_api_backend.c    |  182 ++
 .../ntnic/nthw/flow_api/flow_api_backend.h    | 1818 +++++++++++++++++
 .../net/ntnic/nthw/flow_api/flow_api_engine.h |  475 +++++
 .../ntnic/nthw/flow_api/flow_api_nic_setup.h  |   32 +
 .../nthw/flow_api/flow_engine/flow_group.c    |  125 ++
 .../nthw/flow_api/flow_engine/flow_hasher.c   |  213 ++
 .../nthw/flow_api/flow_engine/flow_hasher.h   |   20 +
 .../nthw/flow_api/flow_engine/flow_kcc.c      |  434 ++++
 .../ntnic/nthw/flow_api/flow_engine/flow_km.c | 1434 +++++++++++++
 .../nthw/flow_api/flow_engine/flow_tunnel.c   |  787 +++++++
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c   | 1789 ++++++++++++++++
 .../nthw/flow_api/hw_mod/hw_mod_cat_v18.h     |  138 ++
 .../nthw/flow_api/hw_mod/hw_mod_cat_v21.h     |   88 +
 .../nthw/flow_api/hw_mod/hw_mod_cat_v22.h     |   83 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c   | 1099 ++++++++++
 .../nthw/flow_api/hw_mod/hw_mod_flm_v17.h     |  274 +++
 .../nthw/flow_api/hw_mod/hw_mod_flm_v20.h     |  102 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c   |  195 ++
 .../nthw/flow_api/hw_mod/hw_mod_hsh_v5.h      |   36 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c   |  178 ++
 .../nthw/flow_api/hw_mod/hw_mod_hst_v2.h      |   32 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c   |  271 +++
 .../nthw/flow_api/hw_mod/hw_mod_ioa_v4.h      |   36 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_km.c    |  629 ++++++
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h |   93 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c   |  219 ++
 .../nthw/flow_api/hw_mod/hw_mod_pdb_v9.h      |   39 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c   |  348 ++++
 .../nthw/flow_api/hw_mod/hw_mod_qsl_v7.h      |   45 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c   |  112 +
 .../nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h    |   20 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c   |  358 ++++
 .../nthw/flow_api/hw_mod/hw_mod_roa_v6.h      |   49 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c   |  132 ++
 .../nthw/flow_api/hw_mod/hw_mod_slc_lr.c      |  132 ++
 .../nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h   |   19 +
 .../nthw/flow_api/hw_mod/hw_mod_slc_v1.h      |   19 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c   |  983 +++++++++
 .../nthw/flow_api/hw_mod/hw_mod_tpe_v1.h      |  103 +
 .../nthw/flow_api/hw_mod/hw_mod_tpe_v2.h      |   37 +
 .../nthw/flow_api/stream_binary_flow_api.h    |  697 +++++++
 44 files changed, 14385 insertions(+)
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_actions.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_actions.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_backend.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_backend.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_engine.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_nic_setup.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_group.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_kcc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_km.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_tunnel.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v18.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v21.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v22.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v17.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v20.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh_v5.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst_v2.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa_v4.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb_v9.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl_v7.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa_v6.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_v1.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v1.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v2.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/stream_binary_flow_api.h
drivers/net/ntnic/meson.build +21 -0
index 96d8c7b49d..e253265091 100644
@@ -18,6 +18,7 @@ includes = [
     include_directories('nthw'),
     include_directories('nthw/core'),
     include_directories('nthw/supported'),
+    include_directories('nthw/flow_api'),
     include_directories('nthw/flow_filter'),
     include_directories('sensors'),
     include_directories('sensors/avr_sensors'),
@@ -60,6 +61,26 @@ sources = files(
     'nthw/core/nthw_spim.c',
     'nthw/core/nthw_spis.c',
     'nthw/core/nthw_tsm.c',
+    'nthw/flow_api/flow_api_actions.c',
+    'nthw/flow_api/flow_api_backend.c',
+    'nthw/flow_api/flow_engine/flow_group.c',
+    'nthw/flow_api/flow_engine/flow_hasher.c',
+    'nthw/flow_api/flow_engine/flow_kcc.c',
+    'nthw/flow_api/flow_engine/flow_km.c',
+    'nthw/flow_api/flow_engine/flow_tunnel.c',
+    'nthw/flow_api/hw_mod/hw_mod_cat.c',
+    'nthw/flow_api/hw_mod/hw_mod_flm.c',
+    'nthw/flow_api/hw_mod/hw_mod_hsh.c',
+    'nthw/flow_api/hw_mod/hw_mod_hst.c',
+    'nthw/flow_api/hw_mod/hw_mod_ioa.c',
+    'nthw/flow_api/hw_mod/hw_mod_km.c',
+    'nthw/flow_api/hw_mod/hw_mod_pdb.c',
+    'nthw/flow_api/hw_mod/hw_mod_qsl.c',
+    'nthw/flow_api/hw_mod/hw_mod_rmc.c',
+    'nthw/flow_api/hw_mod/hw_mod_roa.c',
+    'nthw/flow_api/hw_mod/hw_mod_slc.c',
+    'nthw/flow_api/hw_mod/hw_mod_slc_lr.c',
+    'nthw/flow_api/hw_mod/hw_mod_tpe.c',
     'nthw/flow_filter/flow_nthw_cat.c',
     'nthw/flow_filter/flow_nthw_csu.c',
     'nthw/flow_filter/flow_nthw_flm.c',
drivers/net/ntnic/nthw/flow_api/flow_api_actions.c new file +205 -0

205 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_actions.h new file +284 -0

284 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_backend.c new file +182 -0

182 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_backend.h new file +1818 -0

1,818 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_engine.h new file +475 -0

475 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_nic_setup.h new file +32 -0
new file mode 100644
index 0000000000..c4db0f4c5c
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_group.c new file +125 -0

125 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.c new file +213 -0

213 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.h new file +20 -0
new file mode 100644
index 0000000000..6365a396d2

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_kcc.c new file +434 -0

434 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_km.c new file +1434 -0

1,434 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_tunnel.c new file +787 -0

787 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c new file +1789 -0

1,789 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v18.h new file +138 -0

138 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v21.h new file +88 -0

88 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v22.h new file +83 -0

83 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c new file +1099 -0

1,099 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v17.h new file +274 -0

274 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v20.h new file +102 -0

102 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c new file +195 -0

195 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh_v5.h new file +36 -0
new file mode 100644
index 0000000000..8588750ff0

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c new file +178 -0

178 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst_v2.h new file +32 -0
new file mode 100644
index 0000000000..230c70b56d

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c new file +271 -0

271 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa_v4.h new file +36 -0
new file mode 100644
index 0000000000..309b53ff76

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c new file +629 -0

629 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h new file +93 -0

93 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c new file +219 -0

219 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb_v9.h new file +39 -0
new file mode 100644
index 0000000000..b14c10bc53

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c new file +348 -0

348 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl_v7.h new file +45 -0

45 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c new file +112 -0

112 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h new file +20 -0
new file mode 100644
index 0000000000..8f90695821

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c new file +358 -0

358 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa_v6.h new file +49 -0

49 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c new file +132 -0

132 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr.c new file +132 -0

132 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h new file +19 -0
new file mode 100644
index 0000000000..d03b206e6d

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_v1.h new file +19 -0
new file mode 100644
index 0000000000..01f60bfb18

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c new file +983 -0

983 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v1.h new file +103 -0

103 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v2.h new file +37 -0
new file mode 100644
index 0000000000..c56cad8d89

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/stream_binary_flow_api.h new file +697 -0

697 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#34 lore raw

PATCH v5 6/8 net/ntnic: adds flow logic

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

This logic layer takes rte_flow style patterns and actions as input, and programs the FPGA accordingly.

---
v2:
* Fixed WARNING:TYPO_SPELLING

---
 drivers/net/ntnic/adapter/nt4ga_adapter.c     |   13 +
 drivers/net/ntnic/adapter/nt4ga_stat.c        |   20 +-
 drivers/net/ntnic/meson.build                 |    4 +
 drivers/net/ntnic/nthw/flow_api/flow_api.c    | 1306 +++++
 drivers/net/ntnic/nthw/flow_api/flow_api.h    |  291 +
 .../nthw/flow_api/flow_api_profile_inline.c   | 5118 +++++++++++++++++
 .../nthw/flow_api/flow_api_profile_inline.h   |   56 +
 .../net/ntnic/nthw/flow_filter/flow_backend.c | 3205 +++++++++++
 .../net/ntnic/nthw/flow_filter/flow_backend.h |   15 +
 .../net/ntnic/nthw/flow_filter/flow_filter.c  |   39 +
 .../net/ntnic/nthw/flow_filter/flow_filter.h  |   16 +
 11 files changed, 10078 insertions(+), 5 deletions(-)
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_backend.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_backend.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_filter.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_filter.h
drivers/net/ntnic/adapter/nt4ga_adapter.c +13 -0
index 259aae2831..f9493202c3 100644
@@ -10,6 +10,8 @@
 #include "nt4ga_pci_ta_tg.h"
 #include "nt4ga_link_100g.h"
 
+#include "flow_filter.h"
+
 /* Sensors includes */
 #include "board_sensors.h"
 #include "avr_sensors.h"
@@ -306,6 +308,17 @@ int nt4ga_adapter_init(struct adapter_info_s *p_adapter_info)
 	n_nim_ports = fpga_info->n_nims;
 	assert(n_nim_ports >= 1);
 
+	/* Nt4ga Init Filter */
+	nt4ga_filter_t *p_filter = &p_adapter_info->nt4ga_filter;
+
+	res = flow_filter_init(p_fpga, &p_filter->mp_flow_device,
+			     p_adapter_info->adapter_no);
+	if (res != 0) {
+		NT_LOG(ERR, ETHDEV, "%s: Cannot initialize filter\n",
+		       p_adapter_id_str);
+		return res;
+	}
+
 	/*
 	 * HIF/PCI TA/TG
 	 */
drivers/net/ntnic/adapter/nt4ga_stat.c +15 -5
index b61c73ea12..2c822c6b97 100644
@@ -7,6 +7,7 @@
 #include "nthw_drv.h"
 #include "nthw_fpga.h"
 #include "nt4ga_adapter.h"
+#include "flow_filter.h"
 
 #define NO_FLAGS 0
 
@@ -16,12 +17,13 @@ static inline uint64_t timestamp2ns(uint64_t ts)
 	return ((ts >> 32) * 1000000000) + (ts & 0xffffffff);
 }
 
-static int nt4ga_stat_collect_cap_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
+static int nt4ga_stat_collect_cap_v1_stats(struct adapter_info_s *p_adapter_info,
+				   nt4ga_stat_t *p_nt4ga_stat,
 				   uint32_t *p_stat_dma_virtual);
 static int nt4ga_stat_collect_virt_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
 				    uint32_t *p_stat_dma_virtual);
 
-int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info _unused,
+int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info,
 		      nt4ga_stat_t *p_nt4ga_stat)
 {
 	nthw_stat_t *p_nthw_stat = p_nt4ga_stat->mp_nthw_stat;
@@ -39,7 +41,7 @@ int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info _unused,
 	} else {
 		p_nt4ga_stat->last_timestamp =
 			timestamp2ns(*p_nthw_stat->mp_timestamp);
-		nt4ga_stat_collect_cap_v1_stats(p_nt4ga_stat,
+		nt4ga_stat_collect_cap_v1_stats(p_adapter_info, p_nt4ga_stat,
 					       p_nt4ga_stat->p_stat_dma_virtual);
 	}
 	return 0;
@@ -198,7 +200,9 @@ int nt4ga_stat_setup(struct adapter_info_s *p_adapter_info)
 			return -1;
 		}
 
-		p_nt4ga_stat->flm_stat_ver = 0;
+		struct flow_nic_dev *ndev =
+				p_adapter_info->nt4ga_filter.mp_flow_device;
+		p_nt4ga_stat->flm_stat_ver = ndev->be.flm.ver;
 
 		p_nt4ga_stat->mp_stat_structs_flm =
 			calloc(1, sizeof(struct flm_counters_v1));
@@ -394,10 +398,12 @@ static int nt4ga_stat_collect_virt_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
 }
 
 /* Called with stat mutex locked */
-static int nt4ga_stat_collect_cap_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
+static int nt4ga_stat_collect_cap_v1_stats(struct adapter_info_s *p_adapter_info,
+					   nt4ga_stat_t *p_nt4ga_stat,
 					   uint32_t *p_stat_dma_virtual)
 {
 	nthw_stat_t *p_nthw_stat = p_nt4ga_stat->mp_nthw_stat;
+	struct flow_nic_dev *ndev = p_adapter_info->nt4ga_filter.mp_flow_device;
 
 	const int n_rx_ports = p_nt4ga_stat->mn_rx_ports;
 	const int n_tx_ports = p_nt4ga_stat->mn_tx_ports;
@@ -701,5 +707,9 @@ static int nt4ga_stat_collect_cap_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
 		p_nt4ga_stat->a_port_tx_drops_total[p] += new_drop_events_sum;
 	}
 
+	/* _update and get FLM stats */
+	flow_get_flm_stats(ndev, (uint64_t *)p_nt4ga_stat->mp_stat_structs_flm,
+			   sizeof(struct flm_counters_v1) / sizeof(uint64_t));
+
 	return 0;
 }
drivers/net/ntnic/meson.build +4 -0
index e253265091..718359b67a 100644
@@ -61,8 +61,10 @@ sources = files(
     'nthw/core/nthw_spim.c',
     'nthw/core/nthw_spis.c',
     'nthw/core/nthw_tsm.c',
+    'nthw/flow_api/flow_api.c',
     'nthw/flow_api/flow_api_actions.c',
     'nthw/flow_api/flow_api_backend.c',
+    'nthw/flow_api/flow_api_profile_inline.c',
     'nthw/flow_api/flow_engine/flow_group.c',
     'nthw/flow_api/flow_engine/flow_hasher.c',
     'nthw/flow_api/flow_engine/flow_kcc.c',
@@ -81,6 +83,8 @@ sources = files(
     'nthw/flow_api/hw_mod/hw_mod_slc.c',
     'nthw/flow_api/hw_mod/hw_mod_slc_lr.c',
     'nthw/flow_api/hw_mod/hw_mod_tpe.c',
+    'nthw/flow_filter/flow_backend.c',
+    'nthw/flow_filter/flow_filter.c',
     'nthw/flow_filter/flow_nthw_cat.c',
     'nthw/flow_filter/flow_nthw_csu.c',
     'nthw/flow_filter/flow_nthw_flm.c',
drivers/net/ntnic/nthw/flow_api/flow_api.c new file +1306 -0

1,306 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api.h new file +291 -0

291 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.c new file +5118 -0

1,298 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.h new file +56 -0

56 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_backend.c new file +3205 -0

3,205 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_backend.h new file +15 -0
new file mode 100644
index 0000000000..17fdcada3f

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_filter.c new file +39 -0
new file mode 100644
index 0000000000..90aeb71bd7

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_filter.h new file +16 -0
new file mode 100644
index 0000000000..8ea21a614a

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#35 lore raw

PATCH v5 7/8 net/ntnic: adds ethdev and makes PMD available

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

Hooks into the DPDK API, and make the PMD available to use. Also adds documentation as .rst and .ini files.

---
v2:
* Fixed WARNING:TYPO_SPELLING
* Fix supported platform list
v3:
* Fix Fedora 38 compilation issues
v5:
* Add ntnic.rst to index file

---
 .mailmap                                      |    2 +
 MAINTAINERS                                   |    7 +
 doc/guides/nics/features/ntnic.ini            |   50 +
 doc/guides/nics/index.rst                     |    1 +
 doc/guides/nics/ntnic.rst                     |  235 +
 drivers/net/ntnic/include/ntdrv_4ga.h         |   23 +
 drivers/net/ntnic/include/ntos_system.h       |   23 +
 drivers/net/ntnic/meson.build                 |   13 +
 drivers/net/ntnic/ntnic_dbsconfig.c           | 1670 +++++++
 drivers/net/ntnic/ntnic_dbsconfig.h           |  251 +
 drivers/net/ntnic/ntnic_ethdev.c              | 4256 +++++++++++++++++
 drivers/net/ntnic/ntnic_ethdev.h              |  357 ++
 .../net/ntnic/ntnic_filter/create_elements.h  | 1190 +++++
 drivers/net/ntnic/ntnic_filter/ntnic_filter.c |  656 +++
 drivers/net/ntnic/ntnic_filter/ntnic_filter.h |   14 +
 drivers/net/ntnic/ntnic_hshconfig.c           |  102 +
 drivers/net/ntnic/ntnic_hshconfig.h           |    9 +
 drivers/net/ntnic/ntnic_meter.c               |  811 ++++
 drivers/net/ntnic/ntnic_meter.h               |   10 +
 drivers/net/ntnic/ntnic_vdpa.c                |  365 ++
 drivers/net/ntnic/ntnic_vdpa.h                |   21 +
 drivers/net/ntnic/ntnic_vf.c                  |   83 +
 drivers/net/ntnic/ntnic_vf.h                  |   17 +
 drivers/net/ntnic/ntnic_vf_vdpa.c             | 1246 +++++
 drivers/net/ntnic/ntnic_vf_vdpa.h             |   25 +
 drivers/net/ntnic/ntnic_vfio.c                |  321 ++
 drivers/net/ntnic/ntnic_vfio.h                |   31 +
 drivers/net/ntnic/ntnic_xstats.c              |  703 +++
 drivers/net/ntnic/ntnic_xstats.h              |   22 +
 29 files changed, 12514 insertions(+)
 create mode 100644 doc/guides/nics/features/ntnic.ini
 create mode 100644 doc/guides/nics/ntnic.rst
 create mode 100644 drivers/net/ntnic/include/ntdrv_4ga.h
 create mode 100644 drivers/net/ntnic/include/ntos_system.h
 create mode 100644 drivers/net/ntnic/ntnic_dbsconfig.c
 create mode 100644 drivers/net/ntnic/ntnic_dbsconfig.h
 create mode 100644 drivers/net/ntnic/ntnic_ethdev.c
 create mode 100644 drivers/net/ntnic/ntnic_ethdev.h
 create mode 100644 drivers/net/ntnic/ntnic_filter/create_elements.h
 create mode 100644 drivers/net/ntnic/ntnic_filter/ntnic_filter.c
 create mode 100644 drivers/net/ntnic/ntnic_filter/ntnic_filter.h
 create mode 100644 drivers/net/ntnic/ntnic_hshconfig.c
 create mode 100644 drivers/net/ntnic/ntnic_hshconfig.h
 create mode 100644 drivers/net/ntnic/ntnic_meter.c
 create mode 100644 drivers/net/ntnic/ntnic_meter.h
 create mode 100644 drivers/net/ntnic/ntnic_vdpa.c
 create mode 100644 drivers/net/ntnic/ntnic_vdpa.h
 create mode 100644 drivers/net/ntnic/ntnic_vf.c
 create mode 100644 drivers/net/ntnic/ntnic_vf.h
 create mode 100644 drivers/net/ntnic/ntnic_vf_vdpa.c
 create mode 100644 drivers/net/ntnic/ntnic_vf_vdpa.h
 create mode 100644 drivers/net/ntnic/ntnic_vfio.c
 create mode 100644 drivers/net/ntnic/ntnic_vfio.h
 create mode 100644 drivers/net/ntnic/ntnic_xstats.c
 create mode 100644 drivers/net/ntnic/ntnic_xstats.h
.mailmap +2 -0
index 864d33ee46..be8880971d 100644
@@ -227,6 +227,7 @@ Chintu Hetam <[email protected]>
 Choonho Son <[email protected]>
 Chris Metcalf <[email protected]>
 Christian Ehrhardt <[email protected]>
+Christian Koue Muf <[email protected]>
 Christian Maciocco <[email protected]>
 Christophe Fontaine <[email protected]>
 Christophe Grosse <[email protected]>
@@ -967,6 +968,7 @@ Mukesh Dua <[email protected]>
 Murphy Yang <[email protected]>
 Murthy NSSR <[email protected]>
 Muthurajan Jayakumar <[email protected]>
+Mykola Kostenok <[email protected]>
 Nachiketa Prachanda <[email protected]> <[email protected]>
 Nagadheeraj Rottela <[email protected]>
 Naga Harish K S V <[email protected]>
MAINTAINERS +7 -0
index 8c3f2c993f..02aca74173 100644
@@ -1053,6 +1053,13 @@ F: drivers/net/memif/
 F: doc/guides/nics/memif.rst
 F: doc/guides/nics/features/memif.ini
 
+NTNIC PMD
+M: Mykola Kostenok <[email protected]>
+M: Christiam Muf <[email protected]>
+F: drivers/net/ntnic/
+F: doc/guides/nics/ntnic.rst
+F: doc/guides/nics/features/ntnic.ini
+
 
 Crypto Drivers
 --------------
doc/guides/nics/features/ntnic.ini new file +50 -0

50 lines not on this page · raw message

doc/guides/nics/index.rst +1 -0
index 7bfcac880f..c14bc7988a 100644
@@ -53,6 +53,7 @@ Network Interface Controller Drivers
     nfb
     nfp
     ngbe
+    ntnic
     null
     octeon_ep
     octeontx
doc/guides/nics/ntnic.rst new file +235 -0

235 lines not on this page · raw message

drivers/net/ntnic/include/ntdrv_4ga.h new file +23 -0
new file mode 100644
index 0000000000..e9c38fc330
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTDRV_4GA_H__
+#define __NTDRV_4GA_H__
+
+#include "nthw_drv.h"
+#include "nt4ga_adapter.h"
+#include "nthw_platform_drv.h"
+
+typedef struct ntdrv_4ga_s {
+	uint32_t pciident;
+	struct adapter_info_s adapter_info;
+	char *p_drv_name;
+
+	volatile bool b_shutdown;
+	pthread_mutex_t stat_lck;
+	pthread_t stat_thread;
+	pthread_t flm_thread;
+} ntdrv_4ga_t;
+
+#endif /* __NTDRV_4GA_H__ */
drivers/net/ntnic/include/ntos_system.h new file +23 -0
new file mode 100644
index 0000000000..0adfe86cc3
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTOS_SYSTEM_H__
+#define __NTOS_SYSTEM_H__
+
+#include "include/ntdrv_4ga.h"
+
+/*
+ * struct drv_s for DPDK (clone of kernel struct)
+ * keep it as close as possible to original kernel struct
+ */
+struct drv_s {
+	int adapter_no;
+	struct rte_pci_device *p_dev;
+	struct ntdrv_4ga_s ntdrv;
+
+	int n_eth_dev_init_count;
+	int probe_finished;
+};
+
+#endif /* __NTOS_SYSTEM_H__ */
drivers/net/ntnic/meson.build +13 -0
index 718359b67a..746dc65c4c 100644
@@ -27,6 +27,9 @@ includes = [
     include_directories('sensors/ntavr'),
 ]
 
+# deps
+deps += 'vhost'
+
 # all sources
 sources = files(
     'adapter/nt4ga_adapter.c',
@@ -113,6 +116,16 @@ sources = files(
     'nthw/nthw_stat.c',
     'nthw/supported/nthw_fpga_9563_055_024_0000.c',
     'ntlog/ntlog.c',
+    'ntnic_dbsconfig.c',
+    'ntnic_ethdev.c',
+    'ntnic_filter/ntnic_filter.c',
+    'ntnic_hshconfig.c',
+    'ntnic_meter.c',
+    'ntnic_vdpa.c',
+    'ntnic_vf.c',
+    'ntnic_vfio.c',
+    'ntnic_vf_vdpa.c',
+    'ntnic_xstats.c',
     'ntutil/nt_util.c',
     'sensors/avr_sensors/avr_sensors.c',
     'sensors/board_sensors/board_sensors.c',
drivers/net/ntnic/ntnic_dbsconfig.c new file +1670 -0

1,670 lines not on this page · raw message

drivers/net/ntnic/ntnic_dbsconfig.h new file +251 -0

251 lines not on this page · raw message

drivers/net/ntnic/ntnic_ethdev.c new file +4256 -0

689 lines not on this page · raw message

drivers/net/ntnic/ntnic_ethdev.h new file +357 -0

357 lines not on this page · raw message

drivers/net/ntnic/ntnic_filter/create_elements.h new file +1190 -0

1,190 lines not on this page · raw message

drivers/net/ntnic/ntnic_filter/ntnic_filter.c new file +656 -0

656 lines not on this page · raw message

drivers/net/ntnic/ntnic_filter/ntnic_filter.h new file +14 -0
new file mode 100644
index 0000000000..cf4207e5de

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_hshconfig.c new file +102 -0

102 lines not on this page · raw message

drivers/net/ntnic/ntnic_hshconfig.h new file +9 -0
new file mode 100644
index 0000000000..d4d7337d23

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_meter.c new file +811 -0

811 lines not on this page · raw message

drivers/net/ntnic/ntnic_meter.h new file +10 -0
new file mode 100644
index 0000000000..9484c9ee20

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_vdpa.c new file +365 -0

365 lines not on this page · raw message

drivers/net/ntnic/ntnic_vdpa.h new file +21 -0
new file mode 100644
index 0000000000..7acc2c8e4b

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_vf.c new file +83 -0

83 lines not on this page · raw message

drivers/net/ntnic/ntnic_vf.h new file +17 -0
new file mode 100644
index 0000000000..84be3bd71f

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_vf_vdpa.c new file +1246 -0

1,246 lines not on this page · raw message

drivers/net/ntnic/ntnic_vf_vdpa.h new file +25 -0
new file mode 100644
index 0000000000..561e3bf7cf

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_vfio.c new file +321 -0

321 lines not on this page · raw message

drivers/net/ntnic/ntnic_vfio.h new file +31 -0
new file mode 100644
index 0000000000..5d8a63d364

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntnic_xstats.c new file +703 -0

703 lines not on this page · raw message

drivers/net/ntnic/ntnic_xstats.h new file +22 -0
new file mode 100644
index 0000000000..0a82a1a677

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#36 lore raw

PATCH v5 8/8 net/ntnic: adds socket connection to PMD

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The socket connection is used by Napatech's tools for monitoring and rte_flow programming from other processes.

---
v2:
* Fixed WARNING:TYPO_SPELLING
v4:
* Fixed Alpine build

---
 drivers/net/ntnic/meson.build                 |   24 +
 .../ntconnect/include/ntconn_mod_helper.h     |   97 ++
 .../net/ntnic/ntconnect/include/ntconnect.h   |   96 ++
 .../ntnic/ntconnect/include/ntconnect_api.h   |   87 ++
 .../ntconnect/include/ntconnect_api_adapter.h |  221 +++
 .../ntconnect/include/ntconnect_api_flow.h    |  168 +++
 .../ntconnect/include/ntconnect_api_meter.h   |   89 ++
 .../include/ntconnect_api_statistic.h         |  173 +++
 .../ntconnect/include/ntconnect_api_test.h    |   18 +
 drivers/net/ntnic/ntconnect/ntconn_server.c   |   97 ++
 drivers/net/ntnic/ntconnect/ntconnect.c       |  641 ++++++++
 .../ntnic/ntconnect_modules/ntconn_adapter.c  |  775 ++++++++++
 .../net/ntnic/ntconnect_modules/ntconn_flow.c | 1310 +++++++++++++++++
 .../ntnic/ntconnect_modules/ntconn_meter.c    |  517 +++++++
 .../ntnic/ntconnect_modules/ntconn_modules.h  |   19 +
 .../net/ntnic/ntconnect_modules/ntconn_stat.c |  876 +++++++++++
 .../net/ntnic/ntconnect_modules/ntconn_test.c |  146 ++
 17 files changed, 5354 insertions(+)
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconn_mod_helper.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_adapter.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_flow.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_meter.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_statistic.h
 create mode 100644 drivers/net/ntnic/ntconnect/include/ntconnect_api_test.h
 create mode 100644 drivers/net/ntnic/ntconnect/ntconn_server.c
 create mode 100644 drivers/net/ntnic/ntconnect/ntconnect.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_adapter.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_flow.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_meter.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_modules.h
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_stat.c
 create mode 100644 drivers/net/ntnic/ntconnect_modules/ntconn_test.c
drivers/net/ntnic/meson.build +24 -0
index 746dc65c4c..5889b4470a 100644
@@ -7,6 +7,22 @@ if not is_linux or not dpdk_conf.has('RTE_ARCH_X86_64') or not dpdk_conf.has('RT
     subdir_done()
 endif
 
+# config object
+ntnic_conf = configuration_data()
+
+# transfer options into config object
+ntnic_conf.set('NT_TOOLS', true)
+
+# check option 'debug' (boolean flag derived from meson buildtype)
+if get_option('debug')
+    cflags += '-DDEBUG'
+endif
+
+# check nt_tools build option
+if ntnic_conf.get('NT_TOOLS')
+    cflags += '-DNT_TOOLS'
+endif
+
 # includes
 includes = [
     include_directories('.'),
@@ -20,6 +36,7 @@ includes = [
     include_directories('nthw/supported'),
     include_directories('nthw/flow_api'),
     include_directories('nthw/flow_filter'),
+    include_directories('ntconnect/include'),
     include_directories('sensors'),
     include_directories('sensors/avr_sensors'),
     include_directories('sensors/board_sensors'),
@@ -41,6 +58,13 @@ sources = files(
     'nim/nt_link_speed.c',
     'nim/qsfp_sensors.c',
     'nim/sfp_sensors.c',
+    'ntconnect/ntconn_server.c',
+    'ntconnect/ntconnect.c',
+    'ntconnect_modules/ntconn_adapter.c',
+    'ntconnect_modules/ntconn_flow.c',
+    'ntconnect_modules/ntconn_meter.c',
+    'ntconnect_modules/ntconn_stat.c',
+    'ntconnect_modules/ntconn_test.c',
     'nthw/core/nthw_clock_profiles.c',
     'nthw/core/nthw_fpga.c',
     'nthw/core/nthw_fpga_nt200a0x.c',
drivers/net/ntnic/ntconnect/include/ntconn_mod_helper.h new file +97 -0

97 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect.h new file +96 -0

96 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api.h new file +87 -0

87 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_adapter.h new file +221 -0

221 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_flow.h new file +168 -0

168 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_meter.h new file +89 -0

89 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_statistic.h new file +173 -0

173 lines not on this page · raw message

drivers/net/ntnic/ntconnect/include/ntconnect_api_test.h new file +18 -0
new file mode 100644
index 0000000000..44cacbd931
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef _NTCONNECT_TEST_FILTER_H_
+#define _NTCONNECT_TEST_FILTER_H_
+
+/*
+ * Create structures allocating the space to carry through ntconnect interface
+ */
+
+struct test_s {
+	int number;
+	int status;
+	uint64_t test[];
+};
+
+#endif /* _NTCONNECT_TEST_FILTER_H_ */
drivers/net/ntnic/ntconnect/ntconn_server.c new file +97 -0

97 lines not on this page · raw message

drivers/net/ntnic/ntconnect/ntconnect.c new file +641 -0

641 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_adapter.c new file +775 -0

775 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_flow.c new file +1310 -0

496 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_meter.c new file +517 -0

517 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_modules.h new file +19 -0
new file mode 100644
index 0000000000..ea379015fe

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/ntconnect_modules/ntconn_stat.c new file +876 -0

876 lines not on this page · raw message

drivers/net/ntnic/ntconnect_modules/ntconn_test.c new file +146 -0

146 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#37 lore raw

PATCH v6 1/8 net/ntnic: initial commit which adds register defines

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The NTNIC PMD does not rely on a kernel space Napatech driver, thus all defines related to the register layout is part of the PMD code, which will be added in later commits.

---
v3:
* Fixed not needed cflags as suggested in comments. v5:
* Disable build for unsupported platforms.

---
 drivers/net/meson.build                       |    1 +
 drivers/net/ntnic/include/fpga_model.h        |   99 +
 drivers/net/ntnic/meson.build                 |   36 +
 drivers/net/ntnic/nthw/nthw_register.h        |   19 +
 .../supported/nthw_fpga_9563_055_024_0000.c   | 4190 ++++++++++
 .../nthw/supported/nthw_fpga_instances.h      |   14 +
 .../nthw/supported/nthw_fpga_modules_defs.h   |  166 +
 .../supported/nthw_fpga_parameters_defs.h     |  209 +
 .../nthw/supported/nthw_fpga_registers_defs.h | 7277 +++++++++++++++++
 9 files changed, 12011 insertions(+)
 create mode 100644 drivers/net/ntnic/include/fpga_model.h
 create mode 100644 drivers/net/ntnic/meson.build
 create mode 100644 drivers/net/ntnic/nthw/nthw_register.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_024_0000.c
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_instances.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_modules_defs.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_parameters_defs.h
 create mode 100644 drivers/net/ntnic/nthw/supported/nthw_fpga_registers_defs.h
drivers/net/meson.build +1 -0
index bd38b533c5..fb6d34b782 100644
@@ -45,6 +45,7 @@ drivers = [
         'nfb',
         'nfp',
         'ngbe',
+        'ntnic',
         'null',
         'octeontx',
         'octeon_ep',
drivers/net/ntnic/include/fpga_model.h new file +99 -0

99 lines not on this page · raw message

drivers/net/ntnic/meson.build new file +36 -0
new file mode 100644
index 0000000000..0e2c2d38cc
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2020-2023 Napatech A/S
+
+if is_windows
+    build = false
+    reason = 'not supported on Windows'
+    subdir_done()
+endif
+
+if not dpdk_conf.has('RTE_ARCH_X86_64')
+    build = false
+    reason = 'only supported on x86_64'
+    subdir_done()
+endif
+
+# includes
+includes = [
+    include_directories('.'),
+    include_directories('include'),
+    include_directories('nthw'),
+    include_directories('nthw/supported'),
+]
+
+# all sources
+sources = files(
+    'nthw/supported/nthw_fpga_9563_055_024_0000.c',
+)
+
+if is_variable('default_cflags')
+      cflags += default_cflags
+else
+      cflags += machine_args
+      cflags += ['-DALLOW_INTERNAL_API']
+endif
+
+# END
drivers/net/ntnic/nthw/nthw_register.h new file +19 -0
new file mode 100644
index 0000000000..5cdbd9fc5d
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef NTHW_REGISTER_H_
+#define NTHW_REGISTER_H_
+
+#include <unistd.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <inttypes.h>
+
+#include "fpga_model.h"
+
+#include "nthw_fpga_modules_defs.h"
+#include "nthw_fpga_parameters_defs.h"
+#include "nthw_fpga_registers_defs.h"
+
+#endif /* NTHW_REGISTER_H_ */
drivers/net/ntnic/nthw/supported/nthw_fpga_9563_055_024_0000.c new file +4190 -0

2,839 lines not on this page · raw message

drivers/net/ntnic/nthw/supported/nthw_fpga_instances.h new file +14 -0
new file mode 100644
index 0000000000..1d707d6925

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/supported/nthw_fpga_modules_defs.h new file +166 -0

166 lines not on this page · raw message

drivers/net/ntnic/nthw/supported/nthw_fpga_parameters_defs.h new file +209 -0

209 lines not on this page · raw message

drivers/net/ntnic/nthw/supported/nthw_fpga_registers_defs.h new file +7277 -0

7,277 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#38 lore raw

PATCH v6 2/8 net/ntnic: adds core registers and fpga functionality

From: Christian Koue Muf <[email protected]>

Includes functionality to reset, initialize, program, and collect stats for the NTNIC FPGA.

---
v2:
* Fixed WARNING:TYPO_SPELLING
* Fix compilation for Fedora38
v3:
* Fixed WARNING:TYPO_SPELLING
* Fix compilation for Fedora38

---
 drivers/net/ntnic/include/nthw_bus.h          |   10 +
 drivers/net/ntnic/meson.build                 |   32 +
 .../net/ntnic/nthw/core/nthw_clock_profiles.c |    9 +
 .../net/ntnic/nthw/core/nthw_clock_profiles.h |   39 +
 drivers/net/ntnic/nthw/core/nthw_core.h       |   31 +
 drivers/net/ntnic/nthw/core/nthw_fpga.c       |  914 +++++++++
 drivers/net/ntnic/nthw/core/nthw_fpga.h       |   47 +
 .../net/ntnic/nthw/core/nthw_fpga_nt200a0x.c  |   46 +
 .../net/ntnic/nthw/core/nthw_fpga_nt200a0x.h  |   14 +
 drivers/net/ntnic/nthw/core/nthw_fpga_rst.c   |   10 +
 drivers/net/ntnic/nthw/core/nthw_fpga_rst.h   |   17 +
 .../net/ntnic/nthw/core/nthw_fpga_rst9563.c   |  241 +++
 .../ntnic/nthw/core/nthw_fpga_rst_nt200a0x.c  |  674 +++++++
 .../ntnic/nthw/core/nthw_fpga_rst_nt200a0x.h  |   89 +
 drivers/net/ntnic/nthw/core/nthw_gpio_phy.c   |  271 +++
 drivers/net/ntnic/nthw/core/nthw_gpio_phy.h   |   57 +
 drivers/net/ntnic/nthw/core/nthw_hif.c        |  342 ++++
 drivers/net/ntnic/nthw/core/nthw_hif.h        |  156 ++
 drivers/net/ntnic/nthw/core/nthw_iic.c        |  570 ++++++
 drivers/net/ntnic/nthw/core/nthw_iic.h        |  101 +
 drivers/net/ntnic/nthw/core/nthw_mac_pcs.c    | 1034 ++++++++++
 drivers/net/ntnic/nthw/core/nthw_mac_pcs.h    |  261 +++
 .../net/ntnic/nthw/core/nthw_mac_pcs_xxv.c    | 1631 ++++++++++++++++
 .../net/ntnic/nthw/core/nthw_mac_pcs_xxv.h    |  291 +++
 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.c  |  121 ++
 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.h  |   51 +
 drivers/net/ntnic/nthw/core/nthw_pci_ta.c     |   99 +
 drivers/net/ntnic/nthw/core/nthw_pci_ta.h     |   40 +
 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.c  |  127 ++
 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.h  |   55 +
 drivers/net/ntnic/nthw/core/nthw_pcie3.c      |  274 +++
 drivers/net/ntnic/nthw/core/nthw_pcie3.h      |  100 +
 drivers/net/ntnic/nthw/core/nthw_sdc.c        |  177 ++
 drivers/net/ntnic/nthw/core/nthw_sdc.h        |   43 +
 drivers/net/ntnic/nthw/core/nthw_si5340.c     |  206 ++
 drivers/net/ntnic/nthw/core/nthw_si5340.h     |   34 +
 drivers/net/ntnic/nthw/core/nthw_spi_v3.c     |  380 ++++
 drivers/net/ntnic/nthw/core/nthw_spi_v3.h     |  106 ++
 drivers/net/ntnic/nthw/core/nthw_spim.c       |  117 ++
 drivers/net/ntnic/nthw/core/nthw_spim.h       |   52 +
 drivers/net/ntnic/nthw/core/nthw_spis.c       |  147 ++
 drivers/net/ntnic/nthw/core/nthw_spis.h       |   63 +
 drivers/net/ntnic/nthw/core/nthw_tsm.c        |  179 ++
 drivers/net/ntnic/nthw/core/nthw_tsm.h        |   53 +
 drivers/net/ntnic/nthw/nthw_dbs.c             | 1301 +++++++++++++
 drivers/net/ntnic/nthw/nthw_dbs.h             |  313 +++
 drivers/net/ntnic/nthw/nthw_drv.h             |   82 +
 drivers/net/ntnic/nthw/nthw_epp.c             |  335 ++++
 drivers/net/ntnic/nthw/nthw_epp.h             |   99 +
 drivers/net/ntnic/nthw/nthw_fpga_model.c      | 1677 +++++++++++++++++
 drivers/net/ntnic/nthw/nthw_fpga_model.h      |  308 +++
 drivers/net/ntnic/nthw/nthw_helper.h          |   21 +
 drivers/net/ntnic/nthw/nthw_platform.c        |   35 +
 drivers/net/ntnic/nthw/nthw_platform_drv.h    |   42 +
 drivers/net/ntnic/nthw/nthw_profile.h         |   15 +
 drivers/net/ntnic/nthw/nthw_rac.c             |  976 ++++++++++
 drivers/net/ntnic/nthw/nthw_rac.h             |  161 ++
 drivers/net/ntnic/nthw/nthw_register.h        |    2 +
 drivers/net/ntnic/nthw/nthw_stat.c            |  266 +++
 drivers/net/ntnic/nthw/nthw_stat.h            |   72 +
 drivers/net/ntnic/ntlog/include/ntlog.h       |  162 ++
 drivers/net/ntnic/ntlog/ntlog.c               |  115 ++
 drivers/net/ntnic/ntutil/include/nt_util.h    |   71 +
 drivers/net/ntnic/ntutil/nt_util.c            |   77 +
 64 files changed, 15441 insertions(+)
 create mode 100644 drivers/net/ntnic/include/nthw_bus.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_clock_profiles.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_clock_profiles.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_core.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst9563.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gpio_phy.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gpio_phy.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_hif.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_hif.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_iic.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_iic.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_ta.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_ta.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pcie3.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_pcie3.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_sdc.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_sdc.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_si5340.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_si5340.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spi_v3.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spi_v3.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spim.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spim.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spis.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_spis.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_tsm.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_tsm.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_dbs.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_dbs.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_drv.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_epp.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_epp.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_fpga_model.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_fpga_model.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_helper.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_platform.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_platform_drv.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_profile.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_rac.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_rac.h
 create mode 100644 drivers/net/ntnic/nthw/nthw_stat.c
 create mode 100644 drivers/net/ntnic/nthw/nthw_stat.h
 create mode 100644 drivers/net/ntnic/ntlog/include/ntlog.h
 create mode 100644 drivers/net/ntnic/ntlog/ntlog.c
 create mode 100644 drivers/net/ntnic/ntutil/include/nt_util.h
 create mode 100644 drivers/net/ntnic/ntutil/nt_util.c
drivers/net/ntnic/include/nthw_bus.h new file +10 -0
new file mode 100644
index 0000000000..975cc95e78
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_BUS_H__
+#define __NTHW_BUS_H__
+
+typedef uint8_t rab_bus_id_t;
+
+#endif /* __NTHW_BUS_H__ */
drivers/net/ntnic/meson.build +32 -0
index 0e2c2d38cc..6f48af601f 100644
@@ -17,13 +17,45 @@ endif
 includes = [
     include_directories('.'),
     include_directories('include'),
+    include_directories('ntlog/include'),
+    include_directories('ntutil/include'),
     include_directories('nthw'),
+    include_directories('nthw/core'),
     include_directories('nthw/supported'),
 ]
 
 # all sources
 sources = files(
+    'nthw/core/nthw_clock_profiles.c',
+    'nthw/core/nthw_fpga.c',
+    'nthw/core/nthw_fpga_nt200a0x.c',
+    'nthw/core/nthw_fpga_rst.c',
+    'nthw/core/nthw_fpga_rst9563.c',
+    'nthw/core/nthw_fpga_rst_nt200a0x.c',
+    'nthw/core/nthw_gpio_phy.c',
+    'nthw/core/nthw_hif.c',
+    'nthw/core/nthw_iic.c',
+    'nthw/core/nthw_mac_pcs.c',
+    'nthw/core/nthw_mac_pcs_xxv.c',
+    'nthw/core/nthw_pci_rd_tg.c',
+    'nthw/core/nthw_pci_ta.c',
+    'nthw/core/nthw_pci_wr_tg.c',
+    'nthw/core/nthw_pcie3.c',
+    'nthw/core/nthw_sdc.c',
+    'nthw/core/nthw_si5340.c',
+    'nthw/core/nthw_spi_v3.c',
+    'nthw/core/nthw_spim.c',
+    'nthw/core/nthw_spis.c',
+    'nthw/core/nthw_tsm.c',
+    'nthw/nthw_fpga_model.c',
+    'nthw/nthw_dbs.c',
+    'nthw/nthw_epp.c',
+    'nthw/nthw_platform.c',
+    'nthw/nthw_rac.c',
+    'nthw/nthw_stat.c',
     'nthw/supported/nthw_fpga_9563_055_024_0000.c',
+    'ntlog/ntlog.c',
+    'ntutil/nt_util.c',
 )
 
 if is_variable('default_cflags')
drivers/net/ntnic/nthw/core/nthw_clock_profiles.c new file +9 -0
new file mode 100644
index 0000000000..efdcc222a8
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#include "nthw_clock_profiles.h"
+
+/* Clock profile for NT200A02 2x40G, 2x100G */
+const int n_data_si5340_nt200a02_u23_v5;
+const clk_profile_data_fmt2_t *p_data_si5340_nt200a02_u23_v5;
drivers/net/ntnic/nthw/core/nthw_clock_profiles.h new file +39 -0
new file mode 100644
index 0000000000..4252f69e92
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_CLOCK_PROFILES_H__
+#define __NTHW_CLOCK_PROFILES_H__
+
+#include <stdint.h>
+
+#include "nthw_helper.h"
+
+#define clk_profile_size_error_msg "size test failed"
+
+typedef struct {
+	unsigned char reg_addr;
+	unsigned char reg_val;
+	unsigned char reg_mask;
+} clk_profile_data_fmt0_t;
+
+typedef struct {
+	uint16_t reg_addr;
+	uint8_t reg_val;
+} clk_profile_data_fmt1_t;
+
+typedef struct {
+	unsigned int reg_addr;
+	unsigned char reg_val;
+} clk_profile_data_fmt2_t;
+
+typedef enum {
+	CLK_PROFILE_DATA_FMT_0,
+	CLK_PROFILE_DATA_FMT_1,
+	CLK_PROFILE_DATA_FMT_2
+} clk_profile_data_fmt_t;
+
+extern const int n_data_si5340_nt200a02_u23_v5;
+extern const  clk_profile_data_fmt2_t *p_data_si5340_nt200a02_u23_v5;
+
+#endif /* __NTHW_CLOCK_PROFILES_H__ */
drivers/net/ntnic/nthw/core/nthw_core.h new file +31 -0
new file mode 100644
index 0000000000..798a95d5cf
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_CORE_H__
+#define __NTHW_CORE_H__
+
+#include "nthw_helper.h"
+
+#include "nthw_platform_drv.h"
+#include "nthw_fpga_model.h"
+#include "nthw_hif.h"
+#include "nthw_pcie3.h"
+#include "nthw_pci_rd_tg.h"
+#include "nthw_pci_wr_tg.h"
+#include "nthw_pci_ta.h"
+#include "nthw_iic.h"
+
+#include "nthw_gpio_phy.h"
+#include "nthw_mac_pcs.h"
+#include "nthw_mac_pcs_xxv.h"
+#include "nthw_sdc.h"
+
+#include "nthw_spim.h"
+#include "nthw_spis.h"
+
+#include "nthw_tsm.h"
+
+#include "nthw_si5340.h"
+
+#endif /* __NTHW_CORE_H__ */
drivers/net/ntnic/nthw/core/nthw_fpga.c new file +914 -0

914 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga.h new file +47 -0

47 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.c new file +46 -0

46 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_nt200a0x.h new file +14 -0
new file mode 100644
index 0000000000..ff324bee39
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_FPGA_NT200A0X_H__
+#define __NTHW_FPGA_NT200A0X_H__
+
+int nthw_fpga_nt200a0x_init(struct fpga_info_s *p_fpga_info);
+
+/* NT200A02: 9563 */
+int nthw_fpga_rst9563_init(struct fpga_info_s *p_fpga_info,
+			  struct nthw_fpga_rst_nt200a0x *const p);
+
+#endif /* __NTHW_FPGA_NT200A0X_H__ */
drivers/net/ntnic/nthw/core/nthw_fpga_rst.c new file +10 -0
new file mode 100644
index 0000000000..66c148bab2
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#include "ntlog.h"
+
+#include "nthw_fpga.h"
+#include "nthw_fpga_nt200a0x.h"
+
+#include "nthw_fpga_rst.h"
drivers/net/ntnic/nthw/core/nthw_fpga_rst.h new file +17 -0
new file mode 100644
index 0000000000..2099c4b677
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef __NTHW_FPGA_RST_H__
+#define __NTHW_FPGA_RST_H__
+
+#include "nthw_drv.h"
+
+#include "nthw_fpga_model.h"
+
+#include "nthw_rac.h"
+#include "nthw_iic.h"
+
+#include "nthw_fpga_rst_nt200a0x.h"
+
+#endif /* __NTHW_FPGA_RST_H__ */
drivers/net/ntnic/nthw/core/nthw_fpga_rst9563.c new file +241 -0

241 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.c new file +674 -0

674 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_fpga_rst_nt200a0x.h new file +89 -0

89 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_gpio_phy.c new file +271 -0

271 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_gpio_phy.h new file +57 -0

57 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_hif.c new file +342 -0

342 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_hif.h new file +156 -0

144 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_iic.c new file +570 -0

570 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_iic.h new file +101 -0

101 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs.c new file +1034 -0

1,034 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs.h new file +261 -0

261 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.c new file +1631 -0

1,631 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_mac_pcs_xxv.h new file +291 -0

291 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.c new file +121 -0

121 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_rd_tg.h new file +51 -0

51 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_ta.c new file +99 -0

99 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_ta.h new file +40 -0
new file mode 100644
index 0000000000..7968cad9fa

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.c new file +127 -0

127 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pci_wr_tg.h new file +55 -0

55 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pcie3.c new file +274 -0

274 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_pcie3.h new file +100 -0

100 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_sdc.c new file +177 -0

177 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_sdc.h new file +43 -0

43 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_si5340.c new file +206 -0

206 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_si5340.h new file +34 -0
new file mode 100644
index 0000000000..f588b5b825

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_spi_v3.c new file +380 -0

380 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spi_v3.h new file +106 -0

106 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spim.c new file +117 -0

117 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spim.h new file +52 -0

52 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spis.c new file +147 -0

147 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_spis.h new file +63 -0

63 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_tsm.c new file +179 -0

179 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_tsm.h new file +53 -0

53 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_dbs.c new file +1301 -0

1,301 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_dbs.h new file +313 -0

313 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_drv.h new file +82 -0

82 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_epp.c new file +335 -0

335 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_epp.h new file +99 -0

99 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_fpga_model.c new file +1677 -0

1,677 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_fpga_model.h new file +308 -0

308 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_helper.h new file +21 -0
new file mode 100644
index 0000000000..22f6a0d471

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_platform.c new file +35 -0
new file mode 100644
index 0000000000..203947e03a

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_platform_drv.h new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_profile.h new file +15 -0
new file mode 100644
index 0000000000..2fcb7b4adf

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_rac.c new file +976 -0

976 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_rac.h new file +161 -0

161 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_register.h +2 -0
index 5cdbd9fc5d..4fe3496b9f 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/nthw_stat.c new file +266 -0

266 lines not on this page · raw message

drivers/net/ntnic/nthw/nthw_stat.h new file +72 -0

72 lines not on this page · raw message

drivers/net/ntnic/ntlog/include/ntlog.h new file +162 -0

162 lines not on this page · raw message

drivers/net/ntnic/ntlog/ntlog.c new file +115 -0

115 lines not on this page · raw message

drivers/net/ntnic/ntutil/include/nt_util.h new file +71 -0

71 lines not on this page · raw message

drivers/net/ntnic/ntutil/nt_util.c new file +77 -0

77 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#39 lore raw

PATCH v6 3/8 net/ntnic: adds NT200A02 adapter support

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The PMD is designed to support multiple different adapters, and this commit adds support for NT200A02 2x100G. Sensor and NIM code is included.

---
v2:
* Fixed WARNING:TYPO_SPELLING

---
 .../net/ntnic/adapter/common_adapter_defs.h   |   14 +
 drivers/net/ntnic/adapter/nt4ga_adapter.c     |  477 ++++
 drivers/net/ntnic/adapter/nt4ga_adapter.h     |  108 +
 drivers/net/ntnic/adapter/nt4ga_filter.h      |   15 +
 drivers/net/ntnic/adapter/nt4ga_link.c        |  178 ++
 drivers/net/ntnic/adapter/nt4ga_link.h        |  179 ++
 drivers/net/ntnic/adapter/nt4ga_link_100g.c   |  825 +++++++
 drivers/net/ntnic/adapter/nt4ga_link_100g.h   |   12 +
 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.c   |  598 +++++
 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.h   |   41 +
 drivers/net/ntnic/adapter/nt4ga_stat.c        |  705 ++++++
 drivers/net/ntnic/adapter/nt4ga_stat.h        |  202 ++
 drivers/net/ntnic/meson.build                 |   24 +
 drivers/net/ntnic/nim/i2c_nim.c               | 1974 +++++++++++++++++
 drivers/net/ntnic/nim/i2c_nim.h               |  122 +
 drivers/net/ntnic/nim/nim_defines.h           |  146 ++
 drivers/net/ntnic/nim/nt_link_speed.c         |  105 +
 drivers/net/ntnic/nim/nt_link_speed.h         |   34 +
 drivers/net/ntnic/nim/qsfp_registers.h        |   57 +
 drivers/net/ntnic/nim/qsfp_sensors.c          |  174 ++
 drivers/net/ntnic/nim/qsfp_sensors.h          |   18 +
 drivers/net/ntnic/nim/sfp_p_registers.h       |  100 +
 drivers/net/ntnic/nim/sfp_sensors.c           |  288 +++
 drivers/net/ntnic/nim/sfp_sensors.h           |   18 +
 .../net/ntnic/nthw/core/nthw_clock_profiles.c |   11 +-
 drivers/net/ntnic/nthw/core/nthw_core.h       |    2 +
 drivers/net/ntnic/nthw/core/nthw_gmf.c        |  290 +++
 drivers/net/ntnic/nthw/core/nthw_gmf.h        |   93 +
 .../nthw/core/nthw_nt200a02_u23_si5340_v5.h   |  344 +++
 drivers/net/ntnic/nthw/core/nthw_rmc.c        |  156 ++
 drivers/net/ntnic/nthw/core/nthw_rmc.h        |   57 +
 .../ntnic/sensors/avr_sensors/avr_sensors.c   |  104 +
 .../ntnic/sensors/avr_sensors/avr_sensors.h   |   22 +
 .../sensors/board_sensors/board_sensors.c     |   48 +
 .../sensors/board_sensors/board_sensors.h     |   18 +
 .../net/ntnic/sensors/board_sensors/tempmon.c |   42 +
 .../net/ntnic/sensors/board_sensors/tempmon.h |   16 +
 .../ntnic/sensors/nim_sensors/nim_sensors.c   |   54 +
 .../ntnic/sensors/nim_sensors/nim_sensors.h   |   19 +
 drivers/net/ntnic/sensors/ntavr/avr_intf.h    |   89 +
 drivers/net/ntnic/sensors/ntavr/ntavr.c       |   78 +
 drivers/net/ntnic/sensors/ntavr/ntavr.h       |   32 +
 drivers/net/ntnic/sensors/sensor_types.h      |  259 +++
 drivers/net/ntnic/sensors/sensors.c           |  273 +++
 drivers/net/ntnic/sensors/sensors.h           |  127 ++
 drivers/net/ntnic/sensors/stream_info.h       |   86 +
 46 files changed, 8632 insertions(+), 2 deletions(-)
 create mode 100644 drivers/net/ntnic/adapter/common_adapter_defs.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_adapter.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_adapter.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_filter.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link_100g.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_link_100g.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.h
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_stat.c
 create mode 100644 drivers/net/ntnic/adapter/nt4ga_stat.h
 create mode 100644 drivers/net/ntnic/nim/i2c_nim.c
 create mode 100644 drivers/net/ntnic/nim/i2c_nim.h
 create mode 100644 drivers/net/ntnic/nim/nim_defines.h
 create mode 100644 drivers/net/ntnic/nim/nt_link_speed.c
 create mode 100644 drivers/net/ntnic/nim/nt_link_speed.h
 create mode 100644 drivers/net/ntnic/nim/qsfp_registers.h
 create mode 100644 drivers/net/ntnic/nim/qsfp_sensors.c
 create mode 100644 drivers/net/ntnic/nim/qsfp_sensors.h
 create mode 100644 drivers/net/ntnic/nim/sfp_p_registers.h
 create mode 100644 drivers/net/ntnic/nim/sfp_sensors.c
 create mode 100644 drivers/net/ntnic/nim/sfp_sensors.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gmf.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_gmf.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_nt200a02_u23_si5340_v5.h
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_rmc.c
 create mode 100644 drivers/net/ntnic/nthw/core/nthw_rmc.h
 create mode 100644 drivers/net/ntnic/sensors/avr_sensors/avr_sensors.c
 create mode 100644 drivers/net/ntnic/sensors/avr_sensors/avr_sensors.h
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/board_sensors.c
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/board_sensors.h
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/tempmon.c
 create mode 100644 drivers/net/ntnic/sensors/board_sensors/tempmon.h
 create mode 100644 drivers/net/ntnic/sensors/nim_sensors/nim_sensors.c
 create mode 100644 drivers/net/ntnic/sensors/nim_sensors/nim_sensors.h
 create mode 100644 drivers/net/ntnic/sensors/ntavr/avr_intf.h
 create mode 100644 drivers/net/ntnic/sensors/ntavr/ntavr.c
 create mode 100644 drivers/net/ntnic/sensors/ntavr/ntavr.h
 create mode 100644 drivers/net/ntnic/sensors/sensor_types.h
 create mode 100644 drivers/net/ntnic/sensors/sensors.c
 create mode 100644 drivers/net/ntnic/sensors/sensors.h
 create mode 100644 drivers/net/ntnic/sensors/stream_info.h
drivers/net/ntnic/adapter/common_adapter_defs.h new file +14 -0
new file mode 100644
index 0000000000..79167806f1
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef _COMMON_ADAPTER_DEFS_H_
+#define _COMMON_ADAPTER_DEFS_H_
+
+/*
+ * Declarations shared by NT adapter types.
+ */
+#define NUM_ADAPTER_MAX (8)
+#define NUM_ADAPTER_PORTS_MAX (128)
+
+#endif /* _COMMON_ADAPTER_DEFS_H_ */
drivers/net/ntnic/adapter/nt4ga_adapter.c new file +477 -0

477 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_adapter.h new file +108 -0

108 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_filter.h new file +15 -0
new file mode 100644
index 0000000000..ad7e7d8c71
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef NT4GA_FILTER_H_
+#define NT4GA_FILTER_H_
+
+typedef struct nt4ga_filter_s {
+	int n_intf_cnt;
+	int n_queues_per_intf_cnt;
+
+	struct flow_nic_dev *mp_flow_device;
+} nt4ga_filter_t;
+
+#endif /* NT4GA_FILTER_H_ */
drivers/net/ntnic/adapter/nt4ga_link.c new file +178 -0

178 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_link.h new file +179 -0

179 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_link_100g.c new file +825 -0

825 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_link_100g.h new file +12 -0
new file mode 100644
index 0000000000..803b3454b7
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
+
+#ifndef NT4GA_LINK_100G_H_
+#define NT4GA_LINK_100G_H_
+
+#include "nthw_drv.h"
+
+int nt4ga_link_100g_ports_init(adapter_info_t *p_adapter_info, nt_fpga_t *p_fpga);
+
+#endif /* NT4GA_LINK_100G_H_ */
drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.c new file +598 -0

598 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_pci_ta_tg.h new file +41 -0

41 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_stat.c new file +705 -0

553 lines not on this page · raw message

drivers/net/ntnic/adapter/nt4ga_stat.h new file +202 -0

202 lines not on this page · raw message

drivers/net/ntnic/meson.build +24 -0
index 6f48af601f..1571111bce 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nim/i2c_nim.c new file +1974 -0

1,974 lines not on this page · raw message

drivers/net/ntnic/nim/i2c_nim.h new file +122 -0

122 lines not on this page · raw message

drivers/net/ntnic/nim/nim_defines.h new file +146 -0

146 lines not on this page · raw message

drivers/net/ntnic/nim/nt_link_speed.c new file +105 -0

105 lines not on this page · raw message

drivers/net/ntnic/nim/nt_link_speed.h new file +34 -0
new file mode 100644
index 0000000000..969e3fb867

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nim/qsfp_registers.h new file +57 -0

57 lines not on this page · raw message

drivers/net/ntnic/nim/qsfp_sensors.c new file +174 -0

174 lines not on this page · raw message

drivers/net/ntnic/nim/qsfp_sensors.h new file +18 -0
new file mode 100644
index 0000000000..de64b978cb

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nim/sfp_p_registers.h new file +100 -0

100 lines not on this page · raw message

drivers/net/ntnic/nim/sfp_sensors.c new file +288 -0

288 lines not on this page · raw message

drivers/net/ntnic/nim/sfp_sensors.h new file +18 -0
new file mode 100644
index 0000000000..ab56027dc8

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_clock_profiles.c +9 -2
index efdcc222a8..bd7cd2a27c 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_core.h +2 -0
index 798a95d5cf..025b6b61cc 100644

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/core/nthw_gmf.c new file +290 -0

290 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_gmf.h new file +93 -0

93 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_nt200a02_u23_si5340_v5.h new file +344 -0

344 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_rmc.c new file +156 -0

156 lines not on this page · raw message

drivers/net/ntnic/nthw/core/nthw_rmc.h new file +57 -0

57 lines not on this page · raw message

drivers/net/ntnic/sensors/avr_sensors/avr_sensors.c new file +104 -0

104 lines not on this page · raw message

drivers/net/ntnic/sensors/avr_sensors/avr_sensors.h new file +22 -0
new file mode 100644
index 0000000000..b8c37a12cb

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/board_sensors/board_sensors.c new file +48 -0

48 lines not on this page · raw message

drivers/net/ntnic/sensors/board_sensors/board_sensors.h new file +18 -0
new file mode 100644
index 0000000000..a7f75b7ae4

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/board_sensors/tempmon.c new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/sensors/board_sensors/tempmon.h new file +16 -0
new file mode 100644
index 0000000000..6f2017b714

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/nim_sensors/nim_sensors.c new file +54 -0

54 lines not on this page · raw message

drivers/net/ntnic/sensors/nim_sensors/nim_sensors.h new file +19 -0
new file mode 100644
index 0000000000..c68c9aa924

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/ntavr/avr_intf.h new file +89 -0

89 lines not on this page · raw message

drivers/net/ntnic/sensors/ntavr/ntavr.c new file +78 -0

78 lines not on this page · raw message

drivers/net/ntnic/sensors/ntavr/ntavr.h new file +32 -0
new file mode 100644
index 0000000000..b7a7aeb908

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/sensors/sensor_types.h new file +259 -0

259 lines not on this page · raw message

drivers/net/ntnic/sensors/sensors.c new file +273 -0

273 lines not on this page · raw message

drivers/net/ntnic/sensors/sensors.h new file +127 -0

127 lines not on this page · raw message

drivers/net/ntnic/sensors/stream_info.h new file +86 -0

86 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#40 lore raw

PATCH v6 4/8 net/ntnic: adds flow related FPGA functionality

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The PMD will control the registers used for flow programming, and this commit adds support for this.

---
v2:
* Fixed compilation with Fedora 38

---
 drivers/net/ntnic/meson.build                 |   21 +
 .../ntnic/nthw/flow_filter/flow_nthw_cat.c    | 1107 ++++++++++++++++
 .../ntnic/nthw/flow_filter/flow_nthw_cat.h    |  372 ++++++
 .../ntnic/nthw/flow_filter/flow_nthw_csu.c    |  146 +++
 .../ntnic/nthw/flow_filter/flow_nthw_csu.h    |   42 +
 .../ntnic/nthw/flow_filter/flow_nthw_flm.c    | 1140 +++++++++++++++++
 .../ntnic/nthw/flow_filter/flow_nthw_flm.h    |  422 ++++++
 .../ntnic/nthw/flow_filter/flow_nthw_hfu.c    |  293 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_hfu.h    |  100 ++
 .../ntnic/nthw/flow_filter/flow_nthw_hsh.c    |  254 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_hsh.h    |   81 ++
 .../ntnic/nthw/flow_filter/flow_nthw_hst.c    |  202 +++
 .../ntnic/nthw/flow_filter/flow_nthw_hst.h    |   72 ++
 .../ntnic/nthw/flow_filter/flow_nthw_ifr.c    |   93 ++
 .../ntnic/nthw/flow_filter/flow_nthw_ifr.h    |   39 +
 .../ntnic/nthw/flow_filter/flow_nthw_info.c   |  341 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_info.h   |  104 ++
 .../ntnic/nthw/flow_filter/flow_nthw_ioa.c    |  234 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_ioa.h    |   80 ++
 .../net/ntnic/nthw/flow_filter/flow_nthw_km.c |  685 ++++++++++
 .../net/ntnic/nthw/flow_filter/flow_nthw_km.h |  224 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_pdb.c    |  230 ++++
 .../ntnic/nthw/flow_filter/flow_nthw_pdb.h    |   84 ++
 .../ntnic/nthw/flow_filter/flow_nthw_qsl.c    |  355 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_qsl.h    |  121 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rmc.c    |  112 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rmc.h    |   40 +
 .../ntnic/nthw/flow_filter/flow_nthw_roa.c    |  294 +++++
 .../ntnic/nthw/flow_filter/flow_nthw_roa.h    |  109 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c |  132 ++
 .../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h |   53 +
 .../ntnic/nthw/flow_filter/flow_nthw_slc.c    |  109 ++
 .../ntnic/nthw/flow_filter/flow_nthw_slc.h    |   46 +
 .../ntnic/nthw/flow_filter/flow_nthw_slc_lr.c |  109 ++
 .../ntnic/nthw/flow_filter/flow_nthw_slc_lr.h |   46 +
 .../ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c |  394 ++++++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h |   72 ++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_ins.c |   96 ++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_ins.h |   42 +
 .../ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c |  165 +++
 .../ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h |   70 +
 41 files changed, 8731 insertions(+)
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h
drivers/net/ntnic/meson.build +21 -0
index 1571111bce..c4f0a912d3 100644
@@ -24,6 +24,7 @@ includes = [
     include_directories('nthw'),
     include_directories('nthw/core'),
     include_directories('nthw/supported'),
+    include_directories('nthw/flow_filter'),
     include_directories('sensors'),
     include_directories('sensors/avr_sensors'),
     include_directories('sensors/board_sensors'),
@@ -65,6 +66,26 @@ sources = files(
     'nthw/core/nthw_spim.c',
     'nthw/core/nthw_spis.c',
     'nthw/core/nthw_tsm.c',
+    'nthw/flow_filter/flow_nthw_cat.c',
+    'nthw/flow_filter/flow_nthw_csu.c',
+    'nthw/flow_filter/flow_nthw_flm.c',
+    'nthw/flow_filter/flow_nthw_hfu.c',
+    'nthw/flow_filter/flow_nthw_hsh.c',
+    'nthw/flow_filter/flow_nthw_hst.c',
+    'nthw/flow_filter/flow_nthw_ifr.c',
+    'nthw/flow_filter/flow_nthw_info.c',
+    'nthw/flow_filter/flow_nthw_ioa.c',
+    'nthw/flow_filter/flow_nthw_km.c',
+    'nthw/flow_filter/flow_nthw_pdb.c',
+    'nthw/flow_filter/flow_nthw_qsl.c',
+    'nthw/flow_filter/flow_nthw_rmc.c',
+    'nthw/flow_filter/flow_nthw_roa.c',
+    'nthw/flow_filter/flow_nthw_rpp_lr.c',
+    'nthw/flow_filter/flow_nthw_slc.c',
+    'nthw/flow_filter/flow_nthw_slc_lr.c',
+    'nthw/flow_filter/flow_nthw_tx_cpy.c',
+    'nthw/flow_filter/flow_nthw_tx_ins.c',
+    'nthw/flow_filter/flow_nthw_tx_rpl.c',
     'nthw/nthw_fpga_model.c',
     'nthw/nthw_dbs.c',
     'nthw/nthw_epp.c',
drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c new file +1107 -0

1,107 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.h new file +372 -0

372 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c new file +146 -0

146 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.h new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.c new file +1140 -0

1,140 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.h new file +422 -0

160 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.c new file +293 -0

293 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.h new file +100 -0

100 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c new file +254 -0

254 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h new file +81 -0

81 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.c new file +202 -0

202 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_hst.h new file +72 -0

72 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c new file +93 -0

93 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h new file +39 -0
new file mode 100644
index 0000000000..626ca3d193

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.c new file +341 -0

341 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.h new file +104 -0

104 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.c new file +234 -0

234 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_ioa.h new file +80 -0

80 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.c new file +685 -0

685 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.h new file +224 -0

224 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.c new file +230 -0

230 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.h new file +84 -0

84 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.c new file +355 -0

355 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.h new file +121 -0

121 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.c new file +112 -0

112 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rmc.h new file +40 -0
new file mode 100644
index 0000000000..57d5776002

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.c new file +294 -0

294 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_roa.h new file +109 -0

109 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c new file +132 -0

132 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h new file +53 -0

53 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.c new file +109 -0

109 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc.h new file +46 -0

46 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.c new file +109 -0

109 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.h new file +46 -0

46 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c new file +394 -0

394 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h new file +72 -0

72 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.c new file +96 -0

96 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.h new file +42 -0

42 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c new file +165 -0

165 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h new file +70 -0

70 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#41 lore raw

PATCH v6 5/8 net/ntnic: adds FPGA abstraction layer

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

The FPGA abstraction layer limits the need to rewrite flow logic when new FPGA modules are created.

---
v2:
* Fixed compilation with Fedora 38
* Fixed WARNING:TYPO_SPELLING

---
 drivers/net/ntnic/meson.build                 |   21 +
 .../ntnic/nthw/flow_api/flow_api_actions.c    |  205 ++
 .../ntnic/nthw/flow_api/flow_api_actions.h    |  284 +++
 .../ntnic/nthw/flow_api/flow_api_backend.c    |  182 ++
 .../ntnic/nthw/flow_api/flow_api_backend.h    | 1818 +++++++++++++++++
 .../net/ntnic/nthw/flow_api/flow_api_engine.h |  475 +++++
 .../ntnic/nthw/flow_api/flow_api_nic_setup.h  |   32 +
 .../nthw/flow_api/flow_engine/flow_group.c    |  125 ++
 .../nthw/flow_api/flow_engine/flow_hasher.c   |  213 ++
 .../nthw/flow_api/flow_engine/flow_hasher.h   |   20 +
 .../nthw/flow_api/flow_engine/flow_kcc.c      |  434 ++++
 .../ntnic/nthw/flow_api/flow_engine/flow_km.c | 1434 +++++++++++++
 .../nthw/flow_api/flow_engine/flow_tunnel.c   |  787 +++++++
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c   | 1789 ++++++++++++++++
 .../nthw/flow_api/hw_mod/hw_mod_cat_v18.h     |  138 ++
 .../nthw/flow_api/hw_mod/hw_mod_cat_v21.h     |   88 +
 .../nthw/flow_api/hw_mod/hw_mod_cat_v22.h     |   83 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c   | 1099 ++++++++++
 .../nthw/flow_api/hw_mod/hw_mod_flm_v17.h     |  274 +++
 .../nthw/flow_api/hw_mod/hw_mod_flm_v20.h     |  102 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c   |  195 ++
 .../nthw/flow_api/hw_mod/hw_mod_hsh_v5.h      |   36 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c   |  178 ++
 .../nthw/flow_api/hw_mod/hw_mod_hst_v2.h      |   32 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c   |  271 +++
 .../nthw/flow_api/hw_mod/hw_mod_ioa_v4.h      |   36 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_km.c    |  629 ++++++
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h |   93 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c   |  219 ++
 .../nthw/flow_api/hw_mod/hw_mod_pdb_v9.h      |   39 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c   |  348 ++++
 .../nthw/flow_api/hw_mod/hw_mod_qsl_v7.h      |   45 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c   |  112 +
 .../nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h    |   20 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c   |  358 ++++
 .../nthw/flow_api/hw_mod/hw_mod_roa_v6.h      |   49 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c   |  132 ++
 .../nthw/flow_api/hw_mod/hw_mod_slc_lr.c      |  132 ++
 .../nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h   |   19 +
 .../nthw/flow_api/hw_mod/hw_mod_slc_v1.h      |   19 +
 .../ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c   |  983 +++++++++
 .../nthw/flow_api/hw_mod/hw_mod_tpe_v1.h      |  103 +
 .../nthw/flow_api/hw_mod/hw_mod_tpe_v2.h      |   37 +
 .../nthw/flow_api/stream_binary_flow_api.h    |  697 +++++++
 44 files changed, 14385 insertions(+)
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_actions.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_actions.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_backend.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_backend.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_engine.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_nic_setup.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_group.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_kcc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_km.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_engine/flow_tunnel.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v18.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v21.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v22.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v17.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v20.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh_v5.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst_v2.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa_v4.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb_v9.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl_v7.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa_v6.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_v1.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v1.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v2.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/stream_binary_flow_api.h
drivers/net/ntnic/meson.build +21 -0
index c4f0a912d3..b816021b11 100644
@@ -24,6 +24,7 @@ includes = [
     include_directories('nthw'),
     include_directories('nthw/core'),
     include_directories('nthw/supported'),
+    include_directories('nthw/flow_api'),
     include_directories('nthw/flow_filter'),
     include_directories('sensors'),
     include_directories('sensors/avr_sensors'),
@@ -66,6 +67,26 @@ sources = files(
     'nthw/core/nthw_spim.c',
     'nthw/core/nthw_spis.c',
     'nthw/core/nthw_tsm.c',
+    'nthw/flow_api/flow_api_actions.c',
+    'nthw/flow_api/flow_api_backend.c',
+    'nthw/flow_api/flow_engine/flow_group.c',
+    'nthw/flow_api/flow_engine/flow_hasher.c',
+    'nthw/flow_api/flow_engine/flow_kcc.c',
+    'nthw/flow_api/flow_engine/flow_km.c',
+    'nthw/flow_api/flow_engine/flow_tunnel.c',
+    'nthw/flow_api/hw_mod/hw_mod_cat.c',
+    'nthw/flow_api/hw_mod/hw_mod_flm.c',
+    'nthw/flow_api/hw_mod/hw_mod_hsh.c',
+    'nthw/flow_api/hw_mod/hw_mod_hst.c',
+    'nthw/flow_api/hw_mod/hw_mod_ioa.c',
+    'nthw/flow_api/hw_mod/hw_mod_km.c',
+    'nthw/flow_api/hw_mod/hw_mod_pdb.c',
+    'nthw/flow_api/hw_mod/hw_mod_qsl.c',
+    'nthw/flow_api/hw_mod/hw_mod_rmc.c',
+    'nthw/flow_api/hw_mod/hw_mod_roa.c',
+    'nthw/flow_api/hw_mod/hw_mod_slc.c',
+    'nthw/flow_api/hw_mod/hw_mod_slc_lr.c',
+    'nthw/flow_api/hw_mod/hw_mod_tpe.c',
     'nthw/flow_filter/flow_nthw_cat.c',
     'nthw/flow_filter/flow_nthw_csu.c',
     'nthw/flow_filter/flow_nthw_flm.c',
drivers/net/ntnic/nthw/flow_api/flow_api_actions.c new file +205 -0

205 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_actions.h new file +284 -0

284 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_backend.c new file +182 -0

182 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_backend.h new file +1818 -0

1,818 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_engine.h new file +475 -0

475 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_nic_setup.h new file +32 -0
new file mode 100644
index 0000000000..c4db0f4c5c
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Napatech A/S
+ */
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_group.c new file +125 -0

125 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.c new file +213 -0

213 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_hasher.h new file +20 -0
new file mode 100644
index 0000000000..6365a396d2

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_kcc.c new file +434 -0

434 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_km.c new file +1434 -0

1,434 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_engine/flow_tunnel.c new file +787 -0

787 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c new file +1789 -0

1,789 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v18.h new file +138 -0

138 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v21.h new file +88 -0

88 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat_v22.h new file +83 -0

83 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c new file +1099 -0

1,099 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v17.h new file +274 -0

274 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm_v20.h new file +102 -0

102 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c new file +195 -0

195 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh_v5.h new file +36 -0
new file mode 100644
index 0000000000..8588750ff0

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst.c new file +178 -0

178 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hst_v2.h new file +32 -0
new file mode 100644
index 0000000000..230c70b56d

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa.c new file +271 -0

271 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_ioa_v4.h new file +36 -0
new file mode 100644
index 0000000000..309b53ff76

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c new file +629 -0

629 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km_v7.h new file +93 -0

93 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c new file +219 -0

219 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb_v9.h new file +39 -0
new file mode 100644
index 0000000000..b14c10bc53

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c new file +348 -0

348 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl_v7.h new file +45 -0

45 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc.c new file +112 -0

112 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_rmc_v1_3.h new file +20 -0
new file mode 100644
index 0000000000..8f90695821

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa.c new file +358 -0

358 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_roa_v6.h new file +49 -0

49 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc.c new file +132 -0

132 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr.c new file +132 -0

132 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr_v2.h new file +19 -0
new file mode 100644
index 0000000000..d03b206e6d

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_v1.h new file +19 -0
new file mode 100644
index 0000000000..01f60bfb18

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c new file +983 -0

983 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v1.h new file +103 -0

103 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe_v2.h new file +37 -0
new file mode 100644
index 0000000000..c56cad8d89

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_api/stream_binary_flow_api.h new file +697 -0

697 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.

#42 lore raw

PATCH v6 6/8 net/ntnic: adds flow logic

In reply to Mykola Kostenok

From: Christian Koue Muf <[email protected]>

This logic layer takes rte_flow style patterns and actions as input, and programs the FPGA accordingly.

---
v2:
* Fixed WARNING:TYPO_SPELLING

---
 drivers/net/ntnic/adapter/nt4ga_adapter.c     |   13 +
 drivers/net/ntnic/adapter/nt4ga_stat.c        |   20 +-
 drivers/net/ntnic/meson.build                 |    4 +
 drivers/net/ntnic/nthw/flow_api/flow_api.c    | 1306 +++++
 drivers/net/ntnic/nthw/flow_api/flow_api.h    |  291 +
 .../nthw/flow_api/flow_api_profile_inline.c   | 5118 +++++++++++++++++
 .../nthw/flow_api/flow_api_profile_inline.h   |   56 +
 .../net/ntnic/nthw/flow_filter/flow_backend.c | 3205 +++++++++++
 .../net/ntnic/nthw/flow_filter/flow_backend.h |   15 +
 .../net/ntnic/nthw/flow_filter/flow_filter.c  |   39 +
 .../net/ntnic/nthw/flow_filter/flow_filter.h  |   16 +
 11 files changed, 10078 insertions(+), 5 deletions(-)
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api.h
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.c
 create mode 100644 drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_backend.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_backend.h
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_filter.c
 create mode 100644 drivers/net/ntnic/nthw/flow_filter/flow_filter.h
drivers/net/ntnic/adapter/nt4ga_adapter.c +13 -0
index 259aae2831..f9493202c3 100644
@@ -10,6 +10,8 @@
 #include "nt4ga_pci_ta_tg.h"
 #include "nt4ga_link_100g.h"
 
+#include "flow_filter.h"
+
 /* Sensors includes */
 #include "board_sensors.h"
 #include "avr_sensors.h"
@@ -306,6 +308,17 @@ int nt4ga_adapter_init(struct adapter_info_s *p_adapter_info)
 	n_nim_ports = fpga_info->n_nims;
 	assert(n_nim_ports >= 1);
 
+	/* Nt4ga Init Filter */
+	nt4ga_filter_t *p_filter = &p_adapter_info->nt4ga_filter;
+
+	res = flow_filter_init(p_fpga, &p_filter->mp_flow_device,
+			     p_adapter_info->adapter_no);
+	if (res != 0) {
+		NT_LOG(ERR, ETHDEV, "%s: Cannot initialize filter\n",
+		       p_adapter_id_str);
+		return res;
+	}
+
 	/*
 	 * HIF/PCI TA/TG
 	 */
drivers/net/ntnic/adapter/nt4ga_stat.c +15 -5
index b61c73ea12..2c822c6b97 100644
@@ -7,6 +7,7 @@
 #include "nthw_drv.h"
 #include "nthw_fpga.h"
 #include "nt4ga_adapter.h"
+#include "flow_filter.h"
 
 #define NO_FLAGS 0
 
@@ -16,12 +17,13 @@ static inline uint64_t timestamp2ns(uint64_t ts)
 	return ((ts >> 32) * 1000000000) + (ts & 0xffffffff);
 }
 
-static int nt4ga_stat_collect_cap_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
+static int nt4ga_stat_collect_cap_v1_stats(struct adapter_info_s *p_adapter_info,
+				   nt4ga_stat_t *p_nt4ga_stat,
 				   uint32_t *p_stat_dma_virtual);
 static int nt4ga_stat_collect_virt_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
 				    uint32_t *p_stat_dma_virtual);
 
-int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info _unused,
+int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info,
 		      nt4ga_stat_t *p_nt4ga_stat)
 {
 	nthw_stat_t *p_nthw_stat = p_nt4ga_stat->mp_nthw_stat;
@@ -39,7 +41,7 @@ int nt4ga_stat_collect(struct adapter_info_s *p_adapter_info _unused,
 	} else {
 		p_nt4ga_stat->last_timestamp =
 			timestamp2ns(*p_nthw_stat->mp_timestamp);
-		nt4ga_stat_collect_cap_v1_stats(p_nt4ga_stat,
+		nt4ga_stat_collect_cap_v1_stats(p_adapter_info, p_nt4ga_stat,
 					       p_nt4ga_stat->p_stat_dma_virtual);
 	}
 	return 0;
@@ -198,7 +200,9 @@ int nt4ga_stat_setup(struct adapter_info_s *p_adapter_info)
 			return -1;
 		}
 
-		p_nt4ga_stat->flm_stat_ver = 0;
+		struct flow_nic_dev *ndev =
+				p_adapter_info->nt4ga_filter.mp_flow_device;
+		p_nt4ga_stat->flm_stat_ver = ndev->be.flm.ver;
 
 		p_nt4ga_stat->mp_stat_structs_flm =
 			calloc(1, sizeof(struct flm_counters_v1));
@@ -394,10 +398,12 @@ static int nt4ga_stat_collect_virt_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
 }
 
 /* Called with stat mutex locked */
-static int nt4ga_stat_collect_cap_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
+static int nt4ga_stat_collect_cap_v1_stats(struct adapter_info_s *p_adapter_info,
+					   nt4ga_stat_t *p_nt4ga_stat,
 					   uint32_t *p_stat_dma_virtual)
 {
 	nthw_stat_t *p_nthw_stat = p_nt4ga_stat->mp_nthw_stat;
+	struct flow_nic_dev *ndev = p_adapter_info->nt4ga_filter.mp_flow_device;
 
 	const int n_rx_ports = p_nt4ga_stat->mn_rx_ports;
 	const int n_tx_ports = p_nt4ga_stat->mn_tx_ports;
@@ -701,5 +707,9 @@ static int nt4ga_stat_collect_cap_v1_stats(nt4ga_stat_t *p_nt4ga_stat,
 		p_nt4ga_stat->a_port_tx_drops_total[p] += new_drop_events_sum;
 	}
 
+	/* _update and get FLM stats */
+	flow_get_flm_stats(ndev, (uint64_t *)p_nt4ga_stat->mp_stat_structs_flm,
+			   sizeof(struct flm_counters_v1) / sizeof(uint64_t));
+
 	return 0;
 }
drivers/net/ntnic/meson.build +4 -0
index b816021b11..0b5ca13e48 100644
@@ -67,8 +67,10 @@ sources = files(
     'nthw/core/nthw_spim.c',
     'nthw/core/nthw_spis.c',
     'nthw/core/nthw_tsm.c',
+    'nthw/flow_api/flow_api.c',
     'nthw/flow_api/flow_api_actions.c',
     'nthw/flow_api/flow_api_backend.c',
+    'nthw/flow_api/flow_api_profile_inline.c',
     'nthw/flow_api/flow_engine/flow_group.c',
     'nthw/flow_api/flow_engine/flow_hasher.c',
     'nthw/flow_api/flow_engine/flow_kcc.c',
@@ -87,6 +89,8 @@ sources = files(
     'nthw/flow_api/hw_mod/hw_mod_slc.c',
     'nthw/flow_api/hw_mod/hw_mod_slc_lr.c',
     'nthw/flow_api/hw_mod/hw_mod_tpe.c',
+    'nthw/flow_filter/flow_backend.c',
+    'nthw/flow_filter/flow_filter.c',
     'nthw/flow_filter/flow_nthw_cat.c',
     'nthw/flow_filter/flow_nthw_csu.c',
     'nthw/flow_filter/flow_nthw_flm.c',
drivers/net/ntnic/nthw/flow_api/flow_api.c new file +1306 -0

1,306 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api.h new file +291 -0

291 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.c new file +5118 -0

1,298 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_api/flow_api_profile_inline.h new file +56 -0

56 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_backend.c new file +3205 -0

3,205 lines not on this page · raw message

drivers/net/ntnic/nthw/flow_filter/flow_backend.h new file +15 -0
new file mode 100644
index 0000000000..17fdcada3f

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_filter.c new file +39 -0
new file mode 100644
index 0000000000..90aeb71bd7

Lines of this file are not shown. View the raw message.

drivers/net/ntnic/nthw/flow_filter/flow_filter.h new file +16 -0
new file mode 100644
index 0000000000..8ea21a614a

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.3

Part of the diff is not shown here. View the raw message.