1 /*
2  * aQuantia Corporation Network Driver
3  * Copyright (C) 2014-2017 aQuantia Corporation. All rights reserved
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU General Public License,
7  * version 2, as published by the Free Software Foundation.
8  */
9 
10 /* File aq_cfg.h: Definition of configuration parameters and constants. */
11 
12 #ifndef AQ_CFG_H
13 #define AQ_CFG_H
14 
15 #define AQ_CFG_VECS_DEF   8U
16 #define AQ_CFG_TCS_DEF    1U
17 
18 #define AQ_CFG_TXDS_DEF    4096U
19 #define AQ_CFG_RXDS_DEF    1024U
20 
21 #define AQ_CFG_IS_POLLING_DEF 0U
22 
23 #define AQ_CFG_FORCE_LEGACY_INT 0U
24 
25 #define AQ_CFG_INTERRUPT_MODERATION_OFF		0
26 #define AQ_CFG_INTERRUPT_MODERATION_ON		1
27 #define AQ_CFG_INTERRUPT_MODERATION_AUTO	0xFFFFU
28 
29 #define AQ_CFG_INTERRUPT_MODERATION_USEC_MAX (0x1FF * 2)
30 
31 #define AQ_CFG_IRQ_MASK                      0x1FFU
32 
33 #define AQ_CFG_VECS_MAX   8U
34 #define AQ_CFG_TCS_MAX    8U
35 
36 #define AQ_CFG_TX_FRAME_MAX  (16U * 1024U)
37 #define AQ_CFG_RX_FRAME_MAX  (4U * 1024U)
38 
39 #define AQ_CFG_TX_CLEAN_BUDGET 256U
40 
41 /* LRO */
42 #define AQ_CFG_IS_LRO_DEF           1U
43 
44 /* RSS */
45 #define AQ_CFG_RSS_INDIRECTION_TABLE_MAX  64U
46 #define AQ_CFG_RSS_HASHKEY_SIZE           40U
47 
48 #define AQ_CFG_IS_RSS_DEF           1U
49 #define AQ_CFG_NUM_RSS_QUEUES_DEF   AQ_CFG_VECS_DEF
50 #define AQ_CFG_RSS_BASE_CPU_NUM_DEF 0U
51 
52 #define AQ_CFG_PCI_FUNC_MSIX_IRQS   9U
53 #define AQ_CFG_PCI_FUNC_PORTS       2U
54 
55 #define AQ_CFG_SERVICE_TIMER_INTERVAL    (1 * HZ)
56 #define AQ_CFG_POLLING_TIMER_INTERVAL   ((unsigned int)(2 * HZ))
57 
58 #define AQ_CFG_SKB_FRAGS_MAX   32U
59 
60 /* Number of descriptors available in one ring to resume this ring queue
61  */
62 #define AQ_CFG_RESTART_DESC_THRES   (AQ_CFG_SKB_FRAGS_MAX * 2)
63 
64 #define AQ_CFG_NAPI_WEIGHT     64U
65 
66 /*#define AQ_CFG_MAC_ADDR_PERMANENT {0x30, 0x0E, 0xE3, 0x12, 0x34, 0x56}*/
67 
68 #define AQ_NIC_FC_OFF    0U
69 #define AQ_NIC_FC_TX     1U
70 #define AQ_NIC_FC_RX     2U
71 #define AQ_NIC_FC_FULL   3U
72 #define AQ_NIC_FC_AUTO   4U
73 
74 #define AQ_CFG_FC_MODE AQ_NIC_FC_FULL
75 
76 #define AQ_CFG_SPEED_MSK  0xFFFFU	/* 0xFFFFU==auto_neg */
77 
78 #define AQ_CFG_IS_AUTONEG_DEF       1U
79 #define AQ_CFG_MTU_DEF              1514U
80 
81 #define AQ_CFG_LOCK_TRYS   100U
82 
83 #define AQ_CFG_DRV_AUTHOR      "aQuantia"
84 #define AQ_CFG_DRV_DESC        "aQuantia Corporation(R) Network Driver"
85 #define AQ_CFG_DRV_NAME        "atlantic"
86 #define AQ_CFG_DRV_VERSION	__stringify(NIC_MAJOR_DRIVER_VERSION)"."\
87 				__stringify(NIC_MINOR_DRIVER_VERSION)"."\
88 				__stringify(NIC_BUILD_DRIVER_VERSION)"."\
89 				__stringify(NIC_REVISION_DRIVER_VERSION) \
90 				AQ_CFG_DRV_VERSION_SUFFIX
91 
92 #endif /* AQ_CFG_H */
93