Date: Thu, 11 Jun 2015 02:41:45 GMT From: btw@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r286935 - soc2015/btw/head/sys/net Message-ID: <201506110241.t5B2fjEB002900@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506110241.t5B2fjEB002900>