summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2020-08-11 23:40:55 +0000
committerkn <kn@cvs.openbsd.org>2020-08-11 23:40:55 +0000
commit1ea1f46ab945c63fe1eca8a726854e312f93ba42 (patch)
tree18a18df6674de0257cb03f0093fcb737f210a8b7 /sys
parented60da720befaf0330fd3e266f33f764f7ab0c25 (diff)
Run start routing without KERNEL_LOCK()
pfsyncstart() does not require the big lock, make it use the ifq API. OK mvs
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_pfsync.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c
index 478a0268a08..0b126835a2d 100644
--- a/sys/net/if_pfsync.c
+++ b/sys/net/if_pfsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pfsync.c,v 1.275 2020/07/29 12:08:15 mvs Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.276 2020/08/11 23:40:54 kn Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -253,7 +253,7 @@ void pfsync_update_net_tdb(struct pfsync_tdb *);
int pfsyncoutput(struct ifnet *, struct mbuf *, struct sockaddr *,
struct rtentry *);
int pfsyncioctl(struct ifnet *, u_long, caddr_t);
-void pfsyncstart(struct ifnet *);
+void pfsyncstart(struct ifqueue *);
void pfsync_syncdev_state(void *);
void pfsync_ifdetach(void *);
@@ -339,12 +339,12 @@ pfsync_clone_create(struct if_clone *ifc, int unit)
ifp->if_softc = sc;
ifp->if_ioctl = pfsyncioctl;
ifp->if_output = pfsyncoutput;
- ifp->if_start = pfsyncstart;
+ ifp->if_qstart = pfsyncstart;
ifp->if_type = IFT_PFSYNC;
ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN);
ifp->if_hdrlen = sizeof(struct pfsync_header);
ifp->if_mtu = ETHERMTU;
- ifp->if_xflags = IFXF_CLONED;
+ ifp->if_xflags = IFXF_CLONED | IFXF_MPSAFE;
timeout_set_proc(&sc->sc_tmo, pfsync_timeout, NULL);
timeout_set_proc(&sc->sc_bulk_tmo, pfsync_bulk_update, NULL);
timeout_set_proc(&sc->sc_bulkfail_tmo, pfsync_bulk_fail, NULL);
@@ -418,9 +418,9 @@ pfsync_clone_destroy(struct ifnet *ifp)
* Start output on the pfsync interface.
*/
void
-pfsyncstart(struct ifnet *ifp)
+pfsyncstart(struct ifqueue *ifq)
{
- ifq_purge(&ifp->if_snd);
+ ifq_purge(ifq);
}
void