JP2014155120A - Communication device - Google Patents

Communication device Download PDF

Info

Publication number
JP2014155120A
JP2014155120A JP2013024914A JP2013024914A JP2014155120A JP 2014155120 A JP2014155120 A JP 2014155120A JP 2013024914 A JP2013024914 A JP 2013024914A JP 2013024914 A JP2013024914 A JP 2013024914A JP 2014155120 A JP2014155120 A JP 2014155120A
Authority
JP
Japan
Prior art keywords
communication
unit
control unit
tcb
socket
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
JP2013024914A
Other languages
Japanese (ja)
Inventor
Motoharu Suzuki
基治 鈴木
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 JP2013024914A priority Critical patent/JP2014155120A/en
Publication of JP2014155120A publication Critical patent/JP2014155120A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Communication Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce a waiting time to the completion of context information loading to achieve high-speed reception processing in the reception processing of a communication packet by a specific communication protocol.SOLUTION: A communication device that performs communication on the basis of a predetermined communication protocol includes: communication means for controlling communication in the communication device; control means for controlling context information for use for the processing of the predetermined communication protocol; and analysis means for analyzing data transferred through an internal bus that connects between a variety of functional units in the communication device. The control means in the communication device loads context information, corresponding to a result analyzed in the analysis means, to a cache memory accessible from the communication means.

Description

本発明は、TCP/IPを用いた通信を高速に実行する技術に関する。   The present invention relates to a technique for executing communication using TCP / IP at high speed.

TCP/IP(Transmission Control Protocol/Internet Protocol)と総称されるプロトコル群の中で、特にTCPは、中心的役割を担うコネクション型のプロトコルである。TCPコネクションは、通信を行う2つのネットワークデバイスそれぞれのIPアドレスとTCPポート番号の4つの情報の組み合わせで表すことができる。なお、これらの情報の組み合わせをソケットペア又は単にソケットと称する。TCPの詳細仕様については、非特許文献1に記載されている。   Among protocol groups collectively called TCP / IP (Transmission Control Protocol / Internet Protocol), TCP is a connection-type protocol that plays a central role. A TCP connection can be represented by a combination of four pieces of information of IP addresses and TCP port numbers of two network devices that perform communication. A combination of these information is called a socket pair or simply a socket. Detailed specifications of TCP are described in Non-Patent Document 1.

近年、TCP/IPのプロトコル処理機能を搭載してネットワークに接続し、顧客の利便性を向上させる組み込み機器が急増している。これらの機器においては、TOE(TCP/IPオフロードエンジン)といったプロトコル処理に特化した補助的デバイスをシステムに付加し、広帯域なネットワーク通信を実現することが一般的になりつつある。TOEの従来例としては、特許文献1に開示される技術が挙げられる。   In recent years, there has been a rapid increase in the number of embedded devices that are equipped with a TCP / IP protocol processing function to connect to a network and improve customer convenience. In these devices, an auxiliary device specialized for protocol processing such as TOE (TCP / IP offload engine) is added to the system to realize broadband network communication. As a conventional example of the TOE, there is a technique disclosed in Patent Document 1.

ところで、TCP/IPのプロトコル処理において重要となるのは、TCB(Transmission Control Block)の扱いである。TCBとは、TCP/IPを処理する場合に必要な、コネクション毎に用意されるコンテキスト情報やその集合体の略称である。1つのTCBは、複数のパラメータ(変数)で構成され、TCP処理中に頻繁にアクセスされる変数である。   By the way, what is important in TCP / IP protocol processing is the handling of TCB (Transmission Control Block). TCB is an abbreviation for context information prepared for each connection and its aggregate necessary for processing TCP / IP. One TCB is composed of a plurality of parameters (variables), and is a variable that is frequently accessed during TCP processing.

特許文献1には、TCP処理を行うために必要なTCBを、主記憶部からSRAM(スタティックランダムアクセスメモリ)等の高速な一次メモリに複製して保持する技術が開示されている。これにより、TCBへのアクセスの高速化を実現している。このとき、コネクションの数が増え、全てのTCBが一次メモリに収まらない場合は、必要なTCBのみ一次メモリに存在するように主記憶部との間で入れ替え処理を行っている。また、特許文献2では、TCP/IPの処理を実行する上で発生する、再転送タイマーのタイムアウトを事前検知し、その検知を元にTCBを一次メモリにロードする技術が開示されている。これにより、TCP/IPの処理の円滑化を図っている。   Patent Document 1 discloses a technique for copying and holding a TCB necessary for performing TCP processing from a main storage unit to a high-speed primary memory such as an SRAM (Static Random Access Memory). As a result, speeding up of access to the TCB is realized. At this time, if the number of connections increases and all the TCBs do not fit in the primary memory, the replacement process is performed with the main storage unit so that only the necessary TCBs exist in the primary memory. Patent Document 2 discloses a technique for detecting in advance a timeout of a re-transfer timer that occurs when TCP / IP processing is executed, and loading a TCB into a primary memory based on the detection. This facilitates TCP / IP processing.

他に、一次メモリにTCBをロードするタイミングを制御する技術として、特許文献3に開示される技術がある。特許文献3では、TCP/IPの処理を行うプロトコル処理手段が、前段と後段に分かれて実装される構成をとっている。そして、後段のプロトコル処理手段が使用するTCBを、前段のプロトコル処理手段が事前に一次メモリにロードすることを特徴としている。これにより、後段のプロトコル処理手段が速やかにTCBにアクセスできる状態にしておくことができ、処理の円滑化を図っている。   In addition, there is a technique disclosed in Patent Document 3 as a technique for controlling the timing of loading the TCB into the primary memory. Patent Document 3 adopts a configuration in which protocol processing means for performing TCP / IP processing is implemented separately in the former stage and the latter stage. Then, the TCB used by the subsequent protocol processing means is loaded into the primary memory in advance by the previous protocol processing means. As a result, the subsequent protocol processing means can quickly access the TCB, thereby facilitating the processing.

特表2002−524005号公報Special table 2002-524005 gazette 特開2009−296546号公報JP 2009-296546 A 特開2008−146486号公報JP 2008-146486 A

Jon Postel、“Transmission Control Protocol”、 RFC793、 http://datatracker.ietf.org/doc/rtf793/Jon Postel, “Transmission Control Protocol”, RFC 793, http: // datatracker. ietf. org / doc / rtf793 /

TCP/IPの通信時、TCPパケットを受信する度に、どのTCBを使うかを検索し、そのTCBが一次メモリにロードされていない場合は、ロード処理を行う必要がある。この場合、特許文献2の方法は、タイマーを使用しているため、TCP/IPパケットの高速な受信処理においては不向きである。特許文献3の方法は、TCP/IP受信処理に適用可能であるが、プロトコル処理手段が前段と後段に分かれている必要がある。また、前段のプロトコル処理手段でどのTCBを使うか検索する処理の軽減に関しては言及されていない。従って、TCBの検索処理時間とTCBのロードにかかる時間を待たなければ、後段のプロトコル処理手段は動作開始できない。   During TCP / IP communication, every time a TCP packet is received, a search is made as to which TCB is used. If the TCB is not loaded in the primary memory, it is necessary to perform a load process. In this case, since the method of Patent Document 2 uses a timer, it is not suitable for high-speed reception processing of TCP / IP packets. The method of Patent Document 3 can be applied to TCP / IP reception processing, but the protocol processing means needs to be divided into a preceding stage and a subsequent stage. Further, there is no mention regarding reduction of processing for searching which TCB is used in the protocol processing means in the previous stage. Therefore, unless the TCB search processing time and the time required for loading the TCB are waited for, the subsequent protocol processing means cannot start operation.

本発明は、上記課題に鑑みてなされたものであり、特定の通信プロトコルによる通信パケットの受信処理において、コンテキスト情報のロード完了にかかる待ち時間を軽減し、受信処理の高速化を実現することを目的とする。   The present invention has been made in view of the above-described problems, and reduces the waiting time required for completion of loading context information in a communication packet reception process using a specific communication protocol, thereby realizing a high-speed reception process. Objective.

上記目的を達成するための一手段として、本発明の通信装置は以下の構成を備える。すなわち、通信プロトコルに基づいて通信を行う通信装置であって、所定の通信プロトコルに基づいて通信を制御する通信手段と、前記所定の通信プロトコルの処理に用いるコンテキスト情報を制御する制御手段と、前記通信装置内の各種機能部間を接続する内部バスで転送されるデータを解析する解析手段と、を具備し、前記制御手段は、前記解析手段で解析された結果に対応するコンテキスト情報を、前記通信手段がアクセスするキャッシュメモリへロードすることを特徴とする。   As a means for achieving the above object, a communication apparatus of the present invention comprises the following arrangement. That is, a communication device that performs communication based on a communication protocol, the communication unit that controls communication based on a predetermined communication protocol, the control unit that controls context information used for processing of the predetermined communication protocol, Analyzing means for analyzing data transferred by an internal bus connecting various functional units in the communication device, and the control means provides context information corresponding to a result analyzed by the analyzing means, It is characterized by loading into a cache memory accessed by the communication means.

本発明により、特定の通信プロトコルによる通信パケットの受信処理において、コンテキスト情報のロード完了にかかる待ち時間を軽減することができ、受信処理の高速化を実現できる。   According to the present invention, it is possible to reduce the waiting time required for completion of loading context information in the communication packet reception process using a specific communication protocol, and to realize a high-speed reception process.

第1実施形態による通信装置の構成を示す図。The figure which shows the structure of the communication apparatus by 1st Embodiment. 通信処理の階層と処理を行うハードウェアの対比の例を示す図。The figure which shows the example of the hierarchy of the communication processing hierarchy and the hardware which performs a process. 第1実施形態による一次解析部の構成を示す図。The figure which shows the structure of the primary analysis part by 1st Embodiment. 通信装置が受信するパケットのフォーマット例を示す図。The figure which shows the format example of the packet which a communication apparatus receives. 第1実施形態による一次解析部の動作のシーケンス図。The sequence diagram of operation | movement of the primary analysis part by 1st Embodiment. 第1実施形態によるTCB制御部の構成を示す図。The figure which shows the structure of the TCB control part by 1st Embodiment. TCBの各要素の格納方法例を示す図。The figure which shows the example of a storage method of each element of TCB. TCBの管理方法例を示す図。The figure which shows the example of the management method of TCB. TCB生成時におけるTCB制御部の動作のフローチャート図。The flowchart figure of operation | movement of the TCB control part at the time of TCB production | generation. TCBロード要求時におけるTCB制御部の動作のフローチャート図。The flowchart figure of operation | movement of the TCB control part at the time of a TCB load request | requirement. 第1実施形態によるTOEサブシステムの動作のシーケンス図。The sequence diagram of the operation | movement of the TOE subsystem by 1st Embodiment. 第2実施形態によるTOEサブシステム(A)、及び、一次解析部の構成を示す図(B)。The figure which shows the structure of the TOE subsystem (A) by 2nd Embodiment, and a primary analysis part.

以下、添付の図面を参照して、本発明をその好適な実施形態に基づいて詳細に説明する。なお、以下の実施形態において示す構成は一例に過ぎず、本発明は図示された構成に限定されるものではない。   Hereinafter, the present invention will be described in detail based on preferred embodiments with reference to the accompanying drawings. The configurations shown in the following embodiments are merely examples, and the present invention is not limited to the illustrated configurations.

