From 1d238b07d5d4d9660ae0e08daede6da7e91c7853 Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Sat, 9 Jan 2021 20:54:11 +0000 Subject: netmap: iflib: stop krings during interface reset When different processes open separate subsets of the available rings of a same netmap interface, a device reset may be performed while one of the processes is actively using some rings (e.g., caused by another process executing a nmport_open()). With this patch, such situation will cause the active process to get a POLLERR, so that it can have a chance to detect the situation. We also guarantee that no process is running a txsync or rxsync (ioctl or poll) while an iflib device reset is in progress. PR: 252453 MFC after: 1 week --- sys/dev/netmap/netmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev') diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c index d2c0f8f1c5c4..aa3bb1843ba5 100644 --- a/sys/dev/netmap/netmap.c +++ b/sys/dev/netmap/netmap.c @@ -4236,7 +4236,7 @@ nm_set_native_flags(struct netmap_adapter *na) struct ifnet *ifp = na->ifp; /* We do the setup for intercepting packets only if we are the - * first user of this adapapter. */ + * first user of this adapter. */ if (na->active_fds > 0) { return; } -- cgit v1.3