SiTCPに関する情報を共有するためのフォーラムです。この目的に反しない範囲で、質問、コメント、回答などご自由にご投稿ください。
This forum is for sharing information about SiTCP. Please do not hesitate to post any questions, comments or answers within the scope of this purpose.

SiTCPのデータフロー / Is there any data flow control protocol in SiTCP?

Date 2021/04/22
Gu
we use SiTCP to transmit data in our system and thank you for your support.

However, I have some questions about the SiTCP core. Is there any data flow control protocol in SiTCP?
Can SiTCP control the data transmission according to the state of the network?
Will SiTCP core control the data flow according to the arrival time of ACK from PC?


SiTCPを使用しており、質問がいくつかあります。
SiTCPにデータフロー制御プロトコルはありますか?
SiTCPはネットワークの状態に応じてデータ転送を制御できますか?
SiTCPコアはPCからのACKの到着時間に従ってデータフローを制御しますか?

Comments

  • edited April 2021

    Date: Thu, 22 Apr 2021 14:46:08 +0900
    ASAI

    Control is performed by the exchanged window size and ACK.
    Congestion control is not implemented, which can significantly reduce forwarding performance in congested networks.
    But even in this case, there is no data loss.


    交換されたウインドウサイズとACKでの制御は行います。
    輻輳制御は実装されていないので、輻輳が発生するネットワークでは
    著しく転送性能が低下する可能性があります。
    この場合でも、データの損失は発生しません。

  • edited April 2021

    Date: Thu, 22 Apr 2021 18:47
    Gu,

    In our system, the data transmission lantency will increase when the network state is bad.
    The increasement seems to be caused by the retransmission of the data and the retransmission make the state of the network worse.
    As a result,the lantency time will continuedly increase.
    I wonder if there is any configuration can be made to the SiTCP core to solve the problem.


    私たちのシステムでは、ネットワークの状態が悪いとデータ転送の待ち時間が長くなります。
    この増加はデータの再送信が原因であると思われ、再送信によってネットワークの状態が悪化します。
    その結果、待ち時間は継続的に増加します。
    この問題を解決するために、SiTCPコアに何らかの構成を行うことができるのだろうか。

  • edited April 2021

    Date: Fri, 23 Apr 2021 11:32:18 +0900
    ASAI,

    SiTCP specializes in acquiring data at high speed.
    Therefore, a network that does not cause congestion is a prerequisite.
    There is also a method of avoiding congestion by using PAUSE (IEEE802.3X),
    but the effect cannot be expected unless the entire network including the PC is controlled.

    The PAUSE function of SiTCP is valid only for transmission.
    SiTCP is enabled by setting bit3 of 0xFFFFFF10 to 1,
    but the link partner will not output PAUSE frames unless PUSE is enabled in the negotiation with the link partner.
    After enabling bits 10 and 11 of AUTO NEGOTIATION ADVERTISEMENT REGISTER of PHY,
    execute the negotiation again.
    (Set bit9 of BASIC CONTROL REGISTER to 1.)

    If GMII_MDC, GMII_MDIO_IN, GMII_MDIO_OUT, GMII_MDIO_OE are connected correctly and PHY_ADDR is set correctly,
    the PHY registers will be mapped to 0xFFFFFE00 to 0xFFFFFEFF in the RBCP register.
    Note that the PHY register addressing is in 16-bit units and the RBCP is 8 bits, so the RBCP address is doubled.

    Also, when PAUSE is enabled at the initial value of 0xFFFFFF10 (0xFFFFFC10),
    the initial setting is "Both Symmetric PAUSE and Asymmetric PAUSE toward local device"
    (Asymmetric Pause and Pause Operation are 1).


    SiTCPは、高速にデータを取得する事に特化しています。
    このため、輻輳の発生しないネットワークが前提です。
    PAUSE(IEEE802.3X)を使用して輻輳を回避する方法もありますが、
    PCも含めてネットワーク全体が制御されていないと効果を期待できません。

    SiTCPのPAUSE機能は送信に関してのみ有効です。
    SiTCPは0xFFFFFF10のbit3を1にすることで有効になりますが、
    リンクパートナーとのネゴシエーション結果でPAUSEが
    有効にならないとリンクパートナーがPAUSEフレームを出力しません。
    PHYのAUTO NEGOTIATION ADVERTISEMENT REGISTERのbit10,11を
    有効にした後、再度ネゴシエーションを実行してください。
    (BASIC CONTROL REGISTERのbit9を1にします。)

    なお、PHYのレジスタは、GMII_MDC,GMII_MDIO_IN,GMII_MDIO_OUT,
    GMII_MDIO_OEが正しく接続され、PHY_ADDRが正しく設定されていれば
    RBCPレジスタの0xFFFFFE00~0xFFFFFEFFにマップされます。
    PHYのレジスタのアドレッシングは16bit単位、RBCPは8bitなので
    RBCPのアドレスは2倍になることを注意してください。

    また、0xFFFFFF10の初期値(0xFFFFFC10)でPAUSEが有効な場合
    初期設定で"Both Symmetric PAUSE and Asymmetric PAUSE toward
    local device"(Asymmetric PauseとPause Operationを1)に初期設定します。

  • Date: Fri, 23 Apr 2021 12:38:12 +0800 (GMT+08:00)
    Gu,
    thank you for your advice and we will try this method.

    I still have questions about data transmission.Is the size of the data packet decided by the value of TCP MSS register(0xFFFFFF20 to 0xFFFFFF21)? The default time-out duration of TCP re-transmission time is 500 ms(0x01F4), and does it mean that SiTCP will retransmit the data after 500 ms if it doesn't receive the ACK from PC?If SiTCP will send the next packet before receiving the ACK of the current data? I wonder if it is possible to do some configuration to set the number of data retransmission times or to stop the data retransmission in some cases.


    データ転送についてまだ質問があります。
    データパケットのサイズは、TCP MSSレジスタ(0xFFFFFF20〜0xFFFFFF21)の値によって決まりますか?
    TCP再送信時間のデフォルトのタイムアウト時間は500ミリ秒(0x01F4)ですが、PCからACKを受信しない場合、
    SiTCPは500ミリ秒後にデータを再送信することを意味しますか?
    SiTCPが現在のデータのACKを受信する前に次のパケットを送信する場合はどうなりますか?

    データの再送回数を設定したり、場合によってはデータの再送を停止したりできる設定ができるのではないでしょうか。

  • Date: Fri, 23 Apr 2021 15:13:54 +0900
    ASAI,

    Is the size of the data packet decided by the value of TCP MSS register (0xFFFFFF20 to 0xFFFFFF21)?

    The segment size is determined by the value of the TCP MSS register (0xFFFFFF20 to 0xFFFFFF21).
    Since one segment must be one packet, set it to 1460 or less.
    Changing the value of this register changes the maximum length of one packet.

    The default time-out duration of TCP re-transmission time is 500 ms (0x01F4), and does it mean that SiTCP will retransmit the data after 500 ms if it doesn't receive the ACK from PC? If SiTCP will send the next packet before receiving the ACK of the current data?

    The default timeout for TCP retransmission time is 500ms (0x01F4), which means that if you do not receive an ACK from your PC, SiTCP will resend the data after 500ms.

    SiTCP sends without ACK as long as the receiving buffer size is free.

    I wonder if it is possible to do some configuration to set the number of data retransmission times or to stop the data retransmission in some cases.

    The number of data retransmissions and retransmission cannot be stopped.
    TCP Fast Retransmission, which detects the same ACK number and retransmits, becomes effective when bit1 of FFFFFF10 is set to 1.


    セグメントサイズは、TCP MSSレジスタ(0xFFFFFF20〜0xFFFFFF21)の値によって決まります。
    1セグメントは1パケットである必要があるため、1460以下を設定してください。
    このレジスタの値を変えると、1パケットの最大長は変わります。

    TCP再送信時間のデフォルトのタイムアウト時間は500ミリ秒(0x01F4)ですが、PCからACKを受信しない場合、
    SiTCPは500ミリ秒後にデータを再送信することを意味します。

    SiTCPは受信側のバッファサイズに空きがある限り(ウインドウサイズ)、ACKなしに送信します。

    データの再送回数、再送の停止はできません。
    同じACK番号を検知して再送を行うTCP Fast RetransmissionはFFFFFF10のbit1を1にすると有効になります。

  • Date: Fri, 23 Apr 2021 15:11:42 +0800 (GMT+08:00)
    Gu,

    SiTCP sends without ACK as long as the receiving buffer size is free.

    What does the receiving buffer size mean? Does it mean the Window Size in the ACK from the PC?

    What is the difference between set Nagle buffering(bit0 of 0xFFFFFF10) to 1 and 0?
    I'm looking forward your reply.


    受信バッファサイズが空いている限り、SiTCPはACKなしで送信します。

    受信バッファサイズはどういう意味ですか? PCからのACKのウィンドウサイズを意味しますか?

    Nagleバッファリング(0xFFFFFF10のビット0)を1と0に設定することの違いは何ですか?

  • Date: Fri, 23 Apr 2021 17:45:18 +0900
    ASAI,

    SiTCP sends without ACK as long as the receiving buffer size is free.

    What does the receiving buffer size mean? Does it mean the Window Size in the ACK from the PC?

    The PC sends the Window and Acknowledgment Number. SiTCP calculates the receive buffer of the PC from these values and the Sequence Number inside SiTCP.

    What is the difference between set Nagle buffering (bit0 of 0xFFFFFF10) to 1 and 0?

    When bit0 of FFFFFF10 is set to 1, Nagle buffering is turned on. If it is 0, it is OFF.
    Nagle buffering suppresses transmission until the timer expires (about 4ms) if the data is less than MSS even if there is data in the transmission buffer in SiTCP.
    If Nagle buffering is OFF, transmission will start as soon as there is data in the transmission buffer.


    PC側から送られてくるWindowとAcknowledgment NumberとSiTCP内部のSequence NumberよりPC側の受信バッファを計算しています。

    FFFFFF10のbit0を1にした場合は、NagleバッファリングがONになります。0の場合はOFFです。
    Nagleバッファリングは、SiTCP内の送信バッファにデータがあってもMSS未満の場合、タイマ満了(約4ms)まで送信を抑止します。
    NagleバッファリングがOFFの場合は、送信バッファにデータがあると即時に送信を開始します。

  • Date: Fri, 23 Apr 2021 17:11:52 +0800 (GMT+08:00)
    Gu,

    thank you for your reply.Your answers and advices are great helpful to me.

Sign In or Register to comment.