JP6568571B2 - Data transfer device, data transfer method, and communication device - Google Patents

Data transfer device, data transfer method, and communication device Download PDF

Info

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
Application number
JP2017238134A
Other languages
Japanese (ja)
Other versions
JP2018061287A (en
Inventor
優太 小林
優太 小林
山口 健作
健作 山口
田中 信吾
信吾 田中
康達 橋
康達 橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2017238134A priority Critical patent/JP6568571B2/en
Publication of JP2018061287A publication Critical patent/JP2018061287A/en
Application granted granted Critical
Publication of JP6568571B2 publication Critical patent/JP6568571B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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.

特開2013−46173号公報JP 2013-46173 A

本発明の実施形態は、各セッションに対してネットワークの帯域をできるだけ均等に割り当てることを目的とする。   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. .

第1の実施形態に係るデータ転送装置を備えた通信装置を示すブロック図。The block diagram which shows the communication apparatus provided with the data transfer apparatus which concerns on 1st Embodiment. 第1の実施形態に係るセッションの状態遷移図。The session state transition diagram concerning a 1st embodiment. 第1の実施形態の動作を示すフローチャート。The flowchart which shows operation | movement of 1st Embodiment. 第2の実施形態に係るデータ転送装置を備えた通信装置を示すブロック図。The block diagram which shows the communication apparatus provided with the data transfer apparatus which concerns on 2nd Embodiment. 第2の実施形態に係るセッションの状態遷移図。The session state transition diagram concerning a 2nd embodiment. 第2の実施形態の動作を示すフローチャート。The flowchart which shows operation | movement of 2nd Embodiment. 第3の実施形態に係るデータ転送装置を備えた通信装置を示すブロック図。The block diagram which shows the communication apparatus provided with the data transfer apparatus which concerns on 3rd Embodiment. 第3の実施形態に係るセッションの状態遷移図。The session state transition diagram concerning a 3rd embodiment. 第3の実施形態の動作を示すフローチャート。The flowchart which shows operation | movement of 3rd Embodiment.

以下、図面を参照しながら、本発明の実施形態について説明する。   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 communication device 100 illustrated in FIG. 1 is connected to one or more opposing devices 301 via a network 201. The network 201 is a wireless network, a wired network, or a hybrid network thereof, and as an example is the Internet.

通信装置100は、各対向機器301に対し、TCP等の通信プロトコルに従ってセッションを生成し、生成したセッションに基づき通信する。この通信装置は、一例として、対向機器301の要求に応じて画像、音声、動画、テキストなどのデータを供給するサーバ装置である。通信装置の形態は、これに限定されず、対向機器301に対しセッションを生成して通信を行う装置であれば、スマートフォン、PC、タブレット、携帯端末などのユーザ端末でもよい。具体的な製品形態としては、これらのサーバ装置やPC等の他、専用LSI、またはFPGA(Field Programmable Gate Array)等の形態も可能であるが、これらに限定されるものではない。   The communication device 100 generates a session according to a communication protocol such as TCP to each of the opposing devices 301 and communicates based on the generated session. As an example, this communication device is a server device that supplies data such as an image, a sound, a moving image, and text in response to a request from the opposing device 301. The form of the communication device is not limited to this, and may be a user terminal such as a smartphone, a PC, a tablet, or a mobile terminal as long as it is a device that generates a session with the opposite device 301 and performs communication. As a specific product form, a form such as a dedicated LSI or an FPGA (Field Programmable Gate Array) can be used in addition to these server devices and PCs, but is not limited thereto.

各対向機器301は、スマートフォン、PC、タブレット、携帯端末、などのユーザ端末でもよいし、家庭内の家電装置などでもよい。通信装置100とセッションを生成して、通信装置からデータの供給を受ける装置であれば、どのような装置でもかまわない。   Each opposing device 301 may be a user terminal such as a smartphone, a PC, a tablet, or a portable terminal, or may be a household electrical appliance device or the like. Any device that generates a session with the communication device 100 and receives data from the communication device may be used.

図1の通信装置は、データ転送装置101と、ホストCPU(プロセッサ)102と、記憶装置103と、送信バッファ104を備えている。ホストCPU102は、セッション毎に、送信するデータを記憶装置103から読み出して送信バッファ104へ書き込むよう制御する。また、ホストCPU102は、各セッションについて、対向機器とのコネクションの確立・切断を制御する。データ転送装置101は、ホストCPU102でコネクションが確立されている各セッションについて、各セッションを循環的に選択し、選択したセッションに対して送信処理を行うことを繰り返す。送信処理では、セッションを生成した対向機器に対してデータを送信する。データ転送装置101は、セッション間で、各回の送信処理で送信するデータ量のばらつきを抑制するようにデータを送信する。これにより、各セッションに均等に送信の機会を与え、ネットワークの帯域をできるだけ均等に使用させる。   The communication device of FIG. 1 includes a data transfer device 101, a host CPU (processor) 102, a storage device 103, and a transmission buffer 104. The host CPU 102 controls to read data to be transmitted from the storage device 103 and write it to the transmission buffer 104 for each session. Further, the host CPU 102 controls establishment / disconnection of a connection with the opposite device for each session. The data transfer apparatus 101 repeatedly selects each session for each session for which a connection has been established by the host CPU 102 and repeats transmission processing for the selected session. In the transmission process, data is transmitted to the opposite device that generated the session. The data transfer apparatus 101 transmits data so as to suppress variation in the amount of data transmitted in each transmission process between sessions. This gives each session an equal opportunity for transmission and uses the network bandwidth as evenly as possible.

記憶装置103には、送信用のデータを格納している。記憶装置103の具体的な実装形態は、例えばSSD(Solid State Drive)やHDD(Hard Disk Drive)、SDカード、SDRAM等が想定されるがその限りではない。   The storage device 103 stores data for transmission. Specific implementation forms of the storage device 103 are, for example, SSD (Solid State Drive), HDD (Hard Disk Drive), SD card, SDRAM, and the like, but are not limited thereto.

送信バッファ104は、一時的にデータを保持するための記憶領域である。送信バッファ104には、セッション毎に使用する領域が予め割り当てられていてもよい。送信バッファ104は、記憶装置103上に配置されてもよいし、メインメモリなど別の装置上に配置されてもよい。また、後述のデータ転送装置101内に配置してもよい。   The transmission buffer 104 is a storage area for temporarily holding data. In the transmission buffer 104, an area to be used for each session may be allocated in advance. The transmission buffer 104 may be disposed on the storage device 103 or may be disposed on another device such as a main memory. Further, it may be arranged in the data transfer apparatus 101 described later.

ホストCPU102は、通信装置100全体の制御を行う。ホストCPU102は、ソフトウェアで実現される主な処理部として、アプリケーション部21と、コネクション処理部22と、書き込み制御部23とを備える。アプリケーション部21は、データ送信アプリケーションを実行する処理部である。   The host CPU 102 controls the entire communication device 100. The host CPU 102 includes an application unit 21, a connection processing unit 22, and a write control unit 23 as main processing units realized by software. The application unit 21 is a processing unit that executes a data transmission application.

コネクション処理部22は、使用する通信プロトコル(ここではTCP/IPを想定)に応じて、対向機器301とのセッションを生成し、当該セッションで対向機器301と通信を行うためのコネクションを確立・切断する処理を行う。コネクション処理部22は、生成したセッションに固有のIDを割り振る。このIDをセッションIDと呼ぶ。コネクション処理部22は、コネクションを確立または切断するための制御パケットを、データ転送装置101の通信処理部14を介して、対向機器301と送受信する。制御パケットの例として、SYNパケットやFINパケット、これらのパケットに付随して送受信するパケット等がある。   The connection processing unit 22 generates a session with the counterpart device 301 according to the communication protocol to be used (here, TCP / IP is assumed), and establishes / disconnects a connection for communicating with the counterpart device 301 in the session. Perform the process. The connection processing unit 22 assigns a unique ID to the generated session. This ID is called a session ID. The connection processing unit 22 transmits / receives a control packet for establishing or disconnecting the connection to / from the opposite device 301 via the communication processing unit 14 of the data transfer apparatus 101. Examples of the control packet include a SYN packet, a FIN packet, and a packet transmitted / received accompanying these packets.

コネクション処理部22は、コネクションを確立または切断すると、コネクションの確立または切断の通知を、データ転送装置101のセッション管理部11に行う。この際、確立または切断の対象となったセッションIDを通知する。コネクションの確立の通知は、当該コネクションで最初に送信するデータが発生した時、または当該データを後述のデータ書込制御部23の制御で送信バッファ104に書き込んだ時などに行うことがあり得る。   When the connection processing unit 22 establishes or disconnects the connection, the connection processing unit 22 notifies the session management unit 11 of the data transfer apparatus 101 of the connection establishment or disconnection notification. At this time, the session ID that has been established or disconnected is notified. The connection establishment notification may be made when data to be transmitted first occurs in the connection, or when the data is written in the transmission buffer 104 under the control of the data write control unit 23 described later.

ここで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 data transfer apparatus 101 according to the present embodiment also performs transmission processing and reception processing with the opposite device 301 related to the session for each session.

書き込み制御部23は、記憶装置103に格納されているデータを、送信バッファ104に書き込むための制御を行う。書き込み制御の方法は、装置構成に応じて、任意の方法を用いればよい。例えば、記憶装置103が内部にDMAC(ダイレクトメモリアクセスコントローラ)(図示せず)を内蔵し、書き込み制御部23が、DMACに指示信号を出力することで、DMACが送信バッファ104にデータ書き込みを行ってもよい。この場合、書き込み制御部23が、DMACに、送信バッファ104における書き込みアドレスを指示すればよい。または、ホストCPU102自身が、記憶装置103からデータを読み出して、送信バッファ104に書き込んでもよい。あるいは、専用のハードウェアを用いて書き込み処理を行ってもよい。   The write control unit 23 performs control for writing data stored in the storage device 103 to the transmission buffer 104. An arbitrary method may be used as the writing control method depending on the apparatus configuration. For example, the storage device 103 has a built-in DMAC (direct memory access controller) (not shown), and the write control unit 23 outputs an instruction signal to the DMAC so that the DMAC writes data to the transmission buffer 104. May be. In this case, the write control unit 23 may indicate the write address in the transmission buffer 104 to the DMAC. Alternatively, the host CPU 102 itself may read data from the storage device 103 and write it in the transmission buffer 104. Alternatively, the writing process may be performed using dedicated hardware.

なお、ホストCPU102は、上述した処理外にも、種々の処理を行う事が可能である。   The host CPU 102 can perform various processes in addition to the processes described above.

データ転送装置101は、ホストCPU102に代行し、TCP/IPに従って、データの送信処理、および受信処理を行う。データ転送装置101は、セッション毎に、送信バッファ104に書き込まれたデータを読み出して、TCP/IP等のプロトコル処理を行う。これにより、フレームを生成する。そして、生成したフレームをネットワーク201へ送出する。このようなデータ転送装置101は、セッション管理部11、セッション情報記憶部12、データ読み出し部13、通信処理部14を備える。データ転送装置101は、ハードウェアとソフトウェア(プログラム)のどちらで構成しても良く、これらの両方で構成されてもよい。   The data transfer apparatus 101 performs data transmission processing and reception processing according to TCP / IP on behalf of the host CPU 102. For each session, the data transfer apparatus 101 reads the data written in the transmission buffer 104 and performs protocol processing such as TCP / IP. As a result, a frame is generated. Then, the generated frame is transmitted to the network 201. Such a data transfer apparatus 101 includes a session management unit 11, a session information storage unit 12, a data reading unit 13, and a communication processing unit 14. The data transfer apparatus 101 may be configured with either hardware or software (program), or may be configured with both.

セッション管理部11は、コネクション処理部22からコネクション確立の通知を受けると、コネクション確立されたセッションのIDを登録する。また、コネクション切断の通知を受けると、コネクション切断されたセッションのIDを削除する。これにより、セッション管理部11は、コネクション確立状態にあるセッションを内部で把握する。以下では、セッションIDを登録または削除することを、セッションを登録または削除と表現ンすることがある。   When the session management unit 11 receives a connection establishment notification from the connection processing unit 22, the session management unit 11 registers the ID of the session for which the connection has been established. In addition, when the connection disconnection notification is received, the ID of the session disconnected is deleted. Thereby, the session management part 11 grasps | ascertains the session in a connection establishment state inside. Hereinafter, registering or deleting a session ID may be expressed as registering or deleting a session.

セッション管理部11は、登録されているセッションIDに基づき、各セッションを循環的に順次選択し、選択したセッションについて、通信処理部14に送信処理を行うことを指示する指示情報を出力する。循環的にセッションを選択する方法として、例えば、登録されているセッションIDをキューに保持しておき、先頭から順次セッションIDを読み出し、読み出したセッションIDを再度、キューの末尾に格納する方式を用いてもよい。キューは、データ転送装置101の内部または外部のバッファに格納しておく。   The session management unit 11 cyclically selects each session sequentially based on the registered session ID, and outputs instruction information for instructing the communication processing unit 14 to perform transmission processing for the selected session. As a method for selecting a session cyclically, for example, a method is used in which registered session IDs are held in a queue, session IDs are read sequentially from the top, and the read session IDs are stored again at the end of the queue. May be. The queue is stored in a buffer inside or outside the data transfer apparatus 101.

または、コネクション処理部22で確立された各セッションのIDとコネクション状態(確立または切断)を保持したテーブルを、データ転送装置101の内部または外部のバッファに保持しておく。当該テーブルの各エントリを順次、循環的に確認して、コネクション確立状態にあるセッションを選択する方法などでもよい。この場合、セッション管理部11にセッションが登録されているとは、テーブルにおいてセッションIDが登録され、コネクション状態が「確立」の状態を意味する。なお、ここで述べた方法以外で、セッションを選択する方法でもかまわない。   Alternatively, a table holding the ID and connection status (established or disconnected) of each session established by the connection processing unit 22 is held in an internal or external buffer of the data transfer apparatus 101. A method may be used in which each entry of the table is sequentially and cyclically checked to select a session in a connection established state. In this case, that a session is registered in the session management unit 11 means that the session ID is registered in the table and the connection state is “established”. In addition to the method described here, a method of selecting a session may be used.

セッション情報記憶部12は、セッション管理部11で登録されている各セッションのセッション情報を記憶する。セッション情報は、前述したセッション(宛先IPアドレス/発信元IPアドレス/宛先ポート番号/発信元ポート番号)の値、および、TCP/IPヘッダを生成するために必要なその他の情報(シーケンス番号、確認応答番号(ACKシーケンス番号)等)を含む。また、MSS(Maximum Segment Size)をセッション情報に含めてもよい。MSSがすべてのセッションで共通であれば、別に管理してもよい。   The session information storage unit 12 stores session information of each session registered in the session management unit 11. The session information includes the value of the above-described session (destination IP address / source IP address / destination port number / source port number) and other information (sequence number, confirmation, etc.) necessary for generating the TCP / IP header. Response number (ACK sequence number), etc.). Further, MSS (Maximum Segment Size) may be included in the session information. If the MSS is common to all sessions, it may be managed separately.

