]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
netmap: iflib: stop krings during interface reset
authorVincenzo Maffione <vmaffione@FreeBSD.org>
Sat, 9 Jan 2021 20:54:11 +0000 (20:54 +0000)
committerVincenzo Maffione <vmaffione@FreeBSD.org>
Sat, 9 Jan 2021 21:01:46 +0000 (21:01 +0000)
commit1d238b07d5d4d9660ae0e08daede6da7e91c7853
tree9e42bddceaf5aa8b3d809b3e192f37395b8c06de
parentfaaf43b2a750aabeaa7cec434625fe1f2094a001
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
sys/net/iflib.c