#include <rte_ip.h>
#include <rte_eal.h>
#include <rte_malloc.h>
+#include <rte_version.h>
#include "app.h"
#include "pipeline.h"
&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)
{
return 0;
}
+#endif
void
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;
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);
#include <rte_ip.h>
#include <rte_eal.h>
#include <rte_malloc.h>
+#include <rte_version.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)
{
}
#endif
+#endif
+
void
app_link_up_internal(__rte_unused struct app_params *app, struct app_link_params *cp)
{
int status;
struct rte_eth_link link;
+#if RTE_VERSION < 0x100b0000
if (app_link_is_virtual(cp)) {
cp->state = 1;
return;
}
-
+#endif
/* For each link, add filters for IP of current link */
if (cp->ip != 0) {
int status;
struct rte_eth_link link;
+#if RTE_VERSION < 0x100b0000
if (app_link_is_virtual(cp)) {
cp->state = 0;
return;
}
+#endif
+
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_version.h>
#include "app.h"
#include "pipeline.h"
&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)
{
return 0;
}
-
+#endif
void
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 */
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;