Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Consistently use IFQ_SET_MAXLEN(), rather than open-...



details:   https://anonhg.NetBSD.org/src/rev/486557e71920
branches:  trunk
changeset: 369668:486557e71920
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Aug 27 19:04:43 2022 +0000

description:
Consistently use IFQ_SET_MAXLEN(), rather than open-coding it.  NFC.

diffstat:

 sys/net/if_ppp.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r 830aa9723227 -r 486557e71920 sys/net/if_ppp.c
--- a/sys/net/if_ppp.c  Sat Aug 27 17:15:52 2022 +0000
+++ b/sys/net/if_ppp.c  Sat Aug 27 19:04:43 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ppp.c,v 1.169 2022/07/06 08:07:23 riastradh Exp $   */
+/*     $NetBSD: if_ppp.c,v 1.170 2022/08/27 19:04:43 thorpej 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.169 2022/07/06 08:07:23 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.170 2022/08/27 19:04:43 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "ppp.h"
@@ -319,9 +319,10 @@
        sc->sc_if.if_start = ppp_ifstart;
 #endif
        IFQ_SET_MAXLEN(&sc->sc_if.if_snd, IFQ_MAXLEN);
-       sc->sc_inq.ifq_maxlen = IFQ_MAXLEN;
-       sc->sc_fastq.ifq_maxlen = IFQ_MAXLEN;
-       sc->sc_rawq.ifq_maxlen = IFQ_MAXLEN;
+       IFQ_SET_MAXLEN(&sc->sc_inq, IFQ_MAXLEN);
+       IFQ_SET_MAXLEN(&sc->sc_fastq, IFQ_MAXLEN);
+       IFQ_SET_MAXLEN(&sc->sc_rawq, IFQ_MAXLEN);
+
        /* Ratio of 1:2 packets between the regular and the fast queue */
        sc->sc_maxfastq = 2;
        IFQ_SET_READY(&sc->sc_if.if_snd);



Home | Main Index | Thread Index | Old Index