[第1実施形態]
図1は、第1実施形態による通信装置の構成を示すブロック図である。主制御部101は、通信装置全体の機能提供、及び、そのための制御を実行する。システムバス102は、主制御部101と、主記憶制御部103とTOEサブシステム105をつなぐバスである。主記憶制御部103は、主記憶部104を使用した、データのRead/Writeを制御する。
[First Embodiment]
FIG. 1 is a block diagram showing a configuration of a communication apparatus according to the first embodiment. The main control unit 101 provides functions of the entire communication device and performs control for that purpose. The system bus 102 is a bus that connects the main control unit 101, the main storage control unit 103, and the TOE subsystem 105. The main memory control unit 103 controls data read / write using the main memory unit 104.

主記憶部104には、各種ソフトウェアが格納される。具体的には、通信装置の各機能を実現するアプリケーションソフトウェア、アプリケーションプロトコル、関連ハードウェアを制御するためのデバイスドライバ及びOS(Operation System)が含まれる。また、主記憶部104は、主制御部101がTOEサブシステム105を介してイーサネット(登録商標)120より送出したいデータや、TOEサブシステム105がイーサネット120から受信し、主制御部101に渡すデータの置き場として使用される。また、主記憶部104には、通信制御部106が実行する各種通信ファームウェアも格納される。さらに、主記憶部104には、TCP/IPの通信処理を行う上で必要となるTCBも格納される。TCP/IP通信のコネクション数に応じて、必要となるTCBの数も増加するので、主記憶部104には、予め通信装置でサポートされる最大コネクション数分だけのTCBが収まるメモリ領域が確保されている。   The main storage unit 104 stores various software. Specifically, application software that implements each function of the communication device, application protocol, a device driver for controlling related hardware, and an OS (Operation System) are included. The main storage unit 104 also includes data that the main control unit 101 wants to send from the Ethernet (registered trademark) 120 via the TOE subsystem 105, and data that the TOE subsystem 105 receives from the Ethernet 120 and passes to the main control unit 101. Used as a place for storage. The main storage unit 104 also stores various communication firmware executed by the communication control unit 106. Further, the main storage unit 104 also stores a TCB necessary for performing TCP / IP communication processing. Since the number of necessary TCBs increases in accordance with the number of TCP / IP communication connections, a memory area in which the TCBs corresponding to the maximum number of connections supported by the communication apparatus can be stored in the main storage unit 104 in advance. ing.

TOEサブシステム105は、通信装置内部における各種機能部間を接続するサブシステムバス(内部バス)109を備え、バスブリッジ部108を介してシステムバス102に接続されている。通信制御部106は、主制御部101からオフロードされたTCP/IPプロトコル処理を実行する。通信制御部106は、主記憶部104上に展開された各ファームウェアプロトコルを、内蔵する命令キャッシュメモリにロードし、ファームウェアプログラムを実行する。   The TOE subsystem 105 includes a subsystem bus (internal bus) 109 that connects various functional units in the communication apparatus, and is connected to the system bus 102 via a bus bridge unit 108. The communication control unit 106 executes TCP / IP protocol processing offloaded from the main control unit 101. The communication control unit 106 loads each firmware protocol developed on the main storage unit 104 into a built-in instruction cache memory and executes the firmware program.

ここで、図2を参照しながら、通信制御部106の役割を詳細に説明する。図2は、通信処理の階層と処理を行うハードウェアの対比を模式的に表したものである。TOEサブシステム105の処理機能は、図2に示される範囲208の層をカバーする。すなわち、TOEサブシステム105の処理機能は、MAC制御部用ドライバ205、インターネット層(IP層)204、トランスポート層(TCP/UDP層)203、及び、ソケットAPI202の一部の機能をカバーする。MAC制御部用ドライバ205は、MAC制御部118を使用し、インターネット層204とMAC(Medium Access Control)層206との間で通信データと通信情報を交換する。インターネット層204は、IPプロトコルを処理する。トランスポート層203は、TCP及びUDP(User Datagram Program)プロトコルを処理する。これらの機能は、主にプロトコルを選択しデータの受け渡しと情報の伝達を中継する機能である。以上が、通信制御部106で実行される主な通信処理であるが、通信制御部106は、一連の処理を実行するにあたり必要となる、TOEサブシステム105に搭載されている各種機能部の制御を行う役割も担う。   Here, the role of the communication control unit 106 will be described in detail with reference to FIG. FIG. 2 schematically shows a comparison of communication processing layers and hardware for processing. The processing functions of the TOE subsystem 105 cover the layers in the range 208 shown in FIG. That is, the processing functions of the TOE subsystem 105 cover some functions of the MAC control unit driver 205, the Internet layer (IP layer) 204, the transport layer (TCP / UDP layer) 203, and the socket API 202. The MAC control unit driver 205 uses the MAC control unit 118 to exchange communication data and communication information between the Internet layer 204 and the MAC (Medium Access Control) layer 206. The Internet layer 204 processes the IP protocol. The transport layer 203 processes TCP and UDP (User Datagram Program) protocols. These functions are mainly functions for selecting a protocol and relaying data transfer and information transfer. The above is the main communication process executed by the communication control unit 106. The communication control unit 106 controls various functional units installed in the TOE subsystem 105, which are necessary for executing a series of processes. It also has a role to do.

図1に戻り、暗号処理部107は、IPsecやSSL/TLS等の暗号通信プロトコル処理機能を提供する。暗号処理内容としては、米国商務省標準技術局(NIST)によって選定されたAES(Advanced Encription Standard)暗号器や認証やデジタル署名等に使われるSHA−1(Secure Hash Algorithm 1)ハッシュ関数器等が挙げられる。その他に、RFC1321としてIETF(Internet Engineering Task Force)で標準化されているMD5(Message Digest 5)ハッシュ関数器等も適用可能である。また、暗号処理部107は、暗号通信プロトコル処理のため生成した暗号鍵や乱数及び素数を機密保持するための鍵管理機能や、TCP/IPプロトコル処理及び暗号通信プロトコル処理のため乱数発生器を備える。   Returning to FIG. 1, the cryptographic processing unit 107 provides cryptographic communication protocol processing functions such as IPsec and SSL / TLS. Examples of cryptographic processing include an AES (Advanced Encryption Standard) cipher selected by the National Institute of Standards and Technology (NIST) and a SHA-1 (Secure Hash Algorithm 1) hash function unit used for authentication and digital signatures. Can be mentioned. In addition, an MD5 (Message Digest 5) hash function unit or the like standardized by IETF (Internet Engineering Task Force) as RFC1321 is also applicable. The cryptographic processing unit 107 also includes a key management function for maintaining confidentiality of cryptographic keys, random numbers, and prime numbers generated for cryptographic communication protocol processing, and a random number generator for TCP / IP protocol processing and cryptographic communication protocol processing. .

バスブリッジ部108は、DMA制御部110を除くTOEサブシステム105内の各機能部が、主記憶部104へアクセスする際に必要となる、サブシステムバス109とシステムバス102間のバス変換機能を有する。DMA(Direct Memory Access)制御部110は、主記憶部104とMAC制御部118間のデータ転送を制御する。バッファ部111は、MAC制御部118で処理された受信フレームを一時的に保持する。また、バッファ部111は、主記憶部104から取り出された1パケット分のデータブロックをひとつ、または、複数一時的に保持する。タイマー部112は、TCP/IPプロトコル処理に必要な時間計測及びタイムアウトイベントを発生させるために使用される。   The bus bridge unit 108 provides a bus conversion function between the subsystem bus 109 and the system bus 102 that is necessary when each functional unit in the TOE subsystem 105 except the DMA control unit 110 accesses the main storage unit 104. Have. A DMA (Direct Memory Access) control unit 110 controls data transfer between the main storage unit 104 and the MAC control unit 118. The buffer unit 111 temporarily holds the received frame processed by the MAC control unit 118. Further, the buffer unit 111 temporarily holds one or more data blocks for one packet extracted from the main storage unit 104. The timer unit 112 is used to generate a time measurement and timeout event necessary for TCP / IP protocol processing.

TCB制御部(コンテキスト情報制御部)113は、主記憶部104に格納されているTCBをTCBキャッシュ部114にロードしたり、ロードしたTCBを再び主記憶部104に戻したり(フラッシュ)する処理を行う。詳細は後述する。TCBキャッシュ部114は、通信制御部106が主記憶部104よりも高速にアクセス可能なようにOn Chip RAMで構成され、主記憶部104より取得したTCBを記憶するメモリ領域である。TCBキャッシュ部114は、領域を論理的に複数に分離された状態で管理される。なお、以下において、一領域単位をキャッシュブロックと称する。   The TCB control unit (context information control unit) 113 loads the TCB stored in the main storage unit 104 into the TCB cache unit 114 and returns the loaded TCB to the main storage unit 104 again (flush). Do. Details will be described later. The TCB cache unit 114 is configured by an On Chip RAM so that the communication control unit 106 can be accessed at a higher speed than the main storage unit 104, and is a memory area that stores the TCB acquired from the main storage unit 104. The TCB cache unit 114 is managed in a state where the area is logically separated into a plurality of areas. In the following, one area unit is referred to as a cache block.

一次解析部115は、DMA転送中のデータ、本例ではDMA制御部110とMAC制御部118間のデータバス上に現れるデータをスヌープし、解析する処理を担う。また、一次解析部115は、解析結果を元にTCB制御部113にロード要求を発行する機能を有する。具体的には、一次解析部115には、解析対象となるデータを取り込むスヌープバス116とのインターフェイスと、TCB制御部113へTCBのロード命令を送信するための制御信号117の出力部が具備されている。さらに、一次解析部115は、通信制御部106とコミュニケーションを行うためのサブシステムバス109接続用のインターフェイスを具備する。詳細については図3により後述する。   The primary analysis unit 115 is responsible for the process of snooping and analyzing the data being DMA-transferred, in this example, the data appearing on the data bus between the DMA control unit 110 and the MAC control unit 118. Further, the primary analysis unit 115 has a function of issuing a load request to the TCB control unit 113 based on the analysis result. Specifically, the primary analysis unit 115 includes an interface with a snoop bus 116 that takes in data to be analyzed, and an output unit for a control signal 117 for transmitting a TCB load command to the TCB control unit 113. ing. Further, the primary analysis unit 115 includes an interface for connecting the subsystem bus 109 for communicating with the communication control unit 106. Details will be described later with reference to FIG.

MAC制御部118は、OSI参照モデルのデータリンク層(第2層)の下位副層に相当するMAC層206のプロトコルを処理するハードウェアである。通信装置は、PHY通信部(Physical Layer Tranceiver IC)119によってイーサネット120に接続されている。PHY通信部119は、OSI参照モデルの第1層に位置するPHY(物理)層207のプロトコル処理と電気信号を扱うハードウェアである。以上が図1に示される本実施形態による通信装置の各機能部に関する概略説明である。   The MAC control unit 118 is hardware that processes the protocol of the MAC layer 206 corresponding to the lower sublayer of the data link layer (second layer) of the OSI reference model. The communication device is connected to the Ethernet 120 by a PHY communication unit (Physical Layer Transceiver IC) 119. The PHY communication unit 119 is hardware that handles protocol processing and electrical signals of the PHY (physical) layer 207 located in the first layer of the OSI reference model. The above is a schematic description of each functional unit of the communication apparatus according to the present embodiment shown in FIG.

次に、一次解析部115の詳細について、図3を用いて説明する。図3は、一次解析部115の具体的構成を示す図である。レジスタ部301は、サブシステムバス109の接続用のインターフェイスを構成するもので、通信制御部106と一次解析部115が通信を行うためのレジスタ群を有し、本例では3つのレジスタより構成される。命令セット部302は、通信制御部106が、一次解析部115に命令をセットするためのレジスタである。状態表示部303は、一次解析部115の状態をサブシステムバス109に提示するためのレジスタであり、通信制御部106は、本レジスタを監視することにより、一次解析部115の状態を確認することができる。解析結果表示部304は、一次解析部115がスヌープバス116に流れるデータを解析した際、その解析結果をサブシステムバス109に提示する。   Next, details of the primary analysis unit 115 will be described with reference to FIG. FIG. 3 is a diagram illustrating a specific configuration of the primary analysis unit 115. The register unit 301 constitutes an interface for connecting the subsystem bus 109. The register unit 301 has a register group for the communication control unit 106 and the primary analysis unit 115 to communicate, and in this example, is configured by three registers. The The instruction setting unit 302 is a register for the communication control unit 106 to set an instruction in the primary analysis unit 115. The status display unit 303 is a register for presenting the status of the primary analysis unit 115 to the subsystem bus 109, and the communication control unit 106 checks the status of the primary analysis unit 115 by monitoring this register. Can do. When the primary analysis unit 115 analyzes the data flowing through the snoop bus 116, the analysis result display unit 304 presents the analysis result to the subsystem bus 109.

状態制御部305は、一次解析部115の全体制御を担う。主な機能としては、一次解析部115内に具備される各種機能部の制御、及び、TCB制御部113へのTCBロード命令の発行である。バスデコード部306は、スヌープバス116に流れるデータストリームをバスプロトコルに則りデコードする機能を有する。デコード結果として、読み込みデータ値307と、そのデータ値がスヌープバス116に流れるデータのうち何バイトに当たるのかを示すカウンタ値308が、バスデコード部306から出力される。   The state control unit 305 is responsible for overall control of the primary analysis unit 115. The main functions are control of various functional units provided in the primary analysis unit 115 and issue of a TCB load instruction to the TCB control unit 113. The bus decoding unit 306 has a function of decoding a data stream flowing through the snoop bus 116 according to a bus protocol. As a decoding result, a read data value 307 and a counter value 308 indicating how many bytes of the data value corresponding to the data flowing in the snoop bus 116 are output from the bus decoding unit 306.

ビット判定部310は、バスデコード部306から出力された読み込みデータ値307とカウンタ値308を用いて、状態制御部305の指示のもとビット判定処理を行う。そして、ビット判定部310は、ビット判定処理の結果である判定結果309を状態制御部305に出力する。ソケット情報取得部312は、状態制御部305の指示のもと、読み込みデータ値307とカウンタ値308から、対象となるソケット情報を取得する機能を有する。本実施形態においては、ソケットペアの情報とは、宛先IPアドレス、宛先ポート番号、送信元IPアドレス、及び、送信元ポート番号の4つの情報の組み合わせをいう。また、ソケット情報は、これら4つの情報の組み合わせによってプロトコル通信チャネルを識別可能な識別情報である。ソケット情報取得部312は、取得データ(ソケット情報)311を状態制御部305に返す機能を有する。   The bit determination unit 310 uses the read data value 307 and counter value 308 output from the bus decoding unit 306 to perform bit determination processing under the instruction of the state control unit 305. Then, the bit determination unit 310 outputs a determination result 309, which is a result of the bit determination process, to the state control unit 305. The socket information acquisition unit 312 has a function of acquiring target socket information from the read data value 307 and the counter value 308 under the instruction of the state control unit 305. In the present embodiment, socket pair information refers to a combination of four pieces of information: a destination IP address, a destination port number, a source IP address, and a source port number. The socket information is identification information that can identify the protocol communication channel by a combination of these four pieces of information. The socket information acquisition unit 312 has a function of returning acquired data (socket information) 311 to the state control unit 305.

次に、一次解析部115の詳細動作について図5のシーケンス図を用いて説明する。図5は、MAC制御部118から、DMA制御部110を使用して、イーサネットフレームをバッファ部111に格納するときの一次解析部115の動作について、各種機能部の動作と併せ示したシーケンス図である。一次解析部115は、最終的にソケット情報を取得することを目的とする。本実施形態では、図4に示すTCP/IP(v4)を使用したときにおけるイーサネットフレームを受信する場合を例にして説明する。   Next, the detailed operation of the primary analysis unit 115 will be described with reference to the sequence diagram of FIG. FIG. 5 is a sequence diagram showing the operation of the primary analysis unit 115 when storing the Ethernet frame in the buffer unit 111 from the MAC control unit 118 using the DMA control unit 110 together with the operations of various functional units. is there. The primary analysis unit 115 is intended to finally acquire socket information. In the present embodiment, a case where an Ethernet frame is received when TCP / IP (v4) shown in FIG. 4 is used will be described as an example.

まず、通信制御部106は、一次解析部115の初期設定を行う。具体的には、一次解析部115のレジスタ部301の命令セット部302に初期設定のために必要な命令を書き込む処理を行う(501)。初期設定値としては、スヌープバス116から取り込むデータに対して、何バイト目から解析を始めるかといったオフセット情報がある。例えば、ある実施形態において、イーサネットフレームヘッダ430は、すべてMAC制御部118で処理され、MAC制御部118よりDMA制御部110で取りこんだデータに含まれない場合には、IPヘッダの位置が異なる。また、詳しい説明は省略するが、イーサネットフレームとIEEE802.3形式の場合、ヘッダ部の長さが異なる。そのような場合でも適用可能とするため、解析位置を任意に設定できるようになっていることが望ましい。   First, the communication control unit 106 performs initial setting of the primary analysis unit 115. Specifically, a process for writing an instruction necessary for initial setting to the instruction setting unit 302 of the register unit 301 of the primary analysis unit 115 is performed (501). As the initial setting value, there is offset information such as how many bytes the analysis starts for the data fetched from the snoop bus 116. For example, in one embodiment, the Ethernet frame header 430 is all processed by the MAC control unit 118, and the IP header position is different when it is not included in the data fetched by the DMA control unit 110 from the MAC control unit 118. Although the detailed description is omitted, the length of the header portion is different between the Ethernet frame and the IEEE 802.3 format. In order to be applicable even in such a case, it is desirable that the analysis position can be arbitrarily set.

レジスタ部301の命令セット部302に初期化命令が書き込まれると(502)、状態制御部305は、書き込まれた値を受信し(503)、ソケット情報取得部312、及び、ビット判定部310に初期化命令を送信する(504)。初期化命令を受け取った各処理部と状態制御部305は、それぞれ初期化を実行する(505、506、507)。この状態において、TCP/IPの通信処理が開始され、MAC制御部118は、イーサネット120より、PHY通信部119を介してパケットを受信すると(508)、通信制御部106に受信通知を行う(509)。受信通知を受け取った通信制御部106は、DMAによる受信データの取り込みを開始する前に、一次解析部115に対して、解析開始要求を行う(510)。レジスタ部301の命令セット部302に解析開始要求が書き込まれると(511)、状態制御部305は解析開始命令を受け取り(512)、バスデコード部306へバスデコード開始命令を送信する(513)。これにより、バスデコード部306がスヌープバス116からのデータに対してのデコード処理、及び、読み込みデータ値307とカウンタ値308の出力を開始するための処理を行う(514)。また、解析要求を受け取った状態制御部305は、一次解析部115が解析処理中になったことを他の機能部に通知するために、レジスタ部301へ、ステータス通知を行う(515)。通知を受けたレジスタ部301は、他の機能部から読み込み可能なレジスタである状態表示部303に、状態を登録する(516)。   When the initialization command is written in the command set unit 302 of the register unit 301 (502), the state control unit 305 receives the written value (503), and sends it to the socket information acquisition unit 312 and the bit determination unit 310. An initialization command is transmitted (504). Receiving the initialization instruction, each processing unit and the state control unit 305 execute initialization (505, 506, 507). In this state, TCP / IP communication processing is started, and when the MAC control unit 118 receives a packet from the Ethernet 120 via the PHY communication unit 119 (508), it notifies the communication control unit 106 of reception (509). ). Receiving the reception notification, the communication control unit 106 makes an analysis start request to the primary analysis unit 115 before starting to receive the received data by DMA (510). When an analysis start request is written in the instruction set unit 302 of the register unit 301 (511), the state control unit 305 receives the analysis start command (512) and transmits a bus decode start command to the bus decode unit 306 (513). Thereby, the bus decoding unit 306 performs a decoding process on the data from the snoop bus 116 and a process for starting output of the read data value 307 and the counter value 308 (514). In addition, the state control unit 305 that has received the analysis request sends a status notification to the register unit 301 in order to notify the other function units that the primary analysis unit 115 is in the analysis process (515). Upon receiving the notification, the register unit 301 registers the state in the state display unit 303, which is a register that can be read from other functional units (516).

一次解析部115に対して、解析開始要求行った通信制御部106は、次にDMA制御部110に対して、DMA転送開始要求を送信する(517)。要求を受けたDMA制御部110は、要求の解析を行い(518)、MAC制御部118よりバッファ部111へのパケットの受信処理であることが分かると、MAC制御部118に対して、DMA転送実行命令を送信する(519)。これにより、MAC制御部118とDMA制御部110間で、DMA転送が行われる(520)。DMA転送は、MAC制御部118内にあるバッファが空になるまで、繰り返し行われる。   The communication control unit 106 which has issued an analysis start request to the primary analysis unit 115 next transmits a DMA transfer start request to the DMA control unit 110 (517). Upon receipt of the request, the DMA control unit 110 analyzes the request (518), and if the MAC control unit 118 finds that the packet reception processing is to the buffer unit 111, the DMA transfer to the MAC control unit 118 is performed. An execution command is transmitted (519). As a result, DMA transfer is performed between the MAC control unit 118 and the DMA control unit 110 (520). The DMA transfer is repeatedly performed until the buffer in the MAC control unit 118 becomes empty.