また、セッション情報は、送信バッファ104のどの位置に、当該セッション用のデータが書き込まれているかを特定するためのバッファ情報も含む。バッファ情報は、送信バッファ104において、まだ送信されていないデータを格納しているアドレスを特定する情報を含む。例えば、バッファ情報は、送信バッファ104において読み出し済みのデータの末尾のアドレス(またはまだ読み出されていないデータの先頭アドレス)を指す読み出しポインタ、書き込みが完了したデータの末尾のアドレスを指す書き込みポインタとの組でもよい。これ以外の表現方法でバッファ情報を構成してもよい。   The session information also includes buffer information for specifying in which position in the transmission buffer 104 the data for the session is written. The buffer information includes information for specifying an address storing data that has not yet been transmitted in the transmission buffer 104. For example, the buffer information includes a read pointer that indicates the end address of data that has been read in the transmission buffer 104 (or the start address of data that has not been read yet), a write pointer that indicates the end address of data that has been written, and It may be a pair. The buffer information may be configured by other representation methods.

セッション情報記憶部12は、データ転送装置101内に配置されてもよいし、データ転送装置101外(例えばメインメモリ等)に配置されてもよい。セッション情報は、セッション管理部11へのセッションの登録(すなわちセッションIDの登録)時に、セッション情報記憶部12に登録され、セッション管理部11からセッションが削除される時に削除されてもよい。また、セッション情報記憶部12内のセッション情報は、セッションに対応する送信処理が行われたとき、また、送信バッファ104にセッションに対応するデータが書き込まれたときになどに更新されてもよい。ここで述べたセッション情報の登録および削除、更新は、ホストCPU102またはデータ転送装置101が行い、どちらが行うように構成しても構わない。   The session information storage unit 12 may be arranged in the data transfer apparatus 101 or may be arranged outside the data transfer apparatus 101 (for example, a main memory). The session information may be registered in the session information storage unit 12 when a session is registered in the session management unit 11 (that is, a session ID is registered), and may be deleted when the session is deleted from the session management unit 11. The session information in the session information storage unit 12 may be updated when a transmission process corresponding to the session is performed, when data corresponding to the session is written in the transmission buffer 104, or the like. The registration, deletion, and update of the session information described here are performed by the host CPU 102 or the data transfer apparatus 101, and either may be configured to be performed.

