From owner-svn-src-user@FreeBSD.ORG Sun Feb 7 01:54:14 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 992B3106566B; Sun, 7 Feb 2010 01:54:14 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 707588FC14; Sun, 7 Feb 2010 01:54:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o171sEFX003220; Sun, 7 Feb 2010 01:54:14 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o171sEHb003218; Sun, 7 Feb 2010 01:54:14 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201002070154.o171sEHb003218@svn.freebsd.org> From: Kip Macy Date: Sun, 7 Feb 2010 01:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203592 - user/kmacy/head_flowtable_v6/sys/net X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Feb 2010 01:54:14 -0000 Author: kmacy Date: Sun Feb 7 01:54:14 2010 New Revision: 203592 URL: http://svn.freebsd.org/changeset/base/203592 Log: print key value Modified: user/kmacy/head_flowtable_v6/sys/net/flowtable.c Modified: user/kmacy/head_flowtable_v6/sys/net/flowtable.c ============================================================================== --- user/kmacy/head_flowtable_v6/sys/net/flowtable.c Sun Feb 7 01:39:42 2010 (r203591) +++ user/kmacy/head_flowtable_v6/sys/net/flowtable.c Sun Feb 7 01:54:14 2010 (r203592) @@ -186,7 +186,7 @@ static struct cv flowclean_cv; static struct mtx flowclean_lock; static uint32_t flowclean_cycles; - +#define FLOWTABLE_DEBUG #ifdef FLOWTABLE_DEBUG #define FLDPRINTF(ft, flags, fmt, ...) \ do { \ @@ -965,8 +965,8 @@ kern_flowtable_insert(struct flowtable * return (EINVAL); FLDPRINTF(ft, FL_DEBUG, - "kern_flowtable_insert: hash=0x%x fibnum=%d flags=0x%x\n", - hash, fibnum, flags); + "kern_flowtable_insert: key=%x:%x:%x hash=%x fibnum=%d flags=%x\n", + key[0], key[1], key[2], hash, fibnum, flags); #ifdef FLOWTABLE_DEBUG if (flags & FL_DEBUG) ipv4_flow_print_tuple(flags, flags_to_proto(flags), @@ -1045,7 +1045,8 @@ flowtable_lookup(struct flowtable *ft, s hash = ipv4_flow_lookup_hash_internal(ssin, dsin, key, flags); #ifdef FLOWTABLE_DEBUG if (flags & FL_DEBUG_ALL){ - printf("lookup: hash=0x%x ", hash); + printf("lookup: key=%x:%x:%x hash=%x ", + key[0], key[1], key[2], hash); ipv4_flow_print_tuple(flags, proto, ssin, dsin); } #endif @@ -1077,7 +1078,7 @@ flowtable_lookup(struct flowtable *ft, s goto uncached; } keycheck: - FLDPRINTF(ft, FL_DEBUG, "doing keycheck on fle=%p hash=0x%x\n", + FLDPRINTF(ft, FL_DEBUG, "doing keycheck on fle=%p hash=%x\n", fle, fle->f_fhash); rt = __DEVOLATILE(struct rtentry *, fle->f_rt); lle = __DEVOLATILE(struct llentry *, fle->f_lle); @@ -1547,10 +1548,10 @@ flow_show(struct flowtable *ft, struct f idle_time = (int)(time_uptime - fle->f_uptime); rt_valid = fle->f_rt != NULL; + hashkey = flowtable_get_hashkey(fle); if (fle->f_flags & FL_IPV6) goto skipaddr; - hashkey = flowtable_get_hashkey(fle); inet_ntoa_r(*(struct in_addr *) &hashkey[2], daddr); if (ft->ft_flags & FL_HASH_ALL) { inet_ntoa_r(*(struct in_addr *) &hashkey[1], saddr); @@ -1562,8 +1563,8 @@ flow_show(struct flowtable *ft, struct f db_printf("%s:\n", daddr); skipaddr: - db_printf("\thash=0x%08x idle_time=%03d rt=%p ifp=%p", - fle->f_fhash, idle_time, + db_printf("\tkey=%x:%x:%x hash=%08x idle_time=%03d rt=%p ifp=%p", + hashkey[0], hashkey[1], hashkey[2], fle->f_fhash, idle_time, fle->f_rt, rt_valid ? fle->f_rt->rt_ifp : NULL); if (rt_valid && (fle->f_rt->rt_flags & RTF_UP)) db_printf(" RTF_UP ");