Report link as up only if we managed to open tap device.
It would be cool to report tap device status, but it has no such API. MFC after: 2 weeks
This commit is contained in:
parent
161ff946d4
commit
f62a422e61
@ -644,8 +644,8 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts)
|
||||
pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_NETWORK);
|
||||
pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_NET);
|
||||
|
||||
/* link always up */
|
||||
sc->vsc_config.status = 1;
|
||||
/* Link is up if we managed to open tap device. */
|
||||
sc->vsc_config.status = (sc->vsc_tapfd >= 0);
|
||||
|
||||
/* use BAR 1 to map MSI-X table and PBA, if we're using MSI-X */
|
||||
if (vi_intr_init(&sc->vsc_vs, 1, fbsdrun_virtio_msix()))
|
||||
|
Loading…
x
Reference in New Issue
Block a user