Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jan 2021 15:12:22 GMT
From:      Vincenzo Maffione <vmaffione@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 54bbcca4f979 - main - re: netmap: enable/disable krings on interface reinit
Message-ID:  <202101101512.10AFCMvU029376@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by vmaffione:

URL: https://cgit.FreeBSD.org/src/commit/?id=54bbcca4f9790e012e0a0f1512d9c879a48d5293

commit 54bbcca4f9790e012e0a0f1512d9c879a48d5293
Author:     Vincenzo Maffione <vmaffione@FreeBSD.org>
AuthorDate: 2021-01-10 15:09:05 +0000
Commit:     Vincenzo Maffione <vmaffione@FreeBSD.org>
CommitDate: 2021-01-10 15:09:05 +0000

    re: netmap: enable/disable krings on interface reinit
    
    This prevents krings from being used during an interface
    reset, and notifies the active applications.
    See also 1d238b07d5d4d9660ae0.
    
    MFC after:      1 week
---
 sys/dev/re/if_re.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c
index 7d2940a67b35..cf327932cd74 100644
--- a/sys/dev/re/if_re.c
+++ b/sys/dev/re/if_re.c
@@ -3360,6 +3360,10 @@ re_init_locked(struct rl_softc *sc)
 
 	sc->rl_watchdog_timer = 0;
 	callout_reset(&sc->rl_stat_callout, hz, re_tick, sc);
+
+#ifdef DEV_NETMAP
+	netmap_enable_all_rings(ifp);
+#endif /* DEV_NETMAP */
 }
 
 /*
@@ -3608,6 +3612,10 @@ re_stop(struct rl_softc *sc)
 	callout_stop(&sc->rl_stat_callout);
 	ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
 
+#ifdef DEV_NETMAP
+	netmap_disable_all_rings(ifp);
+#endif /* DEV_NETMAP */
+
 	/*
 	 * Disable accepting frames to put RX MAC into idle state.
 	 * Otherwise it's possible to get frames while stop command



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101101512.10AFCMvU029376>