problems with em(4) since update to driver 7.2.2

Arnaud Lacombe lacombar at gmail.com
Wed May 4 17:17:45 UTC 2011


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
@@ -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


More information about the freebsd-current mailing list