1 /* 2 * SPDX-License-Identifier: BSD-3-Clause 3 * Copyright(c) 2023 Napatech A/S 4 */ 5 6 #ifndef _NT4GA_ADAPTER_H_ 7 #define _NT4GA_ADAPTER_H_ 8 9 #include "ntnic_stat.h" 10 #include "nt4ga_link.h" 11 12 typedef struct hw_info_s { 13 /* pciids */ 14 uint16_t pci_vendor_id; 15 uint16_t pci_device_id; 16 uint16_t pci_sub_vendor_id; 17 uint16_t pci_sub_device_id; 18 uint16_t pci_class_id; 19 20 /* Derived from pciid */ 21 nthw_adapter_id_t n_nthw_adapter_id; 22 int hw_platform_id; 23 int hw_product_type; 24 int hw_reserved1; 25 } hw_info_t; 26 27 /* 28 * Services provided by the adapter module 29 */ 30 #include "nt4ga_filter.h" 31 32 typedef struct adapter_info_s { 33 struct nt4ga_stat_s nt4ga_stat; 34 struct nt4ga_filter_s nt4ga_filter; 35 struct nt4ga_link_s nt4ga_link; 36 37 struct hw_info_s hw_info; 38 struct fpga_info_s fpga_info; 39 40 char *mp_port_id_str[NUM_ADAPTER_PORTS_MAX]; 41 char *mp_adapter_id_str; 42 char *p_dev_name; 43 volatile bool *pb_shutdown; 44 45 int adapter_no; 46 int n_rx_host_buffers; 47 int n_tx_host_buffers; 48 } adapter_info_t; 49 50 extern rte_thread_t monitor_tasks[NUM_ADAPTER_MAX]; 51 extern volatile int monitor_task_is_running[NUM_ADAPTER_MAX]; 52 53 54 #endif /* _NT4GA_ADAPTER_H_ */ 55