]>
Commit | Line | Data |
---|---|---|
9f95a23c TL |
1 | /* SPDX-License-Identifier: BSD-3-Clause |
2 | * Copyright(c) 2019 Cesnet | |
3 | * Copyright(c) 2019 Netcope Technologies, a.s. <info@netcope.com> | |
4 | * All rights reserved. | |
5 | */ | |
6 | ||
7 | #ifndef _NFB_H_ | |
8 | #define _NFB_H_ | |
9 | ||
10 | #include <nfb/nfb.h> | |
11 | #include <nfb/ndp.h> | |
12 | #include <netcope/rxmac.h> | |
13 | #include <netcope/txmac.h> | |
14 | ||
15 | #include "nfb_rx.h" | |
16 | #include "nfb_tx.h" | |
17 | ||
18 | /* PCI Vendor ID */ | |
19 | #define PCI_VENDOR_ID_NETCOPE 0x1b26 | |
f67539c2 | 20 | #define PCI_VENDOR_ID_SILICOM 0x1c2c |
9f95a23c TL |
21 | |
22 | /* PCI Device IDs */ | |
23 | #define PCI_DEVICE_ID_NFB_40G2 0xcb80 | |
24 | #define PCI_DEVICE_ID_NFB_100G2 0xc2c1 | |
25 | #define PCI_DEVICE_ID_NFB_200G2QL 0xc250 | |
f67539c2 TL |
26 | #define PCI_DEVICE_ID_FB2CGG3 0x00d0 |
27 | #define PCI_DEVICE_ID_FB2CGG3D 0xc240 | |
9f95a23c TL |
28 | |
29 | /* Max index of ndp rx/tx queues */ | |
30 | #define RTE_ETH_NDP_MAX_RX_QUEUES 32 | |
31 | #define RTE_ETH_NDP_MAX_TX_QUEUES 32 | |
32 | ||
33 | /* Max index of rx/tx dmas */ | |
34 | #define RTE_MAX_NC_RXMAC 256 | |
35 | #define RTE_MAX_NC_TXMAC 256 | |
36 | ||
37 | #define RTE_NFB_DRIVER_NAME net_nfb | |
38 | ||
f67539c2 TL |
39 | /* Device arguments */ |
40 | #define TIMESTAMP_ARG "timestamp" | |
41 | static const char * const VALID_KEYS[] = {TIMESTAMP_ARG, NULL}; | |
42 | ||
9f95a23c TL |
43 | struct pmd_internals { |
44 | uint16_t max_rxmac; | |
45 | uint16_t max_txmac; | |
46 | struct nc_rxmac *rxmac[RTE_MAX_NC_RXMAC]; | |
47 | struct nc_txmac *txmac[RTE_MAX_NC_TXMAC]; | |
48 | ||
49 | char nfb_dev[PATH_MAX]; | |
50 | struct nfb_device *nfb; | |
51 | /* Place to remember if filter was promiscuous or filtering by table, | |
52 | * when disabling allmulticast | |
53 | */ | |
54 | enum nc_rxmac_mac_filter rx_filter_original; | |
55 | }; | |
56 | ||
57 | #endif /* _NFB_H_ */ |