Re: problems with em(4) since update to driver 7.2.2

From: Arnaud Lacombe <lacombar_at_gmail.com>
Date: Wed, 4 May 2011 13:17:44 -0400
Hi,

On Wed, May 4, 2011 at 3:58 AM, Olivier Smedts <olivier_at_gid0.org> 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
_at__at_ -3901,7 +3901,7 _at__at_ 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
Received on Wed May 04 2011 - 15:17:45 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:13 UTC