net/sfc/base: support different event descriptor sizes
[dpdk.git] / drivers / net / sfc / base / hunt_impl.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  *
3  * Copyright (c) 2012-2018 Solarflare Communications Inc.
4  * All rights reserved.
5  */
6
7 #ifndef _SYS_HUNT_IMPL_H
8 #define _SYS_HUNT_IMPL_H
9
10 #include "efx.h"
11 #include "efx_regs.h"
12 #include "efx_regs_ef10.h"
13 #include "efx_mcdi.h"
14
15 #ifdef  __cplusplus
16 extern "C" {
17 #endif
18
19 #define HUNT_TXQ_MAXNDESCS                      4096
20 #define HUNT_TXQ_MAXNDESCS_BUG35388_WORKAROUND  2048
21
22 #define HUNT_EVQ_MAXNBUFS       (64)
23
24 /* Missing register definitions */
25 #ifndef ER_DZ_TX_PIOBUF_OFST
26 #define ER_DZ_TX_PIOBUF_OFST 0x00001000
27 #endif
28 #ifndef ER_DZ_TX_PIOBUF_STEP
29 #define ER_DZ_TX_PIOBUF_STEP 8192
30 #endif
31 #ifndef ER_DZ_TX_PIOBUF_ROWS
32 #define ER_DZ_TX_PIOBUF_ROWS 2048
33 #endif
34
35 #ifndef ER_DZ_TX_PIOBUF_SIZE
36 #define ER_DZ_TX_PIOBUF_SIZE 2048
37 #endif
38
39 #define HUNT_PIOBUF_NBUFS       (16)
40 #define HUNT_PIOBUF_SIZE        (ER_DZ_TX_PIOBUF_SIZE)
41
42 #define HUNT_MIN_PIO_ALLOC_SIZE (HUNT_PIOBUF_SIZE / 32)
43
44
45 /* NIC */
46
47 extern  __checkReturn   efx_rc_t
48 hunt_board_cfg(
49         __in            efx_nic_t *enp);
50
51 #ifdef  __cplusplus
52 }
53 #endif
54
55 #endif  /* _SYS_HUNT_IMPL_H */