IFQ_ENQUEUE refactor (3/3) : eliminate pktattr argument from IFQ_ENQUEUE caller

This commit is contained in:
knakahara 2016-04-20 09:01:03 +00:00
parent 40b1061c07
commit b76ec0b083
27 changed files with 109 additions and 150 deletions

View File

@ -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 @@ sca_output(
struct ifqueue *ifq = NULL;
int s, error, len;
short mflags;
ALTQ_DECL(struct altq_pktattr pktattr;)
error = 0;
@ -811,7 +810,7 @@ sca_output(
* 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 @@ sca_output(
} 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++;

View File

@ -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>
@ -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 @@ ifnet_output(struct ifnet *ifp, struct mbuf *m,
/* 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 */
}

View File

@ -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 @@ lpoutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
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 @@ lpoutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
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)

View File

@ -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 @@ dmcoutput(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst,
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 @@ dmcoutput(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst,
* 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);

View File

@ -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 @@ upl_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
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 @@ upl_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
* 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 @@ upl_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
* 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);

View File

@ -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 @@ Static int
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

View File

@ -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 @@ ifreq_setaddr(u_long cmd, struct ifreq *ifr, const struct sockaddr *sa)
* 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 @@ out:
* 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 @@ ifq_enqueue2(struct ifnet *ifp, struct ifqueue *ifq, struct mbuf *m
} 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;

View File

@ -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 @@ struct if_addrprefreq {
#ifdef _KERNEL
#ifdef ALTQ
#define ALTQ_DECL(x) x
#define ALTQ_COMMA ,
#define IFQ_ENQUEUE(ifq, m, unused, err) \
#define IFQ_ENQUEUE(ifq, m, err) \
do { \
struct altq_pktattr *_unused __unused = unused; \
IFQ_LOCK((ifq)); \
if (ALTQ_IS_ENABLED((ifq))) \
ALTQ_ENQUEUE((ifq), (m), (err)); \
@ -816,9 +812,8 @@ do { \
(ifq)->altq_flags |= ALTQF_READY; \
} while (/*CONSTCOND*/ 0)
#define IFQ_CLASSIFY(ifq, m, af, unused) \
#define IFQ_CLASSIFY(ifq, m, af) \
do { \
struct altq_pktattr *_unused __unused = unused; \
IFQ_LOCK((ifq)); \
if (ALTQ_IS_ENABLED((ifq))) { \
if (ALTQ_NEEDS_CLASSIFY((ifq))) \
@ -830,10 +825,7 @@ do { \
IFQ_UNLOCK((ifq)); \
} while (/*CONSTCOND*/ 0)
#else /* ! ALTQ */
#define ALTQ_DECL(x) /* nothing */
#define ALTQ_COMMA
#define IFQ_ENQUEUE(ifq, m, pattr, err) \
#define IFQ_ENQUEUE(ifq, m, err) \
do { \
IFQ_LOCK((ifq)); \
if (IF_QFULL((ifq))) { \
@ -871,7 +863,7 @@ do { \
#define IFQ_SET_READY(ifq) /* nothing */
#define IFQ_CLASSIFY(ifq, m, af, pattr) /* nothing */
#define IFQ_CLASSIFY(ifq, m, af) /* nothing */
#endif /* ALTQ */
@ -947,10 +939,8 @@ void p2p_rtrequest(int, struct rtentry *, const struct rt_addrinfo *);
void if_clone_attach(struct if_clone *);
void if_clone_detach(struct if_clone *);
int ifq_enqueue(struct ifnet *, struct mbuf * ALTQ_COMMA
ALTQ_DECL(struct altq_pktattr *));
int ifq_enqueue2(struct ifnet *, struct ifqueue *, struct mbuf * ALTQ_COMMA
ALTQ_DECL(struct altq_pktattr *));
int ifq_enqueue(struct ifnet *, struct mbuf *);
int ifq_enqueue2(struct ifnet *, struct ifqueue *, struct mbuf *);
int loioctl(struct ifnet *, u_long, void *);
void loopattach(int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_arcsubr.c,v 1.71 2016/04/07 03:22:15 christos Exp $ */
/* $NetBSD: if_arcsubr.c,v 1.72 2016/04/20 09:01:04 knakahara Exp $ */
/*
* Copyright (c) 1994, 1995 Ignatios Souvatzis
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_arcsubr.c,v 1.71 2016/04/07 03:22:15 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_arcsubr.c,v 1.72 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -122,7 +122,6 @@ arc_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
int error, newencoding;
uint8_t atype, adst, myself;
int tfrags, sflag, fsflag, rsflag;
ALTQ_DECL(struct altq_pktattr pktattr;)
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
return (ENETDOWN); /* m, m1 aren't initialized yet */
@ -138,7 +137,7 @@ arc_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
* 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);
switch (dst->sa_family) {
#ifdef INET
@ -274,8 +273,7 @@ arc_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
ah->arc_flag = rsflag;
ah->arc_seqid = ac->ac_seqid;
if ((error = ifq_enqueue(ifp, m ALTQ_COMMA
ALTQ_DECL(&pktattr))) != 0)
if ((error = ifq_enqueue(ifp, m)) != 0)
return (error);
m = m1;
@ -323,7 +321,7 @@ arc_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
ah->arc_shost = myself;
}
return ifq_enqueue(ifp, m ALTQ_COMMA ALTQ_DECL(&pktattr));
return ifq_enqueue(ifp, m);
bad:
if (m1)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_atmsubr.c,v 1.56 2016/02/09 08:32:12 ozaki-r Exp $ */
/* $NetBSD: if_atmsubr.c,v 1.57 2016/04/20 09:01:04 knakahara Exp $ */
/*
* Copyright (c) 1996 Charles D. Cranor and Washington University.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_atmsubr.c,v 1.56 2016/02/09 08:32:12 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_atmsubr.c,v 1.57 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -98,7 +98,6 @@ atm_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
struct mbuf *m = m0;
struct atmllc *atmllc;
uint32_t atm_flags;
ALTQ_DECL(struct altq_pktattr pktattr;)
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
senderr(ENETDOWN);
@ -108,7 +107,7 @@ atm_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
* do it before prepending link headers.
*/
IFQ_CLASSIFY(&ifp->if_snd, m,
(dst != NULL ? dst->sa_family : AF_UNSPEC), &pktattr);
(dst != NULL ? dst->sa_family : AF_UNSPEC));
/*
* check for non-native ATM traffic (dst != NULL)
@ -179,7 +178,7 @@ atm_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
}
}
return ifq_enqueue(ifp, m ALTQ_COMMA ALTQ_DECL(&pktattr));
return ifq_enqueue(ifp, m);
bad:
if (m)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_bridge.c,v 1.116 2016/04/20 08:58:48 knakahara Exp $ */
/* $NetBSD: if_bridge.c,v 1.117 2016/04/20 09:01:04 knakahara Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.116 2016/04/20 08:58:48 knakahara Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.117 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_bridge_ipf.h"
@ -1346,7 +1346,6 @@ void
bridge_enqueue(struct bridge_softc *sc, struct ifnet *dst_ifp, struct mbuf *m,
int runfilt)
{
ALTQ_DECL(struct altq_pktattr pktattr;)
int len, error;
short mflags;
@ -1382,7 +1381,7 @@ bridge_enqueue(struct bridge_softc *sc, struct ifnet *dst_ifp, struct mbuf *m,
len = m->m_pkthdr.len;
mflags = m->m_flags;
IFQ_ENQUEUE(&dst_ifp->if_snd, m, &pktattr, error);
IFQ_ENQUEUE(&dst_ifp->if_snd, m, error);
if (error) {
/* mbuf is already freed */

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ecosubr.c,v 1.45 2016/04/07 03:22:15 christos Exp $ */
/* $NetBSD: if_ecosubr.c,v 1.46 2016/04/20 09:01:04 knakahara Exp $ */
/*-
* Copyright (c) 2001 Ben Harris
@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ecosubr.c,v 1.45 2016/04/07 03:22:15 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ecosubr.c,v 1.46 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -178,7 +178,6 @@ eco_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
void *tha;
struct eco_arp *ecah;
#endif
ALTQ_DECL(struct altq_pktattr pktattr;)
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
senderr(ENETDOWN);
@ -186,7 +185,7 @@ eco_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
* 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);
hdrcmplt = 0;
retry_delay = hz / 16;
@ -294,7 +293,7 @@ eco_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
if (m == NULL)
return (0);
return ifq_enqueue(ifp, m ALTQ_COMMA ALTQ_DECL(&pktattr));
return ifq_enqueue(ifp, m);
bad:
if (m)
@ -849,6 +848,6 @@ eco_retry(void *arg)
ifp = er->er_ifp;
m = er->er_packet;
LIST_REMOVE(er, er_link);
(void)ifq_enqueue(ifp, m ALTQ_COMMA ALTQ_DECL(NULL));
(void)ifq_enqueue(ifp, m);
free(er, M_TEMP);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ethersubr.c,v 1.220 2016/04/20 08:58:48 knakahara Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.221 2016/04/20 09:01:04 knakahara Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.220 2016/04/20 08:58:48 knakahara Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.221 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -197,7 +197,6 @@ ether_output(struct ifnet * const ifp0, struct mbuf * const m0,
struct mbuf *mcopy = NULL;
struct ether_header *eh;
struct ifnet *ifp = ifp0;
ALTQ_DECL(struct altq_pktattr pktattr;)
#ifdef INET
struct arphdr *ah;
#endif /* INET */
@ -420,7 +419,7 @@ ether_output(struct ifnet * const ifp0, struct mbuf * const m0,
if (ALTQ_IS_ENABLED(&ifp->if_snd))
altq_etherclassify(&ifp->if_snd, m);
#endif
return ifq_enqueue(ifp, m ALTQ_COMMA ALTQ_DECL(&pktattr));
return ifq_enqueue(ifp, m);
bad:
if (m)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_fddisubr.c,v 1.97 2016/04/07 03:22:15 christos Exp $ */
/* $NetBSD: if_fddisubr.c,v 1.98 2016/04/20 09:01:04 knakahara Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_fddisubr.c,v 1.97 2016/04/07 03:22:15 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_fddisubr.c,v 1.98 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_gateway.h"
@ -195,7 +195,6 @@ fddi_output(struct ifnet *ifp0, struct mbuf *m0, const struct sockaddr *dst,
struct fddi_header *fh;
struct mbuf *mcopy = NULL;
struct ifnet *ifp = ifp0;
ALTQ_DECL(struct altq_pktattr pktattr;)
MCLAIM(m, ifp->if_mowner);
@ -224,7 +223,7 @@ fddi_output(struct ifnet *ifp0, struct mbuf *m0, const struct sockaddr *dst,
* 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);
switch (dst->sa_family) {
@ -400,7 +399,7 @@ fddi_output(struct ifnet *ifp0, struct mbuf *m0, const struct sockaddr *dst,
if (ifp != ifp0)
ifp0->if_obytes += m->m_pkthdr.len;
#endif /* NCARP > 0 */
return ifq_enqueue(ifp, m ALTQ_COMMA ALTQ_DECL(&pktattr));
return ifq_enqueue(ifp, m);
bad:
if (m)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_gif.c,v 1.106 2016/02/26 07:35:17 knakahara Exp $ */
/* $NetBSD: if_gif.c,v 1.107 2016/04/20 09:01:04 knakahara Exp $ */
/* $KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $ */
/*
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.106 2016/02/26 07:35:17 knakahara Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.107 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -310,10 +310,9 @@ gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
{
struct gif_softc *sc = ifp->if_softc;
int error = 0;
ALTQ_DECL(struct altq_pktattr pktattr;)
int s;
IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family, &pktattr);
IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family);
if ((error = gif_check_nesting(ifp, m)) != 0) {
m_free(m);
@ -344,7 +343,7 @@ gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
m->m_pkthdr.csum_data = 0;
s = splnet();
IFQ_ENQUEUE(&ifp->if_snd, m, &pktattr, error);
IFQ_ENQUEUE(&ifp->if_snd, m, error);
if (error) {
splx(s);
goto end;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_hippisubr.c,v 1.45 2016/02/09 08:32:12 ozaki-r Exp $ */
/* $NetBSD: if_hippisubr.c,v 1.46 2016/04/20 09:01:04 knakahara Exp $ */
/*
* Copyright (c) 1982, 1989, 1993
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_hippisubr.c,v 1.45 2016/02/09 08:32:12 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_hippisubr.c,v 1.46 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -94,7 +94,6 @@ hippi_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
struct hippi_header *hh;
uint32_t *cci;
uint32_t d2_len;
ALTQ_DECL(struct altq_pktattr pktattr;)
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
senderr(ENETDOWN);
@ -107,7 +106,7 @@ hippi_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
* 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);
switch (dst->sa_family) {
#ifdef INET
@ -185,7 +184,7 @@ hippi_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
m_copyback(m, m->m_pkthdr.len, 8 - d2_len % 8, (void *) buffer);
}
return ifq_enqueue(ifp, m ALTQ_COMMA ALTQ_DECL(&pktattr));
return ifq_enqueue(ifp, m);
bad:
if (m)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ieee1394subr.c,v 1.52 2016/04/07 03:22:15 christos Exp $ */
/* $NetBSD: if_ieee1394subr.c,v 1.53 2016/04/20 09:01:04 knakahara Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ieee1394subr.c,v 1.52 2016/04/07 03:22:15 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ieee1394subr.c,v 1.53 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -92,7 +92,6 @@ ieee1394_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
struct mbuf *mcopy = NULL;
struct ieee1394_hwaddr *hwdst, baddr;
const struct ieee1394_hwaddr *myaddr;
ALTQ_DECL(struct altq_pktattr pktattr;)
#ifdef INET
struct arphdr *ah;
#endif /* INET */
@ -106,7 +105,7 @@ ieee1394_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
* If the queueing discipline needs packet classification,
* do it before prepending link headers.
*/
IFQ_CLASSIFY(&ifp->if_snd, m0, dst->sa_family, &pktattr);
IFQ_CLASSIFY(&ifp->if_snd, m0, dst->sa_family);
/*
* For unicast, we make a tag to store the lladdr of the
@ -229,7 +228,7 @@ ieee1394_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
splx(s);
senderr(ENOBUFS);
}
IFQ_ENQUEUE(&ifp->if_snd, m, &pktattr, error);
IFQ_ENQUEUE(&ifp->if_snd, m, error);
if (error) {
/* mbuf is already freed */
splx(s);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_loop.c,v 1.83 2015/08/24 22:21:26 pooka Exp $ */
/* $NetBSD: if_loop.c,v 1.84 2016/04/20 09:01:04 knakahara Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.83 2015/08/24 22:21:26 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.84 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -241,14 +241,13 @@ looutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
*/
if ((ALTQ_IS_ENABLED(&ifp->if_snd) || TBR_IS_ENABLED(&ifp->if_snd)) &&
ifp->if_start == lostart) {
struct altq_pktattr pktattr;
int error;
/*
* If the queueing discipline needs packet classification,
* do it before prepending the link headers.
*/
IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family, &pktattr);
IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family);
M_PREPEND(m, sizeof(uint32_t), M_DONTWAIT);
if (m == NULL)
@ -256,7 +255,7 @@ looutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
*(mtod(m, uint32_t *)) = dst->sa_family;
s = splnet();
IFQ_ENQUEUE(&ifp->if_snd, m, &pktattr, error);
IFQ_ENQUEUE(&ifp->if_snd, m, error);
(*ifp->if_start)(ifp);
splx(s);
return (error);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ppp.c,v 1.149 2015/08/24 22:21:26 pooka Exp $ */
/* $NetBSD: if_ppp.c,v 1.150 2016/04/20 09:01:04 knakahara Exp $ */
/* Id: if_ppp.c,v 1.6 1997/03/04 03:33:00 paulus Exp */
/*
@ -102,7 +102,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.149 2015/08/24 22:21:26 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.150 2016/04/20 09:01:04 knakahara Exp $");
#include "ppp.h"
@ -851,7 +851,6 @@ pppoutput(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
struct ifqueue *ifq;
enum NPmode mode;
int len;
ALTQ_DECL(struct altq_pktattr pktattr;)
if (sc->sc_devp == NULL || (ifp->if_flags & IFF_RUNNING) == 0
|| ((ifp->if_flags & IFF_UP) == 0 && dst->sa_family != AF_UNSPEC)) {
@ -859,7 +858,7 @@ pppoutput(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
goto bad;
}
IFQ_CLASSIFY(&ifp->if_snd, m0, dst->sa_family, &pktattr);
IFQ_CLASSIFY(&ifp->if_snd, m0, dst->sa_family);
/*
* Compute PPP header.
@ -991,8 +990,7 @@ pppoutput(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
sc->sc_npqtail = &m0->m_nextpkt;
} else {
ifq = (m0->m_flags & M_HIGHPRI) ? &sc->sc_fastq : NULL;
if ((error = ifq_enqueue2(&sc->sc_if, ifq, m0
ALTQ_COMMA ALTQ_DECL(&pktattr))) != 0) {
if ((error = ifq_enqueue2(&sc->sc_if, ifq, m0)) != 0) {
splx(s);
sc->sc_if.if_oerrors++;
sc->sc_stats.ppp_oerrors++;
@ -1045,8 +1043,7 @@ ppp_requeue(struct ppp_softc *sc)
*mpp = m->m_nextpkt;
m->m_nextpkt = NULL;
ifq = (m->m_flags & M_HIGHPRI) ? &sc->sc_fastq : NULL;
if ((error = ifq_enqueue2(&sc->sc_if, ifq, m ALTQ_COMMA
ALTQ_DECL(NULL))) != 0) {
if ((error = ifq_enqueue2(&sc->sc_if, ifq, m)) != 0) {
sc->sc_if.if_oerrors++;
sc->sc_stats.ppp_oerrors++;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sl.c,v 1.121 2015/08/24 22:21:26 pooka Exp $ */
/* $NetBSD: if_sl.c,v 1.122 2016/04/20 09:01:04 knakahara Exp $ */
/*
* Copyright (c) 1987, 1989, 1992, 1993
@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_sl.c,v 1.121 2015/08/24 22:21:26 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_sl.c,v 1.122 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -439,9 +439,8 @@ sloutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
struct ip *ip;
struct ifqueue *ifq = NULL;
int s, error;
ALTQ_DECL(struct altq_pktattr pktattr;)
IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family, &pktattr);
IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family);
/*
* `Cannot happen' (see slioctl). Someday we will extend
@ -492,8 +491,7 @@ sloutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
if ((ip->ip_tos & IPTOS_LOWDELAY) != 0)
ifq = &sc->sc_fastq;
#endif
if ((error = ifq_enqueue2(ifp, ifq, m ALTQ_COMMA
ALTQ_DECL(&pktattr))) != 0) {
if ((error = ifq_enqueue2(ifp, ifq, m)) != 0) {
splx(s);
return error;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_spppsubr.c,v 1.135 2015/08/20 14:40:19 christos Exp $ */
/* $NetBSD: if_spppsubr.c,v 1.136 2016/04/20 09:01:04 knakahara Exp $ */
/*
* Synchronous PPP/Cisco link level subroutines.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.135 2015/08/20 14:40:19 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.136 2016/04/20 09:01:04 knakahara Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@ -647,7 +647,6 @@ sppp_output(struct ifnet *ifp, struct mbuf *m,
struct ifqueue *ifq = NULL; /* XXX */
int s, error = 0;
uint16_t protocol;
ALTQ_DECL(struct altq_pktattr pktattr;)
s = splnet();
@ -675,7 +674,7 @@ sppp_output(struct ifnet *ifp, struct mbuf *m,
* 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);
#ifdef INET
if (dst->sa_family == AF_INET) {
@ -824,7 +823,7 @@ sppp_output(struct ifnet *ifp, struct mbuf *m,
}
error = ifq_enqueue2(ifp, ifq, m ALTQ_COMMA ALTQ_DECL(&pktattr));
error = ifq_enqueue2(ifp, ifq, m);
if (error == 0) {
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_strip.c,v 1.101 2015/08/24 22:21:26 pooka Exp $ */
/* $NetBSD: if_strip.c,v 1.102 2016/04/20 09:01:04 knakahara Exp $ */
/* from: NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */
/*
@ -87,7 +87,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_strip.c,v 1.101 2015/08/24 22:21:26 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_strip.c,v 1.102 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -730,7 +730,6 @@ stripoutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
struct ifqueue *ifq;
int s, error;
u_char dl_addrbuf[STARMODE_ADDR_LEN+1];
ALTQ_DECL(struct altq_pktattr pktattr;)
/*
* Verify tty line is up and alive.
@ -854,8 +853,7 @@ stripoutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
splx(s);
s = splnet();
if ((error = ifq_enqueue2(ifp, ifq, m ALTQ_COMMA
ALTQ_DECL(&pktattr))) != 0) {
if ((error = ifq_enqueue2(ifp, ifq, m)) != 0) {
splx(s);
return error;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_tokensubr.c,v 1.74 2016/04/07 03:22:15 christos Exp $ */
/* $NetBSD: if_tokensubr.c,v 1.75 2016/04/20 09:01:04 knakahara Exp $ */
/*
* Copyright (c) 1982, 1989, 1993
@ -92,7 +92,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_tokensubr.c,v 1.74 2016/04/07 03:22:15 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_tokensubr.c,v 1.75 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -169,7 +169,6 @@ token_output(struct ifnet *ifp0, struct mbuf *m0, const struct sockaddr *dst,
struct token_rif bcastrif;
struct ifnet *ifp = ifp0;
size_t riflen = 0;
ALTQ_DECL(struct altq_pktattr pktattr;)
#if NCARP > 0
if (ifp->if_type == IFT_CARP) {
@ -197,7 +196,7 @@ token_output(struct ifnet *ifp0, struct mbuf *m0, const struct sockaddr *dst,
* 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);
switch (dst->sa_family) {
@ -370,7 +369,7 @@ send:
}
#endif /* NCARP > 0 */
return ifq_enqueue(ifp, m ALTQ_COMMA ALTQ_DECL(&pktattr));
return ifq_enqueue(ifp, m);
bad:
if (m)
m_freem(m);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_tun.c,v 1.123 2015/08/24 22:21:26 pooka Exp $ */
/* $NetBSD: if_tun.c,v 1.124 2016/04/20 09:01:04 knakahara Exp $ */
/*
* Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
@ -15,7 +15,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.123 2015/08/24 22:21:26 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.124 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -503,7 +503,6 @@ tun_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
int mlen;
uint32_t *af;
#endif
ALTQ_DECL(struct altq_pktattr pktattr;)
s = splnet();
mutex_enter(&tp->tun_lock);
@ -520,7 +519,7 @@ tun_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
* if the queueing discipline needs packet classification,
* do it before prepending link headers.
*/
IFQ_CLASSIFY(&ifp->if_snd, m0, dst->sa_family, &pktattr);
IFQ_CLASSIFY(&ifp->if_snd, m0, dst->sa_family);
bpf_mtap_af(ifp, dst->sa_family, m0);
@ -564,7 +563,7 @@ tun_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
}
/* FALLTHROUGH */
case AF_UNSPEC:
IFQ_ENQUEUE(&ifp->if_snd, m0, &pktattr, error);
IFQ_ENQUEUE(&ifp->if_snd, m0, error);
if (error) {
ifp->if_collisions++;
error = EAFNOSUPPORT;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_vlan.c,v 1.85 2016/04/20 08:58:48 knakahara Exp $ */
/* $NetBSD: if_vlan.c,v 1.86 2016/04/20 09:01:04 knakahara Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.85 2016/04/20 08:58:48 knakahara Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.86 2016/04/20 09:01:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -686,7 +686,6 @@ vlan_start(struct ifnet *ifp)
struct ethercom *ec = (void *) ifv->ifv_p;
struct mbuf *m;
int error;
ALTQ_DECL(struct altq_pktattr pktattr;)
#ifndef NET_MPSAFE
KASSERT(KERNEL_LOCKED_P());
@ -808,7 +807,7 @@ vlan_start(struct ifnet *ifp)
* Send it, precisely as the parent's output routine
* would have. We are already running at splnet.
*/
IFQ_ENQUEUE(&p->if_snd, m, &pktattr, error);
IFQ_ENQUEUE(&p->if_snd, m, error);
if (error) {
/* mbuf is already freed */
ifp->if_oerrors++;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee80211_input.c,v 1.81 2016/04/20 08:58:48 knakahara Exp $ */
/* $NetBSD: ieee80211_input.c,v 1.82 2016/04/20 09:01:04 knakahara Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@ -36,7 +36,7 @@
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.81 2005/08/10 16:22:29 sam Exp $");
#endif
#ifdef __NetBSD__
__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.81 2016/04/20 08:58:48 knakahara Exp $");
__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.82 2016/04/20 09:01:04 knakahara Exp $");
#endif
#ifdef _KERNEL_OPT
@ -698,7 +698,6 @@ ieee80211_deliver_data(struct ieee80211com *ic,
{
struct ether_header *eh = mtod(m, struct ether_header *);
struct ifnet *ifp = ic->ic_ifp;
ALTQ_DECL(struct altq_pktattr pktattr;)
int error;
/* perform as a bridge within the AP */
@ -745,7 +744,7 @@ ieee80211_deliver_data(struct ieee80211com *ic,
}
#endif
len = m1->m_pkthdr.len;
IFQ_ENQUEUE(&ifp->if_snd, m1, &pktattr, error);
IFQ_ENQUEUE(&ifp->if_snd, m1, error);
if (error) {
ifp->if_omcasts++;
m = NULL;

View File

@ -27,7 +27,7 @@
* i4b_ipr.c - isdn4bsd IP over raw HDLC ISDN network driver
* ---------------------------------------------------------
*
* $Id: i4b_ipr.c,v 1.36 2014/06/05 23:48:17 rmind Exp $
* $Id: i4b_ipr.c,v 1.37 2016/04/20 09:01:04 knakahara Exp $
*
* $FreeBSD$
*
@ -59,7 +59,7 @@
*---------------------------------------------------------------------------*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i4b_ipr.c,v 1.36 2014/06/05 23:48:17 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: i4b_ipr.c,v 1.37 2016/04/20 09:01:04 knakahara Exp $");
#include "irip.h"
#include "opt_irip.h"
@ -421,7 +421,6 @@ iripoutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
int s, rv;
struct ifqueue *ifq = NULL;
struct ip *ip;
ALTQ_DECL(struct altq_pktattr pktattr;)
s = splnet();
@ -515,7 +514,7 @@ iripoutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
* else (i.e. ftp traffic) put it into the "normal" queue
*/
IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family, &pktattr);
IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family);
ip = mtod(m, struct ip *); /* get ptr to ip header */
@ -540,7 +539,7 @@ iripoutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
}
IF_ENQUEUE(ifq, m);
} else {
IFQ_ENQUEUE(&sc->sc_if.if_snd, m, &pktattr, rv);
IFQ_ENQUEUE(&sc->sc_if.if_snd, m, rv);
if (rv != 0) {
sc->sc_if.if_oerrors++;
splx(s);