The End of a Job as We Know It
http://www.forbes.com/sites/joshbersin/2012/01/31/the-end-of-a-job-as-we-know-it/
Re: carp backup becomes no carrier
Hello Johan and thanks for your great report! On 27/04/15(Mon) 11:54, Johan Huldtgren wrote: > >If you try 1.250 and 1.253 and tell me if you can reproduce the problem > >that would be really helpful. In case you see something weird, Could > >you include the routing table "netstat -rnf inet" in your report? If > >you can also play with tcpdump on the various pseudo-interfaces and see > >if something is wrong that would be great. > > i'm not sure what is going on, it seems likely that the problem lies > in my setup or something I've done, I'll explain the behavior I'm > seeing and hopefully you can use it to rule out that the error lies > in ip_carp.c at least. I doubt the problem lies in your setup, I found the master->active problem, diff below should correct that, can you tell me if it helps? Index: netinet/ip_carp.c === RCS file: /cvs/src/sys/netinet/ip_carp.c,v retrieving revision 1.253 diff -u -p -r1.253 ip_carp.c --- netinet/ip_carp.c 22 Apr 2015 06:44:17 - 1.253 +++ netinet/ip_carp.c 28 Apr 2015 09:31:07 - @@ -750,6 +750,7 @@ carp_clone_create(ifc, unit) if_attach(ifp); ether_ifattach(ifp); ifp->if_type = IFT_CARP; + ifp->if_sadl->sdl_type = IFT_CARP; ifp->if_output = carp_output; /* Hook carp_addr_updated to cope with address and route changes. */
Re: carp backup becomes no carrier
On 2015 Apr 28 (Tue) at 11:36:00 +0200 (+0200), Martin Pieuchot wrote: :Hello Johan and thanks for your great report! : :On 27/04/15(Mon) 11:54, Johan Huldtgren wrote: :> >If you try 1.250 and 1.253 and tell me if you can reproduce the problem :> >that would be really helpful. In case you see something weird, Could :> >you include the routing table "netstat -rnf inet" in your report? If :> >you can also play with tcpdump on the various pseudo-interfaces and see :> >if something is wrong that would be great. :> :> i'm not sure what is going on, it seems likely that the problem lies :> in my setup or something I've done, I'll explain the behavior I'm :> seeing and hopefully you can use it to rule out that the error lies :> in ip_carp.c at least. : :I doubt the problem lies in your setup, I found the master->active :problem, diff below should correct that, can you tell me if it helps? : :Index: netinet/ip_carp.c :=== :RCS file: /cvs/src/sys/netinet/ip_carp.c,v :retrieving revision 1.253 :diff -u -p -r1.253 ip_carp.c :--- netinet/ip_carp.c 22 Apr 2015 06:44:17 - 1.253 :+++ netinet/ip_carp.c 28 Apr 2015 09:31:07 - :@@ -750,6 +750,7 @@ carp_clone_create(ifc, unit) : if_attach(ifp); : ether_ifattach(ifp); : ifp->if_type = IFT_CARP; :+ ifp->if_sadl->sdl_type = IFT_CARP; : ifp->if_output = carp_output; : : /* Hook carp_addr_updated to cope with address and route changes. */ : Untested, but that is certainly a problem OK -- A billion here, a couple of billion there -- first thing you know it adds up to be real money. -- Senator Everett McKinley Dirksen
Re: carp backup becomes no carrier
hello, I doubt the problem lies in your setup, I found the master->active problem, diff below should correct that, can you tell me if it helps? Index: netinet/ip_carp.c === RCS file: /cvs/src/sys/netinet/ip_carp.c,v retrieving revision 1.253 diff -u -p -r1.253 ip_carp.c --- netinet/ip_carp.c 22 Apr 2015 06:44:17 - 1.253 +++ netinet/ip_carp.c 28 Apr 2015 09:31:07 - @@ -750,6 +750,7 @@ carp_clone_create(ifc, unit) if_attach(ifp); ether_ifattach(ifp); ifp->if_type = IFT_CARP; + ifp->if_sadl->sdl_type = IFT_CARP; ifp->if_output = carp_output; /* Hook carp_addr_updated to cope with address and route changes. */ ok, with this patch status is once again "master" and "backup", overall behavior also seems better, I'm not seeing periods when I can't reach the carp interfaces after a failover. I believe this fixes my issues, I've been testing all morning with both reboot failovers and increasing the demote counters, all seems well now. thanks, .jh
Re: Do not talk about prelinking in ldconfig.8
On Mon, Apr 20, 2015 at 07:44:09PM +0100, Jason McIntyre wrote: > On Sun, Apr 19, 2015 at 03:38:57PM +0300, Vadim Zhukov wrote: > > This paragraph should talk about prebinding instead of prelinking, > > shouldn't it? > > > > Also, it seems "prebind data" sounds more correct than "prebinding > > data", but I could easily get wrong here. > > > > -- > > WBR, > > Vadim Zhukov > > > > ah, can of worms... > > the options talk about "prebind information", while the prebinding > section talks about "prebinding information". it seems logical to stick > to one. > > anyone? > no feedback on this, so i fixed as best i could. jmc
Re: bridge(4) and ether_input_mbuf()
On 21/04/15(Tue) 12:35, Martin Pieuchot wrote: > This diff adds the necessary glue to bridge(4) to be able to convert > other pseudo-drivers to if_input(). This will also help bridge(4)'s > own conversion. > > Since bridge_input() already returns a mbuf, I believe this change is > less error prone than the carp(4) one. But I appreciate reviews, > tests and oks. Anybody? > > Index: net/bridgestp.c > === > RCS file: /cvs/src/sys/net/bridgestp.c,v > retrieving revision 1.52 > diff -u -p -r1.52 bridgestp.c > --- net/bridgestp.c 14 Mar 2015 03:38:51 - 1.52 > +++ net/bridgestp.c 20 Apr 2015 11:35:56 - > @@ -596,6 +596,9 @@ bstp_input(struct bstp_state *bs, struct > len = ntohs(eh->ether_type); > if (len < sizeof(tpdu)) > goto out; > + > + m_adj(m, ETHER_HDR_LEN); > + > if (m->m_pkthdr.len > len) > m_adj(m, len - m->m_pkthdr.len); > if ((m = m_pullup(m, sizeof(tpdu))) == NULL) > Index: net/if_bridge.c > === > RCS file: /cvs/src/sys/net/if_bridge.c,v > retrieving revision 1.235 > diff -u -p -r1.235 if_bridge.c > --- net/if_bridge.c 17 Apr 2015 11:04:01 - 1.235 > +++ net/if_bridge.c 20 Apr 2015 11:55:38 - > @@ -115,10 +115,9 @@ void bridge_broadcast(struct bridge_soft > struct ether_header *, struct mbuf *); > void bridge_localbroadcast(struct bridge_softc *, struct ifnet *, > struct ether_header *, struct mbuf *); > -void bridge_span(struct bridge_softc *, struct ether_header *, > -struct mbuf *); > +void bridge_span(struct bridge_softc *, struct mbuf *); > struct mbuf *bridge_dispatch(struct bridge_iflist *, struct ifnet *, > -struct ether_header *, struct mbuf *); > + struct mbuf *); > void bridge_stop(struct bridge_softc *); > void bridge_init(struct bridge_softc *); > int bridge_bifconf(struct bridge_softc *, struct ifbifconf *); > @@ -180,6 +179,7 @@ int > bridge_clone_create(struct if_clone *ifc, int unit) > { > struct bridge_softc *sc; > + struct ifih *bridge_ifih; > struct ifnet *ifp; > int i, s; > > @@ -187,8 +187,15 @@ bridge_clone_create(struct if_clone *ifc > if (!sc) > return (ENOMEM); > > + bridge_ifih = malloc(sizeof(*bridge_ifih), M_DEVBUF, M_NOWAIT); > + if (bridge_ifih == NULL) { > + free(sc, M_DEVBUF, 0); > + return (ENOMEM); > + } > + > sc->sc_stp = bstp_create(&sc->sc_if); > if (!sc->sc_stp) { > + free(bridge_ifih, M_DEVBUF, sizeof(*bridge_ifih)); > free(sc, M_DEVBUF, 0); > return (ENOMEM); > } > @@ -222,6 +229,9 @@ bridge_clone_create(struct if_clone *ifc > DLT_EN10MB, ETHER_HDR_LEN); > #endif > > + bridge_ifih->ifih_input = ether_input; > + SLIST_INSERT_HEAD(&ifp->if_inputs, bridge_ifih, ifih_next); > + > s = splnet(); > LIST_INSERT_HEAD(&bridge_list, sc, sc_list); > splx(s); > @@ -234,6 +244,7 @@ bridge_clone_destroy(struct ifnet *ifp) > { > struct bridge_softc *sc = ifp->if_softc; > struct bridge_iflist *bif; > + struct ifih *bridge_ifih; > int s; > > bridge_stop(sc); > @@ -250,6 +261,17 @@ bridge_clone_destroy(struct ifnet *ifp) > splx(s); > > bstp_destroy(sc->sc_stp); > + > + /* Undo pseudo-driver changes. */ > + if_deactivate(ifp); > + > + bridge_ifih = SLIST_FIRST(&ifp->if_inputs); > + SLIST_REMOVE_HEAD(&ifp->if_inputs, ifih_next); > + > + KASSERT(SLIST_EMPTY(&ifp->if_inputs)); > + > + free(bridge_ifih, M_DEVBUF, sizeof(*bridge_ifih)); > + > if_detach(ifp); > > free(sc, M_DEVBUF, 0); > @@ -990,7 +1012,7 @@ bridge_output(struct ifnet *ifp, struct > struct mbuf *mc; > int used = 0; > > - bridge_span(sc, NULL, m); > + bridge_span(sc, m); > > TAILQ_FOREACH(p, &sc->sc_iflist, next) { > dst_if = p->ifp; > @@ -1066,7 +1088,7 @@ sendunicast: > (sa = bridge_tunneltag(m, dst_p->brt_tunnel.sa.sa_family)) != NULL) > memcpy(sa, &dst_p->brt_tunnel.sa, dst_p->brt_tunnel.sa.sa_len); > > - bridge_span(sc, NULL, m); > + bridge_span(sc, m); > if ((dst_if->if_flags & IFF_RUNNING) == 0) { > m_freem(m); > return (ENETDOWN); > @@ -1282,12 +1304,13 @@ bridgeintr_frame(struct bridge_softc *sc > * not for us, and schedule an interrupt. > */ > struct mbuf * > -bridge_input(struct ifnet *ifp, struct ether_header *eh, struct mbuf *m) > +bridge_input(struct ifnet *ifp, struct ether_header *eh0, struct mbuf *m) > { > struct bridge_softc *sc; > struct bridge_iflist *ifl; > + struct ether_header *eh; > #if NVLAN > 0 > - uint16_t etype = ntohs(eh->ether_type); > + uint16_t etype = ntohs(eh0->ether_type); > #endif /
Re: don't include CFLAGS in CXXFLAGS
On Fri, Jul 18, 2014 at 12:10:25AM +1000, Jonathan Gray wrote: > sys.mk automatically gets included by make(1) and sets CXXFLAGS to > CFLAGS. If a Makefile defines additional CFLAGS they will then be > passed to the C++ compiler. Which creates problems with flags > that should only be used by the C compiler in Makefiles that > deal with both C and C++ (like Mesa). > > Fix this situation by not initialising CXXFLAGS with CFLAGS. > No problems building src/xenocara with the following diff: Here is the diff again. If there are concerns on the ports side could someone doing ports bulk builds give this a try? Index: share/mk/bsd.lib.mk === RCS file: /cvs/src/share/mk/bsd.lib.mk,v retrieving revision 1.71 diff -u -p -r1.71 bsd.lib.mk --- share/mk/bsd.lib.mk 15 Oct 2013 22:40:00 - 1.71 +++ share/mk/bsd.lib.mk 16 Jul 2014 13:46:45 - @@ -30,6 +30,7 @@ SHLIB_MINOR=${minor} .if defined(NOPIE) CFLAGS+= ${NOPIE_FLAGS} +CXXFLAGS+= ${NOPIE_FLAGS} AFLAGS+= ${NOPIE_FLAGS} .endif Index: share/mk/bsd.prog.mk === RCS file: /cvs/src/share/mk/bsd.prog.mk,v retrieving revision 1.66 diff -u -p -r1.66 bsd.prog.mk --- share/mk/bsd.prog.mk23 Dec 2014 16:35:53 - 1.66 +++ share/mk/bsd.prog.mk28 Dec 2014 07:15:08 - @@ -12,6 +12,7 @@ .if (defined(LDSTATIC) && !defined(STATICPIE)) || defined(NOPIE) CFLAGS+= ${NOPIE_FLAGS} +CXXFLAGS+= ${NOPIE_FLAGS} AFLAGS+= ${NOPIE_FLAGS} LDFLAGS+= ${NOPIE_LDFLAGS} .endif Index: share/mk/sys.mk === RCS file: /cvs/src/share/mk/sys.mk,v retrieving revision 1.71 diff -u -p -r1.71 sys.mk --- share/mk/sys.mk 1 Jan 2015 15:50:27 - 1.71 +++ share/mk/sys.mk 4 Jan 2015 13:18:26 - @@ -39,7 +39,7 @@ LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${L HOSTCC?= cc CXX?= c++ -CXXFLAGS?= ${CFLAGS} +CXXFLAGS?= -O2 ${PIPE} ${DEBUG} COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} Index: gnu/lib/libstdc++-v3/Makefile === RCS file: /cvs/src/gnu/lib/libstdc++-v3/Makefile,v retrieving revision 1.7 diff -u -p -r1.7 Makefile --- gnu/lib/libstdc++-v3/Makefile 21 Jun 2013 17:07:30 - 1.7 +++ gnu/lib/libstdc++-v3/Makefile 17 Jul 2014 06:28:16 - @@ -7,13 +7,14 @@ GCC_TARGET= ${MACHINE_ARCH}-unknown-open LIB= stdc++ -CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H +CPPFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H .if ${MACHINE_ARCH} == "arm" -CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1 +CPPFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1 .endif -CFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include -CFLAGS+= -I${GCCLIB}/include -I${SRCDIR}/include -I${.CURDIR}/../libiberty/include -I. +CPPFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include +CPPFLAGS+= -I${GCCLIB}/include -I${SRCDIR}/include -I${.CURDIR}/../libiberty/include -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood +CXXFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \ -Wno-deprecated Index: gnu/lib/libstdc++-v3/Makefile.common === RCS file: /cvs/src/gnu/lib/libstdc++-v3/Makefile.common,v retrieving revision 1.3 diff -u -p -r1.3 Makefile.common --- gnu/lib/libstdc++-v3/Makefile.common16 May 2010 13:22:58 - 1.3 +++ gnu/lib/libstdc++-v3/Makefile.common17 Jul 2014 06:57:22 - @@ -10,10 +10,11 @@ SUPDIR= ${SRCDIR}/libsupc++ ${SRCDIR}/include ${SUPDIR} ${.CURDIR}/../libiberty/src \ ${.CURDIR}/../libstdc++-v3/obj -CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -CFLAGS+= -I${.CURDIR}/../libstdc++-v3/ -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include -CFLAGS+= -I${GCCLIB}/include -I${SRCDIR}/include -I${.CURDIR}/../libiberty/include -I. +CPPFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H +CPPFLAGS+= -I${.CURDIR}/../libstdc++-v3/ -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include +CPPFLAGS+= -I${GCCLIB}/include -I${SRCDIR}/include -I${.CURDIR}/../libiberty/include -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood +CXXFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \ -Wno-deprecated Index: gnu/lib/libsupc++-v3/Makefile === RCS file: /cvs/src/gnu/lib/libsupc++-v3/Makefile,v retrieving revision 1.3 diff -u -p -r1.3 Makefile --- gnu/lib/libsupc++-v3/Makefile 18 Jul 2011 18:32:47 - 1.3 +++ gnu/lib/libsupc++-v3/Makefile 17 Jul 2014 06:56: