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-li...@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 > _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"