diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c index 08ee76300ae8..6339ce0e2ccf 100644 --- a/sys/netgraph/ng_socket.c +++ b/sys/netgraph/ng_socket.c @@ -58,6 +58,8 @@ #include #include #include +#include +#include #include #include #include @@ -217,6 +219,7 @@ static int ngc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, struct mbuf *control, struct thread *td) { + struct epoch_tracker et; struct ngpcb *const pcbp = sotongpcb(so); struct ngsock *const priv = NG_NODE_PRIVATE(pcbp->sockdata->node); struct sockaddr_ng *const sap = (struct sockaddr_ng *) addr; @@ -335,7 +338,9 @@ ngc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, item->apply = &apply; priv->error = -1; + NET_EPOCH_ENTER(et); error = ng_snd_item(item, 0); + NET_EPOCH_EXIT(et); mtx_lock(&priv->mtx); if (priv->error == -1) @@ -403,6 +408,7 @@ static int ngd_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, struct mbuf *control, struct thread *td) { + struct epoch_tracker et; struct ngpcb *const pcbp = sotongpcb(so); struct sockaddr_ng *const sap = (struct sockaddr_ng *) addr; int len, error; @@ -459,7 +465,9 @@ ngd_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, } /* Send data. */ + NET_EPOCH_ENTER(et); NG_SEND_DATA_FLAGS(error, hook, m, NG_WAITOK); + NET_EPOCH_EXIT(et); release: if (control != NULL)