Parallel routing code patch #1 (preliminary)

YONETANI Tomokazu qhwt+dfly at les.ath.cx
Tue Jan 17 19:25:59 PST 2006


On Tue, Jan 17, 2006 at 11:22:50AM -0800, Matthew Dillon wrote:
>     Here is the first iteration of the parallel route table code.  This
>     code was developed by Jeffrey Hsu and then further work was done on
>     it by me:
> 
> 	http://apollo.backplane.com/DFlyMisc/routing01.patch

. .. and here's a diff against routing01.patch to make UP kernel compile
too(haven't tried yet):

--- routing01.patch.orig	2006-01-18 04:21:17.000000000 +0900
+++ routing01.patch	2006-01-18 12:04:13.000000000 +0900
@@ -235,12 +235,12 @@
 -static void	rtable_init (void **);
 +static void rtable_init(void);
 +static void rtable_service_loop(void *dummy);
++static void rtinit_rtrequest_callback(int, int, struct rt_addrinfo *,
++				      struct rtentry *, void *);
 +
 +#ifdef SMP
 +static int rtredirect_msghandler(struct lwkt_msg *lmsg);
 +static int rtrequest1_msghandler(struct lwkt_msg *lmsg);
-+static void rtinit_rtrequest_callback(int, int, struct rt_addrinfo *,
-+				      struct rtentry *, void *);
 +#endif
  
  SYSCTL_NODE(_net, OID_AUTO, route, CTLFLAG_RW, 0, "Routing");
@@ -1201,7 +1201,7 @@
  static void
  in_arpinput(struct mbuf *m)
  {
-@@ -607,15 +757,13 @@
+@@ -607,15 +757,15 @@
  	struct ether_header *eh;
  	struct arc_header *arh;
  	struct iso88025_header *th = (struct iso88025_header *)NULL;
@@ -1214,7 +1214,9 @@
  	struct sockaddr sa;
  	struct in_addr isaddr, itaddr, myaddr;
 -	int op, rif_len;
++#ifdef SMP
 +	struct netmsg_arp_update msg;
++#endif
 +	int op;
  	int req_len;
  
@@ -1605,7 +1607,7 @@
  
  			if (sp == NULL)
 -				destmtu = ipforward_rt.ro_rt->rt_ifp->if_mtu;
-+				destmtu = cache_rt->rt_ifp->if_mtu;
++				destmtu = cache_rt->ro_rt->rt_ifp->if_mtu;
  			else {
  				/* count IPsec header size */
  				ipsechdr = ipsec4_hdrsiz(mcopy,





More information about the Kernel mailing list