Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Oct 2013 03:03:45 GMT
From:      Sven-Thorsten Dietrich <thebigcorporation@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/183462: IPv6 Multicast Lookup Accounting Fix
Message-ID:  <201310300303.r9U33jYs013507@oldred.freebsd.org>
Resent-Message-ID: <201310300310.r9U3A0Dr053900@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         183462
>Category:       kern
>Synopsis:       IPv6 Multicast Lookup Accounting Fix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 30 03:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Sven-Thorsten Dietrich
>Release:        HEAD / 9.1.0
>Organization:
Vyatta
>Environment:
>Description:
Implementation should only count table lookups when processing packets.
internal table accesses should not be counted in the stats.
>How-To-Repeat:
See patch
>Fix:


Patch attached with submission follows:

Subject: Don't count table lookups from add_mfc.
Signed-off-by: Sven-Thorsten Dietrich <thebigcorporation@gmail.com>

Index: sys/netinet6/ip6_mroute.c
===================================================================
--- sys/netinet6/ip6_mroute.c	(revision 256126)
+++ sys/netinet6/ip6_mroute.c	(working copy)
@@ -275,7 +275,6 @@
 #define MF6CFIND(o, g, rt) do { \
 	struct mf6c *_rt = mf6ctable[MF6CHASH(o,g)]; \
 	rt = NULL; \
-	MRT6STAT_INC(mrt6s_mfc_lookups); \
 	while (_rt) { \
 		if (IN6_ARE_ADDR_EQUAL(&_rt->mf6c_origin.sin6_addr, &(o)) && \
 		    IN6_ARE_ADDR_EQUAL(&_rt->mf6c_mcastgrp.sin6_addr, &(g)) && \
@@ -1124,6 +1123,7 @@
 	/*
 	 * Determine forwarding mifs from the forwarding cache table
 	 */
+	MRT6STAT_INC(mrt6s_mfc_lookups);
 	MF6CFIND(ip6->ip6_src, ip6->ip6_dst, rt);
 
 	/* Entry exists, so forward if necessary */


>Release-Note:
>Audit-Trail:
>Unformatted:



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