JP6568571B2 - Data transfer device, data transfer method, and communication device - Google Patents
Data transfer device, data transfer method, and communication device Download PDFInfo
- Publication number
- JP6568571B2 JP6568571B2 JP2017238134A JP2017238134A JP6568571B2 JP 6568571 B2 JP6568571 B2 JP 6568571B2 JP 2017238134 A JP2017238134 A JP 2017238134A JP 2017238134 A JP2017238134 A JP 2017238134A JP 6568571 B2 JP6568571 B2 JP 6568571B2
- Authority
- JP
- Japan
- Prior art keywords
- session
- state
- data
- data transfer
- transmission
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
本発明の実施形態は、データ転送装置、データ転送方法および通信装置に関する。 Embodiments described herein relate generally to a data transfer device, a data transfer method, and a communication device.
サーバ装置および端末装置に搭載される通信装置では、一般的に、MAC層および物理層のプロトコルとして、イーサネット(登録商標)やIEEE802.11a/b/g/n/acなどが使用される。より上位層のプロトコルには、TCP/IPやUDP/IPなどが使われるのが一般的である。TCP/IPやUDP/IPは、インターネット等で広く使われている。イーサネットは現在1Gbpsが主流であり、データセンター等では10Gbpsが使われ始めている。また、次世代の40Gbps/100Gbpsイーサネットの仕様策定も完了している。IEEE 802.11においても、数100Mbps〜数Gbpsの利用が、今後着実に普及していくと思われる。 In a communication apparatus mounted on a server apparatus and a terminal apparatus, Ethernet (registered trademark), IEEE802.11a / b / g / n / ac, or the like is generally used as a MAC layer and physical layer protocol. Generally, TCP / IP, UDP / IP, etc. are used as higher layer protocols. TCP / IP and UDP / IP are widely used on the Internet and the like. Ethernet is currently 1 Gbps, and 10 Gbps is starting to be used in data centers and the like. In addition, the specification of the next generation 40 Gbps / 100 Gbps Ethernet has been completed. Also in IEEE 802.11, the use of several hundred Mbps to several Gbps is expected to be steadily spread in the future.
このような高速ネットワークの普及に伴い、それを制御するホストCPUの処理負荷も増大していく。ホストCPUの処理負荷を低減するため、TCP/IPオフロードエンジン(以下、TOE)などの専用ハードウェアが用いられてきた。TOEは、ホストCPUに代行して、前述のTCP/IPの処理を行う専用プロセッサまたは専用回路を備えた装置であり、ホストCPUからTCP/IP処理の負荷をオフロードするものである。このTOEを用いることによって、従来のソフトウェアによるプロトコル処理よりも、高速にTCP/IP処理を行う事が可能となる。 With the spread of such high-speed networks, the processing load of the host CPU that controls the high-speed network also increases. In order to reduce the processing load on the host CPU, dedicated hardware such as a TCP / IP offload engine (hereinafter referred to as TOE) has been used. The TOE is a device including a dedicated processor or a dedicated circuit that performs the above-described TCP / IP processing on behalf of the host CPU, and offloads the load of the TCP / IP processing from the host CPU. By using this TOE, it is possible to perform TCP / IP processing at a higher speed than protocol processing by conventional software.
一般的なTOEを用いた送信処理では、ホストCPUなどが、送信するデータを送信キューに書き込み、TOEが送信キューからデータを読み出してヘッダ生成等の処理を行い、ネットワークへ送信を行う。この時、TOEは送信キューへ書き込まれた順にデータを処理する事になる。 In transmission processing using a general TOE, a host CPU or the like writes data to be transmitted to a transmission queue, and the TOE reads data from the transmission queue, performs processing such as header generation, and transmits to the network. At this time, the TOE processes data in the order written in the transmission queue.
このようなTOEを搭載したサーバ装置では、数万規模のTCPのセッションが同時に接続される事が想定され、各セッションを均等に処理する能力が求められる。しかし、従来技術ではホスト側のタスクスケジューリングの結果によっては、同一セッションのデータが送信キューに連続して書き込まれ、同一セッションでフレームがバースト的に送信されてしまう可能性がある。 In a server apparatus equipped with such a TOE, it is assumed that tens of thousands of TCP sessions are connected simultaneously, and the ability to process each session equally is required. However, according to the prior art, depending on the result of task scheduling on the host side, data of the same session may be continuously written in the transmission queue, and frames may be transmitted in bursts in the same session.
本発明の実施形態は、各セッションに対してネットワークの帯域をできるだけ均等に割り当てることを目的とする。 An embodiment of the present invention aims to allocate the network bandwidth to each session as evenly as possible.
本発明の実施形態としてのデータ転送装置は、複数の対向機器と、ネットワークを介して通信するデータ転送装置であって、セッション管理部と通信処理部とを備える。 A data transfer apparatus according to an embodiment of the present invention is a data transfer apparatus that communicates with a plurality of opposing devices via a network, and includes a session management unit and a communication processing unit.
前記セッション管理部は、前記複数の対向機器に対して生成された複数のセッションを順次、循環的に選択する。 The session management unit sequentially and cyclically selects a plurality of sessions generated for the plurality of opposing devices.
前記通信処理部は、前記セッション間で各回の送信処理で送信するデータ量のばらつきを抑制するように、前記セッション管理部で選択されたセッションに関連する対向機器に対してデータの送信処理を行う。 The communication processing unit performs a data transmission process on the opposite device related to the session selected by the session management unit so as to suppress variation in the amount of data transmitted in each transmission process between the sessions. .
以下、図面を参照しながら、本発明の実施形態について説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
(第1の実施形態)
図1は、第1の実施形態に係るデータ転送装置を備えた通信装置を示すブロック図である。図における矢印付きの実線は、ネットワークへ送信するデータの流れを示し、矢印付きの破線は制御、またはネットワークへ送信するデータ以外の情報の流れを示す。
(First embodiment)
FIG. 1 is a block diagram illustrating a communication apparatus including a data transfer apparatus according to the first embodiment. In the figure, a solid line with an arrow indicates a flow of data to be transmitted to the network, and a broken line with an arrow indicates a flow of information other than control or data to be transmitted to the network.
図1に示す通信装置100は、ネットワーク201を介して、1つまたは複数の対向機器301と接続される。ネットワーク201は、無線ネットワーク、有線ネットワーク、またはこれらのハイブリッドのネットワークであり、一例として、インターネットである。
A
通信装置100は、各対向機器301に対し、TCP等の通信プロトコルに従ってセッションを生成し、生成したセッションに基づき通信する。この通信装置は、一例として、対向機器301の要求に応じて画像、音声、動画、テキストなどのデータを供給するサーバ装置である。通信装置の形態は、これに限定されず、対向機器301に対しセッションを生成して通信を行う装置であれば、スマートフォン、PC、タブレット、携帯端末などのユーザ端末でもよい。具体的な製品形態としては、これらのサーバ装置やPC等の他、専用LSI、またはFPGA(Field Programmable Gate Array)等の形態も可能であるが、これらに限定されるものではない。
The
各対向機器301は、スマートフォン、PC、タブレット、携帯端末、などのユーザ端末でもよいし、家庭内の家電装置などでもよい。通信装置100とセッションを生成して、通信装置からデータの供給を受ける装置であれば、どのような装置でもかまわない。
Each
図1の通信装置は、データ転送装置101と、ホストCPU(プロセッサ)102と、記憶装置103と、送信バッファ104を備えている。ホストCPU102は、セッション毎に、送信するデータを記憶装置103から読み出して送信バッファ104へ書き込むよう制御する。また、ホストCPU102は、各セッションについて、対向機器とのコネクションの確立・切断を制御する。データ転送装置101は、ホストCPU102でコネクションが確立されている各セッションについて、各セッションを循環的に選択し、選択したセッションに対して送信処理を行うことを繰り返す。送信処理では、セッションを生成した対向機器に対してデータを送信する。データ転送装置101は、セッション間で、各回の送信処理で送信するデータ量のばらつきを抑制するようにデータを送信する。これにより、各セッションに均等に送信の機会を与え、ネットワークの帯域をできるだけ均等に使用させる。
The communication device of FIG. 1 includes a
記憶装置103には、送信用のデータを格納している。記憶装置103の具体的な実装形態は、例えばSSD(Solid State Drive)やHDD(Hard Disk Drive)、SDカード、SDRAM等が想定されるがその限りではない。
The
送信バッファ104は、一時的にデータを保持するための記憶領域である。送信バッファ104には、セッション毎に使用する領域が予め割り当てられていてもよい。送信バッファ104は、記憶装置103上に配置されてもよいし、メインメモリなど別の装置上に配置されてもよい。また、後述のデータ転送装置101内に配置してもよい。
The
ホストCPU102は、通信装置100全体の制御を行う。ホストCPU102は、ソフトウェアで実現される主な処理部として、アプリケーション部21と、コネクション処理部22と、書き込み制御部23とを備える。アプリケーション部21は、データ送信アプリケーションを実行する処理部である。
The
コネクション処理部22は、使用する通信プロトコル(ここではTCP/IPを想定)に応じて、対向機器301とのセッションを生成し、当該セッションで対向機器301と通信を行うためのコネクションを確立・切断する処理を行う。コネクション処理部22は、生成したセッションに固有のIDを割り振る。このIDをセッションIDと呼ぶ。コネクション処理部22は、コネクションを確立または切断するための制御パケットを、データ転送装置101の通信処理部14を介して、対向機器301と送受信する。制御パケットの例として、SYNパケットやFINパケット、これらのパケットに付随して送受信するパケット等がある。
The
コネクション処理部22は、コネクションを確立または切断すると、コネクションの確立または切断の通知を、データ転送装置101のセッション管理部11に行う。この際、確立または切断の対象となったセッションIDを通知する。コネクションの確立の通知は、当該コネクションで最初に送信するデータが発生した時、または当該データを後述のデータ書込制御部23の制御で送信バッファ104に書き込んだ時などに行うことがあり得る。
When the
ここでTCP/IPにおけるセッションとは、宛先IPアドレス/発信元IPアドレス/宛先ポート番号/発信元ポート番号の4つの情報で管理するコネクションを指す。セッションを生成するとは、これら4つの情報の組を生成することに相当する。ある1つのセッションは、コネクションが確立された状態、または確立されていない(切断された)状態を有する。TCP/IPは、セッション毎に、セッションに関連する対向機器と、送信処理および受信処理を行うものである。本実施形態に係るデータ転送装置101も、セッション毎に、セッションに関連する対向機器301と、送信処理および受信処理を行う。
Here, the TCP / IP session refers to a connection managed by four pieces of information of destination IP address / source IP address / destination port number / source port number. Generating a session corresponds to generating a set of these four pieces of information. A certain session has a state in which a connection is established or a state in which a connection is not established (disconnected). TCP / IP performs transmission processing and reception processing for each session with an opposite device related to the session. The
書き込み制御部23は、記憶装置103に格納されているデータを、送信バッファ104に書き込むための制御を行う。書き込み制御の方法は、装置構成に応じて、任意の方法を用いればよい。例えば、記憶装置103が内部にDMAC(ダイレクトメモリアクセスコントローラ)(図示せず)を内蔵し、書き込み制御部23が、DMACに指示信号を出力することで、DMACが送信バッファ104にデータ書き込みを行ってもよい。この場合、書き込み制御部23が、DMACに、送信バッファ104における書き込みアドレスを指示すればよい。または、ホストCPU102自身が、記憶装置103からデータを読み出して、送信バッファ104に書き込んでもよい。あるいは、専用のハードウェアを用いて書き込み処理を行ってもよい。
The
なお、ホストCPU102は、上述した処理外にも、種々の処理を行う事が可能である。
The
データ転送装置101は、ホストCPU102に代行し、TCP/IPに従って、データの送信処理、および受信処理を行う。データ転送装置101は、セッション毎に、送信バッファ104に書き込まれたデータを読み出して、TCP/IP等のプロトコル処理を行う。これにより、フレームを生成する。そして、生成したフレームをネットワーク201へ送出する。このようなデータ転送装置101は、セッション管理部11、セッション情報記憶部12、データ読み出し部13、通信処理部14を備える。データ転送装置101は、ハードウェアとソフトウェア(プログラム)のどちらで構成しても良く、これらの両方で構成されてもよい。
The
セッション管理部11は、コネクション処理部22からコネクション確立の通知を受けると、コネクション確立されたセッションのIDを登録する。また、コネクション切断の通知を受けると、コネクション切断されたセッションのIDを削除する。これにより、セッション管理部11は、コネクション確立状態にあるセッションを内部で把握する。以下では、セッションIDを登録または削除することを、セッションを登録または削除と表現ンすることがある。
When the
セッション管理部11は、登録されているセッションIDに基づき、各セッションを循環的に順次選択し、選択したセッションについて、通信処理部14に送信処理を行うことを指示する指示情報を出力する。循環的にセッションを選択する方法として、例えば、登録されているセッションIDをキューに保持しておき、先頭から順次セッションIDを読み出し、読み出したセッションIDを再度、キューの末尾に格納する方式を用いてもよい。キューは、データ転送装置101の内部または外部のバッファに格納しておく。
The
または、コネクション処理部22で確立された各セッションのIDとコネクション状態(確立または切断)を保持したテーブルを、データ転送装置101の内部または外部のバッファに保持しておく。当該テーブルの各エントリを順次、循環的に確認して、コネクション確立状態にあるセッションを選択する方法などでもよい。この場合、セッション管理部11にセッションが登録されているとは、テーブルにおいてセッションIDが登録され、コネクション状態が「確立」の状態を意味する。なお、ここで述べた方法以外で、セッションを選択する方法でもかまわない。
Alternatively, a table holding the ID and connection status (established or disconnected) of each session established by the
セッション情報記憶部12は、セッション管理部11で登録されている各セッションのセッション情報を記憶する。セッション情報は、前述したセッション(宛先IPアドレス/発信元IPアドレス/宛先ポート番号/発信元ポート番号)の値、および、TCP/IPヘッダを生成するために必要なその他の情報(シーケンス番号、確認応答番号(ACKシーケンス番号)等)を含む。また、MSS(Maximum Segment Size)をセッション情報に含めてもよい。MSSがすべてのセッションで共通であれば、別に管理してもよい。
The session
また、セッション情報は、送信バッファ104のどの位置に、当該セッション用のデータが書き込まれているかを特定するためのバッファ情報も含む。バッファ情報は、送信バッファ104において、まだ送信されていないデータを格納しているアドレスを特定する情報を含む。例えば、バッファ情報は、送信バッファ104において読み出し済みのデータの末尾のアドレス(またはまだ読み出されていないデータの先頭アドレス)を指す読み出しポインタ、書き込みが完了したデータの末尾のアドレスを指す書き込みポインタとの組でもよい。これ以外の表現方法でバッファ情報を構成してもよい。
The session information also includes buffer information for specifying in which position in the
セッション情報記憶部12は、データ転送装置101内に配置されてもよいし、データ転送装置101外(例えばメインメモリ等)に配置されてもよい。セッション情報は、セッション管理部11へのセッションの登録(すなわちセッションIDの登録)時に、セッション情報記憶部12に登録され、セッション管理部11からセッションが削除される時に削除されてもよい。また、セッション情報記憶部12内のセッション情報は、セッションに対応する送信処理が行われたとき、また、送信バッファ104にセッションに対応するデータが書き込まれたときになどに更新されてもよい。ここで述べたセッション情報の登録および削除、更新は、ホストCPU102またはデータ転送装置101が行い、どちらが行うように構成しても構わない。
The session
例えばデータ転送装置101のセッション管理部11が、セッションIDの登録時にセッション情報を生成して、セッション情報記憶部12内にセッション情報を格納してもよい。セッション情報の生成に必要な情報は、ホストCPU102から取得すればよい。または、セッション管理部11へのセッションの登録時に、ホストCPU102のコネクション処理部22または別の処理部がセッション情報を生成して、セッション情報記憶部12に格納してもよい。
For example, the
また、データ転送装置101のセッション管理部11が、セッションIDの削除時に、該当するセッション情報をセッション情報記憶部12内から削除してもよい。または、セッション管理部11からのセッションIDの削除時に、ホストCPU102のコネクション処理部22または別の処理部が、セッション情報記憶部12からセッション情報を削除してもよい。
Further, the
また、ホストCPU102の書き込み制御部23の制御により、送信バッファ104にデータを書き込んだときに、ホストCPU102またはデータ転送装置101が、該当するセッション情報(例えばセッション情報内のバッファ情報等)を更新してもよい。また、データ転送装置101の通信処理部14が、送信処理を実行したときに、該当するセッション情報(バッファ情報、シーケンス番号等)を更新してもよい。
Further, when data is written in the
データ読み出し部13は、通信処理部14からデータの読み出し指示を受けて、送信バッファ104からデータを読み出す。データ読み出し部13は、読み出したデータを通信処理部14に送る。送信バッファ104における読み出しアドレスは、通信処理部14が、セッション情報内のバッファ情報から算出して、通信処理部14に通知する構成でもよいし、データ読み出し部13が、当該バッファ情報から算出してもよい。または、バッファ情報は、セッション情報から分離して、データ読み出し部13が管理するように構成してもよい。
The
通信処理部14は、セッション管理部11から循環的に指示される各セッションに対して、データの送信処理を行う。通信処理部14は、当該セッションに対応するバッファ情報を確認することで、送信バッファ104における未送信のデータの位置およびサイズ等の情報を知る事ができる。よって、バッファ情報を元に、送信バッファ104からデータを読み出して、送信を実行できる。
The
具体的には、通信処理部14は、セッション管理部11から次に送信処理を行うセッションを指定されると、該当するセッション情報を取得して、セッション情報に含まれるシーケンス番号や確認応答番号、ポート番号等からTCP/IPのヘッダを生成する。また、データ読み出し部13に、当該セッションに対応するデータの読み出しを指示する。この際、セッション情報内のバッファ情報から読み出しアドレスを算出して、データ読み出し部13へ通知してもよい。通信処理部14は、データ読み出し部13により読み出されたデータを取得し、取得したデータに、上述のヘッダや、別途計算したチェックサム等を結合してフレームを生成する。通信処理部14は、生成したフレームをネットワーク201へ送出する。
Specifically, when a session to be transmitted next is designated by the
また、通信処理部14は、ここで述べたデータ送信以外にも、対向機器301からのデータ受信処理や、ACKパケット、FINパケット、RSTパケット等の送受信処理を行う。なお、通信処理部14は、前述した制御パケットをネットワーク201から受信した場合は、当該制御パケットの情報をホストCPU102に、メインメモリ等のメモリを介して渡す。また、通信処理部14は、ホストCPU102から渡された情報に基づき、制御パケットを生成してネットワーク201に送信してもよい。制御パケットの生成をホストCPU101が行ってもよい。
In addition to the data transmission described here, the
図2は、データ転送装置101におけるある1つのセッションの状態遷移図を表している。セッションの状態として、非オフロード処理状態A101とオフロード処理状態A102が存在する。
FIG. 2 shows a state transition diagram of one session in the
ある1つのセッションは、セッションがコネクション処理部22により生成された時点では、初期状態として、非オフロード処理状態A101にある。セッションに対しコネクションが確立され、セッションがセッション管理部11に登録されると、セッションの状態は、オフロード処理状態A102に遷移する(T101)。またセッションが、セッション管理部11から削除されると、非オフロード処理状態A101に遷移する(T102)。
A certain session is in the non-offload processing state A101 as an initial state when the session is generated by the
オフロード処理状態A102では、当該セッションは、オフロード処理状態A102にある他のセッション群とともに、セッション管理部11により循環的に(均等に)、順次選択され、通信処理部14により、当該セッションに関する送信処理が行われる。すなわち、オフロード処理状態A102にある各セッションは、それぞれ均等に送信の機会を割り当てられ、データを送信できる。一方、非オフロード処理状態A101にある当該セッションは、セッション管理部11に登録されておらず、送信の機会は与えられない。
In the offload processing state A102, the session is selected cyclically (equally) by the
つまり、ホストCPU102は、セッション管理部11にセッションIDを登録する事で、任意のセッションの送信処理を、データ転送装置101に代行依頼する。データ転送装置101は、セッション管理部11に登録されたセッションに対して、均等に順番に送信処理を実施する。また、ホストCPU102は、コネクションの切断を通知することで、セッション管理部11に登録されているセッションIDを除外し、これにより、当該セッションについて、データ転送装置101による送信処理を停止できる。
That is, the
図3は、データ転送装置101における送信処理のフローチャートである。
FIG. 3 is a flowchart of transmission processing in the
(ステップS101)まず、セッション管理部11は、自身が管理しているセッションから、1つのセッションを選択し、そのセッションに対して送信処理を開始するように通信処理部14に通知する。
(Step S101) First, the
(ステップS102)通信処理部14は、セッション管理部11から通知されたセッションに対応するセッション情報を、セッション情報記憶部12から読み出す。通信処理部14は、読み出したセッション情報から、データの読み出しに必要な情報を特定し、特定した情報を、読み出し指示とともに、データ読み出し部13に送る。データの読み出しに必要な情報は、例えば、送信バッファ104における読み出しアドレス(バッファ情報)や、MSS(Maximum Segment Size)などを含んでもよい。これらの情報をデータ読み出し部13が内部で管理している場合は、通信処理部14は読み出し指示のみを送る構成でもよい。
(Step S <b> 102) The
(ステップS103)データ読み出し部13は、通信処理部14の読み出し指示に従って、送信バッファ104からデータを読み出す。例えば、1フレームに格納する分のデータを読み出す。
(Step S <b> 103) The
例えば、MSSが1460Byteに設定されており、送信バッファ104には4KBのデータが存在した場合は、4KBのうち1460Byteだけデータを読み出す。または、MSSが1460Byteに設定されており、送信バッファ104に512Byteのデータが存在する場合は、512Byteのデータを読み出す。本実施形態では、各セッションについて、1回の送信処理で、1フレームの送信を想定しているが、所定の複数のフレームを送信する形態でもよい。この場合は、フレームの個数分、各フレームに格納するデータをそれぞれ読み出すことになる。当然ながら、フレームに格納するデータが存在しない場合は、送信するフレーム数は、上記所定の複数よりも小さくなる。つまり、各セッションおよび各回の送信処理で送信されるフレーム数の上限値は共通である。
For example, when the MSS is set to 1460 bytes and 4 KB data exists in the
(ステップS104)通信処理部14は、データ読み出し部13からデータを受け取ると、セッション情報を元にヘッダを生成し、ヘッダをデータと結合する。また、ヘッダとデータからチェックサムを計算し、その計算結果をデータにさらに付加することで、フレームを生成する。通信処理部14は、生成したフレームを、ネットワーク201に出力する。
(Step S104) Upon receiving data from the
(ステップS105)通信処理部14は、フレームを送信したセッションに対応するセッション情報を更新する。例えば、今回送信したデータのサイズに基づき、セッション情報におけるシーケンス番号(送信済みシーケンス番号)を更新する。また、今回、送信バッファ104から読み出しを行ったアドレス、または、今回送信したデータのサイズ等から、セッション情報におけるバッファ情報を更新する。その他、必要に応じて、セッション情報内の他の項目の値を更新する。ただし、バッファ情報の更新は、再送処理を考慮して、送信したデータに該当するACKパケットを受信したタイミングで行う構成でも良い。
(Step S105) The
(変形例)
第1の実施形態では、通信プロトコルとしてTCPを想定し、コネクションを確立しているセッションをセッション管理部で選択の対象としたが、UDPのようなコネクションレス型のプロトコルを使用する場合は、単純に、確立している各セッションを選択の対象にすることも可能である。このことは、後述する第2および第3の実施形態についても同様に適用される。
(Modification)
In the first embodiment, TCP is assumed as a communication protocol, and a session in which a connection is established is selected by the session management unit. However, when a connectionless protocol such as UDP is used, it is simple. In addition, each established session can be selected. This applies similarly to second and third embodiments described later.
以上、第1の実施形態に係る通信装置によれば、各セッションに対して、それぞれ順番に(循環的に)送信処理を実行し、セッション間で各回の送信処理で送信するデータ量のばらつきを抑制する。例えば、各セッションおよび各送信処理で、それぞれ上限値以下の個数のフレームを送信する。これにより、各セッションに、それぞれ均等にネットワーク帯域を割り当てることができ、特定のセッションでバースト的にフレームが送信されることを防止できる。 As described above, according to the communication device according to the first embodiment, the transmission process is executed in order (cyclically) for each session, and the variation in the amount of data transmitted in each transmission process between the sessions is varied. Suppress. For example, the number of frames equal to or less than the upper limit value is transmitted in each session and each transmission process. As a result, the network bandwidth can be equally allocated to each session, and frames can be prevented from being transmitted in bursts in a specific session.
(第2の実施形態)
本実施形態では、セッション管理部11で管理するセッションのうち、送信バッファ104にデータが存在するセッションのみを、送信処理を実行する対象として選択する。第1の実施形態では、セッション管理部11に登録されている限り、送信するデータが存在しないセッションも選択される。このため、当該セッションに対して送信処理の動作がとられると、結局、送信するデータは存在しないことから、データの送信は行われず、それまで行われたセッション情報の読み出し動作、およびその解析等の動作が無駄になる(空振り動作)。これは、データ転送装置にとって余分な負荷になるとともに、その動作の時間分、ネットワーク帯域の利用効率が低下する。そこで、本実施形態では、送信するデータがないセッションに対しては、送信処理に対するセッションの選択対象から除外することで、この問題を解決する。
(Second Embodiment)
In the present embodiment, only sessions in which data exists in the
図4は、第2の実施形態に係るデータ転送装置を備えた通信装置を示すブロック図である。図1と同一の名称の要素には同一の符号を付して、変更または拡張された処理を除き、重複する説明を省略する。 FIG. 4 is a block diagram illustrating a communication device including a data transfer device according to the second embodiment. Elements having the same names as those in FIG. 1 are denoted by the same reference numerals, and redundant description is omitted except for processing that has been changed or expanded.
本実施形態の通信装置200におけるデータ転送装置101は、第1の実施形態の各処理部に加え、バッファ状態管理部17を備える。バッファ状態管理部17は、セッション管理部11に登録されている各セッションについて、送信バッファ104でのデータ格納状況に応じて、その状態の設定を管理する。
The
図5は、データ転送装置101におけるある1つのセッションの状態遷移図を表している。
FIG. 5 shows a state transition diagram of one session in the
第1の実施形態における非オフロード処理状態A101・オフロード処理状態A102に加え、オフロード処理状態(データ待ち)A103が設けられている。ここでは、第1の実施形態で説明したオフロード処理状態A102を、オフロード処理状態(送信可能)A102と表現して、オフロード処理状態(データ待ち)A103と区別している。オフロード処理状態(送信可能)A102は、セッションの第1の状態、オフロード処理状態(データ待ち)A103は、セッションの第2の状態に相当する。 In addition to the non-offload processing state A101 and the offload processing state A102 in the first embodiment, an offload processing state (data waiting) A103 is provided. Here, the offload processing state A102 described in the first embodiment is expressed as an offload processing state (transmittable) A102 and is distinguished from the offload processing state (data waiting) A103. The offload processing state (transmittable) A102 corresponds to the first state of the session, and the offload processing state (data waiting) A103 corresponds to the second state of the session.
オフロード処理状態(データ待ち)A103は、あるセッションについて、コネクションが確立していてセッション管理部11に登録されているが、送信用のデータが送信バッファ104に存在しない状態である。この状態では、セッション管理部11は、当該セッションを、送信処理に対する選択対象から除外する。
The offload processing state (data waiting) A103 is a state in which a connection is established for a certain session and is registered in the
バッファ状態管理部17は、オフロード処理状態(送信可能)A102とオフロード処理状態(データ待ち)A103の設定を、セッション管理部11で管理されている各セッションに対して管理する。
The buffer
例えば、オフロード処理状態(送信可能)A102において、送信バッファ104にデータが存在しないことが検知された場合は、通信処理部14が、その旨をバッファ状態管理部17に通知する。通知を受けたバッファ状態管理部17は、セッション管理部11における当該セッションの状態を、オフロード処理状態(データ待ち)A103に設定する(T103)。
For example, in the offload processing state (transmittable) A102, when it is detected that no data exists in the
ここで、非オフロード処理状態A101ではなく、オフロード処理状態(データ待ち)A103に設定するのは、データ転送装置101は、送信バッファ104からのデータ転送は行わないが、データ受信処理や、ACKパケットやFINパケット、RSTパケット等の制御関連の送受信処理を、対向機器301と行う必要があるためである。つまり、セッション管理部11でセッションが登録されている限り、データの送信処理は行わなくとも、上記制御関連の送受信処理は行われるよう、データ転送装置は動作する。
Here, not the non-offload processing state A101 but the offload processing state (data waiting) A103 is set because the
また、書き込み制御部23が、その制御により、送信バッファ104にデータを書き込んだ時に、その旨をバッファ状態管理部17に通知する。通知を受けたバッファ状態管理部17は、セッション管理部11における当該セッションの状態を、オフロード処理状態(データ待ち)A103から、オフロード処理状態(送信可能)A102に変える(T104)。なお、当該セッションが、元々オフロード処理状態(送信可能)A102であれば、その状態を維持する。
Further, when the
また、オフロード処理状態(データ待ち)A103において、コネクション処理部22からコネクションの切断の通知を受けると、セッション管理部11は、当該セッションの登録を削除する。すなわち、当該セッションのセッションIDを削除する。これにより、当該セッションは、非オフロード処理状態A101に遷移する(T105)。
In the offload processing state (waiting for data) A103, when receiving a disconnection notification from the
セッション管理部11は、オフロード処理状態(送信可能)A102にあるセッションのみを循環的に選択して、通信処理部14に送信処理を実行させる。これにより、コネクションは確立しているが、送信バッファ104にデータが存在しないセッションに対しては、送信処理の動作を開始させずに済む。
The
図6は、本実施形態に係るデータ転送装置101における送信処理のフローチャートである。より詳細には、このフローチャートは、セッション管理部11に登録されている、オフロード処理状態(送信可能)A102にあるセッションに対して行う処理の流れを示している。
FIG. 6 is a flowchart of transmission processing in the
(ステップS201)セッション管理部11は、自身が管理しているセッションから、オフロード処理状態(送信可能)A102にあるセッションを1つ選択し、そのセッションに対して送信処理を開始するように、通信処理部14に通知する。
(Step S201) The
(ステップS202)通信処理部14は、通知されたセッションに該当するセッション情報をセッション情報記憶部12から読み出す。通信処理部14は、セッション情報から、送信バッファ104からのデータの読み出しに必要な情報(例えばバッファ情報、MSSなど)を特定する。
(Step S202) The
(ステップS203)通信処理部14は、特定した情報から、送信バッファ104に送信用のデータが存在するかを判断する。例えば、バッファ情報が、読み出すべきアドレスが存在しないことを示す場合(例えば読み出しポインタと書き込みポインタが一致している場合)は、送信バッファ104にデータが存在しないと判断する。それ以外の場合は、データが存在すると判断できる。
(Step S203) The
(ステップS207)通信処理部14は、送信バッファ104にデータが存在しないと判断したときは、その旨をバッファ状態管理部17に通知する。バッファ状態管理部17は、そのセッションの状態を、オフロード処理状態(データ待ち)A103に設定する。この後、ステップS201に戻る。
(Step S207) When the
(ステップS204)一方、通信処理部14は、送信バッファ104にデータが存在すると判断したときは、通信処理部14は、データ読み出し部13に、読み出し指示、および、必要に応じてバッファ情報等を送る。データ読み出し部13は、読み出し指示に従って、例えば1フレームに格納する分だけのデータを、送信バッファ104から読み出す。第1の実施形態と同様、各セッションについて、1回の送信処理毎に、1フレーム分の送信を想定しているが、1回の送信処理で、複数のフレームを送信する形態でもよい。
(Step S204) On the other hand, when the
(ステップS205)通信処理部14は、データ読み出し部13からデータを受け取ると、セッション情報を元にヘッダを生成し、生成したヘッダをデータと結合する。また、ヘッダとデータからチェックサムを計算し、その計算結果を、データにさらに付加することで、フレームを生成する。通信処理部14は、生成したフレームをネットワーク201に出力する。
(Step S205) Upon receiving data from the
(ステップS206)通信処理部14は、フレームの送信後、セッション情報記憶部12における当該セッションのセッション情報を更新する。例えば今回送信したデータのサイズに応じて、セッション情報におけるシーケンス番号(送信済みシーケンス番号)を更新する。また、今回送信したデータを読み出したアドレスに応じて、セッション情報におけるバッファ情報を更新する。バッファ情報の更新は、再送処理を考慮して、送信したフレームに該当するACKパケットを受信したタイミングで行う構成でも良い。
(Step S206) After transmitting the frame, the
上述した処理では、通信処理部14は、送信バッファ104にデータが存在するかの判断を、送信処理の開始時に行ったが、送信処理の完了後に、送信バッファ104にデータが存在するかの判断を行ってもよい。つまり、図6のステップS203、S206の処理を、ステップS205またはS206の後に行ってもよい。
In the processing described above, the
また、上述した実施形態では、送信バッファ104にデータが存在するかの判断を通信処理部14が行ったが、この判断をバッファ状態管理部17が行うようにしてもよい。この場合、バッファ状態管理部17は、書き込み制御部23から、セッション毎に、新たに送信バッファ104に書き込まれたデータのアドレスの通知を受け、また通信処理部14からは、送信バッファ104から読み出したデータのアドレス(あるいは、送信済みでACKパケットを受信したデータのアドレス)の通知を受ける。バッファ状態管理部17は、例えば書き込まれたデータの末尾のアドレスを書き込みポインタ、読み出し済みのデータの末尾のアドレスを読み出しポインタとし、データ転送装置101の内部または外部のバッファ(メモリ)で管理する。バッファ状態管理部17は、これらのポインタを比較することで、まだ読み出されていないデータが存在するか判断できる。まだ読み出されていないデータが存在することを検知した場合は、当該セッションの状態を、オフロード状態(データ待ち)A103に遷移させる。
In the above-described embodiment, the
以上、第2の実施形態に係る通信装置によれば、コネクションを確立していて、かつ、送信バッファ104にデータが存在するセッションに対してのみ、順次、フレーム送信処理を実行する。これにより、セッション間で均等に帯域を利用しつつ、効率よく転送をすることが可能となる。
As described above, according to the communication apparatus according to the second embodiment, the frame transmission process is sequentially executed only for a session in which a connection is established and data exists in the
(第3の実施形態)
TCPでは、受信側の通信装置は、現在、自身が受信可能なデータサイズをウィンドウサイズ(受信ウィンドウサイズ)として、送信側の通信装置に通知している。このウィンドウサイズは、データパケットやACKパケットのヘッダに含められる。一般的に、この受信ウィンドウサイズは、自身の受信バッファの空き領域のサイズなどが、設定される。
送信側の通信装置は、この受信側の通信装置の受信ウィンドウサイズを、自身の送信ウィンドウサイズとして用い、この送信ウィンドウサイズ以上のデータ送信を行わないように、送信を制御(フロー制御)する。これは、受信側の通信装置でのバッファのオーバーフローを防ぐためである。もし受信側の通信装置の受信バッファにオーバーフローが発生すると、TCP/IPの再送処理が発生して、通常より多くのパケットを、ネットワークに送信してしまう。
(Third embodiment)
In TCP, the receiving communication device currently notifies the transmitting communication device of the data size that can be received by the receiving device as the window size (reception window size). This window size is included in the header of the data packet or ACK packet. Generally, the reception window size is set to the size of an empty area of its own reception buffer.
The communication device on the transmission side uses the reception window size of the communication device on the reception side as its transmission window size, and controls transmission (flow control) so that data transmission larger than the transmission window size is not performed. This is to prevent buffer overflow in the receiving communication apparatus. If an overflow occurs in the reception buffer of the communication device on the receiving side, a TCP / IP retransmission process occurs, and more packets than usual are transmitted to the network.
また、ネットワークの通信経路上の通信機器(例えばルータ等の中継機器)内にもバッファが存在し、これらのバッファがオーバーフローを起こす可能性も考えられる。このため、TCPでは、送信側は輻輳制御によって、送信するデータサイズを制限しながら、輻輳を起こさないように送信処理を行う。このとき、送信するデータサイズは、送信側の輻輳ウィンドウによって定められる。TCPの輻輳制御では、はじめは輻輳ウィンドウサイズを小さな値から開始し、受信側からACKパケットを受ける(受信側へデータが到達する)度に、輻輳ウィンドウサイズを増やしていく。輻輳ウィンドウサイズを増やしていき、重複ACKや再送タイムアウト等が発生した場合には、通信経路上でバッファオーバーフロー等の理由により、パケットロス(輻輳)が発生したと判断して、輻輳ウィンドウサイズを減少させる。このようにTCPでは、送信するデータサイズを制限しながら送信処理を行う事で、ネットワークの輻輳を、なるべく発生させないようにしている。輻輳制御アルゴリズムには、様々なものがあるが、本実施形態は、輻輳制御のアルゴリズムの種類によらないため、これ以上の説明は割愛する。 In addition, there is a possibility that a buffer exists in a communication device (for example, a relay device such as a router) on the communication path of the network and the buffer may overflow. Therefore, in TCP, the transmission side performs transmission processing so as not to cause congestion while limiting the data size to be transmitted by congestion control. At this time, the data size to be transmitted is determined by the congestion window on the transmission side. In TCP congestion control, the congestion window size is initially started from a small value, and the congestion window size is increased every time an ACK packet is received from the receiving side (data arrives at the receiving side). If the congestion window size is increased and a duplicate ACK or retransmission timeout occurs, it is judged that a packet loss (congestion) has occurred due to a buffer overflow on the communication path, and the congestion window size is reduced. Let In this way, in TCP, transmission processing is performed while limiting the data size to be transmitted, thereby preventing network congestion as much as possible. There are various congestion control algorithms, but since this embodiment does not depend on the type of the congestion control algorithm, further explanation is omitted.
送信側の通信装置は、送信ウィンドウサイズ(対向装置の受信ウィンドウサイズ)と輻輳ウィンドウサイズのどちらかが、ある閾値以下になった場合は、送信処理を中断する。
つまり、少なくともどちらかのウィンドウサイズが、閾値以下になった場合は、そのセッションについては、送信が中断される。この閾値には、例えばMSSなどの値が使われる。この送信が中断されたセッションは、対向機器からのACKパケットを受信して、送信ウィンドウサイズ(対向の受信ウィンドウサイズ)と輻輳ウィンドウサイズが更新され、いずれのウィドウサイズも閾値を上回れば、送信が再開される。
The communication device on the transmission side interrupts the transmission process when either the transmission window size (reception window size of the opposite device) or the congestion window size falls below a certain threshold.
That is, if at least one of the window sizes is equal to or smaller than the threshold value, transmission is interrupted for the session. For this threshold value, for example, a value such as MSS is used. The session for which transmission is interrupted receives an ACK packet from the opposite device, the transmission window size (opposite reception window size) and the congestion window size are updated, and if any window size exceeds the threshold, transmission is performed. Resumed.
上記のようにTCPでは、送信ウィンドウおよび輻輳ウィンドウを用いてフロー制御および輻輳制御を行っているため、コネクション確立状態にあり、かつ、送信バッファにデータが存在する場合においても、送信を行わない場合がある。仮に、フロー制御および輻輳制御を無視して、送信処理を行うと、転送効率が低下する可能性が存在する。例えば、受信側(対向機器側)の受信バッファ等が極端に小さな状況で、送信ウィンドウの上記閾値以下のサイズのデータを送信すると、転送効率が低下し、最大速度での転送ができなくなる可能性がある。また、セッションの通信経路が輻輳を起こしているに場合に、輻輳ウィンドウの上記閾値以下のサイズのデータを送信しても、同様に、転送効率が低下し、最大速度での転送ができなくなる可能性が存在する。また、フロー制御及び輻輳制御を行っている状態で、仮に第1または第2の実施形態のフローチャートで示した送信処理を行うと、フロー制御および輻輳制御によって送信が制限されているセッションに対して送信処理の動作がとられると、結局、データの送信は行われず、それまで行われたセッション情報の読み出し動作、およびその解析等の動作が無駄になる(空振り動作)。これは、データ転送装置にとって余分な負荷になるとともに、その動作の時間分、ネットワーク帯域の利用効率が低下する。そこで、第3の実施形態では、フロー制御および輻輳制御の状態も考慮して、送信処理を行うセッションを決定する。 As described above, in TCP, flow control and congestion control are performed using a transmission window and a congestion window. Therefore, even when there is a connection established state and data exists in the transmission buffer, transmission is not performed. There is. If the transmission process is performed while ignoring the flow control and the congestion control, there is a possibility that the transfer efficiency is lowered. For example, if the receiving buffer on the receiving side (opposite device side) is extremely small, sending data with a size smaller than the above threshold of the transmission window may reduce transfer efficiency and prevent transfer at the maximum speed There is. In addition, when the session communication path is congested, even if data with a size smaller than the above threshold value of the congestion window is transmitted, the transfer efficiency similarly decreases and it becomes impossible to transfer at the maximum speed. Sex exists. In addition, if the transmission process shown in the flowchart of the first or second embodiment is performed in the state where the flow control and the congestion control are performed, the session whose transmission is restricted by the flow control and the congestion control is performed. If the operation of the transmission process is taken, data is not transmitted after all, and the operations such as the session information reading operation and the analysis performed so far are wasted (idling operation). This becomes an extra load for the data transfer apparatus, and the use efficiency of the network band is lowered for the time of the operation. Therefore, in the third embodiment, a session for performing transmission processing is determined in consideration of the state of flow control and congestion control.
図7は、第3の実施形態に係るデータ転送装置を備えた通信装置を示すブロック図である。図1と同一の名称の要素には同一の符号を付して、変更または拡張された処理を除き、重複する説明を省略する。 FIG. 7 is a block diagram illustrating a communication apparatus including a data transfer apparatus according to the third embodiment. Elements having the same names as those in FIG. 1 are denoted by the same reference numerals, and redundant description is omitted except for processing that has been changed or expanded.
通信装置300の通信処理部14は、送信処理を行う送信処理部16と、受信処理を行う受信処理部15を備える。通信処理部14は、TCPの輻輳制御アルゴリズムを実行する機能を備えている。なお、第1および第2の実施形態でも、通信処理部14は、送信処理を行う処理部と受信処理を行う部を備えているが、本実施形態では、これらを明示的に記載している。
The
本実施形態のデータ転送装置101は、第1の実施形態の各処理部に加え、ウィンドウ状態管理部18を備える。ウィンドウ状態管理部18は、送信ウィンドウ及び輻輳ウィンドウの状態(すなわち、フロー制御および輻輳制御の状態)に応じて、セッション管理部11で管理しているセッションの状態の設定を制御する。
The
図8は、データ転送装置101におけるある1つのセッションの状態遷移図を表している。
FIG. 8 shows a state transition diagram of one session in the
第1の実施形態における非オフロード処理状態A101・オフロード処理状態A102に加え、オフロード処理状態(ウィンドウ更新待ち)104が設けられている。第1の実施形態で説明したオフロード処理状態を、オフロード処理状態(ウィンドウ更新待ち)104と区別するため、オフロード状態(送信可能)A102と表現している。オフロード処理状態(送信可能)A102は、セッションの第1の状態、オフロード処理状態(ウィンドウ更新待ち)A104は、セッションの第2の状態に相当する。 In addition to the non-offload processing state A101 and the offload processing state A102 in the first embodiment, an offload processing state (waiting for window update) 104 is provided. In order to distinguish the offload processing state described in the first embodiment from the offload processing state (waiting for window update) 104, it is expressed as an offload state (transmittable) A102. The offload processing state (transmittable) A102 corresponds to the first state of the session, and the offload processing state (waiting for window update) A104 corresponds to the second state of the session.
オフロード処理状態(ウィンドウ更新待ち)104は、コネクションが確立していてセッション管理部11に登録はされているが、送信ウィンドウおよび輻輳ウィンドウの各ウィンドウサイズの少なくとも一方が閾値以下の状態である。送信ウィンドウのウィンドウサイズが閾値以下の状態を“送信ウィンドウが閉じている”、閾値より大きい状態を“送信ウィンドウが開いている”と表現することがある。輻輳ウィンドウのウィンドウサイズが閾値以下の状態を“輻輳ウィンドウが閉じている”、閾値より大きい状態を“輻輳ウィンドウが開いている”と表現することがある。送信ウィンドウの閾値と輻輳ウィンドウの閾値は同じであっても、異なってもよい。例えば両閾値ともMSSを用いてもよい。ウィンドウが閉じた状態にあるセッションは、セッション管理部11の選択対象から除外され、送信処理は行われない。
The offload processing state (waiting for window update) 104 is a state where a connection has been established and registered in the
ウィンドウ状態管理部18は、オフロード処理状態(送信可能)A102とオフロード処理状態(ウィンドウ更新待ち)A104の設定を、セッション管理部11に登録されている各セッションに対して管理する。
The window
例えば、オフロード処理状態(送信可能)A102にあるセッションについて、送信処理部16が、送信処理の開始時にウィンドウが閉じている事を検知した場合は、ウィンドウ状態管理部18にこの旨を通知する。通知を受けたウィンドウ状態管理部18が、当該セッションの状態を、オフロード処理状態(ウィンドウ更新待ち)A104に遷移させる(T106)。非オフロード処理状態A101ではなく、オフロード処理状態(ウィンドウ更新待ち)A104にするのは、送信バッファ104からのデータ送信は行わないが、対向機器301からのデータ受信処理やACKパケットやFINパケット、RSTパケットの送受信処理は行う必要があるためである。つまり、セッション管理部11でセッションが登録されている限り、データの送信処理は行わなくとも、上記制御関連の送受信処理は行われるよう、データ転送装置は動作する。
For example, if the
一方、オフロード処理状態(ウィンドウ更新待ち)A104において、受信処理部15が、対向機器301からのACKパケットを受け、TCPパケット内のウィンドウサイズおよびTCPの輻輳アルゴリズムに従って、送信および輻輳の各ウィンドウサイズが更新(同じ値に維持される場合もあり得る)されると、各ウィンドウサイズを、各々閾値と比較する。両方とも閾値よりも大きくなった場合は、受信処理部15が、ウィンドウ状態管理部18にこの旨を通知する。通知を受けたウィンドウ状態管理部18は、当該セッションの状態を、オフロード処理状態(送信可能)A102に遷移させる(T107)。あるいは、各ウィンドウサイズが閾値よりも大きくなったかを確認せずに、ACKパケットを受信したら、即座に、オフロード処理状態(送信可能)A102へ遷移させるように構成してもよい。これは、ACKパケットの受信時には、各ウィンドウサイズが更新される可能性が高いと考える事ができるためであり、仮にいずれか一方のウィンドウサイズが閾値以下のまま、オフロード処理状態(送信可能)A102に遷移させたとしても、次の送信処理時に再度、オフロード処理状態(ウィンドウ更新待ち)A104に遷移させることができるためである。
On the other hand, in the offload processing state (waiting for window update) A104, the
また、オフロード処理状態(ウィンドウ更新待ち)A104において、コネクション処理部22からコネクションの切断の通知を受けると、セッション管理部11は、当該セッションの登録を削除する。すなわち、当該セッションのセッションIDを削除する。これにより、当該セッションは、非オフロード処理状態A101に遷移する(T108)。
In addition, in the offload processing state (waiting for window update) A104, when receiving a disconnection notification from the
送信ウィンドウサイズおよび輻輳ウィンドウサイズの値は、各セッションのセッション情報に含めて管理してもよい。例えば受信処理部15におけるACKパケットの受信等により、送信ウィンドウサイズおよび輻輳ウィンドウサイズの新たな値が取得されると、該当するセッションのセッション情報に、更新後の値を書き込んで(上書きして)もよい。
また、ウィンドウ状態管理部18が、定期的または任意のイベント発生時に、セッション情報内の各ウィンドウサイズと、各々の閾値とを比較し、上述した判断方法に従って、セッションの状態の設定を制御してもよい。任意のイベントとしては、例えばセッション情報における各ウィンドウサイズの少なくとも一方が更新されたときに、通信処理部がウィンドウ状態管理部18にその旨を通知し、これをトリガーとすることが考えられるが、これに限定されない。
The values of the transmission window size and the congestion window size may be managed by being included in the session information of each session. For example, when new values of the transmission window size and the congestion window size are acquired by receiving the ACK packet in the
In addition, the window
図9は、本実施形態に係るデータ転送装置101における送信処理のフローチャートである。より詳細には、このフローチャートは、セッション管理部11に登録されている、オフロード処理状態(送信可能)A102にあるセッションに対して行う処理の流れを示している。
FIG. 9 is a flowchart of transmission processing in the
(ステップS301)セッション管理部11は、自身が管理しているセッションから、オフロード処理状態(送信可能)A102にあるセッションを1つ選択し、そのセッションに対して送信処理を開始するように、通信処理部14に通知する。
(Step S301) The
(ステップS302)通信処理部14の送信処理部16は、通知されたセッションに該当するセッション情報をセッション情報記憶部12から読み出す。
(Step S302) The
(ステップS303)送信処理部16は、セッション情報に含まれる送信ウィンドウおよび輻輳ウィンドウの各ウィンドウサイズの値から、送信ウィンドウおよび輻輳ウィンドウが開いているかを判断する。すなわち、各ウィンドウサイズの値が両方とも閾値より大きいかを判断する。
(Step S303) The
(ステップS307)送信処理部16は、少なくともいずれか一方のウィンドウが閉じていれば、すなわち、少なくとも一方のウィンドウサイズの値が閾値以下であれば、その旨をウィンドウ状態管理部18に通知する。ウィンドウ状態管理部18は、当該セッションの状態を、オフロード処理状態(ウィンドウ更新待ち)A104に設定する。この後、ステップS301に戻る。
(Step S307) If at least one of the windows is closed, that is, if the value of at least one of the windows is equal to or smaller than the threshold value, the
(ステップS304)一方、送信処理部16は、両ウィンドウとも開いていれば、データ読み出し部13に、読み出し指示、および必要に応じてバッファ情報等を送る。データ読み出し部13は、読み出し指示に従って、例えば1フレームに格納する分のデータを、送信バッファ104から読み出す。第1の実施形態と同様、1回の送信処理で、複数のフレームを送信する形態でもよい。ただし、読み出すデータサイズの上限値は、送信ウィンドウサイズまたは輻輳ウィンドウサイズの最小値となる。
(Step S304) On the other hand, if both windows are open, the
(ステップS305)送信処理部16は、データ読み出し部13からデータを受け取ると、セッション情報を元にヘッダを生成し、生成したヘッダをデータに結合する。また、ヘッダとデータからチェックサムを計算し、その計算結果を、データにさらに結合することで、フレームを生成する。送信処理部16は、生成したフレームをネットワーク201に出力する。
(Step S305) Upon receiving data from the
(ステップS306)送信処理部16は、フレームの送信後、セッション情報記憶部12における当該セッションのセッション情報を更新する。例えば今回送信したデータのサイズに応じて、セッション情報におけるシーケンス番号(送信済みシーケンス番号)を更新する。また、今回送信したデータの読み出しアドレス等から、セッション情報におけるバッファ情報を更新する。
(Step S306) After the transmission of the frame, the
なお、受信処理部15は、対向機器からACKパケット等を受信した場合は、セッション情報における送信ウィンドウサイズおよび輻輳ウィンドウサイズを更新する。更新により両ウィンドウサイズの値が閾値以下の状態から閾値を上回った場合は、ウィンドウ状態管理部18にその旨を通知する。ウィンドウ状態管理部18は、当該通知を受けて、該当するセッションの状態を、オフロード処理状態(送信可能)に更新する。
In addition, the
上述した実施形態では、送信ウィンドウと輻輳ウィンドウの両方のウィンドウを用いて送信処理を制御したが、いずれか一方のウィンドウのみを用いて制御を行ってもよい。例えば、送信ウィンドウの方を用いる場合、送信ウィンドウサイズが閾値より大きければ、そのセッションの状態をオフロード処理状態(送信可能)として、そのセッションを送信処理の対象とする。閾値以下であれば、オフロード処理状態(ウィンドウ更新待ち)として、そのセッションを送信処理の対象としない。同様に、輻輳ウィンドウの方を用いる場合も、輻輳ウィンドウサイズが閾値より大きければ、そのセッションの状態をオフロード処理状態(送信可能)として、そのセッションを送信処理の対象とする。閾値以下であれば、オフロード処理状態(ウィンドウ更新待ち)として、そのセッションを送信処理の対象としない。 In the above-described embodiment, the transmission process is controlled using both the transmission window and the congestion window. However, the control may be performed using only one of the windows. For example, when the transmission window is used, if the transmission window size is larger than the threshold value, the state of the session is set as an offload processing state (transmission is possible), and the session is set as a transmission processing target. If the value is equal to or less than the threshold value, the session is not subjected to transmission processing in the offload processing state (waiting for window update). Similarly, when the congestion window is used, if the congestion window size is larger than the threshold value, the state of the session is set as an offload processing state (transmittable), and the session is subjected to transmission processing. If the value is equal to or less than the threshold value, the session is not subjected to transmission processing in the offload processing state (waiting for window update).
以上、第3の実施形態に係る通信装置によれば、コネクションを確立しているセッションの内、ウィンドウが開いているセッションに対してのみ、順次、循環的に送信処理を実行するため、セッション間で均等に帯域を利用しつつ、効率よく転送をすることが可能となる。 As described above, according to the communication apparatus according to the third embodiment, the transmission process is sequentially and cyclically executed only for the session in which the window is open among the sessions in which the connection is established. Thus, it is possible to efficiently transfer while using the bandwidth equally.
なお、本発明は上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。 Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of components disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.
11:セッション管理部
12:セッション情報記憶部
13:データ読み出し部
14:通信処理部
15:受信処理部
16:送信処理部
17:バッファ状態管理部
18:ウィンドウ状態管理部
21:アプリケーション部
22:コネクション処理部
23:書き込み制御部
101:データ転送装置
102:ホストCPU
103:記憶装置
104:送信バッファ
201:ネットワーク
301:対向機器
11: Session management unit 12: Session information storage unit 13: Data reading unit 14: Communication processing unit 15: Reception processing unit 16: Transmission processing unit 17: Buffer state management unit 18: Window state management unit 21: Application unit 22: Connection Processing unit 23: Write control unit 101: Data transfer device 102: Host CPU
103: Storage device 104: Transmission buffer 201: Network 301: Counter device
Claims (8)
前記複数の対向機器に対して生成された複数のセッションの送信ウィンドウサイズの値が閾値より大きいときは、前記セッションに第1の状態、前記閾値以下のときは、第2の状態を設定するウィンドウ状態管理部と、
前記第1の状態が設定されたセッションを順次、循環的に選択するセッション管理部と、
前記セッション管理部で選択されたセッションに関連する対向機器に対してデータの送信処理を行う通信処理部と、を備え、
前記セッション管理部は、前記通信処理部で前記セッションに関連する確認応答パケットが前記対向機器から受信された場合は、前記送信ウィンドウサイズの値に拘わらず、前記セッションの状態を前記第1の状態に設定する
データ転送装置。 A data transfer device that communicates with a plurality of opposing devices via a network,
A window for setting the first state for the session when the value of the transmission window size of the plurality of sessions generated for the plurality of opposite devices is larger than the threshold, and the second state when the value is equal to or smaller than the threshold A state management unit;
A session management unit that sequentially and cyclically selects sessions in which the first state is set;
A communication processing unit that performs a data transmission process on the opposite device related to the session selected by the session management unit,
When the communication processing unit receives an acknowledgment packet related to the session from the opposite device, the session management unit sets the session state to the first state regardless of the value of the transmission window size. Set to the data transfer device.
前記複数の対向機器に対して生成された複数のセッションの輻輳ウィンドウサイズの値が閾値より大きいときは、前記セッションに第1の状態、前記閾値以下のときは、第2の状態を設定するウィンドウ状態管理部と、
前記第1の状態が設定されたセッションを順次、循環的に選択するセッション管理部と、
前記セッション管理部で選択されたセッションに関連する対向機器に対してデータの送信処理を行う通信処理部と、を備え、
前記セッション管理部は、前記通信処理部で前記セッションに関連する確認応答パケットが前記対向機器から受信された場合は、前記輻輳ウィンドウサイズの値に拘わらず、前記セッションの状態を前記第1の状態に設定する
データ転送装置。 A data transfer device that communicates with a plurality of opposing devices via a network,
A window for setting the first state for the session when the value of the congestion window size of the plurality of sessions generated for the plurality of opposite devices is larger than the threshold, and the second state when the value is less than the threshold A state management unit;
A session management unit that sequentially and cyclically selects sessions in which the first state is set;
A communication processing unit that performs a data transmission process on the opposite device related to the session selected by the session management unit,
When the communication processing unit receives an acknowledgment packet related to the session from the opposite device, the session management unit sets the session state to the first state regardless of the value of the congestion window size. Set to the data transfer device.
請求項1ないし2のいずれか一項に記載のデータ転送装置。 The data transfer apparatus according to claim 1, wherein the plurality of sessions are sessions in which connections are established with the plurality of opposite devices.
請求項1ないし3のいずれか一項に記載のデータ転送装置。 The data transfer device according to any one of claims 1 to 3, wherein the communication processing unit communicates with the opposite device according to TCP / IP.
請求項1ないし4のいずれか一項に記載のデータ転送装置と、
を備えた通信装置。 A host CPU that generates the session for the plurality of opposing devices;
A data transfer device according to any one of claims 1 to 4,
A communication device comprising:
前記コネクション処理部は、前記コネクションを確立すると、前記コネクションを確立したセッションの識別子を前記データ転送装置に通知し、
前記データ転送装置の前記セッション管理部は、前記ホストCPUから通知された識別子に基づき前記セッションを選択する
請求項5に記載の通信装置。 The host CPU includes a connection processing unit that controls establishment and disconnection of the connection with the opposite device for the session,
When the connection processing unit establishes the connection, it notifies the data transfer device of the identifier of the session that established the connection,
The communication apparatus according to claim 5, wherein the session management unit of the data transfer apparatus selects the session based on an identifier notified from the host CPU.
前記複数の対向機器に対して生成された複数のセッションの送信ウィンドウサイズの値が閾値より大きいときは、前記セッションに第1の状態、前記閾値以下のときは、第2の状態を設定するウィンドウ状態管理ステップと、
前記第1の状態が設定されたセッションを順次、循環的に選択するセッション管理ステップと、
前記セッション管理ステップで選択されたセッションに関連する対向機器に対してデータの送信処理を行う通信処理ステップと、を備え、
前記セッション管理ステップは、前記通信処理ステップで前記セッションに関連する確認応答パケットが前記対向機器から受信された場合は、前記送信ウィンドウサイズの値に拘わらず、前記セッションの状態を前記第1の状態に設定する
データ転送方法。 A data transfer method for communicating with a plurality of opposing devices via a network,
A window for setting the first state for the session when the value of the transmission window size of the plurality of sessions generated for the plurality of opposite devices is larger than the threshold, and the second state when the value is equal to or smaller than the threshold A state management step;
A session management step for sequentially and cyclically selecting the sessions in which the first state is set;
A communication processing step of performing a data transmission process on the opposite device related to the session selected in the session management step,
When an acknowledgment packet related to the session is received from the opposite device in the communication processing step, the session management step sets the session state to the first state regardless of the value of the transmission window size. Set the data transfer method to.
前記複数の対向機器に対して生成された複数のセッションの輻輳ウィンドウサイズの値が閾値より大きいときは、前記セッションに第1の状態、前記閾値以下のときは、第2の状態を設定するウィンドウ状態管理ステップと、
前記第1の状態が設定されたセッションを順次、循環的に選択するセッション管理ステップと、
前記セッション管理ステップで選択されたセッションに関連する対向機器に対してデータの送信処理を行う通信処理ステップと、を備え、
前記セッション管理ステップは、前記通信処理ステップで前記セッションに関連する確認応答パケットが前記対向機器から受信された場合は、前記輻輳ウィンドウサイズの値に拘わらず、前記セッションの状態を前記第1の状態に設定する
データ転送方法。 A data transfer method for communicating with a plurality of opposing devices via a network,
A window for setting the first state for the session when the value of the congestion window size of the plurality of sessions generated for the plurality of opposite devices is larger than the threshold, and the second state when the value is less than the threshold A state management step;
A session management step for sequentially and cyclically selecting the sessions in which the first state is set;
A communication processing step of performing a data transmission process on the opposite device related to the session selected in the session management step,
In the session management step, when an acknowledgment packet related to the session is received from the opposite device in the communication processing step, the session state is set to the first state regardless of the value of the congestion window size. Set the data transfer method to.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017238134A JP6568571B2 (en) | 2017-12-12 | 2017-12-12 | Data transfer device, data transfer method, and communication device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017238134A JP6568571B2 (en) | 2017-12-12 | 2017-12-12 | Data transfer device, data transfer method, and communication device |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014081278A Division JP2015204466A (en) | 2014-04-10 | 2014-04-10 | Data transfer device, data transfer method, and communication device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018061287A JP2018061287A (en) | 2018-04-12 |
JP6568571B2 true JP6568571B2 (en) | 2019-08-28 |
Family
ID=61910119
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017238134A Active JP6568571B2 (en) | 2017-12-12 | 2017-12-12 | Data transfer device, data transfer method, and communication device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6568571B2 (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3726741B2 (en) * | 2001-11-16 | 2005-12-14 | 日本電気株式会社 | Packet transfer apparatus, method and program |
US10873613B2 (en) * | 2010-12-09 | 2020-12-22 | Xilinx, Inc. | TCP processing for devices |
JP2013121028A (en) * | 2011-12-07 | 2013-06-17 | Nippon Telegr & Teleph Corp <Ntt> | Data packet transmission method and system |
JP2013144410A (en) * | 2012-01-16 | 2013-07-25 | Canon Inc | Image forming apparatus, control method thereof, and program therefor |
-
2017
- 2017-12-12 JP JP2017238134A patent/JP6568571B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2018061287A (en) | 2018-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8943206B2 (en) | Network bandwidth detection and distribution | |
TWI530123B (en) | Communication devices and communication methods | |
US20060203730A1 (en) | Method and system for reducing end station latency in response to network congestion | |
CN104052684B (en) | The method and system of MTU size in dynamic adaptation computer network | |
JP5651805B2 (en) | Communication device | |
US20090268747A1 (en) | Communication apparatus | |
JP2018508151A (en) | Method, apparatus, and system for transmitting transmission control protocol TCP data packet | |
KR20190095487A (en) | Packet transmission method, terminal, network device and communication system | |
JP2010535002A (en) | Bandwidth reservation for data flow in interconnected networks | |
JPWO2008023656A1 (en) | Communication device | |
EP3910903B1 (en) | Data compression method and base station | |
KR20130116066A (en) | Transmitting data over a plurality of different networks | |
KR101275047B1 (en) | Network offloading with reduced packet loss | |
JP2018196053A (en) | Communication device, communication method, and program | |
JP6606919B2 (en) | Flow switch, controller, and relay device | |
JP6568571B2 (en) | Data transfer device, data transfer method, and communication device | |
US9882820B2 (en) | Communication apparatus | |
US20220286532A1 (en) | Method and apparatus for obtaining shared maximum segment size mss | |
JP5662779B2 (en) | Communication system and node device | |
JP2015204466A (en) | Data transfer device, data transfer method, and communication device | |
JP2017163346A (en) | Communication device, method and program | |
JP6279970B2 (en) | Processor, communication apparatus, communication system, communication method, and computer program | |
KR102131427B1 (en) | Method and apparatus for performing a congestion control in stream control transmission protocol | |
JP5737756B2 (en) | Communication apparatus and packet discard reduction method | |
KR101933175B1 (en) | Mediatioin appratus mediating communication betwwen server and client |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180111 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180111 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180928 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20181121 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190409 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190515 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20190705 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190802 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6568571 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |