diff --git a/sys/netinet/tcp_ratelimit.c b/sys/netinet/tcp_ratelimit.c index bf15ef12f14e..39698d55aabe 100644 --- a/sys/netinet/tcp_ratelimit.c +++ b/sys/netinet/tcp_ratelimit.c @@ -880,7 +880,7 @@ rt_setup_rate(struct inpcb *inp, struct ifnet *ifp, uint64_t bytes_per_sec, struct epoch_tracker et; int err; - epoch_enter_preempt(net_epoch_preempt, &et); + NET_EPOCH_ENTER(et); use_real_interface: CK_LIST_FOREACH(rs, &int_rs, next) { /* @@ -920,7 +920,7 @@ rt_setup_rate(struct inpcb *inp, struct ifnet *ifp, uint64_t bytes_per_sec, if ((rs == NULL) || (rs->rs_disable != 0)) { if (rs->rs_disable && error) *error = ENOSPC; - epoch_exit_preempt(net_epoch_preempt, &et); + NET_EPOCH_EXIT(et); return (NULL); } if (rs->rs_flags & RS_IS_DEFF) { @@ -931,7 +931,7 @@ rt_setup_rate(struct inpcb *inp, struct ifnet *ifp, uint64_t bytes_per_sec, if (tifp == NULL) { if (rs->rs_disable && error) *error = ENOTSUP; - epoch_exit_preempt(net_epoch_preempt, &et); + NET_EPOCH_EXIT(et); return (NULL); } goto use_real_interface; @@ -940,7 +940,7 @@ rt_setup_rate(struct inpcb *inp, struct ifnet *ifp, uint64_t bytes_per_sec, ((rs->rs_flows_using + 1) > rs->rs_flow_limit)) { if (error) *error = ENOSPC; - epoch_exit_preempt(net_epoch_preempt, &et); + NET_EPOCH_EXIT(et); return (NULL); } rte = tcp_find_suitable_rate(rs, bytes_per_sec, flags); @@ -964,7 +964,7 @@ rt_setup_rate(struct inpcb *inp, struct ifnet *ifp, uint64_t bytes_per_sec, */ atomic_add_64(&rs->rs_flows_using, 1); } - epoch_exit_preempt(net_epoch_preempt, &et); + NET_EPOCH_EXIT(et); return (rte); }