lkml.org 
[lkml]   [2002]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [realtek] System hang with heavy network traffic using rtl8139c
Hello, 

maybe I had a similar problem. In my case, the rtl8139 chip reports
a negative buffer size and a following dev_alloc_skb() crashed my system.
The problem was caused by receive buffer overruns that occur if the CPU is not fast
enough to fetch all data. Please check if you see rtl8139-realted kernel messages
during the test.
I reported this problem to the realtek list some time ago, but, as far as I know,
it is not included in the test version 1.18 until know.

Here is my patch of rtl8129_rx():

} else {
/* Malloc up new buffer, compatible with net-2e. */
/* Omit the four octet CRC from the length. */
struct sk_buff *skb;
int pkt_size = rx_size - 4;

+ if(pkt_size<0)
+ {
+ if (tp->msg_level & NETIF_MSG_DRV)
+ printk(KERN_ERR"%s: Impossible packet length.\n",dev->name);
+ tp->stats.rx_dropped++;
+ rtl_hw_start(dev);
+ break;
+ }
+
skb = dev_alloc_skb(pkt_size + 2);
if (skb == NULL) {

Additionally, I think it is a good idea to increase the receive buffer size to the maximum by setting
RX_BUF_LEN_IDX from 2 to 3.
If you read older messages of the realtek list, you can find additional driver changes that are maybe
helpfull for you.

Stephan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:27    [W:0.036 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site