例えばデータ転送装置101のセッション管理部11が、セッションIDの登録時にセッション情報を生成して、セッション情報記憶部12内にセッション情報を格納してもよい。セッション情報の生成に必要な情報は、ホストCPU102から取得すればよい。または、セッション管理部11へのセッションの登録時に、ホストCPU102のコネクション処理部22または別の処理部がセッション情報を生成して、セッション情報記憶部12に格納してもよい。   For example, the session management unit 11 of the data transfer apparatus 101 may generate session information when registering a session ID, and store the session information in the session information storage unit 12. Information necessary for generating session information may be acquired from the host CPU 102. Alternatively, when registering a session in the session management unit 11, the connection processing unit 22 of the host CPU 102 or another processing unit may generate session information and store it in the session information storage unit 12.

また、データ転送装置101のセッション管理部11が、セッションIDの削除時に、該当するセッション情報をセッション情報記憶部12内から削除してもよい。または、セッション管理部11からのセッションIDの削除時に、ホストCPU102のコネクション処理部22または別の処理部が、セッション情報記憶部12からセッション情報を削除してもよい。   Further, the session management unit 11 of the data transfer apparatus 101 may delete the corresponding session information from the session information storage unit 12 when deleting the session ID. Alternatively, when the session ID is deleted from the session management unit 11, the connection processing unit 22 of the host CPU 102 or another processing unit may delete the session information from the session information storage unit 12.

また、ホストCPU102の書き込み制御部23の制御により、送信バッファ104にデータを書き込んだときに、ホストCPU102またはデータ転送装置101が、該当するセッション情報(例えばセッション情報内のバッファ情報等)を更新してもよい。また、データ転送装置101の通信処理部14が、送信処理を実行したときに、該当するセッション情報(バッファ情報、シーケンス番号等)を更新してもよい。   Further, when data is written in the transmission buffer 104 under the control of the write control unit 23 of the host CPU 102, the host CPU 102 or the data transfer device 101 updates the corresponding session information (for example, buffer information in the session information). May be. Further, when the communication processing unit 14 of the data transfer apparatus 101 executes transmission processing, the corresponding session information (buffer information, sequence number, etc.) may be updated.

データ読み出し部13は、通信処理部14からデータの読み出し指示を受けて、送信バッファ104からデータを読み出す。データ読み出し部13は、読み出したデータを通信処理部14に送る。送信バッファ104における読み出しアドレスは、通信処理部14が、セッション情報内のバッファ情報から算出して、通信処理部14に通知する構成でもよいし、データ読み出し部13が、当該バッファ情報から算出してもよい。または、バッファ情報は、セッション情報から分離して、データ読み出し部13が管理するように構成してもよい。   The data reading unit 13 reads data from the transmission buffer 104 in response to a data reading instruction from the communication processing unit 14. The data reading unit 13 sends the read data to the communication processing unit 14. The read address in the transmission buffer 104 may be configured such that the communication processing unit 14 calculates from the buffer information in the session information and notifies the communication processing unit 14, or the data reading unit 13 calculates from the buffer information. Also good. Alternatively, the buffer information may be separated from the session information and managed by the data reading unit 13.

通信処理部14は、セッション管理部11から循環的に指示される各セッションに対して、データの送信処理を行う。通信処理部14は、当該セッションに対応するバッファ情報を確認することで、送信バッファ104における未送信のデータの位置およびサイズ等の情報を知る事ができる。よって、バッファ情報を元に、送信バッファ104からデータを読み出して、送信を実行できる。   The communication processing unit 14 performs data transmission processing for each session that is cyclically instructed from the session management unit 11. The communication processing unit 14 can know information such as the position and size of untransmitted data in the transmission buffer 104 by confirming buffer information corresponding to the session. Therefore, based on the buffer information, data can be read from the transmission buffer 104 and transmitted.

具体的には、通信処理部14は、セッション管理部11から次に送信処理を行うセッションを指定されると、該当するセッション情報を取得して、セッション情報に含まれるシーケンス番号や確認応答番号、ポート番号等からTCP/IPのヘッダを生成する。また、データ読み出し部13に、当該セッションに対応するデータの読み出しを指示する。この際、セッション情報内のバッファ情報から読み出しアドレスを算出して、データ読み出し部13へ通知してもよい。通信処理部14は、データ読み出し部13により読み出されたデータを取得し、取得したデータに、上述のヘッダや、別途計算したチェックサム等を結合してフレームを生成する。通信処理部14は、生成したフレームをネットワーク201へ送出する。   Specifically, when a session to be transmitted next is designated by the session management unit 11, the communication processing unit 14 acquires the corresponding session information, and acquires a sequence number or an acknowledgment number included in the session information, A TCP / IP header is generated from the port number and the like. In addition, the data reading unit 13 is instructed to read data corresponding to the session. At this time, a read address may be calculated from the buffer information in the session information and notified to the data reading unit 13. The communication processing unit 14 acquires the data read by the data reading unit 13, and generates a frame by combining the acquired data with the above-described header and a separately calculated checksum. The communication processing unit 14 sends the generated frame to the network 201.

また、通信処理部14は、ここで述べたデータ送信以外にも、対向機器301からのデータ受信処理や、ACKパケット、FINパケット、RSTパケット等の送受信処理を行う。なお、通信処理部14は、前述した制御パケットをネットワーク201から受信した場合は、当該制御パケットの情報をホストCPU102に、メインメモリ等のメモリを介して渡す。また、通信処理部14は、ホストCPU102から渡された情報に基づき、制御パケットを生成してネットワーク201に送信してもよい。制御パケットの生成をホストCPU101が行ってもよい。   In addition to the data transmission described here, the communication processing unit 14 performs a data reception process from the opposite device 301 and a transmission / reception process such as an ACK packet, a FIN packet, and an RST packet. When the communication processing unit 14 receives the above-described control packet from the network 201, the communication processing unit 14 passes the control packet information to the host CPU 102 via a memory such as a main memory. Further, the communication processing unit 14 may generate a control packet based on information passed from the host CPU 102 and transmit it to the network 201. The host CPU 101 may generate the control packet.

図2は、データ転送装置101におけるある1つのセッションの状態遷移図を表している。セッションの状態として、非オフロード処理状態A101とオフロード処理状態A102が存在する。   FIG. 2 shows a state transition diagram of one session in the data transfer apparatus 101. There are a non-offload processing state A101 and an offload processing state A102 as session states.

ある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 connection processing unit 22. When a connection is established for the session and the session is registered in the session management unit 11, the session state transitions to the offload processing state A102 (T101). When the session is deleted from the session management unit 11, the session transits to the non-offload processing state A101 (T102).

オフロード処理状態A102では、当該セッションは、オフロード処理状態A102にある他のセッション群とともに、セッション管理部11により循環的に(均等に)、順次選択され、通信処理部14により、当該セッションに関する送信処理が行われる。すなわち、オフロード処理状態A102にある各セッションは、それぞれ均等に送信の機会を割り当てられ、データを送信できる。一方、非オフロード処理状態A101にある当該セッションは、セッション管理部11に登録されておらず、送信の機会は与えられない。   In the offload processing state A102, the session is selected cyclically (equally) by the session management unit 11 together with other session groups in the offload processing state A102, and the communication processing unit 14 relates to the session. Transmission processing is performed. That is, each session in the offload processing state A102 is equally assigned a transmission opportunity and can transmit data. On the other hand, the session in the non-offload processing state A101 is not registered in the session management unit 11, and no transmission opportunity is given.

つまり、ホストCPU102は、セッション管理部11にセッションIDを登録する事で、任意のセッションの送信処理を、データ転送装置101に代行依頼する。データ転送装置101は、セッション管理部11に登録されたセッションに対して、均等に順番に送信処理を実施する。また、ホストCPU102は、コネクションの切断を通知することで、セッション管理部11に登録されているセッションIDを除外し、これにより、当該セッションについて、データ転送装置101による送信処理を停止できる。   That is, the host CPU 102 requests the data transfer apparatus 101 to perform an arbitrary session transmission process by registering a session ID in the session management unit 11. The data transfer apparatus 101 performs the transmission process equally for the sessions registered in the session management unit 11 in order. Further, the host CPU 102 can notify the disconnection of the connection, thereby excluding the session ID registered in the session management unit 11, thereby stopping the transmission processing by the data transfer apparatus 101 for the session.

図3は、データ転送装置101における送信処理のフローチャートである。   FIG. 3 is a flowchart of transmission processing in the data transfer apparatus 101.

(ステップS101)まず、セッション管理部11は、自身が管理しているセッションから、1つのセッションを選択し、そのセッションに対して送信処理を開始するように通信処理部14に通知する。 (Step S101) First, the session management unit 11 selects one session from the sessions managed by itself, and notifies the communication processing unit 14 to start transmission processing for the session.

(ステップS102)通信処理部14は、セッション管理部11から通知されたセッションに対応するセッション情報を、セッション情報記憶部12から読み出す。通信処理部14は、読み出したセッション情報から、データの読み出しに必要な情報を特定し、特定した情報を、読み出し指示とともに、データ読み出し部13に送る。データの読み出しに必要な情報は、例えば、送信バッファ104における読み出しアドレス(バッファ情報)や、MSS(Maximum Segment Size)などを含んでもよい。これらの情報をデータ読み出し部13が内部で管理している場合は、通信処理部14は読み出し指示のみを送る構成でもよい。 (Step S <b> 102) The communication processing unit 14 reads the session information corresponding to the session notified from the session management unit 11 from the session information storage unit 12. The communication processing unit 14 specifies information necessary for reading data from the read session information, and sends the specified information to the data reading unit 13 together with a read instruction. Information necessary for reading data may include, for example, a read address (buffer information) in the transmission buffer 104, an MSS (Maximum Segment Size), and the like. When the data reading unit 13 manages these pieces of information internally, the communication processing unit 14 may be configured to send only a reading instruction.

(ステップS103)データ読み出し部13は、通信処理部14の読み出し指示に従って、送信バッファ104からデータを読み出す。例えば、1フレームに格納する分のデータを読み出す。 (Step S <b> 103) The data reading unit 13 reads data from the transmission buffer 104 in accordance with a reading instruction from the communication processing unit 14. For example, the data stored in one frame is read.

例えば、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 transmission buffer 104, the data is read by 1460 bytes out of 4 KB. Alternatively, when MSS is set to 1460 bytes and 512 bytes of data exist in the transmission buffer 104, 512 bytes of data are read. In the present embodiment, it is assumed that one frame is transmitted in one transmission process for each session, but a predetermined plurality of frames may be transmitted. In this case, the data stored in each frame is read out by the number of frames. Naturally, when there is no data to be stored in the frame, the number of frames to be transmitted is smaller than the predetermined number. That is, the upper limit value of the number of frames transmitted in each session and each transmission process is common.

(ステップS104)通信処理部14は、データ読み出し部13からデータを受け取ると、セッション情報を元にヘッダを生成し、ヘッダをデータと結合する。また、ヘッダとデータからチェックサムを計算し、その計算結果をデータにさらに付加することで、フレームを生成する。通信処理部14は、生成したフレームを、ネットワーク201に出力する。 (Step S104) Upon receiving data from the data reading unit 13, the communication processing unit 14 generates a header based on the session information and combines the header with the data. Also, a checksum is calculated from the header and data, and the calculation result is further added to the data to generate a frame. The communication processing unit 14 outputs the generated frame to the network 201.

(ステップS105)通信処理部14は、フレームを送信したセッションに対応するセッション情報を更新する。例えば、今回送信したデータのサイズに基づき、セッション情報におけるシーケンス番号(送信済みシーケンス番号)を更新する。また、今回、送信バッファ104から読み出しを行ったアドレス、または、今回送信したデータのサイズ等から、セッション情報におけるバッファ情報を更新する。その他、必要に応じて、セッション情報内の他の項目の値を更新する。ただし、バッファ情報の更新は、再送処理を考慮して、送信したデータに該当するACKパケットを受信したタイミングで行う構成でも良い。 (Step S105) The communication processing unit 14 updates session information corresponding to the session that transmitted the frame. For example, the sequence number (sent sequence number) in the session information is updated based on the size of the data transmitted this time. Further, the buffer information in the session information is updated from the address read from the transmission buffer 104 this time, the size of the data transmitted this time, or the like. In addition, the values of other items in the session information are updated as necessary. However, the buffer information may be updated at a timing when an ACK packet corresponding to the transmitted data is received in consideration of retransmission processing.

(変形例)
第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 transmission buffer 104 among sessions managed by the session management unit 11 are selected as targets for transmission processing. In the first embodiment, as long as it is registered in the session management unit 11, a session for which there is no data to be transmitted is also selected. For this reason, when the transmission processing operation is performed for the session, there is no data to be transmitted. Therefore, the data transmission is not performed, and the session information read operation performed so far, analysis thereof, etc. Is wasted (skipping motion). 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 present embodiment, this problem is solved by excluding sessions having no data to be transmitted from session selection targets for transmission processing.

図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 data transfer apparatus 101 in the communication apparatus 200 according to the present embodiment includes a buffer state management unit 17 in addition to the processing units according to the first embodiment. The buffer status management unit 17 manages the setting of the status of each session registered in the session management unit 11 according to the data storage status in the transmission buffer 104.

図5は、データ転送装置101におけるある1つのセッションの状態遷移図を表している。   FIG. 5 shows a state transition diagram of one session in the data transfer apparatus 101.

第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 session management unit 11, but no transmission data exists in the transmission buffer 104. In this state, the session management unit 11 excludes the session from selection targets for transmission processing.

バッファ状態管理部17は、オフロード処理状態(送信可能)A102とオフロード処理状態(データ待ち)A103の設定を、セッション管理部11で管理されている各セッションに対して管理する。   The buffer state management unit 17 manages the settings of the offload processing state (transmittable) A102 and the offload processing state (data waiting) A103 for each session managed by the session management unit 11.

例えば、オフロード処理状態(送信可能)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 transmission buffer 104, the communication processing unit 14 notifies the buffer state management unit 17 to that effect. Receiving the notification, the buffer state management unit 17 sets the state of the session in the session management unit 11 to the offload processing state (data waiting) A103 (T103).

ここで、非オフロード処理状態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 data transfer apparatus 101 does not transfer data from the transmission buffer 104, This is because control-related transmission / reception processing such as an ACK packet, FIN packet, and RST packet needs to be performed with the opposite device 301. That is, as long as a session is registered in the session management unit 11, the data transfer apparatus operates so that the control-related transmission / reception process is performed without performing the data transmission process.

また、書き込み制御部23が、その制御により、送信バッファ104にデータを書き込んだ時に、その旨をバッファ状態管理部17に通知する。通知を受けたバッファ状態管理部17は、セッション管理部11における当該セッションの状態を、オフロード処理状態(データ待ち)A103から、オフロード処理状態(送信可能)A102に変える(T104)。なお、当該セッションが、元々オフロード処理状態(送信可能)A102であれば、その状態を維持する。   Further, when the write control unit 23 writes data to the transmission buffer 104 by the control, the write control unit 23 notifies the buffer state management unit 17 to that effect. Upon receiving the notification, the buffer state management unit 17 changes the state of the session in the session management unit 11 from the offload processing state (data waiting) A103 to the offload processing state (transmittable) A102 (T104). If the session is originally in the offload processing state (transmittable) A102, the state is maintained.

また、オフロード処理状態(データ待ち)A103において、コネクション処理部22からコネクションの切断の通知を受けると、セッション管理部11は、当該セッションの登録を削除する。すなわち、当該セッションのセッションIDを削除する。これにより、当該セッションは、非オフロード処理状態A101に遷移する(T105)。   In the offload processing state (waiting for data) A103, when receiving a disconnection notification from the connection processing unit 22, the session management unit 11 deletes the registration of the session. That is, the session ID of the session is deleted. As a result, the session transitions to the non-offload processing state A101 (T105).