DMA転送が開始されると、スヌープバス116にもデータが発生する。スヌープバス116よりバスデコード部306に入力されたデータは、デコードされて読み込みデータ値307とカウンタ値308となる。そして、この読み込みデータ値307とカウンタ値308は、ビット判定部310、及び、ソケット情報取得部312へと出力される(521)。ビット判定部310は、まず、初期化情報に基づいて、カウンタ値308が所定の値になったときに、そのときに入力された読み込みデータ値307をイーサネットフレームヘッダ部であると判断し、解析を行う(522)。具体的には、ビット判定部310は、タイプ403を受信して、到着パケットがIPパケットであるかの解析を行う。IPパケットは、タイプ403に、0x0800(IPv4)、0x86DD(IPv6)が記載されている。ビット判定部310は、タイプ403が上記の値になっているかビット判定を行う。タイプ403が上記の値になっている、すなわち、IPパケットであった場合には、処理を継続する。一方、タイプ403が上記の値になっていない、すなわち、IPパケット以外の場合は、以降の処理を中断するために、状態制御部305に通知を行う等の処理をしても良い。   When the DMA transfer is started, data is also generated on the snoop bus 116. Data input from the snoop bus 116 to the bus decoding unit 306 is decoded into a read data value 307 and a counter value 308. Then, the read data value 307 and the counter value 308 are output to the bit determination unit 310 and the socket information acquisition unit 312 (521). Based on the initialization information, the bit determination unit 310 first determines that the read data value 307 input at that time is the Ethernet frame header portion when the counter value 308 reaches a predetermined value, and analyzes it. (522). Specifically, the bit determination unit 310 receives the type 403 and analyzes whether the arrival packet is an IP packet. In the IP packet, 0x0800 (IPv4) and 0x86DD (IPv6) are described in type 403. The bit determination unit 310 determines whether the type 403 has the above value. If the type 403 has the above value, that is, if it is an IP packet, the processing is continued. On the other hand, if the type 403 is not the above value, that is, it is other than an IP packet, processing such as notifying the state control unit 305 may be performed in order to interrupt the subsequent processing.

次に、ビット判定部310は、IPヘッダ(431)の判定を行う(523)。すなわち、一次解析部115は、最終的にソケット情報を取得することが目的であり、そのために必要なビット判定をIPヘッダ(431)に対しても行う。具体的には、本実施形態(IPv4)の場合、ビット判定部310は、バージョン404、IHL(Internet Header Length)405、プロトコル412を判定する。これらを判定することにより、ソケット情報に必要となる、送信元IPアドレス(414)、宛先IPアドレス(415)、送信元ポート番号(417)、及び、宛先ポート番号(418)の位置特定が可能となる。そして、ビット判定部310は、判定結果を状態制御部305へ通知する(524)。ビット判定部310より判定結果を受信した状態制御部305は、ソケット情報が、データパケットの何バイト目に存在するか計算し、計算により得たソケット情報の位置をソケット情報取得部312に通知する(525)。通知を受けたソケット情報取得部312は、受け取った情報をもとに取得のためのタイミングを決定し、カウンタ値308が所定の値になったときに、読み込みデータ値307をソケット情報として読み込む(526)。そして、ソケット情報取得部312は、取得データ311を状態制御部305に出力する(527)。   Next, the bit determination unit 310 determines the IP header (431) (523). In other words, the primary analysis unit 115 is intended to finally acquire socket information, and performs bit determination necessary for this also on the IP header (431). Specifically, in the case of the present embodiment (IPv4), the bit determination unit 310 determines the version 404, the IHL (Internet Header Length) 405, and the protocol 412. By determining these, the location of the source IP address (414), destination IP address (415), source port number (417), and destination port number (418) required for the socket information can be specified. It becomes. Then, the bit determination unit 310 notifies the determination result to the state control unit 305 (524). The state control unit 305 that has received the determination result from the bit determination unit 310 calculates the number of bytes of the data packet in the socket information, and notifies the socket information acquisition unit 312 of the position of the socket information obtained by the calculation. (525). Upon receiving the notification, the socket information acquisition unit 312 determines the acquisition timing based on the received information, and reads the read data value 307 as socket information when the counter value 308 reaches a predetermined value ( 526). Then, the socket information acquisition unit 312 outputs the acquisition data 311 to the state control unit 305 (527).

ソケット情報を受け取った状態制御部305は、すでに一次解析部115としての解析が終了したので、バスデコード部306、ビット判定部310、及び、ソケット情報取得部312に対して、処理終了命令を発行する(528)。処理終了命令を受信した、バスデコード部306、ビット判定部310、及び、ソケット情報取得部312は、それぞれ処理を終了する(529、530、531)。また、ソケット情報を受け取った状態制御部305は、受信したソケット情報を添えて、制御信号117としてTCB制御部113にTCBのロード命令を送信する(532)。以上の処理により一次解析部115の全処理が終了したので、状態制御部305はレジスタ部301に対して解析結果を添えて、終了状態の表示、及び、解析結果の表示命令を送信する(533)。命令を受けたレジスタ部301は、終了ビットと解析結果の値を解析結果表示部304に保持させる(534)。以上が、詳細な一次解析部115の処理シーケンスについての説明である。   The state control unit 305 that has received the socket information has already completed the analysis as the primary analysis unit 115, and therefore issues a processing end instruction to the bus decoding unit 306, the bit determination unit 310, and the socket information acquisition unit 312. (528). The bus decoding unit 306, the bit determination unit 310, and the socket information acquisition unit 312 that have received the processing end command end the processing (529, 530, 531), respectively. The state control unit 305 that has received the socket information transmits a TCB load command to the TCB control unit 113 as a control signal 117 together with the received socket information (532). Since all the processes of the primary analysis unit 115 have been completed by the above processing, the state control unit 305 transmits an end state display and an analysis result display command to the register unit 301 with the analysis result (533). ). Upon receiving the instruction, the register unit 301 holds the end bit and the value of the analysis result in the analysis result display unit 304 (534). The above is a detailed description of the processing sequence of the primary analysis unit 115.

次に、TCB制御部113について、図6を用いて詳細に説明する。図6は、TCB制御部113の具体的構成を示す図である。TCB制御部113は、各通信プロトコルを処理する際に使用するコンテキスト情報をTCBとしてTCBキャッシュ部114に保持管理し、通信制御部106から短時間にTCBの参照や書き換えを可能とする機能を有する。具体的には、TCB制御部113は、以下の構成より成る。   Next, the TCB control unit 113 will be described in detail with reference to FIG. FIG. 6 is a diagram illustrating a specific configuration of the TCB control unit 113. The TCB control unit 113 has a function that allows the TCB cache unit 114 to store and manage context information used when processing each communication protocol as a TCB, and to allow the communication control unit 106 to refer to and rewrite the TCB in a short time. . Specifically, the TCB control unit 113 has the following configuration.

状態制御部601は、TOEサブシステム105内の各機能部からの各種コマンドの解析を行うとともに、TCB制御部113内の各部を統括的に制御する。主制御部101によって状態制御部601の命令キャッシュメモリにマイクロコードがロードされ、状態制御部601がこれを実行することにより、後述の図9、及び、図10に示す処理動作が実現される。本実施形態では、状態制御部601をプログラム可能なシーケンサとしたが、より高速にするために有限状態マシン(専用マシン)のハードウェアで構成してもよい。   The state control unit 601 analyzes various commands from each functional unit in the TOE subsystem 105 and comprehensively controls each unit in the TCB control unit 113. The main control unit 101 loads microcode into the instruction cache memory of the state control unit 601, and the state control unit 601 executes this, thereby realizing processing operations shown in FIGS. 9 and 10 described later. In the present embodiment, the state control unit 601 is a programmable sequencer, but may be configured by hardware of a finite state machine (dedicated machine) for higher speed.

アドレスデコード部602は、サブシステムバス109に接続され、TOEサブシステム105内の各機能部からのアクセス要求に対し、アドレスをデコードする。デコード結果により、アクセス要求先がレジスタ部605であるか、TCBキャッシュ部114であるかを振り分け、アクセス要求をレジスタ部605、または、キャッシュメモリ制御部610に発行する。また、アドレスデコード部602は、レジスタ部605、または、キャッシュメモリ制御部610より受け取った、アクセス要求に対しての応答結果をサブシステムバス109に返す。アドレスデコード部602とキャッシュメモリ制御部610は、データバス604により接続される。   The address decoding unit 602 is connected to the subsystem bus 109 and decodes an address in response to an access request from each functional unit in the TOE subsystem 105. Based on the decoding result, whether the access request destination is the register unit 605 or the TCB cache unit 114 is distributed, and an access request is issued to the register unit 605 or the cache memory control unit 610. Further, the address decoding unit 602 returns the response result to the access request received from the register unit 605 or the cache memory control unit 610 to the subsystem bus 109. The address decoding unit 602 and the cache memory control unit 610 are connected by a data bus 604.

レジスタ部605は、TCB制御部113とTOEサブシステム105内の各機能部とのコミュニケーションに使用される。そのために、レジスタ部605は、TCB制御部113の状態を表すレジスタと、各機能部がTCB制御部113に命令をセットするためのレジスタを有する。さらに、レジスタ部605は、一次解析部115から直接命令を受け付けるための制御信号117と、その他のTOEサブシステム105内の各機能部からサブシステムバス109を介して命令を受け付けるためのインターフェイスを備える。なお、本実施形態では、制御信号117を介して、一次解析部115からの解析結果を受信する構成としているが、サブシステムバス109を介して行うことができる構成にしても良い。   The register unit 605 is used for communication between the TCB control unit 113 and each functional unit in the TOE subsystem 105. For this purpose, the register unit 605 includes a register that indicates the state of the TCB control unit 113 and a register for each function unit to set an instruction to the TCB control unit 113. Furthermore, the register unit 605 includes a control signal 117 for directly receiving a command from the primary analysis unit 115 and an interface for receiving a command from each functional unit in the TOE subsystem 105 via the subsystem bus 109. . In the present embodiment, the analysis result from the primary analysis unit 115 is received via the control signal 117, but a configuration that can be performed via the subsystem bus 109 is also possible.

DMA転送部606は、状態制御部601からの指示に応じて、TCBキャッシュ部114と主記憶部104間におけるシステムバス102、サブシステムバス109及び607、データバス608を介したTCBの転送を制御する。LRU(Least Recently Used)テーブル609は、状態制御部601と接続されており、どのキャッシュブロックが利用されているか、どのキャッシュブロックに配置されたTCBの退避が禁止されているか等を管理するためのテーブルである。   The DMA transfer unit 606 controls TCB transfer between the TCB cache unit 114 and the main storage unit 104 via the system bus 102, subsystem buses 109 and 607, and the data bus 608 in accordance with an instruction from the state control unit 601. To do. An LRU (Least Recently Used) table 609 is connected to the state control unit 601, and manages which cache block is used, which cache block is prohibited from saving a TCB, and the like. It is a table.

キャッシュメモリ制御部610は、データバス604及び608を介して、アドレスデコード部602またはDMA転送部606と接続される。また、キャッシュメモリ制御部610は、アドレスデコード部602またはDMA転送部606の指示に基づいて、TCBキャッシュ部114に対する各種データの書き込み及び読み出しを制御する。TCB管理部612は、TCB管理テーブル611を用いて、ソケット番号の使用の有無等、ソケット番号に関する管理を行う。本実施形態では、ソケット番号は1から512まで用意され、ソケット情報を識別するために、1つのソケット情報に対してこれらの番号からユニークに番号が割り当てられるものとする。   The cache memory control unit 610 is connected to the address decoding unit 602 or the DMA transfer unit 606 via the data buses 604 and 608. Further, the cache memory control unit 610 controls writing and reading of various data with respect to the TCB cache unit 114 based on an instruction from the address decoding unit 602 or the DMA transfer unit 606. The TCB management unit 612 uses the TCB management table 611 to manage the socket number, such as whether or not the socket number is used. In this embodiment, socket numbers 1 to 512 are prepared, and in order to identify socket information, a number is uniquely assigned to one socket information from these numbers.

