From: Roger Luethi <rl@hellgate.ch>
To: Jeff Garzik <jgarzik@pobox.com>, Andrew Morton <akpm@osdl.org>
Cc: netdev@oss.sgi.com
Subject: [PATCH 2.6] Nuke HAS_IP_COPYSUM for net drivers
Date: Tue, 25 May 2004 21:11:16 +0200 [thread overview]
Message-ID: <20040525191115.GA18454@k3.hellgate.ch> (raw)
[-- Attachment #1: Type: text/plain, Size: 258 bytes --]
Entirely untested, but Obviously Correct(TM). HAS_IP_COPYSUM has been
utterly meaningless for a long time.
Respective patch for via-rhine follows once I know the state of its
pending patches (which I wouldn't mind getting feedback on (hint,
hint!)).
Roger
[-- Attachment #2: copysum-2.6.6.diff --]
[-- Type: text/plain, Size: 3012 bytes --]
diff -urp linux-2.6.6/drivers/net/epic100.c linux-2.6.6-patch/drivers/net/epic100.c
--- linux-2.6.6/drivers/net/epic100.c 2004-04-04 05:37:06.000000000 +0200
+++ linux-2.6.6-patch/drivers/net/epic100.c 2004-05-25 20:45:55.273480945 +0200
@@ -1215,13 +1215,8 @@ static int epic_rx(struct net_device *de
ep->rx_ring[entry].bufaddr,
ep->rx_buf_sz,
PCI_DMA_FROMDEVICE);
-#if 1 /* HAS_IP_COPYSUM */
eth_copy_and_sum(skb, ep->rx_skbuff[entry]->tail, pkt_len, 0);
skb_put(skb, pkt_len);
-#else
- memcpy(skb_put(skb, pkt_len), ep->rx_skbuff[entry]->tail,
- pkt_len);
-#endif
pci_dma_sync_single_for_device(ep->pci_dev,
ep->rx_ring[entry].bufaddr,
ep->rx_buf_sz,
diff -urp linux-2.6.6/drivers/net/natsemi.c linux-2.6.6-patch/drivers/net/natsemi.c
--- linux-2.6.6/drivers/net/natsemi.c 2004-05-20 16:17:38.000000000 +0200
+++ linux-2.6.6-patch/drivers/net/natsemi.c 2004-05-25 20:51:58.171336667 +0200
@@ -1798,14 +1798,9 @@ static void netdev_rx(struct net_device
np->rx_dma[entry],
buflen,
PCI_DMA_FROMDEVICE);
-#if HAS_IP_COPYSUM
eth_copy_and_sum(skb,
np->rx_skbuff[entry]->tail, pkt_len, 0);
skb_put(skb, pkt_len);
-#else
- memcpy(skb_put(skb, pkt_len),
- np->rx_skbuff[entry]->tail, pkt_len);
-#endif
pci_dma_sync_single_for_device(np->pci_dev,
np->rx_dma[entry],
buflen,
diff -urp linux-2.6.6/drivers/net/tulip/winbond-840.c linux-2.6.6-patch/drivers/net/tulip/winbond-840.c
--- linux-2.6.6/drivers/net/tulip/winbond-840.c 2004-04-04 05:36:26.000000000 +0200
+++ linux-2.6.6-patch/drivers/net/tulip/winbond-840.c 2004-05-25 20:46:26.439782500 +0200
@@ -1292,14 +1292,8 @@ static int netdev_rx(struct net_device *
pci_dma_sync_single_for_cpu(np->pci_dev,np->rx_addr[entry],
np->rx_skbuff[entry]->len,
PCI_DMA_FROMDEVICE);
- /* Call copy + cksum if available. */
-#if HAS_IP_COPYSUM
eth_copy_and_sum(skb, np->rx_skbuff[entry]->tail, pkt_len, 0);
skb_put(skb, pkt_len);
-#else
- memcpy(skb_put(skb, pkt_len), np->rx_skbuff[entry]->tail,
- pkt_len);
-#endif
pci_dma_sync_single_for_device(np->pci_dev,np->rx_addr[entry],
np->rx_skbuff[entry]->len,
PCI_DMA_FROMDEVICE);
diff -urp linux-2.6.6/drivers/net/yellowfin.c linux-2.6.6-patch/drivers/net/yellowfin.c
--- linux-2.6.6/drivers/net/yellowfin.c 2004-04-04 05:36:56.000000000 +0200
+++ linux-2.6.6-patch/drivers/net/yellowfin.c 2004-05-25 20:46:46.609742086 +0200
@@ -1201,13 +1201,8 @@ static int yellowfin_rx(struct net_devic
break;
skb->dev = dev;
skb_reserve(skb, 2); /* 16 byte align the IP header */
-#if HAS_IP_COPYSUM
eth_copy_and_sum(skb, rx_skb->tail, pkt_len, 0);
skb_put(skb, pkt_len);
-#else
- memcpy(skb_put(skb, pkt_len),
- rx_skb->tail, pkt_len);
-#endif
pci_dma_sync_single_for_device(yp->pci_dev, desc->addr,
yp->rx_buf_sz,
PCI_DMA_FROMDEVICE);
next reply other threads:[~2004-05-25 19:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-25 19:11 Roger Luethi [this message]
2004-05-27 17:36 ` [PATCH 2.6] Nuke HAS_IP_COPYSUM for net drivers Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040525191115.GA18454@k3.hellgate.ch \
--to=rl@hellgate.ch \
--cc=akpm@osdl.org \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.