aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Mazur <mkm@semihalf.com>2018-01-04 17:05:21 +0100
committerMichal Mazur <mkm@semihalf.com>2018-01-08 15:29:18 +0100
commit6009022c160586ba9670c57f13ef1dfa0cbc1575 (patch)
treee4a2914b913a54bb5ef36f46fd85c657ab6448ec
parente6e8af488c26f5cfe380e5c6fd141f74bafedc7d (diff)
plugins: odp: Remove 'platform-params' option
ODP platform can now be configured using environment variable ODP_PLATFORM_PARAMS. Remove the option from startup config file. Change-Id: I9d550dabd32c691a031bb88d5453c8146d5fbce8 Signed-off-by: Michal Mazur <mkm@semihalf.com>
-rw-r--r--README.vppodp1
-rwxr-xr-xsrc/plugins/odp/odp_packet.c37
-rw-r--r--src/vpp/conf/startup.conf5
3 files changed, 3 insertions, 40 deletions
diff --git a/README.vppodp b/README.vppodp
index 9a84945..d98c366 100644
--- a/README.vppodp
+++ b/README.vppodp
@@ -56,6 +56,7 @@ Set the environment variables with ODP config:
export PLATFORM=odp
export ODP_INST_PATH=<odp-dpdk-install-path>
+export ODP_PLATFORM_PARAMS="-m 400" # at least size of memory to allocate need to be specified
Note : Also check and copy dpdk/odp-dpdk libraries to default /usr/lib path for linking with vpp.
diff --git a/src/plugins/odp/odp_packet.c b/src/plugins/odp/odp_packet.c
index f0c4007..2cf6ff9 100755
--- a/src/plugins/odp/odp_packet.c
+++ b/src/plugins/odp/odp_packet.c
@@ -15,7 +15,6 @@
#include <odp/odp_packet.h>
odp_packet_main_t *odp_packet_main;
-odp_platform_init_t platform_params;
u32 rx_sched_wait;
u32 tx_burst_size;
u32 num_pkts_in_pool = SHM_PKT_POOL_NB_PKTS;
@@ -398,37 +397,11 @@ static clib_error_t *
odp_config (vlib_main_t * vm, unformat_input_t * input)
{
char *param = NULL;
- u32 num;
unformat_input_t sub_input;
- unformat_input_t line_input;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
- if (unformat (input, "platform-params %U",
- unformat_vlib_cli_sub_input, &sub_input))
- {
- unformat_skip_white_space (&sub_input);
- while (unformat_check_input (&sub_input) != UNFORMAT_END_OF_INPUT)
- {
- if (unformat (&sub_input, "memory %u", &num))
- platform_params.memory = num;
- else if (unformat (&sub_input, "cmdline %U",
- unformat_vlib_cli_sub_input, &line_input))
- {
- unformat (&line_input, "%U", unformat_line, &param);
- platform_params.cmdline = param;
- unformat_free (&line_input);
- }
- else if (unformat (&sub_input, "%s", &param))
- {
- clib_warning ("%s: Unknown platform option %s\n", __func__,
- param);
- vec_free (param);
- }
- }
- unformat_free (&sub_input);
- }
- else if (unformat (input, "rx-sched-wait %u", &rx_sched_wait))
+ if (unformat (input, "rx-sched-wait %u", &rx_sched_wait))
;
else if (unformat (input, "tx-burst-size %u", &tx_burst_size))
;
@@ -518,13 +491,7 @@ odp_packet_init (vlib_main_t * vm)
odp_shm_t shm;
odp_instance_t instance;
- if (platform_params.memory == 0)
- {
- platform_params.memory = 50 + num_pkts_in_pool * 4 / 1024;
- clib_warning ("Warning: Platform 'memory' parameter not configured!");
- }
-
- if (odp_init_global (&instance, NULL, &platform_params))
+ if (odp_init_global (&instance, NULL, NULL))
clib_warning ("Error: ODP global init failed");
if (odp_init_local (instance, ODP_THREAD_CONTROL) != 0)
diff --git a/src/vpp/conf/startup.conf b/src/vpp/conf/startup.conf
index d6d2d27..15c9086 100644
--- a/src/vpp/conf/startup.conf
+++ b/src/vpp/conf/startup.conf
@@ -99,11 +99,6 @@ cpu {
# }
# odp {
- # platform-params {
- # memory 100
- # cmdline { <additional-parameters> }
- # }
-
## Number of packets in allocated pool
# num-pkts-in-pool 10240