Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net No functional change:
details: https://anonhg.NetBSD.org/src/rev/b81f8085c676
branches: trunk
changeset: 357701:b81f8085c676
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Nov 22 03:45:15 2017 +0000
description:
No functional change:
- u_int16_t -> uint16_t
- u_short -> uint16_t
- tag_hash_func -> vlan_tag_hash
- 0 -> NULL because vlr_parent is a pointer.
diffstat:
sys/net/if_ether.h | 4 ++--
sys/net/if_vlan.c | 14 +++++++-------
sys/net/if_vlanvar.h | 6 +++---
3 files changed, 12 insertions(+), 12 deletions(-)
diffs (108 lines):
diff -r 55bc28a2bcec -r b81f8085c676 sys/net/if_ether.h
--- a/sys/net/if_ether.h Wed Nov 22 03:03:18 2017 +0000
+++ b/sys/net/if_ether.h Wed Nov 22 03:45:15 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ether.h,v 1.69 2017/11/22 02:35:24 msaitoh Exp $ */
+/* $NetBSD: if_ether.h,v 1.70 2017/11/22 03:45:15 msaitoh Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@@ -299,7 +299,7 @@
/* add VLAN tag to input/received packet */
static inline void
-vlan_set_tag(struct mbuf *m, u_int16_t vlantag)
+vlan_set_tag(struct mbuf *m, uint16_t vlantag)
{
/* VLAN tag contains priority, CFI and VLAN ID */
diff -r 55bc28a2bcec -r b81f8085c676 sys/net/if_vlan.c
--- a/sys/net/if_vlan.c Wed Nov 22 03:03:18 2017 +0000
+++ b/sys/net/if_vlan.c Wed Nov 22 03:45:15 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vlan.c,v 1.109 2017/11/22 03:03:18 ozaki-r Exp $ */
+/* $NetBSD: if_vlan.c,v 1.110 2017/11/22 03:45:15 msaitoh 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.109 2017/11/22 03:03:18 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.110 2017/11/22 03:45:15 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -207,6 +207,7 @@
struct ifvlan_linkmib *);
static void vlan_hash_init(void);
static int vlan_hash_fini(void);
+static int vlan_tag_hash(uint16_t, u_long);
static struct ifvlan_linkmib* vlan_getref_linkmib(struct ifvlan *,
struct psref *);
static void vlan_putref_linkmib(struct ifvlan_linkmib *,
@@ -215,7 +216,6 @@
struct ifvlan_linkmib *);
static struct ifvlan_linkmib* vlan_lookup_tag_psref(struct ifnet *,
uint16_t, struct psref *);
-static int tag_hash_func(uint16_t, u_long);
LIST_HEAD(vlan_ifvlist, ifvlan);
static struct {
@@ -508,7 +508,7 @@
ifv->ifv_if.if_type = p->if_type;
PSLIST_ENTRY_INIT(ifv, ifv_hash);
- idx = tag_hash_func(vid, ifv_hash.mask);
+ idx = vlan_tag_hash(vid, ifv_hash.mask);
mutex_enter(&ifv_hash.lock);
PSLIST_WRITER_INSERT_HEAD(&ifv_hash.lists[idx], ifv, ifv_hash);
@@ -680,7 +680,7 @@
}
static int
-tag_hash_func(uint16_t tag, u_long mask)
+vlan_tag_hash(uint16_t tag, u_long mask)
{
uint32_t hash;
@@ -724,7 +724,7 @@
int s;
struct ifvlan *sc;
- idx = tag_hash_func(tag, ifv_hash.mask);
+ idx = vlan_tag_hash(tag, ifv_hash.mask);
s = pserialize_read_enter();
PSLIST_READER_FOREACH(sc, &ifv_hash.lists[idx], struct ifvlan,
@@ -941,7 +941,7 @@
error = EINVAL; /* check for valid tag */
break;
}
- if ((pr = ifunit(vlr.vlr_parent)) == 0) {
+ if ((pr = ifunit(vlr.vlr_parent)) == NULL) {
error = ENOENT;
break;
}
diff -r 55bc28a2bcec -r b81f8085c676 sys/net/if_vlanvar.h
--- a/sys/net/if_vlanvar.h Wed Nov 22 03:03:18 2017 +0000
+++ b/sys/net/if_vlanvar.h Wed Nov 22 03:45:15 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vlanvar.h,v 1.11 2017/11/22 02:35:24 msaitoh Exp $ */
+/* $NetBSD: if_vlanvar.h,v 1.12 2017/11/22 03:45:15 msaitoh Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -73,8 +73,8 @@
/* Configuration structure for SIOCSETVLAN and SIOCGETVLAN ioctls. */
struct vlanreq {
- char vlr_parent[IFNAMSIZ];
- u_short vlr_tag;
+ char vlr_parent[IFNAMSIZ];
+ uint16_t vlr_tag;
};
#define SIOCSETVLAN SIOCSIFGENERIC
Home |
Main Index |
Thread Index |
Old Index