Re: [PATCH 13/22] e1000: disable TSO when debugging slab
Jeff Garzik [EMAIL PROTECTED] wrote: +#ifdef CONFIG_DEBUG_SLAB + /* 82544's work arounds do not play nicely with DEBUG SLAB */ + if (adapter-hw.mac_type == e1000_82544) + netdev-features = ~NETIF_F_TSO; +#endif ACK, provided that you greatly enhance the comment to explain -why-, not just the desired results. Actually, CONFIG_DEBUG_SLAB is not the only thing that can break the 82544 work-around, Xen for example will also generate packets that breaks it. Jesse has a more recent fix that resolves both problems. I've updated his patch to make it smaller. Note that the only reason we don't see this normally is because the TCP stack starts writing from the end, i.e., it writes the TCP header first then slaps on the IP header, etc. So the end of the TCP header (skb-tail - 1 here) is always aligned correctly. Had we made the start of the IP header (e.g., IPv6) 8-byte aligned instead, this would happen for normal TCP traffic as well. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 73f3a85..2c6ba42 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -3168,6 +3168,16 @@ #ifdef NETIF_F_TSO if (skb-data_len (hdr_len == (skb-len - skb-data_len))) { switch (adapter-hw.mac_type) { unsigned int pull_size; + case e1000_82544: + /* Make sure we have room to chop off 4 bytes, +* and that the end alignment will work out to +* this hardware's requirements +* NOTE: this is a TSO only workaround +* if end byte alignment not correct move us +* into the next dword */ + if ((unsigned long)(skb-tail - 1) 4) + break; + /* fall through */ case e1000_82571: case e1000_82572: case e1000_82573: - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 13/22] e1000: disable TSO when debugging slab
Kok, Auke wrote: CONFIG_DEBUG_SLAB kills TSO on the 82544, so we're better off turing TSO off in this rare case, assuming performance is not an issue for people running slab debugging. Signed-off-by: Jesse Brandeburg [EMAIL PROTECTED] Signed-off-by: Auke Kok [EMAIL PROTECTED] --- drivers/net/e1000/e1000_main.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 9ddcadd..12f9f61 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -998,6 +998,12 @@ e1000_probe(struct pci_dev *pdev, (adapter-hw.mac_type != e1000_82547)) netdev-features |= NETIF_F_TSO; +#ifdef CONFIG_DEBUG_SLAB + /* 82544's work arounds do not play nicely with DEBUG SLAB */ + if (adapter-hw.mac_type == e1000_82544) + netdev-features = ~NETIF_F_TSO; +#endif ACK, provided that you greatly enhance the comment to explain -why-, not just the desired results. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 13/22] e1000: disable TSO when debugging slab
CONFIG_DEBUG_SLAB kills TSO on the 82544, so we're better off turing TSO off in this rare case, assuming performance is not an issue for people running slab debugging. Signed-off-by: Jesse Brandeburg [EMAIL PROTECTED] Signed-off-by: Auke Kok [EMAIL PROTECTED] --- drivers/net/e1000/e1000_main.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 9ddcadd..12f9f61 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -998,6 +998,12 @@ e1000_probe(struct pci_dev *pdev, (adapter-hw.mac_type != e1000_82547)) netdev-features |= NETIF_F_TSO; +#ifdef CONFIG_DEBUG_SLAB + /* 82544's work arounds do not play nicely with DEBUG SLAB */ + if (adapter-hw.mac_type == e1000_82544) + netdev-features = ~NETIF_F_TSO; +#endif + #ifdef NETIF_F_TSO6 if (adapter-hw.mac_type e1000_82547_rev_2) netdev-features |= NETIF_F_TSO6; --- Auke Kok [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html