Source-Changes-HG archive

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

[src/trunk]: src/sys/net introduce if_extflags (was if__pad1)



details:   https://anonhg.NetBSD.org/src/rev/193e603abcd2
branches:  trunk
changeset: 346028:193e603abcd2
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Mon Jun 20 06:35:05 2016 +0000

description:
introduce if_extflags (was if__pad1)

diffstat:

 sys/net/if.h |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r fb0eecea2574 -r 193e603abcd2 sys/net/if.h
--- a/sys/net/if.h      Mon Jun 20 04:18:12 2016 +0000
+++ b/sys/net/if.h      Mon Jun 20 06:35:05 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.h,v 1.207 2016/06/10 13:31:44 ozaki-r Exp $ */
+/*     $NetBSD: if.h,v 1.208 2016/06/20 06:35:05 knakahara Exp $       */
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -242,7 +242,7 @@
        u_short if_index;               /* numeric abbreviation for this if */
        short   if_timer;               /* time 'til if_slowtimo called */
        short   if_flags;               /* up/down, broadcast, etc. */
-       short   if__pad1;               /* be nice to m68k ports */
+       short   if_extflags;            /* if_output MP-safe, etc. */
        struct  if_data if_data;        /* statistics and other data about if */
        /*
         * Procedure handles.  If you add more of these, don't forget the
@@ -255,7 +255,7 @@
                    (struct ifnet *, struct mbuf *);
        void    (*if_start)             /* initiate output routine */
                    (struct ifnet *);
-       int     (*if_transmit)          /* output routine (direct) */
+       int     (*if_transmit)          /* output routine, must be MP-safe */
                    (struct ifnet *, struct mbuf *);
        int     (*if_ioctl)             /* ioctl routine */
                    (struct ifnet *, u_long, void *);
@@ -379,6 +379,9 @@
 #define        IFF_LINK2       0x4000          /* per link layer defined bit */
 #define        IFF_MULTICAST   0x8000          /* supports multicast */
 
+#define        IFEF_OUTPUT_MPSAFE      0x0001  /* if_output() can run parallel */
+#define        IFEF_START_MPSAFE       0x0002  /* if_start() can run parallel */
+
 #define        IFFBITS \
     "\020\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5POINTOPOINT\6NOTRAILERS" \
     "\7RUNNING\10NOARP\11PROMISC\12ALLMULTI\13OACTIVE\14SIMPLEX" \



Home | Main Index | Thread Index | Old Index