JP2021036630A - Communication device, control method, and program - Google Patents

Communication device, control method, and program Download PDF

Info

Publication number
JP2021036630A
JP2021036630A JP2019157553A JP2019157553A JP2021036630A JP 2021036630 A JP2021036630 A JP 2021036630A JP 2019157553 A JP2019157553 A JP 2019157553A JP 2019157553 A JP2019157553 A JP 2019157553A JP 2021036630 A JP2021036630 A JP 2021036630A
Authority
JP
Japan
Prior art keywords
generation
communication device
packet
header
specific
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.)
Pending
Application number
JP2019157553A
Other languages
Japanese (ja)
Inventor
大輔 堀尾
Daisuke Horio
大輔 堀尾
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2019157553A priority Critical patent/JP2021036630A/en
Publication of JP2021036630A publication Critical patent/JP2021036630A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)
  • Communication Control (AREA)

Abstract

To provide a communication device, a control method of the same, and a program for improving the processing efficiency of data transmission.SOLUTION: A communication device controls to start transmitting a generated packet or header to a communication device in parallel with the generation of the packet or header in response to the completion of the generation of a specific packet or header.SELECTED DRAWING: Figure 6

Description

本発明は、複数のデータについてパケットを生成する通信装置に関する。 The present invention relates to a communication device that generates packets for a plurality of data.

OS(Operating System)としてLinux(登録商標)を用いる通信装置がデータ通信を行う際の送信処理では、まず送信するメッセージ(データ)が指定される。この指定は、アプリケーションがsendmsg()やsendmmsg()といったソケットAPIのシステムコールを呼ぶことで実行される。これらのシステムコールが呼ばれることでユーザ空間からカーネル空間への動作の切り替え(タスクスイッチ)が発生し、カーネルに含まれるプロトコル処理部が動作を開始する。プロトコル処理部は、指定されたデータにTCP(Transmission Control Protocol)ヘッダおよびIP(Internet Protocol)ヘッダを付加することにより、パケットを形成する。sendmsg()では、メッセージ単位でTCPヘッダおよびIPヘッダが付加され、パケットが生成される。sendmmsg()はsendmsg()を拡張したものであり、一度に複数のメッセージを指定可能に構成される。 In the transmission process when a communication device using Linux (registered trademark) as an OS (Operating System) performs data communication, a message (data) to be transmitted is first specified. This specification is executed by the application calling a socket API system call such as sendmsg () or sendmmsg (). When these system calls are called, the operation is switched from the user space to the kernel space (task switch), and the protocol processing unit included in the kernel starts the operation. The protocol processing unit forms a packet by adding a TCP (Transmission Control Protocol) header and an IP (Internet Protocol) header to the specified data. In sendmsg (), a TCP header and an IP header are added for each message, and a packet is generated. sendmmsg () is an extension of sendmsg (), and is configured so that a plurality of messages can be specified at one time.

また、一般的にTCP/IPは処理負荷が大きいため、CPUの処理能力が低い組込み製品では、TCP/IPを用いると通信速度が低下してしまう可能性がある。そのため、特許文献1に開示されているようなTSO(TCP Segmentation Offload)処理が、CPUの処理負荷軽減および処理高速化の手法の一つとして考案されている。TSO処理によれば、所定の最大セグメントサイズ(MSS:Maximum Segment Size)より大きいサイズのラージデータに対し、複数のパケットを一括生成することが可能になる。 Further, since TCP / IP generally has a large processing load, the communication speed may decrease when TCP / IP is used in an embedded product having a low CPU processing capacity. Therefore, TSO (TCP Transmission Offload) processing as disclosed in Patent Document 1 has been devised as one of the methods for reducing the processing load and speeding up the processing of the CPU. According to the TSO processing, it is possible to collectively generate a plurality of packets for large data having a size larger than a predetermined maximum segment size (MSS).

国際公開第2010/073671号明細書International Publication No. 2010/0737671

TSO処理には、複数のパケットを一括で生成する処理(パケット生成処理)が完結するまで、通信デバイスに対してデータを転送する処理(ドライバ処理)を開始できないため、データ送信の処理効率が悪いという課題がある。
本発明はこのような課題に鑑みてなされたものであり、その目的は、データ送信の処理効率を向上することにある。
In TSO processing, the processing efficiency of data transmission is poor because the processing of transferring data to the communication device (driver processing) cannot be started until the processing of generating multiple packets at once (packet generation processing) is completed. There is a problem.
The present invention has been made in view of such a problem, and an object of the present invention is to improve the processing efficiency of data transmission.

本発明の1つの態様による通信装置は、送信データに基づいて複数のパケットを生成する生成手段と、前記生成手段により生成された前記複数のパケットを通信デバイスに送信する送信手段と、前記生成手段により特定パケットの生成が完了したことに応じて、前記生成手段によるパケットの生成と並行して、前記通信デバイスへの前記複数のパケットのうちの少なくとも一部の送信を開始するように制御する制御手段と、を有する。 The communication device according to one aspect of the present invention includes a generation means for generating a plurality of packets based on transmission data, a transmission means for transmitting the plurality of packets generated by the generation means to a communication device, and the generation means. Controls to start transmitting at least a part of the plurality of packets to the communication device in parallel with the generation of the packet by the generation means in response to the completion of the generation of the specific packet. Means and.

本発明の他の1つの態様による通信装置は、送信データに対応する複数のヘッダを生成する生成手段と、前記生成手段により生成された前記複数のヘッダを通信デバイスに送信する送信手段と、前記生成手段により特定ヘッダの生成が完了したことに応じて、前記生成手段によるヘッダの生成と並行して、前記通信デバイスへの前記複数のヘッダのうちの少なくとも一部の送信を開始するように制御する制御手段と、を有する。 The communication device according to another aspect of the present invention includes a generation means for generating a plurality of headers corresponding to transmission data, a transmission means for transmitting the plurality of headers generated by the generation means to a communication device, and the above. Controlled to start transmitting at least a part of the plurality of headers to the communication device in parallel with the generation of the header by the generation means when the generation of the specific header is completed by the generation means. It has a control means to be used.

本発明によれば、データ送信の処理効率を向上することができる。 According to the present invention, it is possible to improve the processing efficiency of data transmission.

本発明の第1の実施形態による通信装置のハードウェア構成および機能構成を示す図である。It is a figure which shows the hardware structure and the functional structure of the communication device by 1st Embodiment of this invention. 本実施の第1の実施形態における送信処理のプロファイルの一例を示す図である。It is a figure which shows an example of the profile of the transmission process in 1st Embodiment of this embodiment. 本発明の第1の実施形態によるパケット生成部からデータ転送部に供給されるデスクリプタを示す図である。It is a figure which shows the descriptor which is supplied to the data transfer part from the packet generation part by 1st Embodiment of this invention. 第1の処理時間関係時における、本発明の第1の実施形態による特定パケット(または特定ヘッダ)の決定方法を説明する図である。It is a figure explaining the method of determining the specific packet (or the specific header) by the 1st Embodiment of this invention at the time of the 1st processing time relation. 第2の処理時間関係時における、本発明の第1の実施形態による特定パケット(または特定ヘッダ)の決定方法を説明する図である。It is a figure explaining the method of determining the specific packet (or the specific header) by the 1st Embodiment of this invention at the time of the 2nd processing time relation. 本発明の第1の実施形態によるプロトコル処理部が行う処理のフローチャートである。It is a flowchart of the process performed by the protocol processing part by 1st Embodiment of this invention. 本発明の第1の実施形態による通信装置が行うデータ送信処理のシーケンス図である。It is a sequence diagram of the data transmission processing performed by the communication apparatus according to 1st Embodiment of this invention. 本発明の第2の実施形態における送信処理のプロファイルの一例を示す図である。It is a figure which shows an example of the profile of the transmission process in 2nd Embodiment of this invention. 第1の処理時間関係時における、本発明の第2の実施形態による特定パケット(または特定ヘッダ)の決定方法を説明する図である。It is a figure explaining the method of determining the specific packet (or the specific header) by the 2nd Embodiment of this invention at the time of the 1st processing time relation. 第2の処理時間関係時における、本発明の第2の実施形態による特定パケット(または特定ヘッダ)の決定方法を説明する図である。It is a figure explaining the method of determining the specific packet (or the specific header) by the 2nd Embodiment of this invention at the time of the 2nd processing time relation. 本発明の第2の実施形態によるプロトコル処理部が行う処理のフローチャートである。It is a flowchart of the process performed by the protocol processing part by 2nd Embodiment of this invention. 本発明の第2の実施形態による通信装置が行うデータ送信処理のシーケンス図である。It is a sequence diagram of the data transmission processing performed by the communication apparatus according to the 2nd Embodiment of this invention.

以下、添付図面を参照して、本発明を実施するための実施形態について詳細に説明する。なお、以下に説明する実施形態は、本発明の実現手段としての一例であり、本発明が適用される装置の構成や各種条件によって適宜修正または変更されるべきものであり、本発明は以下の実施形態に限定されるものではない。また、本実施形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。 Hereinafter, embodiments for carrying out the present invention will be described in detail with reference to the accompanying drawings. The embodiments described below are examples of means for realizing the present invention, and should be appropriately modified or changed depending on the configuration of the device to which the present invention is applied and various conditions. It is not limited to the embodiment. Moreover, not all combinations of features described in the present embodiment are essential for the means of solving the present invention.

[第1の実施形態]
(通信装置の構成)
図1は、本発明の第1の実施形態による通信装置100のハードウェア構成および機能構成を示す図である。通信装置100は、OSとしてLinux(登録商標)を利用する装置である。通信装置100は、データ通信を行う際に、システムコールとしてsendmmsg()を用いることで、一度に複数のメッセージ(データ)を送信対象として指定可能に構成される。
また、通信装置100は、上述したMSSより大きいサイズのラージデータに対して上述したTSO処理を実行するためのハードウェアであるオフローダ106を有する。
[First Embodiment]
(Communication device configuration)
FIG. 1 is a diagram showing a hardware configuration and a functional configuration of the communication device 100 according to the first embodiment of the present invention. The communication device 100 is a device that uses Linux (registered trademark) as an OS. The communication device 100 is configured to be able to specify a plurality of messages (data) as transmission targets at one time by using sendmmsg () as a system call when performing data communication.
Further, the communication device 100 has an offloader 106 which is hardware for executing the above-mentioned TSO processing on the large data having a size larger than the above-mentioned MSS.

本実施形態において使用するTSO処理の概略を説明すると、通信装置100はまず初めに、MSSより大きいサイズのデータ(ラージデータ)について、ひな形となるTCPヘッダおよびIPヘッダを生成する。次に、ラージデータをMSS以下の単位で分割することにより、複数の分割データを生成する。そして、ひな形のTCPヘッダおよびIPヘッダを用いて各分割データ用のTCPヘッダおよびIPヘッダを生成し、対応する分割データに付加することで、複数の送信パケットを生成する。このように、TSO処理においては、複数の送信パケット分のデータに対し、一括でTCPヘッダおよびIPヘッダが生成される。オフローダ106は、これらの処理のうち、分割データの生成、各分割データ用のTCPヘッダおよびIPヘッダの生成、および、複数の送信パケットの生成を担う。 To explain the outline of the TSO process used in the present embodiment, first, the communication device 100 generates a TCP header and an IP header as a template for data (large data) having a size larger than the MSS. Next, a plurality of divided data are generated by dividing the large data into units of MSS or less. Then, the TCP header and the IP header for each divided data are generated by using the TCP header and the IP header of the template, and are added to the corresponding divided data to generate a plurality of transmission packets. As described above, in the TSO processing, the TCP header and the IP header are collectively generated for the data for a plurality of transmission packets. Of these processes, the offloader 106 is responsible for generating divided data, generating TCP headers and IP headers for each divided data, and generating a plurality of transmission packets.

なお、本実施形態では、通信装置100がTCP通信によるデータ通信を行う例を説明するが、本発明は、他の種類のデータ通信にも適用可能である。具体的な例を挙げると、通信装置100がUDP(User Datagram Protocol)通信によるデータ通信を行う場合には、TCPヘッダに代えてUDPヘッダが生成される。また、通信装置100は、sendmmsg()により指定される複数のデータをオフローダ106へそれぞれ個別に設定することで、オフローダ106によるデータの分割を行わないこととしてもよい。 In the present embodiment, an example in which the communication device 100 performs data communication by TCP communication will be described, but the present invention is also applicable to other types of data communication. To give a specific example, when the communication device 100 performs data communication by UDP (User Datagram Protocol) communication, a UDP header is generated instead of the TCP header. Further, the communication device 100 may not divide the data by the offloader 106 by individually setting a plurality of data specified by sendmmsg () in the offloader 106.

