JP2021093611A - Communication device, control method, and program - Google Patents
Communication device, control method, and program Download PDFInfo
- Publication number
- JP2021093611A JP2021093611A JP2019222650A JP2019222650A JP2021093611A JP 2021093611 A JP2021093611 A JP 2021093611A JP 2019222650 A JP2019222650 A JP 2019222650A JP 2019222650 A JP2019222650 A JP 2019222650A JP 2021093611 A JP2021093611 A JP 2021093611A
- Authority
- JP
- Japan
- Prior art keywords
- data
- packet
- packet management
- management structure
- position information
- 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.)
- Granted
Links
Images
Abstract
Description
本発明はパケット送信を行う通信装置に関する。 The present invention relates to a communication device that transmits packets.
通信装置の送信処理は、通信装置内のCPU(Central Processing Unit)に搭載されたプロトコルスタックにより実行される。プロトコルスタックの送信処理では、アプリケーションから送信API(Application Programming Interface)で指定された送信データに対し、データを送信するために必要なプロトコル処理が実行される。 The transmission process of the communication device is executed by the protocol stack mounted on the CPU (Central Processing Unit) in the communication device. In the transmission process of the protocol stack, the protocol process necessary for transmitting the data is executed for the transmission data specified by the transmission API (Application Programming Interface) from the application.
プロトコル処理を実行する際に、送信APIにより指定されたユーザデータはアプリケーションバッファからプロトコルスタックが管理するバッファ(送信バッファ、ネットワークバッファ)へコピーされる。送信バッファ内に格納されているユーザデータに対し、TCPヘッダ(またはUDPヘッダ)およびIPヘッダを生成して付加することでパケットが形成され、当該パケットが外部へ送信される。TCPはTransmission Control Protocolの略である。UDPはUser Datagram Protocolの略である。 When executing the protocol processing, the user data specified by the transmission API is copied from the application buffer to the buffer (transmission buffer, network buffer) managed by the protocol stack. A packet is formed by generating and adding a TCP header (or UDP header) and an IP header to the user data stored in the transmission buffer, and the packet is transmitted to the outside. TCP is an abbreviation for Transmission Control Protocol. UDP is an abbreviation for User Datagram Protocol.
この送信処理を高速化するための方法として、ゼロコピー(Zero−copy)がある。ゼロコピーでは、送信バッファへのコピーを実施しないので、コピー処理にかかる時間を省略することが出来、その結果、送信処理を高速化することが出来る(特許文献1)。 As a method for speeding up this transmission process, there is zero copy (Zero-copy). In zero copy, since copying to the transmission buffer is not performed, the time required for the copy processing can be omitted, and as a result, the transmission processing can be speeded up (Patent Document 1).
また、Linux(登録商標)などのOSでは、データをより効率よく送信するための送信APIとしてsendmmsg()が実装されている。OSはOperating Systemの略である。sendmmsg()では、複数のメッセージを一度のAPIコールで指定することが出来る。 Further, in an OS such as Linux (registered trademark), sendmmsg () is implemented as a transmission API for transmitting data more efficiently. OS is an abbreviation for Operating System. In sendmmsg (), multiple messages can be specified in one API call.
しかし、一回のAPIコールで複数のメッセージによる大容量のデータ送信を行い、かつその送信処理にゼロコピーが適用されている場合には、アプリケーションバッファを大きく占有してしまうことになる。特に送信するデータの通信プロトコルに再送制御が含まれている場合、データが通信相手に全て送信出来たことを確認出来るまで、アプリケーションバッファを解放することが出来ない。 However, if a large amount of data is transmitted by a plurality of messages in one API call and zero copy is applied to the transmission process, the application buffer will be largely occupied. In particular, when the communication protocol of the data to be transmitted includes retransmission control, the application buffer cannot be released until it can be confirmed that all the data has been transmitted to the communication partner.
本発明は、上述の課題を鑑み、パケット送信の際に使用するデータ格納部を効率的に使用できるようにすることを目的とする。 In view of the above problems, an object of the present invention is to enable efficient use of a data storage unit used at the time of packet transmission.
本発明の一つの態様による通信装置は、他の通信装置に送信するデータを格納する第一の格納手段と、前記第一の格納手段に格納されているデータのコピー先となる第二の格納手段と、前記データに使用する通信プロトコルに応じた通信ヘッダを生成する第一の生成手段と、前記通信ヘッダと前記データの格納位置情報とに基づいて、パケットを生成する第二の生成手段と、前記通信プロトコルが再送制御を含まない場合、前記第一の格納手段内の前記データの格納位置を前記格納位置情報とし、前記通信プロトコルが再送制御を含む場合、前記第二の格納手段内の前記データの格納位置を前記格納位置情報とする制御手段と、を有する。 The communication device according to one aspect of the present invention has a first storage means for storing data to be transmitted to another communication device and a second storage for copying the data stored in the first storage means. A means, a first generation means for generating a communication header according to a communication protocol used for the data, and a second generation means for generating a packet based on the communication header and the storage position information of the data. When the communication protocol does not include retransmission control, the storage position of the data in the first storage means is used as the storage position information, and when the communication protocol includes retransmission control, the data is stored in the second storage means. It has a control means for using the storage position of the data as the storage position information.
本発明によれば、パケット送信の際に使用するデータ格納部を効率的に使用できる。 According to the present invention, the data storage unit used at the time of packet transmission can be efficiently used.
以下、添付図面を参照して本発明の実施形態を詳細に説明する。なお、以下の実施形態は本発明を限定するものではなく、また、実施形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。実施形態の構成は、本発明が適用される装置の仕様や各種条件(使用条件、使用環境等)によって適宜修正または変更され得る。本発明の技術的範囲は、特許請求の範囲によって確定されるのであって、以下の個別の実施形態によって限定されない。 Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the following embodiments do not limit the present invention, and not all combinations of features described in the embodiments are essential for the means for solving the present invention. The configuration of the embodiment may be appropriately modified or changed depending on the specifications of the apparatus to which the present invention is applied and various conditions (use conditions, use environment, etc.). The technical scope of the present invention is determined by the claims and is not limited by the following individual embodiments.
<実施形態1>
<情報処理装置のハードウェアおよび機能構成>
本実施形態に係る情報処理装置100のブロック構成を図1に示す。
情報処理装置100は、情報処理装置100の全体の処理を実行する主処理部101と、通信プロトコル処理を実行する通信処理部105とを有する。主処理部101と通信処理部105はバスブリッジBにより相互に接続されている。本実施形態の情報処理装置100は、後述するように、ネットワーク120を介して外部装置との通信を行うことができるので、通信装置と称することもできる。情報処理装置100は、例えば、通信機能を備えるパーソナルコンピュータ、タブレット端末、スマートフォン、カメラ、プリンタ、プロジェクタなどである。
<Embodiment 1>
<Hardware and functional configuration of information processing equipment>
FIG. 1 shows a block configuration of the
The
主処理部101は、メインCPU102とメインメモリ103を有する。
メインCPU102は、プログラムの実行を行い、情報処理装置100全体の制御を実行する。実行するプログラムにはOSやアプリケーションが含まれる。
メインメモリ103は、メインCPU102や後述するサブCPU111が各処理を実行する際に必要となるデータやプログラムなどを格納する。メインメモリ103は、例えば、DRAM(Dynamic Random Access Memory)などの半導体メモリである。
The
The
The
メインメモリ103はアプリケーションバッファ104を有する。メインCPU102の制御の下で、アプリケーションバッファ104には、アプリケーションが使用するデータが格納される。例えば情報処理装置100がカメラである場合、動画像をクラウドへアップロードするアプリケーションが、撮像したデータをアプリケーションバッファ104へ格納する。その後、格納されたデータに対する送信処理が開始される。
また、アプリケーションバッファ104は、通信処理部105からもアクセス可能な領域である。なお、以下の記載において「アプリケーションデータ」とは、メインCPU102上で動作するアプリケーションが情報処理装置100からネットワーク120を介して外部装置(通信対向装置)へ送出しようとするデータを指す。
The
The
通信処理部105は、サブCPU111と、オンチップメモリ106と、データ転送部108と、LAN制御部109と、WLAN制御部110とを有する。LANはLocal Area Networkの略である。WLANはWireless LANの略である。
サブCPU111は、情報処理装置100の通信処理および制御を実行する(通信処理に関するプログラムの実行を行う)。実行するプログラムには、OSおよびプロトコルスタックが含まれる。
The
The
オンチップメモリ106は、サブCPU111およびデータ転送部108がアクセス可能なメモリである。オンチップメモリ106は、例えば、SRAM(Static Random Access Memory)などの半導体メモリであり、メインメモリ103から高速にアクセスすることが可能である。
The on-
オンチップメモリ106の内部には、サブCPU111によりパケット管理構造体107が複数構築される。パケット管理構造体107は、サブCPU111が送信データおよび受信データを取り扱う際に使用され、送信バッファや受信バッファとして使用される。パケット管理構造体107はデータ送受信処理に必要になったタイミングで獲得(構築され)、データ送受信処理が終了したら(つまり、パケット管理構造体107が不必要になったら)解放される。パケット管理構造体107については図2を用いて後述する。
A plurality of
データ転送部108は、サブCPU111の指示に基づきメモリ間のデータ転送およびメモリ内のデータ転送を実行する。データ転送部108はDMA(Direct Memory Access)コントローラを含む。DMAを利用すると、サブCPU111のメモリコピーによるデータ転送より高速にデータ転送を実行することが出来る。
LAN制御部109は、ネットワーク120へ接続する有線通信インターフェースであり、伝送パケット(送信パケット、受信パケット)の送信および受信を実行する。LAN制御部109は、伝送メディアのPHYおよびMAC(伝送メディア制御)ハードウェア回路を含む。例えば、LAN制御部109のインターフェースがEthernet(登録商標)に適合したインターフェースである場合、LAN制御部109はイーサネットNICであってよい。なお、NICとはNetwork Interface Cardの略である。
The
The
WLAN制御部110は、ネットワーク120に接続する無線通信インターフェースであり、伝送パケットの送受信を実行する。WLAN制御部110は、IEEE802.11a/b/g/n/ac等の無線LAN制御を実行するコントローラおよびRF回路を含む。なお、LAN制御部109およびWLAN制御部110をまとめて、送信部と称してもよい。
サブCPU111は、パケット生成部112を有する。パケット生成部112は、アプリケーションからのパケット送信要求(データ送信要求)を受け、送信パケットを生成する。送信パケットを生成する際、ネットワーク120の最大転送単位(MTU:Maximum Transfer Unit)を基準にして送信パケットを分割して生成する。
The
The
<パケット管理構造体の構造>
図2は、パケット管理構造体107の例を示す。パケット管理構造体107は、サブCPU111の起動時にオンチップメモリ106の所定の領域に構築され、送信処理および受信処理内で必要に応じて、ネットワークバッファ(送信バッファおよび受信バッファ)の獲得(取得)や解放が実行される。サブCPU111は、例えば、情報処理装置100の起動時と同時に起動される。なお、パケット管理構造体107は、メインメモリ103に構築してもよい。メインメモリ103に構築されるパケット管理構造体107は、オンチップメモリ106に構築されたパケット管理構造体107と同様に扱うことが出来る。
パケット管理構造体107は、2種類のパケット管理構造体(データエリアを有するパケット管理構造体と、データエリアを有さないパケット管理構造体)を有する。図2のバッファ200〜202はデータエリアを有するパケット管理構造体であり、バッファ210〜212はデータエリアを有さないパケット管理構造体である。
<Structure of packet management structure>
FIG. 2 shows an example of the
The
各パケット管理構造体200、201、202、210、211、212は、共通のメンバー(構成部分)として次バッファアドレス、次パケットアドレス、有効データ長およびデータポインタを有する。なお、図2では、各パケット管理構造体がメモリ上の連続領域に配置されているが、必ずしも連続領域に配置されている必要は無い。
パケット管理構造体の各メンバーについて、以下に説明する。本実施形態における、データエリア以外の各メンバー内の情報は、全てパケット生成部112により設定される。
Each
Each member of the packet management structure will be described below. In this embodiment, all the information in each member other than the data area is set by the
次バッファアドレスは、他のパケット管理構造体のアドレス情報を示す。例えばパケット管理構造体200に連結されるパケット管理構造体がパケット管理構造体202である場合は、パケット管理構造体200の次バッファアドレスには0x20001400が格納されている。一つのパケット管理構造体が有しているデータエリアに収まらないサイズのデータを格納したい場合に、パケット管理構造体を連結して格納することがあり、その際に本メンバーである「次バッファアドレス」が使用される。なお、パケット管理構造体200に連結されるパケット管理構造体は、パケット管理構造体201でもよい。
The next buffer address indicates the address information of other packet management structures. For example, when the packet management structure linked to the packet management structure 200 is the
次パケットアドレスは、パケット間の区切りを示すために使用される。次パケットアドレスに格納される情報は、次バッファアドレス同様、他のパケット管理構造体のアドレス情報である。
有効データ長は、データエリアに格納されているデータの長さを示す。有効データ長は、送信データのサイズ情報である。有効データ長が記憶される領域は、サイズ情報領域と称することができる。
データポインタは、パケット管理構造体が持つデータが格納されているメモリアドレスを示す。パケット管理構造体がデータエリアを有するパケット管理構造体である場合、データポインタはデータエリア内のアドレスを指すことになる。パケット管理構造体がデータエリアを持たないパケット管理構造体である場合、データポインタはパケット管理構造体外のメモリアドレスを指すことになる。本実施形態では、パケット管理構造体がデータエリアを持たないパケット管理構造体である場合、データポインタは、アプリケーションバッファ104内のメモリアドレスを指す。
The next packet address is used to indicate the delimiter between packets. The information stored in the next packet address is the address information of other packet management structures as well as the next buffer address.
The valid data length indicates the length of the data stored in the data area. The effective data length is the size information of the transmitted data. The area in which the effective data length is stored can be referred to as a size information area.
The data pointer indicates the memory address in which the data of the packet management structure is stored. When the packet management structure is a packet management structure having a data area, the data pointer points to an address in the data area. If the packet management structure is a packet management structure that does not have a data area, the data pointer will point to a memory address outside the packet management structure. In the present embodiment, when the packet management structure is a packet management structure having no data area, the data pointer points to the memory address in the
データエリアには、データが格納される。本実施形態では、送信パケットのペイロードが格納される。ペイロードはパケット生成部112によって書き込まれるか、パケット生成部112の指示に基づいてデータ転送部108によって書き込まれる。
Data is stored in the data area. In this embodiment, the payload of the transmitted packet is stored. The payload is written by the
<パケット送信処理フロー>
サブCPU111がパケットを生成して送信する処理について、図3に示したフローチャートを用いて説明する。図3では、データエリアを有するパケット管理構造体のみを使用してパケット生成して送信する処理について説明する。SはStepの略である。
本フローチャートの処理は、メインCPU102上で動作するアプリケーションが送信APIを呼び出すことで開始する(S301)。ここでは、送信APIとしてsend()やsendto()が呼び出されるとする。送信するデータ(以下、「送信データ」と称する)はアプリケーションバッファ104に格納されているとする。送信APIにより送信データサイズが決まる。
<Packet transmission processing flow>
The process of generating and transmitting a packet by the
The processing of this flowchart starts when the application running on the
S302において、パケット生成部112は送信データサイズに応じてパケット管理構造体107を取得する。ここでは、データエリアを有するパケット管理構造体を取得するものとし、複数のパケット管理構造体が必要な場合は、次バッファアドレス情報を利用してパケット管理構造体同士の連結を行う。
S303において、パケット生成部112は送信データをアプリケーションバッファ104からパケット管理構造体内のデータエリアへコピーする。S303のコピー処理により、送信データがパケット管理構造体に格納されたことになる。コピー先であるパケット管理構造体内のデータポインタには、データエリア内のメモリアドレスを設定し、有効データ長にはコピーしたデータサイズを設定する。データコピーの実行には、データ転送部108を利用することが出来る。データコピー完了後、コピーしたデータに対する送信処理が開始される。
In S302, the
In S303, the
S304において、パケット生成部112はコピーした送信データの中から送信する送信データのデータサイズを決定する。パケット生成部112は、データサイズをMTUサイズに基づいて決定する。情報処理装置100がTCPを通信プロトコルに使用している場合は、パケット生成部112は、MSS(Maximum Segment Size)に基づいてデータサイズを決定する。
In S304, the
S305において、パケット生成部112は送信データに対応する通信ヘッダを生成する。つまり、パケット生成部112は、送信データに使用する通信プロトコルに応じた通信ヘッダを生成する。また、パケット生成部112は、生成した通信ヘッダを格納するためのパケット管理構造体107を取得する。本実施形態では、パケット生成部112は、データエリアを有するパケット管理構造体を取得し、当該パケット管理構造体のデータエリアに通信ヘッダを格納する。パケット生成部112はヘッダを生成するので、ヘッダ生成部を兼ねる。
S306において、パケット生成部112は通信ヘッダが格納されたパケット管理構造体107と送信データが格納されたパケット管理構造体170を連結し、パケットを生成する。具体的には、通信ヘッダが格納されたパケット管理構造体の次バッファアドレス情報に、送信データの先頭が格納されたパケット管理構造体のアドレスを設定する。この時点で送信データのパケット化(送信パケットの生成)が完了したことになる。
In S305, the
In S306, the
S307において、サブCPU111は、S306で生成した送信パケットを、ネットワーク120を介して外部へ送出する。より詳しくは、サブCPU111の制御の下で、LAN制御部109またはWLAN制御部110は、送信パケットを構成するパケット管理構造体内のデータポインタと有効データ長を参照し、送信パケットの送信を行う。
S308において、パケット生成部112は、送信が完了した送信パケットを構成していたパケット管理構造体107を解放する。
In S307, the
In S308, the
S309において、サブCPU111は、S303でコピーされた送信データの中で未送信の送信データが存在しているかを判定する。S309の判定結果がYesの場合、S304へ戻り、送信処理(S304〜S308)が実行される。S303でコピーされた送信データが全て送信されている場合、S309の判定結果はNoとなり、送信処理を終了する(S310)。一連の送信APIの処理が完了した後、アプリケーションはアプリケーションバッファ104に格納していた送信データを削除し、空いたバッファ領域を次の送信データを格納するなど再び利用することが出来るようになる。
In S309, the
次にサブCPU111が、データエリアを持たないパケット管理構造体も使用してパケットを生成し送信する処理について図4に示したフローチャートを用いて説明する。
本フローチャートの処理は、メインCPU102上で動作するアプリケーションが送信APIを呼び出すことで開始する(S401)。送信データはアプリケーションバッファ104に格納されている。
Next, a process in which the
The processing of this flowchart starts when the application running on the
S402において、サブCPU111は送信に使用する通信プロトコルが再送制御を含むか否かを判定する。判定結果がYesの場合、S403へ進む。判定結果がNoの場合、S405へ進む。再送制御を含む通信プロトコルは、例えばTCPである。再送制御を含まない通信プロトコルは、例えばUDPである。
In S402, the
S403において、パケット生成部112はデータエリアを有するパケット管理構造体を取得する。
S404において、パケット生成部112は、S403で取得したパケット管理構造体内のデータエリアへ、アプリケーションが送信APIで指定した送信データをコピーする。コピー先であるパケット管理構造体内のデータポインタには、データエリア内のメモリアドレスを設定し、有効データ長にはコピーしたデータサイズを設定する。
In S403, the
In S404, the
S405において、パケット生成部112はデータエリアを持たないパケット管理構造体を取得する。
S406において、パケット生成部112は、S405で取得したパケット管理構造体内のデータポインタに、アプリケーションが送信APIで指定した送信データが格納されたアドレスを設定し、有効データ長にデータサイズを設定する。S406では、データのコピーは実施されない。
S407、S408およびS409の各処理は、図3のS304、S305およびS306の処理と同一であるため、説明を省略する。パケット管理構造体がデータエリアを有するか否かによらず、処理は共通である。なお、データのコピーを実施しない場合(S406)、S304の「コピーした送信データの中から送信する送信データのデータサイズを決定する」は「コピーしていない送信データの中から送信する送信データのデータサイズを決定する」と読み替える。
In S405, the
In S406, the
Since each process of S407, S408 and S409 is the same as the process of S304, S305 and S306 of FIG. 3, the description thereof will be omitted. The processing is common regardless of whether the packet management structure has a data area. When the data is not copied (S406), "determining the data size of the transmission data to be transmitted from the copied transmission data" in S304 is "determining the data size of the transmission data to be transmitted from the uncopied transmission data". Read as "determine the data size".
S410において、サブCPU111はLAN制御部109またはWLAN制御部110により、パケットを構成するパケット管理構造体内のデータポインタと有効データ長を参照し、送信データの送信を行う。データエリアを持たないパケット管理構造体である場合は、送信データはアプリケーションバッファ104から読み出されて送信される。即ちゼロコピーで送信されることになる。ゼロコピーで送信される場合、パケット管理構造体へのコピーを省略できるので、送信処理を高速化することができる。
S411において、サブCPU111は、S404若しくはS406でパケット管理構造体へ設定した送信データの中で未送信または通信相手(通信対向装置)へ未到達の送信データが存在しているかを判定する。判定結果がYesの場合、S407へ戻り、送信処理(S407〜S410)が実行される。送信データが全て送信されている場合、判定結果はNoとなり、S412へ進む。
S412において、サブCPU111は、パケット管理構造体内のデータエリアへ送信データをコピーしたかを判定する。なお、S412の判定はこのような判定に限定されず、再度サブCPU111は送信に使用する通信プロトコルが再送制御を含むか否かを判定するようにしてもよい。S412の判定結果がYesの場合は、S413へ進む。S412の判定結果がNoの場合は、S418へ進む。
In S410, the
In S411, the
In S412, the
S413において、パケット生成部112は、パケットを送信した通信相手からデータ到達通知が届いているパケットに対し、パケットを構成していたパケット管理構造体を解放する。ここで、データ到達通知とは、例えばTCPにおけるACK(ACKnowledgement)である。そして、S414において、パケット生成部112は、S401で送信データが格納されていたアプリケーションバッファ104を解放する。
S415において、サブCPU111は、未解放のパケット管理構造体が存在するかを判定する。未解放のパケット管理構造体が存在する場合には、S416において、サブCPU111は、未解放のパケット管理構造体に対応するパケットのデータ到達通知が届くのを待ち受ける。なお、この際に、適宜、再送処理を行ってもよい。この場合、S404でコピーしていた送信データを用いてパケットを生成し再送する。
そして、パケットを送信した通信相手からデータ到達通知が届いているパケットに対し、パケットを構成していたパケット管理構造体を解放する。その後、S417(送信処理の終了)に進む。
S415の判定結果がNoの場合、S417に進む。
In S413, the
In S415, the
Then, the packet management structure that constitutes the packet is released for the packet for which the data arrival notification has arrived from the communication partner that transmitted the packet. After that, the process proceeds to S417 (end of transmission processing).
If the determination result of S415 is No, the process proceeds to S417.
S412の判定結果がNoの場合、S405で取得したパケット管理構造体を全て解放する(S418)。そして、S419において、パケット生成部112は、S401で送信データが格納されていたアプリケーションバッファ104を解放する。
If the determination result in S412 is No, all the packet management structures acquired in S405 are released (S418). Then, in S419, the
図4のフローチャートの処理によって、パケット管理構造体内のデータエリアへ送信データをコピーしない(あるいは再送制御を含まない通信プロトコルを使用する)送信処理においてのみ、ゼロコピーを適用することが出来る。本フローチャートの処理では、使用する通信プロトコルによってゼロコピーの適用、非適用を決定しているが、例えばアプリケーションの指定に基づいてゼロコピーの適用、非適用を決定してもよい。 By the processing of the flowchart of FIG. 4, zero copy can be applied only in the transmission processing in which the transmission data is not copied to the data area in the packet management structure (or a communication protocol that does not include retransmission control is used). In the processing of this flowchart, the application or non-application of zero copy is determined depending on the communication protocol used. For example, the application or non-application of zero copy may be determined based on the specification of the application.
また、図4のフローチャートの処理によって、sendmmsg()などの一回のAPIコールで複数のメッセージによる大容量のデータ送信時であっても、適切なゼロコピーの適用が可能である。
従来技術では、特に送信するデータの通信プロトコルに再送制御が含まれている場合(例えば、TCPの場合)、データが通信相手に全て送信出来たことを確認出来るまで、アプリケーションバッファを解放することが出来なかった。本実施形態では、再送制御を含む通信プロトコルの場合、ゼロコピーを適用しないので、アプリケーションバッファを占有し続けるという問題は生じない。
Further, by processing the flowchart of FIG. 4, it is possible to apply an appropriate zero copy even when a large amount of data is transmitted by a plurality of messages with one API call such as sendmmsg ().
In the prior art, especially when the communication protocol of the data to be transmitted includes retransmission control (for example, in the case of TCP), the application buffer can be released until it can be confirmed that all the data can be transmitted to the communication partner. I could not do it. In the present embodiment, in the case of the communication protocol including the retransmission control, since zero copy is not applied, the problem of continuing to occupy the application buffer does not occur.
<実施形態2>
以下、本発明の実施形態2について図5〜図7を参照して説明する。以下の説明において、実施形態1と同様な構成や処理については、同じ参照番号を付ける。
<Embodiment 2>
Hereinafter, Embodiment 2 of the present invention will be described with reference to FIGS. 5 to 7. In the following description, the same reference numbers will be assigned to the same configurations and processes as in the first embodiment.
<情報処理装置のハードウェアおよび機能構成>
本実施形態に係る情報処理装置100Aのブロック構成を図5に示す。図1に示した情報処理装置100との相違点は、通信処理部105がパケット分割部114を有していることと、サブCPU111がラージパケット生成部113を有していることである。以下、2つの相違点を中心に、情報処理装置100Aについて説明する。
<Hardware and functional configuration of information processing equipment>
FIG. 5 shows a block configuration of the
ラージパケット生成部113は、MTUサイズに関わらず送信APIで指定されたサイズのパケットを生成する(例えば、8kbytes〜16kbytesのパケット)。ラージパケットと通常のパケットとの違いは、基本的にデータサイズのみであり、ラージパケットは、通常のパケット同様、送信データと送信データに対する通信プロトコルヘッダとを一組含んでいる。通常のパケットの生成にかかる処理負荷とラージパケット生成にかかる処理負荷には大きな違いは無い。
パケット分割部114は、ラージパケットを入力情報として、ラージパケットを複数のパケットに分割して出力することが出来る。パケット分割部114は、ラージパケット内の通信プロトコルヘッダを複製および修正することで複数のヘッダを生成し、さらに複数に分割した送信データと連結することで、複数のパケットの生成を行う。
ラージパケット生成部113とパケット分割部114を利用することで、1パケットずつ生成するよりも効率的にパケット生成を行うことが出来る。
The large
The
By using the large
サブCPU111が、ラージパケットを使用してパケット生成して送信する処理について図6のフローチャートを用いて説明する。
本フローチャートの処理は、メインCPU102上で動作するアプリケーションが送信APIを呼び出すことで開始する(S601)。送信データはアプリケーションバッファ104に格納されている。
The process of generating and transmitting a packet by the
The processing of this flowchart starts when the application running on the
S602において、サブCPU111は、アプリケーションに使用された(呼び出された)送信APIがsendmmsg()であるかを判定する。S602の判定結果がYesの場合は、S604へ進む。S602の判定結果がNoの場合、つまりアプリケーションに使用された送信APIがsendmmsg()以外の送信APIであった場合には、S603へ進む。sendmmsg()は、複数のメッセージ(ラージパケットのペイロードを構成)を送信データとして一括で指定するAPIである。
S603では、図3において示したS302〜S309の処理が実行される。処理内容は同一であるため、説明は省略する。
In S602, the
In S603, the processes S302 to S309 shown in FIG. 3 are executed. Since the processing contents are the same, the description will be omitted.
S604において、サブCPU111は送信に使用する通信プロトコルが再送制御を含むか否かを判定する。S604の判定結果がYesの場合は、S607へ進む。S604の判定結果がNoの場合は、S605へ進む。
S605において、ラージパケット生成部113がデータエリアを持たないパケット管理構造体を取得し、当該パケット管理構造体によりラージパケット用ペイロードを構成する。
In S604, the
In S605, the large
図7にラージパケットの構造の例を示す。符号701は、データエリアを有するパケット管理構造体であり、データエリアにラージパケットのヘッダが格納される。符号702、703、704、705および706は全て、データエリアを持たないパケット管理構造体であり、ラージパケットのペイロードが格納される。S605で、サブCPU111は、パケット管理構造体702〜706を取得することになる。
ラージパケットのペイロードでは、各メッセージの区切りを示すためにパケット管理構造体のメンバーである次パケットアドレスを使用する。図7は、3つのメッセージを含んだ構成例になっている。
FIG. 7 shows an example of the structure of the large packet.
The large packet payload uses the next packet address, which is a member of the packet management structure, to indicate the delimiter for each message. FIG. 7 is a configuration example including three messages.
sendmmsg()は、複数のメッセージを送信データとして一括で指定するAPIであり、例えば、1つの送信データが3つのメッセージを含むことになる。3つのメッセージは、アプリケーションバッファ104内において3つの格納領域に格納される。さらに各メッセージは、アプリケーションバッファ104内において複数のメモリ領域に配置されていることがある(各メッセージは複数のメッセージ部分に分割され、複数のメモリ領域に配置される)。本実施形態では、sendmmsg()で指定された一つ目のメッセージがアプリケーションバッファ104内の二つのメモリ領域に分散して配置されて、一つ目のメッセージを構成するパケット管理構造体がパケット管理構造体702と703になっている。パケット管理構造体702に格納されるメッセージ部分と、パケット管理構造体703に格納されるメッセージ部分とにより、1つのメッセージが構成される。
sendmmsg()で指定された二つ目のメッセージは、アプリケーションバッファ104内の一つのメモリ領域に配置されて、二つ目のメッセージを構成するパケット管理構造体がパケット管理構造体704になっている。sendmmsg()で指定された三つ目のメッセージは、アプリケーションバッファ104内の二つのメモリ領域に分散して配置されて、三つ目のメッセージを構成するパケット管理構造体がパケット管理構造体705と706になっている。
sendmmsg () is an API that collectively specifies a plurality of messages as transmission data, and for example, one transmission data includes three messages. The three messages are stored in the three storage areas in the
The second message specified by sendmmsg () is arranged in one memory area in the
なお、一つ目のメッセージがアプリケーションバッファ104内の一つのメモリ領域に配置される場合、一つ目のメッセージを構成するパケット管理構造体は、例えば、パケット管理構造体702のみとなる。また、三つ目のメッセージがアプリケーションバッファ104内の一つのメモリ領域に配置される場合、三つ目のメッセージを構成するパケット管理構造体は、例えば、パケット管理構造体705のみとなる。この場合、S605で取得するパケット管理構造体はパケット管理構造体702、704、705になる。
When the first message is arranged in one memory area in the
S606において、ラージパケット生成部113は、S605で取得した各パケット管理構造体のデータポインタに、sendmmsg()で指定された各メッセージが格納されているメモリアドレスを設定し、有効データ長にデータサイズを設定する。即ち、データのコピーは行われず、ゼロコピーが適用される。
S607において、ラージパケット生成部113は、データエリアを有するパケット管理構造体を取得し、ラージパケット用ペイロードを構成する。つまり、図7のパケット管理構造体702〜706の代わりにパケット管理構造体701と同じ構造のパケット管理構造体を5つ取得し、これら5つのパケット管理構造体によりラージパケット用ペイロードを構成する。
S608において、ラージパケット生成部113は、S607で取得した各パケット管理構造体のデータエリアへ、sendmmsg()で指定された各メッセージのデータコピーを行う(送信データのコピー)。送信データをコピーする際、ラージパケット生成部113は、各パケット管理構造体のデータポインタに、データエリア内のメモリアドレスを設定し、有効データ長にデータサイズを設定する。
In S606, the large
In S607, the large
In S608, the large
S609において、ラージパケット生成部113はラージパケット用ペイロードに対応する通信ヘッダを生成する。ラージパケット生成部113は、通信ヘッダを格納するためのデータエリアを有するパケット管理構造体701を取得し、データエリアに通信ヘッダを格納する。
S610において、ラージパケット生成部113がラージパケットを生成する。具体的には、通信ヘッダが格納されたパケット管理構造体701とラージパケット用ペイロードを図7の破線矢印で示すように次バッファアドレスを用いて連結する。
In S609, the large
In S610, the large
S611において、サブCPU111は、ラージパケットをパケット分割部114へ入力し、パケット分割部114はラージパケットにパケット分割処理を実行する。
パケット分割処理において、パケット分割部114は、まず出力用にデータエリアを有するパケット管理構造体を取得する。例えば、図7で示したラージパケットがパケット分割部114に入力された場合、パケット分割部114は、3つのパケット管理構造体を取得する。パケット分割部114は、ラージパケットに含まれる通信ヘッダを複製し、複製した各通信ヘッダはそれぞれ、取得したパケット管理構造体へ格納する。
複製された各通信ヘッダと、ラージパケットを構成する各ペイロードを連結することで、パケット分割処理が完了する。S611が終了すると、3つのパケットが生成されることになる。
In S611, the
In the packet division process, the
The packet division process is completed by concatenating each duplicated communication header and each payload constituting the large packet. When S611 ends, three packets will be generated.
S612において、サブCPU111は、LAN制御部109またはWLAN制御部110により、S611で生成された複数(3つ)のパケットをネットワーク120を介して外部へ送信する。ゼロコピー適用時のパケットの送信については後述する。
S613において、再度サブCPU111は送信に使用する通信プロトコルが再送制御を含むか否かを判定する。S613の判定結果がYesの場合は、S614へ進む。S613の判定結果がNoの場合は、S615へ進む。
S614において、パケット生成部112は、パケットを送信した通信相手からデータ到達通知が届いているパケットに対し、パケットを構成していたパケット管理構造体を解放する。
In S612, the
In S613, the
In S614, the
S615において、パケット生成部112は送信が完了したパケットを構成していたパケット管理構造体を解放する。
S616において、サブCPU111は、S605若しくはS607でパケット管理構造体へ設定した送信データの中で未送信または通信相手へ未到達の送信データ(ユーザデータ)が存在しているかを判定する。S616の判定結果がYesの場合は、S609へ戻り、送信処理(S609〜S614またはS609〜S615)が実行される。S616の判定結果がNoの場合、つまり送信データが全て送信されている場合、送信処理を終了する(S617)。
In S615, the
In S616, the
ゼロコピー適用時のパケット送信について説明する。S611の後、パケットのヘッダと送信データ(分散したメモリ領域に配置された状態の送信データ)は、LAN制御部109やWLAN制御部110などの送信インターフェースへ受け渡される。より詳しくは、パケットとして指定された送信データは、送信インターフェース(109、110)へDMA転送される。DMA転送は、データ転送部108のDMAコントローラにより行われる。
なお、DMA転送にはDMA転送を指示するためのディスクリプタが必要になり、転送データがメモリ上で分散した配置になっていればいるほど必要なディスクリプタ数が増加する。送信インターフェースがディスクリプタを配置するために確保しているメモリリソースの数(最大値)を超えるディスクリプタ数が必要になると、転送を分割して行うことになり、転送効率が下がってしまう。
Packet transmission when zero copy is applied will be described. After S611, the packet header and transmission data (transmission data in a state of being arranged in the distributed memory area) are passed to transmission interfaces such as
Note that a descriptor for instructing the DMA transfer is required for the DMA transfer, and the number of descriptors required increases as the transfer data is arranged in a distributed manner on the memory. If the number of descriptors exceeds the number of memory resources (maximum value) reserved for arranging descriptors by the transmission interface, the transfer will be divided and the transfer efficiency will decrease.
そのため、必ずしもゼロコピーが有効(ゼロコピーを適用した方が良い)とは言えない。例えば、S604の判定結果がNoの場合は、S605の処理を行う前に、送信インターフェースに応じた必要なディスクリプタ数を判定し、必要なディスクリプタ数が最大値を超える場合は、S605に進むのではなくS607に進んでもよい。そして、S607の後、S608に進む。その際、必要なディスクリプタ数を減らすために、分散領域に配置されたペイロードを連続領域へコピーすることが望ましい。
以上のように本フローによって、sendmmsg()などの一回のAPIコールで複数のメッセージによる大容量の送信データを送信する場合であっても、適切なゼロコピーの適用が可能である。
Therefore, it cannot always be said that zero copy is effective (it is better to apply zero copy). For example, if the determination result of S604 is No, the required number of descriptors according to the transmission interface is determined before the processing of S605, and if the required number of descriptors exceeds the maximum value, the process proceeds to S605. You may proceed to S607 without. Then, after S607, the process proceeds to S608. At that time, in order to reduce the number of descriptors required, it is desirable to copy the payload arranged in the distributed area to the continuous area.
As described above, according to this flow, even when a large amount of transmission data by a plurality of messages is transmitted by one API call such as sendmmsg (), an appropriate zero copy can be applied.
<実施形態3>
本発明の実施形態3について図1、図4および図8を参照して説明する。実施形態3は実施形態1(図4)の変形例である。実施形態1(図4)ではデータエリアを持たないパケット管理構造体とデータエリアを持つパケット管理構造体を使用したが、実施形態3では、データエリアを持たないパケット管理構造体のみを使用する。図8は、実施形態3のパケット送信処理を示したフローチャートである。以下の説明において、実施形態1と同様な構成や処理については、同じ参照番号を付ける。
<Embodiment 3>
Embodiment 3 of the present invention will be described with reference to FIGS. 1, 4 and 8. The third embodiment is a modification of the first embodiment (FIG. 4). In the first embodiment (FIG. 4), a packet management structure having no data area and a packet management structure having a data area are used, but in the third embodiment, only a packet management structure having no data area is used. FIG. 8 is a flowchart showing the packet transmission process of the third embodiment. In the following description, the same reference numbers will be assigned to the same configurations and processes as in the first embodiment.
図8のフローチャートを参照して実施形態3のパケット送信処理を説明する。
S801は図4のS401と同じである。
S802は図4のS405と同じである。つまり、実施形態3では、データエリアを持たないパケット管理構造体のみを使用するので、図4のS402、S403およびS404が不要となる。
S803、S804、S805、S806、S807およびS808は、それぞれ、図4のS406、S407、S408、S409、S410およびS411と同じである。
S808の判定結果がYesの場合、S804に戻る。S808の判定結果がNoの場合、S809に進む。
The packet transmission process of the third embodiment will be described with reference to the flowchart of FIG.
S801 is the same as S401 in FIG.
S802 is the same as S405 in FIG. That is, in the third embodiment, since only the packet management structure having no data area is used, S402, S403, and S404 of FIG. 4 are unnecessary.
S803, S804, S805, S806, S807 and S808 are the same as S406, S407, S408, S409, S410 and S411 in FIG. 4, respectively.
If the determination result of S808 is Yes, the process returns to S804. If the determination result of S808 is No, the process proceeds to S809.
S809において、サブCPU111は送信に使用する通信プロトコルが再送制御を含むか否かを判定する。S809の判定結果がYesの場合、S810に進む。
S810において、通信相手(通信対向装置)からデータ到達通知を受信したかを判定する。S810の判定結果がNoの場合、S810を繰り返す。S810の判定結果がYesの場合、S811に進む。S811は、図4のS413と同じである。また、S811の次のステップであるS812は、図4のS414と同じである。
S813において、データ到達通知を受信していない送信データが存在するかを判定する。S813の判定結果がYesの場合、S810に戻る。S813の判定結果がNoの場合、S814(処理の終了)に進む。
In S809, the
In S810, it is determined whether or not the data arrival notification has been received from the communication partner (communication opposite device). If the determination result of S810 is No, S810 is repeated. If the determination result of S810 is Yes, the process proceeds to S811. S811 is the same as S413 in FIG. Further, S812, which is the next step of S811, is the same as S414 in FIG.
In S813, it is determined whether or not there is transmission data for which the data arrival notification has not been received. If the determination result of S813 is Yes, the process returns to S810. If the determination result in S813 is No, the process proceeds to S814 (end of processing).
S809の判定結果がNoの場合、S815に進む。S815において、送信済のパケット管理構造体を解放する。そして、S816において、アプリケーションバッファを全て解放し、S814に進む。
本実施形態においても、S809において使用プロトコルが再送制御を含む場合と含まない場合で、その後の処理を分けているので、実施形態1と同様な効果を得ることができる。
If the determination result of S809 is No, the process proceeds to S815. In S815, the transmitted packet management structure is released. Then, in S816, all the application buffers are released, and the process proceeds to S814.
Also in the present embodiment, since the subsequent processing is divided depending on whether the protocol used in S809 includes the retransmission control or not, the same effect as that of the first embodiment can be obtained.
なお、S410、S612およびS807におけるパケット送信の際に、データエリアを有さないパケット管理構造体の使用個数が送信部(LAN制御部109、WLAN制御部110)の送信能力により決まる閾値を超える場合がある。この場合、パケット生成部112は、データエリアを有するパケット管理構造体を使用してもよい。つまり、パケット生成部112は、データエリアを有するパケット管理構造体の位置情報領域に設定された送信データの格納位置情報を使用してもよい。
When the number of packet management structures that do not have a data area exceeds the threshold value determined by the transmission capacity of the transmission unit (
図1および図5において、情報処理装置100、100AはLAN制御部109とWLAN制御部110を有したが、情報処理装置100はLAN制御部109およびWLAN制御部110のいずれかのみを有するものでもよい。
通信網はLAN以外でもよく、例えば、インターネットや公衆無線通信などの通信網でもよい。つまり、LAN制御部109は、LAN制御部109以外の有線通信インターフェースに置換してもよいし、WLAN制御部110は、WLAN制御部110以外の無線通信インターフェースに置換してもよい(例えば、Bluetooth(登録商標))。公衆無線通信網は、例えば、3G、4G、5G、LTEなどである。LTEはLong Term Evolutionの略である。また、情報処理装置100と外部装置の接続は、ネットワーク120を介さずに、直接ケーブル等で情報処理装置100を外部装置に接続してもよい。
In FIGS. 1 and 5, the
The communication network may be other than LAN, and may be, for example, a communication network such as the Internet or public wireless communication. That is, the
図1および図5に示した構成は一例であり、複数の機能部が1つの機能部に統合されてもよいし、いずれかの機能部が複数の機能部に分けられてもよい。また、図1および図5に示した機能部(例えば、データ転送部108、パケット分割部114)に含まれる一部または全部の機能がハードウェア化されていてもよい。ハードウェア化は、例えばASIC(ApplicationSpecific Integrated Circuit)により実現される。
The configurations shown in FIGS. 1 and 5 are examples, and a plurality of functional units may be integrated into one functional unit, or any of the functional units may be divided into a plurality of functional units. Further, some or all the functions included in the functional units shown in FIGS. 1 and 5 (for example, the
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワークまたは記憶媒体を介してシステムまたは装置に供給し、そのシステムまたは装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
100:情報処理装置(通信装置)、103:メインメモリ、104:アプリケーションバッファ、105:通信処理部、107:パケット管理構造体、108:データ転送部、111:サブCPU、112:パケット生成部、100A:情報処理装置 100: Information processing device (communication device), 103: Main memory, 104: Application buffer, 105: Communication processing unit, 107: Packet management structure, 108: Data transfer unit, 111: Sub CPU, 112: Packet generation unit, 100A: Information processing device
Claims (11)
他の通信装置に送信するデータを格納する第一の格納手段と、
前記第一の格納手段に格納されているデータのコピー先となる第二の格納手段と、
前記データに使用する通信プロトコルに応じた通信ヘッダを生成する第一の生成手段と、
前記通信ヘッダと前記データの格納位置情報とに基づいて、パケットを生成する第二の生成手段と、
前記通信プロトコルが再送制御を含まない場合、前記第一の格納手段内の前記データの格納位置を前記格納位置情報とし、
前記通信プロトコルが再送制御を含む場合、前記第二の格納手段内の前記データの格納位置を前記格納位置情報とする制御手段と、
を有することを特徴とする通信装置。 It ’s a communication device,
The first storage means for storing data to be transmitted to other communication devices,
The second storage means, which is the copy destination of the data stored in the first storage means,
A first generation means for generating a communication header according to the communication protocol used for the data, and
A second generation means for generating a packet based on the communication header and the storage position information of the data,
When the communication protocol does not include retransmission control, the storage position of the data in the first storage means is set as the storage position information.
When the communication protocol includes retransmission control, a control means that uses the storage position of the data in the second storage means as the storage position information, and
A communication device characterized by having.
前記データの格納位置情報を設定する位置情報領域と、前記データのサイズ情報を設定するサイズ情報領域と、前記データを格納するメモリ領域とを含む第一のパケット管理構造体と、
前記データの格納位置情報を設定する位置情報領域と、前記データのサイズ情報を設定するサイズ情報領域とを含み、前記データを格納するメモリ領域を含まない第二のパケット管理構造体と、を有し、
前記通信プロトコルが再送制御を含まない場合、前記制御手段は、前記第一の格納手段内の前記データの格納位置情報を前記第二のパケット管理構造体の位置情報領域へ設定し、前記第二の生成手段は、前記パケットを生成する際、前記第二のパケット管理構造体の位置情報領域に設定された前記データの格納位置情報を使用することを特徴とする請求項1に記載の通信装置。 The second storage means is
A first packet management structure including a position information area for setting the storage position information of the data, a size information area for setting the size information of the data, and a memory area for storing the data.
It has a second packet management structure that includes a position information area for setting the data storage position information and a size information area for setting the data size information and does not include a memory area for storing the data. And
When the communication protocol does not include retransmission control, the control means sets the storage position information of the data in the first storage means in the position information area of the second packet management structure, and the second The communication device according to claim 1, wherein when generating the packet, the storage position information of the data set in the position information area of the second packet management structure is used. ..
前記第二の生成手段は、前記第三のパケット管理構造体のメモリ領域に格納された通信ヘッダと、前記第三のパケット管理構造体の構造体情報領域に格納された管理構造体情報とに基づいて、前記パケットを生成することを特徴とする請求項2または3に記載の通信装置。 The second storage means sets the memory area for storing the communication header and the information of the first or second packet management structure that stores the storage position information of the data. It also has a third packet management structure that includes the area and
The second generation means includes a communication header stored in the memory area of the third packet management structure and management structure information stored in the structure information area of the third packet management structure. The communication device according to claim 2 or 3, wherein the packet is generated based on the above.
前記メッセージの格納位置情報を、対応する前記第二パケット管理構造体の位置情報領域に設定し、前記メッセージのサイズ情報を、対応する前記第二パケット管理構造体のサイズ情報領域に設定し、
前記複数の前記第二のパケット管理構造体を連結する情報は、前記複数の前記第二のパケット管理構造体の各々の構造体情報領域に格納されることを特徴とする請求項2から4のいずれか1項に記載の通信装置。 When the data is composed of a plurality of messages, the plurality of messages are divided and stored in a plurality of storage areas in the first storage means, and the second storage means is stored in the first storage means. It has a plurality of the second packet management structures corresponding to a plurality of storage areas, and has a plurality of the second packet management structures.
The storage position information of the message is set in the position information area of the corresponding second packet management structure, and the size information of the message is set in the size information area of the corresponding second packet management structure.
Claims 2 to 4, wherein the information connecting the plurality of the second packet management structures is stored in each structure information area of the plurality of the second packet management structures. The communication device according to any one item.
前記メッセージ部分の格納位置情報を、対応する前記第二パケット管理構造体の位置情報領域に設定し、前記メッセージ部分のサイズ情報を、対応する前記第二パケット管理構造体のサイズ情報領域に設定し、
前記複数のメッセージ部分を連結する情報は、前記複数の前記第二のパケット管理構造体の各々の構造体情報領域に格納されることを特徴とする請求項5に記載の通信装置。 When the message is composed of a plurality of message parts, the second storage means has a plurality of the second packet management structures corresponding to the plurality of message parts.
The storage position information of the message portion is set in the position information area of the corresponding second packet management structure, and the size information of the message portion is set in the size information area of the corresponding second packet management structure. ,
The communication device according to claim 5, wherein the information connecting the plurality of message portions is stored in each structure information area of the plurality of second packet management structures.
前記第二のパケット管理構造体の使用個数が前記送信手段の送信能力により決まる閾値を超える場合、前記第二の生成手段は、前記パケットを生成する際、前記第一のパケット管理構造体の位置情報領域に設定された前記データの格納位置情報を使用することを特徴とする請求項2から6のいずれか1項に記載の通信装置。 The communication device further includes a transmission means for transmitting the packet generated by the second generation means to the outside.
When the number of used second packet management structures exceeds a threshold value determined by the transmission capability of the transmission means, the second generation means positions the first packet management structure when generating the packet. The communication device according to any one of claims 2 to 6, wherein the storage position information of the data set in the information area is used.
前記データに使用する通信プロトコルに応じた通信ヘッダを生成するステップと、
前記通信ヘッダと前記データの格納位置情報とに基づいて、パケットを生成するステップと、
前記通信プロトコルが再送制御を含まない場合、前記第一の格納手段内の前記データの格納位置を前記格納位置情報とするステップと、
前記通信プロトコルが再送制御を含む場合、前記第二の格納手段内の前記データの格納位置を前記格納位置情報とするステップと、
を有することを特徴とする制御方法。 It is a control method of a communication device having a first storage unit for storing data to be transmitted to another communication device and a second storage unit for copying the data stored in the first storage unit. hand,
A step of generating a communication header according to the communication protocol used for the data, and
A step of generating a packet based on the communication header and the storage position information of the data,
When the communication protocol does not include retransmission control, a step of using the data storage position in the first storage means as the storage position information, and
When the communication protocol includes retransmission control, a step of using the data storage position in the second storage means as the storage position information, and
A control method characterized by having.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019222650A JP7321913B2 (en) | 2019-12-10 | 2019-12-10 | Communication device, control method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019222650A JP7321913B2 (en) | 2019-12-10 | 2019-12-10 | Communication device, control method and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021093611A true JP2021093611A (en) | 2021-06-17 |
JP7321913B2 JP7321913B2 (en) | 2023-08-07 |
Family
ID=76312860
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019222650A Active JP7321913B2 (en) | 2019-12-10 | 2019-12-10 | Communication device, control method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7321913B2 (en) |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3752137B2 (en) | 2000-08-31 | 2006-03-08 | 三菱電機株式会社 | Data transmission apparatus and data transmission method |
JP4757109B2 (en) | 2006-06-23 | 2011-08-24 | 富士通株式会社 | Data communication program |
-
2019
- 2019-12-10 JP JP2019222650A patent/JP7321913B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP7321913B2 (en) | 2023-08-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2010136414A (en) | Data processing for tcp connection using offload unit | |
EP3563534B1 (en) | Transferring packets between virtual machines via a direct memory access device | |
CN115396528A (en) | Quic data transmission method and device based on protocol family | |
CN113891396A (en) | Data packet processing method and device, computer equipment and storage medium | |
US11336297B2 (en) | DMA transfer apparatus, method of controlling the same, communication apparatus, method of controlling the same, and non-transitory computer-readable storage medium | |
JP2012226471A (en) | Communication method and communication server | |
EP3832987A1 (en) | Data processing method and device | |
JP7321913B2 (en) | Communication device, control method and program | |
JP7423223B2 (en) | Communication device | |
US20230062831A1 (en) | Communication apparatus and control method thereof, and storage medium | |
JP6618330B2 (en) | COMMUNICATION DEVICE AND METHOD, COMPUTER PROGRAM | |
JP6891201B2 (en) | Communication equipment, control methods and programs for communication equipment | |
JP7387335B2 (en) | Communication device, control method and program | |
JP7049140B2 (en) | Communication equipment and its control method | |
JP2019165423A (en) | Communication device, method for controlling communication device, and program | |
TW201903608A (en) | Virtual network system and virtual network system communication method | |
KR20010095103A (en) | An intelligent bus interconnect unit | |
JP7005303B2 (en) | Communication equipment, packet generators and their control methods | |
JP2022161570A (en) | Communication apparatus, communication method, and program | |
JP7427464B2 (en) | Communication devices, communication methods and programs | |
JP2019016842A (en) | Communication device and control method | |
US11102150B2 (en) | Communication apparatus and control method for communication apparatus | |
WO2020184381A1 (en) | Processing device, information processing system, information processing method, and program | |
US20230179545A1 (en) | Packet forwarding apparatus with buffer recycling and associated packet forwarding method | |
JP6938399B2 (en) | Communication equipment, communication methods and programs |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220822 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20230615 |
|
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: 20230627 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230726 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7321913 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |