Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

Handling incoming UDP packets

Altera_Forum
Honored Contributor II
794 Views

Is Software written on NIos Eclips have some speed limitation to handle incoming udp packets. 

 

i mean if server send continuous UDP packet (around 150 of size 1400 bytes) toward nios, will it receive all the packets without loosing any one of them. 

 

 

As i have design my C-Code on nios for receiving around 178 packet and sometime it receive less then that even though my server says it sends all the UDP packet (i have cheque this on wireshark). 

 

don't know where remaining UDP packet lost....is this is software issue , i am using packet memory too to hold incoming UDP packets. 

 

 

regards
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
87 Views

You will loose some packets at one point. 

The software TCP/Ip stack can only process a certain number of packets per second. If you send more than that, you will loose some. 

With the Interniche stack, the task actually receiving the UDP packet and putting it in a buffer has a higher priority than the application stack that processes the packet contents. So if you receive too many packets for the application to process, the stack will run out of buffers and you'll see "no free buffers for rx" (or something like that) messages in the console. Each time this message appears, you loose a packet. If you send packets even faster than the Interniche task can handle, then you'll fill up the SGDMA's hardware FIFO and will loose packets on the hardware level, without any messages on the console, as the software stack won't even see them.
Altera_Forum
Honored Contributor II
87 Views

Thanking you for informative reply 

 

And what is that number "certain number of packets per second" for NicheStack ? 

 

Can i have 1024 UDP packet of size 1024?
Altera_Forum
Honored Contributor II
87 Views

This number depends a lot on your system, the clock frequency, memory interface, CPU load etc... It's impossible to give a figure, you must run some tests. 

The total number of packets isn't really the problem, it's the number of packets per second that counts. You can receive 1024 UDP packets if you wait a bit between each one of them. If you send all of them in a big bunch you'll most probably loose some.
Reply