通信装置100は、システムコールとしてsendmmsg()を利用し、TCP/IP通信におけるプロトコル処理のためにオフローダ106を用いることにより、高速に動画像の通信を行うカメラや医療機器である。これに限らず、通信装置100は、システムコールとしてsendmmsg()を利用し、データ通信におけるプロトコル処理のためにオフローダ106を用いることにより、高速にデータを通信することができる装置であればよい。
通信装置100は、図1に示すように、オフローダ106の他にも、画像形成部101、CPU102、メインメモリ103、システムバス104、オンチップメモリ105、LAN制御部109、およびWLAN制御部110を備える。なお、CPUはCentral Processing Unitの略である。また、LANはLocal Area Networkのの略であり、WLANはWireless Local Area Networkの略である。
The communication device 100 is a camera or medical device that communicates moving images at high speed by using sendmmsg () as a system call and using an offloader 106 for protocol processing in TCP / IP communication. Not limited to this, the communication device 100 may be a device capable of communicating data at high speed by using sendmmsg () as a system call and using an offloader 106 for protocol processing in data communication.
As shown in FIG. 1, the communication device 100 includes an image forming unit 101, a CPU 102, a main memory 103, a system bus 104, an on-chip memory 105, a LAN control unit 109, and a WLAN control unit 110 in addition to the offloader 106. Be prepared. CPU is an abbreviation for Central Processing Unit. LAN is an abbreviation for Local Area Network, and WLAN is an abbreviation for Wireless Local Area Network.

CPU102は、1以上のCPUやMPU(Micro−Processing Unit)などのプロセッサにより構成される装置である。具体的には、メインメモリ103に記憶されたコンピュータプログラムを実行することにより、通信装置100の全体を制御する役割を果たす。より具体的に説明すると、CPU102は、OS、各種ソフトウェアとしてのアプリケーション、および、各ハードウェアブロックを制御するためのドライバを実行する他、TCP/IP通信のプロトコルスタック処理を行うよう構成される。図1には、プロトコルスタック処理によって実現される機能部であるプロトコル処理部111と、CPU102によって実行されるドライバの1つである通信デバイスドライバ112とを図示している。
プロトコル処理部111は、TCP/IP通信のためのプロトコル処理を行う機能部である。プロトコル処理部111は、sendmmsg()により指定されたメッセージに基づいて複数のパケットを生成し、通信デバイスドライバ112を起動する。より詳しくは、プロトコル処理部111は、sendmmsg()により指定されたメッセージに基づいてオフローダ106にパケット(またはパケットのヘッダ)を生成させることにより、複数のパケットを生成する。また、プロトコル処理部111は、後述する特定パケット(または特定ヘッダ)の生成が完了した場合に、通信デバイスドライバ112を起動する。
The CPU 102 is a device composed of one or more CPUs and a processor such as an MPU (Micro-Processing Unit). Specifically, it plays a role of controlling the entire communication device 100 by executing the computer program stored in the main memory 103. More specifically, the CPU 102 is configured to execute an OS, an application as various software, and a driver for controlling each hardware block, and also perform a protocol stack process for TCP / IP communication. FIG. 1 illustrates a protocol processing unit 111, which is a functional unit realized by protocol stack processing, and a communication device driver 112, which is one of the drivers executed by the CPU 102.
The protocol processing unit 111 is a functional unit that performs protocol processing for TCP / IP communication. The protocol processing unit 111 generates a plurality of packets based on the message specified by sendmmsg (), and activates the communication device driver 112. More specifically, the protocol processing unit 111 generates a plurality of packets by causing the offloader 106 to generate a packet (or a packet header) based on the message specified by sendmmsg (). Further, the protocol processing unit 111 activates the communication device driver 112 when the generation of the specific packet (or specific header) described later is completed.

プロトコル処理部111の処理は、CPU102が実行するアプリケーションによって起動される。このアプリケーションには、画像形成部101により取得された動画像をPC(Personal Computer)などの他の装置やサーバに送信するソフトウェアが含まれる。
通信デバイスドライバ112は、LAN制御部109およびWLAN制御部110を制御するドライバである。この制御には、送信対象のパケットをLAN制御部109もしくはWLAN制御部110に転送することが含まれる。詳しくは後述するが、この転送はDMA(Direct Memory Access)転送により実行される。DMA転送は、CPU102以外のハードウェアから、CPU102を経由せずに直接、メインメモリ103またはオンチップメモリ105にアクセスすることを意味する。
The processing of the protocol processing unit 111 is started by the application executed by the CPU 102. This application includes software that transmits a moving image acquired by the image forming unit 101 to another device or server such as a PC (Personal Computer).
The communication device driver 112 is a driver that controls the LAN control unit 109 and the WLAN control unit 110. This control includes forwarding a packet to be transmitted to the LAN control unit 109 or the WLAN control unit 110. As will be described in detail later, this transfer is executed by DMA (Direct Memory Access) transfer. DMA transfer means accessing the main memory 103 or the on-chip memory 105 directly from hardware other than the CPU 102 without going through the CPU 102.

メインメモリ103は、ROMやRAM等の1以上のメモリにより構成される記憶装置であり、後述する各種動作を行うためのコンピュータプログラムや、無線通信のための通信パラメータ等の各種情報を記憶する。なお、ROMはRead Only Memoryの略であり、RAMはRandom Access Memoryの略である。また、メインメモリ103は、アプリケーションが利用するメモリ領域としても機能し、メッセージとして指定される動画像等のデータを格納する役割を果たす。
オンチップメモリ105も、ROMやRAM等の1以上のメモリにより構成される記憶装置である。オンチップメモリ105は、主にプロトコルスタックが利用するメモリ領域であり、パケットを生成するためのデータバッファやパケットのヘッダを生成する領域として使用される。
The main memory 103 is a storage device composed of one or more memories such as ROM and RAM, and stores various information such as a computer program for performing various operations described later and communication parameters for wireless communication. ROM is an abbreviation for Read Only Memory, and RAM is an abbreviation for Random Access Memory. The main memory 103 also functions as a memory area used by the application, and plays a role of storing data such as a moving image designated as a message.
The on-chip memory 105 is also a storage device composed of one or more memories such as ROM and RAM. The on-chip memory 105 is a memory area mainly used by the protocol stack, and is used as an area for generating a data buffer for generating a packet and a header of the packet.

システムバス104は、通信装置100内の各装置が相互に通信を行うための伝送路である。CPU102で実行されるアプリケーションがメインメモリ103に格納された動画像等のデータをリードおよびライトする際には、システムバス104を介してアクセスが行われる。同様に、プロトコルスタックがオンチップメモリ105をリードおよびライトする際にも、システムバス104を介してアクセスが行われる。その他、各ハードウェアブロック間のデータのやり取りも、システムバス104を介して行われる。オフローダ106などがCPU102を介さずに直接メインメモリ103およびオンチップメモリ105へのリードおよびライトを行う場合(上述したDMA転送の場合)にも、システムバス104を介してアクセスが行われる。 The system bus 104 is a transmission line for each device in the communication device 100 to communicate with each other. When an application executed by the CPU 102 reads and writes data such as a moving image stored in the main memory 103, the application is accessed via the system bus 104. Similarly, when the protocol stack reads and writes the on-chip memory 105, it is accessed via the system bus 104. In addition, data exchange between each hardware block is also performed via the system bus 104. Even when the offloader 106 or the like directly reads and writes to the main memory 103 and the on-chip memory 105 without going through the CPU 102 (in the case of the DMA transfer described above), the access is also performed via the system bus 104.

オフローダ106は、パケット生成部107およびデータ転送部108を機能として有するハードウェアである。パケット生成部107は、アプリケーションからのメッセージ(データ)に基づいてパケットを生成する。データ転送部108は、オフローダ106からオンチップメモリ105およびメインメモリ103へのDMA転送を実現する。
パケット生成部107は、sendmmsg()によって指定された複数(2以上)のメッセージについて、レジスタ設定に従って複数のパケットの一括生成処理を行う。そして、生成した複数のパケットをオンチップメモリ105またはメインメモリ103上に書き込む。CPU102のプロトコル処理部111は、sendmmsg()により複数のメッセージが指定されたことに応じて、パケット生成部107の内部レジスタにドライバを介してアクセスし、パケットの生成処理を実行させる。
The offloader 106 is hardware having a packet generation unit 107 and a data transfer unit 108 as functions. The packet generation unit 107 generates a packet based on a message (data) from the application. The data transfer unit 108 realizes DMA transfer from the offloader 106 to the on-chip memory 105 and the main memory 103.
The packet generation unit 107 performs batch generation processing of a plurality of packets according to the register setting for a plurality of (two or more) messages specified by sendmmsg (). Then, the generated plurality of packets are written on the on-chip memory 105 or the main memory 103. The protocol processing unit 111 of the CPU 102 accesses the internal register of the packet generation unit 107 via the driver in response to a plurality of messages specified by sendmmsg (), and causes the packet generation processing to be executed.

ここで、図1に示すように、プロトコル処理部111は、終了タイミング決定部113を含んで構成される。終了タイミング決定部113は、オフローダ106によって生成される複数のパケットの中から通信デバイスドライバ112の処理開始タイミングを決定するためのパケットを選択し、「特定パケット」として決定する。詳しくは後述するが、こうして特定パケットを決定するのは、まだ生成が完了していないパケットについて、通信デバイスドライバ112による送信処理が走ってしまうことを防止するためである。
プロトコル処理部111は、割り込みまたはポーリングにより、終了タイミング決定部113により決定した特定パケットの生成完了の検出を試み、特定パケットの生成完了を検出したことに応じて、通信デバイスドライバ112に処理を開始させる。この後、オフローダ106における特定パケット以降のパケット生成処理と並行して、通信デバイスドライバ112の処理が実行されることになる。
Here, as shown in FIG. 1, the protocol processing unit 111 includes an end timing determination unit 113. The end timing determination unit 113 selects a packet for determining the processing start timing of the communication device driver 112 from a plurality of packets generated by the offloader 106, and determines the packet as a “specific packet”. Although the details will be described later, the reason why the specific packet is determined in this way is to prevent the transmission process by the communication device driver 112 from running for the packet whose generation has not been completed yet.
The protocol processing unit 111 attempts to detect the completion of generation of the specific packet determined by the end timing determination unit 113 by interrupt or polling, and starts processing in the communication device driver 112 in response to the detection of the completion of generation of the specific packet. Let me. After that, the processing of the communication device driver 112 is executed in parallel with the packet generation processing after the specific packet in the offloader 106.

なお、ここまでの説明ではオフローダ106がパケットの生成を行うものとして説明してきたが、これに限らず、オフローダ106はインターネットチェックサム(後述)が挿入されたヘッダのみを生成、出力してもよいものとする。この場合、CPU102は、オフローダ106によって生成されたヘッダを用いて、パケットの生成を実行するよう構成される。また、終了タイミング決定部113は、特定パケットに代え、オフローダ106が出力する複数のヘッダの中から通信デバイスドライバ112の処理開始タイミングを決定するためのヘッダを選択し、「特定ヘッダ」として決定するよう構成される。 In the above description, the offloader 106 has been described as generating the packet, but the offloader 106 may generate and output only the header in which the Internet checksum (described later) is inserted. It shall be. In this case, the CPU 102 is configured to execute packet generation using the header generated by the offloader 106. Further, the end timing determination unit 113 selects a header for determining the processing start timing of the communication device driver 112 from a plurality of headers output by the offloader 106 instead of the specific packet, and determines the header as the “specific header”. Is configured.

LAN制御部109およびWLAN制御部110は、データリンク層の一部を構成するメディアアクセス制御(MAC)と、物理層(PHY)にかかる処理とを行う通信デバイスである。なお、MACはMedia Access Controlの略であり、PHYはPhysical Layerの略である。より具体的に説明すると、LAN制御部109は、有線LAN等の有線通信の制御を行う。また、WLAN制御部110は、IEEE802.11シリーズ規格に準拠した無線通信の制御を行う。 The LAN control unit 109 and the WLAN control unit 110 are communication devices that perform media access control (MAC) forming a part of the data link layer and processing related to the physical layer (PHY). MAC is an abbreviation for Medium Access Control, and PHY is an abbreviation for Physical Layer. More specifically, the LAN control unit 109 controls wired communication such as a wired LAN. In addition, the WLAN control unit 110 controls wireless communication in accordance with the IEEE802.11 series standard.

ここで、WLAN制御部110は、IEEE802.11シリーズ規格に加えて、あるいは代えて、Bluetooth(登録商標)、NFC、UWB、ZigBee、MBOAなどの他の無線通信方式に準拠した無線通信の制御を行ってもよい。なお、NFCはNear Field Communicationの略であり、UWBはUltra Wide Bandの略である。また、MBOAはMulti Band OFDM(Orthogonal Frequency Division Multiplexing) Allianceの略である。
また、通信装置100は、LAN制御部109およびWLAN制御部110のいずれか一方のみを有する通信装置であってもよい。
Here, the WLAN control unit 110 controls wireless communication in accordance with other wireless communication methods such as Bluetooth (registered trademark), NFC, UWB, ZigBee, and MBOA in addition to or in place of the IEEE802.11 series standard. You may go. NFC is an abbreviation for Near Field Communication, and UWB is an abbreviation for Ultra Wide Band. MBOA is an abbreviation for Multi Band OFDM (Orthogonal Frequency Division Multiplexing) Alliance.
Further, the communication device 100 may be a communication device having only one of the LAN control unit 109 and the WLAN control unit 110.

パケット生成部107(またはCPU102)により生成されたパケットは、オンチップメモリ105またはメインメモリ103に一旦書き込まれ、そこから、LAN制御部109およびWLAN制御部110を介してPCやサーバ等の外部機器へ送信される。LAN制御部109およびWLAN制御部110は、通信デバイスドライバ112の制御に従い、DMA転送によってオンチップメモリ105またはメインメモリ103から直接リードすることにより、送信対象のパケットを取得するよう構成される。 The packet generated by the packet generation unit 107 (or CPU 102) is once written in the on-chip memory 105 or the main memory 103, and from there, an external device such as a PC or a server via the LAN control unit 109 and the WLAN control unit 110. Will be sent to. The LAN control unit 109 and the WLAN control unit 110 are configured to acquire a packet to be transmitted by directly reading from the on-chip memory 105 or the main memory 103 by DMA transfer under the control of the communication device driver 112.

オフローダ106からオンチップメモリ105またはメインメモリ103へのパケットのライトは、データ転送部108によるDMA転送を用いて実行される。
ここで、データ転送部108は、パケットをDMA転送している間にインターネットチェックサムを計算するチェックサム計算機能を有しており、パケット生成部107とともにプロトコルスタックの処理を高速化する役割を果たす。インターネットチェックサムとは、IETFで規定されるRFC791、RFC793、RFC2460、および、RFC1071のいずれかにおける16ビットワードごとの1の補数和の1の補数であるものとする。なおIETFはInternet Engineering Task Forceの略であり、RFCはRequest for Commentsの略である。チェックサム計算機能により算出されたインターネットチェックサムは、データ転送部108によってパケットの末尾に付加される。
また、パケット生成部107によるパケットの生成は、実際には、データ転送部108がメインメモリ103から送信対象のメッセージをMSS分だけ読み出し、パケット生成部107が生成したヘッダに付加することによって完結する。本実施形態においては、これらのデータ転送部108による処理も含めて、パケット生成部107によるパケットの生成と称する。
The write of the packet from the offloader 106 to the on-chip memory 105 or the main memory 103 is executed by using the DMA transfer by the data transfer unit 108.
Here, the data transfer unit 108 has a checksum calculation function for calculating the Internet checksum while the packet is DMA-transferred, and plays a role of speeding up the processing of the protocol stack together with the packet generation unit 107. .. The Internet checksum is one's complement of the sum of 1's complement for every 16-bit word in any of RFC791, RFC793, RFC2460, and RFC1071 defined by the IETF. Note that IETF is an abbreviation for Internet Engineering Task Force, and RFC is an abbreviation for Request for Comments. The Internet checksum calculated by the checksum calculation function is added to the end of the packet by the data transfer unit 108.
Further, the packet generation by the packet generation unit 107 is actually completed by the data transfer unit 108 reading the message to be transmitted from the main memory 103 by the amount of the MSS and adding it to the header generated by the packet generation unit 107. .. In the present embodiment, including the processing by the data transfer unit 108, it is referred to as packet generation by the packet generation unit 107.

通信装置100は、sendmmsg()により送信対象のメッセージとして指定された複数のメッセージに基づいてオフローダ106にパケットを生成させることと並行して、通信デバイスドライバ112によるパケットの送信処理を実行するよう構成される。これによれば、オフローダ106によるパケット(またはヘッダ)の生成がすべて完了した後に通信デバイスドライバ112による送信処理を実行する場合に比べ、パケットの送信処理を効率的に実行することが可能になる。以下、この点について詳しく説明する。 The communication device 100 is configured to execute the packet transmission process by the communication device driver 112 in parallel with causing the offloader 106 to generate a packet based on a plurality of messages specified as messages to be transmitted by sendmmsg (). Will be done. According to this, the packet transmission processing can be executed more efficiently than the case where the transmission processing by the communication device driver 112 is executed after all the generation of the packet (or header) by the offloader 106 is completed. This point will be described in detail below.

(送信処理のプロファイル)
図2は、本実施形態における送信処理のプロファイルの一例を示す図である。ここでは、CPU102が実行するソフトウェア処理の順序と、オフローダ106による処理(オフローダ処理)の開始および終了のタイミングとの関係について説明する。なお、図2においては、CPU102が実行するソフトウェア処理をアプリケーション処理200から記載しているが、実際には、これ以前のタイミングで、OSの起動、各種データの初期化を含む各種の処理が実行される。
アプリケーション処理200において、CPU102は、画像形成部101が取得した動画像を送信するためにソケットを作成し、送信対象のデータを指定するためのsendmmsg()をコールする。こうしてsendmmsg()がコールされることでタスクスイッチが発生し、プロトコル処理部111による処理(プロトコル処理202)が開始される。
(Profile of transmission process)
FIG. 2 is a diagram showing an example of a transmission processing profile in the present embodiment. Here, the relationship between the order of software processing executed by the CPU 102 and the start and end timings of processing by the offloader 106 (offloader processing) will be described. In FIG. 2, the software process executed by the CPU 102 is described from the application process 200, but in reality, various processes including OS startup and initialization of various data are executed at timings prior to this. Will be done.
In the application process 200, the CPU 102 creates a socket for transmitting the moving image acquired by the image forming unit 101, and calls sendmmsg () for designating the data to be transmitted. When sendmmsg () is called in this way, a task switch is generated, and processing by the protocol processing unit 111 (protocol processing 202) is started.

プロトコル処理202においてCPU102は、送信対象のデータに対応するひな形のTCPヘッダおよびIPヘッダを生成するとともに、オフローダ106のレジスタ設定を行う。また、CPU102は、上述した特定パケット(または特定ヘッダ)の決定を行う。
ここで、オフローダ106のレジスタへは、データの先頭アドレス、複数データのデータサイズの合計、分割サイズを含む各種のデータが設定される。なお、オフローダ106でデータ分割を行わない場合には、データごとに、データサイズ及び先頭アドレスが個別に設定されることとしてもよい。
In the protocol process 202, the CPU 102 generates a template TCP header and an IP header corresponding to the data to be transmitted, and sets the register of the offloader 106. Further, the CPU 102 determines the specific packet (or specific header) described above.
Here, various data including the start address of the data, the total data size of the plurality of data, and the division size are set in the register of the offloader 106. When the offloader 106 does not divide the data, the data size and the start address may be set individually for each data.

CPU102は、プロトコル処理202が完了すると、処理実行207をオフローダ106に通知し、オフローダ106の終了待ち203となる。オフローダ106は、この処理実行207が通知されるまでアイドル状態201であり、処理実行207が通知されたことに応じて、パケットの一括生成処理204を開始する。
パケットの一括生成処理204では、パケット生成部107により、まず初めに、プロトコル処理202で生成されたTCPヘッダおよびIPヘッダのひな形と、レジスタに設定されたデータとに基づいて、各データに対応するヘッダを生成する処理が行われる。次にパケット生成部107は、チェックサム演算を伴うDMA転送をデータ転送部108に実行させるためのデスクリプタを生成し、データ転送部108に対して供給する。また、パケット生成部107は、データ転送部108のレジスタに対し、DMA転送の実行に必要なデータの設定を行う。その後、パケット生成部107は、データ転送部108のレジスタに転送開始のフラグを設定する。これによりデータ転送部108は、生成したパケットのDMA転送および該パケットのチェックサム演算(および算出したチェックサムのパケットへの付加)を開始する。
When the protocol process 202 is completed, the CPU 102 notifies the offloader 106 of the process execution 207, and waits for the offloader 106 to finish 203. The offloader 106 is in the idle state 201 until the processing execution 207 is notified, and starts the packet batch generation processing 204 in response to the notification of the processing execution 207.
In the packet batch generation process 204, the packet generator 107 first corresponds to each data based on the TCP header and IP header templates generated in the protocol process 202 and the data set in the registers. The process of generating the header to be performed is performed. Next, the packet generation unit 107 generates a descriptor for causing the data transfer unit 108 to execute a DMA transfer accompanied by a checksum operation, and supplies the descriptor to the data transfer unit 108. Further, the packet generation unit 107 sets the data required for executing the DMA transfer in the register of the data transfer unit 108. After that, the packet generation unit 107 sets the transfer start flag in the register of the data transfer unit 108. As a result, the data transfer unit 108 starts the DMA transfer of the generated packet and the checksum calculation (and addition of the calculated checksum to the packet) of the packet.

CPU102のプロトコル処理部111は、終了待ち203となっている間、断続的又は連続的に、特定パケット(または特定ヘッダ)の検出処理を行う。その結果として特定パケット(または特定ヘッダ)の生成完了208を検出したプロトコル処理部111は、通信デバイスドライバ112による処理(通信デバイスドライバ処理205)を起動する。 The protocol processing unit 111 of the CPU 102 intermittently or continuously performs detection processing of a specific packet (or a specific header) while waiting for the end 203. As a result, the protocol processing unit 111 that detects the generation completion 208 of the specific packet (or the specific header) activates the processing by the communication device driver 112 (communication device driver processing 205).

ここで、プロトコル処理部111は、終了待ち203となっている間、特定パケット(または特定ヘッダ)に対応するデスクリプタのステータス書戻り値をポーリングすることにより、パケット(または特定ヘッダ)の生成完了208を検出する。なお、特定パケット(または特定ヘッダ)の生成完了に応じてデータ転送部108が割り込みを出力することとし、プロトコル処理部111は、この割り込みを検出することにより、生成完了208を検出することとしてもよい。 Here, the protocol processing unit 111 polls the status return value of the descriptor corresponding to the specific packet (or specific header) while waiting for the end 203, thereby completing the generation of the packet (or specific header) 208. Is detected. It should be noted that the data transfer unit 108 outputs an interrupt in response to the completion of generation of the specific packet (or specific header), and the protocol processing unit 111 may detect the generation completion 208 by detecting this interrupt. Good.

通信デバイスドライバ処理205は、オフローダ106により生成されたパケットをオンチップメモリ105またはメインメモリ103からLAN制御部109もしくはWLAN制御部110に転送し、これらに外部機器への送信を実行させる処理である。LAN制御部109もしくはWLAN制御部110は、パケット送信後、送信完了割り込みをCPU102のプロトコル処理部111に通知する。 The communication device driver process 205 is a process of transferring the packet generated by the offloader 106 from the on-chip memory 105 or the main memory 103 to the LAN control unit 109 or the WLAN control unit 110, and causing them to execute transmission to an external device. .. After transmitting the packet, the LAN control unit 109 or the WLAN control unit 110 notifies the protocol processing unit 111 of the CPU 102 of the transmission completion interrupt.

パケットの送信がUDP通信によって実行された場合、CPU102は、すべてのパケットについて送信完了割り込みが通知されたことに応じて、送信終了処理206を実行する。送信終了処理206は、具体的には、パケットを格納していたオンチップメモリ105またはメインメモリ103内の領域を開放する処理を含む。一方、パケットの送信がTCP通信によって実行された場合、CPU102は、すべてのパケットについてACK(Acknowledgement)を受信したことに応じて、送信終了処理206を実行する。オフローダ106は、CPU102のプロトコル処理部111により設定されたデータにかかるすべてのパケットの生成が完了した後、再度アイドル状態となる。 When the transmission of the packet is executed by UDP communication, the CPU 102 executes the transmission end process 206 in response to the notification of the transmission completion interrupt for all the packets. Specifically, the transmission end process 206 includes a process of releasing an area in the on-chip memory 105 or the main memory 103 that stores the packet. On the other hand, when the transmission of the packet is executed by TCP communication, the CPU 102 executes the transmission end process 206 in response to receiving ACK (Acknowledgement) for all the packets. The offloader 106 goes into an idle state again after the generation of all packets related to the data set by the protocol processing unit 111 of the CPU 102 is completed.

