summaryrefslogtreecommitdiffstats
path: root/examples/udpfwd/netbe.h
diff options
context:
space:
mode:
authorMohammad Abdul Awal <mohammad.abdul.awal@intel.com>2016-09-10 11:24:16 +0100
committerMohammad Abdul Awal <mohammad.abdul.awal@intel.com>2016-09-15 09:50:32 +0100
commit258f299a2a152acab4ce497673eb293c5da15f73 (patch)
tree5dce0223129b7997602441e52a6d463727dea273 /examples/udpfwd/netbe.h
parente57f675d4de058f99819dd2d228656533961f38a (diff)
udpfw: dynamic allocation of netbe_* structures
This patch allows dynamic allocation of memory for the appliation. The solves the problem of allocating large amount of static memory which caused accessing the momory locations outside of 32-bit address-space duing compile-time. Change-Id: If8031ba846e4ed339d8ce8ebe4fd69325f098d17 Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Diffstat (limited to 'examples/udpfwd/netbe.h')
-rw-r--r--examples/udpfwd/netbe.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/udpfwd/netbe.h b/examples/udpfwd/netbe.h
index 577627d..1e5d9a7 100644
--- a/examples/udpfwd/netbe.h
+++ b/examples/udpfwd/netbe.h
@@ -54,7 +54,7 @@
struct netbe_port {
uint32_t id;
uint32_t nb_lcore;
- uint32_t lcore[RTE_MAX_LCORE];
+ uint32_t *lcore;
uint32_t mtu;
uint32_t rx_offload;
uint32_t tx_offload;
@@ -118,7 +118,7 @@ struct netbe_lcore {
uint32_t prtq_num;
uint32_t dst4_num;
uint32_t dst6_num;
- struct netbe_dev prtq[RTE_MAX_ETHPORTS * RTE_MAX_LCORE];
+ struct netbe_dev *prtq;
struct tle_udp_dest dst4[LCORE_MAX_DST];
struct tle_udp_dest dst6[LCORE_MAX_DST];
struct rte_ip_frag_death_row death_row;
@@ -128,8 +128,8 @@ struct netbe_cfg {
uint32_t promisc;
uint32_t prt_num;
uint32_t cpu_num;
- struct netbe_port prt[RTE_MAX_ETHPORTS];
- struct netbe_lcore cpu[RTE_MAX_LCORE];
+ struct netbe_port *prt;
+ struct netbe_lcore *cpu;
};
/*