cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ebaser
Visitor
Visitor
216 Views
Registered: ‎04-02-2021

LWIP Send Buffer Fills and Tcp_Write Returns Error

Hello,

I'm using LwIP Raw API on Zynq 7020 SoC with my board Eclypse Z7 on the server side. I also have a data logger on pc side to receive the data. 

I modified the tcp echo and txperf codes provided by Xilinx. As I send packets using tcp_write, tcp_sndbuf() size becomes smaller(sometimes it decreases as much as the data size I'm trying to send, sometimes lesser than that).

Also, while printing the counter on the python client code, even after snd_buffer fills up, it continue to receive for a few seconds more.

Things I've tried so far are:

1) Changed lwip parameters like tcp_wnd tcp_mss tcp_send_buf but none of them helped.

2) Added usleep to main while loop with values between 100us to 1sec  to see if the receiving end can not catch the rate of transmission. Unfortunately, this didnt also work. 

3) Tried matlab and c code in client side rather than python to see, but the results were same.

4) I was mainly sending my ADC data, so I removed it and added  constant buffer of 1024 bytes of zeros to see if it stalls the program, but again the same result.

5) There is a DMA with Interrupt enabled, I also removed it but there is no change. 

I'm trying to deal with this issue since last week, any help&advice is appreciated. Please.

Thanks in advance.

Tags (2)
2.jpg
4.jpg
3.jpg
1.jpg
5.jpg
0 Kudos
2 Replies
nanz
Moderator
Moderator
189 Views
Registered: ‎08-25-2009

Hi @ebaser ,

LWIP is an open source which Xilinx packaged it up as a library for ease of use by our customers. 

I'd recommend going on the lwip forum to ask for recommendations. 


-------------------------------------------------------------------------------------------

Don’t forget to reply, kudo, and accept as solution.

If starting with Versal take a look at our Versal Design Process Hub and our Versal Blogs and our Versal Ethernet Sticky Note.

-------------------------------------------------------------------------------------------
0 Kudos
ebaser
Visitor
Visitor
180 Views
Registered: ‎04-02-2021

Hi @nanz,

I tried to post a topic on lwip forums but it is required to get a permission unfortunately. I saw lots of lwip related questions in Xilinx forum, so I wanted to try my chance here.

Thanks.