01-04-2019 01:20 AM
Hi, I'm writing some code on the Zynq which interfaces with a server. I have the same code on a PC. They both connect to the server, sign in, get work and process it. These packets are only 500 bytes or less up to this point. So I'm very happy with all that, no faults.
The submitting of completed work is around 2800 bytes. The PC works gets accepted, but going the same in the Zynq I get no response. Perhaps my completed work is incorrect, however I have checked this so much, and believe it to be correct. So I have been looking for any differences in the packets, and capturing with wire-shark.
Capturing the Packets from the PC shown below. Sends the 2832 bytes over two packets. The two packets are sent close together, and get an ACK back.
Now on the Zynq, things are slightly different. Its sending 2830 bytes, this is correct as my username is 2 characters less. Although the packet is split at 1500 instead of 1514, the total bytes of the two packets is correct. Look at the gap between the two packets though, 2 seconds, in that time there has been a response from the server.
Trying to find differences, I noticed that in the header packets of the PC, the flag for Do Not Fragment is set.
This is not set on the packets from Zynq. I dont know if this is having an effect, but would like to try setting this flag. Is it possible in the LWIP? I have tried looking in the config of the core, and the ip_frag is set by default.
My base code came from the TCP_Client, sending using the following
u8_t apiflags = TCP_WRITE_FLAG_COPY | TCP_WRITE_FLAG_MORE;
err = tcp_write(c_pcb, submit_string_to_send, 2830, apiflags);
There seems to be a few differences in the first screen shots of the packets, the PC's second part of the packet had the 'PUSH' flag set, this dosn't happen in the Zynq. This may not be an issue. All I know is the processed work gets no text response when sent from the zynq, so there must be a difference somewhere effecting this, so I'm trying to make it perform like the PC version.
Can someone steer me in the right direction of where and what config settings to try?
01-04-2019 02:32 AM
01-05-2019 12:33 PM
Okay made the code more basic, sending the 2830 packets every few seconds. Looking at it in Wireshark. Connected on 1 Gb Ethernet to a local machine. There is a gap of 41ms between the two parts of the fragmented packet. Is this normal?
Time to send 1500 bytes at 1Gb would be around 0.015ms. So would only contribute to less than 1 ms of that 41ms.
I'll do some more digging.
01-13-2019 11:59 AM
Okay all sorted now., Using this line of code
I now have no delay between the packets. :)