xref: /dpdk/config/rte_config.h (revision f2fd6c2e080c0c595bcc72d8c05d9e1014d398e2)
16c9457c2SBruce Richardson /* SPDX-License-Identifier: BSD-3-Clause
26c9457c2SBruce Richardson  * Copyright(c) 2017 Intel Corporation
3a25a650bSBruce Richardson  */
4a25a650bSBruce Richardson 
5a25a650bSBruce Richardson /**
6a25a650bSBruce Richardson  * @file Header file containing DPDK compilation parameters
7a25a650bSBruce Richardson  *
8a25a650bSBruce Richardson  * Header file containing DPDK compilation parameters. Also include the
9a25a650bSBruce Richardson  * meson-generated header file containing the detected parameters that
10a25a650bSBruce Richardson  * are variable across builds or build environments.
11a25a650bSBruce Richardson  */
12a25a650bSBruce Richardson #ifndef _RTE_CONFIG_H_
13a25a650bSBruce Richardson #define _RTE_CONFIG_H_
14a25a650bSBruce Richardson 
15a25a650bSBruce Richardson #include <rte_build_config.h>
16a25a650bSBruce Richardson 
173cb34fb0STyler Retzlaff #if defined(__clang__)
183cb34fb0STyler Retzlaff #define RTE_TOOLCHAIN "clang"
193cb34fb0STyler Retzlaff #define RTE_TOOLCHAIN_CLANG 1
203cb34fb0STyler Retzlaff #elif defined(__GNUC__)
213cb34fb0STyler Retzlaff #define RTE_TOOLCHAIN "gcc"
223cb34fb0STyler Retzlaff #define RTE_TOOLCHAIN_GCC 1
233cb34fb0STyler Retzlaff #elif defined(_MSC_VER)
243cb34fb0STyler Retzlaff #define RTE_TOOLCHAIN "msvc"
253cb34fb0STyler Retzlaff #define RTE_TOOLCHAIN_MSVC 1
263cb34fb0STyler Retzlaff #endif
273cb34fb0STyler Retzlaff 
28742bde12SBruce Richardson /* legacy defines */
29742bde12SBruce Richardson #ifdef RTE_EXEC_ENV_LINUX
30742bde12SBruce Richardson #define RTE_EXEC_ENV_LINUXAPP 1
31742bde12SBruce Richardson #endif
325fbc1d49SBruce Richardson #ifdef RTE_EXEC_ENV_FREEBSD
335fbc1d49SBruce Richardson #define RTE_EXEC_ENV_BSDAPP 1
345fbc1d49SBruce Richardson #endif
35742bde12SBruce Richardson 
36d320fe56SBruce Richardson /* String that appears before the version number */
37d320fe56SBruce Richardson #define RTE_VER_PREFIX "DPDK"
38d320fe56SBruce Richardson 
39844514c7SBruce Richardson /****** library defines ********/
40844514c7SBruce Richardson 
41844514c7SBruce Richardson /* EAL defines */
4265f600c0SMorten Brørup #define RTE_CACHE_GUARD_LINES 1
4372cf92b3SAnatoly Burakov #define RTE_MAX_HEAPS 32
44*f2fd6c2eSDavid Marchand #define RTE_MAX_LCORE_VAR 131072
4566cc45e2SAnatoly Burakov #define RTE_MAX_MEMSEG_LISTS 128
4666cc45e2SAnatoly Burakov #define RTE_MAX_MEMSEG_PER_LIST 8192
4766cc45e2SAnatoly Burakov #define RTE_MAX_MEM_MB_PER_LIST 32768
4866cc45e2SAnatoly Burakov #define RTE_MAX_MEMSEG_PER_TYPE 32768
4966cc45e2SAnatoly Burakov #define RTE_MAX_MEM_MB_PER_TYPE 65536
50844514c7SBruce Richardson #define RTE_MAX_TAILQ 32
51844514c7SBruce Richardson #define RTE_LOG_DP_LEVEL RTE_LOG_INFO
52340b7bb8SXiao Wang #define RTE_MAX_VFIO_CONTAINERS 64
53e7bc451cSMorten Brørup #define RTE_TRACE 1
54844514c7SBruce Richardson 
5590434f6cSBruce Richardson /* bsd module defines */
5690434f6cSBruce Richardson #define RTE_CONTIGMEM_MAX_NUM_BUFS 64
5790434f6cSBruce Richardson #define RTE_CONTIGMEM_DEFAULT_NUM_BUFS 1
5890434f6cSBruce Richardson #define RTE_CONTIGMEM_DEFAULT_BUF_SIZE (512*1024*1024)
5990434f6cSBruce Richardson 
605b9656b1SBruce Richardson /* mempool defines */
615b9656b1SBruce Richardson #define RTE_MEMPOOL_CACHE_MAX_SIZE 512
629d87e05dSMorten Brørup /* RTE_LIBRTE_MEMPOOL_STATS is not set */
639d87e05dSMorten Brørup /* RTE_LIBRTE_MEMPOOL_DEBUG is not set */
645b9656b1SBruce Richardson 
65844514c7SBruce Richardson /* mbuf defines */
66844514c7SBruce Richardson #define RTE_MBUF_DEFAULT_MEMPOOL_OPS "ring_mp_mc"
675b9656b1SBruce Richardson 
685b9656b1SBruce Richardson /* ether defines */
695b9656b1SBruce Richardson #define RTE_MAX_QUEUES_PER_PORT 1024
70a72cb3e7SFerruh Yigit #define RTE_ETHDEV_QUEUE_STAT_CNTRS 16 /* max 256 */
715b9656b1SBruce Richardson #define RTE_ETHDEV_RXTX_CALLBACKS 1
7266e0ea2cSXueming Li #define RTE_MAX_MULTI_HOST_CTRLS 4
735b9656b1SBruce Richardson 
745b9656b1SBruce Richardson /* cryptodev defines */
755b9656b1SBruce Richardson #define RTE_CRYPTO_MAX_DEVS 64
765b9656b1SBruce Richardson #define RTE_CRYPTODEV_NAME_LEN 64
771c3ffb95SAbhinandan Gujjar #define RTE_CRYPTO_CALLBACKS 1
785b9656b1SBruce Richardson 
79ed7dd94fSFiona Trahe /* compressdev defines */
80ed7dd94fSFiona Trahe #define RTE_COMPRESS_MAX_DEVS 64
81ed7dd94fSFiona Trahe 
82b25246beSOri Kam /* regexdev defines */
83b25246beSOri Kam #define RTE_MAX_REGEXDEV_DEVS 32
84b25246beSOri Kam 
855b9656b1SBruce Richardson /* eventdev defines */
865b9656b1SBruce Richardson #define RTE_EVENT_MAX_DEVS 16
879c67fcbfSPavan Nikhilesh #define RTE_EVENT_MAX_PORTS_PER_DEV 255
88ecd87495STimothy McDaniel #define RTE_EVENT_MAX_QUEUES_PER_DEV 255
89d007a7f3SPavan Nikhilesh #define RTE_EVENT_MAX_PROFILES_PER_PORT 8
9047d05b29SErik Gabriel Carrillo #define RTE_EVENT_TIMER_ADAPTER_NUM_MAX 32
913810ae43SNikhil Rao #define RTE_EVENT_ETH_INTR_RING_SIZE 1024
927901eac3SAbhinandan Gujjar #define RTE_EVENT_CRYPTO_ADAPTER_MAX_INSTANCE 32
93a3bbf2e0SNikhil Rao #define RTE_EVENT_ETH_TX_ADAPTER_MAX_INSTANCE 32
94346eb2fdSAmit Prakash Shukla #define RTE_EVENT_DMA_ADAPTER_MAX_INSTANCE 32
955b9656b1SBruce Richardson 
9640db28c1SBruce Richardson /* rawdev defines */
97bca4350eSHemant Agrawal #define RTE_RAWDEV_MAX_DEVS 64
9840db28c1SBruce Richardson 
995b9656b1SBruce Richardson /* ip_fragmentation defines */
100f8e0f8ceSKonstantin Ananyev #define RTE_LIBRTE_IP_FRAG_MAX_FRAG 8
10168fc7c39SBruce Richardson // RTE_LIBRTE_IP_FRAG_TBL_STAT is not set
1025b9656b1SBruce Richardson 
1035b9656b1SBruce Richardson /* rte_power defines */
1045b9656b1SBruce Richardson #define RTE_MAX_LCORE_FREQS 64
105ac1edcb6SSivaprasad Tummala #define RTE_MAX_UNCORE_FREQS 64
1065b9656b1SBruce Richardson 
107a2da7427SJerin Jacob /* rte_graph defines */
108a2da7427SJerin Jacob #define RTE_GRAPH_BURST_SIZE 256
109a2da7427SJerin Jacob #define RTE_LIBRTE_GRAPH_STATS 1
110a2da7427SJerin Jacob 
111fca5acb3SBruce Richardson /****** driver defines ********/
112fca5acb3SBruce Richardson 
113048a2aa3SMaxime Coquelin /* Packet prefetching in PMDs */
114048a2aa3SMaxime Coquelin #define RTE_PMD_PACKET_PREFETCH 1
115048a2aa3SMaxime Coquelin 
1166ec78c24SHemant Agrawal /* QuickAssist device */
11726c198ffSFiona Trahe /* Max. number of QuickAssist devices which can be attached */
11826c198ffSFiona Trahe #define RTE_PMD_QAT_MAX_PCI_DEVICES 48
1191947bd18SFiona Trahe #define RTE_PMD_QAT_COMP_SGL_MAX_SEGMENTS 16
120a124830aSFiona Trahe #define RTE_PMD_QAT_COMP_IM_BUFFER_SIZE 65536
121fca5acb3SBruce Richardson 
1228769079aSJay Zhou /* virtio crypto defines */
1238769079aSJay Zhou #define RTE_MAX_VIRTIO_CRYPTO 32
1248769079aSJay Zhou 
1256ec78c24SHemant Agrawal /* DPAA SEC max cryptodev devices*/
1266ec78c24SHemant Agrawal #define RTE_LIBRTE_DPAA_MAX_CRYPTODEV	4
1276ec78c24SHemant Agrawal 
128e940646bSBruce Richardson /* fm10k defines */
129e940646bSBruce Richardson #define RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE 1
130e940646bSBruce Richardson 
13176d79456SWei Hu (Xavier) /* hns3 defines */
13276d79456SWei Hu (Xavier) #define RTE_LIBRTE_HNS3_MAX_TQP_NUM_PER_PF 256
13376d79456SWei Hu (Xavier) 
134e940646bSBruce Richardson /* i40e defines */
135e940646bSBruce Richardson #define RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC 1
13668fc7c39SBruce Richardson // RTE_LIBRTE_I40E_16BYTE_RX_DESC is not set
137e940646bSBruce Richardson #define RTE_LIBRTE_I40E_QUEUE_NUM_PER_PF 64
138e940646bSBruce Richardson #define RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF 4
139e940646bSBruce Richardson #define RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM 4
140e940646bSBruce Richardson 
141efd5d1a8SBruce Richardson /* Ring net PMD settings */
142efd5d1a8SBruce Richardson #define RTE_PMD_RING_MAX_RX_RINGS 16
143efd5d1a8SBruce Richardson #define RTE_PMD_RING_MAX_TX_RINGS 16
144efd5d1a8SBruce Richardson 
14530d3d016SLuca Boccassi /* QEDE PMD defines */
14630d3d016SLuca Boccassi #define RTE_LIBRTE_QEDE_FW ""
14730d3d016SLuca Boccassi 
148166378a7STimothy McDaniel /* DLB2 defines */
14968fc7c39SBruce Richardson // RTE_LIBRTE_PMD_DLB2_QUELL_STATS is not set
150166378a7STimothy McDaniel 
151a25a650bSBruce Richardson #endif /* _RTE_CONFIG_H_ */
152