FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6359 Discussions

no free buffers for rx

Altera_Forum
Honored Contributor II
5,892 Views

Hello  

How do i increase the receive buffer size.... 

till now i have done following... 

 

1. increase the receive Depth of TSE Mac... 

2. Increase the MAXBIGPKTS from 30 to 512 in "ipport.h" 

3. Increase the NUMBIGBUFS in "ipport.h" from 30 to 512 

4. putting .heap and .stack in different memory region 

 

but till now there is no success. 

i have a image server who sends 512 UDP packet of size 512....on another end nios based receiver is running his job is to collect all these UDP packet in either internal or external memory...and send serieally to other cyclone device for further processing... 

 

currently i am able to receive 4 UDP packets of size 512...not more then that.. 

 

 

regards 

 

kaushal
0 Kudos
52 Replies
Altera_Forum
Honored Contributor II
584 Views

Dear Friends, 

 

udp offload design too gives same error "No Free Buffer for Rx" 

 

kaushal
0 Kudos
Altera_Forum
Honored Contributor II
584 Views

If you use the offload example, you need to use the dedicated hardware to handle your high bandwidth traffic. If you use the TCP/IP stack then you will have the same problem.

0 Kudos
Altera_Forum
Honored Contributor II
584 Views

If the packets are not forwarded to hardware, then they're forwarded to stack. This means that You're using wrong IP or wrong port for data transmission.

0 Kudos
Altera_Forum
Honored Contributor II
584 Views

 

--- Quote Start ---  

If the packets are not forwarded to hardware, then they're forwarded to stack. This means that You're using wrong IP or wrong port for data transmission. 

--- Quote End ---  

 

 

I am assigning port no: 8 and IP address 192.168.1.207 for nios-ii board 

wheras the server machine who is sending high speed UDP packet having port no :9 and IP address: 192.168.1.66 its an Linux Fedora-5 machine. 

 

* as i have already mentioned in my previous post: when i send slow UDP packets towards nios-ii based client (by putting smoll delay between consequential packet send) it collect all packet without saying "no free buffer for rx".
0 Kudos
Altera_Forum
Honored Contributor II
584 Views

 

--- Quote Start ---  

If you use the offload example, you need to use the dedicated hardware to handle your high bandwidth traffic. If you use the TCP/IP stack then you will have the same problem. 

--- Quote End ---  

 

 

hardware which download from alterawiki  

"http://www.alterawiki.com/wiki/Nios_II_UDP_Offload_Example

probably dedicated hardware for this. 

 

regards 

kaushal
0 Kudos
Altera_Forum
Honored Contributor II
584 Views

 

--- Quote Start ---  

I am assigning port no: 8 and IP address 192.168.1.207 for nios-ii board 

wheras the server machine who is sending high speed UDP packet having port no :9 and IP address: 192.168.1.66 its an Linux Fedora-5 machine. 

 

--- Quote End ---  

 

I doubt these IP addresses are correct, because manual clearly says, that the IP is settable only using SW0 on the board. If You're changing IP of the TCP/IP stack, then You totally don't understand how this hardware offload works. The packets are not moved to TCP/IP stack if they're offloaded in hardware, so the IP/port checking is done BEFORE the TCP/IP stack. I am not sure if it checks for particular IP, but I am sure it checks for correct port. 

 

 

--- Quote Start ---  

 

* as i have already mentioned in my previous post: when i send slow UDP packets towards nios-ii based client (by putting smoll delay between consequential packet send) it collect all packet without saying "no free buffer for rx". 

--- Quote End ---  

 

 

Exactly what I am saying: if You send slow stream, then TCP/IP stack is fast enough to process all the packets. If the stream is fast - it isn't and buffers get filled.
0 Kudos
Altera_Forum
Honored Contributor II
584 Views

 

--- Quote Start ---  

hardware which download from alterawiki  

"http://www.alterawiki.com/wiki/Nios_II_UDP_Offload_Example

probably dedicated hardware for this. 

 

regards 

kaushal 

--- Quote End ---  

 

Yes, but did you configure the offload hardware to process the specific packets that you send? You should never get the "No free buffer for rx" message because the TCP/IP stack should never see those packets.
0 Kudos
Altera_Forum
Honored Contributor II
584 Views

Hello There, 

 

Problem is sorted out , if we make bigger UDP packet then we have less number of recivefrom call, and thus processor have enough time to handle incoming UDP packet.  

 

please go through AN440 (Very Gud App. Note) 

 

Thanking you all for your time and support. 

 

regards 

 

kaushal
0 Kudos
Altera_Forum
Honored Contributor II
584 Views

Hi everyone, 

I have TSE MAC at my custom board and RGMII interface between custom board and PC. 

Mode of communication established between custom board and PC is 100 Mbps half duplex. 

I made my custom board as Client and PC as Server. 

Using TCP sockets. 

I am sending data continuously ranging from 8 bytes to 424 bytes of data depending on my application from my custom board to a PC. Sometimes I send 4 bytes of data from PC to Custom board for configuration of my application. 

Problem is that my NIOS II system does't responds sometimes and Communication ends between custom board and PC. 

 

I have kept descriptor memory size of 8192 bytes in SOPC Builder. I haven't change anything in ipport.h 

 

What might be the problem and solution to it ?????
0 Kudos
Altera_Forum
Honored Contributor II
584 Views

You should start another thread, it's a different problem. 

What protocol are you using? If you are using UDP, then it isn't guaranteed that the packet will be delivered. To control and configure it is better to use TCP, so that you are sure the data is sent and received. You may have to use an additional function call on the sending side to force the 4 bytes to be sent immediately and not kept in a buffer though.
0 Kudos
Altera_Forum
Honored Contributor II
584 Views

Thanks for the reply. 

 

I am already using TCP. 

Well I have increased FIFO depth in TSE, now I am able to send and receive without any problem.
0 Kudos
Reply