summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
b835128)
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 <anand.b.jyoti@intel.com>
#include <rte_ip.h>
#include <rte_eal.h>
#include <rte_malloc.h>
#include <rte_ip.h>
#include <rte_eal.h>
#include <rte_malloc.h>
+#include <rte_version.h>
#include "app.h"
#include "pipeline.h"
#include "app.h"
#include "pipeline.h"
+/* 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)
{
static int
app_link_is_virtual(struct app_link_params *p)
{
void
app_link_up_internal(struct app_params *app, struct app_link_params *cp)
void
app_link_up_internal(struct app_params *app, struct app_link_params *cp)
if(app == NULL || cp == NULL)
printf("NULL Pointers");
if(app == NULL || cp == NULL)
printf("NULL Pointers");
+#if RTE_VERSION < 0x100b0000
if (app_link_is_virtual(cp)) {
cp->state = 1;
return;
}
if (app_link_is_virtual(cp)) {
cp->state = 1;
return;
}
ifm_update_linkstatus(cp->pmd_id, IFM_ETH_LINK_UP);
ifm_update_linkstatus(cp->pmd_id, IFM_ETH_LINK_UP);
/* Mark link as UP */
cp->state = 1;
/* Mark link as UP */
cp->state = 1;
if(app == NULL || cp == NULL)
printf("NULL Pointers");
if(app == NULL || cp == NULL)
printf("NULL Pointers");
+
+#if RTE_VERSION < 0x100b0000
if (app_link_is_virtual(cp)) {
cp->state = 0;
return;
}
if (app_link_is_virtual(cp)) {
cp->state = 0;
return;
}
ifm_update_linkstatus(cp->pmd_id, IFM_ETH_LINK_DOWN);
ifm_update_linkstatus(cp->pmd_id, IFM_ETH_LINK_DOWN);
#include <rte_ip.h>
#include <rte_eal.h>
#include <rte_malloc.h>
#include <rte_ip.h>
#include <rte_eal.h>
#include <rte_malloc.h>
+#include <rte_version.h>
#include "app.h"
#include "pipeline.h"
#include "app.h"
#include "pipeline.h"
+/* rte_eth_dev is removed in DPDK version 16.11 and onwards */
+#if RTE_VERSION < 0x100b0000
static int
app_link_is_virtual(__rte_unused struct app_link_params *p)
{
static int
app_link_is_virtual(__rte_unused struct app_link_params *p)
{
void
app_link_up_internal(__rte_unused struct app_params *app, struct app_link_params *cp)
{
void
app_link_up_internal(__rte_unused struct app_params *app, struct app_link_params *cp)
{
int status;
struct rte_eth_link link;
int status;
struct rte_eth_link link;
+#if RTE_VERSION < 0x100b0000
if (app_link_is_virtual(cp)) {
cp->state = 1;
return;
}
if (app_link_is_virtual(cp)) {
cp->state = 1;
return;
}
/* For each link, add filters for IP of current link */
if (cp->ip != 0) {
/* For each link, add filters for IP of current link */
if (cp->ip != 0) {
int status;
struct rte_eth_link link;
int status;
struct rte_eth_link link;
+#if RTE_VERSION < 0x100b0000
if (app_link_is_virtual(cp)) {
cp->state = 0;
return;
}
if (app_link_is_virtual(cp)) {
cp->state = 0;
return;
}
rte_eth_link_get(cp->pmd_id, &link);
if (link.link_status) {
/* PMD link down */
rte_eth_link_get(cp->pmd_id, &link);
if (link.link_status) {
/* PMD link down */
#include <rte_ip.h>
#include <rte_eal.h>
#include <rte_malloc.h>
#include <rte_ip.h>
#include <rte_eal.h>
#include <rte_malloc.h>
+#include <rte_version.h>
#include "app.h"
#include "pipeline.h"
#include "app.h"
#include "pipeline.h"
+/* 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)
{
static int
app_link_is_virtual(struct app_link_params *p)
{
void
app_link_up_internal(__rte_unused struct app_params *app,
void
app_link_up_internal(__rte_unused struct app_params *app,
if(app == NULL || cp == NULL)
printf("NULL Pointers");
if(app == NULL || cp == NULL)
printf("NULL Pointers");
+#if RTE_VERSION < 0x100b0000
if (app_link_is_virtual(cp)) {
cp->state = 1;
return;
}
if (app_link_is_virtual(cp)) {
cp->state = 1;
return;
}
ifm_update_linkstatus(cp->pmd_id, IFM_ETH_LINK_UP);
/* Mark link as UP */
ifm_update_linkstatus(cp->pmd_id, IFM_ETH_LINK_UP);
/* Mark link as UP */
if(app == NULL || cp == NULL)
printf("NULL Pointers");
if(app == NULL || cp == NULL)
printf("NULL Pointers");
+#if RTE_VERSION < 0x100b0000
if (app_link_is_virtual(cp)) {
cp->state = 0;
return;
}
if (app_link_is_virtual(cp)) {
cp->state = 0;
return;
}
ifm_update_linkstatus(cp->pmd_id, IFM_ETH_LINK_DOWN);
/* Mark link as DOWN */
cp->state = 0;
ifm_update_linkstatus(cp->pmd_id, IFM_ETH_LINK_DOWN);
/* Mark link as DOWN */
cp->state = 0;