Is W5300 capable of back-to-back transmission?


#1

Hi,

I’m evaluating W5300 for a project of high performance data transmission, however I’m failing to understand how W5300 would be used to ensure maximum bandwidth (like minimum or no gap between packets).

I understand that I need to check the free space (TX_FSR) before loading data to FIFO. That’s fine, suppose I have 64KB assigned to this socket. So after loading up to 64KB to TX_FIFOR I would do a SEND command.

Documentation says that I must wait for SENDOK before being able to do another SEND (“In order to send the next data, it should be checked if previous SEND command is completed. If the next SEND command is performed before previous one is not completed, it can cause any error”)

However SENDOK is said to depend on ACK receiving (“If DATA packet is successfully transmitted to the peer by SEND (when DATA/ACK packet is received from the peer), Sn_TX_FSR is increased by the size of transmitting DATA packet.”)

So, unless I got something wrong, the sequence seems to be:

  1. After SEND command, W5300 will start transmitting TX buffered bytes.
  2. We must wait the last buffered byte to reach the other end, and then confirmation (ACK) to return. => 1 round-trip-time.
  3. SENDOK so now we may return to step 1 for another SEND.

What puzzles me is that during step 2 (~RTT) the transmission would be stalled, is that right?

Suppose I have 2 ms of RTT. 64KB/10e6 = 6.4 ms. So maximum theoretical throughput would be 6.4/(6.4+2) ~ 76%?

However if TX buffers allow me some sort of double buffering (does it start sending before the SEND command is used?) I would then use 2x32KB packets instead of 1x64KB to achieved better performance. That is:

  1. SEND (32 KB) ~ 3.2ms
  2. SEND (32 KB) ~ 3.2ms, but in 2 ms it will receive ack from (1)
  3. Since SENDOK is already high (ack was received during 2) we may go directly to (1) again.

May you clarify which of the above scenarios is correct?


#2

Hi,

You misunderstand about ‘SENDOK’

When W5300 performed send command completely internaly, SENDOK is ‘1’.

Not receiving ACK packet.

  1. Packet 1 SEND
  2. SENDOK == 1
  3. Packet 2 SEND
  4. SENDOK == 1
  5. ACK packet of packet 1 is received
  6. Sn_TX_FSR is increased about packet 1 size.
  7. ACK packet of packet 2 is received
  8. Sn_TX_FSR is increased about packet 2 size.

Best regards.


W5300 SENDOK and Reserved Status Byte
#3

Thank you hjjeon0608!

it makes sense now :slight_smile: