* [PATCH bk-2.6.10] tg3:align IP headers from 5701 in PCI-X mode
@ 2005-01-04 1:45 akepner
2005-01-10 20:50 ` David S. Miller
0 siblings, 1 reply; 6+ messages in thread
From: akepner @ 2005-01-04 1:45 UTC (permalink / raw)
To: davem, jgarzik; +Cc: netdev
We still have customers using 5701 cards, and their syslogs fill with
"kernel unaligned access" messages. They may also see a significant
performance degradation due to the expense of unaligned accesses on
ia64. Here's a patch to address this (it is almost the same as the
patch which was discussed in
http://marc.theaimsgroup.com/?l=linux-netdev&m=109770128816605&w=2).
In a quick throughput test, I found that this could improve throughput
by ~30% on an Altix.
diffstats:
drivers/net/Kconfig | 13 +++++++++++++
drivers/net/tg3.c | 8 +++++++-
2 files changed, 20 insertions(+), 1 deletion(-)
Signed-off-by: Arthur Kepner <akepner@sgi.com>
===== drivers/net/Kconfig 1.97 vs edited =====
--- 1.97/drivers/net/Kconfig 2004-12-27 01:29:18 -08:00
+++ edited/drivers/net/Kconfig 2005-01-03 17:12:26 -08:00
@@ -2089,6 +2089,19 @@ config TIGON3
To compile this driver as a module, choose M here: the module
will be called tg3. This is recommended.
+config 5701_PCIX_IP_ALIGN
+ bool "align IP headers from 5701 cards in the driver (in PCI-X mode)"
+ depends on TIGON3
+ help
+ IP headers from 5701 cards (in PCI-X mode only) are not aligned as
+ the TCP/IP stack expects. On some architectures (including ia64)
+ unaligned accesses are particularly expensive, and the performance
+ of 5701 cards in PCI-X mode suffers. Configuring 5701_PCIX_IP_ALIGN
+ causes the driver to copy packets so that the IP headers are
+ aligned. 5701_PCIX_IP_ALIGN only affects operation of the TIGON3 driver
+ when used with a 5701 card in PCI-X mode - other cards are unaffected
+ by this option.
+
config GIANFAR
tristate "Gianfar Ethernet"
depends on 85xx
===== drivers/net/tg3.c 1.222 vs edited =====
--- 1.222/drivers/net/tg3.c 2004-11-15 15:53:08 -08:00
+++ edited/drivers/net/tg3.c 2005-01-03 17:25:09 -08:00
@@ -2702,7 +2702,13 @@ static int tg3_rx(struct tg3 *tp, int bu
len = ((desc->idx_len & RXD_LEN_MASK) >> RXD_LEN_SHIFT) - 4; /* omit crc */
- if (len > RX_COPY_THRESHOLD) {
+ if (len > RX_COPY_THRESHOLD
+#ifdef CONFIG_5701_PCIX_IP_ALIGN
+ && tp->rx_offset == 2
+ /* rx_offset != 2 iff this is a 5701 card running
+ * in PCI-X mode [see tg3_get_invariants()] */
+#endif
+ ) {
int skb_size;
skb_size = tg3_alloc_rx_skb(tp, opaque_key,
--
Arthur
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH bk-2.6.10] tg3:align IP headers from 5701 in PCI-X mode
2005-01-04 1:45 [PATCH bk-2.6.10] tg3:align IP headers from 5701 in PCI-X mode akepner
@ 2005-01-10 20:50 ` David S. Miller
2005-01-10 1:59 ` Arthur D. Kepner
2005-01-10 21:01 ` Jeff Garzik
0 siblings, 2 replies; 6+ messages in thread
From: David S. Miller @ 2005-01-10 20:50 UTC (permalink / raw)
To: akepner; +Cc: jgarzik, netdev
On Mon, 3 Jan 2005 17:45:01 -0800 (PST)
akepner@sgi.com wrote:
> We still have customers using 5701 cards, and their syslogs fill with
> "kernel unaligned access" messages. They may also see a significant
> performance degradation due to the expense of unaligned accesses on
> ia64. Here's a patch to address this (it is almost the same as the
> patch which was discussed in
> http://marc.theaimsgroup.com/?l=linux-netdev&m=109770128816605&w=2).
>
> In a quick throughput test, I found that this could improve throughput
> by ~30% on an Altix.
Let's just do this all the time for this case, adding new config
options for stuff like this does nothing more than create confusion.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bk-2.6.10] tg3:align IP headers from 5701 in PCI-X mode
2005-01-10 20:50 ` David S. Miller
@ 2005-01-10 1:59 ` Arthur D. Kepner
2005-01-10 21:01 ` Jeff Garzik
1 sibling, 0 replies; 6+ messages in thread
From: Arthur D. Kepner @ 2005-01-10 1:59 UTC (permalink / raw)
To: David S. Miller; +Cc: jgarzik, netdev
On Mon, 10 Jan 2005, David S. Miller wrote:
> Let's just do this all the time for this case, adding new config
> options for stuff like this does nothing more than create confusion.
OK, you mean like the following?
diffstats:
tg3.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-)
Signed-off-by: Arthur Kepner <akepner@sgi.com>
===== drivers/net/tg3.c 1.222 vs edited =====
--- 1.222/drivers/net/tg3.c 2004-11-15 15:53:08 -08:00
+++ edited/drivers/net/tg3.c 2005-01-10 13:35:33 -08:00
@@ -2702,7 +2702,11 @@ static int tg3_rx(struct tg3 *tp, int bu
len = ((desc->idx_len & RXD_LEN_MASK) >> RXD_LEN_SHIFT) - 4; /* omit crc */
- if (len > RX_COPY_THRESHOLD) {
+ if (len > RX_COPY_THRESHOLD
+ && tp->rx_offset == 2
+ /* rx_offset != 2 iff this is a 5701 card running
+ * in PCI-X mode [see tg3_get_invariants()] */
+ ) {
int skb_size;
skb_size = tg3_alloc_rx_skb(tp, opaque_key,
--
Arthur
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH bk-2.6.10] tg3:align IP headers from 5701 in PCI-X mode
2005-01-10 20:50 ` David S. Miller
2005-01-10 1:59 ` Arthur D. Kepner
@ 2005-01-10 21:01 ` Jeff Garzik
1 sibling, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2005-01-10 21:01 UTC (permalink / raw)
To: David S. Miller; +Cc: akepner, netdev
David S. Miller wrote:
> On Mon, 3 Jan 2005 17:45:01 -0800 (PST)
> akepner@sgi.com wrote:
>
>
>>We still have customers using 5701 cards, and their syslogs fill with
>>"kernel unaligned access" messages. They may also see a significant
>>performance degradation due to the expense of unaligned accesses on
>>ia64. Here's a patch to address this (it is almost the same as the
>>patch which was discussed in
>>http://marc.theaimsgroup.com/?l=linux-netdev&m=109770128816605&w=2).
>>
>>In a quick throughput test, I found that this could improve throughput
>>by ~30% on an Altix.
>
>
> Let's just do this all the time for this case, adding new config
> options for stuff like this does nothing more than create confusion.
agreed.
Jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bk-2.6.10] tg3:align IP headers from 5701 in PCI-X mode
@ 2005-01-11 18:49 Arthur D. Kepner
2005-01-17 22:12 ` David S. Miller
0 siblings, 1 reply; 6+ messages in thread
From: Arthur D. Kepner @ 2005-01-11 18:49 UTC (permalink / raw)
To: David S. Miller, jgarzik; +Cc: netdev
(Resend. Local clock was off and my archived reply appears to have
been generated prior to the message to which I was responding.... )
On Mon, 10 Jan 2005, David S. Miller wrote:
> Let's just do this all the time for this case, adding new config
> options for stuff like this does nothing more than create confusion.
OK, you mean like the following?
diffstats:
tg3.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-)
Signed-off-by: Arthur Kepner <akepner@sgi.com>
===== drivers/net/tg3.c 1.222 vs edited =====
--- 1.222/drivers/net/tg3.c 2004-11-15 15:53:08 -08:00
+++ edited/drivers/net/tg3.c 2005-01-10 13:35:33 -08:00
@@ -2702,7 +2702,11 @@ static int tg3_rx(struct tg3 *tp, int bu
len = ((desc->idx_len & RXD_LEN_MASK) >> RXD_LEN_SHIFT) - 4; /* omit crc */
- if (len > RX_COPY_THRESHOLD) {
+ if (len > RX_COPY_THRESHOLD
+ && tp->rx_offset == 2
+ /* rx_offset != 2 iff this is a 5701 card running
+ * in PCI-X mode [see tg3_get_invariants()] */
+ ) {
int skb_size;
skb_size = tg3_alloc_rx_skb(tp, opaque_key,
--
Arthur
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH bk-2.6.10] tg3:align IP headers from 5701 in PCI-X mode
2005-01-11 18:49 Arthur D. Kepner
@ 2005-01-17 22:12 ` David S. Miller
0 siblings, 0 replies; 6+ messages in thread
From: David S. Miller @ 2005-01-17 22:12 UTC (permalink / raw)
To: Arthur D. Kepner; +Cc: jgarzik, netdev
On Tue, 11 Jan 2005 12:49:05 -0600 (CST)
"Arthur D. Kepner" <akepner@sgi.com> wrote:
> On Mon, 10 Jan 2005, David S. Miller wrote:
>
> > Let's just do this all the time for this case, adding new config
> > options for stuff like this does nothing more than create confusion.
>
> OK, you mean like the following?
Yep, patch applied.
Thanks Arthur.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-01-17 22:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-04 1:45 [PATCH bk-2.6.10] tg3:align IP headers from 5701 in PCI-X mode akepner
2005-01-10 20:50 ` David S. Miller
2005-01-10 1:59 ` Arthur D. Kepner
2005-01-10 21:01 ` Jeff Garzik
-- strict thread matches above, loose matches on Subject: below --
2005-01-11 18:49 Arthur D. Kepner
2005-01-17 22:12 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).