From owner-svn-src-stable-8@FreeBSD.ORG Thu Jun 9 05:23:29 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DA3B106564A; Thu, 9 Jun 2011 05:23:29 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D3FB8FC17; Thu, 9 Jun 2011 05:23:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p595NTCl062997; Thu, 9 Jun 2011 05:23:29 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p595NSH4062995; Thu, 9 Jun 2011 05:23:28 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201106090523.p595NSH4062995@svn.freebsd.org> From: Dmitry Chagin Date: Thu, 9 Jun 2011 05:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222888 - stable/8/sys/net X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2011 05:23:29 -0000 Author: dchagin Date: Thu Jun 9 05:23:28 2011 New Revision: 222888 URL: http://svn.freebsd.org/changeset/base/222888 Log: MFC r219783, r219786: A bit rearranged rtalloc1_fib() code. To avoid code duplication move the miss label to line up and jump on it. Modified: stable/8/sys/net/route.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/net/route.c ============================================================================== --- stable/8/sys/net/route.c Thu Jun 9 05:21:08 2011 (r222887) +++ stable/8/sys/net/route.c Thu Jun 9 05:23:28 2011 (r222888) @@ -349,13 +349,12 @@ rtalloc1_fib(struct sockaddr *dst, int r fibnum = 0; rnh = rt_tables_get_rnh(fibnum, dst->sa_family); newrt = NULL; + if (rnh == NULL) + goto miss; + /* * Look up the address in the table for that Address Family */ - if (rnh == NULL) { - V_rtstat.rts_unreach++; - goto miss; - } needlock = !(ignflags & RTF_RNH_LOCKED); if (needlock) RADIX_NODE_HEAD_RLOCK(rnh); @@ -380,8 +379,9 @@ rtalloc1_fib(struct sockaddr *dst, int r * Which basically means * "caint get there frm here" */ - V_rtstat.rts_unreach++; miss: + V_rtstat.rts_unreach++; + if (report) { /* * If required, report the failure to the supervising