Re: [PATCH,RFT] 8139cp TSO support

From: Jeff Garzik
Date: Sun Aug 29 2004 - 18:07:01 EST


Francois Romieu wrote:
Jeff Garzik <jgarzik@xxxxxxxxx> :
[...]

Also, the r8169 implementation should be similar, if someone (Francois?)
wants to tackle it.


I'll copy and test it tomorrow on r8169 if nobody beats me.

On a related note, 8139cp probably wants something like the patch below for
the usual SG handling (on top of 2.6.9-rc1 + -mm1 + TSO patch):

- suspicious length in pci_unmap_single;
- wait for the last frag before freeing the relevant skb;
- no need to crash when facing some unexpected csum combination.

Looks OK except for


diff -puN drivers/net/8139cp.c~8139cp-010 drivers/net/8139cp.c
--- linux-2.6.9-rc1/drivers/net/8139cp.c~8139cp-010 2004-08-29 23:47:07.000000000 +0200
+++ linux-2.6.9-rc1-fr/drivers/net/8139cp.c 2004-08-30 00:16:13.000000000 +0200
@@ -807,7 +807,6 @@ static int cp_start_xmit (struct sk_buff
cp->tx_skb[entry].skb = skb;
cp->tx_skb[entry].mapping = mapping;
- cp->tx_skb[entry].frag = 0;
entry = NEXT_TX(entry);
} else {
struct cp_desc *txd;

You definitely want to set .len on the no-frags path...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/