diff --git a/sys/dev/oce/oce_if.h b/sys/dev/oce/oce_if.h --- a/sys/dev/oce/oce_if.h +++ b/sys/dev/oce/oce_if.h @@ -42,6 +42,7 @@ #include #include +#include #include #include #include diff --git a/sys/dev/oce/oce_if.c b/sys/dev/oce/oce_if.c --- a/sys/dev/oce/oce_if.c +++ b/sys/dev/oce/oce_if.c @@ -2039,14 +2039,17 @@ uint16_t oce_rq_handler(void *arg) { + struct epoch_tracker et; struct oce_rq *rq = (struct oce_rq *)arg; struct oce_cq *cq = rq->cq; POCE_SOFTC sc = rq->parent; struct oce_nic_rx_cqe *cqe; int num_cqes = 0; + NET_EPOCH_ENTER(et); if(rq->islro) { oce_rq_handler_lro(arg); + NET_EPOCH_EXIT(et); return 0; } LOCK(&rq->rx_lock); @@ -2090,6 +2093,7 @@ oce_check_rx_bufs(sc, num_cqes, rq); UNLOCK(&rq->rx_lock); + NET_EPOCH_EXIT(et); return 0; } @@ -2110,7 +2114,7 @@ ifmedia_add(&sc->media, IFM_ETHER | IFM_AUTO, 0, NULL); ifmedia_set(&sc->media, IFM_ETHER | IFM_AUTO); - sc->ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST; + sc->ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | IFF_KNOWSEPOCH; sc->ifp->if_ioctl = oce_ioctl; sc->ifp->if_start = oce_start; sc->ifp->if_init = oce_init; diff --git a/sys/dev/oce/oce_queue.c b/sys/dev/oce/oce_queue.c --- a/sys/dev/oce/oce_queue.c +++ b/sys/dev/oce/oce_queue.c @@ -1233,13 +1233,15 @@ void oce_stop_rx(POCE_SOFTC sc) { + struct epoch_tracker et; struct oce_mbx mbx; struct mbx_delete_nic_rq *fwcmd; struct mbx_delete_nic_rq_v1 *fwcmd1; struct oce_rq *rq; int i = 0; - /* before deleting disable hwlro */ + NET_EPOCH_ENTER(et); + /* before deleting disable hwlro */ if(sc->enable_hwlro) oce_mbox_nic_set_iface_lro_config(sc, 0); @@ -1274,6 +1276,7 @@ UNLOCK(&rq->rx_lock); } } + NET_EPOCH_EXIT(et); } int