セッション管理部11は、オフロード処理状態(送信可能)A102にあるセッションのみを循環的に選択して、通信処理部14に送信処理を実行させる。これにより、コネクションは確立しているが、送信バッファ104にデータが存在しないセッションに対しては、送信処理の動作を開始させずに済む。   The session management unit 11 cyclically selects only the sessions in the offload processing state (transmittable) A102 and causes the communication processing unit 14 to execute transmission processing. As a result, a connection is established, but it is not necessary to start the transmission processing operation for a session in which no data exists in the transmission buffer 104.

図6は、本実施形態に係るデータ転送装置101における送信処理のフローチャートである。より詳細には、このフローチャートは、セッション管理部11に登録されている、オフロード処理状態(送信可能)A102にあるセッションに対して行う処理の流れを示している。   FIG. 6 is a flowchart of transmission processing in the data transfer apparatus 101 according to the present embodiment. More specifically, this flowchart shows a flow of processing performed for a session registered in the session management unit 11 and in the offload processing state (transmittable) A102.

(ステップS201)セッション管理部11は、自身が管理しているセッションから、オフロード処理状態(送信可能)A102にあるセッションを1つ選択し、そのセッションに対して送信処理を開始するように、通信処理部14に通知する。 (Step S201) The session management unit 11 selects one session in the offload processing state (transmittable) A102 from the sessions managed by the session management unit 11 and starts transmission processing for the session. The communication processing unit 14 is notified.

(ステップS202)通信処理部14は、通知されたセッションに該当するセッション情報をセッション情報記憶部12から読み出す。通信処理部14は、セッション情報から、送信バッファ104からのデータの読み出しに必要な情報(例えばバッファ情報、MSSなど)を特定する。 (Step S202) The communication processing unit 14 reads out the session information corresponding to the notified session from the session information storage unit 12. The communication processing unit 14 specifies information (for example, buffer information, MSS, etc.) necessary for reading data from the transmission buffer 104 from the session information.

(ステップS203)通信処理部14は、特定した情報から、送信バッファ104に送信用のデータが存在するかを判断する。例えば、バッファ情報が、読み出すべきアドレスが存在しないことを示す場合(例えば読み出しポインタと書き込みポインタが一致している場合)は、送信バッファ104にデータが存在しないと判断する。それ以外の場合は、データが存在すると判断できる。 (Step S203) The communication processing unit 14 determines whether there is transmission data in the transmission buffer 104 from the specified information. For example, when the buffer information indicates that there is no address to be read (for example, when the read pointer and the write pointer match), it is determined that there is no data in the transmission buffer 104. In other cases, it can be determined that data exists.

(ステップS207)通信処理部14は、送信バッファ104にデータが存在しないと判断したときは、その旨をバッファ状態管理部17に通知する。バッファ状態管理部17は、そのセッションの状態を、オフロード処理状態(データ待ち)A103に設定する。この後、ステップS201に戻る。 (Step S207) When the communication processing unit 14 determines that there is no data in the transmission buffer 104, the communication processing unit 14 notifies the buffer state management unit 17 to that effect. The buffer state management unit 17 sets the state of the session to the offload processing state (data waiting) A103. Thereafter, the process returns to step S201.

(ステップS204)一方、通信処理部14は、送信バッファ104にデータが存在すると判断したときは、通信処理部14は、データ読み出し部13に、読み出し指示、および、必要に応じてバッファ情報等を送る。データ読み出し部13は、読み出し指示に従って、例えば1フレームに格納する分だけのデータを、送信バッファ104から読み出す。第1の実施形態と同様、各セッションについて、1回の送信処理毎に、1フレーム分の送信を想定しているが、1回の送信処理で、複数のフレームを送信する形態でもよい。 (Step S204) On the other hand, when the communication processing unit 14 determines that data is present in the transmission buffer 104, the communication processing unit 14 sends a read instruction and, if necessary, buffer information or the like to the data reading unit 13. send. The data reading unit 13 reads from the transmission buffer 104 as much data as is stored in one frame, for example, according to the read instruction. As in the first embodiment, for each session, transmission for one frame is assumed for each transmission process. However, a plurality of frames may be transmitted in one transmission process.

(ステップS205)通信処理部14は、データ読み出し部13からデータを受け取ると、セッション情報を元にヘッダを生成し、生成したヘッダをデータと結合する。また、ヘッダとデータからチェックサムを計算し、その計算結果を、データにさらに付加することで、フレームを生成する。通信処理部14は、生成したフレームをネットワーク201に出力する。 (Step S205) Upon receiving data from the data reading unit 13, the communication processing unit 14 generates a header based on the session information, and combines the generated header with the data. In addition, a checksum is calculated from the header and data, and the calculation result is further added to the data to generate a frame. The communication processing unit 14 outputs the generated frame to the network 201.

(ステップS206)通信処理部14は、フレームの送信後、セッション情報記憶部12における当該セッションのセッション情報を更新する。例えば今回送信したデータのサイズに応じて、セッション情報におけるシーケンス番号(送信済みシーケンス番号)を更新する。また、今回送信したデータを読み出したアドレスに応じて、セッション情報におけるバッファ情報を更新する。バッファ情報の更新は、再送処理を考慮して、送信したフレームに該当するACKパケットを受信したタイミングで行う構成でも良い。 (Step S206) After transmitting the frame, the communication processing unit 14 updates the session information of the session in the session information storage unit 12. For example, the sequence number (sent sequence number) in the session information is updated according to the size of the data transmitted this time. Also, the buffer information in the session information is updated according to the address from which the data transmitted this time is read. The buffer information may be updated at a timing when an ACK packet corresponding to the transmitted frame is received in consideration of retransmission processing.

上述した処理では、通信処理部14は、送信バッファ104にデータが存在するかの判断を、送信処理の開始時に行ったが、送信処理の完了後に、送信バッファ104にデータが存在するかの判断を行ってもよい。つまり、図6のステップS203、S206の処理を、ステップS205またはS206の後に行ってもよい。   In the processing described above, the communication processing unit 14 determines whether data exists in the transmission buffer 104 at the start of the transmission processing, but determines whether data exists in the transmission buffer 104 after the transmission processing is completed. May be performed. That is, the processing in steps S203 and S206 in FIG. 6 may be performed after step S205 or S206.

