Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Nov 2014 14:39:04 +0000 (UTC)
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r274177 - in head: share/man/man9 sys/net sys/netinet sys/netinet6 sys/sys
Message-ID:  <201411061439.sA6Ed4f4086315@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: melifaro
Date: Thu Nov  6 14:39:04 2014
New Revision: 274177
URL: https://svnweb.freebsd.org/changeset/base/274177

Log:
  Finish r274118: remove useless fields from struct domain.
  
  Sponsored by:	Yandex LLC

Modified:
  head/share/man/man9/domain.9
  head/sys/net/route.c
  head/sys/netinet/in_proto.c
  head/sys/netinet6/in6_proto.c
  head/sys/sys/domain.h

Modified: head/share/man/man9/domain.9
==============================================================================
--- head/share/man/man9/domain.9	Thu Nov  6 13:13:47 2014	(r274176)
+++ head/share/man/man9/domain.9	Thu Nov  6 14:39:04 2014	(r274177)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 7, 2012
+.Dd November 6, 2014
 .Dt DOMAIN 9
 .Os
 .Sh NAME
@@ -82,10 +82,9 @@ struct domain {
 		(void **, int);
 	int	(*dom_rtdetach)		/* clean up routing table */
 		(void **, int);
-	int	dom_rtoffset;		/* an arg to rtattach, in bits */
-	int	dom_maxrtkey;		/* for routing layer */
 	void	*(*dom_ifattach)(struct ifnet *);
 	void	(*dom_ifdetach)(struct ifnet *, void *);
+	int	(*dom_ifmtu)(struct ifnet *);
 					/* af-dependent data on ifnet */
 };
 .Ed

Modified: head/sys/net/route.c
==============================================================================
--- head/sys/net/route.c	Thu Nov  6 13:13:47 2014	(r274176)
+++ head/sys/net/route.c	Thu Nov  6 14:39:04 2014	(r274177)
@@ -264,15 +264,10 @@ vnet_route_init(const void *unused __unu
 			if (table != 0 && fam != AF_INET6 && fam != AF_INET)
 				break;
 
-			/*
-			 * XXX MRT rtattach will be also called from
-			 * vfs_export.c but the offset will be 0 (only for
-			 * AF_INET and AF_INET6 which don't need it anyhow).
-			 */
 			rnh = rt_tables_get_rnh_ptr(table, fam);
 			if (rnh == NULL)
 				panic("%s: rnh NULL", __func__);
-			dom->dom_rtattach((void **)rnh, dom->dom_rtoffset);
+			dom->dom_rtattach((void **)rnh, 0);
 		}
 	}
 }

Modified: head/sys/netinet/in_proto.c
==============================================================================
--- head/sys/netinet/in_proto.c	Thu Nov  6 13:13:47 2014	(r274176)
+++ head/sys/netinet/in_proto.c	Thu Nov  6 14:39:04 2014	(r274177)
@@ -365,8 +365,6 @@ struct domain inetdomain = {
 #ifdef VIMAGE
 	.dom_rtdetach =		in_detachhead,
 #endif
-	.dom_rtoffset =		32,
-	.dom_maxrtkey =		sizeof(struct sockaddr_in),
 	.dom_ifattach =		in_domifattach,
 	.dom_ifdetach =		in_domifdetach
 };

Modified: head/sys/netinet6/in6_proto.c
==============================================================================
--- head/sys/netinet6/in6_proto.c	Thu Nov  6 13:13:47 2014	(r274176)
+++ head/sys/netinet6/in6_proto.c	Thu Nov  6 14:39:04 2014	(r274177)
@@ -379,8 +379,6 @@ struct domain inet6domain = {
 #ifdef VIMAGE
 	.dom_rtdetach =		in6_detachhead,
 #endif
-	.dom_rtoffset =		offsetof(struct sockaddr_in6, sin6_addr) << 3,
-	.dom_maxrtkey =		sizeof(struct sockaddr_in6),
 	.dom_ifattach =		in6_domifattach,
 	.dom_ifdetach =		in6_domifdetach,
 	.dom_ifmtu    =		in6_domifmtu

Modified: head/sys/sys/domain.h
==============================================================================
--- head/sys/sys/domain.h	Thu Nov  6 13:13:47 2014	(r274176)
+++ head/sys/sys/domain.h	Thu Nov  6 14:39:04 2014	(r274177)
@@ -60,8 +60,6 @@ struct domain {
 		(void **, int);
 	int	(*dom_rtdetach)		/* clean up routing table */
 		(void **, int);
-	int	dom_rtoffset;		/* an arg to rtattach, in bits */
-	int	dom_maxrtkey;		/* for routing layer */
 	void	*(*dom_ifattach)(struct ifnet *);
 	void	(*dom_ifdetach)(struct ifnet *, void *);
 	int	(*dom_ifmtu)(struct ifnet *);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411061439.sA6Ed4f4086315>