diff options
author | Deepak S <deepak.s@linux.intel.com> | 2017-07-14 06:21:46 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-07-14 06:21:46 +0000 |
commit | 04714a4f30a061f39cda864dec2f350e0051a56a (patch) | |
tree | cdfeec7abdb1bee4c1d7a0e9da1b4244030b30d5 /VNFs/vACL/init.c | |
parent | 7da9fd5f44d3d65872e4da7feaf2cedea7f8d214 (diff) | |
parent | a25ebbda95517a2eddb1c8291c258e8e4f167af7 (diff) |
Merge "VNFs: rte_eth_dev is deprecated in DPDK version 16.11 and onwards"
Diffstat (limited to 'VNFs/vACL/init.c')
-rw-r--r-- | VNFs/vACL/init.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/VNFs/vACL/init.c b/VNFs/vACL/init.c index 6eb39bf3..42a1e43b 100644 --- a/VNFs/vACL/init.c +++ b/VNFs/vACL/init.c @@ -24,6 +24,7 @@ #include <rte_ip.h> #include <rte_eal.h> #include <rte_malloc.h> +#include <rte_version.h> #include "app.h" #include "pipeline.h" @@ -512,6 +513,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) { @@ -523,6 +526,7 @@ app_link_is_virtual(struct app_link_params *p) return 0; } +#endif void app_link_up_internal(struct app_params *app, struct app_link_params *cp) @@ -534,13 +538,14 @@ app_link_up_internal(struct app_params *app, struct app_link_params *cp) 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 */ cp->state = 1; @@ -555,11 +560,13 @@ app_link_down_internal(struct app_params *app, struct app_link_params *cp) 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); |