また、上述した実施形態では、送信バッファ104にデータが存在するかの判断を通信処理部14が行ったが、この判断をバッファ状態管理部17が行うようにしてもよい。この場合、バッファ状態管理部17は、書き込み制御部23から、セッション毎に、新たに送信バッファ104に書き込まれたデータのアドレスの通知を受け、また通信処理部14からは、送信バッファ104から読み出したデータのアドレス(あるいは、送信済みでACKパケットを受信したデータのアドレス)の通知を受ける。バッファ状態管理部17は、例えば書き込まれたデータの末尾のアドレスを書き込みポインタ、読み出し済みのデータの末尾のアドレスを読み出しポインタとし、データ転送装置101の内部または外部のバッファ(メモリ)で管理する。バッファ状態管理部17は、これらのポインタを比較することで、まだ読み出されていないデータが存在するか判断できる。まだ読み出されていないデータが存在することを検知した場合は、当該セッションの状態を、オフロード状態(データ待ち)A103に遷移させる。   In the above-described embodiment, the communication processing unit 14 determines whether data exists in the transmission buffer 104. However, the buffer state management unit 17 may perform this determination. In this case, the buffer state management unit 17 receives a notification of the address of data newly written in the transmission buffer 104 for each session from the write control unit 23, and reads out from the transmission buffer 104 from the communication processing unit 14. Notification of the address of the received data (or the address of the data that has been transmitted and received the ACK packet) is received. The buffer status management unit 17 uses, for example, the end address of the written data as a write pointer and the end address of the read data as a read pointer, and manages it in a buffer (memory) inside or outside the data transfer apparatus 101. The buffer state management unit 17 can determine whether there is data that has not yet been read by comparing these pointers. When it is detected that there is data that has not yet been read, the session state is changed to the offload state (data waiting) A103.

以上、第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 transmission buffer 104. This makes it possible to transfer efficiently while using the bandwidth equally between sessions.