(デスクリプタ)
図3は、パケット生成部107からデータ転送部108に供給されるデスクリプタ300を示す図である。デスクリプタ300は、パケット生成部107により、オフローダ106の内部メモリ上、もしくは、オンチップメモリ105またはメインメモリ103上に生成されるものである。同図に示すように、デスクリプタ300は、識別番号301、連続設定302、SRCアドレス303、DSTアドレス304、転送データ長305、次デスクリプタのアドレス306、および、ステータスフィールド307を含む。
なお、デスクリプタ300は、データ転送部108の仕様に応じて必要数生成されるものとする。具体的に言えば、デスクリプタ300は、パケットとチェックサムの転送のそれぞれについて生成されてもよいし、ヘッダ、データのリード、パケット、チェックサムのライトのそれぞれについて生成されてもよい。
(Descriptor)
FIG. 3 is a diagram showing a descriptor 300 supplied from the packet generation unit 107 to the data transfer unit 108. The descriptor 300 is generated by the packet generation unit 107 on the internal memory of the offloader 106, or on the on-chip memory 105 or the main memory 103. As shown in the figure, the descriptor 300 includes an identification number 301, a continuous setting 302, an SRC address 303, a DST address 304, a transfer data length 305, an address 306 of the next descriptor, and a status field 307.
It is assumed that the required number of descriptors 300 are generated according to the specifications of the data transfer unit 108. Specifically, the descriptor 300 may be generated for each of the packet and checksum forwarding, or for each of the header, data read, packet, and checksum write.

識別番号301には、個々のデスクリプタ300を識別するためのユニークな番号が設定される。連続設定302には、デスクリプタ300に応じてDMA転送が実行された後、アドレス306に格納されるアドレスにより示される次デスクリプタによるDMA転送を続けて実行するかどうかが設定される。
SRCアドレス303には転送元アドレスが設定され、DSTアドレス304には転送先アドレスが設定される。なお、リードおよびライトの転送が分かれたDMA転送を行う場合には、SRCアドレス303およびDSTアドレス304のいずれか一方のみが設定されるデスクリプタ300を使用してもよい。
転送データ長305には、DMA転送するデータの長さが設定される。ステータスフィールド307には、デスクリプタ300によるDMA転送の開始前と完了後とを識別可能な値が設定される。ステータスフィールド307は、対応するパケットがオンチップメモリ105またはメインメモリ103上に書き込まれることによってDMA転送が完了した後、データ転送部108によって上書きされる。
A unique number for identifying each descriptor 300 is set in the identification number 301. In the continuous setting 302, it is set whether or not to continuously execute the DMA transfer by the next descriptor indicated by the address stored in the address 306 after the DMA transfer is executed according to the descriptor 300.
A transfer source address is set in the SRC address 303, and a transfer destination address is set in the DST address 304. When performing DMA transfer in which read and write transfers are separated, the descriptor 300 in which only one of the SRC address 303 and the DST address 304 is set may be used.
The transfer data length 305 is set to the length of the data to be transferred by DMA. In the status field 307, a value that can identify before the start and after the completion of the DMA transfer by the descriptor 300 is set. The status field 307 is overwritten by the data transfer unit 108 after the DMA transfer is completed by writing the corresponding packet onto the on-chip memory 105 or the main memory 103.

(特定パケット/特定ヘッダの決定方法)
次に、プロトコル処理部111における特定パケット(または特定ヘッダ)の決定方法について説明を行う。
プロトコル処理部111による特定パケット(または特定ヘッダ)決定の具体的な方法は、1パケットにかかるオフローダ106および通信デバイスドライバ112それぞれの処理時間の大小関係に応じて異なる。そこで以下では、1パケットにかかるオフローダ106の処理時間が1パケットにかかる通信デバイスドライバ112の処理時間よりも長い場合(以下、「第1の処理時間関係時」という)を図4に示す。また、1パケットにかかるオフローダ106の処理時間が1パケットにかかる通信デバイスドライバ112の処理時間よりも短い場合(以下、「第2の処理時間関係時」という)を図5に示す。そして、これら図4および図5を参照しながら、各々の条件に応じた決定方法を説明する。
(Method of determining specific packet / specific header)
Next, a method of determining a specific packet (or a specific header) in the protocol processing unit 111 will be described.
The specific method for determining the specific packet (or specific header) by the protocol processing unit 111 differs depending on the magnitude relationship of the processing time of the offloader 106 and the communication device driver 112 per packet. Therefore, in the following, FIG. 4 shows a case where the processing time of the offloader 106 for one packet is longer than the processing time of the communication device driver 112 for one packet (hereinafter, referred to as “first processing time relationship”). Further, FIG. 5 shows a case where the processing time of the offloader 106 for one packet is shorter than the processing time of the communication device driver 112 for one packet (hereinafter, referred to as “second processing time relationship”). Then, the determination method according to each condition will be described with reference to FIGS. 4 and 5.

図4は、第1の処理時間関係時における特定パケット(または特定ヘッダ)の決定方法を説明する図である。1パケットにかかるオフローダ106の処理時間をA、1パケットにかかる通信デバイスドライバ112の処理時間をBとすると、図4の例においては、次の式1に示す関係がAとBの間に成立する。
A>B ・・・(式1)
式1が成立する典型的なケースとしては、オフローダ106の動作クロックと、LAN制御部109もしくはWLAN制御部110のデータ転送における動作クロックとが同じであり、かつ、オフローダ106がパケットを生成する場合が挙げられる。以下、このケースを例として説明を続けるが、オフローダ106がヘッダを生成する場合についても同様である。
FIG. 4 is a diagram illustrating a method of determining a specific packet (or a specific header) in relation to the first processing time. Assuming that the processing time of the offloader 106 for one packet is A and the processing time of the communication device driver 112 for one packet is B, in the example of FIG. 4, the relationship shown in the following equation 1 is established between A and B. To do.
A> B ... (Equation 1)
A typical case in which Equation 1 holds is that the operating clock of the offloader 106 is the same as the operating clock of the LAN control unit 109 or the WLAN control unit 110 in data transfer, and the offloader 106 generates a packet. Can be mentioned. Hereinafter, the description will be continued using this case as an example, but the same applies to the case where the offloader 106 generates a header.

図4に示すように、この場合におけるオフローダ106の処理は、ヘッダおよびデータのリード期間400と、チェックサム演算を伴うパケットのライト期間401とを交互に繰り返す、というものになる。また、通信デバイスドライバ112の処理は、オンチップメモリ105もしくはメインメモリ103からのパケットのリード期間402と、LAN制御部109もしくはWLAN制御部110へのパケットのライト期間403を交互に繰り返す、というものになる。
ここで、図中の各期間に記載される番号は、生成されるパケットのオーダー(生成順)を表す。
As shown in FIG. 4, the processing of the offloader 106 in this case is such that the read period 400 of the header and data and the write period 401 of the packet accompanied by the checksum operation are alternately repeated. Further, the processing of the communication device driver 112 alternately repeats the read period 402 of the packet from the on-chip memory 105 or the main memory 103 and the write period 403 of the packet to the LAN control unit 109 or the WLAN control unit 110. become.
Here, the numbers described in each period in the figure represent the order (generation order) of the generated packets.

式1の条件下では、もし仮に、1パケット目の生成完了直後に通信デバイスドライバ112の処理を開始した場合、後続のパケットにおいて、生成が完了する前にパケットの送信処理が実行されてしまう可能性がある。1パケットの送信にかかる時間(=B)が1パケットの生成にかかる時間(=A)よりも短いからである。そこで、式1の条件下では、あるパケットの生成が完了する前にそのパケットの送信処理が実行されてしまうことのないように通信デバイスドライバ112の処理の開始タイミングを遅らせる必要がある。 Under the condition of Equation 1, if the processing of the communication device driver 112 is started immediately after the generation of the first packet is completed, the packet transmission processing may be executed before the generation is completed in the subsequent packets. There is sex. This is because the time required to transmit one packet (= B) is shorter than the time required to generate one packet (= A). Therefore, under the condition of Equation 1, it is necessary to delay the start timing of the processing of the communication device driver 112 so that the transmission processing of the packet is not executed before the generation of the packet is completed.

処理時間A,Bが一定である場合、次の式2により決定されるオーダーのパケットまで通信デバイスドライバ112の処理の開始タイミングを遅らせれば、生成が完了する前にパケットの送信処理が実行されてしまうことを防止することができる。そこで本実施形態では、式2により決定されるオーダーのパケットを特定パケットとして決定し、特定パケットの生成完了まで通信デバイスドライバ112の処理の開始を遅らせるようにしている。ただし、式2内の「n」は、プロトコル処理部111により一括で生成されるパケットの個数である。
(特定パケットのオーダー)=((A−B)/A)×n ・・・(式2)
一例として、一括で生成するパケット数nが127であり、処理時間Aが2.2μ秒、処理時間Bが2μ秒である場合の特定パケットのオーダーは、式2によれば、小数点以下を切り上げ、12番目となる。
When the processing times A and B are constant, if the start timing of the processing of the communication device driver 112 is delayed until the packet of the order determined by the following equation 2, the packet transmission processing is executed before the generation is completed. It is possible to prevent the packet from being lost. Therefore, in the present embodiment, the packet of the order determined by the equation 2 is determined as the specific packet, and the start of the processing of the communication device driver 112 is delayed until the generation of the specific packet is completed. However, "n" in Equation 2 is the number of packets collectively generated by the protocol processing unit 111.
(Order of specific packet) = ((AB) / A) × n ... (Equation 2)
As an example, when the number of packets n generated in a batch is 127, the processing time A is 2.2 μs, and the processing time B is 2 μs, the order of specific packets is rounded up to the nearest whole number according to Equation 2. , 12th.

図5は、第2の処理時間関係時における特定パケット(または特定ヘッダ)の決定方法を説明する図である。図5の例においては、上述した処理時間A,Bの間に、次の式3に示す関係が成立する。
A<B ・・・(式3)
式3が成立する典型的なケースとしては、オフローダ106の動作クロックと、LAN制御部109もしくはWLAN制御部110のデータ転送における動作クロックとが同じであり、かつ、オフローダ106がヘッダを生成する場合が挙げられる。以下、このケースを例として説明を続けるが、オフローダ106がパケットを生成する場合についても同様である。
FIG. 5 is a diagram illustrating a method of determining a specific packet (or a specific header) in relation to the second processing time. In the example of FIG. 5, the relationship shown in the following equation 3 is established between the processing times A and B described above.
A <B ... (Equation 3)
A typical case in which Equation 3 holds is that the operating clock of the offloader 106 is the same as the operating clock of the LAN control unit 109 or the WLAN control unit 110 in data transfer, and the offloader 106 generates a header. Can be mentioned. Hereinafter, the description will be continued by taking this case as an example, but the same applies to the case where the offloader 106 generates a packet.

図5に示すように、この場合におけるオフローダ106の処理は、ヘッダおよびデータのリード期間500と、チェックサム演算およびヘッダのライト期間501を交互に繰り返す、というものになる。ライト期間501の時間長は図4のライト期間401の時間長に比べて大幅に短くなっているが、これは、オフローダ106のライト処理がヘッダ及びチェックサムのみのライトとなるためである。また、通信デバイスドライバ112の処理は、図4の場合と同様に、リード期間502と、ライト期間503とを交互に繰り返す、というものになる。リード期間502は、オンチップメモリ105もしくはメインメモリ103からパケット(オフローダ106によって書き込まれたヘッダ及びチェックサムと、アプリケーションによって書き込まれたデータとを含む)をリードする期間である。ライト期間503は、LAN制御部109もしくはWLAN制御部110にパケットをライトする期間である。
ここで、図中の各期間に記載される番号は、生成されるヘッダ、または、送信されるパケットのオーダーを表す。
As shown in FIG. 5, the processing of the offloader 106 in this case is such that the read period 500 of the header and data and the checksum operation and the write period 501 of the header are alternately repeated. The time length of the write period 501 is significantly shorter than the time length of the write period 401 of FIG. 4, because the write process of the offloader 106 is to write only the header and the checksum. Further, the process of the communication device driver 112 is such that the read period 502 and the write period 503 are alternately repeated as in the case of FIG. The read period 502 is a period for reading a packet (including a header and checksum written by the offloader 106 and data written by the application) from the on-chip memory 105 or the main memory 103. The write period 503 is a period for writing a packet to the LAN control unit 109 or the WLAN control unit 110.
Here, the number described in each period in the figure represents the header generated or the order of the packet to be transmitted.

式3の条件下では、1番目のヘッダの生成完了直後に通信デバイスドライバ112の処理を開始したとしても、あるパケットの生成が完了する前にそのパケットの送信処理が実行されてしまう、という事態は発生しない。したがって、特定ヘッダとしては、図5に示すように、常に1番目のヘッダを選択すればよい。 Under the condition of Equation 3, even if the processing of the communication device driver 112 is started immediately after the generation of the first header is completed, the transmission processing of the packet is executed before the generation of a certain packet is completed. Does not occur. Therefore, as the specific header, as shown in FIG. 5, the first header may always be selected.

次に、プロトコル処理部111が行う処理について、処理のフローチャートを参照しながら詳しく説明する。
(プロトコル処理部の処理)
図6は、プロトコル処理部111が行う処理のフローチャートを示す図である。同図には、プロトコル処理部111がオフローダ106にパケットを生成させ、生成されたパケットを通信デバイスドライバ112に引き渡すまでの処理フローを示している。SはStepの略である。
Next, the processing performed by the protocol processing unit 111 will be described in detail with reference to the processing flowchart.
(Processing of protocol processing unit)
FIG. 6 is a diagram showing a flowchart of processing performed by the protocol processing unit 111. The figure shows a processing flow from the protocol processing unit 111 causing the offloader 106 to generate a packet and passing the generated packet to the communication device driver 112. S is an abbreviation for Step.

