From owner-svn-soc-all@FreeBSD.ORG Thu Jun 11 02:41:46 2015 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 478E2196 for ; Thu, 11 Jun 2015 02:41:46 +0000 (UTC) (envelope-from btw@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3610915DE for ; Thu, 11 Jun 2015 02:41:46 +0000 (UTC) (envelope-from btw@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5B2fkBa002906 for ; Thu, 11 Jun 2015 02:41:46 GMT (envelope-from btw@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5B2fjEB002900 for svn-soc-all@FreeBSD.org; Thu, 11 Jun 2015 02:41:45 GMT (envelope-from btw@FreeBSD.org) Date: Thu, 11 Jun 2015 02:41:45 GMT Message-Id: <201506110241.t5B2fjEB002900@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to btw@FreeBSD.org using -f From: btw@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r286935 - soc2015/btw/head/sys/net MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 02:41:46 -0000 Author: btw Date: Thu Jun 11 02:41:45 2015 New Revision: 286935 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=286935 Log: Convert lo(4) to use the per-ring counters. Modified: soc2015/btw/head/sys/net/if_loop.c Modified: soc2015/btw/head/sys/net/if_loop.c ============================================================================== --- soc2015/btw/head/sys/net/if_loop.c Thu Jun 11 01:22:27 2015 (r286934) +++ soc2015/btw/head/sys/net/if_loop.c Thu Jun 11 02:41:45 2015 (r286935) @@ -132,6 +132,7 @@ .ifat_drv = &lo_ifdrv, .ifat_dunit = unit, .ifat_mtu = LOMTU, + .ifat_nrings = 1, .ifat_flags = IFF_LOOPBACK | IFF_MULTICAST, .ifat_capabilities = IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6, .ifat_capenable = IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6, @@ -206,12 +207,16 @@ { u_int32_t af; struct rtentry *rt = NULL; + ifring_t *ifrs; #ifdef MAC int error; #endif M_ASSERTPKTHDR(m); /* check if we have the packet header */ + ifrs = if_getsoftc(ifp, IF_RING); + m->m_pkthdr.ifring = ifrs[0]; + if (ro != NULL) rt = ro->ro_rt; #ifdef MAC