CAM制御部613は、状態制御部601からの指示に応じて、第1CAM614及び第2CAM615に対する各種データの書き込み及び読み出しを行う。第1CAM614には、ソケット情報とソケット番号が関連づけて登録されている。そして、第1CAM614は、TCB制御部113が受信フレームから取り出したソケット情報を検索キーとして、TCBを特定するためソケット番号を検索するために使用される。また、第2CAM615には、ソケット番号とキャッシュブロック番号が関連づけて登録されている。そして、第2CAM615は、ソケット番号を検索キーとして、所望のソケット番号を有するTCBがTCBキャッシュ部114上に有るかどうかを判定するために使用される。以上がTCB制御部113の詳細構成に関する説明である。   The CAM control unit 613 writes and reads various data with respect to the first CAM 614 and the second CAM 615 in accordance with an instruction from the state control unit 601. In the first CAM 614, socket information and a socket number are registered in association with each other. The first CAM 614 is used to search for a socket number to identify a TCB using the socket information extracted from the received frame by the TCB control unit 113 as a search key. In the second CAM 615, a socket number and a cache block number are registered in association with each other. The second CAM 615 is used to determine whether or not a TCB having a desired socket number exists on the TCB cache unit 114 using the socket number as a search key. The above is the description regarding the detailed configuration of the TCB control unit 113.

なお、TCBには、送受信に係るウィンドウサイズや、Ackナンバーといったスライディングウィンドウ制御に係るものや、送受信に使用されるバッファのポインタ情報等が含まれる。詳細は非特許文献1に記載されている。その他、TCP/IP通信においてTCBに追加で付与しておくことによって、処理の高速化・容易化・利便性が図れるものパラメータがあれば、TCBに組み込んでも良い。   The TCB includes a window size related to transmission / reception, a sliding window control such as an Ack number, and pointer information of a buffer used for transmission / reception. Details are described in Non-Patent Document 1. In addition, if there is a parameter that can be added to the TCB in TCP / IP communication to improve the processing speed, ease, and convenience, it may be incorporated into the TCB.

次に、TCBが主記憶部104、または、TCBキャッシュ部114に格納されるTCBの一例について図7を用いて説明する。図7は、TCBの各要素の格納方法の一例を示す図である。TCP/IPプロトコル処理の中で、TCB701は、図7に示すように1ビット要素702、4ビット要素703、8ビット要素704、・・・というように、各要素がサイズ毎の分類702〜706で纏められ配置されている。TCBに含まれる各要素は、これらのいずれかのサイズに合うように正規化されている。また、このサイズ区切りは、通信制御部106及び状態制御部601が使用するファームウェアが論理的に設定したものであり、物理的なものではない。従って、ファームウェアをコンパイルする際に与える各種パラメータを纏めたヘッダファイルの記述によって各サイズ及び要素数や要素の順番を定義し直すことができる。   Next, an example of a TCB in which the TCB is stored in the main storage unit 104 or the TCB cache unit 114 will be described with reference to FIG. FIG. 7 is a diagram illustrating an example of a storage method of each element of the TCB. In the TCP / IP protocol processing, the TCB 701 is classified into sizes 702 to 706 for each element such as a 1-bit element 702, a 4-bit element 703, an 8-bit element 704,. Are arranged and arranged. Each element included in the TCB is normalized to fit one of these sizes. The size separation is logically set by firmware used by the communication control unit 106 and the state control unit 601, and is not physical. Accordingly, it is possible to redefine the size, the number of elements, and the order of elements by describing a header file that summarizes various parameters given when compiling the firmware.

次に、上記の説明のようにメモリ(主記憶部104またはTCBキャッシュ部114)に格納されたTCBの管理方法について図8を用いて説明する。図8は、TCBの管理方法を説明する図である。主記憶部104に配置されたTCB群802〜804は、図8(A)に示すように、TCPコネクションを識別しているソケット番号順(ソケット番号1〜3)に並べられ、格納されている。主記憶部104には、通信装置において予め保証する最大コネクション数に応じたTCB用領域801を確保しておく必要がある。図8(A)は、最大コネクション数を512とした時の例である。   Next, a method for managing the TCB stored in the memory (the main storage unit 104 or the TCB cache unit 114) as described above will be described with reference to FIG. FIG. 8 is a diagram for explaining a TCB management method. As shown in FIG. 8A, the TCB groups 802 to 804 arranged in the main storage unit 104 are arranged and stored in the order of socket numbers (socket numbers 1 to 3) identifying TCP connections. . In the main storage unit 104, it is necessary to secure a TCB area 801 corresponding to the maximum number of connections guaranteed in advance in the communication device. FIG. 8A shows an example in which the maximum number of connections is 512.

また、TCBキャッシュ部114上の各TCBの配置状態の一例を図8(B)に示す。この例では、最大8つのTCBがロードできるように領域が確保されているものとする。アクセスされるTCB806、807、808は、TCBキャッシュ部114上のTCB用領域805に複製されている。TCBキャッシュ部114と主記憶部104間のTCB転送は、状態制御部601の指示でDMA転送部606が行う。   An example of the arrangement state of each TCB on the TCB cache unit 114 is shown in FIG. In this example, it is assumed that an area is secured so that a maximum of eight TCBs can be loaded. The TCBs 806, 807, and 808 to be accessed are duplicated in the TCB area 805 on the TCB cache unit 114. The TCB transfer between the TCB cache unit 114 and the main storage unit 104 is performed by the DMA transfer unit 606 according to an instruction from the state control unit 601.

TCBキャッシュ部114に配置可能なTCB数は、コスト等により制約を受けるが、複数配置できることが望ましい。理由については2つある。1つ目は、急峻な複数パケット受信時において、以前に到着したパケットに関して、まだTCBを利用した受信処理が完了していない段階でも、新たなパケット処理に必要なTCBのロードを可能とするためである。2つ目は、通信制御部106が、例えばマルチスレッド、あるいは、マルチコアで構成され、複数のパケットに対して同時に受信処理を行っている場合に、TCBのロード、及び、フラッシュ処理を頻発させないためである。TCBのロード、及び、フラッシュは時間のかかる処理であるので、可能な限り発生させないことが望ましい。   The number of TCBs that can be placed in the TCB cache unit 114 is restricted by cost or the like, but it is desirable that a plurality of TCBs can be placed. There are two reasons. The first is to make it possible to load a TCB necessary for new packet processing even when the reception processing using the TCB has not yet been completed for a packet that has arrived at the time of steep multiple packet reception. It is. Second, when the communication control unit 106 is configured with, for example, multi-threads or multi-cores and performs reception processing on a plurality of packets at the same time, it does not frequently cause TCB loading and flush processing. It is. Since loading and flushing of TCB are time consuming processes, it is desirable not to generate them as much as possible.

また、TCB管理テーブル611には、図8(C)に示すように、キャッシュブロック番号毎に、該当キャッシュブロック番号におけるTCBの有無を示すビットマップ809が形成されてTCB管理部612により管理されている。さらにTCB管理テーブル611には、図8(D)に示すように、ソケット番号の使用の有無を示すビットマップ810が形成されて、キャッシュブロックと同様にTCB管理部612により管理されている。   In the TCB management table 611, as shown in FIG. 8C, a bitmap 809 indicating the presence / absence of a TCB in the corresponding cache block number is formed for each cache block number and is managed by the TCB management unit 612. Yes. Further, as shown in FIG. 8D, a bit map 810 indicating whether or not the socket number is used is formed in the TCB management table 611 and managed by the TCB management unit 612 in the same manner as the cache block.

次に、TCB制御部113の詳細動作について、図9及び図10のフローチャートを用いて説明する。図9は、TCBの生成時におけるTCB制御部113の処理の流れを示すフローチャートである。なお、TCBは、TCPコネクション確立時に生成される。このTCPコネクション確立は、通信制御部106によって行われ、コネクション確立時に交換される情報から通信制御部106はソケット情報を得る。コネクション確立時に送受信される各TCPパケットのTCPヘッダにはソケット情報が含まれる。その上でまず、ステップS901において、状態制御部601は、通信制御部106からTCBの生成が命令される。その際に、通信制御部106から状態制御部601にソケット情報等が伝達される。状態制御部601は、ソケット情報等に基づいてTCBの作成を開始する。   Next, the detailed operation of the TCB control unit 113 will be described with reference to the flowcharts of FIGS. FIG. 9 is a flowchart showing a process flow of the TCB control unit 113 at the time of TCB generation. The TCB is generated when a TCP connection is established. This TCP connection establishment is performed by the communication control unit 106, and the communication control unit 106 obtains socket information from information exchanged when the connection is established. Socket information is included in the TCP header of each TCP packet transmitted and received when establishing a connection. First, in step S901, the state control unit 601 is instructed by the communication control unit 106 to generate a TCB. At that time, socket information or the like is transmitted from the communication control unit 106 to the state control unit 601. The state control unit 601 starts creating the TCB based on the socket information and the like.

ステップS902において、状態制御部601は、TCB管理部612から未使用のソケット番号を取得する。TCB管理部612は、未使用のソケット番号を管理しており、状態制御部601から取得要求に応じて、未使用のソケット番号を発行する。TCB管理部612は、状態制御部601から未使用のソケット番号を要求されると、予めビットマップ810を検索して得ていた未使用のソケット番号を報告する。この報告とは別に、バックグラウンドの動作で、TCB管理テーブル611の更新や次の未使用ソケット番号検索が当然に行われている。また、コネクション解放時には、通信制御部106から状態制御部601を介して使用済みソケット番号がTCB管理部612に返却される。使用済みソケット番号が返却されると、TCB管理部612は、図8(D)に示すTCB管理テーブル611を更新するとともに、未使用ソケット番号検索を行う。   In step S <b> 902, the state control unit 601 obtains an unused socket number from the TCB management unit 612. The TCB management unit 612 manages unused socket numbers, and issues unused socket numbers in response to acquisition requests from the state control unit 601. When the status control unit 601 requests an unused socket number, the TCB management unit 612 reports the unused socket number obtained by searching the bitmap 810 in advance. In addition to this report, the TCB management table 611 is updated and the next unused socket number search is naturally performed in the background operation. When the connection is released, the used socket number is returned from the communication control unit 106 to the TCB management unit 612 via the state control unit 601. When the used socket number is returned, the TCB management unit 612 updates the TCB management table 611 shown in FIG. 8D and searches for an unused socket number.

ステップS903において、ソケット番号の取得が成功した場合は、ステップS904へ、失敗した場合はステップS913へ進む。ステップS904において、第1CAM614にソケット情報が登録される。即ち、状態制御部601は、ステップS902で得られたソケット番号と、ステップS901で得たソケット情報を関連付けて登録するようCAM制御部613に指示する。指示を受けたCAM制御部613は、アドレスとしてソケット情報を第1CAM614に登録する。ステップS905において、状態制御部601は、TCBをTCBキャッシュ部114上に生成する準備として、TCB管理部612から未使用のキャッシュブロック番号を取得する。ステップS906において、未使用のキャッシュブロックがなく、キャッシュブロック番号の取得に失敗した場合はステップS907へ、成功した場合はステップS909へ進む。   In step S903, if the acquisition of the socket number is successful, the process proceeds to step S904, and if it is unsuccessful, the process proceeds to step S913. In step S904, socket information is registered in the first CAM 614. That is, the state control unit 601 instructs the CAM control unit 613 to associate and register the socket number obtained in step S902 and the socket information obtained in step S901. Upon receiving the instruction, the CAM control unit 613 registers the socket information in the first CAM 614 as an address. In step S <b> 905, the state control unit 601 acquires an unused cache block number from the TCB management unit 612 in preparation for generating a TCB on the TCB cache unit 114. In step S906, if there is no unused cache block and acquisition of the cache block number fails, the process proceeds to step S907, and if successful, the process proceeds to step S909.