初めに、プロトコル処理部111は、アプリケーションがコールするsendmmsg()によりk個のパケット分のサイズを有するメッセージを受け取る(S600)。次いでプロトコル処理部111は、ひな形のヘッダを生成するとともに、上述した式2に従って特定パケットを決定する(S601)。なお、オフローダ106にヘッダのみを生成させる場合には、図5を参照して説明したように、特定ヘッダとして1番目のヘッダを決定すればよい。
特定パケットを決定したプロトコル処理部111は、オフローダ106のレジスタを設定し、オフローダ106に対して処理実行を通知する(S602)。この通知を受けたオフローダ106は、S600で受信されたメッセージに対応するk個のパケットの一括生成を開始する。
First, the protocol processing unit 111 receives a message having a size of k packets by sendmmsg () called by the application (S600). Next, the protocol processing unit 111 generates a template header and determines a specific packet according to the above equation 2 (S601). When the offloader 106 is to generate only the header, the first header may be determined as the specific header as described with reference to FIG.
The protocol processing unit 111 that has determined the specific packet sets the register of the offloader 106 and notifies the offloader 106 of the processing execution (S602). Upon receiving this notification, the offloader 106 starts batch generation of k packets corresponding to the message received in S600.

プロトコル処理部111は次に、パケット数kが特定パケットのオーダーよりも大きいかどうかを判定する(S603)。その結果、大きいと判定した場合にはS604の処理に進み、大きくないと判定した場合にはS606の処理に進む。
S604に進んだプロトコル処理部111は、ポーリングもしくは割り込みにより、特定パケットの生成が完了したかどうかを判定する。
Next, the protocol processing unit 111 determines whether the number of packets k is larger than the order of the specific packet (S603). As a result, if it is determined that it is large, the process proceeds to S604, and if it is determined that it is not large, the process proceeds to S606.
The protocol processing unit 111 that has advanced to S604 determines whether or not the generation of the specific packet is completed by polling or interrupting.

S604の判定にポーリングを用いる場合、プロトコル処理部111は、S604において特定パケットの生成が完了していないと判定すると、所定時間待機した後(S605)、再度、S604の判定処理を行う。S604において特定パケットの生成が完了したと判定した場合、プロトコル処理部111は、S608の処理に進む。
S604の判定に割り込みを用いる場合、プロトコル処理部111は、S604で一旦タスクスリープし、特定パケットの生成完了時の割り込みが検出された場合に起床して、S608の処理に進む。
When polling is used for the determination of S604, if it is determined in S604 that the generation of the specific packet is not completed, the protocol processing unit 111 waits for a predetermined time (S605) and then performs the determination process of S604 again. When it is determined in S604 that the generation of the specific packet is completed, the protocol processing unit 111 proceeds to the process of S608.
When an interrupt is used for the determination of S604, the protocol processing unit 111 temporarily goes to task sleep in S604, wakes up when an interrupt at the completion of generation of a specific packet is detected, and proceeds to the processing of S608.

S606に進んだプロトコル処理部111は、k番目のパケットの生成が完了したかどうかを判定し、生成が完了していないと判定すると、所定時間待機した後(S607)、再度、S606の判定処理を行う。S606においてk番目のパケットの生成が完了したと判定した場合、プロトコル処理部111は、S608の処理に進む。
S608に進んだプロトコル処理部111は、パケット格納先のアドレス(オフローダ106がパケットを書き込んだオンチップメモリ105もしくはメインメモリ103のアドレス)を送信キューに投入し、通信デバイスドライバ112を起動する。起動した通信デバイスドライバ112は、LAN制御部109またはWLAN制御部110にDMA転送の開始を通知する。この通知を受けたLAN制御部109またはWLAN制御部110は、送信キューに積まれた複数のアドレスのそれぞれから順次パケットを取り出し、外部に送信する処理を行う。
The protocol processing unit 111 that has advanced to S606 determines whether or not the generation of the kth packet is completed, and if it determines that the generation is not completed, waits for a predetermined time (S607) and then again determines the determination process of S606. I do. When it is determined in S606 that the generation of the kth packet is completed, the protocol processing unit 111 proceeds to the processing of S608.
The protocol processing unit 111 that has advanced to S608 puts the packet storage destination address (the address of the on-chip memory 105 or the main memory 103 to which the offloader 106 has written the packet) into the transmission queue, and activates the communication device driver 112. The activated communication device driver 112 notifies the LAN control unit 109 or the WLAN control unit 110 of the start of DMA transfer. Upon receiving this notification, the LAN control unit 109 or the WLAN control unit 110 sequentially extracts packets from each of the plurality of addresses stored in the transmission queue and performs a process of transmitting the packets to the outside.

(送信処理のシーケンス)
次に、通信装置100が行うデータの送信処理について、送信処理のシーケンス図を参照しながら詳しく説明する。
図7は、通信装置100が行うデータ送信処理のシーケンス図である。同図には、アプリケーションによりsendmmsg()がコールされてから、指定されたすべてのメッセージについてLAN制御部110からの送信が完了するまでの処理を示している。
(Sequence of transmission processing)
Next, the data transmission process performed by the communication device 100 will be described in detail with reference to the sequence diagram of the transmission process.
FIG. 7 is a sequence diagram of data transmission processing performed by the communication device 100. The figure shows the process from the call of sendmmsg () by the application to the completion of transmission from the LAN control unit 110 for all the specified messages.

初めに、CPU102が実行しているアプリケーションにより、sendmmsg()がコールされる(S700)。次に、CPU102のプロトコル処理部111により、ひな形のヘッダの生成及び特定パケットの決定が実行されるとともに、パケット生成部107のレジスタが設定され、さらに、パケット生成部107に対して処理実行が通知される(S701)。
処理実行を通知されたパケット生成部107は、この通知に応答し、処理を開始する(S702)。
First, the application running the CPU 102 calls sendmmsg () (S700). Next, the protocol processing unit 111 of the CPU 102 executes the generation of the template header and the determination of the specific packet, sets the register of the packet generation unit 107, and further executes the processing for the packet generation unit 107. You will be notified (S701).
The packet generation unit 107 notified of the processing execution responds to this notification and starts the processing (S702).

処理を開始したパケット生成部107は、プロトコル処理部111が生成したひな形ヘッダを生成されるパケットの数だけ複製し、各パケットに応じて編集することにより、これから生成する各パケット用のヘッダを生成する(S703)。パケット生成部107はさらに、データ転送部108を制御するためのデスクリプタを生成する(S704)。なお、デスクリプタおよび複製ヘッダは、オフローダ106の内部メモリに生成されてもよいし、オンチップメモリ105またはメインメモリ103に生成されてもよい。
パケット生成部107は次に、データ転送部108に対してレジスタ設定を行い、転送開始を通知する(S705)。データ転送部108は、この通知に応答してS708の処理を開始する(S706)。
The packet generation unit 107 that has started processing duplicates the template header generated by the protocol processing unit 111 for the number of generated packets and edits it according to each packet to generate a header for each packet to be generated from now on. Generate (S703). The packet generation unit 107 further generates a descriptor for controlling the data transfer unit 108 (S704). The descriptor and the duplicate header may be generated in the internal memory of the offloader 106, or may be generated in the on-chip memory 105 or the main memory 103.
Next, the packet generation unit 107 sets a register for the data transfer unit 108 and notifies the start of transfer (S705). The data transfer unit 108 starts the process of S708 in response to this notification (S706).

S708の処理について具体的に説明すると、データ転送部108は、パケット生成部107が生成したデスクリプタをリードして解析するとともに、パケット生成部107が複製したヘッダのうち1番目のものをリードする。データ転送部108はまた、リードしたヘッダに対応するメッセージ(ペイロード)をメインメモリ103からリードする。その後、データ転送部108は、リードしたヘッダとペイロードを含むパケットをオンチップメモリ105へライトしつつ、該パケットのチェックサムを計算し、算出したチェックサムについても、パケットの一部としてオンチップメモリ105にライトする。これらのライトが完了した後、データ転送部108は、パケットのライト処理に対応するデスクリプタのステータスに完了を上書きする。なお、オフローダ106がパケット全体ではなくヘッダの生成を担う場合には、S708において、パケットのライトの代わりにヘッダ及びチェックサムのライトが実行されることになる。 Specifically, the processing of S708 will be described in detail. The data transfer unit 108 reads and analyzes the descriptor generated by the packet generation unit 107, and the packet generation unit 107 reads the first one of the duplicated headers. The data transfer unit 108 also reads the message (payload) corresponding to the read header from the main memory 103. After that, the data transfer unit 108 calculates the checksum of the packet while writing the packet including the read header and the payload to the on-chip memory 105, and the calculated checksum is also included in the on-chip memory as a part of the packet. Light to 105. After these writes are completed, the data transfer unit 108 overwrites the completion with the status of the descriptor corresponding to the packet write process. If the offloader 106 is responsible for generating the header instead of the entire packet, the header and checksum write is executed instead of the packet write in S708.

S708の処理は、生成するパケット単位で処理され、パケットの数だけ繰り返される。この繰り返しが実行されている間、CPU102のプロトコル処理部111は、S708において上書きされるデスクリプタのステータスを繰り返しリードすることにより、特定パケットの生成が完了しているかどうかを判定する(S713)。
S713において特定パケットの生成が完了していると判定した場合、プロトコル処理部111は、パケット生成部107で生成される各パケットのオンチップメモリ105上のアドレスを送信キューにセットする。このとき、プロトコル処理部111は、まだ生成されていない1以上のパケットについても、今後それらのパケットが格納されることになるオンチップメモリ105上のアドレスを送信キューにセットする。なお、プロトコル処理部111は、オフローダ106がパケット全体ではなくヘッダの生成を担う場合には、ヘッダのアドレスと、ペイロードのアドレスとの組み合わせを送信キューにセットすればよい。
The processing of S708 is processed for each packet to be generated, and is repeated for the number of packets. While this repetition is being executed, the protocol processing unit 111 of the CPU 102 repeatedly reads the status of the descriptor to be overwritten in S708 to determine whether or not the generation of the specific packet is completed (S713).
When it is determined in S713 that the generation of the specific packet is completed, the protocol processing unit 111 sets the address on the on-chip memory 105 of each packet generated by the packet generation unit 107 in the transmission queue. At this time, the protocol processing unit 111 sets in the transmission queue the address on the on-chip memory 105 in which those packets will be stored in the future even for one or more packets that have not been generated yet. When the offloader 106 is responsible for generating the header instead of the entire packet, the protocol processing unit 111 may set the combination of the header address and the payload address in the transmission queue.

次に、プロトコル処理部111は通信デバイスドライバ112を起動し、送信キューにセットされたパケットをLAN制御部110に転送する為のデスクリプタを作成させる(S715)。LAN制御部110は、こうして作成された各デスクリプタを、自身の内部メモリに登録する(S716)。その後、通信デバイスドライバ112は、LAN制御部110に対し、DMA転送の開始を通知する(S717)。
この通知を受けたLAN制御部110は、S716で登録したデスクリプタに応じたDMA転送を開始する(S718)。具体的には、送信キューにセットされているアドレスからパケットをリードし、外部装置に送信する処理を行う。LAN制御部110がこの処理を実行している間にも、上述したS708の処理が繰り返し実行される。つまり、本実施形態においては、DMA転送と並行して、パケット生成処理が実行される。
Next, the protocol processing unit 111 activates the communication device driver 112 to create a descriptor for transferring the packet set in the transmission queue to the LAN control unit 110 (S715). The LAN control unit 110 registers each descriptor created in this way in its own internal memory (S716). After that, the communication device driver 112 notifies the LAN control unit 110 of the start of DMA transfer (S717).
Upon receiving this notification, the LAN control unit 110 starts DMA transfer according to the descriptor registered in S716 (S718). Specifically, the process of reading the packet from the address set in the transmission queue and transmitting it to the external device is performed. While the LAN control unit 110 is executing this process, the process of S708 described above is repeatedly executed. That is, in the present embodiment, the packet generation process is executed in parallel with the DMA transfer.

