From owner-freebsd-current@FreeBSD.ORG Wed May 4 17:17:45 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 B25891065670 for ; Wed, 4 May 2011 17:17:45 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 74DC78FC15 for ; Wed, 4 May 2011 17:17:45 +0000 (UTC) Received: by iwn33 with SMTP id 33so1569414iwn.13 for ; Wed, 04 May 2011 10:17:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=w3bI0m8crSsSxi34V5nCX/cmzIcg4gAhG8yRyQ8saYM=; b=gAHV7lSNHcGrWTPzQ39g74Q1BlUwXLh10jbB1JdI3pHxC3nni3MmHM9tdlkV0c24te r6SHGoOc0XTzHVIC49sCDgesnvqiGfxVFKzvWI1039ogMkna8iL05oBNHosxaIqDKP5b eNcC2vGk/nh+VtmT0y46Y1Yn/5Y/AYwKiPRLc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=DWsaV8PhTaJYhbkr4/gXyqwMUsbVsmLaSW6ajcc+BrF6/yb1qJzllpn6eUqG13QUbZ L4jmg9G5WcHACXmQur56FQRLOD2ncEhGUlU1G1UtdMW5AMrUeWjWqRT4ahBp1ka8gc7J 50e1i628qFaaSzfKh3Pt5P3rvkWaLcandaoDk= MIME-Version: 1.0 Received: by 10.42.139.5 with SMTP id e5mr2131707icu.136.1304529464756; Wed, 04 May 2011 10:17:44 -0700 (PDT) Received: by 10.42.167.5 with HTTP; Wed, 4 May 2011 10:17:44 -0700 (PDT) In-Reply-To: References: <4D94A354.9080903@sentex.net> <4DC07013.9070707@gmx.net> <4DC078BD.9080908@gmx.net> Date: Wed, 4 May 2011 13:17:44 -0400 Message-ID: From: Arnaud Lacombe To: Olivier Smedts Content-Type: text/plain; charset=ISO-8859-1 Cc: Mike Tancsa , Jack Vogel , Michael Schmiedgen , 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: Wed, 04 May 2011 17:17:45 -0000 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' is 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) struct adapter *adapter = rxr->adapter; struct em_buffer *rxbuf; bus_dma_segment_t seg[1]; - int i, j, nsegs, error; + int i, j, nsegs, error = 0; 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. - Arnaud