From: Jasvinder Singh Date: Mon, 17 Oct 2016 15:48:57 +0000 (+0100) Subject: examples/ip_pipeline: fix build on BSD X-Git-Tag: spdx-start~5507 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9e4b3b18443f97572981bb94f583924cd9d68b5a;p=dpdk.git examples/ip_pipeline: fix build on BSD Error log: CC init.o examples/ip_pipeline/init.c:38:22: fatal error: linux/if.h: No such file or directory #include Fixes: 3f2c9f3bb6c6 ("examples/ip_pipeline: add TAP port") Signed-off-by: Jasvinder Singh Acked-by: Cristian Dumitrescu --- diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c index 4fed47420f..3b36b53af3 100644 --- a/examples/ip_pipeline/init.c +++ b/examples/ip_pipeline/init.c @@ -35,8 +35,10 @@ #include #include #include +#ifdef RTE_EXEC_ENV_LINUXAPP #include #include +#endif #include #include #include @@ -1160,6 +1162,15 @@ app_init_tm(struct app_params *app) } } +#ifndef RTE_EXEC_ENV_LINUXAPP +static void +app_init_tap(struct app_params *app) { + if (app->n_pktq_tap == 0) + return; + + rte_panic("TAP device not supported.\n"); +} +#else static void app_init_tap(struct app_params *app) { @@ -1187,6 +1198,7 @@ app_init_tap(struct app_params *app) app->tap[i] = fd; } } +#endif #ifdef RTE_LIBRTE_KNI static int @@ -1404,6 +1416,7 @@ void app_pipeline_params_get(struct app_params *app, out->burst_size = app->tm_params[in->id].burst_read; break; } +#ifdef RTE_EXEC_ENV_LINUXAPP case APP_PKTQ_IN_TAP: { struct app_pktq_tap_params *tap_params = @@ -1420,6 +1433,7 @@ void app_pipeline_params_get(struct app_params *app, out->burst_size = app->tap_params[in->id].burst_read; break; } +#endif #ifdef RTE_LIBRTE_KNI case APP_PKTQ_IN_KNI: { @@ -1564,6 +1578,7 @@ void app_pipeline_params_get(struct app_params *app, app->tm_params[in->id].burst_write; break; } +#ifdef RTE_EXEC_ENV_LINUXAPP case APP_PKTQ_OUT_TAP: { struct rte_port_fd_writer_params *params = @@ -1575,6 +1590,7 @@ void app_pipeline_params_get(struct app_params *app, app->tap_params[in->id].burst_write; break; } +#endif #ifdef RTE_LIBRTE_KNI case APP_PKTQ_OUT_KNI: {