Skip to contentSkip to conversation

Strange network timeouts w/ e100

Bug #14057 Walt Holman 4 participants 7 messages Aug 26, 2009 – Sep 6, 2009 1 message not in the archive Network drivers

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 9 lines · ----- "Rafael J. Wysocki

This message has been generated automatically as a part of a report of recent regressions.

The following bug entry is on the current list of known regressions from 2.6.30. Please verify if it still should be listed and let me know
(either way).

Quoted 6 lines

Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=14057
Subject : Strange network timeouts w/ e100
Submitter : Walt Holman <[email protected]>
Date : 2009-08-20 0:21 (6 days old)
References : http://marc.info/?l=linux-kernel&m=125072831831443&w=4

Hi Rafael,

Krzysztof has a patch which has corrected this issue for me. Thanks,

-Walt

#2 lore raw
Quoted 12 lines · Walt Holman
Quoted 9 lines · ----- "Rafael J. Wysocki

This message has been generated automatically as a part of a report of recent regressions.

The following bug entry is on the current list of known regressions from 2.6.30. Please verify if it still should be listed and let me know
(either way).

Quoted 8 lines
Quoted 6 lines

Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=14057
Subject : Strange network timeouts w/ e100
Submitter : Walt Holman <[email protected]>
Date : 2009-08-20 0:21 (6 days old)
References : http://marc.info/?l=linux-kernel&m=125072831831443&w=4

Hi Rafael,

Hi,

Quoted 1 line

Krzysztof has a patch which has corrected this issue for me. Thanks,

Thanks for the update.

Do you have a pointer to the patch, please?

Rafael

#3 lore raw
Quoted 28 lines · ----- "Rafael J. Wysocki
Quoted 4 lines · Walt Holman
Quoted 1 line · ----- "Rafael J. Wysocki

This message has been generated automatically as a part of a

report

Quoted 3 lines
Quoted 3 lines

of recent regressions.

The following bug entry is on the current list of known

regressions

Quoted 1 line
Quoted 1 line

from 2.6.30. Please verify if it still should be listed and let

me

Quoted 9 lines
Quoted 9 lines

know
(either way).

Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=14057
Subject : Strange network timeouts w/ e100
Submitter : Walt Holman <walt-Wo+ox+avW/[email protected]>
Date : 2009-08-20 0:21 (6 days old)
References :

http://marc.info/?l=linux-kernel&m=125072831831443&w=4

Quoted 3 lines
Quoted 1 line

Hi Rafael,

Hi,

Quoted 8 lines
Quoted 1 line

Krzysztof has a patch which has corrected this issue for me.

Thanks,

Thanks for the update.

Do you have a pointer to the patch, please?

Rafael

Yes, it's referenced in:

http://marc.info/?l=linux-netdev&m=125104144706982&w=2

Which was for 2.6.30.5 The same patch still applies on 2.6.31-rc7 with offset and that's actually where I tested it. That resolved the timeouts for me. I believe Krzysztof was going to get a patch in to -stable as well as for .31-rc before final.

-Walt

maintainer
#4 lore raw
In reply to Rafael J. Wysocki

From: "Rafael J. Wysocki" <[email protected]>
Date: Wed, 26 Aug 2009 23:12:03 +0200

Quoted 5 lines
Quoted 1 line

Krzysztof has a patch which has corrected this issue for me. Thanks,

Thanks for the update.

Do you have a pointer to the patch, please?

commit 6ff9c2e7fa8ca63a575792534b63c5092099c286

Author: Krzysztof Hałasa <[email protected]>
Date:   Sun Aug 23 19:02:13 2009 -0700

E100: fix interaction with swiotlb on X86.

E100 places it's RX packet descriptors inside skb->data and uses them with bidirectional streaming DMA mapping. Data in descriptors is accessed simultaneously by the chip (writing status and size when a packet is received) and CPU (reading to check if the packet was received). This isn't a valid usage of PCI DMA API, which requires use of the coherent (consistent) memory for such purpose. Unfortunately e100 chips working in "simplified" RX mode have to store received data directly after the descriptor. Fixing the driver to conform to the API would require using unsupported "flexible" RX mode or receiving data into a coherent memory and using CPU to copy it to network buffers.

This patch, while not yet making the driver conform to the PCI DMA API, allows it to work correctly on X86 with swiotlb (while not breaking other architectures).

drivers/net/e100.c +1 -1
index 41b648a..3a6735d 100644
@@ -1899,7 +1899,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
 				nic->ru_running = RU_SUSPENDED;
 		pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr,
 					       sizeof(struct rfd),
-					       PCI_DMA_BIDIRECTIONAL);
+					       PCI_DMA_FROMDEVICE);
 		return -ENODATA;
 	}
 

���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m���� ������?�I�

#5 lore raw
Quoted 38 lines · David Miller

From: "Rafael J. Wysocki" <[email protected]>
Date: Wed, 26 Aug 2009 23:12:03 +0200

Quoted 5 lines
Quoted 1 line

