Source-Changes-HG archive

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

[src/trunk]: src/sys/net Revert part of "Switch the address list of intefaces...



details:   https://anonhg.NetBSD.org/src/rev/ba3aabd9288f
branches:  trunk
changeset: 816508:ba3aabd9288f
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Mon Jul 11 02:14:27 2016 +0000

description:
Revert part of "Switch the address list of intefaces to pslist(9)" (r1.220)

Reverting the whole change set just messes up many files uselessly
because changes to them (except for if.h) are proper.

- Remove ifa_pslist_entry that breaks kvm(3) users (e.g., netstat -ia)
- Change IFADDR_{READER,WRITER}_* macros to use old IFADDR_* (or just NOP)
  for now

Fix PR kern/51325

diffstat:

 sys/net/if.h |  35 +++++++++++++++++++++++++++++++----
 1 files changed, 31 insertions(+), 4 deletions(-)

diffs (63 lines):

diff -r d60a9bb6c9e2 -r ba3aabd9288f sys/net/if.h
--- a/sys/net/if.h      Mon Jul 11 01:50:17 2016 +0000
+++ b/sys/net/if.h      Mon Jul 11 02:14:27 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.h,v 1.220 2016/07/07 09:32:02 ozaki-r Exp $ */
+/*     $NetBSD: if.h,v 1.221 2016/07/11 02:14:27 ozaki-r Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -599,9 +599,7 @@
                                       const struct sockaddr *);
        uint32_t        *ifa_seqno;
        int16_t ifa_preference; /* preference level for this address */
-#ifdef _KERNEL
-       struct pslist_entry     ifa_pslist_entry;
-#endif
+       /* XXX adding variables here breaks kvm(3) users of struct *_ifaddr */
 };
 #define        IFA_ROUTE       RTF_UP  /* (0x01) route installed */
 
@@ -1056,6 +1054,7 @@
                                            &(__ifp)->if_addrlist, ifa_list, __nifa)
 #define        IFADDR_EMPTY(__ifp)             TAILQ_EMPTY(&(__ifp)->if_addrlist)
 
+#ifdef notyet
 #define IFADDR_ENTRY_INIT(__ifa)                                       \
        PSLIST_ENTRY_INIT((__ifa), ifa_pslist_entry)
 #define IFADDR_ENTRY_DESTROY(__ifa)                                    \
@@ -1101,6 +1100,34 @@
                        }                                               \
                }                                                       \
        } while (0)
+#else
+#define IFADDR_ENTRY_INIT(__ifa)                                       \
+       do {} while (0)
+#define IFADDR_ENTRY_DESTROY(__ifa)                                    \
+       do {} while (0)
+#define IFADDR_READER_EMPTY(__ifp)                                     \
+       IFADDR_EMPTY(__ifp)
+#define IFADDR_READER_FIRST(__ifp)                                     \
+       IFADDR_FIRST(__ifp)
+#define IFADDR_READER_NEXT(__ifa)                                      \
+       IFADDR_NEXT(__ifa)
+#define IFADDR_READER_FOREACH(__ifa, __ifp)                            \
+       IFADDR_FOREACH(__ifa, __ifp)
+#define IFADDR_WRITER_INSERT_HEAD(__ifp, __ifa)                                \
+       do {} while (0)
+#define IFADDR_WRITER_REMOVE(__ifa)                                    \
+       do {} while (0)
+#define IFADDR_WRITER_FOREACH(__ifa, __ifp)                            \
+       IFADDR_FOREACH(__ifa, __ifp)
+#define IFADDR_WRITER_NEXT(__ifp)                                      \
+       IFADDR_NEXT(__ifa)
+#define IFADDR_WRITER_INSERT_AFTER(__ifp, __new)                       \
+       do {} while (0)
+#define IFADDR_WRITER_EMPTY(__ifp)                                     \
+       IFADDR_EMPTY(__ifp)
+#define IFADDR_WRITER_INSERT_TAIL(__ifp, __new)                                \
+       do {} while (0)
+#endif /* notyet */
 
 #define        IFNET_LOCK()                    mutex_enter(&ifnet_mtx)
 #define        IFNET_UNLOCK()                  mutex_exit(&ifnet_mtx)



Home | Main Index | Thread Index | Old Index