送信キューにセットされたすべてのパケットの送信が終了すると、LAN制御部110は、送信完了を示す割り込みをアサートする(S727)。CPU102の通信デバイスドライバ112は、この割り込みを検出する(S728)と、プロトコル処理部111に送信完了を通知する。この通知を受けたプロトコル処理部111は、パケットを格納していたオンチップメモリ105上の領域を解放し、プロトコル処理を終了する(S729)。その後、CPU102は、再度アプリケーションの処理に戻る。
(第1の実施形態の効果)
以上説明したように、本実施形態によれば、オフローダ106によるパケット生成処理と、通信デバイスドライバ112によるパケット送信処理とを並列化することが可能となる。したがって、効率的にデータ送信を実行することが可能になる。
なお、図1に示した通信装置100の構成は一例であり、例えば、機能モジュール(107〜111)の一部はハードウェアによって実現されてもよい。ハードウェアにより実現される場合、例えば、所定のコンパイラを用いることで、各機能モジュールの機能を実現するためのプログラムからFPGA上に自動的に専用回路を生成すればよい。FPGAは、Field Programmable Gate Arrayの略である。また、FPGAと同様にしてGate Array回路を形成し、ハードウェアとして実現するようにしてもよい。また、ASIC(Application Specific Integrated Circuit)により実現するようにしてもよい。また、複数の機能モジュールが1つの機能モジュールを構成するようにしてもよいし、いずれかの機能モジュールが複数の機能を行うモジュールに分かれてもよい。
When the transmission of all the packets set in the transmission queue is completed, the LAN control unit 110 asserts an interrupt indicating the completion of transmission (S727). When the communication device driver 112 of the CPU 102 detects this interrupt (S728), it notifies the protocol processing unit 111 of the completion of transmission. Upon receiving this notification, the protocol processing unit 111 releases the area on the on-chip memory 105 that stores the packet and ends the protocol processing (S729). After that, the CPU 102 returns to the processing of the application again.
(Effect of the first embodiment)
As described above, according to the present embodiment, it is possible to parallelize the packet generation process by the offloader 106 and the packet transmission process by the communication device driver 112. Therefore, it becomes possible to efficiently execute data transmission.
The configuration of the communication device 100 shown in FIG. 1 is an example. For example, a part of the functional modules (107 to 111) may be realized by hardware. When it is realized by hardware, for example, by using a predetermined compiler, a dedicated circuit may be automatically generated on the FPGA from the program for realizing the function of each functional module. FPGA is an abbreviation for Field Programmable Gate Array. Further, a Gate Array circuit may be formed in the same manner as the FPGA and realized as hardware. Further, it may be realized by ASIC (Application Specific Integrated Circuit). Further, a plurality of functional modules may form one functional module, or any of the functional modules may be divided into modules that perform a plurality of functions.

[第2の実施形態]
次に、本発明の第2の実施形態について説明する。本実施形態による通信装置100の構成及び動作は、基本的には第1の実施形態で説明したものと同様である。ただし、オフローダ106によるパケットまたはヘッダの生成が完了していることをリアルタイムに保証しながらパケットの送信処理を行う点で、第1の実施形態と相違する。そこで以下では、第1の実施形態と同様の構成及び処理については同じ符号を付し、第1の実施形態との相違点に着目して説明を続ける。
[Second Embodiment]
Next, a second embodiment of the present invention will be described. The configuration and operation of the communication device 100 according to the present embodiment are basically the same as those described in the first embodiment. However, it differs from the first embodiment in that the packet transmission process is performed while guaranteeing that the generation of the packet or header by the offloader 106 is completed in real time. Therefore, in the following, the same components and processes as those of the first embodiment will be designated by the same reference numerals, and the description will be continued focusing on the differences from the first embodiment.

初めに、本実施形態の概要を説明すると、第1の実施形態では、パケットが送信される前に必ず生成が完了しているという条件を満たすように特定パケット(または特定ヘッダ)を決定することにより、パケット生成処理と送信処理の並列化を行った。しかしながら、第1の実施形態による処理は、処理時間A,Bが一定であることを前提としたものである。そのため、他のハードウェアやソフトウェアが同時動作する場合などに発生し得る処理時間A,Bの変動など、通信装置100のイレギュラーな挙動に対する耐性が低い可能性がある。そこで本実施形態では、1つだけでなく複数の特定パケット(または特定ヘッダ)を予め決定しておき、各特定パケットの生成完了を契機として、それまでに生成完了したパケットを送信処理に回すようにする。こうすることで、オフローダ106による生成が完了していることをリアルタイムに保証しながらも、効率的にデータ送信を行えるようになる。以下、図面を参照しながら詳しく説明する。 First, to explain the outline of the present embodiment, in the first embodiment, the specific packet (or specific header) is determined so as to satisfy the condition that the generation is always completed before the packet is transmitted. The packet generation process and the transmission process were parallelized. However, the processing according to the first embodiment is based on the premise that the processing times A and B are constant. Therefore, there is a possibility that the resistance to irregular behavior of the communication device 100, such as fluctuations in processing times A and B that may occur when other hardware and software operate simultaneously, is low. Therefore, in the present embodiment, not only one but also a plurality of specific packets (or specific headers) are determined in advance, and when the generation of each specific packet is completed, the packets that have been generated up to that point are sent to the transmission process. To. By doing so, it becomes possible to efficiently transmit data while guaranteeing that the generation by the offloader 106 is completed in real time. Hereinafter, a detailed description will be given with reference to the drawings.

(送信処理のプロファイル)
図8は、本実施形態における送信処理のプロファイルの一例を示す図である。ここでは、第1の実施形態で説明した特定パケットを複数個用意し、それぞれの生成完了を判定しつつ送信処理を行う方法について説明する。
プロトコル処理202においてCPU102は、上述した特定パケットを1つではなく複数個決定する。これは、パケットの生成完了を複数回に分けて判定するためである。図8には、プロトコル処理202が5つの特定パケットを決定した例を示している。
その後CPU102は、第1の実施形態と同様、処理実行207をオフローダ106に通知し、オフローダ106の終了待ち203となる。オフローダ106は、第1の実施形態と同様、処理実行207が通知されたことに応じて、パケットの一括生成処理204を開始する。
(Profile of transmission process)
FIG. 8 is a diagram showing an example of a transmission processing profile in the present embodiment. Here, a method of preparing a plurality of specific packets described in the first embodiment and performing transmission processing while determining the completion of generation of each packet will be described.
In the protocol process 202, the CPU 102 determines a plurality of the above-mentioned specific packets instead of one. This is because the completion of packet generation is determined by dividing it into a plurality of times. FIG. 8 shows an example in which the protocol process 202 determines five specific packets.
After that, the CPU 102 notifies the offloader 106 of the process execution 207 as in the first embodiment, and waits for the offloader 106 to finish 203. Similar to the first embodiment, the offloader 106 starts the packet batch generation process 204 in response to the notification of the process execution 207.

CPU102のプロトコル処理部111は、終了待ち203となっている間、断続的又は連続的に、複数の特定パケットそれぞれの検出処理を行う。その結果として1番目の特定パケットの生成完了800を検出すると、プロトコル処理部111は、それまでに生成完了済みのパケットを送信キューにセットする。
通信デバイスドライバ処理205では、送信キューにセットされたパケットが通信デバイスドライバ112によってLAN制御部109もしくはWLAN制御部110に転送され、これらによって外部機器に送信される。
The protocol processing unit 111 of the CPU 102 intermittently or continuously performs detection processing for each of the plurality of specific packets while the end waiting 203 is set. As a result, when the generation completion 800 of the first specific packet is detected, the protocol processing unit 111 sets the packets that have been generated so far in the transmission queue.
In the communication device driver process 205, the packet set in the transmission queue is transferred to the LAN control unit 109 or the WLAN control unit 110 by the communication device driver 112, and is transmitted to the external device by these.

プロトコル処理部111は、2番目〜5番目の特定パケットの生成完了801〜804を検出した場合についても同様に、それまでに生成完了済みの(かつ、送信キューに未だセットしていない)パケットを送信キューにセットする処理を行う。
このように、本実施形態による通信装置100によれば、複数の特定パケットそれぞれの生成完了判定を行い、特定パケットの生成が完了した後に、それまでに生成したパケットの送信処理を実行するようにしている。したがって、オフローダ106による生成が完了していることをリアルタイムに保証しながらも、効率的にデータ送信を行うことが可能になる。
Similarly, when the protocol processing unit 111 detects the generation completion 801 to 804 of the second to fifth specific packets, the packets that have been generated by that time (and have not yet been set in the transmission queue) are similarly generated. Performs the process of setting in the send queue.
As described above, according to the communication device 100 according to the present embodiment, the generation completion determination of each of the plurality of specific packets is performed, and after the generation of the specific packet is completed, the transmission processing of the packets generated up to that point is executed. ing. Therefore, it is possible to efficiently transmit data while guaranteeing that the generation by the offloader 106 is completed in real time.

(特定パケット/特定ヘッダの決定方法)
次に、本実施形態によるプロトコル処理部111における特定パケット(または特定ヘッダ)の決定方法について説明を行う。
本実施形態においても、プロトコル処理部111による特定パケット(または特定ヘッダ)決定の具体的な方法は、1パケットにかかるオフローダ106および通信デバイスドライバ112それぞれの処理時間の大小関係に応じて異なる。そこで以下では、上述した第1の処理時間関係時を図9に、第2の処理時間関係時を図10にそれぞれ示し、各々の条件に応じた決定方法を説明する。
(Method of determining specific packet / specific header)
Next, a method of determining a specific packet (or a specific header) in the protocol processing unit 111 according to the present embodiment will be described.
Also in this embodiment, the specific method of determining the specific packet (or specific header) by the protocol processing unit 111 differs depending on the magnitude relationship of the processing time of the offloader 106 and the communication device driver 112 per packet. Therefore, in the following, the above-mentioned first processing time-related time is shown in FIG. 9, and the second processing time-related time is shown in FIG. 10, and a determination method according to each condition will be described.

図9は、第1の処理時間関係時における特定パケット(または特定ヘッダ)の決定方法を説明する図である。同図には、上述した式1の関係が成立する場合を示している。
第1の実施形態では、特定パケット(または特定ヘッダ)の生成完了を1回だけ判定している。その結果、通信デバイスドライバ112の処理がオフローダ106の処理を途中で追い越さないようにするために、通信デバイスドライバ112の処理開始までに、式2で決定されるマージンが必要であった。本実施形態では、図示した完了判定900,901に示すように、すべてのパケットを特定パケットとして利用し、それぞれの生成完了の判定を行う。こうすることで、確実に生成が完了したパケットのみを送信キューに投入し、通信デバイスドライバ112に処理させることが可能になる。
なお、すべてのパケットで生成完了の判定を実施すると、生成完了判定のためのステータス確認処理や割り込みの際のハンドラ処理によるオーバーヘッドが大きくなる可能性がある。そこで、2〜3パケットごとに特定パケットを設けることとし、生成完了判定のために使用するパケットを間引くこととしてもよい。
FIG. 9 is a diagram illustrating a method of determining a specific packet (or a specific header) in relation to the first processing time. The figure shows a case where the relationship of the above-mentioned equation 1 is established.
In the first embodiment, the completion of generation of the specific packet (or the specific header) is determined only once. As a result, in order to prevent the processing of the communication device driver 112 from overtaking the processing of the offloader 106 in the middle, a margin determined by Equation 2 was required before the processing of the communication device driver 112 started. In the present embodiment, as shown in the illustrated completion determinations 900 and 901, all the packets are used as specific packets, and the determination of the completion of each generation is performed. By doing so, it becomes possible to put only the packets that have been surely generated into the transmission queue and have the communication device driver 112 process them.
If the generation completion is determined for all packets, the overhead due to the status confirmation process for the generation completion determination and the handler process at the time of interrupt may increase. Therefore, a specific packet may be provided for every 2 to 3 packets, and the packets used for determining the completion of generation may be thinned out.

図10は、第2の処理時間関係時における特定パケット(または特定ヘッダ)の決定方法を説明する図である。同図には、上述した式3の関係が成立する場合を示している。
図9の例では、処理時間Aが処理時間Bより長いので、すべてのパケットを特定パケットとして利用することとしても、特定パケットの生成完了時に通信デバイスドライバ112の処理が完了していないということはなかった。これに対し、図10の例では、処理時間Aが処理時間Bより短いので、仮にすべてのヘッダを特定ヘッダとして利用することとすると、特定ヘッダの生成完了時に通信デバイスドライバ112の処理が完了していないということが発生し得る。
FIG. 10 is a diagram illustrating a method of determining a specific packet (or a specific header) in relation to the second processing time. The figure shows a case where the relationship of the above-mentioned equation 3 is established.
In the example of FIG. 9, since the processing time A is longer than the processing time B, even if all the packets are used as specific packets, the processing of the communication device driver 112 is not completed when the generation of the specific packets is completed. There wasn't. On the other hand, in the example of FIG. 10, since the processing time A is shorter than the processing time B, if all the headers are used as the specific headers, the processing of the communication device driver 112 is completed when the generation of the specific headers is completed. It can happen that it is not.

