2 * Copyright (c) 2013-2015 Brocade Communications Systems, Inc.
4 * Copyright (c) 2015 QLogic Corporation.
8 * See LICENSE.bnx2x_pmd for copyright and licensing details.
11 #ifndef PMD_BNX2X_ETHDEV_H
12 #define PMD_BNX2X_ETHDEV_H
14 #include <sys/queue.h>
15 #include <sys/param.h>
29 #include <rte_byteorder.h>
30 #include <rte_common.h>
31 #include <rte_cycles.h>
33 #include <rte_debug.h>
35 #include <rte_malloc.h>
36 #include <rte_ethdev.h>
37 #include <rte_spinlock.h>
38 #include <rte_memzone.h>
40 #include <rte_mempool.h>
43 #include "bnx2x_rxtx.h"
44 #include "bnx2x_logs.h"
46 #define DELAY(x) rte_delay_us(x)
47 #define DELAY_MS(x) rte_delay_ms(x)
48 #define usec_delay(x) DELAY(x)
49 #define msec_delay(x) DELAY(1000*(x))
56 #define min(a,b) RTE_MIN(a,b)
59 #define wmb() rte_wmb()
60 #define rmb() rte_rmb()
63 #define MAX_QUEUES sysconf(_SC_NPROCESSORS_CONF)
65 #define BNX2X_MIN_RX_BUF_SIZE 1024
66 #define BNX2X_MAX_RX_PKT_LEN 15872
67 #define BNX2X_MAX_MAC_ADDRS 1
69 /* Hardware RX tick timer (usecs) */
70 #define BNX2X_RX_TICKS 25
71 /* Hardware TX tick timer (usecs) */
72 #define BNX2X_TX_TICKS 50
73 /* Maximum number of Rx packets to process at a time */
74 #define BNX2X_RX_BUDGET 0xffffffff
78 /* MAC address operations */
79 struct bnx2x_mac_ops {
80 void (*mac_addr_add)(struct rte_eth_dev *dev, struct ether_addr *addr,
81 uint16_t index, uint32_t pool); /* not implemented yet */
82 void (*mac_addr_remove)(struct rte_eth_dev *dev, uint16_t index); /* not implemented yet */