net/sfc/base: define max desc number for every EF10 NIC
[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 /* Missing register definitions */
23 #ifndef ER_DZ_TX_PIOBUF_OFST
24 #define ER_DZ_TX_PIOBUF_OFST 0x00001000
25 #endif
26 #ifndef ER_DZ_TX_PIOBUF_STEP
27 #define ER_DZ_TX_PIOBUF_STEP 8192
28 #endif
29 #ifndef ER_DZ_TX_PIOBUF_ROWS
30 #define ER_DZ_TX_PIOBUF_ROWS 2048
31 #endif
32
33 #ifndef ER_DZ_TX_PIOBUF_SIZE
34 #define ER_DZ_TX_PIOBUF_SIZE 2048
35 #endif
36
37 #define HUNT_PIOBUF_NBUFS       (16)
38 #define HUNT_PIOBUF_SIZE        (ER_DZ_TX_PIOBUF_SIZE)
39
40 #define HUNT_MIN_PIO_ALLOC_SIZE (HUNT_PIOBUF_SIZE / 32)
41
42
43 /* NIC */
44
45 extern  __checkReturn   efx_rc_t
46 hunt_board_cfg(
47         __in            efx_nic_t *enp);
48
49 #ifdef  __cplusplus
50 }
51 #endif
52
53 #endif  /* _SYS_HUNT_IMPL_H */