aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dpdk/Makefile2
-rw-r--r--vnet/vnet/devices/dpdk/init.c30
2 files changed, 31 insertions, 1 deletions
diff --git a/dpdk/Makefile b/dpdk/Makefile
index 316efc01..e1aafcbb 100644
--- a/dpdk/Makefile
+++ b/dpdk/Makefile
@@ -29,7 +29,7 @@ DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.gz
DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL)
DPDK_2.1.0_TARBALL_MD5_CKSUM := 205a0d12bfd6eb717d57506272f43519
DPDK_2.2.0_TARBALL_MD5_CKSUM := 22e2fd68cd5504f43fe9a5a6fd6dd938
-DPDK_16.04-rc2_TARBALL_MD5_CKSUM := a642985d2694d8cf8fdfdf0723be3406
+DPDK_16.04-rc4_TARBALL_MD5_CKSUM := 0de766a629999881e1c6e0de25d92bc0
DPDK_SOURCE := $(B)/dpdk-$(DPDK_VERSION)
DPDK_TARGET := x86_64-native-linuxapp-gcc
JOBS := $(shell grep processor /proc/cpuinfo | wc -l)
diff --git a/vnet/vnet/devices/dpdk/init.c b/vnet/vnet/devices/dpdk/init.c
index 822b05d4..17938697 100644
--- a/vnet/vnet/devices/dpdk/init.c
+++ b/vnet/vnet/devices/dpdk/init.c
@@ -1512,6 +1512,35 @@ void dpdk_update_link_state (dpdk_device_t * xd, f64 now)
break;
}
}
+#if RTE_VERSION >= RTE_VERSION_NUM(16, 4, 0, 0)
+ if (hw_flags_chg || (xd->link.link_speed != prev_link.link_speed))
+ {
+ hw_flags_chg = 1;
+ switch (xd->link.link_speed)
+ {
+ case ETH_SPEED_NUM_10M:
+ hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_10M;
+ break;
+ case ETH_SPEED_NUM_100M:
+ hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_100M;
+ break;
+ case ETH_SPEED_NUM_1G:
+ hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_1G;
+ break;
+ case ETH_SPEED_NUM_10G:
+ hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_10G;
+ break;
+ case ETH_SPEED_NUM_40G:
+ hw_flags |= VNET_HW_INTERFACE_FLAG_SPEED_40G;
+ break;
+ case 0:
+ break;
+ default:
+ clib_warning("unknown link speed %d", xd->link.link_speed);
+ break;
+ }
+ }
+#else
if (hw_flags_chg || (xd->link.link_speed != prev_link.link_speed))
{
hw_flags_chg = 1;
@@ -1539,6 +1568,7 @@ void dpdk_update_link_state (dpdk_device_t * xd, f64 now)
break;
}
}
+#endif
if (hw_flags_chg)
{
if (LINK_STATE_ELOGS)