]> git.proxmox.com Git - ceph.git/blob - ceph/src/dpdk/drivers/net/bnx2x/bnx2x_ethdev.h
bump version to 12.2.12-pve1
[ceph.git] / ceph / src / dpdk / drivers / net / bnx2x / bnx2x_ethdev.h
1 /*
2 * Copyright (c) 2013-2015 Brocade Communications Systems, Inc.
3 *
4 * Copyright (c) 2015 QLogic Corporation.
5 * All rights reserved.
6 * www.qlogic.com
7 *
8 * See LICENSE.bnx2x_pmd for copyright and licensing details.
9 */
10
11 #ifndef PMD_BNX2X_ETHDEV_H
12 #define PMD_BNX2X_ETHDEV_H
13
14 #include <sys/queue.h>
15 #include <sys/param.h>
16 #include <sys/user.h>
17 #include <sys/stat.h>
18
19 #include <stdio.h>
20 #include <stdlib.h>
21 #include <errno.h>
22 #include <stdint.h>
23 #include <string.h>
24 #include <unistd.h>
25 #include <stdarg.h>
26 #include <inttypes.h>
27 #include <assert.h>
28
29 #include <rte_byteorder.h>
30 #include <rte_common.h>
31 #include <rte_cycles.h>
32 #include <rte_log.h>
33 #include <rte_debug.h>
34 #include <rte_pci.h>
35 #include <rte_malloc.h>
36 #include <rte_ethdev.h>
37 #include <rte_spinlock.h>
38 #include <rte_memzone.h>
39 #include <rte_eal.h>
40 #include <rte_mempool.h>
41 #include <rte_mbuf.h>
42
43 #include "bnx2x_rxtx.h"
44 #include "bnx2x_logs.h"
45
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))
50
51 #define FALSE 0
52 #define TRUE 1
53
54 #define false 0
55 #define true 1
56 #define min(a,b) RTE_MIN(a,b)
57
58 #define mb() rte_mb()
59 #define wmb() rte_wmb()
60 #define rmb() rte_rmb()
61
62
63 #define MAX_QUEUES sysconf(_SC_NPROCESSORS_CONF)
64
65 #define BNX2X_MIN_RX_BUF_SIZE 1024
66 #define BNX2X_MAX_RX_PKT_LEN 15872
67 #define BNX2X_MAX_MAC_ADDRS 1
68
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
75
76 #endif
77
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 */
83 };