From owner-svn-src-all@FreeBSD.ORG Mon Oct 13 09:05:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69AC598F; Mon, 13 Oct 2014 09:05:12 +0000 (UTC) Received: from mail-yk0-x22e.google.com (mail-yk0-x22e.google.com [IPv6:2607:f8b0:4002:c07::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 02ECD755; Mon, 13 Oct 2014 09:05:11 +0000 (UTC) Received: by mail-yk0-f174.google.com with SMTP id 142so3263828ykq.19 for ; Mon, 13 Oct 2014 02:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=JxI4oTt+qli8oHE+QfE2O/TOdxrCA4uAQNkfg/mhoRk=; b=JzC5GrbLdNAeBr7o0fZLxr/cNDAxsbz+Ji+vCkYwxh1T0/RyRj8WapBAA2TtlVVLuN nBX2vdFdl2XY2SWDYfMpuEK//ftgPA7z03jbs1PDLFqabMVa2Lx6iqTP5K7XGrcG/xtz nTl8eY0fHsyvBv8gaAZD/ziSk/a6cqD8EyG+gWOynRzJWzFLwyeSX1HZICufIaEIxC+N OPbTb0qk2apGQLqONBbhTtqM9h6jtVX+PQzXbvrbgTbmpn0n2JAx0hOAb6I1zzmpCCuM S1C3LM2pqbIKSlHFuN63Ci+T5AIUnIrm8/qpgQEgzsX+beuNaO02/XJ3/GOn1zTOLSAU D3lw== MIME-Version: 1.0 X-Received: by 10.236.62.198 with SMTP id y46mr36358825yhc.108.1413191110898; Mon, 13 Oct 2014 02:05:10 -0700 (PDT) Received: by 10.170.59.65 with HTTP; Mon, 13 Oct 2014 02:05:10 -0700 (PDT) In-Reply-To: <20140928091625.GU884@FreeBSD.org> References: <201409280857.s8S8v8cG011117@svn.freebsd.org> <20140928091625.GU884@FreeBSD.org> Date: Mon, 13 Oct 2014 12:05:10 +0300 Message-ID: Subject: Re: svn commit: r272244 - head/sys/net From: Markiyan Kushnir To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Oct 2014 09:05:12 -0000 Gleb, looks like there is something to do for userland apps to let them replace their old counter code. An example would be devel/libgtop that is failing to build now (I'm on r273006 of base/head and r370733 on ports/head): /bin/sh ../../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/freebsd -I../../include -I/usr/local/include/glib-2.0 -I/usr/local/include -I/usr/local/include -I/usr/local/include -DHAVE_NET_IF_VAR_H -D_WANT_IFADDR -Winline -Wall -std=gnu89 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -O2 -pipe -fno-strict-aliasing -MT netload.lo -MD -MP -MF .deps/netload.Tpo -c -o netload.lo netload.c libtool: compile: cc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/freebsd -I../../include -I/usr/local/include/glib-2.0 -I/usr/local/include -I/usr/local/include -I/usr/local/include -DHAVE_NET_IF_VAR_H -D_WANT_IFADDR -Winline -Wall -std=gnu89 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -O2 -pipe -fno-strict-aliasing -MT netload.lo -MD -MP -MF .deps/netload.Tpo -c netload.c -fPIC -DPIC -o .libs/netload.o netload.c:182:41: error: no member named 'if_ipackets' in 'struct ifnet' buf->packets_in = ifnet.if_ipackets; ~~~~~ ^ netload.c:183:42: error: no member named 'if_opackets' in 'struct ifnet' buf->packets_out = ifnet.if_opackets; ~~~~~ ^ netload.c:186:39: error: no member named 'if_ibytes' in 'struct ifnet' buf->bytes_in = ifnet.if_ibytes; ~~~~~ ^ netload.c:187:40: error: no member named 'if_obytes' in 'struct ifnet' buf->bytes_out = ifnet.if_obytes; ~~~~~ ^ netload.c:190:40: error: no member named 'if_ierrors' in 'struct ifnet' buf->errors_in = ifnet.if_ierrors; ~~~~~ ^ netload.c:191:41: error: no member named 'if_oerrors' in 'struct ifnet' buf->errors_out = ifnet.if_oerrors; ~~~~~ ^ netload.c:194:41: error: no member named 'if_collisions' in 'struct ifnet' buf->collisions = ifnet.if_collisions; ~~~~~ ^ netload.c:211:58: warning: cast from 'struct sockaddr *' to 'struct sockaddr_dl *' increases required alignment from 1 to 2 [-Wcast-align] struct sockaddr_dl *dl = (struct sockaddr_dl *) sa; ^~~~~~~~~~~~~~~~~~~~~~~~~ netload.c:217:39: warning: cast from 'struct sockaddr *' to 'struct sockaddr_in *' increases required alignment from 1 to 4 [-Wcast-align] sin = (struct sockaddr_in *)sa; ^~~~~~~~~~~~~~~~~~~~~~~~ netload.c:225:61: warning: cast from 'struct sockaddr *' to 'struct sockaddr_in6 *' increases required alignment from 1 to 4 [-Wcast-align] struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa; ^~~~~~~~~~~~~~~~~~~~~~~~~~ 3 warnings and 7 errors generated. Makefile:435: recipe for target 'netload.lo' failed gmake[4]: *** [netload.lo] Error 1 gmake[4]: Leaving directory '/work/ports.svn/devel/libgtop/work/libgtop-2.28.4/sysdeps/freebsd' Makefile:336: recipe for target 'all-recursive' failed gmake[3]: *** [all-recursive] Error 1 gmake[3]: Leaving directory '/work/ports.svn/devel/libgtop/work/libgtop-2.28.4/sysdeps' Makefile:471: recipe for target 'all-recursive' failed gmake[2]: *** [all-recursive] Error 1 gmake[2]: Leaving directory '/work/ports.svn/devel/libgtop/work/libgtop-2.28.4' Makefile:354: recipe for target 'all' failed gmake[1]: *** [all] Error 2 gmake[1]: Leaving directory '/work/ports.svn/devel/libgtop/work/libgtop-2.28.4' *** Error code 1 Stop. make: stopped in /work/ports.svn/devel/libgtop Or, any hints on getting it fixed? -- Markiyan. 2014-09-28 12:16 GMT+03:00 Gleb Smirnoff : > On Sun, Sep 28, 2014 at 08:57:08AM +0000, Gleb Smirnoff wrote: > T> Author: glebius > T> Date: Sun Sep 28 08:57:07 2014 > T> New Revision: 272244 > T> URL: http://svnweb.freebsd.org/changeset/base/272244 > T> > T> Log: > T> Finally, convert counters in struct ifnet to counter(9). > T> > T> Sponsored by: Netflix > T> Sponsored by: Nginx, Inc. > > Now the network stack is 99% free of old style ++ on a global > variable, that trashes cache line and is racy. > > The last remnant is queue drop counter in buf_ring(9), which > would be probably addressed when interface queuing is generalized. > > -- > Totus tuus, Glebius. > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"