]>
Commit | Line | Data |
---|---|---|
11fdf7f2 | 1 | /* SPDX-License-Identifier: BSD-3-Clause |
7c673cae | 2 | * Copyright (c) 2013-2015 Brocade Communications Systems, Inc. |
11fdf7f2 | 3 | * Copyright (c) 2015-2018 Cavium Inc. |
7c673cae | 4 | * All rights reserved. |
11fdf7f2 | 5 | * www.cavium.com |
7c673cae FG |
6 | */ |
7 | ||
8 | #ifndef PMD_BNX2X_ETHDEV_H | |
9 | #define PMD_BNX2X_ETHDEV_H | |
10 | ||
11 | #include <sys/queue.h> | |
12 | #include <sys/param.h> | |
13 | #include <sys/user.h> | |
14 | #include <sys/stat.h> | |
15 | ||
16 | #include <stdio.h> | |
17 | #include <stdlib.h> | |
18 | #include <errno.h> | |
19 | #include <stdint.h> | |
20 | #include <string.h> | |
21 | #include <unistd.h> | |
22 | #include <stdarg.h> | |
23 | #include <inttypes.h> | |
24 | #include <assert.h> | |
25 | ||
26 | #include <rte_byteorder.h> | |
27 | #include <rte_common.h> | |
28 | #include <rte_cycles.h> | |
29 | #include <rte_log.h> | |
30 | #include <rte_debug.h> | |
31 | #include <rte_pci.h> | |
32 | #include <rte_malloc.h> | |
11fdf7f2 | 33 | #include <rte_ethdev_driver.h> |
7c673cae | 34 | #include <rte_spinlock.h> |
7c673cae FG |
35 | #include <rte_eal.h> |
36 | #include <rte_mempool.h> | |
37 | #include <rte_mbuf.h> | |
38 | ||
39 | #include "bnx2x_rxtx.h" | |
40 | #include "bnx2x_logs.h" | |
41 | ||
42 | #define DELAY(x) rte_delay_us(x) | |
43 | #define DELAY_MS(x) rte_delay_ms(x) | |
44 | #define usec_delay(x) DELAY(x) | |
45 | #define msec_delay(x) DELAY(1000*(x)) | |
46 | ||
47 | #define FALSE 0 | |
48 | #define TRUE 1 | |
49 | ||
9f95a23c | 50 | typedef int bool; |
7c673cae FG |
51 | #define false 0 |
52 | #define true 1 | |
53 | #define min(a,b) RTE_MIN(a,b) | |
54 | ||
55 | #define mb() rte_mb() | |
56 | #define wmb() rte_wmb() | |
57 | #define rmb() rte_rmb() | |
58 | ||
7c673cae FG |
59 | #define MAX_QUEUES sysconf(_SC_NPROCESSORS_CONF) |
60 | ||
61 | #define BNX2X_MIN_RX_BUF_SIZE 1024 | |
62 | #define BNX2X_MAX_RX_PKT_LEN 15872 | |
63 | #define BNX2X_MAX_MAC_ADDRS 1 | |
64 | ||
65 | /* Hardware RX tick timer (usecs) */ | |
66 | #define BNX2X_RX_TICKS 25 | |
67 | /* Hardware TX tick timer (usecs) */ | |
68 | #define BNX2X_TX_TICKS 50 | |
69 | /* Maximum number of Rx packets to process at a time */ | |
70 | #define BNX2X_RX_BUDGET 0xffffffff | |
71 | ||
11fdf7f2 TL |
72 | #define BNX2X_SP_TIMER_PERIOD US_PER_S /* 1 second */ |
73 | ||
7c673cae FG |
74 | #endif |
75 | ||
76 | /* MAC address operations */ | |
77 | struct bnx2x_mac_ops { | |
78 | void (*mac_addr_add)(struct rte_eth_dev *dev, struct ether_addr *addr, | |
79 | uint16_t index, uint32_t pool); /* not implemented yet */ | |
80 | void (*mac_addr_remove)(struct rte_eth_dev *dev, uint16_t index); /* not implemented yet */ | |
81 | }; |