1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017 CESNET
7 #include <rte_common.h>
9 #include "szedata2_iobuf.h"
12 * IBUFs and OBUFs can generally be located at different offsets in different
14 * This part defines base offsets of IBUFs and OBUFs for various cards
15 * and firmwares (modes).
16 * Type of firmware (mode) is set through configuration option
17 * CONFIG_RTE_LIBRTE_PMD_SZEDATA2_AS.
18 * Possible values are:
19 * 0 - for cards (modes):
22 * 1 - for cards (modes):
25 * 2 - for cards (modes):
30 * 3 - for cards (modes):
34 * 4 - for cards (modes):
37 * 5 - for experimental firmwares and future use
39 #if !defined(RTE_LIBRTE_PMD_SZEDATA2_AS)
40 #error "RTE_LIBRTE_PMD_SZEDATA2_AS has to be defined"
41 #elif RTE_LIBRTE_PMD_SZEDATA2_AS == 0
48 const uint32_t szedata2_ibuf_base_table[] = {
51 const uint32_t szedata2_obuf_base_table[] = {
55 #elif RTE_LIBRTE_PMD_SZEDATA2_AS == 1
62 const uint32_t szedata2_ibuf_base_table[] = {
65 const uint32_t szedata2_obuf_base_table[] = {
69 #elif RTE_LIBRTE_PMD_SZEDATA2_AS == 2
78 const uint32_t szedata2_ibuf_base_table[] = {
82 const uint32_t szedata2_obuf_base_table[] = {
87 #elif RTE_LIBRTE_PMD_SZEDATA2_AS == 3
95 const uint32_t szedata2_ibuf_base_table[] = {
105 const uint32_t szedata2_obuf_base_table[] = {
116 #elif RTE_LIBRTE_PMD_SZEDATA2_AS == 4
123 const uint32_t szedata2_ibuf_base_table[] = {
135 const uint32_t szedata2_obuf_base_table[] = {
148 #elif RTE_LIBRTE_PMD_SZEDATA2_AS == 5
151 * Future use and experimental firmwares.
154 const uint32_t szedata2_ibuf_base_table[] = {
161 const uint32_t szedata2_obuf_base_table[] = {
170 #error "RTE_LIBRTE_PMD_SZEDATA2_AS has wrong value, see comments in config file"
173 const uint32_t szedata2_ibuf_count = RTE_DIM(szedata2_ibuf_base_table);
174 const uint32_t szedata2_obuf_count = RTE_DIM(szedata2_obuf_base_table);