Krzysztof has a patch which has corrected this issue for me. Thanks,

Thanks for the update.

Do you have a pointer to the patch, please?

commit 6ff9c2e7fa8ca63a575792534b63c5092099c286

Author: Krzysztof Hałasa <[email protected]>
Date:   Sun Aug 23 19:02:13 2009 -0700

E100: fix interaction with swiotlb on X86.

E100 places it's RX packet descriptors inside skb->data and uses them with bidirectional streaming DMA mapping. Data in descriptors is accessed simultaneously by the chip (writing status and size when a packet is received) and CPU (reading to check if the packet was received). This isn't a valid usage of PCI DMA API, which requires use of the coherent (consistent) memory for such purpose. Unfortunately e100 chips working in "simplified" RX mode have to store received data directly after the descriptor. Fixing the driver to conform to the API would require using unsupported "flexible" RX mode or receiving data into a coherent memory and using CPU to copy it to network buffers.

This patch, while not yet making the driver conform to the PCI DMA API, allows it to work correctly on X86 with swiotlb (while not breaking other architectures).

drivers/net/e100.c +0 -0
index 41b648a..3a6735d 100644

drivers/net/e100.c static int e100_rx_indicate(struct nic *nic, struct rx *rx, · line 1904

Quoted 7 lines
drivers/net/e100.c +1 -1
@@ -1899,7 +1899,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
 				nic->ru_running = RU_SUSPENDED;
 		pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr,
 					       sizeof(struct rfd),
-					       PCI_DMA_BIDIRECTIONAL);
+					       PCI_DMA_FROMDEVICE);
 		return -ENODATA;
 	}

Thanks a lot, bug closed.

Rafael

#6 lore raw
In reply to David Miller
Quoted 7 lines · David Miller

From: "Rafael J. Wysocki" <[email protected]>
Date: Wed, 26 Aug 2009 23:12:03 +0200

Quoted 4 lines
Quoted 1 line

Krzysztof has a patch which has corrected this issue for me. Thanks,

Thanks for the update.

Quoted 7 lines
Quoted 1 line

Do you have a pointer to the patch, please?

commit 6ff9c2e7fa8ca63a575792534b63c5092099c286

Author: Krzysztof Hałasa <khc-9GfyWEdoJtJmR6Xm/[email protected]>
Date:   Sun Aug 23 19:02:13 2009 -0700

E100: fix interaction with swiotlb on X86.

This fixes 303d67c2 which has been included in at least the 2.6.27.29 and 2.6.30.5 stable releases so I think this should be a candidate for those stable branches too.

Ian.

Quoted 33 lines

E100 places it's RX packet descriptors inside skb->data and uses them with bidirectional streaming DMA mapping. Data in descriptors is accessed simultaneously by the chip (writing status and size when a packet is received) and CPU (reading to check if the packet was received). This isn't a valid usage of PCI DMA API, which requires use of the coherent (consistent) memory for such purpose. Unfortunately e100 chips working in "simplified" RX mode have to store received data directly after the descriptor. Fixing the driver to conform to the API would require using unsupported "flexible" RX mode or receiving data into a coherent memory and using CPU to copy it to network buffers.

This patch, while not yet making the driver conform to the PCI DMA API, allows it to work correctly on X86 with swiotlb (while not breaking other architectures).

drivers/net/e100.c +1 -1
index 41b648a..3a6735d 100644
@@ -1899,7 +1899,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
 				nic->ru_running = RU_SUSPENDED;
 		pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr,
 					       sizeof(struct rfd),
-					       PCI_DMA_BIDIRECTIONAL);
+					       PCI_DMA_FROMDEVICE);
 		return -ENODATA;
 	}
 

NrybXǧv^)޺{.n+{zXܨ}Ơz&j:+vzZ++zfh~izw?&)ߢf^jǫym@Aa0hi

Signature · 7 lines
Ian Campbell

Q:	Why did the chicken cross the road?
A:	To see his friend Gregory peck.

Q:	Why did the chicken cross the playground?
A:	To get to the other slide.
maintainer
#7 lore raw

From: Ian Campbell <[email protected]>
Date: Sun, 06 Sep 2009 12:22:58 +0100

Quoted 14 lines · David Miller
Quoted 13 lines

From: "Rafael J. Wysocki" <[email protected]>
Date: Wed, 26 Aug 2009 23:12:03 +0200

Quoted 5 lines
Quoted 1 line

Krzysztof has a patch which has corrected this issue for me. Thanks,

Thanks for the update.

Do you have a pointer to the patch, please?

commit 6ff9c2e7fa8ca63a575792534b63c5092099c286

Author: Krzysztof Hałasa <[email protected]>
Date:   Sun Aug 23 19:02:13 2009 -0700
Quoted 5 lines
Quoted 1 line

E100: fix interaction with swiotlb on X86.

This fixes 303d67c2 which has been included in at least the 2.6.27.29 and 2.6.30.5 stable releases so I think this should be a candidate for those stable branches too.

Absolutely, I'll take care of this.

���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m���� ������?�I