* help: FCC_ENET OF MPC8250?
@ 2005-07-13 2:42 gqbenjamin
2005-07-13 9:03 ` Alex Zeffertt
0 siblings, 1 reply; 2+ messages in thread
From: gqbenjamin @ 2005-07-13 2:42 UTC (permalink / raw)
To: linuxppc-embedded
Hi,
I use a device, like SMARTBITS, to test the Ethernet rate of mpc8250. The kernel is linux-2.4.20 with CONFIG_FCC_LXT971 and CONFIG_USE_MDIO, and do 'cat "1">/proc/sys/net/ipv4/ip_forward'.
If the rate of sending IP packet been set too high, for example 100 Mbps Full Duplex and each packet is 1514 Bytes. Later, the kernel print '... Memory squeeze, dropping packet' on uart. Stop sending IP packet and do 'cat /proc/meminfo', the *MemFree* become small.
Try again, the *MemFree* become smaller, just look like some allocated memory (skbuf) do not be free.
Final, the kernel break down, because all memory have been used.
Q. How can I do to let kernel do not break down? Is it a kernel promblem?
PS:
I use linux-2.6.5 on mpc8250 for the same test, and get the same result.
I change some code in file skbuff.c, use a memory pool that I created instead of allocating *skb* from *MemFree*, and do the same test. Final, the kernel can not transmit any IP packet, beacuse all space in the pool been used, but do not break down.
Thanks for your reading.
e-mail: gqben@sina.com gqbenjamin@163.com gqbenjamin@21cn.com
----------------------------------------------
vgoÌåÑé×ÀÃæ¿ì¸Ð£¬ÏíÊÜ¿íÆµÀÖȤ£¡
http://vgo.21cn.com
µãÕâÀïÃâ·ÑÌåÑé·¢ËÍ4G´ó¸½¼þ
http://mail.21cn.com/huodong/0504/mail/
²ÊÆÁÊÖ»ú°×ËÍÀ²!¸Ï¿ìÀ´ÄÃ!
http://qipai.g.21cn.com
Öǻ۴óÌôÕ½¾ÍÔڵͼ۶ᱦ
http://super.21cn.com/
ÌåÑéÁíÀàÔ¼»á£¬¸ÐÊܱðÑùÀËÂþ
http://y.21cn.com/club/
СÁéͨ¶ÌÐÅÖÐÐÄ£¬¶ÌÐÅ÷ÈÁ¦ÎÞ¼«
http://pas.21cn.com/
È«ÄÜÁÄ2005°æÉÁÁÁµÇ³¡£¡
http://callme.21cn.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: help: FCC_ENET OF MPC8250?
2005-07-13 2:42 help: FCC_ENET OF MPC8250? gqbenjamin
@ 2005-07-13 9:03 ` Alex Zeffertt
0 siblings, 0 replies; 2+ messages in thread
From: Alex Zeffertt @ 2005-07-13 9:03 UTC (permalink / raw)
To: gqbenjamin; +Cc: linuxppc-embedded
On Wed, 13 Jul 2005 10:42:52 +0800 (CST)
gqbenjamin@21cn.com wrote:
> Hi,
>
> I use a device, like SMARTBITS, to test the Ethernet rate of mpc8250. The kernel is linux-2.4.20
> with CONFIG_FCC_LXT971 and CONFIG_USE_MDIO, and do 'cat "1">/proc/sys/net/ipv4/ip_forward'.
>
> If the rate of sending IP packet been set too high, for example 100 Mbps Full Duplex and each
> packet is 1514 Bytes. Later, the kernel print '... Memory squeeze, dropping packet' on uart. Stop
> sending IP packet and do 'cat /proc/meminfo', the *MemFree* become small.
>
> Try again, the *MemFree* become smaller, just look like some allocated memory (skbuf) do not be
> free.
>
> Final, the kernel break down, because all memory have been used.
It sounds to me like the problem may be that fcc_enet_rx() is consuming all the memory. This
function is called in interrupt context and spins round the rx buffer descriptor ring until it finds
an empty buffer descriptor. There is no check to stop it going round more than once and each time
it finds a BD it does a dev_alloc_skb().
It is possible that you are receiving data at a high enough rate that fcc_enet_rx() never exits.
What is more likely is that there isn't enough time between rx interrupts for the CPU to tx all the
queued packets.
>
> Q. How can I do to let kernel do not break down? Is it a kernel promblem?
>
This is just a guess, but... it may help to move fcc_enet_rx() from the interrupt handler to a
bottom half. If you do this you should also ensure that it cannot process the rx buffer descriptor
ring more than once per call. This may give the CPU *more* chance to tx queued packets by lowering
the rx priority a little.
I don't know if this would work but I'd be interested to find out.
Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-07-13 9:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-13 2:42 help: FCC_ENET OF MPC8250? gqbenjamin
2005-07-13 9:03 ` Alex Zeffertt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox