From owner-freebsd-current@FreeBSD.ORG Thu May 5 12:18:53 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAEEE106566C for ; Thu, 5 May 2011 12:18:52 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from mail-px0-f176.google.com (mail-px0-f176.google.com [209.85.212.176]) by mx1.freebsd.org (Postfix) with ESMTP id 928E18FC18 for ; Thu, 5 May 2011 12:18:52 +0000 (UTC) Received: by pxi11 with SMTP id 11so1623983pxi.7 for ; Thu, 05 May 2011 05:18:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.35.228 with SMTP id l4mr3286889pbj.5.1304597931815; Thu, 05 May 2011 05:18:51 -0700 (PDT) Received: by 10.68.40.4 with HTTP; Thu, 5 May 2011 05:18:51 -0700 (PDT) In-Reply-To: References: <4D94A354.9080903@sentex.net> <4DC07013.9070707@gmx.net> <4DC078BD.9080908@gmx.net> Date: Thu, 5 May 2011 14:18:51 +0200 Message-ID: From: Olivier Smedts To: Arnaud Lacombe Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Jack Vogel , FreeBSD current mailing list Subject: Re: problems with em(4) since update to driver 7.2.2 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 12:18:53 -0000 Hello, 2011/5/4 Arnaud Lacombe : > Hi, > > On Wed, May 4, 2011 at 3:58 AM, Olivier Smedts wrote: >> em0: Using an MSI interrupt >> em0: Ethernet address: d4:85:64:b2:aa:f5 >> em0: Could not setup receive structures >> em0: Could not setup receive structures >> >> What can we do to help you debug this ? >> > At some point in time, in late February, I had the same issue on a > 6-interface machine. I tracked this down to the fact that the main > loop in em_setup_receive_ring() was not being entered. This resulted > in junk being returned as `error' =A0is not explicitly initialized. At > the time, the following patch worked for me. Without it the driver was > unable to initialize with RX/TX ring's size of 512. With it, ring's > size of 1024 initialized fine. > > diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c > index fb6ed67..f02059a 100644 > --- a/sys/dev/e1000/if_em.c > +++ b/sys/dev/e1000/if_em.c > @@ -3901,7 +3901,7 @@ em_setup_receive_ring(struct rx_ring *rxr) > =A0 =A0 =A0 =A0struct =A0adapter =A0 =A0 =A0 =A0 *adapter =3D rxr->adapte= r; > =A0 =A0 =A0 =A0struct em_buffer =A0 =A0 =A0 =A0*rxbuf; > =A0 =A0 =A0 =A0bus_dma_segment_t =A0 =A0 =A0 seg[1]; > - =A0 =A0 =A0 int =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 i, j, nsegs, er= ror; > + =A0 =A0 =A0 int =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 i, j, nsegs, er= ror =3D 0; This patch made the trick for me. I'll post what Jack asked for in the following mail. > I did not dig much more at the time, but I was definitively seeing an > odd behavior. Anyhow, I am no longer able to reproduce this with > 7.2.3, so cannot dig in more details. > > Btw, I wish you all luck, it took me nearly two full months to > convince Jack (and other FreeBSD devs) that there was a bug in the > mbuf refresh code. > > =A0- Arnaud > --=20 Olivier Smedts=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 _ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 ASCII ribbon campaign ( ) e-mail: olivier@gid0.org=A0 =A0 =A0 =A0 - against HTML email & vCards=A0 X www: http://www.gid0.org=A0 =A0 - against proprietary attachments / \ =A0 "Il y a seulement 10 sortes de gens dans le monde : =A0 ceux qui comprennent le binaire, =A0 et ceux qui ne le comprennent pas."