[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: Lwip UDP performance
From: |
Jeffery Du |
Subject: |
[lwip-users] Re: Lwip UDP performance |
Date: |
Mon, 27 Mar 2006 09:00:17 +0800 |
Aidan:
In my opinion, the bottleneck is in the HW and the ethernet driver.
You use lan91c111, right? As I know, it can't afford a high throughtput like
60Mbps. Or to say, it has exceeded its limit. But maybe you can remind the
ethernet driver of lan91c111 to improve the performance. In this case, you
should enlarge the rx fifo size to a maximum value and process the ISR of
lan91c111 as soon as possible.
In addtion you can close UDP checksum by define CHECKSUM_GEN_UDP to 0 in
lwipopt.h.
>Hi,
>I'm using the raw api (single threaded) on a Nios2 processor running at 50 Mhz.
>I'm having trouble getting lwip to process udp packets at a high enough rate.
>I'm sending udp packets to the nios2 in bursts of 16+ packets (~600 bytes) at
>~60Mbps, then leaving a break of ~40ms. The 60 Mbps is probably a bit too fast,
>but I would have thought that the 40ms break would give it enough time to catch
>up if the buffer was of a sufficient size. I've got the following in lwipopts.h
>and I've tried increasing them with no effect:
>
>#define MEM_SIZE 64*1024
>#define MEMP_NUM_PBUF 16
>
>#define PBUF_POOL_SIZE 32
>#define PBUF_POOL_BUFSIZE 1536
>#define PBUF_LINK_HLEN 16
>
>(I've included my lwipopts.h file in case it helps)
>
>The behaviour I've observed is that the first 4 packets of each burst get
>processed just fine, but only a few of the remaining packets get through.
>Currently to test performance, my application increments a counter when it
>gets a
>udp packet and that's pretty much all it does, so it shouldn't be slowing it
>down
>from that end.
>
>So a few questions:
>* What kind of performance can I expect? What kind of peak performance?
>
>* Should lwip be able to handle 60Mbps bursts of data?
>
>* Is lwip polled or interrupt driven. I've had a look at the code and looks
>like
>it's a bit of both... (I call lan91c111if_service(&netif); from main, the
>function is part of the driver provided for nios2.)
>
>* Does lwip do buffer copying or is the data passed up through the stack using
>pointers?
>
>* Is there an option to disable the udp checksum check? Or is it a case of
>modifying the code?
>
>* Any suggestions on how to get maximum udp performance?
>
>
>Any feedback welcome.
>
>Thanks,
>
>
>Aidan
= = = = = = = = = = = = = = = = = = = =
Best regards
Jeffery Du
2006-03-27
- [lwip-users] Re: Lwip UDP performance,
Jeffery Du <=