ステップS907及びステップS908は、TCBキャッシュ部114上に新たなTCBを生成するため、古いTCBを主記憶部104に退避し、空きの領域を作る処理である。具体的には、ステップS907において、状態制御部601は、LRUテーブル609から、アクセスの最も古いキャッシュブロック番号と対応するソケット番号を取得する。次に、ステップS908において、DMA転送部606は、TCBキャッシュ部114上にあり、かつ、ステップS907で特定された最古のキャッシュブロック番号のTCBを、主記憶部104上の該当ソケット番号の位置に退避する。これにより、TCBキャッシュ部114に空きの領域が生成される。   Steps S907 and S908 are processing for creating an empty area by saving the old TCB in the main storage unit 104 in order to generate a new TCB on the TCB cache unit 114. Specifically, in step S907, the state control unit 601 acquires a socket number corresponding to the cache block number with the oldest access from the LRU table 609. Next, in step S908, the DMA transfer unit 606 is located on the TCB cache unit 114, and the TCB of the oldest cache block number specified in step S907 is the position of the corresponding socket number on the main storage unit 104. Evacuate to. Thereby, an empty area is generated in the TCB cache unit 114.

ステップS909において、状態制御部601は、空きキャッシュブロックに、作成するTCBと関連付けられている(ステップS902で取得した)ソケット番号を登録するようCAM制御部613に対して指示する。これを受けて、CAM制御部613は、第2CAM615のキャッシュブロック番号のアドレスに、ソケット番号を登録する。ステップS910において、状態制御部601は、TCBキャッシュ部114上で、新しくTCBを作成するキャッシュブロック番号のキャッシュブロックを初期化するようキャッシュメモリ制御部610に対して指示する。これを受けて、キャッシュメモリ制御部610は、キャッシュブロックを初期化する。ステップS911において、状態制御部601は、キャッシュブロックの初期化に応じて、LRUテーブル609を更新する。ステップS912において、状態制御部601は、キャッシュブロック番号をステップS902で取得したソケット番号と共にキャッシュメモリ制御部610に登録する。このとき、状態制御部601は、生成したTCBをTCBキャッシュ部114内におけるキャッシュブロック番号のアドレスに登録する。   In step S909, the state control unit 601 instructs the CAM control unit 613 to register the socket number associated with the TCB to be created (obtained in step S902) in the free cache block. In response to this, the CAM control unit 613 registers the socket number in the address of the cache block number of the second CAM 615. In step S910, the state control unit 601 instructs the cache memory control unit 610 to initialize the cache block having the cache block number for creating a new TCB on the TCB cache unit 114. In response to this, the cache memory control unit 610 initializes the cache block. In step S911, the state control unit 601 updates the LRU table 609 according to the initialization of the cache block. In step S912, the state control unit 601 registers the cache block number in the cache memory control unit 610 together with the socket number acquired in step S902. At this time, the state control unit 601 registers the generated TCB at the address of the cache block number in the TCB cache unit 114.

一方、ステップS903において、TCB管理部612が管理している未使用ソケット番号が枯渇し、ソケット番号の取得が失敗した場合、ステップS913へ進む。ステップS913では、TCB管理部612が要求元の通信制御部106にその旨を通知し、結果的にコネクション確立は不成功となる。TCB管理部612が管理している未使用ソケット番号の枯渇が起こる理由は、ソケット番号の総数は主記憶部104上の固定的に用意された領域に配置されるため、主記憶部104の容量の制約を受けるからである。一般に、コネクション確立は交渉事であり不成立もあり得る。以上が、TCBの生成要求を受信したときにおける、TCB制御部113の動作についての詳細説明である。   On the other hand, if the unused socket number managed by the TCB management unit 612 is exhausted in step S903 and the acquisition of the socket number fails, the process proceeds to step S913. In step S913, the TCB management unit 612 notifies the requesting communication control unit 106 to that effect, and as a result, the connection establishment is unsuccessful. The reason for the exhaustion of unused socket numbers managed by the TCB management unit 612 occurs because the total number of socket numbers is arranged in a fixedly prepared area on the main storage unit 104. This is because of the restrictions. In general, connection establishment is a negotiation and may not be established. The above is a detailed description of the operation of the TCB control unit 113 when a TCB generation request is received.

図10は、通信制御部106、または、一次解析部115から、TCB制御部113に対してTCBのロード要求が行われた場合のTCB制御部113の動作を示すフローチャートである。本実施形態のように、通信制御部106と一次解析部115の2つからTCBロード要求を発行できるようにしたのは、以下の理由である。例えば、TCP/IPパケットの送信処理時においては、通信制御部106がパケット生成において必要なTCBをロードする。また、TCP/IPパケットを受信した時には、通信制御部106が実施するよりも早いタイミングで、一次解析部115がTCBのロード要求を発行する。これにより、通信制御部106は任意のタイミングで任意のTCBのロード要求をすることができ、かつ、パケット受信時においては、一次解析部115がTCBのロード要求をすることができ、結果として高速なTCBのロードを実現できる。   FIG. 10 is a flowchart showing the operation of the TCB control unit 113 when a TCB load request is made to the TCB control unit 113 from the communication control unit 106 or the primary analysis unit 115. The reason why the TCB load request can be issued from the communication control unit 106 and the primary analysis unit 115 as in the present embodiment is as follows. For example, at the time of TCP / IP packet transmission processing, the communication control unit 106 loads a TCB necessary for packet generation. When a TCP / IP packet is received, the primary analysis unit 115 issues a TCB load request at a timing earlier than that performed by the communication control unit 106. As a result, the communication control unit 106 can make an arbitrary TCB load request at an arbitrary timing, and the primary analysis unit 115 can make a TCB load request at the time of packet reception. TCB loading can be realized.

ロード要求は、ロード対象とするTCBに対応した、ソケット情報またはソケット番号が付与された状態で行われる。まず、ロード要求に、ロードしたいTCBに対応したソケット番号が付与されているか否かを条件に処理シーケンスを分ける。ソケット番号が付与されていた場合は、ステップS1005へ進む。ソケット番号が付与されていなかった場合は、ステップS1002へ進む。ステップS1002において、状態制御部601は通信制御部106または一次解析部115からソケット情報を取得する。次に、ステップS1003において、状態制御部601は、ステップS1002において取得したソケット情報を検索キーとして第1CAM614からソケット番号を得る。なお、この処理はCAM制御部613を介して行われる。コネクションが確立していれば、TCB生成の過程で対象となるソケット情報は登録されている。そして、ステップS1004において、状態制御部601はソケット番号の取得が成功したかを判断する。ソケット番号を取得できた場合は、ステップS1005へ進む。ソケット番号の取得に失敗した場合は、ステップS1015へ進む。ステップS1015においては、状態制御部601はソケット番号取得失敗を通信制御部106に通知する。ソケット番号取得失敗は、受信したパケットが、TCPパケットである場合は、コネクション確立時に交換するSYNパケットか不正パケットのどちらかであることを示す。これ以降、このパケットをどのように処理するかは、この通知を受けた通信制御部106が引き継ぐ。   The load request is made in a state where socket information or a socket number corresponding to the TCB to be loaded is given. First, the processing sequence is divided on the condition that the socket number corresponding to the TCB to be loaded is assigned to the load request. If the socket number has been assigned, the process proceeds to step S1005. If the socket number has not been assigned, the process proceeds to step S1002. In step S <b> 1002, the state control unit 601 acquires socket information from the communication control unit 106 or the primary analysis unit 115. Next, in step S1003, the state control unit 601 obtains a socket number from the first CAM 614 using the socket information acquired in step S1002 as a search key. This process is performed via the CAM control unit 613. If the connection has been established, the target socket information in the process of generating the TCB is registered. In step S1004, the state control unit 601 determines whether the socket number has been successfully acquired. If the socket number can be acquired, the process proceeds to step S1005. If acquisition of the socket number has failed, the process proceeds to step S1015. In step S1015, the state control unit 601 notifies the communication control unit 106 of a socket number acquisition failure. The socket number acquisition failure indicates that when the received packet is a TCP packet, it is either a SYN packet exchanged at the time of establishing a connection or an illegal packet. Thereafter, the communication control unit 106 that has received this notification takes over how to process this packet.

ステップS1005においては、状態制御部601は、ソケット番号を検索キーとして第2CAM615からキャッシュブロック番号を取得する。なお、この処理はCAM制御部613を介して行われる。そして、ステップS1006において、状態制御部601はキャッシュブロック番号の取得が成功したかを判断する。キャッシュブロック番号の取得が成功した場合は、ステップS1014へ、失敗した場合はステップS1007へ進む。取得の失敗は、ロード対象とするTCBがTCBキャッシュ部114に無いことを表す。ステップS1007において、状態制御部601は、TCB管理部612から未使用のキャッシュブロック番号を取得することを試みる。そして、ステップS1008において、状態制御部601は未使用のキャッシュブロック番号の取得が成功したかを判断する。未使用のキャッシュブロックがなく、キャッシュブロック番号の取得に失敗した場合はステップS1009へ、成功した場合はステップS1011へ進む。ステップS1009において、状態制御部601は、LRUテーブル609から最終アクセスの最も古いキャッシュブロック番号と対応するソケット番号を取得する。ステップS1010において、DMA転送部606は、TCBキャッシュ部114上にあり、ステップS1009で特定したキャッシュブロック番号のTCBを、主記憶部104上の該当する位置へ退避させる。   In step S1005, the state control unit 601 acquires a cache block number from the second CAM 615 using the socket number as a search key. This process is performed via the CAM control unit 613. In step S1006, the state control unit 601 determines whether the cache block number has been successfully acquired. If the acquisition of the cache block number is successful, the process proceeds to step S1014. If the acquisition is unsuccessful, the process proceeds to step S1007. The acquisition failure indicates that the TCB cache unit 114 has no TCB to be loaded. In step S1007, the state control unit 601 tries to acquire an unused cache block number from the TCB management unit 612. In step S1008, the state control unit 601 determines whether acquisition of an unused cache block number has succeeded. If there is no unused cache block and acquisition of the cache block number fails, the process proceeds to step S1009, and if successful, the process proceeds to step S1011. In step S1009, the state control unit 601 acquires a socket number corresponding to the oldest cache block number of the last access from the LRU table 609. In step S1010, the DMA transfer unit 606 is on the TCB cache unit 114, and saves the TCB having the cache block number specified in step S1009 to a corresponding position on the main storage unit 104.

