svn commit: r185022 - user/kmacy/HEAD_fast_multi_xmit/sys/netinet

Kip Macy kmacy at FreeBSD.org
Sun Nov 16 23:39:42 PST 2008


Author: kmacy
Date: Mon Nov 17 07:39:39 2008
New Revision: 185022
URL: http://svn.freebsd.org/changeset/base/185022

Log:
  If ip_output_fast is being called from ip_output and there is no cached ARP,
  fall back to ip_output_legacy

Modified:
  user/kmacy/HEAD_fast_multi_xmit/sys/netinet/ip_output.c

Modified: user/kmacy/HEAD_fast_multi_xmit/sys/netinet/ip_output.c
==============================================================================
--- user/kmacy/HEAD_fast_multi_xmit/sys/netinet/ip_output.c	Mon Nov 17 07:09:40 2008	(r185021)
+++ user/kmacy/HEAD_fast_multi_xmit/sys/netinet/ip_output.c	Mon Nov 17 07:39:39 2008	(r185022)
@@ -663,6 +663,13 @@ ip_output_fast(struct mbuf *m, struct mb
 			route_to_rtentry_info(ro, NULL, ri);
 		else if (flowtable_lookup(ipv4_ft, m, ri))
 			return (ENETUNREACH);
+
+		/*
+		 * Rather than reverting to non-standard ARP 
+		 * lookup semantics simply fallback to ip_output_legacy
+		 */
+		if ((ri->ri_flags & RTF_DESTEN_VALID) == 0)
+			return (EINVAL);
 	}
 
 	if (opt) {
@@ -1151,10 +1158,15 @@ int
 ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags,
     struct ip_moptions *imo, struct inpcb *inp)
 {
+	int error;
+
 	if (flowtable_enable)
-		return (ip_output_fast(m, opt, ro, flags, imo, inp));
-	else
-		return (ip_output_legacy(m, opt, ro, flags, imo, inp));
+		error = ip_output_fast(m, opt, ro, flags, imo, inp);
+	
+	if ((flowtable_enable == 0) || (error == EINVAL)) 
+		error = ip_output_legacy(m, opt, ro, flags, imo, inp);
+
+	return (error);
 }
 
 /*


More information about the svn-src-user mailing list