Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Feb 2011 18:52:52 -0500
From:      Arnaud Lacombe <lacombar@gmail.com>
To:        beezarliu <beezarliu@yahoo.com.cn>
Cc:        freebsd-net@freebsd.org, Jack Vogel <jfvogel@gmail.com>, "bug-followup@FreeBSD.org" <bug-followup@freebsd.org>
Subject:   Re: Re: Re: kern/150516: [em] e1000 receive queue handling problem
Message-ID:  <AANLkTim0NFT2GrhMq77=K-=-4Q6xnh7saHy3c-Bid03N@mail.gmail.com>
In-Reply-To: <AANLkTik3x0qzffoizHMhfsOrYVG9UWKzyY7wf3pKO5QL@mail.gmail.com>
References:  <AANLkTi=HW4XqZ3PTB69fL5h-Qpqpae4C2sfLLdJSFxrs@mail.gmail.com> <201102231218136253955@yahoo.com.cn> <AANLkTinD%2B7Xo0RRZH818%2BM9cLKNYhC0eKAsVZPJbR1GK@mail.gmail.com> <201102231404144686577@yahoo.com.cn> <AANLkTik3x0qzffoizHMhfsOrYVG9UWKzyY7wf3pKO5QL@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--0016363b8b883c06cd049d24078f
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,

What is the point to invent a complex logic to detected a situation
the chip warn you about ?

The attached patch has currently survived longer than anything I've
been ever tested, without dirty hack, like raising `nmbclusters'.

Thanks in advance,
 - Arnaud

ps: this is a temporary patch, for my 82754 based system, I am aware
there is other user of IMS_ENABLE_MASK.

On Wed, Feb 23, 2011 at 2:52 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> Hi,
>
> 2011/2/23 beezarliu <beezarliu@yahoo.com.cn>:
>> I think you can replace sys/dev/e1000/* =A0with the files in stable/8,
>> and then uses this patch. It's much simpler.
>> :)
>>
> agree. I switched to the driver of 8-STABLE, applied your patch
> (without any conflict), fixed a bad version check (see [0]), built the
> kernel, rebooted, ran the test... and hung em(4) RX again. 141k missed
> packets (growing) and about 3k cluster allocations denied (constant)
> currently. TX is fine, but the NIC is unable to process ARP and ICMP
> reply sent back by the machine on the LAN.
>
> I did not test igb(4) as I do not have any on the path I directly
> control, but the fix in trunk survived a few day of similar testing.
>
> =A0- Arnaud
>
> [0]:
> diff --git a/sys/dev/e1000/if_igb.h b/sys/dev/e1000/if_igb.h
> index 4388e07..adef0af 100644
> --- a/sys/dev/e1000/if_igb.h
> +++ b/sys/dev/e1000/if_igb.h
> @@ -508,7 +508,7 @@ struct igb_rx_buf {
> =A0 =A0 =A0 =A0cur |=3D new; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 \
> =A0}
>
> -#if __FreeBSD_version < 800504
> +#if __FreeBSD_version >=3D 800000 && __FreeBSD_version < 800504
> =A0static __inline int
> =A0drbr_needs_enqueue(struct ifnet *ifp, struct buf_ring *br)
> =A0{
>

--0016363b8b883c06cd049d24078f
Content-Type: text/x-patch; charset=US-ASCII;
	name="0001-if_em-handle-RX-overrun.patch"
Content-Disposition: attachment; filename="0001-if_em-handle-RX-overrun.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_gklr8w9u0

RnJvbSAyNjU3NDc1NjFhMjA2MDQ2OWZlMGMyMTA5NGU3N2Q0NGIyYzBhMzlhIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBBcm5hdWQgTGFjb21iZSA8bGFjb21iYXJAZ21haWwuY29tPgpE
YXRlOiBGcmksIDI1IEZlYiAyMDExIDE4OjQ3OjQ4IC0wNTAwClN1YmplY3Q6IFtQQVRDSF0gaWZf
ZW06IGhhbmRsZSBSWCBvdmVycnVuCgotLS0KIHN5cy9kZXYvZTEwMDAvZTEwMDBfZGVmaW5lcy5o
IHwgICAgMSArCiBzeXMvZGV2L2UxMDAwL2lmX2VtLmMgICAgICAgICB8ICAgMjEgKysrKysrKysr
KysrKysrKysrKystCiAyIGZpbGVzIGNoYW5nZWQsIDIxIGluc2VydGlvbnMoKyksIDEgZGVsZXRp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A9IGFkYXB0ZXItPnJ4X3JpbmdzOworCisJaWYgKCEoaWZwLT5pZl9kcnZfZmxhZ3MgJiBJRkZf
RFJWX1JVTk5JTkcpKQorCQlyZXR1cm47CisKKwlFTV9DT1JFX0xPQ0soYWRhcHRlcik7CisJZW1f
cmVmcmVzaF9tYnVmcyhyeHIsIHJ4ci0+bmV4dF90b19jaGVjayk7CisJRTEwMDBfV1JJVEVfUkVH
KCZhZGFwdGVyLT5odywgRTEwMDBfSU1TLCBFMTAwMF9JTVNfUlhPKTsKKwlFTV9DT1JFX1VOTE9D
SyhhZGFwdGVyKTsKK30KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKLS0gCjEuNy4zLjMuNDE4Lmc3MDRm
Ni5kaXJ0eQoK
--0016363b8b883c06cd049d24078f--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTim0NFT2GrhMq77=K-=-4Q6xnh7saHy3c-Bid03N>