特定ヘッダの生成完了時に通信デバイスドライバ112の処理が完了していることを保証するためには、次の式4により決定される複数のヘッダのみを特定ヘッダとして用いればよい。そこで本実施形態では、式4により決定される複数のヘッダのみを特定ヘッダとして決定し、特定ヘッダの生成完了まで通信デバイスドライバ112の処理の開始を遅らせるようにしている。ただし、mは特定ヘッダの通番であり、αは、処理時間A,Bの割合B/A(切り捨て)である。
(特定ヘッダのオーダー)=(1−αm)/(1−α) ・・・(式4)
一例として、例えばα=2である場合、式4によれば、m=1である第1の特定ヘッダのオーダーは1番目となり、m=2である第2の特定ヘッダのオーダーは3番目となる。
In order to guarantee that the processing of the communication device driver 112 is completed when the generation of the specific header is completed, only a plurality of headers determined by the following equation 4 may be used as the specific header. Therefore, in the present embodiment, only a plurality of headers determined by the equation 4 are determined as specific headers, and the start of processing of the communication device driver 112 is delayed until the generation of the specific headers is completed. However, m is the serial number of the specific header, and α is the ratio B / A (truncated) of the processing times A and B.
(Order of specific header) = (1-αm) / (1-α) ... (Equation 4)
As an example, when α = 2, for example, according to Equation 4, the order of the first specific header with m = 1 is the first, and the order of the second specific header with m = 2 is the third. Become.

(プロトコル処理部の処理)
図11は、プロトコル処理部111が行う処理のフローチャートを示す図である。同図には、プロトコル処理部111がオフローダ106にパケットを生成させ、生成完了を保証しつつ、生成されたパケットを通信デバイスドライバ112に引き渡すまでの処理フローを説明する。
初めに、プロトコル処理部111は、アプリケーションがコールするsendmmsg()によりk個のパケット分のサイズを有するメッセージを受け取る(S1100)。次いでプロトコル処理部111は、ひな形のヘッダを生成するとともに、特定パケットを決定する(S1101)。この決定では、図9を参照して説明したように、すべてのパケットが特定パケットとして決定される。なお、オフローダ106にヘッダのみを生成させる場合には、上述した式4に従って特定ヘッダを決定すればよい。
(Processing of protocol processing unit)
FIG. 11 is a diagram showing a flowchart of processing performed by the protocol processing unit 111. FIG. 6 describes a processing flow in which the protocol processing unit 111 causes the offloader 106 to generate a packet, guarantees the completion of generation, and delivers the generated packet to the communication device driver 112.
First, the protocol processing unit 111 receives a message having a size of k packets by sendmmsg () called by the application (S1100). Next, the protocol processing unit 111 generates a template header and determines a specific packet (S1101). In this determination, all packets are determined as specific packets, as described with reference to FIG. When the offloader 106 is to generate only the header, the specific header may be determined according to the above equation 4.

特定パケットを決定したプロトコル処理部111は、オフローダ106のレジスタを設定し、オフローダ106に対して処理実行を通知する(S1102)。この通知を受けたオフローダ106は、S1100で受信されたメッセージに対応するk個のパケットの一括生成を開始する。
プロトコル処理部111は次に、パケット数kが1番目の特定パケットのオーダーよりも大きいかどうかを判定する(S1103)。その結果、大きいと判定した場合にはS1104の処理に進み、大きくないと判定した場合にはS1108の処理に進む。
The protocol processing unit 111 that has determined the specific packet sets the register of the offloader 106 and notifies the offloader 106 of the processing execution (S1102). Upon receiving this notification, the offloader 106 starts batch generation of k packets corresponding to the message received in S1100.
Next, the protocol processing unit 111 determines whether or not the number of packets k is larger than the order of the first specific packet (S1103). As a result, if it is determined that it is large, the process proceeds to S1104, and if it is determined that it is not large, the process proceeds to S1108.

S1104に進んだプロトコル処理部111は、図6に示したS604,S605と同様、ポーリングもしくは割り込みにより、1番目の特定パケットの生成が完了したかどうかを判定する(S1104,S1105)。S1104において特定パケットの生成が完了したと判定した場合、プロトコル処理部111は、1番目の特定パケットまでのパケットを送信キューに投入する(S1106)。そして、次の特定パケットを処理対象に設定し(S1107)、ステップS1103からの処理を繰り返す。
S1108に進んだプロトコル処理部111は、k番目(最後)のパケットの生成が完了したかどうかを判定する。ここで生成が完了していないと判定した場合、プロトコル処理部111は、所定時間待機した後(S1109)、再度、S1108の判定処理を行う。
Similar to S604 and S605 shown in FIG. 6, the protocol processing unit 111 that has advanced to S1104 determines whether or not the generation of the first specific packet is completed by polling or interrupting (S1104, S1105). When it is determined in S1104 that the generation of the specific packet is completed, the protocol processing unit 111 puts the packets up to the first specific packet into the transmission queue (S1106). Then, the next specific packet is set as the processing target (S1107), and the processing from step S1103 is repeated.
The protocol processing unit 111 that has advanced to S1108 determines whether or not the generation of the kth (last) packet is completed. If it is determined that the generation is not completed here, the protocol processing unit 111 waits for a predetermined time (S1109) and then performs the determination process of S1108 again.

S1108においてk番目のパケットの生成が完了したと判定したプロトコル処理部111は、まだ送信キューに投入していない残りのパケットのすべてを送信キューに投入し(S1110)、処理を終了する。 The protocol processing unit 111, which determines in S1108 that the generation of the kth packet is completed, puts all the remaining packets that have not been put into the transmission queue into the transmission queue (S1110), and ends the processing.

(送信処理のシーケンス)
図12は、通信装置100が行うデータ送信処理のシーケンス図である。同図には、アプリケーションによりsendmmsg()がコールされてから、パケット生成完了を保証しつつ、すべてのメッセージについてLAN制御部110からの送信が完了するまでの処理を示している。
(Sequence of transmission processing)
FIG. 12 is a sequence diagram of data transmission processing performed by the communication device 100. The figure shows the process from the call of sendmmsg () by the application to the completion of transmission from the LAN control unit 110 for all messages while guaranteeing the completion of packet generation.

初めに、CPU102が実行しているアプリケーションにより、sendmmsg()がコールされる(S1200)。次に、CPU102のプロトコル処理部111により、ひな形のヘッダの生成及び特定パケットの決定が実行されるとともに、パケット生成部107のレジスタが設定され、さらに、パケット生成部107に対して処理実行が通知される(S1201)。なお、S1201で決定される特定パケットには少なくとも1番目の特定パケットが含まれていればよく、必ずしもすべての特定バケツとをS1201で決定しなくてもよい。
処理実行を通知されたパケット生成部107は、この通知に応答し、処理を開始する(S1202)。
First, the application running the CPU 102 calls sendmmsg () (S1200). Next, the protocol processing unit 111 of the CPU 102 executes the generation of the template header and the determination of the specific packet, sets the register of the packet generation unit 107, and further executes the processing for the packet generation unit 107. You will be notified (S1201). The specific packet determined in S1201 may include at least the first specific packet, and it is not always necessary to determine all the specific buckets in S1201.
The packet generation unit 107 notified of the processing execution responds to this notification and starts the processing (S1202).

S1203〜S1208のオフローダ106の処理は、図7を参照して説明したS703〜S708のオフローダ106の処理と同様である。
S1208の処理は、S708の処理と同様に、生成するパケット単位で処理され、パケットの数だけ繰り返される。オフローダ106がS1208の処理を繰り返し実行している間、プロトコル処理部111は、デスクリプタのステータスを繰り返しリードすることにより、1つ目の特定パケットの生成が完了しているかどうかを判定する(S1213)。完了していると判定した場合、プロトコル処理部111は、1つ目の特定パケットまでの生成が完了しているパケットを送信キューに投入する。
The processing of the offloader 106 of S1203 to S1208 is the same as the processing of the offloader 106 of S703 to S708 described with reference to FIG. 7.
Similar to the processing of S708, the processing of S1208 is processed for each packet to be generated, and is repeated for the number of packets. While the offloader 106 repeatedly executes the process of S1208, the protocol processing unit 111 repeatedly reads the status of the descriptor to determine whether or not the generation of the first specific packet is completed (S1213). .. When it is determined that the packet is completed, the protocol processing unit 111 puts the packets for which the generation up to the first specific packet has been completed into the transmission queue.

その後、図7に示したS715〜S728と同様の処理が実行される(S1215〜S1228)。また、これと並行してオフローダ106によるS1208の処理が繰り返し実行され、1つ目の特定パケット以降のパケット生成が行われる。
プロトコル処理部111は、1つ目の特定パケットの生成が完了していると判定した後もS1213の処理を繰り返し実行し、順次、後続(2つ目以降)の特定パケットの生成完了を判定する。いずれかの特定パケットの生成が完了していると判定した場合、プロトコル処理部111は、その特定パケットまでの生成が完了しているパケットを送信キューに投入する。そして、こうして送信キューにパケットが投入されたことに応じて、S1215〜S1228の処理が実行される。その間にも、オフローダ106によるS1208の処理は、並行して繰り返し実行される。
After that, the same processing as in S715 to S728 shown in FIG. 7 is executed (S1215 to S1228). Further, in parallel with this, the process of S1208 by the offloader 106 is repeatedly executed, and the packet generation after the first specific packet is performed.
The protocol processing unit 111 repeatedly executes the process of S1213 even after determining that the generation of the first specific packet has been completed, and sequentially determines that the subsequent (second and subsequent) specific packets have been generated. .. When it is determined that the generation of any specific packet is completed, the protocol processing unit 111 puts the packet for which the generation up to the specific packet has been completed into the transmission queue. Then, in response to the packet being put into the transmission queue in this way, the processes of S125 to S1228 are executed. Meanwhile, the processing of S1208 by the offloader 106 is repeatedly executed in parallel.

すべての特定パケットの生成完了を判定した後、プロトコル処理部111は、k番目(最後)のパケットのデスクリプタのステータスをリードし(S1246)、その生成が完了しているかどうかを判定する。完了していると判定した場合、プロトコル処理部111は、残りのすべてのパケットを送信キューに投入する。こうして送信キューにパケットが投入されたことに応じて、S1215〜S1228の処理が再び実行される。 After determining the completion of generation of all the specific packets, the protocol processing unit 111 reads the status of the descriptor of the kth (last) packet (S1246) and determines whether or not the generation is completed. If it is determined that the packet is completed, the protocol processing unit 111 puts all the remaining packets into the transmission queue. In response to the packet being put into the transmission queue in this way, the processes of S125 to S1228 are executed again.

k番目のパケットの生成完了を判定した後に、S1228の割り込みを検出した場合、プロトコル処理部111は、パケットを格納していたオンチップメモリ105上の領域を解放し、プロトコル処理を終了する(S1255)。その後、CPU102は、再度アプリケーションの処理に戻る。
(第2の実施形態の効果)
以上説明したように、本実施形態によれば、複数の特定パケットまたは特定ヘッダを用いてオフローダ106によるパケットの生成完了を複数回にわたって判定している。その結果、パケットの生成前に通信デバイスドライバ112によるパケットの送信が実行されないことを保証することが可能となる。
When the interrupt of S1228 is detected after determining the completion of generation of the kth packet, the protocol processing unit 111 releases the area on the on-chip memory 105 storing the packet and ends the protocol processing (S1255). ). After that, the CPU 102 returns to the processing of the application again.
(Effect of the second embodiment)
As described above, according to the present embodiment, the completion of packet generation by the offloader 106 is determined multiple times using a plurality of specific packets or specific headers. As a result, it is possible to guarantee that the transmission of the packet by the communication device driver 112 is not executed before the packet is generated.

(その他の実施形態)
なお、本発明は、上述の実施形態の一部または1以上の機能を実現するプログラムによっても実現可能である。すなわち、そのプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータ(またはCPUやMPU等)における1つ以上のプロセッサがプログラムを読出し実行する処理により実現可能である。また、そのプログラムをコンピュータ可読な記録媒体に記録して提供してもよい。
また、本発明は、コンピュータが読みだしたプログラムを実行することにより、実施形態の機能が実現されるものに限定されない。例えば、プログラムの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって上記した実施形態の機能が実現されてもよい。
(Other embodiments)
The present invention can also be realized by a program that realizes a part of the above-described embodiment or one or more functions. That is, it can be realized by supplying the program to the system or device via a network or storage medium, and reading and executing the program by one or more processors in the computer (or CPU, MPU, etc.) of the system or device. is there. Further, the program may be recorded and provided on a computer-readable recording medium.
Further, the present invention is not limited to the one in which the function of the embodiment is realized by executing the program read by the computer. For example, the operating system (OS) running on the computer may perform a part or all of the actual processing based on the instruction of the program, and the function of the above-described embodiment may be realized by the processing.

