netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: e1000_clean_tx_ring
@ 2004-06-28 22:11 Venkatesan, Ganesh
  2004-06-29  8:08 ` e1000_clean_tx_ring David Greaves
  0 siblings, 1 reply; 3+ messages in thread
From: Venkatesan, Ganesh @ 2004-06-28 22:11 UTC (permalink / raw)
  To: Anton Blanchard, netdev; +Cc: cramerj, Ronciak, John

Anton:

We will integrate this patch into the next release of our driver.

Thanks,
ganesh 
 
-------------------------------------------------
Ganesh Venkatesan
Network/Storage Division, Hillsboro, OR

-----Original Message-----
From: Anton Blanchard [mailto:anton@samba.org] 
Sent: Thursday, June 24, 2004 4:23 PM
To: netdev@oss.sgi.com
Cc: cramerj; Ronciak, John; Venkatesan, Ganesh
Subject: e1000_clean_tx_ring


Hi,

I was looking over the e1000 driver and noticed what I think is a bug
in e1000_clean_tx_ring. We wouldnt call pci_unmap_page on tx ring
entries that didnt have ->skb filled, eg zero copy packets.

This is on latest 2.6 BK.

Anton

===== e1000_main.c 1.120 vs edited =====
--- 1.120/drivers/net/e1000/e1000_main.c	Sat Jun 19 10:00:00 2004
+++ edited/e1000_main.c	Thu Jun 24 02:16:42 2004
@@ -1070,14 +1070,19 @@
 
 	for(i = 0; i < tx_ring->count; i++) {
 		buffer_info = &tx_ring->buffer_info[i];
-		if(buffer_info->skb) {
+		if (buffer_info->dma) {
 
 			pci_unmap_page(pdev,
 			               buffer_info->dma,
 			               buffer_info->length,
 			               PCI_DMA_TODEVICE);
 
-			dev_kfree_skb(buffer_info->skb);
+			buffer_info->dma = NULL;
+		}
+
+		if (buffer_info->skb) {
+
+			dev_kfree_skb_any(buffer_info->skb);
 
 			buffer_info->skb = NULL;
 		}

^ permalink raw reply	[flat|nested] 3+ messages in thread
* e1000_clean_tx_ring
@ 2004-06-24 23:23 Anton Blanchard
  0 siblings, 0 replies; 3+ messages in thread
From: Anton Blanchard @ 2004-06-24 23:23 UTC (permalink / raw)
  To: netdev; +Cc: cramerj, john.ronciak, ganesh.venkatesan


Hi,

I was looking over the e1000 driver and noticed what I think is a bug
in e1000_clean_tx_ring. We wouldnt call pci_unmap_page on tx ring
entries that didnt have ->skb filled, eg zero copy packets.

This is on latest 2.6 BK.

Anton

===== e1000_main.c 1.120 vs edited =====
--- 1.120/drivers/net/e1000/e1000_main.c	Sat Jun 19 10:00:00 2004
+++ edited/e1000_main.c	Thu Jun 24 02:16:42 2004
@@ -1070,14 +1070,19 @@
 
 	for(i = 0; i < tx_ring->count; i++) {
 		buffer_info = &tx_ring->buffer_info[i];
-		if(buffer_info->skb) {
+		if (buffer_info->dma) {
 
 			pci_unmap_page(pdev,
 			               buffer_info->dma,
 			               buffer_info->length,
 			               PCI_DMA_TODEVICE);
 
-			dev_kfree_skb(buffer_info->skb);
+			buffer_info->dma = NULL;
+		}
+
+		if (buffer_info->skb) {
+
+			dev_kfree_skb_any(buffer_info->skb);
 
 			buffer_info->skb = NULL;
 		}

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-06-29  8:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-28 22:11 e1000_clean_tx_ring Venkatesan, Ganesh
2004-06-29  8:08 ` e1000_clean_tx_ring David Greaves
  -- strict thread matches above, loose matches on Subject: below --
2004-06-24 23:23 e1000_clean_tx_ring Anton Blanchard

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).