Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Constify rtentry of if_output
details: https://anonhg.NetBSD.org/src/rev/60fcd57f5d34
branches: trunk
changeset: 344925:60fcd57f5d34
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Thu Apr 28 00:16:56 2016 +0000
description:
Constify rtentry of if_output
We no longer need to change rtentry below if_output.
The change makes it clear where rtentries are changed (or not)
and helps forthcoming locking (os psrefing) rtentries.
diffstat:
sys/dev/ic/hd64570.c | 8 ++++----
sys/dev/pci/if_lmc.c | 6 +++---
sys/dev/pci/if_lmc.h | 4 ++--
sys/dev/usb/if_upl.c | 8 ++++----
sys/dev/usb/uhso.c | 9 +++++----
sys/dist/pf/net/if_pflog.c | 8 ++++----
sys/dist/pf/net/if_pfsync.c | 8 ++++----
sys/net/if.c | 6 +++---
sys/net/if.h | 8 ++++----
sys/net/if_atm.h | 4 ++--
sys/net/if_atmsubr.c | 6 +++---
sys/net/if_bridge.c | 6 +++---
sys/net/if_bridgevar.h | 4 ++--
sys/net/if_ethersubr.c | 8 ++++----
sys/net/if_faith.c | 8 ++++----
sys/net/if_fddisubr.c | 8 ++++----
sys/net/if_gif.c | 6 +++---
sys/net/if_gif.h | 4 ++--
sys/net/if_gre.c | 8 ++++----
sys/net/if_hippisubr.c | 8 ++++----
sys/net/if_ieee1394subr.c | 8 ++++----
sys/net/if_loop.c | 6 +++---
sys/net/if_mpls.c | 25 ++++++++++++++-----------
sys/net/if_ppp.c | 6 +++---
sys/net/if_pppvar.h | 4 ++--
sys/net/if_sl.c | 8 ++++----
sys/net/if_spppsubr.c | 8 ++++----
sys/net/if_srt.c | 6 +++---
sys/net/if_stf.c | 8 ++++----
sys/net/if_strip.c | 9 +++++----
sys/net/if_tokensubr.c | 8 ++++----
sys/net/if_tun.c | 8 ++++----
sys/net/route.c | 8 ++++----
sys/net/route.h | 6 +++---
sys/netinet/if_atm.c | 16 ++++++++--------
sys/netinet/if_atm.h | 4 ++--
sys/netinet/ip_carp.c | 6 +++---
sys/netinet/ip_carp.h | 4 ++--
sys/netinet/ip_output.c | 9 +++++----
sys/netinet/ip_var.h | 4 ++--
sys/netisdn/i4b_ipr.c | 9 +++++----
41 files changed, 156 insertions(+), 149 deletions(-)
diffs (truncated from 1298 to 300 lines):
diff -r fcf67e9fa89e -r 60fcd57f5d34 sys/dev/ic/hd64570.c
--- a/sys/dev/ic/hd64570.c Thu Apr 28 00:02:40 2016 +0000
+++ b/sys/dev/ic/hd64570.c Thu Apr 28 00:16:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hd64570.c,v 1.48 2016/04/20 09:01:03 knakahara Exp $ */
+/* $NetBSD: hd64570.c,v 1.49 2016/04/28 00:16:56 ozaki-r Exp $ */
/*
* Copyright (c) 1999 Christian E. Hopps
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hd64570.c,v 1.48 2016/04/20 09:01:03 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hd64570.c,v 1.49 2016/04/28 00:16:56 ozaki-r Exp $");
#include "opt_inet.h"
@@ -160,7 +160,7 @@
static void sca_port_down(sca_port_t *);
static int sca_output(struct ifnet *, struct mbuf *, const struct sockaddr *,
- struct rtentry *);
+ const struct rtentry *);
static int sca_ioctl(struct ifnet *, u_long, void *);
static void sca_start(struct ifnet *);
static void sca_watchdog(struct ifnet *);
@@ -792,7 +792,7 @@
struct ifnet *ifp,
struct mbuf *m,
const struct sockaddr *dst,
- struct rtentry *rt0)
+ const struct rtentry *rt0)
{
struct hdlc_header *hdlc;
struct ifqueue *ifq = NULL;
diff -r fcf67e9fa89e -r 60fcd57f5d34 sys/dev/pci/if_lmc.c
--- a/sys/dev/pci/if_lmc.c Thu Apr 28 00:02:40 2016 +0000
+++ b/sys/dev/pci/if_lmc.c Thu Apr 28 00:16:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_lmc.c,v 1.58 2016/04/20 09:01:03 knakahara Exp $ */
+/* $NetBSD: if_lmc.c,v 1.59 2016/04/28 00:16:56 ozaki-r Exp $ */
/*-
* Copyright (c) 2002-2006 David Boggs. <boggs%boggs.palo-alto.ca.us@localhost>
@@ -74,7 +74,7 @@
*/
# include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_lmc.c,v 1.58 2016/04/20 09:01:03 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_lmc.c,v 1.59 2016/04/28 00:16:56 ozaki-r Exp $");
# include <sys/param.h> /* OS version */
# include "opt_inet.h" /* INET6, INET */
# include "opt_altq_enabled.h" /* ALTQ */
@@ -3355,7 +3355,7 @@
*/
static int /* context: process */
ifnet_output(struct ifnet *ifp, struct mbuf *m,
- const struct sockaddr *dst, struct rtentry *rt)
+ const struct sockaddr *dst, const struct rtentry *rt)
{
softc_t *sc = IFP2SC(ifp);
int error = 0;
diff -r fcf67e9fa89e -r 60fcd57f5d34 sys/dev/pci/if_lmc.h
--- a/sys/dev/pci/if_lmc.h Thu Apr 28 00:02:40 2016 +0000
+++ b/sys/dev/pci/if_lmc.h Thu Apr 28 00:16:56 2016 +0000
@@ -1,5 +1,5 @@
/*-
- * $NetBSD: if_lmc.h,v 1.22 2015/09/06 06:01:00 dholland Exp $
+ * $NetBSD: if_lmc.h,v 1.23 2016/04/28 00:16:56 ozaki-r Exp $
*
* Copyright (c) 2002-2006 David Boggs. (boggs%boggs.palo-alto.ca.us@localhost)
* All rights reserved.
@@ -1311,7 +1311,7 @@
#if IFNET
static void ifnet_input(struct ifnet *, struct mbuf *);
static int ifnet_output(struct ifnet *, struct mbuf *,
- const struct sockaddr *, struct rtentry *);
+ const struct sockaddr *, const struct rtentry *);
static int ifnet_ioctl(struct ifnet *, u_long, void *);
static void ifnet_start(struct ifnet *);
static void ifnet_watchdog(struct ifnet *);
diff -r fcf67e9fa89e -r 60fcd57f5d34 sys/dev/usb/if_upl.c
--- a/sys/dev/usb/if_upl.c Thu Apr 28 00:02:40 2016 +0000
+++ b/sys/dev/usb/if_upl.c Thu Apr 28 00:16:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_upl.c,v 1.51 2016/04/23 10:15:31 skrll Exp $ */
+/* $NetBSD: if_upl.c,v 1.52 2016/04/28 00:16:56 ozaki-r Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.51 2016/04/23 10:15:31 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.52 2016/04/28 00:16:56 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -193,7 +193,7 @@
Static void upl_watchdog(struct ifnet *);
Static int upl_output(struct ifnet *, struct mbuf *, const struct sockaddr *,
- struct rtentry *);
+ const struct rtentry *);
Static void upl_input(struct ifnet *, struct mbuf *);
/*
@@ -985,7 +985,7 @@
Static int
upl_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct rtentry *rt0)
+ const struct rtentry *rt0)
{
int s, len, error;
diff -r fcf67e9fa89e -r 60fcd57f5d34 sys/dev/usb/uhso.c
--- a/sys/dev/usb/uhso.c Thu Apr 28 00:02:40 2016 +0000
+++ b/sys/dev/usb/uhso.c Thu Apr 28 00:16:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uhso.c,v 1.19 2016/04/23 10:15:32 skrll Exp $ */
+/* $NetBSD: uhso.c,v 1.20 2016/04/28 00:16:56 ozaki-r Exp $ */
/*-
* Copyright (c) 2009 Iain Hibbert
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.19 2016/04/23 10:15:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.20 2016/04/28 00:16:56 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -421,7 +421,8 @@
Static int uhso_ifnet_init(struct uhso_port *);
Static void uhso_ifnet_clean(struct uhso_port *);
Static void uhso_ifnet_start(struct ifnet *);
-Static int uhso_ifnet_output(struct ifnet *, struct mbuf *, const struct sockaddr *, struct rtentry *);
+Static int uhso_ifnet_output(struct ifnet *, struct mbuf *,
+ const struct sockaddr *, const struct rtentry *);
/*******************************************************************************
@@ -2339,7 +2340,7 @@
Static int
uhso_ifnet_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct rtentry *rt0)
+ const struct rtentry *rt0)
{
int error;
diff -r fcf67e9fa89e -r 60fcd57f5d34 sys/dist/pf/net/if_pflog.c
--- a/sys/dist/pf/net/if_pflog.c Thu Apr 28 00:02:40 2016 +0000
+++ b/sys/dist/pf/net/if_pflog.c Thu Apr 28 00:16:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_pflog.c,v 1.19 2015/08/20 14:40:18 christos Exp $ */
+/* $NetBSD: if_pflog.c,v 1.20 2016/04/28 00:16:56 ozaki-r Exp $ */
/* $OpenBSD: if_pflog.c,v 1.24 2007/05/26 17:13:30 jason Exp $ */
/*
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_pflog.c,v 1.19 2015/08/20 14:40:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pflog.c,v 1.20 2016/04/28 00:16:56 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -87,7 +87,7 @@
void pflogdetach(void);
#endif /* _MODULE */
int pflogoutput(struct ifnet *, struct mbuf *, const struct sockaddr *,
- struct rtentry *);
+ const struct rtentry *);
int pflogioctl(struct ifnet *, u_long, void *);
void pflogstart(struct ifnet *);
int pflog_clone_create(struct if_clone *, int);
@@ -208,7 +208,7 @@
int
pflogoutput(struct ifnet *ifp, struct mbuf *m,
- const struct sockaddr *dst, struct rtentry *rt)
+ const struct sockaddr *dst, const struct rtentry *rt)
{
m_freem(m);
return (0);
diff -r fcf67e9fa89e -r 60fcd57f5d34 sys/dist/pf/net/if_pfsync.c
--- a/sys/dist/pf/net/if_pfsync.c Thu Apr 28 00:02:40 2016 +0000
+++ b/sys/dist/pf/net/if_pfsync.c Thu Apr 28 00:16:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_pfsync.c,v 1.11 2015/08/20 14:40:18 christos Exp $ */
+/* $NetBSD: if_pfsync.c,v 1.12 2016/04/28 00:16:56 ozaki-r Exp $ */
/* $OpenBSD: if_pfsync.c,v 1.83 2007/06/26 14:44:12 mcbride Exp $ */
/*
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_pfsync.c,v 1.11 2015/08/20 14:40:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pfsync.c,v 1.12 2016/04/28 00:16:56 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -116,7 +116,7 @@
int pfsync_insert_net_state(struct pfsync_state *, u_int8_t);
void pfsync_update_net_tdb(struct pfsync_tdb *);
int pfsyncoutput(struct ifnet *, struct mbuf *, const struct sockaddr *,
- struct rtentry *);
+ const struct rtentry *);
int pfsyncioctl(struct ifnet *, u_long, void*);
void pfsyncstart(struct ifnet *);
@@ -856,7 +856,7 @@
int
pfsyncoutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
- struct rtentry *rt)
+ const struct rtentry *rt)
{
m_freem(m);
return (0);
diff -r fcf67e9fa89e -r 60fcd57f5d34 sys/net/if.c
--- a/sys/net/if.c Thu Apr 28 00:02:40 2016 +0000
+++ b/sys/net/if.c Thu Apr 28 00:16:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.330 2016/04/20 09:01:04 knakahara Exp $ */
+/* $NetBSD: if.c,v 1.331 2016/04/28 00:16:56 ozaki-r Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.330 2016/04/20 09:01:04 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.331 2016/04/28 00:16:56 ozaki-r Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -308,7 +308,7 @@
int
if_nulloutput(struct ifnet *ifp, struct mbuf *m,
- const struct sockaddr *so, struct rtentry *rt)
+ const struct sockaddr *so, const struct rtentry *rt)
{
return ENXIO;
diff -r fcf67e9fa89e -r 60fcd57f5d34 sys/net/if.h
--- a/sys/net/if.h Thu Apr 28 00:02:40 2016 +0000
+++ b/sys/net/if.h Thu Apr 28 00:16:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.h,v 1.201 2016/04/20 09:01:04 knakahara Exp $ */
+/* $NetBSD: if.h,v 1.202 2016/04/28 00:16:56 ozaki-r Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -267,7 +267,7 @@
*/
int (*if_output) /* output routine (enqueue) */
(struct ifnet *, struct mbuf *, const struct sockaddr *,
- struct rtentry *);
+ const struct rtentry *);
void (*_if_input) /* input routine (from h/w driver) */
(struct ifnet *, struct mbuf *);
void (*if_start) /* initiate output routine */
@@ -945,7 +945,7 @@
int loioctl(struct ifnet *, u_long, void *);
void loopattach(int);
int looutput(struct ifnet *,
- struct mbuf *, const struct sockaddr *, struct rtentry *);
+ struct mbuf *, const struct sockaddr *, const struct rtentry *);
void lortrequest(int, struct rtentry *, const struct rt_addrinfo *);
/*
@@ -953,7 +953,7 @@
* an interface is going away without having to burn a flag.
*/
int if_nulloutput(struct ifnet *, struct mbuf *,
- const struct sockaddr *, struct rtentry *);
+ const struct sockaddr *, const struct rtentry *);
void if_nullinput(struct ifnet *, struct mbuf *);
void if_nullstart(struct ifnet *);
int if_nullioctl(struct ifnet *, u_long, void *);
diff -r fcf67e9fa89e -r 60fcd57f5d34 sys/net/if_atm.h
--- a/sys/net/if_atm.h Thu Apr 28 00:02:40 2016 +0000
+++ b/sys/net/if_atm.h Thu Apr 28 00:16:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_atm.h,v 1.20 2015/09/06 06:01:01 dholland Exp $ */
+/* $NetBSD: if_atm.h,v 1.21 2016/04/28 00:16:56 ozaki-r Exp $ */
/*
* Copyright (c) 1996 Charles D. Cranor and Washington University.
@@ -136,7 +136,7 @@
Home |
Main Index |
Thread Index |
Old Index