100…通信装置、101…画像形成部、102…CPU、103…メインメモリ、104…システムバス、105…オンチップメモリ、106…オフローダ、109…LAN制御部、110…WLAN制御部、111…プロトコル処理部、112…通信デバイスドライバ、113…終了タイミング決定部 100 ... communication device, 101 ... image forming unit, 102 ... CPU, 103 ... main memory, 104 ... system bus, 105 ... on-chip memory, 106 ... offloader, 109 ... LAN control unit, 110 ... WLAN control unit, 111 ... protocol Processing unit, 112 ... Communication device driver, 113 ... End timing determination unit

Claims (25)

送信データに基づいて複数のパケットを生成する生成手段と、
前記生成手段により生成された前記複数のパケットを通信デバイスに送信する送信手段と、
前記生成手段により特定パケットの生成が完了したことに応じて、前記生成手段によるパケットの生成と並行して、前記通信デバイスへの前記複数のパケットのうちの少なくとも一部の送信を開始するように制御する制御手段と、
を有することを特徴とする通信装置。
A generation means that generates multiple packets based on transmitted data, and
A transmission means for transmitting the plurality of packets generated by the generation means to a communication device, and
When the generation of the specific packet is completed by the generation means, transmission of at least a part of the plurality of packets to the communication device is started in parallel with the generation of the packet by the generation means. Control means to control and
A communication device characterized by having.
前記生成手段は、オフローダによって前記複数のパケットを生成することを特徴とする請求項1に記載の通信装置。 The communication device according to claim 1, wherein the generation means generates the plurality of packets by an offloader. 前記生成手段が1パケットを生成するために要する第1の処理時間と、前記送信手段が1パケットを送信するために要する第2の処理時間と、に基づいて、前記特定パケットを決定する決定手段を更に有することを特徴とする請求項1または2に記載の通信装置。 A determining means for determining the specific packet based on the first processing time required for the generating means to generate one packet and the second processing time required for the transmitting means to transmit one packet. The communication device according to claim 1 or 2, further comprising. 前記特定パケットは、前記生成手段により生成される1番目のパケットであることを特徴とする請求項1または2に記載の通信装置。 The communication device according to claim 1 or 2, wherein the specific packet is the first packet generated by the generation means. 前記生成手段により個々のパケットが生成され、該生成されたパケットが所定のメモリへ書き込まれたことに応じて、デスクリプタの所定のステータスフィールドを更新する更新手段を更に有し、
前記制御手段は、前記所定のステータスフィールドをポーリングすることにより前記特定パケットの生成完了を検出することを特徴とする請求項1から4のいずれか1項に記載の通信装置。
The generation means further comprises an update means for updating a predetermined status field of the descriptor in response to the generation of individual packets and the writing of the generated packets to a predetermined memory.
The communication device according to any one of claims 1 to 4, wherein the control means detects the completion of generation of the specific packet by polling the predetermined status field.
前記生成手段による前記特定パケットの生成完了に応じて割り込み信号を出力する出力手段を更に有し、
前記制御手段は、前記出力手段により出力された前記割り込み信号を検出することにより、前記特定パケットの生成完了を検出することを特徴とする請求項1から4のいずれか1項に記載の通信装置。
Further having an output means for outputting an interrupt signal according to the completion of generation of the specific packet by the generation means.
The communication device according to any one of claims 1 to 4, wherein the control means detects the completion of generation of the specific packet by detecting the interrupt signal output by the output means. ..
前記制御手段は、前記生成手段による前記特定パケットの生成が完了したことに応じて、前記送信手段を起動することを特徴とする請求項1から6のいずれか1項に記載の通信装置。 The communication device according to any one of claims 1 to 6, wherein the control means activates the transmission means in response to the completion of generation of the specific packet by the generation means. 前記通信デバイスは、前記生成手段により生成された前記複数のパケットを他の通信装置に送信することを特徴とする請求項1から7のいずれか1項に記載の通信装置。 The communication device according to any one of claims 1 to 7, wherein the communication device transmits the plurality of packets generated by the generation means to another communication device. 前記パケットは、TCP(Transmission Control Protocol)に準拠したパケットであることを特徴とする請求項1から8のいずれか1項に記載の通信装置。 The communication device according to any one of claims 1 to 8, wherein the packet is a packet conforming to TCP (Transmission Control Protocol). 前記パケットは、UDP(User Datagram Protocol)に準拠したパケットであることを特徴とする請求項1から8のいずれか1項に記載の通信装置。 The communication device according to any one of claims 1 to 8, wherein the packet is a packet conforming to UDP (User Datagram Protocol). 送信データに対応する複数のヘッダを生成する生成手段と、
前記生成手段により生成された前記複数のヘッダを通信デバイスに送信する送信手段と、
前記生成手段により特定ヘッダの生成が完了したことに応じて、前記生成手段によるヘッダの生成と並行して、前記通信デバイスへの前記複数のヘッダのうちの少なくとも一部の送信を開始するように制御する制御手段と、
を有することを特徴とする通信装置。
A generation means that generates multiple headers corresponding to transmission data, and
A transmission means for transmitting the plurality of headers generated by the generation means to the communication device, and
When the generation of the specific header is completed by the generation means, transmission of at least a part of the plurality of headers to the communication device is started in parallel with the generation of the header by the generation means. Control means to control and
A communication device characterized by having.
前記生成手段は、オフローダによって前記複数のヘッダを生成することを特徴とする請求項11に記載の通信装置。 The communication device according to claim 11, wherein the generation means generates the plurality of headers by an offloader. 前記生成手段が1つのヘッダを生成するために要する第1の処理時間と、前記送信手段が1つのヘッダを送信するために要する第2の処理時間とに基づいて、前記特定ヘッダを決定する決定手段を更に有することを特徴とする請求項11または12に記載の通信装置。 A decision to determine the particular header based on a first processing time required by the generating means to generate one header and a second processing time required by the transmitting means to transmit one header. The communication device according to claim 11 or 12, further comprising means. 前記特定ヘッダは、前記生成手段により生成される1番目のヘッダであることを特徴とする請求項11または12に記載の通信装置。 The communication device according to claim 11 or 12, wherein the specific header is the first header generated by the generation means. 前記生成手段により個々のヘッダが生成され、該生成されたヘッダが所定のメモリへ書き込まれたことに応じて、デスクリプタの所定のステータスフィールドを更新する更新手段を更に有し、
前記制御手段は、前記所定のステータスフィールドをポーリングすることにより前記特定ヘッダの生成完了を検出することを特徴とする請求項11から14のいずれか1項に記載の通信装置。
The generation means further comprises an update means that updates a predetermined status field of the descriptor as individual headers are generated and the generated headers are written to a predetermined memory.
The communication device according to any one of claims 11 to 14, wherein the control means detects the completion of generation of the specific header by polling the predetermined status field.
前記生成手段による前記特定ヘッダの生成完了に応じて割り込み信号を出力する出力手段を更に有し、
前記制御手段は、前記出力手段により出力された前記割り込み信号を検出することにより、前記特定ヘッダの生成完了を検出することを特徴とする請求項11から14のいずれか1項に記載の通信装置。
Further having an output means for outputting an interrupt signal according to the completion of generation of the specific header by the generation means.
The communication device according to any one of claims 11 to 14, wherein the control means detects the completion of generation of the specific header by detecting the interrupt signal output by the output means. ..
前記制御手段は、前記生成手段による前記特定ヘッダの生成が完了したことに応じて、前記送信手段を起動することを特徴とする請求項11から16のいずれか1項に記載の通信装置。 The communication device according to any one of claims 11 to 16, wherein the control means activates the transmission means in response to the completion of generation of the specific header by the generation means. 前記通信デバイスは、前記生成手段により生成された前記複数のヘッダと、前記送信データとに基づいて複数のパケットを生成して他の通信装置に送信することを特徴とする請求項11から17のいずれか1項に記載の通信装置。 The communication device according to claims 11 to 17, wherein the communication device generates a plurality of packets based on the plurality of headers generated by the generation means and the transmission data and transmits the plurality of packets to another communication device. The communication device according to any one item. 前記ヘッダは、TCP(Transmission Control Protocol)ヘッダを含むことを特徴とする請求項11から18のいずれか1項に記載の通信装置。 The communication device according to any one of claims 11 to 18, wherein the header includes a TCP (Transmission Control Protocol) header. 前記ヘッダは、UDP(User Datagram Protocol)ヘッダを含むことを特徴とする請求項11から18のいずれか1項に記載の通信装置。 The communication device according to any one of claims 11 to 18, wherein the header includes a UDP (User Datagram Protocol) header. 前記ヘッダは、IP(Internet Protocol)ヘッダを含むことを特徴とする請求項11から20のいずれか1項に記載の通信装置。 The communication device according to any one of claims 11 to 20, wherein the header includes an IP (Internet Protocol) header. 前記送信データは、アプリケーションにより指定されることを特徴とする請求項1から21のいずれか1項に記載の通信装置。 The communication device according to any one of claims 1 to 21, wherein the transmission data is specified by an application. 送信データに基づいて複数のパケットを生成する生成工程と、
前記生成工程において生成された前記複数のパケットを通信デバイスに送信する送信工程と、
前記生成工程において特定パケットの生成が完了したことに応じて、前記生成工程におけるパケットの生成と並行して、前記通信デバイスへの前記複数のパケットのうちの少なくとも一部の送信を開始するように制御する制御工程と、
を有することを特徴とする制御方法。
A generation process that generates multiple packets based on transmitted data,
A transmission step of transmitting the plurality of packets generated in the generation step to the communication device, and
When the generation of the specific packet is completed in the generation step, transmission of at least a part of the plurality of packets to the communication device is started in parallel with the generation of the packet in the generation step. Control process to control and
A control method characterized by having.
送信データに対応する複数のヘッダを生成する生成工程と、
前記生成工程において生成された前記複数のヘッダを通信デバイスに送信する送信工程と、
前記生成工程において特定ヘッダの生成が完了したことに応じて、前記生成工程におけるヘッダの生成と並行して、前記通信デバイスへの前記複数のヘッダのうちの少なくとも一部の送信を開始するように制御する制御工程と、
を有することを特徴とする制御方法。
A generation process that generates multiple headers corresponding to the transmitted data,
A transmission step of transmitting the plurality of headers generated in the generation step to the communication device, and
When the generation of the specific header is completed in the generation step, transmission of at least a part of the plurality of headers to the communication device is started in parallel with the generation of the header in the generation step. Control process to control and
A control method characterized by having.
コンピュータを、請求項1から22のいずれか1項に記載の通信装置の各手段として機能させるためのプログラム。 A program for causing a computer to function as each means of the communication device according to any one of claims 1 to 22.
JP2019157553A 2019-08-30 2019-08-30 Communication device, control method, and program Pending JP2021036630A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019157553A JP2021036630A (en) 2019-08-30 2019-08-30 Communication device, control method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019157553A JP2021036630A (en) 2019-08-30 2019-08-30 Communication device, control method, and program

Publications (1)

Publication Number Publication Date
JP2021036630A true JP2021036630A (en) 2021-03-04

Family

ID=74716689

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019157553A Pending JP2021036630A (en) 2019-08-30 2019-08-30 Communication device, control method, and program

Country Status (1)

Country Link
JP (1) JP2021036630A (en)

Similar Documents

Publication Publication Date Title
CN109936510A (en) Multipath RDMA transmission
TW200419358A (en) Integrated circuit and method for exchanging data
JP2006180512A (en) Apparatus and method for transmitting data in communication system
US10585699B2 (en) Methods and apparatus for verifying completion of groups of data transactions between processors
WO2016202158A1 (en) Message transmission method and device, and computer-readable storage medium
JP3551905B2 (en) Management station, network system, and communication method in network system
US11336297B2 (en) DMA transfer apparatus, method of controlling the same, communication apparatus, method of controlling the same, and non-transitory computer-readable storage medium
KR102303424B1 (en) Direct memory access control device for at least one processing unit having a random access memory
JP2021036630A (en) Communication device, control method, and program
EP3826244B1 (en) Congestion control method and related device
JP2008236378A (en) Data transfer method between host computer and network interface controller, program and network interface controller
JP2017011580A (en) Communication device, control method, and program
JP2014158241A (en) Data communication device and data communication method
JP2018142853A (en) Communication method, communication device, and program
JP5534711B2 (en) Information processing apparatus, information processing method, and program
JP2021129162A (en) Communication device, control method, and program
JP7145607B2 (en) DMA TRANSFER DEVICE, DMA TRANSFER CONTROL METHOD, AND COMMUNICATION DEVICE
JP6618330B2 (en) COMMUNICATION DEVICE AND METHOD, COMPUTER PROGRAM
JP2020174322A (en) Communication apparatus, control method, and program
US11102150B2 (en) Communication apparatus and control method for communication apparatus
JP2019114947A (en) Communication device, control method of communication device, and program
JP5906078B2 (en) Data transfer apparatus and data transfer method
JP7321913B2 (en) Communication device, control method and program
JP6938399B2 (en) Communication equipment, communication methods and programs
JP7387335B2 (en) Communication device, control method and program