(第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 communication processing unit 14 of the communication device 300 includes a transmission processing unit 16 that performs transmission processing and a reception processing unit 15 that performs reception processing. The communication processing unit 14 has a function of executing a TCP congestion control algorithm. In the first and second embodiments as well, the communication processing unit 14 includes a processing unit that performs transmission processing and a unit that performs reception processing. In the present embodiment, these are explicitly described. .

本実施形態のデータ転送装置101は、第1の実施形態の各処理部に加え、ウィンドウ状態管理部18を備える。ウィンドウ状態管理部18は、送信ウィンドウ及び輻輳ウィンドウの状態(すなわち、フロー制御および輻輳制御の状態)に応じて、セッション管理部11で管理しているセッションの状態の設定を制御する。   The data transfer apparatus 101 of the present embodiment includes a window state management unit 18 in addition to the processing units of the first embodiment. The window state management unit 18 controls the setting of the session state managed by the session management unit 11 in accordance with the state of the transmission window and the congestion window (that is, the state of flow control and congestion control).

図8は、データ転送装置101におけるある1つのセッションの状態遷移図を表している。   FIG. 8 shows a state transition diagram of one session in the data transfer apparatus 101.

第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 session management unit 11, but at least one of the window sizes of the transmission window and the congestion window is equal to or smaller than a threshold value. A state in which the window size of the transmission window is equal to or smaller than a threshold value may be expressed as “the transmission window is closed”, and a state larger than the threshold value may be expressed as “the transmission window is open”. A state where the window size of the congestion window is equal to or smaller than a threshold value may be expressed as “the congestion window is closed”, and a state larger than the threshold value may be expressed as “the congestion window is open”. The transmission window threshold and the congestion window threshold may be the same or different. For example, MSS may be used for both threshold values. Sessions in which the window is closed are excluded from selection targets of the session management unit 11 and transmission processing is not performed.

ウィンドウ状態管理部18は、オフロード処理状態(送信可能)A102とオフロード処理状態(ウィンドウ更新待ち)A104の設定を、セッション管理部11に登録されている各セッションに対して管理する。   The window state management unit 18 manages the settings of the offload processing state (transmittable) A102 and the offload processing state (waiting for window update) A104 for each session registered in the session management unit 11.

例えば、オフロード処理状態(送信可能)A102にあるセッションについて、送信処理部16が、送信処理の開始時にウィンドウが閉じている事を検知した場合は、ウィンドウ状態管理部18にこの旨を通知する。通知を受けたウィンドウ状態管理部18が、当該セッションの状態を、オフロード処理状態(ウィンドウ更新待ち)A104に遷移させる(T106)。非オフロード処理状態A101ではなく、オフロード処理状態(ウィンドウ更新待ち)A104にするのは、送信バッファ104からのデータ送信は行わないが、対向機器301からのデータ受信処理やACKパケットやFINパケット、RSTパケットの送受信処理は行う必要があるためである。つまり、セッション管理部11でセッションが登録されている限り、データの送信処理は行わなくとも、上記制御関連の送受信処理は行われるよう、データ転送装置は動作する。   For example, if the transmission processing unit 16 detects that the window is closed at the start of transmission processing for the session in the offload processing state (transmittable) A102, the window state management unit 18 is notified of this fact. . Upon receiving the notification, the window state management unit 18 transitions the state of the session to an offload processing state (waiting for window update) A104 (T106). The non-offload processing state A101, not the offload processing state (waiting for window update) A104, is that data transmission from the transmission buffer 104 is not performed, but data reception processing from the opposite device 301, ACK packet, or FIN packet This is because the transmission / reception process of the RST packet needs to be performed. That is, as long as a session is registered in the session management unit 11, the data transfer apparatus operates so that the control-related transmission / reception process is performed without performing the data transmission process.

一方、オフロード処理状態(ウィンドウ更新待ち)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 reception processing unit 15 receives the ACK packet from the opposite device 301, and each window size for transmission and congestion is determined according to the window size in the TCP packet and the TCP congestion algorithm. Is updated (which may be maintained at the same value), each window size is compared to a threshold value. When both are larger than the threshold value, the reception processing unit 15 notifies the window state management unit 18 of this fact. Upon receiving the notification, the window state management unit 18 transitions the state of the session to the offload processing state (transmittable) A102 (T107). Alternatively, it may be configured such that when an ACK packet is received without confirming whether each window size is larger than the threshold, the state immediately transitions to the offload processing state (transmittable) A102. This is because when receiving an ACK packet, it can be considered that there is a high possibility that each window size will be updated. If any one of the window sizes remains below the threshold value, the offload processing state (transmittable) is possible. This is because even if the transition is made to A102, it is possible to transit again to the offload processing state (waiting for window update) A104 during the next transmission process.

また、オフロード処理状態(ウィンドウ更新待ち)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 connection processing unit 22, the session management unit 11 deletes the registration of the session. That is, the session ID of the session is deleted. As a result, the session transitions to the non-offload processing state A101 (T108).

送信ウィンドウサイズおよび輻輳ウィンドウサイズの値は、各セッションのセッション情報に含めて管理してもよい。例えば受信処理部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 reception processing unit 15, the updated value is written (overwritten) in the session information of the corresponding session. Also good.
In addition, the window state management unit 18 compares each window size in the session information with each threshold value periodically or when any event occurs, and controls the setting of the session state according to the determination method described above. Also good. As an arbitrary event, for example, when at least one of the window sizes in the session information is updated, the communication processing unit may notify the window state management unit 18 of this, and this may be used as a trigger. It is not limited to this.

図9は、本実施形態に係るデータ転送装置101における送信処理のフローチャートである。より詳細には、このフローチャートは、セッション管理部11に登録されている、オフロード処理状態(送信可能)A102にあるセッションに対して行う処理の流れを示している。   FIG. 9 is a flowchart of transmission processing in the data transfer apparatus 101 according to the present embodiment. More specifically, this flowchart shows a flow of processing performed for a session registered in the session management unit 11 and in the offload processing state (transmittable) A102.

(ステップS301)セッション管理部11は、自身が管理しているセッションから、オフロード処理状態(送信可能)A102にあるセッションを1つ選択し、そのセッションに対して送信処理を開始するように、通信処理部14に通知する。 (Step S301) The session management unit 11 selects one session in the offload processing state (transmittable) A102 from the sessions managed by the session management unit 11, and starts transmission processing for the session. The communication processing unit 14 is notified.

(ステップS302)通信処理部14の送信処理部16は、通知されたセッションに該当するセッション情報をセッション情報記憶部12から読み出す。 (Step S302) The transmission processing unit 16 of the communication processing unit 14 reads out the session information corresponding to the notified session from the session information storage unit 12.

(ステップS303)送信処理部16は、セッション情報に含まれる送信ウィンドウおよび輻輳ウィンドウの各ウィンドウサイズの値から、送信ウィンドウおよび輻輳ウィンドウが開いているかを判断する。すなわち、各ウィンドウサイズの値が両方とも閾値より大きいかを判断する。 (Step S303) The transmission processing unit 16 determines whether the transmission window and the congestion window are open from the values of the window sizes of the transmission window and the congestion window included in the session information. That is, it is determined whether each window size value is larger than the threshold value.

(ステップ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 transmission processing unit 16 notifies the window state management unit 18 to that effect. The window state management unit 18 sets the state of the session to the offload processing state (waiting for window update) A104. Thereafter, the process returns to step S301.

(ステップS304)一方、送信処理部16は、両ウィンドウとも開いていれば、データ読み出し部13に、読み出し指示、および必要に応じてバッファ情報等を送る。データ読み出し部13は、読み出し指示に従って、例えば1フレームに格納する分のデータを、送信バッファ104から読み出す。第1の実施形態と同様、1回の送信処理で、複数のフレームを送信する形態でもよい。ただし、読み出すデータサイズの上限値は、送信ウィンドウサイズまたは輻輳ウィンドウサイズの最小値となる。 (Step S304) On the other hand, if both windows are open, the transmission processing unit 16 sends a read instruction and, if necessary, buffer information or the like to the data reading unit 13. The data reading unit 13 reads from the transmission buffer 104, for example, the data stored in one frame in accordance with the read instruction. Similar to the first embodiment, a plurality of frames may be transmitted in one transmission process. However, the upper limit value of the data size to be read is the minimum value of the transmission window size or the congestion window size.

(ステップS305)送信処理部16は、データ読み出し部13からデータを受け取ると、セッション情報を元にヘッダを生成し、生成したヘッダをデータに結合する。また、ヘッダとデータからチェックサムを計算し、その計算結果を、データにさらに結合することで、フレームを生成する。送信処理部16は、生成したフレームをネットワーク201に出力する。 (Step S305) Upon receiving data from the data reading unit 13, the transmission processing unit 16 generates a header based on the session information, and combines the generated header with the data. In addition, a checksum is calculated from the header and data, and the calculation result is further combined with the data to generate a frame. The transmission processing unit 16 outputs the generated frame to the network 201.

(ステップS306)送信処理部16は、フレームの送信後、セッション情報記憶部12における当該セッションのセッション情報を更新する。例えば今回送信したデータのサイズに応じて、セッション情報におけるシーケンス番号(送信済みシーケンス番号)を更新する。また、今回送信したデータの読み出しアドレス等から、セッション情報におけるバッファ情報を更新する。 (Step S306) After the transmission of the frame, the transmission processing unit 16 updates the session information of the session in the session information storage unit 12. For example, the sequence number (sent sequence number) in the session information is updated according to the size of the data transmitted this time. Also, the buffer information in the session information is updated from the read address of the data transmitted this time.

なお、受信処理部15は、対向機器からACKパケット等を受信した場合は、セッション情報における送信ウィンドウサイズおよび輻輳ウィンドウサイズを更新する。更新により両ウィンドウサイズの値が閾値以下の状態から閾値を上回った場合は、ウィンドウ状態管理部18にその旨を通知する。ウィンドウ状態管理部18は、当該通知を受けて、該当するセッションの状態を、オフロード処理状態(送信可能)に更新する。   In addition, the reception process part 15 updates the transmission window size and congestion window size in session information, when an ACK packet etc. are received from an opposing apparatus. When the value of both window sizes exceeds the threshold value from the state below the threshold value due to the update, the window state management unit 18 is notified accordingly. Upon receiving the notification, the window state management unit 18 updates the state of the corresponding session to an offload processing state (transmittable).

上述した実施形態では、送信ウィンドウと輻輳ウィンドウの両方のウィンドウを用いて送信処理を制御したが、いずれか一方のウィンドウのみを用いて制御を行ってもよい。例えば、送信ウィンドウの方を用いる場合、送信ウィンドウサイズが閾値より大きければ、そのセッションの状態をオフロード処理状態(送信可能)として、そのセッションを送信処理の対象とする。閾値以下であれば、オフロード処理状態(ウィンドウ更新待ち)として、そのセッションを送信処理の対象としない。同様に、輻輳ウィンドウの方を用いる場合も、輻輳ウィンドウサイズが閾値より大きければ、そのセッションの状態をオフロード処理状態(送信可能)として、そのセッションを送信処理の対象とする。閾値以下であれば、オフロード処理状態(ウィンドウ更新待ち)として、そのセッションを送信処理の対象としない。   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.
前記通信処理部は、前記対向機器とTCP/IPに従って通信する
請求項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.
前記複数の対向機器に対して前記セッションを生成するホストCPUと、
請求項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は、前記セッションについて前記対向機器とコネクションの確立および切断を制御するコネクション処理部を備え、
前記コネクション処理部は、前記コネクションを確立すると、前記コネクションを確立したセッションの識別子を前記データ転送装置に通知し、
前記データ転送装置の前記セッション管理部は、前記ホスト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.
JP2017238134A 2017-12-12 2017-12-12 Data transfer device, data transfer method, and communication device Active JP6568571B2 (en)

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)

* Cited by examiner, † Cited by third party
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

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