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_driver.h>
37 #include <rte_spinlock.h>
39 #include <rte_mempool.h>
42 #include "bnx2x_rxtx.h"
43 #include "bnx2x_logs.h"
45 #define DELAY(x) rte_delay_us(x)
46 #define DELAY_MS(x) rte_delay_ms(x)
47 #define usec_delay(x) DELAY(x)
48 #define msec_delay(x) DELAY(1000*(x))
55 #define min(a,b) RTE_MIN(a,b)
58 #define wmb() rte_wmb()
59 #define rmb() rte_rmb()
62 #define MAX_QUEUES sysconf(_SC_NPROCESSORS_CONF)
64 #define BNX2X_MIN_RX_BUF_SIZE 1024
65 #define BNX2X_MAX_RX_PKT_LEN 15872
66 #define BNX2X_MAX_MAC_ADDRS 1
68 /* Hardware RX tick timer (usecs) */
69 #define BNX2X_RX_TICKS 25
70 /* Hardware TX tick timer (usecs) */
71 #define BNX2X_TX_TICKS 50
72 /* Maximum number of Rx packets to process at a time */
73 #define BNX2X_RX_BUDGET 0xffffffff
77 /* MAC address operations */
78 struct bnx2x_mac_ops {
79 void (*mac_addr_add)(struct rte_eth_dev *dev, struct ether_addr *addr,
80 uint16_t index, uint32_t pool); /* not implemented yet */
81 void (*mac_addr_remove)(struct rte_eth_dev *dev, uint16_t index); /* not implemented yet */