ここまでの処理により状態制御部601はキャッシュブロック番号が取得でき、ステップS1011において、状態制御部601は、取得したキャッシュブロック番号にソケット番号を登録する。ステップS1012において、DMA転送部606は、主記憶部104上にあり、ロード対象となったソケット番号のTCBを取得し、TCBキャッシュ部114上の所定のキャッシュブロック番号のキャッシュブロックに読み込む。ステップS1013において、状態制御部601は、LRUテーブル609を更新する。ステップS1014において、状態制御部601は、取得したTCBが格納されたキャッシュブロック番号をソケット番号と共にキャッシュメモリ制御部610登録する。以上が、TCBのロード要求を受信したときにおける、TCB制御部113の動作についての詳細説明である。   By the processing so far, the state control unit 601 can acquire the cache block number, and in step S1011, the state control unit 601 registers the socket number in the acquired cache block number. In step S1012, the DMA transfer unit 606 obtains the TCB of the socket number that is on the main storage unit 104 and is loaded, and reads it into the cache block of the predetermined cache block number on the TCB cache unit 114. In step S1013, the state control unit 601 updates the LRU table 609. In step S1014, the state control unit 601 registers the cache block number storing the acquired TCB together with the socket number in the cache memory control unit 610. The above is a detailed description of the operation of the TCB control unit 113 when a TCB load request is received.

次に、上記一次解析部115、及び、TCB制御部113を具備したTOEサブシステム105がどのように動作するかについて、図11のシーケンス図を用いて説明する。図11は第1実施形態によるTOEサブシステムの動作シーケンス図である。なお、各種機能部のリセットや初期設定といった項目については、本実施形態における特徴とは必ずしも関係しないため、説明を省略する。まず、MAC制御部118は、PHY通信部119からTCP/IPパケットを受信する(1101(508と同様))。MAC制御部118は、通信制御部106へ、パケットを受信したことを通知する(1102、509と同様)。通知を受けた通信制御部106は、解析要求を一次解析部に送信し、併せてDMA転送開始要求をDMA制御部110に送信する(1103、及び、1104(夫々510、及び、515と同様))。   Next, how the TOE subsystem 105 including the primary analysis unit 115 and the TCB control unit 113 operates will be described with reference to the sequence diagram of FIG. FIG. 11 is an operation sequence diagram of the TOE subsystem according to the first embodiment. Note that items such as resetting and initial setting of various functional units are not necessarily related to the features in the present embodiment, and thus description thereof is omitted. First, the MAC control unit 118 receives a TCP / IP packet from the PHY communication unit 119 (1101 (same as 508)). The MAC control unit 118 notifies the communication control unit 106 that a packet has been received (similar to 1102 and 509). Upon receiving the notification, the communication control unit 106 transmits an analysis request to the primary analysis unit, and also transmits a DMA transfer start request to the DMA control unit 110 (1103 and 1104 (same as 510 and 515, respectively)). ).

DMA制御部110は要求を解析し(1105(516と同様))、DMA転送実行命令をMAC制御部118に送信する(1106(517と同様))。MAC制御部118とDMA制御部110間のDMA転送(1107(518と同様))が開始される。DMA転送中(1107)において、一次解析部115は、スヌープバス116を流れるTCP/IPパケットの解析処理や、パケットのソケット情報の取得処理を行う(1108(520〜529に相当))。ソケット情報の取得後に、該ソケット情報を付与してTCB制御部113にTCBロード命令を送信する(1108(530と同様))。そして一次解析部115は、解析の終了処理を行う(1109(531/532に相当))。TCBロード命令を受信したTCB制御部113は、TCBのロード処理を開始する(1110、S1001〜S1011に相当)。TCBのロード処理(1112(S1012に相当))の完了を検知すると(1113)、終了処理を行う(1114(S1013/S1014に相当))。   The DMA control unit 110 analyzes the request (1105 (same as 516)) and transmits a DMA transfer execution command to the MAC control unit 118 (1106 (same as 517)). DMA transfer (1107 (similar to 518)) between the MAC control unit 118 and the DMA control unit 110 is started. During DMA transfer (1107), the primary analysis unit 115 performs analysis processing of TCP / IP packets flowing through the snoop bus 116 and acquisition processing of packet socket information (1108 (corresponding to 520 to 529)). After acquiring the socket information, the socket information is added and a TCB load command is transmitted to the TCB control unit 113 (1108 (similar to 530)). Then, the primary analysis unit 115 performs an analysis end process (1109 (corresponding to 531/532)). The TCB control unit 113 that has received the TCB load command starts the TCB load process (1110, corresponding to S1001 to S1011). When the completion of the TCB loading process (1112 (corresponding to S1012)) is detected (1113), the termination process is performed (1114 (corresponding to S1013 / S1014)).

一方、DMA完了を検知したDMA制御部110は(1115)、通信制御部106に対して、DMA転送完了通知を行う(1116)。DMA完了通知を受信した通信制御部106は、一次解析部115の解析結果表示部304にアクセスし、受信したパケットの解析結果を取得する(1117)。通信制御部106は、解析結果を元に、IP層(204)、及び、TCP/UDP層(203)における受信処理を行うために、必要となるTCBのロード命令をTCB制御部113に送信する(1118)。TCBロード命令を受信したTCB制御部113は、TCBロード処理を行うが、すでにTCBキャッシュ部114には、該TCBがロードされている状態(S1006でYesに相当)なので、即座にTCBロードの完了通知を送信する(1119)。TCBロードを確認した通信制御部106は、IP層(204)、及び、TCP/UDP層(203)における受信処理を開始する(1120)。   On the other hand, the DMA control unit 110 that has detected the completion of DMA (1115) sends a DMA transfer completion notification to the communication control unit 106 (1116). Receiving the DMA completion notification, the communication control unit 106 accesses the analysis result display unit 304 of the primary analysis unit 115 and acquires the analysis result of the received packet (1117). The communication control unit 106 transmits a necessary TCB load command to the TCB control unit 113 in order to perform reception processing in the IP layer (204) and the TCP / UDP layer (203) based on the analysis result. (1118). The TCB control unit 113 that has received the TCB load instruction performs TCB load processing, but since the TCB has already been loaded in the TCB cache unit 114 (corresponding to Yes in S1006), the TCB load is completed immediately. A notification is transmitted (1119). The communication control unit 106 that has confirmed the TCB load starts reception processing in the IP layer (204) and the TCP / UDP layer (203) (1120).

図11において特筆すべきは、DMA転送中(1107)においも、一次解析部115はTCBロード命令をTCB制御部113に送信できる点である。これにより、TCBロードに必要な時間あり、実際に通信制御部106がロード完了までTCP/IPパケットの受信処理を待機する時間を一部、または、全部削減して通信制御部106は受信処理を開始(1120)できる。さらに本実施形態に付随する効果として、以下を挙げることができる。すなわち、従来技術において、通信制御部106の処理において必要であったTCP/IPパケットの解析処理についても、一次解析部115が肩代わりすることにより通信制御部106の処理を簡略化できる点である。この効果もTCP/IPパケットの受信性能を向上させる効果として、挙げることができる。   It should be noted in FIG. 11 that the primary analysis unit 115 can transmit the TCB load command to the TCB control unit 113 even during the DMA transfer (1107). As a result, there is a time required for the TCB load, and the communication control unit 106 actually reduces the time that the communication control unit 106 waits for the TCP / IP packet reception process until the load is completed. Start (1120) is possible. Further, the following effects can be given as effects associated with the present embodiment. In other words, the TCP / IP packet analysis processing that is necessary for the processing of the communication control unit 106 in the prior art is that the processing of the communication control unit 106 can be simplified by the primary analysis unit 115 taking over. This effect can also be cited as an effect of improving the reception performance of TCP / IP packets.

また、図11では、DMA転送完了通知(1116)を通信制御部106が受信してから処理(1117)を開始しているが、このタイミングでなくともよい。すなわち、IP(v4)ヘッダ(431)、及び、TCPヘッダ(432)があれば、通信制御部106は、TCBのロード命令等、IP層(204)、及び、TCP/UDP層(203)の受信処理を開始することができる。従って、DMA転送完了通知(1116)よりも早いタイミングで、例えば、受信開始可能通知をDMA制御部110が、通信制御部106に送信し、それを元に、通信制御部106は処理(1117)を開始しても良い。以上が図11の説明である。   In FIG. 11, the processing (1117) is started after the communication control unit 106 receives the DMA transfer completion notification (1116). In other words, if there are the IP (v4) header (431) and the TCP header (432), the communication control unit 106 determines the IP layer (204) and TCP / UDP layer (203) of the TCB load command, etc. The reception process can be started. Accordingly, at a timing earlier than the DMA transfer completion notification (1116), for example, the DMA control unit 110 transmits a reception start ready notification to the communication control unit 106, and the communication control unit 106 performs processing (1117). You may start. The above is the description of FIG.

以上のように、本実施形態によれば、TCBのロード要求からロード完了にかかる待ち時間を軽減できることができ、受信処理をより高速にすることが可能となる。   As described above, according to the present embodiment, it is possible to reduce the waiting time required for completion of loading from a TCB load request, and it is possible to speed up the reception process.

[第2実施形態]
図12は、第2実施形態による通信装置(図12(A))及び、一次解析部(図12(B))のブロック図である。第1実施形態との差分は、TOEサブシステムにおける、一次解析部の機能にある。一次解析部1202は、サブシステムバス109をスヌープできるように、第2スヌープバス1204が接続できるインターフェイスを備えている。なお、第1スヌープバス1203は、スヌープバス116と同様のものである。また、一次解析部1202は、サブシステムバス109をデコードできるように、バスデコード部1205が具備されている。これにより、サブシステムバス109を流れるTCP/IPパケットに関しても、パケットを解析し、TCBのロードに必要となるソケット情報の抽出が可能となる。
[Second Embodiment]
FIG. 12 is a block diagram of a communication device (FIG. 12A) and a primary analysis unit (FIG. 12B) according to the second embodiment. The difference from the first embodiment is in the function of the primary analysis unit in the TOE subsystem. The primary analysis unit 1202 includes an interface to which the second snoop bus 1204 can be connected so that the subsystem bus 109 can be snooped. The first snoop bus 1203 is the same as the snoop bus 116. Further, the primary analysis unit 1202 is provided with a bus decoding unit 1205 so that the subsystem bus 109 can be decoded. As a result, the TCP / IP packet flowing through the subsystem bus 109 can be analyzed and the socket information necessary for loading the TCB can be extracted.

この機能は、暗号化されたパケットを受信するに際して適している。例えば、IPSecが適用されたパケットは、ソケット情報が暗号化されており、一次解析部1202は、第1スヌープバス1203を流れるデータからソケット情報を取り出せない場合がある。その場合において、本実施形態を適用することにより、暗号処理部107より出力される暗号のデコード済みパケットがサブシステムバス109を流れるタイミングで一次解析部1202は、解析が可能となる。結果、通信制御部106がTCPとしての受信処理を開始するよりも早いタイミングでTCBのロードが可能となる。暗号化のために用意された特別なヘッダが上記パケットに付随されていても、先に説明したように解析開始点に対して、オフセット情報を付与することにより解析が可能となる。   This function is suitable for receiving an encrypted packet. For example, in a packet to which IPSec is applied, socket information is encrypted, and the primary analysis unit 1202 may not be able to extract socket information from data flowing through the first snoop bus 1203. In this case, by applying this embodiment, the primary analysis unit 1202 can analyze at the timing when the encrypted decoded packet output from the encryption processing unit 107 flows through the subsystem bus 109. As a result, the TCB can be loaded at an earlier timing than the communication control unit 106 starts the reception process as TCP. Even if a special header prepared for encryption is attached to the packet, analysis can be performed by adding offset information to the analysis start point as described above.

