Date: Mon, 13 Oct 2014 12:05:10 +0300 From: Markiyan Kushnir <markiyan.kushnir@gmail.com> To: Gleb Smirnoff <glebius@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r272244 - head/sys/net Message-ID: <CACvtUJeUP3kO3mtHS66XbL9Q2bYkn00HEmxH1y4Roh7R03JF4w@mail.gmail.com> In-Reply-To: <20140928091625.GU884@FreeBSD.org> References: <201409280857.s8S8v8cG011117@svn.freebsd.org> <20140928091625.GU884@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <glebius@freebsd.org>: > 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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACvtUJeUP3kO3mtHS66XbL9Q2bYkn00HEmxH1y4Roh7R03JF4w>