git: ab591c874b68 - main - netlink: Use NET_EPOCH_[CALL|WAIT] macros
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 21 Dec 2022 01:42:25 UTC
The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ab591c874b68512170750a7a54e41fd508249814 commit ab591c874b68512170750a7a54e41fd508249814 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2022-12-21 01:40:05 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2022-12-21 01:40:05 +0000 netlink: Use NET_EPOCH_[CALL|WAIT] macros Reviewed by: melifaro, kp Approved by: kp (mentor) Differential Revision: https://reviews.freebsd.org/D37730 --- sys/netlink/netlink_domain.c | 2 +- sys/netlink/netlink_generic.c | 2 +- sys/netlink/netlink_route.c | 2 +- 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) {