Jan Kiszka wrote:
> Jan Kiszka wrote:
>> Lauener Nathan wrote:
>>> Our adminstrators have obviously changed our email address. Here is the
>>> posting once more, from a new address. Sorry, if anyone should receive
>>> it twice. 
>>>
>>> ---------
>>>
>>> Hi,
>>>
>>> after switching to a new linux box I now have high latency on
>>> rt_dev_recvmsg(). Instead of approximately 20us I now measure up to 1ms!
>>> I use the same network card which uses the rt_natsemi driver. The
>>> software is the same, only compiled it on the new box. The
>>> Ethernet-package sent by the controller is immediately sent back by the
>>> receiver. The response time according to our network sniffer is about 10
>>> us, so there should be something to read. Introducing a sleep of 100us
>>> before reading didn't help. I also have debug symbols in the kernel log,
>>> looks like a trace. Maybe the logging causes the latency, but I could
>>> not turn the logging off, no  matter what options or versions of the
>>> kernel, xenomai or rtnet that I tried. Here is a short printout of the
>>> log.
>> The latency might be related to the BUG printing. The BUG itself is
>> already a problem that demands to be looked at.
> 
> Looks like a bug of rt_natsemi (dma mapping of rx buffers with wrong
> size). Will come up with a patch soon.
> 

Here we go: please try attached patch or, alternatively, SVN head.
Should solve it.

Thanks for reporting,
Jan
Index: drivers/rt_natsemi.c
===================================================================
--- drivers/rt_natsemi.c        (revision 1050)
+++ drivers/rt_natsemi.c        (working copy)
@@ -1556,7 +1556,7 @@ static void refill_rx(struct rtnet_devic
                                break; /* Better luck next round. */
                        skb->rtdev = dev; /* Mark as being used by this device. 
*/
                        np->rx_dma[entry] = pci_map_single(np->pci_dev,
-                               skb->data, skb->len, PCI_DMA_FROMDEVICE);
+                               skb->data, np->rx_buf_sz, PCI_DMA_FROMDEVICE);
                        np->rx_ring[entry].addr = 
cpu_to_le32(np->rx_dma[entry]);
                }
                np->rx_ring[entry].cmd_status = cpu_to_le32(np->rx_buf_sz);

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to