]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Although most of the NIC drivers are epoch ready, due to peer pressure
authorglebius <glebius@FreeBSD.org>
Mon, 24 Feb 2020 21:07:30 +0000 (21:07 +0000)
committerglebius <glebius@FreeBSD.org>
Mon, 24 Feb 2020 21:07:30 +0000 (21:07 +0000)
commitb28561216a1c7ac45c87e1dffa75d5674d442d7c
treedbafdab0aa69300a928fd4f2b7a819ffbce178e1
parent9e373bfe27d1777c09318f32492eb1d4c4815994
Although most of the NIC drivers are epoch ready, due to peer pressure
switch over to opt-in instead of opt-out for epoch.

Instead of IFF_NEEDSEPOCH, provide IFF_KNOWSEPOCH. If driver marks
itself with IFF_KNOWSEPOCH, then ether_input() would not enter epoch
when processing its packets.

Now this will create recursive entrance in epoch in >90% network
drivers, but will guarantee safeness of the transition.

Mark several tested drivers as IFF_KNOWSEPOCH.

Reviewed by: hselasky, jeff, bz, gallatin
Differential Revision: https://reviews.freebsd.org/D23674
13 files changed:
sys/dev/beri/virtio/network/if_vtbe.c
sys/dev/dpaa/if_dtsec.c
sys/dev/hyperv/netvsc/if_hn.c
sys/dev/if_ndis/if_ndis.c
sys/dev/mlx5/mlx5_en/mlx5_en_main.c
sys/dev/ntb/if_ntb/if_ntb.c
sys/dev/sbni/if_sbni.c
sys/dev/virtio/network/if_vtnet.c
sys/mips/nlm/dev/net/xlpge.c
sys/net/if.c
sys/net/if.h
sys/net/if_ethersubr.c
sys/net/iflib.c