kern/80932: [em] [patch] Degraded performance of em driver
Mark Linimon
linimon at lonesome.com
Thu Apr 6 15:20:24 UTC 2006
The following reply was made to PR kern/80932; it has been noted by GNATS.
From: linimon at lonesome.com (Mark Linimon)
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: kern/80932: [em] [patch] Degraded performance of em driver
Date: Thu, 6 Apr 2006 10:19:11 -0500
----- Forwarded message from Marian Durkovic <md at bts.sk> -----
please find the patch for RELENG_6 and MAIN branches in the attachment.
RELENG_5 branch needs to be patched with my original patch:
http://lists.freebsd.org/pipermail/freebsd-net/2005-May/007161.html
Thanks & kind regards,
M.
--------------------------------------------------------------------------
---- ----
---- Marian Durkovic network manager ----
---- ----
---- Slovak Technical University Tel: +421 2 524 51 301 ----
---- Computer Centre, Nam. Slobody 17 Fax: +421 2 524 94 351 ----
---- 812 43 Bratislava, Slovak Republic E-mail/sip: md at bts.sk ----
---- ----
--------------------------------------------------------------------------
--- src/sys/dev/em/if_em.c Thu Apr 6 07:56:15 2006
+++ src/sys/dev/em/if_em.c.new Thu Apr 6 08:01:38 2006
@@ -912,11 +912,13 @@
* Packet Buffer Allocation (PBA)
* Writing PBA sets the receive portion of the buffer
* the remainder is used for the transmit buffer.
+ * BEWARE: For wirespeed performance, Tx buffer must be able
+ * to accommodate 2 frames
*/
switch (adapter->hw.mac_type) {
case em_82547:
case em_82547_rev_2: /* 82547: Total Packet Buffer is 40K */
- if (adapter->hw.max_frame_size > EM_RXBUFFER_8192)
+ if (adapter->hw.max_frame_size > 5120)
pba = E1000_PBA_22K; /* 22K for Rx, 18K for Tx */
else
pba = E1000_PBA_30K; /* 30K for Rx, 10K for Tx */
@@ -926,6 +928,9 @@
break;
case em_82571: /* 82571: Total Packet Buffer is 48K */
case em_82572: /* 82572: Total Packet Buffer is 48K */
+ if(adapter->hw.max_frame_size > EM_RXBUFFER_8192)
+ pba = E1000_PBA_30K; /* 30K for Rx, 18K for Tx */
+ else
pba = E1000_PBA_32K; /* 32K for Rx, 16K for Tx */
break;
case em_82573: /* 82573: Total Packet Buffer is 32K */
----- End forwarded message -----
More information about the freebsd-bugs
mailing list