diff options
| author | Vincenzo Maffione <vmaffione@FreeBSD.org> | 2021-01-09 22:34:10 +0000 |
|---|---|---|
| committer | Vincenzo Maffione <vmaffione@FreeBSD.org> | 2021-01-09 22:34:52 +0000 |
| commit | 9ac59d42c0b4b6cd9c36a5dace7f49753c2e175a (patch) | |
| tree | 1f5ed706fcb52a797ff0720f9cc1c4296da85d52 /sys/dev/netmap | |
| parent | 7ba6ecf216fb15e8b147db268b91d9b82c5a0682 (diff) | |
Diffstat (limited to 'sys/dev/netmap')
| -rw-r--r-- | sys/dev/netmap/if_vtnet_netmap.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/netmap/if_vtnet_netmap.h b/sys/dev/netmap/if_vtnet_netmap.h index 0f686ed60788..a44cc13baae2 100644 --- a/sys/dev/netmap/if_vtnet_netmap.h +++ b/sys/dev/netmap/if_vtnet_netmap.h @@ -40,6 +40,9 @@ vtnet_netmap_reg(struct netmap_adapter *na, int state) struct ifnet *ifp = na->ifp; struct vtnet_softc *sc = ifp->if_softc; + /* Stop all txsync/rxsync and disable them. */ + netmap_disable_all_rings(ifp); + /* * Trigger a device reinit, asking vtnet_init_locked() to * also enter or exit netmap mode. @@ -50,7 +53,10 @@ vtnet_netmap_reg(struct netmap_adapter *na, int state) : VTNET_INIT_NETMAP_EXIT); VTNET_CORE_UNLOCK(sc); - return 0; + /* Enable txsync/rxsync again. */ + netmap_enable_all_rings(ifp); + + return (0); } |
