Ticket #36094

XON/XOFF hardcoded limits too high

Eröffnet am: 2016-03-04 01:31 Letztes Update: 2019-06-04 02:47

Auswertung:
(Anonym)
Verantwortlicher:
(Keine)
Typ:
Status:
Offen
Komponente:
(Keine)
Meilenstein:
(Keine)
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Keine
Datei:
Keine
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Details

XON/XOFF limits are currently set to 2048 bytes. This number is too high. The software flow control numbers are set from the ends of the buffer, and most UART buffers are much smaller than 2048. This causes poor performance in software flow control mode because the UART would send XON/XOFF constantly.

https://osdn.jp/projects/ttssh2/scm/svn/blobs/head/trunk/teraterm/teraterm/commlib.c lines 81/82.

Recommend changing XON/XOFF hardcoded limits to 128/128.

Prefer adding user-setting for XON/XOFF limits to configuration window.

Thank you.

Ticket-Verlauf (3/4 Historien)

2016-03-04 01:31 Aktualisiert von: None
  • New Ticket "XON/XOFF hardcoded limits too high" created
2016-03-04 01:33 Aktualisiert von: None
Kommentar
2016-03-17 21:47 Aktualisiert von: (del#1144)
Kommentar

Thank you for your report.

Where can we confirm that 128 is recommended bytes of these limits?

2019-06-04 02:47 Aktualisiert von: None
Kommentar

https://www.silabs.com/documents/public/data-sheets/cp2102n-datasheet.pdf

4.3.8 Software Handshaking

The CP2102N also supports software handshaking using the XON and XOFF event characters. The characters used for XON/XOFF is set by the host software. If the CP2102N receives an XOFF request, it will stop transmission, even if the CP2102N receiver needs to transmit an XOFF over UART. This can potentially allow an overflow to occur or a deadlock condition if both the CP2102N and the connected UART device transmit XOFF at the same time. The XOFF_CONTINUE setting allows the CP2102N transmitter to send XOFF/XON requests even if it has received an XOFF request from the connected UART device. Once the connected UART device transmits XON, normal transmission from the CP2102N resumes. Software handshaking uses the same watermark levels as hardware handshaking and can be configured dynamically by host software. Watermark levels greater than 512 are converted to an XON limit of 192 bytes and an XOFF limit of 64 bytes. If the XON limit crosses over the XOFF limit, the XON limit will automatically be modified to not cross over the XOFF limit. An XOFF limit of 0 is converted to 64 to guarantee buffer space is available until the UART end device stops transmission. When setting the XON and XOFF limits, it's recommended to use values where the XON limit added to the XOFF limit is less than 512 bytes, like 192/192 or 128/128. CP2102N testing shows that the XON limit set to 192 and XOFF limit set to 192 provides optimal software flow control behavior.

Dateianhangliste

Keine Anhänge

Bearbeiten

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Anmelden