1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2023 Corigine, Inc. 3 * All rights reserved. 4 */ 5 6 #ifndef __NFP_DEV_H__ 7 #define __NFP_DEV_H__ 8 9 #include <stdint.h> 10 11 #include <rte_compat.h> 12 13 #define PCI_VENDOR_ID_NETRONOME 0x19ee 14 #define PCI_VENDOR_ID_CORIGINE 0x1da8 15 16 #define PCI_DEVICE_ID_NFP3800_PF_NIC 0x3800 17 #define PCI_DEVICE_ID_NFP3800_VF_NIC 0x3803 18 #define PCI_DEVICE_ID_NFP4000_PF_NIC 0x4000 19 #define PCI_DEVICE_ID_NFP6000_PF_NIC 0x6000 20 #define PCI_DEVICE_ID_NFP6000_VF_NIC 0x6003 /* Include NFP4000VF */ 21 22 enum nfp_dev_id { 23 NFP_DEV_NFP3800, 24 NFP_DEV_NFP3800_VF, 25 NFP_DEV_NFP6000, 26 NFP_DEV_NFP6000_VF, 27 NFP_DEV_CNT, 28 }; 29 30 struct nfp_dev_info { 31 /* Required fields */ 32 uint32_t qc_idx_mask; 33 uint32_t qc_addr_offset; 34 uint32_t min_qc_size; 35 uint32_t max_qc_size; 36 37 /* PF-only fields */ 38 const char *chip_names; 39 uint32_t pcie_cfg_expbar_offset; 40 uint32_t qc_area_sz; 41 uint8_t pf_num_per_unit; 42 }; 43 44 __rte_internal 45 const struct nfp_dev_info *nfp_dev_info_get(uint16_t device_id); 46 47 #endif /* __NFP_DEV_H__ */ 48