dpdk: change netvsc device port type 21/26221/4
authorMatthew Smith <mgsmith@netgate.com>
Mon, 23 Mar 2020 16:27:49 +0000 (11:27 -0500)
committerDamjan Marion <dmarion@me.com>
Tue, 19 May 2020 18:54:59 +0000 (18:54 +0000)
Netvsc devices have the port type determined from their link speed.
The link speed between reboots of an Azure VM does not always end
up at the same value, so an interface that was FortyGigabitEthernet0
earlier may be FiftyGigabitEthernet0 now. That makes it difficult
to maintain a persistent store of configurations and apply those at
startup.

Change the port type to be VF so the name will always be generated
as VirtualFunctionEthernetX.

Type: improvement

Change-Id: I58cab852b87c0bcd9f73afe239803f38dab5c159
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
src/plugins/dpdk/device/init.c

index 0b80f5d..3eb510d 100644 (file)
@@ -571,7 +571,7 @@ dpdk_lib_init (dpdk_main_t * dm)
                 {
                   struct rte_eth_link l;
                   rte_eth_link_get_nowait (i, &l);
-                  xd->port_type = port_type_from_link_speed (l.link_speed);
+                 xd->port_type = VNET_DPDK_PORT_TYPE_ETH_VF;
                 }
              break;