なお、一次解析部1202は、スヌープバス116からソケット情報を取り出せないと説明したが、受信パケットに対して暗号化が施されているか否かについては、解析可能である。詳細な説明は省略するが、本実施形態に係る一次解析部1202の構成により、イーサネットフレームヘッダ430のタイプ403から解析を開始することで実現できることは明白である。この解析結果を通信制御部106が利用して、MAC制御部118より取り込んだパケットの次の処理を決定することができ、これにより通信制御部106の処理の軽減と受信処理の高速化を実現できる。なお、一次解析部1202が第1スヌープバス1203と第2スヌープバス1204に流れるデータを切り換えて受信して解析するように構成してもよい。   Note that the primary analysis unit 1202 has been described that the socket information cannot be extracted from the snoop bus 116, but it is possible to analyze whether or not the received packet is encrypted. Although detailed description is omitted, it is apparent that the configuration of the primary analysis unit 1202 according to the present embodiment can be realized by starting the analysis from the type 403 of the Ethernet frame header 430. The analysis result can be used by the communication control unit 106 to determine the next processing of the packet fetched from the MAC control unit 118, thereby reducing the processing of the communication control unit 106 and speeding up the reception process. it can. The primary analysis unit 1202 may be configured to switch and receive and analyze data flowing through the first snoop bus 1203 and the second snoop bus 1204.

以上のように、本実施形態によれば、暗号化パケットを受信する際においても、TCBのロード要求からロード完了にかかる待ち時間を軽減できることができ、受信処理をより高速にすることが可能となる。   As described above, according to the present embodiment, even when an encrypted packet is received, it is possible to reduce the waiting time for load completion from a TCB load request, and to increase the speed of reception processing. Become.

[その他の実施形態]
以上、本発明を利用できる形態について2つの実施形態を用いて説明した。なお、本実施形態では、プロトコル処理の代表的事例としてTCPプロトコルについて述べたが、他のプロトコルについても対応可能である。例えば、SSL/TLSプロトコル通信においては、複数のセッションを識別し、そのセッション毎のTCBが必要となる。ここで、セッションは、TCP通信のコネクションに相当する。SSL/TLSは、ソケットAPI202上のセキュリティ通信プロトコルであり、通信制御部106内で処理される。SSL/TLSのセッション識別を通信制御部106で行い、対応するTCBをTCBキャッシュ部114に読み込む。また、TCBキャッシュ部114、TCB管理テーブル611及びLRUテーブル609にはSSL/TLSセッション用の領域を確保しておく。そして、専用のキャッシュブロック、LRUテーブル及びキャッシュブロック番号管理用のビットマップテーブルを用意しておくことにより実現できる。
[Other Embodiments]
In the above, the form which can utilize this invention was demonstrated using two embodiment. In the present embodiment, the TCP protocol has been described as a representative example of protocol processing, but other protocols can also be handled. For example, in SSL / TLS protocol communication, a plurality of sessions are identified, and a TCB for each session is required. Here, the session corresponds to a TCP communication connection. SSL / TLS is a security communication protocol on the socket API 202 and is processed in the communication control unit 106. SSL / TLS session identification is performed by the communication control unit 106, and the corresponding TCB is read into the TCB cache unit 114. In addition, an area for an SSL / TLS session is secured in the TCB cache unit 114, the TCB management table 611, and the LRU table 609. This can be realized by preparing a dedicated cache block, an LRU table, and a bitmap table for managing the cache block number.

また、本発明では、イーサネットを例に用いたが、無線LANについても適用可能なことは言うまでもない。その場合、無線に係るMACヘッダ等が付与された受信パケットを取り込む場合は、先にあげたオフセット情報を適切に適用することにより、先に説明した実施例と同様にIPヘッダ、TCPヘッダの解析が可能となる。さらにパケットが連結されて受信されるような場合も、トータルパケット長を解析に含めることにより、パケットの切れ目を検出できるようになる。これにより、連結パケットにおいても、それぞれのパケット毎にTCBロードが可能となる。   In the present invention, Ethernet is used as an example, but it goes without saying that the present invention can also be applied to a wireless LAN. In that case, when capturing a received packet to which a wireless MAC header or the like is added, the IP header and TCP header are analyzed in the same manner as in the above-described embodiment by appropriately applying the offset information described above. Is possible. Further, when packets are concatenated and received, the break of the packet can be detected by including the total packet length in the analysis. As a result, even in a concatenated packet, TCB loading can be performed for each packet.

また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。   The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (10)

通信プロトコルに基づいて通信を行う通信装置であって、
所定の通信プロトコルに基づいて通信を制御する通信手段と、
前記所定の通信プロトコルの処理に用いるコンテキスト情報を制御する制御手段と、
前記通信装置内の各種機能部間を接続する内部バスで転送されるデータを解析する解析手段と、
を具備し、
前記制御手段は、前記解析手段で解析された結果に対応するコンテキスト情報を、前記通信手段がアクセスするキャッシュメモリへロードすることを特徴とする通信装置。
A communication device that performs communication based on a communication protocol,
Communication means for controlling communication based on a predetermined communication protocol;
Control means for controlling context information used for processing of the predetermined communication protocol;
Analyzing means for analyzing data transferred by an internal bus connecting various functional units in the communication device;
Comprising
The control unit loads the context information corresponding to the result analyzed by the analysis unit into a cache memory accessed by the communication unit.
前記制御手段は、前記通信手段または前記解析手段から送信されるロード要求に基づいて、前記コンテキスト情報を前記キャッシュメモリへロードすることを特徴とする請求項1に記載の通信装置。   2. The communication apparatus according to claim 1, wherein the control unit loads the context information into the cache memory based on a load request transmitted from the communication unit or the analysis unit. 前記解析手段は、前記データを解析してソケット情報を取得したタイミングで前記制御手段に対して前記ロード要求を送ることを特徴とする請求項2に記載の通信装置。   The communication apparatus according to claim 2, wherein the analysis unit sends the load request to the control unit at a timing when the socket information is acquired by analyzing the data. 前記制御手段は、前記通信手段から取得したソケット情報と、該制御手段が管理するソケット番号に基づいて前記コンテキスト情報を作成することを特徴とする請求項2または3に記載の通信装置。   4. The communication apparatus according to claim 2, wherein the control unit creates the context information based on socket information acquired from the communication unit and a socket number managed by the control unit. 前記制御手段は、前記作成されたコンテキスト情報を、前記ソケット情報と前記ソケット番号と未使用のキャッシュブロック番号に関連付けて管理することを特徴とする請求項4に記載の通信装置。   5. The communication apparatus according to claim 4, wherein the control unit manages the created context information in association with the socket information, the socket number, and an unused cache block number. 前記制御手段は、前記通信手段または前記解析手段から送信された前記ロード要求に基づき、前記通信手段または前記解析手段から取得したソケット情報に関連するソケット番号及びキャッシュブロック番号に対応するコンテキスト情報を前記キャッシュメモリへロードすることを特徴とする請求項5に記載の通信装置。   The control means, based on the load request transmitted from the communication means or the analysis means, the context information corresponding to the socket number and the cache block number related to the socket information acquired from the communication means or the analysis means, The communication device according to claim 5, wherein the communication device is loaded into a cache memory. 前記解析手段は、該通信装置によって受信されて主記憶部へ転送されるデータを解析することを特徴とする請求項1乃至6のいずれか1項に記載の通信装置。   The communication device according to claim 1, wherein the analysis unit analyzes data received by the communication device and transferred to a main storage unit. 暗号処理手段を更に備え、
前記解析手段は前記暗号処理手段によって暗号のデコード済みのデータを解析することを特徴とする請求項1乃至7のいずれか1項に記載の通信装置。
Further comprising cryptographic processing means,
The communication apparatus according to claim 1, wherein the analysis unit analyzes the decoded data of the encryption by the encryption processing unit.
通信プロトコルに基づいて通信を行う通信装置の制御方法であって、
所定の通信プロトコルに基づいて通信を制御する通信工程と、
前記所定の通信プロトコルの処理に用いるコンテキスト情報を制御する制御工程と、
前記通信装置内の各種機能部間を接続する内部バスで転送されるデータを解析する解析工程と、
を有し、
前記制御工程において、前記解析工程において解析された結果に対応するコンテキスト情報を、前記通信工程においてアクセスするキャッシュメモリへロードすることを特徴とする通信装置の制御方法。
A method for controlling a communication device that performs communication based on a communication protocol,
A communication process for controlling communication based on a predetermined communication protocol;
A control step of controlling context information used for processing of the predetermined communication protocol;
An analysis step of analyzing data transferred by an internal bus connecting the various functional units in the communication device;
Have
In the control step, context information corresponding to a result analyzed in the analysis step is loaded into a cache memory accessed in the communication step.
請求項9に記載された制御方法の各工程をコンピュータに実行させるためのプログラム。   The program for making a computer perform each process of the control method described in Claim 9.
JP2013024914A 2013-02-12 2013-02-12 Communication device Pending JP2014155120A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013024914A JP2014155120A (en) 2013-02-12 2013-02-12 Communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013024914A JP2014155120A (en) 2013-02-12 2013-02-12 Communication device

Publications (1)

Publication Number Publication Date
JP2014155120A true JP2014155120A (en) 2014-08-25

Family

ID=51576573

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013024914A Pending JP2014155120A (en) 2013-02-12 2013-02-12 Communication device

Country Status (1)

Country Link
JP (1) JP2014155120A (en)

Similar Documents

Publication Publication Date Title
JP5022691B2 (en) COMMUNICATION DEVICE, ITS CONTROL METHOD, AND PROGRAM
KR101084897B1 (en) Lightweight input/output protocol
US10353722B2 (en) System and method of offloading cryptography processing from a virtual machine to a management module
US7502925B2 (en) Method and apparatus for reducing TCP frame transmit latency
US12028378B2 (en) Secure communication session resumption in a service function chain preliminary class
WO2011096307A1 (en) Proxy device and operation method thereof
US11245589B2 (en) IoT topology analyzer defining an IoT topology and associated methods
JP5824257B2 (en) Image processing apparatus, control method thereof, and program
JP6319369B2 (en) PROCESS CONTROL DEVICE, PROCESS CONTROL METHOD, AND PROCESS CONTROL PROGRAM
JP5094482B2 (en) Processing apparatus and processing method thereof
US9961147B2 (en) Communication apparatus, information processor, communication method, and computer-readable storage medium
JP5028339B2 (en) Communication apparatus and control method
US20160261719A1 (en) Information processing system, control program, and control method
US20140189134A1 (en) System and Method for NAS Server Test Load Generation
JP2014155120A (en) Communication device
US7895344B2 (en) Method and apparatus for remote management
JP5967967B2 (en) Information processing apparatus and control method thereof
CN111031055B (en) IPsec acceleration device and implementation method
JP2013089190A (en) Data transfer apparatus, data transfer method, and program
US11943367B1 (en) Generic cryptography wrapper
US20240152502A1 (en) Data authentication and validation across multiple sources, interfaces, and networks
JP2017017587A (en) Router device, connection establishment method, communication system and communication terminal
JP6228370B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM
JP2023535277A (en) Packet transfer method, device, network node and storage medium
JP2011015042A (en) Encryption communication device, encryption communication method, and program