]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
netmap: enter NET_EPOCH on generic txsync
authorVincenzo Maffione <vmaffione@FreeBSD.org>
Mon, 28 Oct 2019 19:00:27 +0000 (19:00 +0000)
committerVincenzo Maffione <vmaffione@FreeBSD.org>
Mon, 28 Oct 2019 19:00:27 +0000 (19:00 +0000)
commit484456b2d8b8c0f99fb280f0d7477f328a0c9c04
tree09cca84f2fb768566f2cd4005c67888cd8448ce0
parentf5ef5f675d9d9eb6e35ed9142d70ecf774456ad4
netmap: enter NET_EPOCH on generic txsync

After r353292, netmap generic adapter on if_vlan interfaces panics on
asserting the NET_EPOCH. In more detail, this happens when
nm_os_generic_xmit_frame() is called, that is in the generic txsync
routine.
Fix the issue by entering the NET_EPOCH during the generic txsync.
We amortize the cost of entering/exiting over a whole batch of
transmissions.

PR: 241489
Reported by: Aleksandr Fedorov <aleksandr.fedorov@itglobal.com>
sys/dev/netmap/netmap_generic.c