API: Change ip4_address and ip6_address to use type alias.
[vpp.git] / src / plugins / vmxnet3 / format.c
index 8ee812e..c1a7436 100644 (file)
 u8 *
 format_vmxnet3_device_name (u8 * s, va_list * args)
 {
+  vlib_main_t *vm = vlib_get_main ();
   u32 i = va_arg (*args, u32);
   vmxnet3_main_t *vmxm = &vmxnet3_main;
   vmxnet3_device_t *vd = vec_elt_at_index (vmxm->devices, i);
-  vlib_pci_addr_t *addr = vlib_pci_get_addr (vd->pci_dev_handle);
+  vlib_pci_addr_t *addr = vlib_pci_get_addr (vm, vd->pci_dev_handle);
 
   s = format (s, "vmxnet3-%x/%x/%x/%x",
              addr->domain, addr->bus, addr->slot, addr->function);
@@ -62,6 +63,7 @@ format_vmxnet3_device (u8 * s, va_list * args)
   vmxnet3_txq_t *txq = vec_elt_at_index (vd->txqs, 0);
 
   s = format (s, "flags: %U", format_vmxnet3_device_flags, vd);
+  s = format (s, "\n%Uspeed %u", format_white_space, indent, vd->link_speed);
   s = format (s, "\n%Urx queues %u, rx desc %u, tx queues %u, tx desc %u",
              format_white_space, indent,
              vd->num_rx_queues, rxq->size, vd->num_tx_queues, txq->size);