diff options
author | Damjan Marion <damarion@cisco.com> | 2016-04-11 12:51:00 +0200 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2016-04-11 13:04:16 +0000 |
commit | 5ba5f83b797c2629b89cabbefea1c8bb4dccbbcd (patch) | |
tree | faeccbb697b0b88adef6e360db9565ca9ba3b636 /vnet | |
parent | c47e9796746f96f1f8f08fb95c98f5bf632705f4 (diff) |
Bump DPDK 16.04 to RC4
Change-Id: Ia9affeee54e860b6039d7ee0f411bd022b1dc76c
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vnet')
-rw-r--r-- | vnet/vnet/devices/dpdk/init.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/vnet/vnet/devices/dpdk/init.c b/vnet/vnet/devices/dpdk/init.c index 822b05d4c11..179386970cc 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) |