Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys IFQ_ENQUEUE refactor (3/3) : eliminate pktattr argument ...
details: https://anonhg.NetBSD.org/src/rev/ce95e23f4c42
branches: trunk
changeset: 344791:ce95e23f4c42
user: knakahara <knakahara%NetBSD.org@localhost>
date: Wed Apr 20 09:01:03 2016 +0000
description:
IFQ_ENQUEUE refactor (3/3) : eliminate pktattr argument from IFQ_ENQUEUE caller
diffstat:
sys/dev/ic/hd64570.c | 9 ++++-----
sys/dev/pci/if_lmc.c | 6 +++---
sys/dev/ppbus/if_plip.c | 7 +++----
sys/dev/qbus/if_dmc.c | 9 ++++-----
sys/dev/usb/if_upl.c | 9 ++++-----
sys/dev/usb/uhso.c | 9 ++++-----
sys/net/if.c | 14 ++++++--------
sys/net/if.h | 24 +++++++-----------------
sys/net/if_arcsubr.c | 12 +++++-------
sys/net/if_atmsubr.c | 9 ++++-----
sys/net/if_bridge.c | 7 +++----
sys/net/if_ecosubr.c | 11 +++++------
sys/net/if_ethersubr.c | 7 +++----
sys/net/if_fddisubr.c | 9 ++++-----
sys/net/if_gif.c | 9 ++++-----
sys/net/if_hippisubr.c | 9 ++++-----
sys/net/if_ieee1394subr.c | 9 ++++-----
sys/net/if_loop.c | 9 ++++-----
sys/net/if_ppp.c | 13 +++++--------
sys/net/if_sl.c | 10 ++++------
sys/net/if_spppsubr.c | 9 ++++-----
sys/net/if_strip.c | 8 +++-----
sys/net/if_tokensubr.c | 9 ++++-----
sys/net/if_tun.c | 9 ++++-----
sys/net/if_vlan.c | 7 +++----
sys/net80211/ieee80211_input.c | 7 +++----
sys/netisdn/i4b_ipr.c | 9 ++++-----
27 files changed, 109 insertions(+), 150 deletions(-)
diffs (truncated from 1168 to 300 lines):
diff -r 51147838fba8 -r ce95e23f4c42 sys/dev/ic/hd64570.c
--- a/sys/dev/ic/hd64570.c Wed Apr 20 08:58:48 2016 +0000
+++ b/sys/dev/ic/hd64570.c Wed Apr 20 09:01:03 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hd64570.c,v 1.47 2014/06/05 23:48:16 rmind Exp $ */
+/* $NetBSD: hd64570.c,v 1.48 2016/04/20 09:01:03 knakahara Exp $ */
/*
* Copyright (c) 1999 Christian E. Hopps
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hd64570.c,v 1.47 2014/06/05 23:48:16 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hd64570.c,v 1.48 2016/04/20 09:01:03 knakahara Exp $");
#include "opt_inet.h"
@@ -798,7 +798,6 @@
struct ifqueue *ifq = NULL;
int s, error, len;
short mflags;
- ALTQ_DECL(struct altq_pktattr pktattr;)
error = 0;
@@ -811,7 +810,7 @@
* If the queueing discipline needs packet classification,
* do it before prepending link headers.
*/
- IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family, &pktattr);
+ IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family);
/*
* determine address family, and priority for this packet
@@ -876,7 +875,7 @@
} else
IF_ENQUEUE(ifq, m);
} else
- IFQ_ENQUEUE(&ifp->if_snd, m, &pktattr, error);
+ IFQ_ENQUEUE(&ifp->if_snd, m, error);
if (error != 0) {
splx(s);
ifp->if_oerrors++;
diff -r 51147838fba8 -r ce95e23f4c42 sys/dev/pci/if_lmc.c
--- a/sys/dev/pci/if_lmc.c Wed Apr 20 08:58:48 2016 +0000
+++ b/sys/dev/pci/if_lmc.c Wed Apr 20 09:01:03 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_lmc.c,v 1.57 2016/02/09 08:32:11 ozaki-r Exp $ */
+/* $NetBSD: if_lmc.c,v 1.58 2016/04/20 09:01:03 knakahara Exp $ */
/*-
* Copyright (c) 2002-2006 David Boggs. <boggs%boggs.palo-alto.ca.us@localhost>
@@ -74,7 +74,7 @@
*/
# include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_lmc.c,v 1.57 2016/02/09 08:32:11 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_lmc.c,v 1.58 2016/04/20 09:01:03 knakahara Exp $");
# include <sys/param.h> /* OS version */
# include "opt_inet.h" /* INET6, INET */
# include "opt_altq_enabled.h" /* ALTQ */
@@ -3375,7 +3375,7 @@
/* Some BSD QUEUE routines are not interrupt-safe. */
{
DISABLE_INTR; /* noop in FreeBSD */
- IFQ_ENQUEUE(&ifp->if_snd, m, NULL, error);
+ IFQ_ENQUEUE(&ifp->if_snd, m, error);
ENABLE_INTR; /* noop in FreeBSD */
}
diff -r 51147838fba8 -r ce95e23f4c42 sys/dev/ppbus/if_plip.c
--- a/sys/dev/ppbus/if_plip.c Wed Apr 20 08:58:48 2016 +0000
+++ b/sys/dev/ppbus/if_plip.c Wed Apr 20 09:01:03 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_plip.c,v 1.25 2014/06/05 23:48:16 rmind Exp $ */
+/* $NetBSD: if_plip.c,v 1.26 2016/04/20 09:01:03 knakahara Exp $ */
/*-
* Copyright (c) 1997 Poul-Henning Kamp
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.25 2014/06/05 23:48:16 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.26 2016/04/20 09:01:03 knakahara Exp $");
/*
* Parallel port TCP/IP interfaces added. I looked at the driver from
@@ -704,7 +704,6 @@
struct lp_softc * sc = ifp->if_softc;
device_t dev = sc->ppbus_dev.sc_dev;
device_t ppbus = device_parent(dev);
- ALTQ_DECL(struct altq_pktattr pktattr;)
int err;
int s;
@@ -731,7 +730,7 @@
goto endoutput;
}
- IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family, &pktattr);
+ IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family);
IFQ_ENQUEUE(&ifp->if_snd, m, NULL, err);
if(err == 0) {
if((ifp->if_flags & IFF_OACTIVE) == 0)
diff -r 51147838fba8 -r ce95e23f4c42 sys/dev/qbus/if_dmc.c
--- a/sys/dev/qbus/if_dmc.c Wed Apr 20 08:58:48 2016 +0000
+++ b/sys/dev/qbus/if_dmc.c Wed Apr 20 09:01:03 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_dmc.c,v 1.23 2014/06/05 23:48:16 rmind Exp $ */
+/* $NetBSD: if_dmc.c,v 1.24 2016/04/20 09:01:04 knakahara Exp $ */
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
* All rights reserved.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.23 2014/06/05 23:48:16 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.24 2016/04/20 09:01:04 knakahara Exp $");
#undef DMCDEBUG /* for base table dump on fatal error */
@@ -762,14 +762,13 @@
int type, error, s;
struct mbuf *m = m0;
struct dmc_header *dh;
- ALTQ_DECL(struct altq_pktattr pktattr;)
if ((ifp->if_flags & IFF_UP) == 0) {
error = ENETDOWN;
goto bad;
}
- IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family, &pktattr);
+ IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family);
switch (dst->sa_family) {
#ifdef INET
@@ -807,7 +806,7 @@
* not yet active.
*/
s = splnet();
- IFQ_ENQUEUE(&ifp->if_snd, m, &pktattr, error);
+ IFQ_ENQUEUE(&ifp->if_snd, m, error);
if (error) {
/* mbuf is already freed */
splx(s);
diff -r 51147838fba8 -r ce95e23f4c42 sys/dev/usb/if_upl.c
--- a/sys/dev/usb/if_upl.c Wed Apr 20 08:58:48 2016 +0000
+++ b/sys/dev/usb/if_upl.c Wed Apr 20 09:01:03 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_upl.c,v 1.49 2016/02/09 08:32:12 ozaki-r Exp $ */
+/* $NetBSD: if_upl.c,v 1.50 2016/04/20 09:01:04 knakahara Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.49 2016/02/09 08:32:12 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.50 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -998,7 +998,6 @@
struct rtentry *rt0)
{
int s, len, error;
- ALTQ_DECL(struct altq_pktattr pktattr;)
DPRINTFN(10,("%s: %s: enter\n",
device_xname(((struct upl_softc *)ifp->if_softc)->sc_dev),
@@ -1008,7 +1007,7 @@
* if the queueing discipline needs packet classification,
* do it now.
*/
- IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family, &pktattr);
+ IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family);
len = m->m_pkthdr.len;
s = splnet();
@@ -1016,7 +1015,7 @@
* Queue message on interface, and start output if interface
* not yet active.
*/
- IFQ_ENQUEUE(&ifp->if_snd, m, &pktattr, error);
+ IFQ_ENQUEUE(&ifp->if_snd, m, error);
if (error) {
/* mbuf is already freed */
splx(s);
diff -r 51147838fba8 -r ce95e23f4c42 sys/dev/usb/uhso.c
--- a/sys/dev/usb/uhso.c Wed Apr 20 08:58:48 2016 +0000
+++ b/sys/dev/usb/uhso.c Wed Apr 20 09:01:03 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uhso.c,v 1.17 2014/11/15 19:18:19 christos Exp $ */
+/* $NetBSD: uhso.c,v 1.18 2016/04/20 09:01:04 knakahara Exp $ */
/*-
* Copyright (c) 2009 Iain Hibbert
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.17 2014/11/15 19:18:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.18 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -2340,18 +2340,17 @@
uhso_ifnet_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
struct rtentry *rt0)
{
- ALTQ_DECL(struct altq_pktattr pktattr);
int error;
if (!ISSET(ifp->if_flags, IFF_RUNNING))
return EIO;
- IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family, &pktattr);
+ IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family);
switch (dst->sa_family) {
#ifdef INET
case AF_INET:
- error = ifq_enqueue(ifp, m ALTQ_COMMA ALTQ_DECL(&pktattr));
+ error = ifq_enqueue(ifp, m);
break;
#endif
diff -r 51147838fba8 -r ce95e23f4c42 sys/net/if.c
--- a/sys/net/if.c Wed Apr 20 08:58:48 2016 +0000
+++ b/sys/net/if.c Wed Apr 20 09:01:03 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.329 2016/04/11 09:21:18 ozaki-r Exp $ */
+/* $NetBSD: if.c,v 1.330 2016/04/20 09:01:04 knakahara Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.329 2016/04/11 09:21:18 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.330 2016/04/20 09:01:04 knakahara Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -2671,15 +2671,14 @@
* not yet active.
*/
int
-ifq_enqueue(struct ifnet *ifp, struct mbuf *m
- ALTQ_COMMA ALTQ_DECL(struct altq_pktattr *pktattr))
+ifq_enqueue(struct ifnet *ifp, struct mbuf *m)
{
int len = m->m_pkthdr.len;
int mflags = m->m_flags;
int s = splnet();
int error;
- IFQ_ENQUEUE(&ifp->if_snd, m, pktattr, error);
+ IFQ_ENQUEUE(&ifp->if_snd, m, error);
if (error != 0)
goto out;
ifp->if_obytes += len;
@@ -2696,8 +2695,7 @@
* Queue message on interface, possibly using a second fast queue
*/
int
-ifq_enqueue2(struct ifnet *ifp, struct ifqueue *ifq, struct mbuf *m
- ALTQ_COMMA ALTQ_DECL(struct altq_pktattr *pktattr))
+ifq_enqueue2(struct ifnet *ifp, struct ifqueue *ifq, struct mbuf *m)
{
int error = 0;
@@ -2714,7 +2712,7 @@
} else
IF_ENQUEUE(ifq, m);
} else
- IFQ_ENQUEUE(&ifp->if_snd, m, pktattr, error);
+ IFQ_ENQUEUE(&ifp->if_snd, m, error);
if (error != 0) {
++ifp->if_oerrors;
return error;
diff -r 51147838fba8 -r ce95e23f4c42 sys/net/if.h
--- a/sys/net/if.h Wed Apr 20 08:58:48 2016 +0000
+++ b/sys/net/if.h Wed Apr 20 09:01:03 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.h,v 1.200 2016/04/20 08:58:48 knakahara Exp $ */
+/* $NetBSD: if.h,v 1.201 2016/04/20 09:01:04 knakahara Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -754,12 +754,8 @@
#ifdef _KERNEL
#ifdef ALTQ
Home |
Main Index |
Thread Index |
Old Index