diff options
author | Zhenlei Huang <zlei@FreeBSD.org> | 2022-12-21 01:40:05 +0000 |
---|---|---|
committer | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2023-01-23 22:04:03 +0000 |
commit | e121eaf737dd8131ca4a674a397cbd6af6321585 (patch) | |
tree | 7ae0ceda9666c9846c805cfdc5b349e8dc8952c6 | |
parent | db476bbc226a11e6948a53e3fb8e8ca6b192f409 (diff) | |
download | src-e121eaf737dd8131ca4a674a397cbd6af6321585.tar.gz src-e121eaf737dd8131ca4a674a397cbd6af6321585.zip |
netlink: Use NET_EPOCH_[CALL|WAIT] macros
Reviewed by: melifaro, kp
Approved by: kp (mentor)
Differential Revision: https://reviews.freebsd.org/D37730
(cherry picked from commit ab591c874b68512170750a7a54e41fd508249814)
-rw-r--r-- | sys/netlink/netlink_domain.c | 2 | ||||
-rw-r--r-- | sys/netlink/netlink_generic.c | 2 | ||||
-rw-r--r-- | sys/netlink/netlink_route.c | 2 | ||||
-rw-r--r-- | sys/netlink/route/nexthop.c | 5 |
4 files changed, 5 insertions, 6 deletions
diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c index b0ff84401c84..f35cc7f09991 100644 --- a/sys/netlink/netlink_domain.c +++ b/sys/netlink/netlink_domain.c @@ -486,7 +486,7 @@ nl_pru_detach(struct socket *so) NL_LOG(LOG_DEBUG3, "socket %p, detached", so); /* XXX: is delayed free needed? */ - epoch_call(net_epoch_preempt, destroy_nlpcb_epoch, &nlp->nl_epoch_ctx); + NET_EPOCH_CALL(destroy_nlpcb_epoch, &nlp->nl_epoch_ctx); } static int diff --git a/sys/netlink/netlink_generic.c b/sys/netlink/netlink_generic.c index 267024dfee4b..028ea24fc5e9 100644 --- a/sys/netlink/netlink_generic.c +++ b/sys/netlink/netlink_generic.c @@ -513,6 +513,6 @@ genl_unload(void *u __unused) { genl_nlctrl_destroy(); GENL_LOCK_DESTROY(); - epoch_wait_preempt(net_epoch_preempt); + NET_EPOCH_WAIT(); } SYSUNINIT(genl_unload, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, genl_unload, NULL); diff --git a/sys/netlink/netlink_route.c b/sys/netlink/netlink_route.c index 0622656715c4..42b0bc66666e 100644 --- a/sys/netlink/netlink_route.c +++ b/sys/netlink/netlink_route.c @@ -134,6 +134,6 @@ rtnl_unload(void *u __unused) rtnl_neighs_destroy(); /* Wait till all consumers read nlbridge data */ - epoch_wait_preempt(net_epoch_preempt); + NET_EPOCH_WAIT(); } SYSUNINIT(rtnl_unload, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, rtnl_unload, NULL); diff --git a/sys/netlink/route/nexthop.c b/sys/netlink/route/nexthop.c index cd184a635eb4..e9f008842644 100644 --- a/sys/netlink/route/nexthop.c +++ b/sys/netlink/route/nexthop.c @@ -553,8 +553,7 @@ delete_unhop(struct unhop_ctl *ctl, struct nlmsghdr *hdr, uint32_t uidx) while (unhop_base != NULL) { unhop_chain = unhop_base->un_nextchild; - epoch_call(net_epoch_preempt, destroy_unhop_epoch, - &unhop_base->un_epoch_ctx); + NET_EPOCH_CALL(destroy_unhop_epoch, &unhop_base->un_epoch_ctx); unhop_base = unhop_chain; } @@ -632,7 +631,7 @@ vnet_destroy_unhops(const void *unused __unused) V_un_ctl = NULL; /* Wait till all unhop users finish their reads */ - epoch_wait_preempt(net_epoch_preempt); + NET_EPOCH_WAIT(); UN_WLOCK(ctl); CHT_SLIST_FOREACH_SAFE(&ctl->un_head, unhop, unhop, tmp) { |