Date: Tue, 23 Nov 2010 11:04:52 -0800 From: Jack Vogel <jfvogel@gmail.com> To: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> Cc: Randy Bush <randy@psg.com>, Denis Ahrens <denis@berlin.ccc.de>, stable@freebsd.org, "George V. Neville-Neil" <gnn@freebsd.org> Subject: Re: repeating crashes with 8.1 Message-ID: <AANLkTi=E89jJH68Ng1R06tKQi%2BxpaYORpktrZk5cvjVh@mail.gmail.com> In-Reply-To: <20101123175100.V24596@maildrop.int.zabbadoz.net> References: <m2zku7cqt5.wl%randy@psg.com> <m2y69rcqjc.wl%randy@psg.com> <201010221416.o9MEGSa0094817@lava.sentex.ca> <m2tykeb9ac.wl%randy@psg.com> <201010221425.o9MEPcWC094867@lava.sentex.ca> <m2k4lab6nh.wl%randy@psg.com> <201010221848.o9MIm7WF096197@lava.sentex.ca> <m2y69q9e38.wl%randy@psg.com> <4CC1F3B8.3010302@bogus.com> <4CC225D3.1030502@ops-netman.net> <7.1.0.9.0.20101022210145.06fe25e8@sentex.net> <201010230159.o9N1xGGF098363@lava.sentex.ca> <AANLkTimWTTHWC04my3CSoNGYsLarS9F10eoO=8Fz37cF@mail.gmail.com> <201010230821.o9N8LVuR001382@lava.sentex.ca> <20101023091555.W66242@maildrop.int.zabbadoz.net> <20101123175100.V24596@maildrop.int.zabbadoz.net>
next in thread | previous in thread | raw e-mail | index | archive | help
I'm a bit dubious about this, if a descriptor still has an mbuf it was due to a discard, go look at em_rx_discard(), you will notice there that all these things are already being done at that point. So do you have a scenario where we can have an unused mbuf that didn't come thru that path?? Jack On Tue, Nov 23, 2010 at 10:47 AM, Bjoern A. Zeeb < bzeeb-lists@lists.zabbadoz.net> wrote: > On Sat, 23 Oct 2010, Bjoern A. Zeeb wrote: > > Hi, > > just to get this out. Jack you might want to review and if ok, include > in HEAD before we get feedback maybe. To my understanding worst it > would be overhead but not really harm. > > > >>>>> Oct 22 02:06:02 i4 kernel: em1: discard frame w/o packet header >>>> >>>>> Oct 22 02:06:10 i4 kernel: em2: discard frame w/o packet header >>>> >>> > The following is a random-guess by code reading that hasn't been tested > yet but believed to be correct; also ran it by gnn. > > http://people.freebsd.org/~bz/20101122-03-em-pkthdr.diff<http://people.freebsd.org/%7Ebz/20101122-03-em-pkthdr.diff> > > --- sys/dev/e1000/if_em.c.orig 2010-11-01 20:57:53.000000000 -0400 > +++ sys/dev/e1000/if_em.c 2010-11-16 01:28:00.000000000 -0500 > @@ -3754,8 +3769,13 @@ em_refresh_mbufs(struct rx_ring *rxr, in > ** they can only be due to an error > ** and are to be reused. > */ > - if (rxbuf->m_head != NULL) > + if (rxbuf->m_head != NULL) { > + rxbuf->m_head->m_len = rxbuf->m_head->m_pkthdr.len > = adapter->rx_mbuf_sz; > + rxbuf->m_head->m_flags |= M_PKTHDR; > + rxbuf->m_head->m_data = > rxbuf->m_head->m_ext.ext_buf; > + rxbuf->m_head->m_next = NULL; > goto reuse; > + } > m = m_getjcl(M_DONTWAIT, MT_DATA, > M_PKTHDR, adapter->rx_mbuf_sz); > /* > > I am not sure if igb and the others need a similar fix. Haven't > looked in detail. gnn mentioned similarities though good ones imho > in there. > > If you were able to reproduce the pkthdr issue it would be great to > test it. If you always paniced it with IPv6 you may also want to test > the applicable patch (use the direct URLs mentioned) from the very end of > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/148857 > to make sure you are not running into that race. > > > /bz > > -- > Bjoern A. Zeeb Welcome a new stage of life. > <ks> Going to jail sucks -- <bz> All my daemons like it! > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=E89jJH68Ng1R06tKQi%2BxpaYORpktrZk5cvjVh>