diff options
| author | Gleb Smirnoff <glebius@FreeBSD.org> | 2020-01-15 06:05:20 +0000 |
|---|---|---|
| committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2020-01-15 06:05:20 +0000 |
| commit | 2a4bd982d0530863c7fd2aa1ff2b8de27b8896c7 (patch) | |
| tree | 0b20d2a92e2dac3c5bb75a62e7c5ccabcaf29d51 /sys/net | |
| parent | b1328235b470b7a70177ac0f2e916f94b94501c3 (diff) | |
Notes
Diffstat (limited to 'sys/net')
| -rw-r--r-- | sys/net/bpf.c | 13 | ||||
| -rw-r--r-- | sys/net/if.c | 8 | ||||
| -rw-r--r-- | sys/net/if_gre.c | 2 | ||||
| -rw-r--r-- | sys/net/if_lagg.c | 2 | ||||
| -rw-r--r-- | sys/net/if_vlan.c | 4 |
5 files changed, 14 insertions, 15 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 2bec4654bfd7..2d4f31369862 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -274,10 +274,10 @@ static struct filterops bpfread_filtops = { * * 2. An userland application uses ioctl() call to bpf_d descriptor. * All such call are serialized with global lock. BPF filters can be - * changed, but pointer to old filter will be freed using epoch_call(). + * changed, but pointer to old filter will be freed using NET_EPOCH_CALL(). * Thus it should be safe for bpf_tap/bpf_mtap* code to do access to * filter pointers, even if change will happen during bpf_tap execution. - * Destroying of bpf_d descriptor also is doing using epoch_call(). + * Destroying of bpf_d descriptor also is doing using NET_EPOCH_CALL(). * * 3. An userland application can write packets into bpf_d descriptor. * There we need to be sure, that ifnet won't disappear during bpfwrite(). @@ -288,7 +288,7 @@ static struct filterops bpfread_filtops = { * * 5. The kernel invokes bpfdetach() on interface destroying. All lists * are modified with global lock held and actual free() is done using - * epoch_call(). + * NET_EPOCH_CALL(). */ static void @@ -314,7 +314,7 @@ bpfif_rele(struct bpf_if *bp) if (!refcount_release(&bp->bif_refcnt)) return; - epoch_call(net_epoch_preempt, &bp->epoch_ctx, bpfif_free); + NET_EPOCH_CALL(bpfif_free, &bp->epoch_ctx); } static void @@ -330,7 +330,7 @@ bpfd_rele(struct bpf_d *d) if (!refcount_release(&d->bd_refcnt)) return; - epoch_call(net_epoch_preempt, &d->epoch_ctx, bpfd_free); + NET_EPOCH_CALL(bpfd_free, &d->epoch_ctx); } static struct bpf_program_buffer* @@ -2036,8 +2036,7 @@ bpf_setf(struct bpf_d *d, struct bpf_program *fp, u_long cmd) BPFD_UNLOCK(d); if (fcode != NULL) - epoch_call(net_epoch_preempt, &fcode->epoch_ctx, - bpf_program_buffer_free); + NET_EPOCH_CALL(bpf_program_buffer_free, &fcode->epoch_ctx); if (track_event) EVENTHANDLER_INVOKE(bpf_track, diff --git a/sys/net/if.c b/sys/net/if.c index 8960416b1a81..5962185fde9e 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -654,7 +654,7 @@ if_free(struct ifnet *ifp) IFNET_WUNLOCK(); if (refcount_release(&ifp->if_refcount)) - epoch_call(net_epoch_preempt, &ifp->if_epoch_ctx, if_destroy); + NET_EPOCH_CALL(if_destroy, &ifp->if_epoch_ctx); CURVNET_RESTORE(); } @@ -677,7 +677,7 @@ if_rele(struct ifnet *ifp) if (!refcount_release(&ifp->if_refcount)) return; - epoch_call(net_epoch_preempt, &ifp->if_epoch_ctx, if_destroy); + NET_EPOCH_CALL(if_destroy, &ifp->if_epoch_ctx); } void @@ -1826,7 +1826,7 @@ ifa_free(struct ifaddr *ifa) { if (refcount_release(&ifa->ifa_refcnt)) - epoch_call(net_epoch_preempt, &ifa->ifa_epoch_ctx, ifa_destroy); + NET_EPOCH_CALL(ifa_destroy, &ifa->ifa_epoch_ctx); } @@ -3410,7 +3410,7 @@ if_freemulti(struct ifmultiaddr *ifma) KASSERT(ifma->ifma_refcount == 0, ("if_freemulti_epoch: refcount %d", ifma->ifma_refcount)); - epoch_call(net_epoch_preempt, &ifma->ifma_epoch_ctx, if_destroymulti); + NET_EPOCH_CALL(if_destroymulti, &ifma->ifma_epoch_ctx); } diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index ad87605efa06..91eb0d69b812 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -392,7 +392,7 @@ gre_delete_tunnel(struct gre_softc *sc) if ((gs = sc->gre_so) != NULL && CK_LIST_EMPTY(&gs->list)) { CK_LIST_REMOVE(gs, chain); soclose(gs->so); - epoch_call(net_epoch_preempt, &gs->epoch_ctx, gre_sofree); + NET_EPOCH_CALL(gre_sofree, &gs->epoch_ctx); sc->gre_so = NULL; } GRE2IFP(sc)->if_drv_flags &= ~IFF_DRV_RUNNING; diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 047908e1a50c..174fd4479d80 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -910,7 +910,7 @@ lagg_port_destroy(struct lagg_port *lp, int rundelport) * free port and release it's ifnet reference after a grace period has * elapsed. */ - epoch_call(net_epoch_preempt, &lp->lp_epoch_ctx, lagg_port_destroy_cb); + NET_EPOCH_CALL(lagg_port_destroy_cb, &lp->lp_epoch_ctx); /* Update lagg capabilities */ lagg_capabilities(sc); lagg_linkstate(sc); diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index e7e32fb2a38d..88844b0e848b 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -584,7 +584,7 @@ vlan_setmulti(struct ifnet *ifp) while ((mc = CK_SLIST_FIRST(&sc->vlan_mc_listhead)) != NULL) { CK_SLIST_REMOVE_HEAD(&sc->vlan_mc_listhead, mc_entries); (void)if_delmulti(ifp_p, (struct sockaddr *)&mc->mc_addr); - epoch_call(net_epoch_preempt, &mc->mc_epoch_ctx, vlan_mc_free); + NET_EPOCH_CALL(vlan_mc_free, &mc->mc_epoch_ctx); } /* Now program new ones. */ @@ -1543,7 +1543,7 @@ vlan_unconfig_locked(struct ifnet *ifp, int departing) error); } CK_SLIST_REMOVE_HEAD(&ifv->vlan_mc_listhead, mc_entries); - epoch_call(net_epoch_preempt, &mc->mc_epoch_ctx, vlan_mc_free); + NET_EPOCH_CALL(vlan_mc_free, &mc->mc_epoch_ctx); } vlan_setflags(ifp, 0); /* clear special flags on parent */ |
