From a25ebbda95517a2eddb1c8291c258e8e4f167af7 Mon Sep 17 00:00:00 2001 From: Anand B Jyoti Date: Tue, 30 May 2017 03:34:44 +0530 Subject: VNFs: rte_eth_dev is deprecated in DPDK version 16.11 and onwards JIRA: SAMPLEVNF-17 rte_eth_dev is removed in DPDK version 16.11 and onwards. The corresponding error handling is fixed through samplevnf gerrit 34667. This patch is required for migration of VNFs to DPDK ver 17.05. Change-Id: I088b705e3261227bcba7332aeb5a2a236e77a33e Signed-off-by: Anand B Jyoti --- VNFs/vFW/init.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'VNFs/vFW') diff --git a/VNFs/vFW/init.c b/VNFs/vFW/init.c index 54143773..979e1050 100644 --- a/VNFs/vFW/init.c +++ b/VNFs/vFW/init.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "app.h" #include "pipeline.h" @@ -536,6 +537,8 @@ app_link_filter_sctp_del(struct app_link_params *l1, struct app_link_params *l2) &filter); } +/* rte_eth_dev is removed in DPDK version 16.11 and onwards */ +#if RTE_VERSION < 0x100b0000 static int app_link_is_virtual(struct app_link_params *p) { @@ -547,7 +550,7 @@ app_link_is_virtual(struct app_link_params *p) return 0; } - +#endif void app_link_up_internal(__rte_unused struct app_params *app, @@ -556,11 +559,12 @@ app_link_up_internal(__rte_unused struct app_params *app, if(app == NULL || cp == NULL) printf("NULL Pointers"); +#if RTE_VERSION < 0x100b0000 if (app_link_is_virtual(cp)) { cp->state = 1; return; } - +#endif ifm_update_linkstatus(cp->pmd_id, IFM_ETH_LINK_UP); /* Mark link as UP */ @@ -574,11 +578,12 @@ app_link_down_internal(__rte_unused struct app_params *app, if(app == NULL || cp == NULL) printf("NULL Pointers"); +#if RTE_VERSION < 0x100b0000 if (app_link_is_virtual(cp)) { cp->state = 0; return; } - +#endif ifm_update_linkstatus(cp->pmd_id, IFM_ETH_LINK_DOWN); /* Mark link as DOWN */ cp->state = 0; -- cgit 1.2.3-korg