Source-Changes-HG archive

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

[src/trunk]: src/sys/net Commit to the ALTQ glue.



details:   https://anonhg.NetBSD.org/src/rev/58088b6addee
branches:  trunk
changeset: 500782:58088b6addee
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Dec 18 18:54:47 2000 +0000

description:
Commit to the ALTQ glue.

diffstat:

 sys/net/if.c |  13 +------------
 sys/net/if.h |  17 +++++++++--------
 2 files changed, 10 insertions(+), 20 deletions(-)

diffs (77 lines):

diff -r d2f8b846db80 -r 58088b6addee sys/net/if.c
--- a/sys/net/if.c      Mon Dec 18 18:00:23 2000 +0000
+++ b/sys/net/if.c      Mon Dec 18 18:54:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.c,v 1.78 2000/12/14 17:47:26 thorpej Exp $  */
+/*     $NetBSD: if.c,v 1.79 2000/12/18 18:54:47 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -938,17 +938,6 @@
 }
 
 /*
- * Flush an interface queue.
- */
-void
-if_qflush(ifq)
-       struct ifqueue *ifq;
-{
-
-       IFQ_PURGE(ifq);
-}
-
-/*
  * Handle interface watchdog timer routines.  Called
  * from softclock, we decrement timers (if set) and
  * call the appropriate interface routine on expiration.
diff -r d2f8b846db80 -r 58088b6addee sys/net/if.h
--- a/sys/net/if.h      Mon Dec 18 18:00:23 2000 +0000
+++ b/sys/net/if.h      Mon Dec 18 18:54:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.h,v 1.57 2000/12/14 00:19:42 thorpej Exp $  */
+/*     $NetBSD: if.h,v 1.58 2000/12/18 18:54:47 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -79,6 +79,14 @@
 #include <sys/queue.h>
 
 /*
+ * Always include ALTQ glue here -- we use the ALTQ interface queue
+ * structure even when ALTQ is not configured into the kernel so that
+ * the size of struct ifnet does not changed based on the option.  The
+ * ALTQ queue structure is API-compatible with the legacy ifqueue.
+ */
+#include <altq/if_altq.h>
+
+/*
  * Structures defining a network interface, providing a packet
  * transport mechanism (ala level 0 of the PUP protocols).
  *
@@ -259,17 +267,11 @@
                __P((struct ifnet *));
        void    (*if_drain)             /* routine to release resources */
                __P((struct ifnet *));
-#if 0 /* ALTQ */
        struct ifaltq if_snd;           /* output queue (includes altq) */
-#else
-       struct ifqueue if_snd;          /* output queue */
-#endif
        struct  sockaddr_dl *if_sadl;   /* pointer to our sockaddr_dl */
        u_int8_t *if_broadcastaddr;     /* linklevel broadcast bytestring */
        struct ifprefix *if_prefixlist; /* linked list of prefixes per if */
-#if 1
        void    *if_bridge;             /* bridge glue */
-#endif
 };
 #define        if_mtu          if_data.ifi_mtu
 #define        if_type         if_data.ifi_type
@@ -712,7 +714,6 @@
 void   if_deactivate __P((struct ifnet *));
 void   if_detach __P((struct ifnet *));
 void   if_down __P((struct ifnet *));
-void   if_qflush __P((struct ifqueue *));
 void   if_slowtimo __P((void *));
 void   if_up __P((struct ifnet *));
 int    ifconf __P((u_long, caddr_t));



Home | Main Index | Thread Index | Old Index