Date: Sun, 14 Apr 2019 13:17:40 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r346214 - stable/12/sys/netpfil/ipfw/nat64 Message-ID: <201904141317.x3EDHeMH074575@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ae Date: Sun Apr 14 13:17:40 2019 New Revision: 346214 URL: https://svnweb.freebsd.org/changeset/base/346214 Log: MFC r345319: Use NET_EPOCH instead of allocating separate one. The code was modified to fix incompatibility that was introduced in r342872. Modified: stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c ============================================================================== --- stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c Sun Apr 14 13:08:18 2019 (r346213) +++ stable/12/sys/netpfil/ipfw/nat64/nat64lsn.c Sun Apr 14 13:17:40 2019 (r346214) @@ -72,12 +72,10 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_NAT64LSN, "NAT64LSN", "NAT64LSN"); -static epoch_t nat64lsn_epoch; -#define NAT64LSN_EPOCH_ENTER(et) epoch_enter_preempt(nat64lsn_epoch, &(et)) -#define NAT64LSN_EPOCH_EXIT(et) epoch_exit_preempt(nat64lsn_epoch, &(et)) -#define NAT64LSN_EPOCH_WAIT() epoch_wait_preempt(nat64lsn_epoch) -#define NAT64LSN_EPOCH_ASSERT() MPASS(in_epoch(nat64lsn_epoch)) -#define NAT64LSN_EPOCH_CALL(c, f) epoch_call(nat64lsn_epoch, (c), (f)) +#define NAT64LSN_EPOCH_ENTER(et) NET_EPOCH_ENTER_ET(et) +#define NAT64LSN_EPOCH_EXIT(et) NET_EPOCH_EXIT_ET(et) +#define NAT64LSN_EPOCH_ASSERT() MPASS(in_epoch(net_epoch_preempt)) +#define NAT64LSN_EPOCH_CALL(c, f) epoch_call(net_epoch_preempt, (c), (f)) static uma_zone_t nat64lsn_host_zone; static uma_zone_t nat64lsn_pgchunk_zone; @@ -1578,8 +1576,6 @@ void nat64lsn_init_internal(void) { - nat64lsn_epoch = epoch_alloc(EPOCH_PREEMPT); - nat64lsn_host_zone = uma_zcreate("NAT64LSN hosts", sizeof(struct nat64lsn_host), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); @@ -1606,8 +1602,6 @@ nat64lsn_uninit_internal(void) { /* XXX: epoch_task drain */ - epoch_free(nat64lsn_epoch); - JQUEUE_LOCK_DESTROY(); uma_zdestroy(nat64lsn_host_zone); uma_zdestroy(nat64lsn_pgchunk_zone);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904141317.x3EDHeMH074575>