summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2020-07-10 13:23:34 +0000
committerpatrick <patrick@openbsd.org>2020-07-10 13:23:34 +0000
commit98da7c78c1129e233f4db1a3d25af46bb08b1a17 (patch)
tree5446e96598c3c082be083e32441fd7fb68c61057
parentChange users of IFQ_DEQUEUE(), IFQ_ENQUEUE() and IFQ_LEN() to use the (diff)
downloadwireguard-openbsd-98da7c78c1129e233f4db1a3d25af46bb08b1a17.tar.xz
wireguard-openbsd-98da7c78c1129e233f4db1a3d25af46bb08b1a17.zip
Change users of IFQ_PURGE() to use the "new" API.
ok dlg@ tobhe@
-rw-r--r--sys/dev/ic/ath.c4
-rw-r--r--sys/net/if.c4
-rw-r--r--sys/net/if_mpip.c8
-rw-r--r--sys/net/if_mpw.c8
-rw-r--r--sys/net/if_pflog.c4
-rw-r--r--sys/net/if_pfsync.c4
-rw-r--r--sys/net/if_spppsubr.c4
-rw-r--r--sys/net/if_var.h7
8 files changed, 19 insertions, 24 deletions
diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c
index 5e291235249..53f8f22e330 100644
--- a/sys/dev/ic/ath.c
+++ b/sys/dev/ic/ath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ath.c,v 1.119 2020/07/10 13:22:19 patrick Exp $ */
+/* $OpenBSD: ath.c,v 1.120 2020/07/10 13:23:34 patrick Exp $ */
/* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */
/*-
@@ -737,7 +737,7 @@ ath_stop(struct ifnet *ifp)
} else {
sc->sc_rxlink = NULL;
}
- IFQ_PURGE(&ifp->if_snd);
+ ifq_purge(&ifp->if_snd);
#ifndef IEEE80211_STA_ONLY
ath_beacon_free(sc);
#endif
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)