diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-07-10 13:23:35 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-07-10 13:23:35 +0000 |
commit | 75620858502cb86710140bab76d93d2cfc2277d4 (patch) | |
tree | 65876066a6cae94be9dee376d7d3b23a440b30ee /sys/net | |
parent | 2ab8b96a9014558910b5e8b263ec8b87d01091ba (diff) |
Change users of IFQ_PURGE() to use the "new" API.
ok dlg@ tobhe@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.c | 4 | ||||
-rw-r--r-- | sys/net/if_mpip.c | 8 | ||||
-rw-r--r-- | sys/net/if_mpw.c | 8 | ||||
-rw-r--r-- | sys/net/if_pflog.c | 4 | ||||
-rw-r--r-- | sys/net/if_pfsync.c | 4 | ||||
-rw-r--r-- | sys/net/if_spppsubr.c | 4 | ||||
-rw-r--r-- | sys/net/if_var.h | 7 |
7 files changed, 17 insertions, 22 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index a021c398026..875eb8b30ed 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.611 2020/06/30 09:31:38 kn Exp $ */ +/* $OpenBSD: if.c,v 1.612 2020/07/10 13:23:34 patrick Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -1614,7 +1614,7 @@ if_down(struct ifnet *ifp) ifp->if_flags &= ~IFF_UP; getmicrotime(&ifp->if_lastchange); - IFQ_PURGE(&ifp->if_snd); + ifq_purge(&ifp->if_snd); if_linkstate(ifp); } diff --git a/sys/net/if_mpip.c b/sys/net/if_mpip.c index 5f82da2f94a..9d243b56385 100644 --- a/sys/net/if_mpip.c +++ b/sys/net/if_mpip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpip.c,v 1.9 2020/06/17 06:45:22 dlg Exp $ */ +/* $OpenBSD: if_mpip.c,v 1.10 2020/07/10 13:23:34 patrick Exp $ */ /* * Copyright (c) 2015 Rafael Zalamena <rzalamena@openbsd.org> @@ -681,19 +681,19 @@ mpip_start(struct ifnet *ifp) uint8_t tos, prio, ttl; if (!ISSET(ifp->if_flags, IFF_RUNNING) || n == NULL) { - IFQ_PURGE(&ifp->if_snd); + ifq_purge(&ifp->if_snd); return; } rt = rtalloc(sstosa(&n->n_nexthop), RT_RESOLVE, sc->sc_rdomain); if (!rtisvalid(rt)) { - IFQ_PURGE(&ifp->if_snd); + ifq_purge(&ifp->if_snd); goto rtfree; } ifp0 = if_get(rt->rt_ifidx); if (ifp0 == NULL) { - IFQ_PURGE(&ifp->if_snd); + ifq_purge(&ifp->if_snd); goto rtfree; } diff --git a/sys/net/if_mpw.c b/sys/net/if_mpw.c index be8bdda2247..af764ac05eb 100644 --- a/sys/net/if_mpw.c +++ b/sys/net/if_mpw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpw.c,v 1.56 2020/06/17 06:45:22 dlg Exp $ */ +/* $OpenBSD: if_mpw.c,v 1.57 2020/07/10 13:23:34 patrick Exp $ */ /* * Copyright (c) 2015 Rafael Zalamena <rzalamena@openbsd.org> @@ -653,19 +653,19 @@ mpw_start(struct ifnet *ifp) n = sc->sc_neighbor; if (!ISSET(ifp->if_flags, IFF_RUNNING) || n == NULL) { - IFQ_PURGE(&ifp->if_snd); + ifq_purge(&ifp->if_snd); return; } rt = rtalloc(sstosa(&n->n_nexthop), RT_RESOLVE, sc->sc_rdomain); if (!rtisvalid(rt)) { - IFQ_PURGE(&ifp->if_snd); + ifq_purge(&ifp->if_snd); goto rtfree; } ifp0 = if_get(rt->rt_ifidx); if (ifp0 == NULL) { - IFQ_PURGE(&ifp->if_snd); + ifq_purge(&ifp->if_snd); goto rtfree; } diff --git a/sys/net/if_pflog.c b/sys/net/if_pflog.c index e894f412441..3d9c46f9f1e 100644 --- a/sys/net/if_pflog.c +++ b/sys/net/if_pflog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflog.c,v 1.86 2019/10/17 11:23:49 millert Exp $ */ +/* $OpenBSD: if_pflog.c,v 1.87 2020/07/10 13:23:34 patrick Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -192,7 +192,7 @@ pflog_clone_destroy(struct ifnet *ifp) void pflogstart(struct ifnet *ifp) { - IFQ_PURGE(&ifp->if_snd); + ifq_purge(&ifp->if_snd); } int diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c index 8a486abd97c..1e3d10c36b5 100644 --- a/sys/net/if_pfsync.c +++ b/sys/net/if_pfsync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.c,v 1.272 2020/06/28 06:40:14 sashan Exp $ */ +/* $OpenBSD: if_pfsync.c,v 1.273 2020/07/10 13:23:34 patrick Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -418,7 +418,7 @@ pfsync_clone_destroy(struct ifnet *ifp) void pfsyncstart(struct ifnet *ifp) { - IFQ_PURGE(&ifp->if_snd); + ifq_purge(&ifp->if_snd); } void diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index d28abdfd673..474b99e289d 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_spppsubr.c,v 1.182 2020/07/10 13:22:22 patrick Exp $ */ +/* $OpenBSD: if_spppsubr.c,v 1.183 2020/07/10 13:23:34 patrick Exp $ */ /* * Synchronous PPP link level subroutines. * @@ -768,7 +768,7 @@ sppp_flush(struct ifnet *ifp) { struct sppp *sp = (struct sppp*) ifp; - IFQ_PURGE(&sp->pp_if.if_snd); + ifq_purge(&sp->pp_if.if_snd); mq_purge(&sp->pp_cpq); } diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 13dee98bbff..be67f03d312 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_var.h,v 1.107 2020/07/10 13:22:22 patrick Exp $ */ +/* $OpenBSD: if_var.h,v 1.108 2020/07/10 13:23:34 patrick Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -285,11 +285,6 @@ struct ifg_list { * IFQ compat on ifq API */ -#define IFQ_PURGE(ifq) \ -do { \ - (void)ifq_purge(ifq); \ -} while (/* CONSTCOND */0) - #define IFQ_IS_EMPTY(ifq) ifq_empty(ifq) #define IFQ_SET_MAXLEN(ifq, len) ifq_set_maxlen(ifq, len) |