svn commit: r184398 - user/kmacy/HEAD_fast_xmit/sys/net

Kip Macy kmacy at FreeBSD.org
Tue Oct 28 08:21:42 UTC 2008


Author: kmacy
Date: Tue Oct 28 08:21:41 2008
New Revision: 184398
URL: http://svn.freebsd.org/changeset/base/184398

Log:
  - fix index generation from hash
  - set ro.ro_rt before passing ro to route_to_rtentry_info

Modified:
  user/kmacy/HEAD_fast_xmit/sys/net/flowtable.c

Modified: user/kmacy/HEAD_fast_xmit/sys/net/flowtable.c
==============================================================================
--- user/kmacy/HEAD_fast_xmit/sys/net/flowtable.c	Tue Oct 28 07:37:02 2008	(r184397)
+++ user/kmacy/HEAD_fast_xmit/sys/net/flowtable.c	Tue Oct 28 08:21:41 2008	(r184398)
@@ -403,7 +403,7 @@ static struct flentry *
 flowtable_entry(struct flowtable *ft, uint32_t hash)
 {
 	struct flentry *fle;
-	int index = (ft->ft_size % hash);
+	int index = (hash % ft->ft_size);
  
 	if ((ft->ft_flags & FL_IPV6) == 0) {
 		if (ft->ft_flags & FL_PCPU)
@@ -603,6 +603,7 @@ flowtable_lookup(struct flowtable *ft, s
 		fle->f_uptime = time_uptime;
 		fle->f_flags |= flags;
 		fle->f_rt->rt_rmx.rmx_pksent++;
+		ro.ro_rt = fle->f_rt;
 		route_to_rtentry_info(&ro, fle->f_desten, ri);
 		FL_ENTRY_UNLOCK(ft, hash);
 		return (0);


More information about the svn-src-user mailing list