JP2008219252A - Network communication system, and application notifying method and program - Google Patents

Network communication system, and application notifying method and program Download PDF

Info

Publication number
JP2008219252A
JP2008219252A JP2007051411A JP2007051411A JP2008219252A JP 2008219252 A JP2008219252 A JP 2008219252A JP 2007051411 A JP2007051411 A JP 2007051411A JP 2007051411 A JP2007051411 A JP 2007051411A JP 2008219252 A JP2008219252 A JP 2008219252A
Authority
JP
Japan
Prior art keywords
pattern
message stream
unit
detection
network interface
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
JP2007051411A
Other languages
Japanese (ja)
Inventor
Masato Yasuda
真人 安田
Kenshin Yamada
憲晋 山田
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2007051411A priority Critical patent/JP2008219252A/en
Publication of JP2008219252A publication Critical patent/JP2008219252A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Communication Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a network communication system capable of reducing a load of a CPU because an application side is not required to retrieve a command boundary. <P>SOLUTION: An application processing server 1 has the CPU 3 and a network interface card 2 for receiving a packet transmitted from an opposite host, reconstructing a message stream on the basis of the received packet and writing the reconstructed message stream in a main storing part 5. An application operating on the CPU 3 interprets the message stream written in the main storing part 5 as a command and executes communication processing with the opposite host. When there is a pattern adaptable to a pattern for detection which is preregistered in the reconstructed message stream, the network interface card 2 determines the adaptable pattern as a break of the command and writes the reconstructed message stream in the main storing part 5 in each command. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、TCP(Transmission Control Protocol)に代表される、パケットの再送やメッセージのリアセンブル(再構築)処理に対応したプロトコルの上位層で、SOAP(Simple Object Access Protocol)、SMTP(Simple Mail Transfer Protocol)、SIP(Session Initiation Protocol)といった、メッセージベースのアプリケーションプロトコルを用いて通信を行うネットワーク通信システムに関する。より具体的には、本発明は、ネットワーク通信システム上のネットワークインタフェースカードで対向ホストよりパケットを受信し、受信パケットから再構築されたメッセージストリームをネットワーク通信システム上のアプリケーションへ通知する方式に関し、特に、再構築後のメッセージストリームを主記憶メモリへ書き込み及び複製する際のアクセス方式に関する。   The present invention is an upper layer of a protocol corresponding to packet retransmission and message reassembly (reconstruction) processing, represented by TCP (Transmission Control Protocol), and includes SOAP (Simple Object Access Protocol) and SMTP (Simple Mail Transfer). The present invention relates to a network communication system that performs communication using a message-based application protocol such as SIP (Session Initiation Protocol). More specifically, the present invention relates to a method of receiving a packet from an opposite host by a network interface card on a network communication system and notifying an application on the network communication system of a message stream reconstructed from the received packet. The present invention relates to an access method for writing and copying a reconstructed message stream to a main memory.

従来、TCPに代表される、対向ホストまで到達されるまでに廃棄されたパケットの再送処理や、受信パケットのデータシーケンス番号情報を元にメッセージストリームの再構築を行うプロトコルを基盤として、上位層で、SOAP、SIP、SMTPなどのアプリケーションプロトコルを使用する通信システムが提供されているが、その多くは、ネットワークインタフェースカードとCPU(Central Processing Unit)と主記憶メモリとから構成されたサーバ装置である。   Conventionally, based on a protocol such as TCP that resends packets that are discarded until they reach the opposite host, and a protocol that reconstructs the message stream based on the data sequence number information of the received packet. Communication systems using application protocols such as SOAP, SIP, and SMTP are provided. Most of the communication systems are server devices including a network interface card, a CPU (Central Processing Unit), and a main memory.

ネットワークインタフェースカードは、パケットを受信する毎に、受信したパケットを主記憶メモリに書き込み、CPU上で動作するOS(Operating System)に対して、書き込んだパケットに関する情報を通知する。OSは、受信したパケットのシーケンス番号の情報からメッセージストリームの再構築を行い、ソケットバッファに格納する。   Each time a network interface card receives a packet, the network interface card writes the received packet into the main memory and notifies an OS (Operating System) operating on the CPU of information related to the written packet. The OS reconstructs the message stream from the received packet sequence number information and stores it in the socket buffer.

アプリケーションは、read()システムコールを発行することにより、ソケットバッファからアプリケーションのユーザ領域にデータを読み出してプロトコル処理を行う。POSIXというUNIXのシステムコールの規定によれば、read()システムコールは、以下の引数からなる。   By issuing a read () system call, the application reads data from the socket buffer to the user area of the application and performs protocol processing. According to the POSIX UNIX system call convention, the read () system call consists of the following arguments:

(返り値:実際に読み出した長さ) = read(ファイルディスクリプタ, 取得データの先頭アドレスのポインタ, 要求するデータの長さ)
TCPセッションの確立後にread()システムコールを発行することで、OSは、そのread()システムコールに応じて、read()システムコールで要求されるデータの長さ分までのデータをソケットバッファ中から読み出してアプリケーションのユーザ領域のポインタで示されたアドレスに書き込み、ソケットバッファから読み出した長さを返り値としてアプリケーションに渡す。
(Return value: Actual read length) = read (file descriptor, pointer to the start address of the acquired data, requested data length)
By issuing a read () system call after establishing a TCP session, the OS stores data up to the length of the data requested by the read () system call in the socket buffer in response to the read () system call. Is read and written to the address indicated by the pointer in the user area of the application, and the length read from the socket buffer is passed to the application as a return value.

また、多くのネットワークインタフェースカードは、パケットを受信したタイミングで主記憶メモリへの書き込みを実施し、TCPのメッセージストリームの再構築処理及びTCPの応答処理と言ったプロトコル処理は、CPU上で動作するOSに任せる。この場合、CPUは、TCP処理及び上位層処理の両方を行う必要があるため、上位層のアプリケーション処理を行うための十分なCPUリソースが割り当てられない場合がある。   In addition, many network interface cards perform writing to the main memory at the timing of receiving a packet, and protocol processing such as TCP message stream reconstruction processing and TCP response processing operates on the CPU. Leave it to the OS. In this case, since the CPU needs to perform both TCP processing and upper layer processing, sufficient CPU resources for performing upper layer application processing may not be allocated.

また、ネットワークインタフェースカードが、パケットを受信したタイミングで主記憶メモリに書き出す場合、主記憶メモリにおけるメモリアクセス遅延が大きいため、メモリアクセスの回数を削減することが要求される。   Further, when the network interface card writes the packet to the main memory at the timing of receiving the packet, the memory access delay in the main memory is large, so that it is required to reduce the number of memory accesses.

CPU負荷及びメモリアクセスの問題を解決するために、TCP ChimneyのようなTOE(TCP Offload Engine)アーキテクチャでは、受信したTCPパケットをネットワークインタフェースカード上でメッセージストリームの形に再構築し、再構築したメッセージストリームをソケットバッファに書き込む形式を採用している。これにより、TCP処理のCPU負荷及び主記憶メモリへのアクセス回数を削減し、性能向上を図っている。   In order to solve the problems of CPU load and memory access, in the TOE (TCP Offload Engine) architecture such as TCP Chimney, the received TCP packet is reconstructed in the form of a message stream on the network interface card, and the reconstructed message is reconstructed. The format that writes the stream to the socket buffer is adopted. As a result, the CPU load for TCP processing and the number of accesses to the main memory are reduced to improve performance.

TCP Chimneyでは、以下の3条件のいずれかが満たされれば、上位層にメッセージストリームを渡して完了通知を送る(非特許文献1参照)。   In TCP Chimney, if any of the following three conditions is satisfied, a message stream is passed to the upper layer and a completion notification is sent (see Non-Patent Document 1).

(1)PSHフラグ付きのパケットを受信
(2)受信バッファが一杯
(3)タイムアウト(200msec)発生
しかし、これらの転送条件は、上位層であるアプリケーション層が必要とするコマンド区切りを考慮していない。そのため、アプリケーションは、read()システムコールによりメッセージストリームをソケットバッファから読み込んだ後、アプリケーションのコマンド区切りを検索する必要がある。文字列検索は、アプリケーション処理において負荷が大きいため、文字列検索負荷の軽減が求められる。
" Scalable Networking: Network Protocol Offload-Introducing TCP Chimney "、Microsoft Corporation 、WinHEC 2004 Version - April 9, 2004(Page 19、"Receive Completions"参照)
(1) Receive packet with PSH flag (2) Receive buffer is full (3) Timeout (200msec) occurs However, these transfer conditions do not take into account the command delimiter required by the upper application layer . Therefore, the application needs to search the command delimiter of the application after reading the message stream from the socket buffer by the read () system call. Since character string search has a heavy load in application processing, reduction of the character string search load is required.
"Scalable Networking: Network Protocol Offload-Introducing TCP Chimney", Microsoft Corporation, WinHEC 2004 Version-April 9, 2004 (see page 19, "Receive Completions")

ネットワークインタフェースカードが受信パケットからメッセージストリームを再構築してアプリケーション側に通知する従来の方式においては、アプリケーションに通知されるメッセージストリームの通知単位は、アプリケーションが必要とするコマンド境界が考慮されていないために、アプリケーション側でコマンド境界を検索するための文字列検索処理を行う必要があり、その分、CPUへの負荷が増大する。   In the conventional method in which the network interface card reconstructs the message stream from the received packet and notifies the application side, the command boundary required by the application is not considered in the notification unit of the message stream notified to the application In addition, it is necessary to perform a character string search process for searching the command boundary on the application side, which increases the load on the CPU.

本発明の目的は、上記の問題を解決し、アプリケーション側がコマンド境界を検索する必要が無く、CPUへの負荷を軽減することのできるネットワーク通信システムを提供することにある。   An object of the present invention is to provide a network communication system that solves the above-described problems and does not require an application side to search for command boundaries and can reduce the load on the CPU.

上記目的を達成するため、本発明のネットワーク通信システムは、
主記憶部と、
対向ホストから送出されたパケットを受信し、該受信パケットに基づいてメッセージストリームを再構築し、該再構築したメッセージストリームを前記主記憶部に書き込むネットワークインタフェース部と、
前記主記憶部に書き込まれたメッセージストリームをコマンドとして解釈して前記対向ホストとの通信処理を実行するアプリケーション実行部と、を有し、
前記ネットワークインタフェース部は、前記再構築したメッセージストリーム中に予め登録された検知用パターンに適合するパターンがある場合に、該適合パターンを前記コマンドの区切りと判断して、前記再構築したメッセージストリームを前記コマンド毎に前記主記憶部に書き込むことを特徴とする。
In order to achieve the above object, the network communication system of the present invention provides:
A main memory unit;
A network interface unit that receives a packet sent from the opposite host, reconstructs a message stream based on the received packet, and writes the reconstructed message stream in the main storage unit;
An application execution unit that interprets the message stream written in the main storage unit as a command and executes communication processing with the opposite host;
When there is a pattern that matches a detection pattern registered in advance in the reconstructed message stream, the network interface unit determines that the conformance pattern is a delimiter of the command, and determines the reconstructed message stream as Each command is written to the main storage unit.

上記の構成によれば、ネットワークインタフェース部は、再構築したメッセージストリームをアプリケーション実行部が必要とするコマンド毎に主記憶部に書き込み、アプリケーション実行部は、主記憶部から、コマンド毎にメッセージストリームを読み出す。このように、再構築したメッセージストリームのアプリケーションへの通知単位は、アプリケーションが必要とするコマンド単位で行われる。よって、アプリケーション側でコマンド境界を検索するための文字列検索処理を行う必要はない。   According to the above configuration, the network interface unit writes the reconstructed message stream to the main storage unit for each command required by the application execution unit, and the application execution unit generates a message stream for each command from the main storage unit. read out. As described above, the notification unit of the reconstructed message stream to the application is performed in units of commands required by the application. Therefore, it is not necessary to perform a character string search process for searching for command boundaries on the application side.

本発明によれば、アプリケーション側でアプリケーションプロトコルのコマンド境界を探索する必要が無いので、その分、CPUの負荷を軽減することができ、高速にプロトコル処理を行う事が出来る。   According to the present invention, it is not necessary to search for an application protocol command boundary on the application side, and accordingly, the load on the CPU can be reduced, and protocol processing can be performed at high speed.

次に、本発明の実施の形態について図面を参照して説明する。   Next, embodiments of the present invention will be described with reference to the drawings.

(第1の実施形態)
図1は、本発明の第1の実施形態であるアプリケーション処理サーバの構成を示すブロック図である。通信プロトコルとしては、トランスポート層において、TCP(Transmission Control Protocol)を想定しており、上位層においては、SOAP(Simple Object Access Protocol)やSMTP(Simple Mail Transfer Protocol)、SIP(Session Initiation Protocol)などのテキストベースのアプリケーションプロトコルを想定している。
(First embodiment)
FIG. 1 is a block diagram showing a configuration of an application processing server according to the first embodiment of the present invention. As a communication protocol, TCP (Transmission Control Protocol) is assumed in the transport layer, and in a higher layer, SOAP (Simple Object Access Protocol), SMTP (Simple Mail Transfer Protocol), SIP (Session Initiation Protocol), etc. Assume a text-based application protocol.

図1を参照すると、アプリケーション処理サーバ1は、ネットワーク通信システムまたは監視システムを構成するものであって、対向ネットワーク10を通じた対向ホストからのパケット受信処理及びプロトコル処理を行うネットワークインタフェースカード2と、アプリケーションやOS(Operating System)が動作するCPU(中央演算部)3と、NorthBridgeチップに相当し、CPU3とネットワークインタフェースカード2の主記憶部5に対する読み書きの処理の調停を行うアクセス調停部4と、パケットデータやアプリケーションデータ(プログラムを含む)が格納される主記憶部5と、を有する。   Referring to FIG. 1, an application processing server 1 constitutes a network communication system or a monitoring system, and includes a network interface card 2 that performs packet reception processing and protocol processing from the opposite host through the opposite network 10, and an application. A CPU (central processing unit) 3 on which an operating system (OS) and an OS (Operating System) operate, an access arbitration unit 4 that arbitrates read / write processing with respect to the CPU 3 and the main storage unit 5 of the network interface card 2, and a packet A main storage unit 5 in which data and application data (including programs) are stored.

ネットワークインタフェースカード2は、ネットワークインタフェース部であって、受信したTCPデータのセッション解決、シーケンス番号の整合性チェック、応答ACKパケットの送出(通信システムの場合)といったTOE(TCP Offload Engine)としてのプロトコル処理を行ったり、受信TCPパケットからメッセージストリームの再構築を行い、主記憶部5にデータを保存したりする機能を有する。   The network interface card 2 is a network interface unit, and performs protocol processing as a TOE (TCP Offload Engine) such as session resolution of received TCP data, sequence number consistency check, and response ACK packet transmission (in the case of a communication system). Or reconstructing the message stream from the received TCP packet and storing the data in the main storage unit 5.

ネットワークインタフェースカード2は、受信パケットの正常性チェックとプロトコル処理を行うパケット受信部21と、受信TCPパケットからメッセージストリームの再構築処理を行うメッセージ再構築部22と、再構築されたメッセージストリームを格納する受信メッセージ保持部23と、メッセージストリームからアプリケーションが必要とするパターンを検知するパターン検知部24とから構成される。検知用パターンは予め登録されており、アプリケーションプログラムによって、対向ホストとの通信時にその登録された検知用パターンがパターン検知部24に通知される。パターン検知部24は、その通知された検知用パターンを記憶する。検知用パターンは、開始パターン及び終了パターンを含む。   The network interface card 2 stores a packet reception unit 21 that performs normality check of received packets and protocol processing, a message reconstruction unit 22 that performs message stream reconstruction processing from received TCP packets, and a reconstructed message stream The received message holding unit 23 and the pattern detection unit 24 that detects a pattern required by the application from the message stream. The detection pattern is registered in advance, and the registered detection pattern is notified to the pattern detection unit 24 during communication with the opposite host by the application program. The pattern detection unit 24 stores the notified detection pattern. The detection pattern includes a start pattern and an end pattern.

主記憶部5は、DDR(Double Data Rate)メモリに代表されるメインメモリであって、より具体的には、DDR DIMM(Dual In-line Memory Module)などにより構成される。主記憶部5は、ネットワークインタフェースコマンド受信部51と、プロトコル処理用データ記憶部52と、アプリケーションユーザ用データ記憶部53とから構成される。   The main memory unit 5 is a main memory represented by a DDR (Double Data Rate) memory, and more specifically is configured by a DDR DIMM (Dual In-line Memory Module) or the like. The main storage unit 5 includes a network interface command receiving unit 51, a protocol processing data storage unit 52, and an application user data storage unit 53.

ネットワークインタフェースコマンド受信部51は、ネットワークインタフェースカード2から受信したメッセージストリームの情報を管理する。ネットワークインタフェースカード2は、メッセージストリームをプロトコル処理用データ記憶部51に書き込んだ後に、送信完了したメッセージストリームに関しての情報をネットワークインタフェースコマンド受信部51に書き込む。   The network interface command receiving unit 51 manages message stream information received from the network interface card 2. The network interface card 2 writes the message stream to the protocol processing data storage unit 51 and then writes information about the message stream that has been transmitted to the network interface command reception unit 51.

プロトコル処理用データ記憶部52は、OSでいうところのソケットバッファに相当する。プロトコル処理用データ記憶部52は、アプリケーションから直接参照することが出来ず、アプリケーション側が発行したread()システムコールに応じてデータをアプリケーションユーザ用データ記憶部53へコピーする。   The protocol processing data storage unit 52 corresponds to a socket buffer in terms of OS. The protocol processing data storage unit 52 cannot be directly referenced from the application, and copies data to the application user data storage unit 53 in response to a read () system call issued by the application.

次に、プリケーション処理サーバ1の動作について説明する。   Next, the operation of the application processing server 1 will be described.

図2および図3は、ネットワークインタフェースカード2の動作を説明するためのフローチャートである。便宜上、動作の流れを図2および図3の2つに分けているが、これらの動作は一連の動作である。以下、図1から図3を参照してネットワークインタフェースカード2の動作を説明する。   2 and 3 are flowcharts for explaining the operation of the network interface card 2. For convenience, the flow of the operation is divided into two in FIGS. 2 and 3, but these operations are a series of operations. The operation of the network interface card 2 will be described below with reference to FIGS.

対向ネットワーク10からTCPパケットを受信すると(図2のステップA1)、パケット受信部21が、TCPパケットのプロトコルの整合性(TCPのフィールドの整合性)をチェックし(図2のステップA2)、TCPパケット情報からTCPのフロー情報を識別する(図2のステップA3)。さらに、パケット受信部21は、シーケンス番号を参照して、TCPパケットの到着順序がIn-Order(対向ホストから送信された順序で受信される)なのか、Out-of-Order(対向ホストから送信された時とは違う順序で受信される)なのかを判定する(図2のステップA4)。なお、プリケーション処理サーバ1がTCPデータを終端する通信装置である場合は、ネットワークインタフェースカード2は、ACKパケットの送出処理などを行う。   When a TCP packet is received from the opposite network 10 (step A1 in FIG. 2), the packet receiving unit 21 checks the protocol consistency of the TCP packet (TCP field consistency) (step A2 in FIG. 2), and TCP TCP flow information is identified from the packet information (step A3 in FIG. 2). Further, the packet receiving unit 21 refers to the sequence number and determines whether the arrival order of the TCP packets is In-Order (received in the order transmitted from the opposite host) or Out-of-Order (transmitted from the opposite host). (Step A4 in FIG. 2). When the application processing server 1 is a communication device that terminates TCP data, the network interface card 2 performs an ACK packet transmission process or the like.

TCPパケットのプロトコル処理後、メッセージ再構築部22は、受信したTCPパケットのシーケンス情報に基づいて、TCPパケットからメッセージストリームを再構築する(図2のステップA5)。そして、メッセージ再構築部22は、その再構築したメッセージストリームを受信メッセージ保持部23に書き込む(図2のステップA6)。   After the protocol processing of the TCP packet, the message reconstruction unit 22 reconstructs a message stream from the TCP packet based on the received sequence information of the TCP packet (step A5 in FIG. 2). Then, the message reconstructing unit 22 writes the reconstructed message stream in the received message holding unit 23 (step A6 in FIG. 2).

メッセージストリームが受信メッセージ保持部23に書き込まれた後、ネットワークインタフェースカード2では、アプリケーションからパターン検知部24に検知用のパターンが登録されているかのチェックが行われる(図3のステップA7)。検知用のパターンとしては、アプリケーションが必要とするデータの開始パターン、終了パターンの2種のパターンがある。開始パターンおよび終了パターンは、TCPのソケット確立時に、ソケットオプションを登録するsetsockopt()システムコール等のソケットパラメータ登録用関数を用いて登録される。これらパターンは、いくつかの文字列を予め定められた1つの形式で表現する正規表現で登録可能である。   After the message stream is written in the received message holding unit 23, the network interface card 2 checks whether a detection pattern is registered in the pattern detection unit 24 from the application (step A7 in FIG. 3). There are two types of detection patterns: a data start pattern and an end pattern required by the application. The start pattern and end pattern are registered using a socket parameter registration function such as a setsockopt () system call for registering socket options when a TCP socket is established. These patterns can be registered as regular expressions that represent several character strings in one predetermined format.

パターン検知部24は、正規表現パターン検索ロジックで構成されており、入力メッセージストリームに対して登録されたパターンが存在するか否かを判定する検索処理を実行する。検索中のメッセージストリームが開始パターンに適合していると判定した場合は、内部パラーメータであるパターン適合中フラグがONとなる。パターン適合中フラグの初期値はOFFとする。   The pattern detection unit 24 includes regular expression pattern search logic, and executes a search process for determining whether or not a registered pattern exists for the input message stream. If it is determined that the message stream being searched is compatible with the start pattern, the pattern matching flag which is an internal parameter is turned ON. The initial value of the pattern matching flag is OFF.

ステップA7で、検知用のパターンが登録されていると判断された場合は、パターン検知部24は、パターン適合中フラグがONであるか否かを調べる(図3のステップA8)。ステップA7で、検知用のパターンがまだ登録されていないと判断された場合は、図3のA16のステップに移行する。   If it is determined in step A7 that the detection pattern is registered, the pattern detection unit 24 checks whether the pattern matching flag is ON (step A8 in FIG. 3). If it is determined in step A7 that the detection pattern has not yet been registered, the process proceeds to step A16 in FIG.

ステップA8で、パターン適合中フラグがOFFであると判断された場合は、パターン検知部24は、まず、登録されている開始パターンについて、メッセージストリームを検索する(図3のA9)。メッセージストリーム中に開始パターンが見つかった場合は、パターン検知部24は、パターン適合中フラグをONとする(図3のA11)。その後、図3のA12のステップに移行する。メッセージストリーム中に開始パターンが見つからなかった場合は、図3のA15のステップに進む。   If it is determined in step A8 that the pattern matching flag is OFF, the pattern detection unit 24 first searches the message stream for the registered start pattern (A9 in FIG. 3). When the start pattern is found in the message stream, the pattern detection unit 24 turns on the pattern matching flag (A11 in FIG. 3). Thereafter, the process proceeds to step A12 in FIG. If the start pattern is not found in the message stream, the process proceeds to step A15 in FIG.

ステップA8で、パターン適合中フラグがONであると判断された場合は、受信メッセージ保持部23に登録されているメッセージストリームもしくは、過去のメッセージストリームにおいて、開始パターンが見つかったことを示す。   If it is determined in step A8 that the pattern matching flag is ON, it indicates that a start pattern has been found in the message stream registered in the received message holding unit 23 or in the past message stream.

ステップA8で、パターン適合中フラグがONであると判断された場合、または、ステップA11でパターン適合中フラグがONであると判断された場合は、パターン検知部24は、登録されている終了パターンについて、メッセージストリームを検索する(図3のステップA12)。終了パターンが見つかった場合は、パターン検知部24は、アプリケーションデータとして、開始パターンから終了パターンまでのメッセージストリームを、受信メッセージ保持部23からプロトコル処理用データ記憶部52へ転送させ、同時にパターン適合中フラグをOFFとする(図3のステップA14)。   If it is determined in step A8 that the pattern matching flag is ON, or if it is determined in step A11 that the pattern matching flag is ON, the pattern detection unit 24 registers the end pattern registered. The message stream is searched for (step A12 in FIG. 3). When the end pattern is found, the pattern detection unit 24 transfers the message stream from the start pattern to the end pattern as application data from the received message holding unit 23 to the protocol processing data storage unit 52, and at the same time the pattern is being matched. The flag is turned OFF (step A14 in FIG. 3).

ここで、注意点として、開始パターンと終了パターンの双方が、受信メッセージ保持部23に格納されているメッセージストリームの内部に存在する場合で、メッセージストリームをアプリケーションメッセージとして転送する場合は、ストリームの順序として、開始パターンが終了パターンよりも前に位置しなければならない。また、パターン適合中フラグがONであり、メッセージストリームの内部に終了パターンのみが存在する場合は、受信メッセージ保持部23に格納されている受信メッセージストリームの先頭から終了パターンまでの領域をプロトコル処理用データ記憶部52に転送する。   Here, it should be noted that when both the start pattern and the end pattern are present in the message stream stored in the received message holding unit 23 and the message stream is transferred as an application message, the order of the streams As a result, the start pattern must be positioned before the end pattern. If the pattern matching flag is ON and only the end pattern exists in the message stream, the area from the beginning of the received message stream to the end pattern stored in the received message holding unit 23 is used for protocol processing. The data is transferred to the data storage unit 52.

メッセージストリーム転送後、パターン検知部24は、転送したメッセージストリームについての情報(コマンド)を主記憶部5上のネットワークインタフェースコマンド受信部51に書き込む(図3のステップA15)。その後、データ受信処理に戻る。   After transferring the message stream, the pattern detection unit 24 writes information (command) about the transferred message stream to the network interface command reception unit 51 on the main storage unit 5 (step A15 in FIG. 3). Thereafter, the process returns to the data reception process.

ステップA7、A10、A13のいずれかの判定で「No」となった場合は、ネットワークインタフェースカード2では、以下の3つの条件C1〜C3のいずれかを満たすか否かの判定が行われる(図3のA16)。   When the determination in any of steps A7, A10, and A13 is “No”, the network interface card 2 determines whether or not any of the following three conditions C1 to C3 is satisfied (FIG. 3 A16).

C1:受信パケットのPSHフラグがON
C2:受信バッファがFULLの状態
C3:タイムアウト(200msec)発生
条件C1〜C3のいずれかを満たす場合は、受信バッファ(受信メッセージ保持部23)に存在するメッセージストリームをプロトコル処理用データ記憶部52に転送し(図3のステップA17)、転送したメッセージストリームに関する情報(コマンド)をネットワークインタフェースコマンド受信部51に書き込む(図3のステップA18)。その後、データ受信処理に戻る。
C1: PSH flag of received packet is ON
C2: Receive buffer is in full state C3: Time-out (200 msec) occurs When any of the conditions C1 to C3 is satisfied, the message stream existing in the receive buffer (received message holding unit 23) is stored in the protocol processing data storage unit 52. The information (command) related to the transferred message stream is written in the network interface command receiving unit 51 (step A18 in FIG. 3). Thereafter, the process returns to the data reception process.

条件C1〜C3のいずれも満たさない場合は、次のパケット処理を行うため、データ受信処理に戻る。   If none of the conditions C1 to C3 is satisfied, the process returns to the data reception process to perform the next packet process.

次に、CPU3の動作を説明する。図4に、CPU3の動作フローを示す。以下、図1、図4を参照して動作説明を行う。   Next, the operation of the CPU 3 will be described. FIG. 4 shows an operation flow of the CPU 3. The operation will be described below with reference to FIGS.

OS及びアプリケーションはCPU3上で動作しており、主記憶部5をOS及びアプリケーションの実行領域及びデータ領域として使用する。OSは、プロトコル処理を行うが、その際、ソケットバッファとしてプロトコル処理用データ記憶部52を使用する。アプリケーションは、アプリケーション用ユーザ領域としてアプリケーションユーザ用データ記憶部53を使用する。OSによる書き込み保護のため、アプリケーションは、ソケットバッファに相当するプロトコル処理用データ記憶部52を参照することが出来ない。これは、Linux、BSDを初めとする汎用OSの制限となっている。   The OS and application operate on the CPU 3 and use the main storage unit 5 as an execution area and data area for the OS and application. The OS performs protocol processing. At this time, the protocol processing data storage unit 52 is used as a socket buffer. The application uses the application user data storage unit 53 as an application user area. Due to the write protection by the OS, the application cannot refer to the protocol processing data storage unit 52 corresponding to the socket buffer. This is a limitation of general-purpose OSs such as Linux and BSD.

図4において、太枠で示されたステップB1、B2、B7がアプリケーション側の処理、細枠で示されたステップB3〜B6がOS側の処理である。   In FIG. 4, steps B1, B2, and B7 indicated by thick frames are processing on the application side, and steps B3 to B6 indicated by thin frames are processing on the OS side.

アプリケーションは、まず、アプリケーションがプロトコル処理に必要とするコマンドについてsetsockopt()システムコールもしくは、独自関数を用いて、アプリケーションコマンドの開始を示すパターン及び、終了を示すパターンを登録する(図4のステップB1)。登録されたパターンは、ネットワークインタフェースカード2のパターン検知部24に登録される。その後、アプリケーションは、OSからのプロトコルデータを取得するため、read()システムコールを発行し、OSからのデータ待ちの状態(待機状態)となる(図4のステップB2)。   First, the application registers a pattern indicating the start and end of an application command by using the setsockopt () system call or a unique function for a command required by the application for protocol processing (step B1 in FIG. 4). ). The registered pattern is registered in the pattern detection unit 24 of the network interface card 2. Thereafter, the application issues a read () system call in order to acquire protocol data from the OS, and enters a state of waiting for data from the OS (standby state) (step B2 in FIG. 4).

OSは、主記憶部5上のネットワークインタフェースコマンド受信部51を参照し(図4のステップB3)、ネットワークインタフェースカード2がプロトコル処理用データ記憶部52に転送したメッセージストリームに関する情報(コマンド)が到着したか否かを判断する(図4のステップB4)。このコマンドの到着により、メッセージストリームがプロトコル処理用データ記憶部52に転送されたと判断することができる。OSは、コマンドが到着するまで待機する。   The OS refers to the network interface command receiving unit 51 on the main storage unit 5 (step B3 in FIG. 4), and information (command) related to the message stream transferred from the network interface card 2 to the protocol processing data storage unit 52 arrives. It is determined whether or not (Step B4 in FIG. 4). With the arrival of this command, it can be determined that the message stream has been transferred to the protocol processing data storage unit 52. The OS waits until a command arrives.

コマンドが到着すると、OSは、ネットワークインタフェースカード2からプロトコル処理用データ記憶部52に転送されたメッセージストリームの領域をアプリケーションユーザ用データ記憶部53にコピーし(図4のステップB5)、その旨をアプリケーションに通知する(図4のステップB6)。   When the command arrives, the OS copies the message stream area transferred from the network interface card 2 to the protocol processing data storage unit 52 to the application user data storage unit 53 (step B5 in FIG. 4). The application is notified (step B6 in FIG. 4).

通知を受けたアプリケーションは、read()システムコールを終了する(図4のステップB7)。アプリケーションは、OSからの通知を受けて、read()システムコールにより得られたデータを使用することができる。その後、次のパケット処理を行うために、CPU処理に戻る。   The application that has received the notification ends the read () system call (step B7 in FIG. 4). The application can use the data obtained by the read () system call in response to the notification from the OS. Thereafter, the processing returns to the CPU processing in order to perform the next packet processing.

従来は、上位層のアプリケーションにメッセージストリームを転送する際に、上位層であるアプリケーション層が必要とするコマンド区切りを考慮していないため、アプリケーションはread()システムコールによりメッセージストリームをソケットバッファから読み込んだ後、アプリケーションのコマンド区切りを検索する必要があった。これに対して、本実施形態によれば、予めアプリケーションの処理単位のパターンを登録しておくことで、ネットワークインタフェースカードがアプリケーションの処理単位のデータを受信した時点でアプリケーションに通知するため、アプリケーション側は、コマンド区切り毎にデータを受信することになる。よって、アプリケーションが処理単位のコマンド区切りを検索する必要がなくなり、その分、CPUの負荷が軽減され、高速にプロトコル処理を行う事が出来る。特に、複数クライアントからのアプリケーション処理を受け付ける、SIP、SOAPサーバに本実施形態のサーバを適用した場合に、CPUの負荷軽減およびプロトコル処理の高速化について大きな効果が得られる。   Conventionally, when transferring a message stream to an upper layer application, the command delimiter required by the upper layer application layer is not considered, so the application reads the message stream from the socket buffer using the read () system call. Later, it was necessary to search the command delimiter of the application. On the other hand, according to the present embodiment, by registering the pattern of the processing unit of the application in advance, the network interface card notifies the application when the data of the processing unit of the application is received. Will receive data at each command break. Therefore, it becomes unnecessary for the application to search for a command delimiter for each processing unit, the CPU load is reduced correspondingly, and protocol processing can be performed at high speed. In particular, when the server of this embodiment is applied to an SIP or SOAP server that accepts application processing from a plurality of clients, a great effect can be obtained in reducing the load on the CPU and speeding up the protocol processing.

(第2の実施形態)
電子メールで一般的に使用されているSMTPといったアプリケーションプロトコル処理を行う場合、SMTPコマンドの一単位は必ず改行コード(<CR>+<LF>)で区切られる。つまり、SMTP処理に関しては、コマンド終了パターンは、必ず改行コードのパターンになる。ここでは、SMTP処理の様な改行毎にコマンド処理を実行するシステムに最適な実施形態について述べる。
(Second Embodiment)
When performing application protocol processing such as SMTP generally used in electronic mail, a unit of the SMTP command is always delimited by a line feed code (<CR> + <LF>). That is, for SMTP processing, the command end pattern is always a line feed code pattern. Here, an embodiment optimal for a system that executes command processing for each line feed such as SMTP processing will be described.

本発明の第2の実施形態であるアプリケーション処理サーバの基本構成は、図1に示した構成と同様であるので、各部の詳細な説明は省略する。但し、アプリケーションに登録されている検知用パターンは、改行コードのみとする。検知用パターンが一種類だけの場合、メッセージストリーム中に検知用パターンにマッチするパターンが見つかる度に上位層に通知するものとする。   Since the basic configuration of the application processing server according to the second embodiment of the present invention is the same as the configuration shown in FIG. 1, detailed description of each part is omitted. However, the detection pattern registered in the application is only a line feed code. When there is only one type of detection pattern, the upper layer is notified whenever a pattern matching the detection pattern is found in the message stream.

対向ホストからデータを受信してからそのデータを受信メッセージ保持部23に書き込むまでの処理は図2に示したフローのとおりであるが、ステップA7以降の処理が、第1の実施形態のものと異なる。図5に、本実施形態のアプリケーション処理サーバの動作フローを示す。以下、図1および図5を参照して、動作説明を行う。   The processing from receiving data from the opposite host to writing the data in the received message holding unit 23 is as shown in the flow of FIG. 2, but the processing after step A7 is the same as that of the first embodiment. Different. FIG. 5 shows an operation flow of the application processing server of this embodiment. The operation will be described below with reference to FIGS.

ステップA7にて、ネットワークインタフェースカード2において、改行コード(<CR>+<LF>)が検知用パターンとしてパターン検知部24に登録されているか否かの判断が行われる。改行コードが登録されていない場合は、図5のA12−1のステップに移行する。   In step A7, it is determined whether or not the line feed code (<CR> + <LF>) is registered in the pattern detection unit 24 as a detection pattern in the network interface card 2. When the line feed code is not registered, the process proceeds to step A12-1 in FIG.

改行コードが登録されている場合は、パターン検知部24が、改行コードについて、受信メッセージ保持部23に保持されているメッセージストリームを検索し(図5のステップA8−1)、改行コードが見つかったか否かの判断を行う(図5のステップA9−1)。   When the line feed code is registered, the pattern detection unit 24 searches the message stream held in the received message holding unit 23 for the line feed code (step A8-1 in FIG. 5), and whether the line feed code is found. It is determined whether or not (step A9-1 in FIG. 5).

改行コードが見つかった場合、パターン検知部24は、受信メッセージ保持部23に保持されているメッセージストリームの先頭から改行コードまでのメッセージをプロトコル処理用データ記憶部52に転送させる(図5のステップA10−1)。メッセージストリーム転送後、パターン検知部24は、転送したメッセージストリームについての情報(コマンド)を主記憶部5上のネットワークインタフェースコマンド受信部51に書き込む(図5のステップA11−1)。その後、データ受信処理に戻る。   When a line feed code is found, the pattern detection unit 24 transfers the message from the beginning of the message stream held in the received message holding unit 23 to the line feed code to the protocol processing data storage unit 52 (step A10 in FIG. 5). -1). After transferring the message stream, the pattern detection unit 24 writes information (command) about the transferred message stream into the network interface command reception unit 51 on the main storage unit 5 (step A11-1 in FIG. 5). Thereafter, the process returns to the data reception process.

ステップA7、A9−1のいずれかの判定で「No」となった場合は、ネットワークインタフェースカード2では、上述の条件C1〜C3のいずれかを満たすか否かの判定が行われる(図5のA12−1)。   If “No” is determined in any of the determinations in steps A7 and A9-1, the network interface card 2 determines whether or not any of the above-described conditions C1 to C3 is satisfied (FIG. 5). A12-1).

条件C1〜C3のいずれかを満たす場合は、受信バッファ(受信メッセージ保持部23)に存在するメッセージストリームをプロトコル処理用データ記憶部52に転送し(図5のステップA13−1)、転送したメッセージストリームに関する情報(コマンド)をネットワークインタフェースコマンド受信部51に書き込む(図5のステップA14−1)。その後、データ受信処理に戻る。   When any of the conditions C1 to C3 is satisfied, the message stream existing in the reception buffer (reception message holding unit 23) is transferred to the protocol processing data storage unit 52 (step A13-1 in FIG. 5), and the transferred message is transferred. Information (command) about the stream is written in the network interface command receiving unit 51 (step A14-1 in FIG. 5). Thereafter, the process returns to the data reception process.

条件C1〜C3のいずれも満たさない場合は、次のパケット処理を行うため、データ受信処理に戻る。   If none of the conditions C1 to C3 is satisfied, the process returns to the data reception process to perform the next packet process.

本実施形態によれば、SMTPの様な改行単位でコマンド処理を行うプロトコルに関しては、改行パターンを予め登録しておくことで、アプリケーションはread()システムコールから改行毎にデータを受信することが出来、アプリケーション側で改行区切りを検索する処理負荷を削減することができる。   According to the present embodiment, for a protocol that performs command processing in linefeed units such as SMTP, an application can receive data for each linefeed from a read () system call by registering a linebreak pattern in advance. Yes, it can reduce the processing load for searching for line breaks on the application side.

(第3の実施形態)
いくつかの文字列を1つの形式で表現する正規表現検索に対して、固定パターン検索では、特定パターンがメッセージストリームに含まれているか否かを判断するだけでよい。したがって、パターン検索ロジックに固定パターン検索を適用することで、ロジック数を削減することができ、高速検索が可能となる。ここでは、固定パターン検索を適用した実施形態について説明する。
(Third embodiment)
In contrast to the regular expression search that expresses several character strings in one format, in the fixed pattern search, it is only necessary to determine whether or not a specific pattern is included in the message stream. Therefore, by applying a fixed pattern search to the pattern search logic, the number of logics can be reduced and high-speed search becomes possible. Here, an embodiment to which fixed pattern search is applied will be described.

図6は、本発明の第3の実施形態であるアプリケーション処理サーバの構成を示すブロック図である。図6を参照すると、アプリケーション処理サーバ100は、パターン検知部24内に、固定パターンの検索に特化したロジックを有する固定パターン検知部25を備えており、この点が、第1の実施形態のものと異なる。   FIG. 6 is a block diagram showing a configuration of an application processing server according to the third embodiment of the present invention. Referring to FIG. 6, the application processing server 100 includes a fixed pattern detection unit 25 having logic specialized for searching for a fixed pattern in the pattern detection unit 24, and this point is the same as that of the first embodiment. Different from the one.

アプリケーションから通知されたパターンが固定パターンであった場合、パターン検索部24の検索ロジックから固定パターン検索部25の検索ロジックに動的に切り替わる。そして、パターン検索部24による正規表現検索の代わりに固定パターン検索部25による固定パターン検索が行われる。これ以外の動作は、第1の実施形態の場合と同じである。   When the pattern notified from the application is a fixed pattern, the search logic of the pattern search unit 24 is dynamically switched to the search logic of the fixed pattern search unit 25. Then, instead of the regular expression search by the pattern search unit 24, a fixed pattern search by the fixed pattern search unit 25 is performed. Other operations are the same as those in the first embodiment.

このように、パターン検索部24の検索ロジックから固定パターン検索部25の検索ロジックに動的に切り替わることで、高速に検索することが可能となり、その結果、受信メッセージストリームのパターン検知に要する時間が短縮される。   Thus, by dynamically switching from the search logic of the pattern search unit 24 to the search logic of the fixed pattern search unit 25, it becomes possible to search at high speed, and as a result, the time required for pattern detection of the received message stream Shortened.

以下、本発明のアプリケーション処理サーバの具体的な動作例について説明する。   Hereinafter, a specific operation example of the application processing server of the present invention will be described.

ここでは、SOAPに適用した場合の動作例について説明する。   Here, an operation example when applied to SOAP will be described.

SOAPは、ソフトウェア同士がメッセージ(オブジェクト)を交換する(リモートプロシージャコール−遠隔手続呼び出し)ためのプロトコルである。一般に、SOAPプロトコルを実装したアプリケーション処理サーバでは、複数のクライアントから遠隔手続きのためのSOAPメッセージが送られてくるが、SOAPのプロトコル処理がボトルネックになるために、サーバアプリケーションの負荷軽減が求められている。   SOAP is a protocol for software to exchange messages (objects) (remote procedure call-remote procedure call). Generally, in an application processing server that implements the SOAP protocol, SOAP messages for remote procedures are sent from a plurality of clients. However, since SOAP protocol processing becomes a bottleneck, it is required to reduce the load on the server application. ing.

ショッピングサイトの場合、以下のようなSOAPメッセージがクライアントからアプリケーション処理サーバへ送られてくる。
[SOAPメッセージ]
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<getProductDetails xmlns="http://warehouse.example.com/ws">
<productId>827635</productId>
</getProductDetails>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
上記のとおり、SOAPメッセージは、<SOAP-ENV:Envelope> ・・・</SOAP-ENV:Envelope>の文字列で囲まれたパターンとなっている。この文字列は、およそ270バイトのデータである。このメッセージが、セッション開設後に、対向ネットワークから届いたと仮定する。従来のネットワークインタフェースでは、SOAPメッセージがネットワークインタフェースカードまで到着しても、
(1)TCPのPSHフラグがON、
(2)受信バッファがFULL
(3)タイムアウト発生
といった3つの条件のうちのいずれかの条件が適合するまでは、ネットワークインタフェースカードは、到着したSOAPメッセージを主記憶部へ転送しない。例えば、受信パケットのTCPフラグは、通常、データのACKのみ、受信バッファのサイズが64Kバイトとされるが、その場合、次のメッセージを受信して受信バッファがFULLになるか、タイムアウト(TCP Chimneyでは200msec)が発生するまでは、受信パケットはネットワークインタフェースカード中に蓄積されたままである。
In the case of a shopping site, the following SOAP message is sent from the client to the application processing server.
[SOAP message]
<SOAP-ENV: Envelope xmlns: SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV: Body>
<getProductDetails xmlns = "http://warehouse.example.com/ws">
<productId> 827635 </ productId>
</ getProductDetails>
</ SOAP-ENV: Body>
</ SOAP-ENV: Envelope>
As described above, the SOAP message has a pattern surrounded by the character string of <SOAP-ENV: Envelope>... </ SOAP-ENV: Envelope>. This character string is approximately 270 bytes of data. Assume that this message arrives from the opposite network after the session is established. In the conventional network interface, even if the SOAP message arrives at the network interface card,
(1) TCP PSH flag is ON,
(2) Receive buffer is FULL
(3) The network interface card does not transfer the arrived SOAP message to the main storage unit until one of the three conditions such as occurrence of timeout is met. For example, the TCP flag of the received packet is normally only ACK for data and the size of the reception buffer is 64 Kbytes. In this case, the next buffer is received and the reception buffer becomes FULL or a timeout (TCP Chimney Until 200 msec), the received packet remains stored in the network interface card.

これに対して、本発明のアプリケーション処理サーバは、以下のように動作する。   On the other hand, the application processing server of the present invention operates as follows.

アプリケーション処理サーバにおいて、あらかじめ、setsockopt()関数などを使用して、開始パターン、終了パターンを以下の正規表現で登録しておく。   In the application processing server, the start pattern and end pattern are registered with the following regular expressions in advance using the setsockopt () function or the like.

開始パターン: /\<SOAP-ENV\:Envelope*/
終了パターン /\<\/SOAP-ENV\:Envelope\>/
上記の場合、setsockopt()関数としては、以下のようなものが挙げられる。
setsockopt()関数
setsockopt(socket,SOL_SOCKET,SO_REGX,&rcv_regx,sizeof(struct rcv_regx));
struct rcv_regx [
char start_reg [STR_LEN]; => "/\<SOAP-ENV\:Envelope*/"
char end_reg [STR_LEN]; => "/\<\/SOAP-ENV\:Envelope\>/"
];
開始パターンは、SOAPメッセージの最初の行にマッチし、終了パターンは、SOAPメッセージの最後の行にマッチする。ネットワークインタフェースカード2が、このメッセージストリームをペイロードとして有するTCPパケットを対向ネットワーク10から受信すると、まず、パケット受信部21が、受信TCPパケットのチェック及び、TCPのプロトコル処理を行う。その後、メッセージ再構築部22に処理が渡る。
Start pattern: / \ <SOAP-ENV \: Envelope * /
End pattern / \ <\ / SOAP-ENV \: Envelope \> /
In the above case, the setsockopt () function includes the following.
setsockopt () function
setsockopt (socket, SOL_SOCKET, SO_REGX, & rcv_regx, sizeof (struct rcv_regx));
struct rcv_regx [
char start_reg [STR_LEN]; =>"/ \ <SOAP-ENV \: Envelope * /"
char end_reg [STR_LEN]; =>"/ \ <\ / SOAP-ENV \: Envelope \>/"
];
The start pattern matches the first line of the SOAP message and the end pattern matches the last line of the SOAP message. When the network interface card 2 receives a TCP packet having this message stream as a payload from the opposite network 10, first, the packet receiving unit 21 checks the received TCP packet and performs TCP protocol processing. Thereafter, the processing is passed to the message reconstruction unit 22.

メッセージ再構築部22は、今回受信したTCPパケットとその前に受信したTCPデータを参照してメッセージストリームを構築する。今回受信したTCPパケットは、それより前に受信したパケットと結合されて、メッセージストリームとして、受信メッセージ保持部23に格納される。   The message reconstruction unit 22 constructs a message stream by referring to the TCP packet received this time and the previously received TCP data. The TCP packet received this time is combined with the packet received earlier than that and stored in the received message holding unit 23 as a message stream.

パターン検知部24には、アプリケーションによって、あらかじめ登録されたアプリケーションデータの開始および終了のパターンが登録される。パターン検知対象であるメッセージストリーム(以下、検知対象メッセージストリームと称す)が受信メッセージ保持部23に格納された時点において、その検知対象メッセージストリームより前に格納されたメッセージストリームについて、パターン検知中では無い場合は、内部パラーメータのパターン検知フラグはOFFになっている。   In the pattern detection unit 24, the application data start and end patterns registered in advance are registered by the application. When a message stream that is a pattern detection target (hereinafter referred to as a detection target message stream) is stored in the received message holding unit 23, a pattern is not being detected for a message stream stored before the detection target message stream. In this case, the pattern detection flag of the internal parameter is OFF.

パターン検知フラグがOFFである場合、パターン検知部24が、検知対象メッセージストリームについて、登録済みの開始パターンが存在するか否かを調べる。この場合、検知対象メッセージストリームについては、開始パターンが見つかるので、パターン適合中フラグがONになる。その後、検知対象メッセージストリームについて、登録済みの終了パターンが存在するか否かを調べる。検知対象メッセージストリームについては、開始パターンよりも後ろの位置で終了パターンが検知されるので、ネットワークインタフェースカード2は、受信メッセージ保持部23に保持された検知対象メッセージストリームの先頭から終了パターンまでのメッセージをプロトコル処理用データ記憶部52に転送し、転送したメッセージに関する情報(コマンド)をネットワークインタフェースコマンド受信部51に書き込む。   If the pattern detection flag is OFF, the pattern detection unit 24 checks whether there is a registered start pattern for the detection target message stream. In this case, since the start pattern is found for the detection target message stream, the pattern matching flag is turned ON. Thereafter, it is checked whether a registered end pattern exists for the detection target message stream. As for the detection target message stream, since the end pattern is detected at a position after the start pattern, the network interface card 2 determines the message from the start of the detection target message stream held in the received message holding unit 23 to the end pattern. Is transferred to the protocol processing data storage unit 52, and information (command) related to the transferred message is written into the network interface command receiving unit 51.

一方、CPU3は、ネットワークインタフェースカード2から送られて来たメッセージを受信するため、read()システムコールを発行してデータ待ちの状態(待機状態)になっている。この待機状態において、CPU3は、ネットワークインタフェースコマンド受信部51をポーリングして、コマンドが到着しているかを調べる。このポーリング処理に代えて、ネットワークインタフェース2が、コマンドを転送後に、CPU3に対して割り込み通知を行う形式を用いることも可能である。ポーリング処理の場合、主記憶部5にメッセージストリームが書き込まれた際に、ネットワークインタフェースコマンド受信部51が更新されるので、CPU3は、その更新に基づいてパケット受信を認識することができる。   On the other hand, since the CPU 3 receives a message sent from the network interface card 2, it issues a read () system call and is in a data waiting state (standby state). In this standby state, the CPU 3 polls the network interface command receiving unit 51 to check whether a command has arrived. Instead of this polling processing, it is also possible to use a format in which the network interface 2 sends an interrupt notification to the CPU 3 after transferring the command. In the case of polling processing, when the message stream is written in the main storage unit 5, the network interface command receiving unit 51 is updated, so that the CPU 3 can recognize packet reception based on the update.

CPU3によるパケット受信認識がなされると、OSは、ネットワークインタフェースコマンド受信部51の情報に基づいて、ネットワークインタフェースカード2からプロトコル処理用データ記憶部52に転送されたメッセージストリームが、パターン適合したものであるか否かを判断する。パターン適合したものである場合は、OSは、プロトコル処理用データ記憶部52に格納されたメッセージストリームをアプリケーションユーザ用データ記憶部53にコピーする。パターン適合したものでは無い場合は、OSは、システムコールの引数を参照し、プロトコル処理用データ記憶部52に格納されたメッセージストリームのうちの、アプリケーションから要求を受けた長さのメッセージストリームを、アプリケーションユーザ用データ記憶部53にコピーする。   When the packet reception is recognized by the CPU 3, the OS determines that the message stream transferred from the network interface card 2 to the protocol processing data storage unit 52 conforms to the pattern based on the information of the network interface command reception unit 51. Judge whether there is. If the pattern conforms, the OS copies the message stream stored in the protocol processing data storage unit 52 to the application user data storage unit 53. If the pattern does not conform, the OS refers to the argument of the system call, and the message stream having the length received from the application among the message streams stored in the protocol processing data storage unit 52, Copy to the application user data storage unit 53.

アプリケーションユーザ用データ記憶部53へのメッセージストリームのコピーが完了した後、OSは、その旨をアプリケーションに通知する。アプリケーションは、OSから通知を受けて、read()システムコールから返ったデータを参照することが出来る。   After copying of the message stream to the application user data storage unit 53 is completed, the OS notifies the application to that effect. The application can refer to the data returned from the read () system call upon receiving a notification from the OS.

このようにして、アプリケーションのプロトコルコマンド境界を意識したメッセージ転送を行うことで、アプリケーション側のコマンド境界検索の処理負荷(CPU負荷)が軽減される。   In this way, by performing message transfer in consideration of the protocol command boundary of the application, the processing load (CPU load) of command boundary search on the application side is reduced.

ここでは、SMTPに適用した場合の動作例について説明する。   Here, an operation example when applied to SMTP will be described.

SMTPプロトコルは、改行単位でコマンドの送受信処理を行う。ここでは、アプリケーション処理サーバ1をSMTP処理を行うメールサーバとし、クライアント側からは、以下の順でパケット1−6が送られてくるものとする。
[パケット1]
HELO [クライアント側のホストネーム]
[パケット2]
MAIL FROM:<送信者のメールアドレス >
[パケット3]
RCPT TO:<宛先のメールアドレス >
[パケット4]
DATA
[パケット5]
メールコンテンツ
[パケット6]
QUIT
上記のパケット1−6の例において、パケット5のメールコンテンツ以外は、全て改行コード区切りのSMTPコマンドである。通常、SMTPコマンドは、PSHフラグが付属したまま送られるが、TCPの実装や、通過地点途中にTCPを終端するプロクシ及びアプリケーションファイアウォールがあった場合、PSHフラグが消えてしまう場合がある。本実施例は、そのようなPSHフラグの存在しないSMTPコマンドを受信し、改行単位でコマンド処理を行うプロトコル処理に効果を発揮する。
The SMTP protocol performs command transmission / reception processing in line feed units. Here, it is assumed that the application processing server 1 is a mail server that performs SMTP processing, and packets 1-6 are sent from the client side in the following order.
[Packet 1]
HELO [client-side hostname]
[Packet 2]
MAIL FROM: <sender's email address>
[Packet 3]
RCPT TO: <destination email address>
[Packet 4]
DATA
[Packet 5]
Mail content
[Packet 6]
QUIT
In the example of the packet 1-6, all the mail contents other than the mail content of the packet 5 are SMTP commands separated by line feed codes. Normally, SMTP commands are sent with the PSH flag attached, but the PSH flag may disappear if there is a TCP implementation or a proxy and application firewall that terminates TCP in the middle of a passing point. The present embodiment is effective for protocol processing that receives an SMTP command without such a PSH flag and performs command processing in line feed units.

以下に、具体的な動作を説明する。ここでは、検知用パターンとして改行コード(<CR>+<LF>)が登録されているものとする。   Specific operations will be described below. Here, it is assumed that a line feed code (<CR> + <LF>) is registered as a detection pattern.

ネットワークインタフェースカード2では、対向ネットワーク10からSMTPコマンドの入ったTCPデータを受信し、受信TCPデータからメッセージストリームを再構築して受信メッセージ保持部23へ格納する。この処理は、基本的には実施例1における処理と同じである。   The network interface card 2 receives the TCP data containing the SMTP command from the opposite network 10, reconstructs the message stream from the received TCP data, and stores it in the received message holding unit 23. This process is basically the same as the process in the first embodiment.

続いて、パターン検知部24が、改行コードについて、受信メッセージ保持部23に保持されているメッセージストリームを検索する。改行コードが見つかった場合は、受信メッセージ保持部23に保持されているメッセージストリームの先頭から改行コードまでのメッセージが、ネットワークインタフェースカード2からプロトコル処理用データ記憶部52へ転送される。メッセージストリーム転送後、ネットワークインタフェースカード2によって、転送メッセージストリームについての情報(コマンド)が主記憶部5上のネットワークインタフェースコマンド受信部51に書き込まれる。   Subsequently, the pattern detection unit 24 searches the message stream held in the received message holding unit 23 for the line feed code. When a line feed code is found, a message from the beginning of the message stream held in the received message holding unit 23 to the line feed code is transferred from the network interface card 2 to the protocol processing data storage unit 52. After the message stream transfer, the network interface card 2 writes information (command) about the transfer message stream to the network interface command receiving unit 51 on the main storage unit 5.

CPU3は、ネットワークインタフェースコマンド受信部51を参照してパケット受信を認識する。パケット受信認識がなされると、OSが、プロトコル処理用データ記憶部52に格納されたメッセージストリームをアプリケーションユーザ用データ記憶部53へコピーし、その旨をアプリケーションに通知する。このようにして、改行区切りでアプリケーションに受信通知が行われる。   The CPU 3 refers to the network interface command receiving unit 51 and recognizes packet reception. When packet reception is recognized, the OS copies the message stream stored in the protocol processing data storage unit 52 to the application user data storage unit 53 and notifies the application to that effect. In this way, the application is notified of receipt with line breaks.

SMTPの様な改行単位でコマンド処理される事が分かっているようなアプリケーションプロトコルにおいては、改行コードのみをパターン登録させることで、アプリケーション側では、改行コードの検索負荷を軽減することが可能となる。   In application protocols such as SMTP, where it is known that command processing is performed in units of line breaks, it is possible to reduce the search load for line break codes on the application side by registering only line break codes as patterns. .

ここでは、SIPに適用した場合の動作例について説明する。   Here, an operation example when applied to SIP will be described.

SIPプロトコルでは、SIPヘッダフィールドと、空行と、SIPボディとからなるSIPメッセージを処理する。ネットワークインタフェースカード2には、以下の様な形式のSIPメッセージがSIPリクエストとして対向ネットワーク10から送られてくる。
[SIPメッセージ]
INVITE sip:bob@biloxi.com SIP/2.0
Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bK776asdhds
Max-Forwards: 70
To: Bob <sip:bob@biloxi.com>
From: Alice <sip:alice@atlanta.com>;tag=1928301774
Call-ID: a84b4c76e66710@pc33.atlanta.com
CSeq: 314159 INVITE
Contact: <sip:alice@pc33.atlanta.com>
Content-Type: application/sdp
Content-Length: 142
(空行)
(以下、送信データの詳細情報フィールド)
上記SIPメッセージにおいて、空行より前のフィールドがSIPコマンド情報である。空行より後のフィールドには、送信するデータの詳細情報(例えば音声ファイルの圧縮Codec、サンプリングレート)などが続く。
In the SIP protocol, a SIP message including a SIP header field, a blank line, and a SIP body is processed. A SIP message of the following format is sent from the opposite network 10 to the network interface card 2 as a SIP request.
[SIP message]
INVITE sip: bob@biloxi.com SIP / 2.0
Via: SIP / 2.0 / UDP pc33.atlanta.com; branch = z9hG4bK776asdhds
Max-Forwards: 70
To: Bob <sip: bob@biloxi.com>
From: Alice <sip: alice@atlanta.com>; tag = 1928301774
Call-ID: a84b4c76e66710@pc33.atlanta.com
CSeq: 314159 INVITE
Contact: <sip: alice@pc33.atlanta.com>
Content-Type: application / sdp
Content-Length: 142
(Blank line)
(Hereafter, detailed information field of transmitted data)
In the SIP message, the field before the blank line is SIP command information. Detailed fields of data to be transmitted (for example, compression codec of audio file, sampling rate) and the like follow in the field after the blank line.

SIPサーバは、クライアントからSIPメッセージを受信した後、SIPメッセージの宛先が自分宛なのか別ホストなのかを判断する処理等を含むアプリケーション処理を行う。ここでは、アプリケーション処理サーバ1をSIPサーバとする。   After receiving the SIP message from the client, the SIP server performs application processing including processing for determining whether the destination of the SIP message is for itself or another host. Here, the application processing server 1 is a SIP server.

図7に、SIPサーバに搭載されるネットワークインタフェースカード2の動作フローを示す。この例では、検知用パターンとして、以下のパターンが登録されているものとする。
・開始パターン(行頭にINVITE文字列が入っているか?) "/^\INVITE/"
・終了パターン(空行 <CR>+<LF>+<CR>+<LF>) "/\r\n\r\n /"
ネットワークインタフェースカード2では、対向ネットワーク10からSIPメッセージの入ったTCPデータを受信し、受信TCPデータからメッセージストリームを再構築して受信メッセージ保持部23へ格納する。この処理は、基本的には実施例1における処理と同じである。
FIG. 7 shows an operation flow of the network interface card 2 mounted on the SIP server. In this example, it is assumed that the following patterns are registered as detection patterns.
-Start pattern (Is the INVITE character string at the beginning of the line?) "/ ^ \ INVITE /"
-End pattern (blank <CR> + <LF> + <CR> + <LF>) "/ \ r \ n \ r \ n /"
The network interface card 2 receives the TCP data containing the SIP message from the opposite network 10, reconstructs the message stream from the received TCP data, and stores it in the received message holding unit 23. This process is basically the same as the process in the first embodiment.

続いて、検知用パターンとして開始パターンおよび終了パターンがパターン検知部24に登録されているか否かが判断される(図7のステップA7)。検知用パターンの登録がなされていない場合は、図7のA16〜A18のステップが実行される。これらステップA16〜A18は、図3に示したフローと同じステップである。   Subsequently, it is determined whether a start pattern and an end pattern are registered in the pattern detection unit 24 as detection patterns (step A7 in FIG. 7). If the detection pattern is not registered, steps A16 to A18 in FIG. 7 are executed. These steps A16 to A18 are the same steps as the flow shown in FIG.

検知用パターンの登録がなされている場合は、パターン適合中フラグがONになっているか否かが判断される。パターン適合中フラグがOFFである場合は、パターン検知部24が、受信メッセージ保持部23に保持されたメッセージストリーム中に開始パターンにマッチする文字列があるかを調べる(図7のステップA9、A10)。メッセージストリームが上記のSIPメッセージだった場合、最初の"INVITE sip:bob@biloxi.com SIP/2.0"の行が開始パターンにマッチする。   If the detection pattern is registered, it is determined whether or not the pattern matching flag is ON. If the pattern matching flag is OFF, the pattern detection unit 24 checks whether there is a character string that matches the start pattern in the message stream held in the received message holding unit 23 (steps A9 and A10 in FIG. 7). ). If the message stream is the above SIP message, the first “INVITE sip: bob@biloxi.com SIP / 2.0” line matches the start pattern.

開始パターンのマッチが確認された後、パターン検知部24は、パターン適合フラグをONにし(図7のステップA11)、図7のA12−2のステップに移行する。開始パターンのマッチが確認されなかった場合は、ステップA16〜A18が実行される。   After the start pattern match is confirmed, the pattern detection unit 24 turns on the pattern matching flag (step A11 in FIG. 7), and proceeds to step A12-2 in FIG. If the start pattern match is not confirmed, steps A16 to A18 are executed.

ステップA8の判定で「Yes」になった場合、または、ステップA11が実行された場合は、パターン検知部24は、メッセージストリーム中に終了パターンにマッチする文字列があるかを調べる(図7のステップ12−2、A13−2)。メッセージストリームが上記のSIPメッセージだった場合、空行が終了パターンにマッチする。このパターンマッチング処理は、開始パターンより後ろで空行があるかを調べる処理である。   When the determination in step A8 is “Yes” or when step A11 is executed, the pattern detection unit 24 checks whether there is a character string that matches the end pattern in the message stream (FIG. 7). Step 12-2, A13-2). If the message stream is the above SIP message, a blank line matches the end pattern. This pattern matching process is a process for checking whether there is a blank line after the start pattern.

終了パターンのマッチが確認された後、パターン検知部24は、受信メッセージ保持部23に保持されているメッセージストリームの、先頭保持位置から空行までのデータ領域を、受信メッセージ保持部23から主記憶部5のプロトコル処理用データ記憶部52に転送させ、パターン適合中フラグをOFFにする(図7のステップA14−2)。   After the end pattern match is confirmed, the pattern detection unit 24 stores the data area from the head holding position to the blank line of the message stream held in the received message holding unit 23 from the received message holding unit 23 into the main memory. The data is transferred to the protocol processing data storage unit 52 of the unit 5, and the pattern matching flag is turned OFF (step A14-2 in FIG. 7).

メッセージストリーム転送後、ネットワークインタフェースカード2によって、転送メッセージストリームについての情報(コマンド)が主記憶部5上のネットワークインタフェースコマンド受信部51に書き込まれる(図7のステップA15)。   After transferring the message stream, the network interface card 2 writes information (command) about the transferred message stream to the network interface command receiving unit 51 on the main storage unit 5 (step A15 in FIG. 7).

CPU3は、ネットワークインタフェースコマンド受信部51を参照してパケット受信を認識する。パケット受信認識がなされると、OSが、プロトコル処理用データ記憶部52に格納されたメッセージストリームをアプリケーションユーザ用データ記憶部53へコピーし、その旨をアプリケーションに通知する。このようにして、SIPコマンドのパターン区切りでアプリケーションに受信通知が行われる。   The CPU 3 refers to the network interface command receiving unit 51 and recognizes packet reception. When packet reception is recognized, the OS copies the message stream stored in the protocol processing data storage unit 52 to the application user data storage unit 53 and notifies the application to that effect. In this way, the application is notified of reception at the SIP command pattern delimiter.

以上の動作により、アプリケーション側のSIPコマンドのパターン区切りの検索負荷を軽減することが出来る。   With the above operation, it is possible to reduce the search load on the application-side SIP command pattern break.

以上説明した本発明のネットワーク通信システム(アプリケーション処理サーバ)において、アプリケーションやOSの動作およびネットワークインタフェース部の動作は、基本的には、プログラムによって実現することが可能である。CPUおよびネットワークインタフェース部は、プログラムに従ってそれぞれの動作に対応する処理を実行する。プログラムは、CD−ROMやDVDなどの記録媒体によって提供されてもよい。   In the network communication system (application processing server) of the present invention described above, the operation of the application and OS and the operation of the network interface unit can be basically realized by a program. The CPU and the network interface unit execute processing corresponding to each operation according to the program. The program may be provided by a recording medium such as a CD-ROM or a DVD.

また、ユーザは、ネットワーク通信システム(アプリケーション処理サーバ)の入力装置(キーボードやマウスなど)を通じて、必要な情報を入力したり登録したりすることができる。具体的には、ユーザは、検知用パターンとして任意のパターンを登録することができる。また、ユーザは、パケット受信中に任意に検知用パターンを再登録することができる。   The user can input and register necessary information through an input device (such as a keyboard and a mouse) of a network communication system (application processing server). Specifically, the user can register an arbitrary pattern as the detection pattern. Also, the user can re-register the detection pattern arbitrarily during packet reception.

本発明の第1の実施形態であるアプリケーション処理サーバの構成を示すブロック図である。It is a block diagram which shows the structure of the application processing server which is the 1st Embodiment of this invention. 図1に示すネットワークインタフェースカードの動作を説明するためのフローチャートである。3 is a flowchart for explaining the operation of the network interface card shown in FIG. 1. 図1に示すネットワークインタフェースカードの動作を説明するためのフローチャートである。3 is a flowchart for explaining the operation of the network interface card shown in FIG. 1. 図1に示すCPUの動作を説明するためのフローチャートである。3 is a flowchart for explaining the operation of a CPU shown in FIG. 1. 本発明の第2の実施形態であるアプリケーション処理サーバの動作を説明するためのフローチャートである。It is a flowchart for demonstrating operation | movement of the application processing server which is the 2nd Embodiment of this invention. 本発明の第3の実施形態であるアプリケーション処理サーバの構成を示すブロック図である。It is a block diagram which shows the structure of the application processing server which is the 3rd Embodiment of this invention. 本発明のネットワーク通信システムをSIPサーバに適用した場合のネットワークインタフェースカードの動作を説明するためのフローチャートである。It is a flowchart for demonstrating operation | movement of a network interface card at the time of applying the network communication system of this invention to a SIP server.

符号の説明Explanation of symbols

1 アプリケーション処理サーバ
2 ネットワークインタフェースカード
3 CPU
4 アクセス調停部
5 主記憶部
10 対向ネットワーク
21 パケット受信部
22 メッセージ再構築部
23 受信メッセージ保持部
24 パターン検知部
51 ネットワークインタフェースコマンド受信部
52 プロトコル処理用データ記憶部
53 アプリケーションユーザ用データ記憶部
1 Application processing server 2 Network interface card 3 CPU
4 access arbitration unit 5 main storage unit 10 opposite network 21 packet reception unit 22 message reconstruction unit 23 received message holding unit 24 pattern detection unit 51 network interface command reception unit 52 protocol processing data storage unit 53 application user data storage unit

Claims (18)

主記憶部と、
対向ホストから送出されたパケットを受信し、該受信パケットに基づいてメッセージストリームを再構築し、該再構築したメッセージストリームを前記主記憶部に書き込むネットワークインタフェース部と、
前記主記憶部に書き込まれたメッセージストリームをコマンドとして解釈して前記対向ホストとの通信処理を実行するアプリケーション実行部と、を有し、
前記ネットワークインタフェース部は、前記再構築したメッセージストリーム中に予め登録された検知用パターンに適合するパターンがある場合に、該適合パターンを前記コマンドの区切りと判断して、前記再構築したメッセージストリームを前記コマンド毎に前記主記憶部に書き込むことを特徴とするネットワーク通信システム。
A main memory unit;
A network interface unit that receives a packet sent from the opposite host, reconstructs a message stream based on the received packet, and writes the reconstructed message stream in the main storage unit;
An application execution unit that interprets the message stream written in the main storage unit as a command and executes communication processing with the opposite host;
When there is a pattern that matches a detection pattern registered in advance in the reconstructed message stream, the network interface unit determines that the conformance pattern is a delimiter of the command, and determines the reconstructed message stream as A network communication system, wherein each command is written to the main storage unit.
前記ネットワークインタフェース部は、
前記再構築したメッセージストリームを保持する受信メッセージ保持部と、
前記受信メッセージ保持部で保持したメッセージストリーム中に前記適合パターンがあるか否かを調べるパターン検知部と、を有し、
前記パターン検知部により前記適合パターンが検知されると、前記受信メッセージ保持部で保持したメッセージストリームの、先頭から前記適合パターンまでのデータが、前記主記憶部に書き込まれる、請求項1に記載のネットワーク通信システム。
The network interface unit
A received message holding unit for holding the reconstructed message stream;
A pattern detection unit that checks whether or not there is the matching pattern in the message stream held by the received message holding unit,
The data from the head of the message stream held in the received message holding unit to the matching pattern is written in the main storage unit when the matching pattern is detected by the pattern detection unit. Network communication system.
前記検知用パターンは、前記コマンドの開始および終了をそれぞれ示す開始パターンおよび終了パターンを含み、
前記ネットワークインタフェース部は、
前記再構築したメッセージストリームを保持する受信メッセージ保持部と、
前記受信メッセージ保持部で保持したメッセージストリーム中に前記開始パターンおよび終了パターンにそれぞれ適合するパターンがあるか否かを調べるパターン検知部と、を有し、
前記パターン検知部により前記開始パターンおよび終了パターンにそれぞれ適合するパターンが検知されると、前記受信メッセージ保持部で保持したメッセージストリームの、前記開始パターンに適合するパターンから前記終了パターンに適合するパターンまでのデータが、前記主記憶部に書き込まれる、請求項1に記載のネットワーク通信システム。
The detection pattern includes a start pattern and an end pattern indicating the start and end of the command, respectively.
The network interface unit
A received message holding unit for holding the reconstructed message stream;
A pattern detection unit that checks whether there is a pattern that matches each of the start pattern and end pattern in the message stream held by the received message holding unit,
When the pattern detection unit detects a pattern that matches each of the start pattern and the end pattern, from the pattern that matches the start pattern to the pattern that matches the end pattern in the message stream held by the received message holding unit. The network communication system according to claim 1, wherein the data is written in the main storage unit.
前記開始パターンに適合するパターンが検知されると有効とされ、前記終了パターンに適合するパターンが検知されると無効とされる内部フラグをさらに有し、
前記パターン検知部は、前記内部フラグを参照して、前記開始パターンに適合するパターンから前記終了パターンに適合するパターンまでのデータを判断する、請求項3に記載のネットワーク通信システム。
An internal flag that is enabled when a pattern that matches the start pattern is detected, and disabled when a pattern that matches the end pattern is detected;
The network communication system according to claim 3, wherein the pattern detection unit determines data from a pattern that matches the start pattern to a pattern that matches the end pattern with reference to the internal flag.
前記対向ホストとの通信が開始される際に、前記検知用パターンが前記アプリケーション実行部によって前記パターン検知部に通知される、請求項1から4のいずれか1項に記載のネットワーク通信システム。   5. The network communication system according to claim 1, wherein the detection pattern is notified to the pattern detection unit by the application execution unit when communication with the opposite host is started. 6. 前記検知用パターンは任意のパターンである、請求項1から5のいずれか1項に記載のネットワーク通信システム。   The network communication system according to claim 1, wherein the detection pattern is an arbitrary pattern. 前記検知用パターンは、文字列を予め定められた1つの形式で表現する正規表現で表されたパターンであり、
前記パターン検知部は、前記正規表現でのパターン検知が可能な正規表現検索ロジックを有する、請求項1から6のいずれか1項に記載のネットワーク通信システム。
The detection pattern is a pattern represented by a regular expression that represents a character string in a predetermined format.
The network communication system according to claim 1, wherein the pattern detection unit includes a regular expression search logic capable of detecting a pattern with the regular expression.
前記検知用パターンは、固定パターンをさらに含み、
前記パターン検知部は、前記固定パターンでのパターン検知が可能な固定パターン検索ロジックをさらに有し、
前記アプリケーション実行部から通知された前記検知用パターンが前記固定パターンである場合に、前記正規表現検索ロジックから前記固定パターン検索ロジックに動的に切り替わる、請求項7に記載のネットワーク通信システム。
The detection pattern further includes a fixed pattern,
The pattern detection unit further includes a fixed pattern search logic capable of pattern detection with the fixed pattern,
The network communication system according to claim 7, wherein when the detection pattern notified from the application execution unit is the fixed pattern, the regular expression search logic is dynamically switched to the fixed pattern search logic.
主記憶部、ネットワークインタフェース部およびCPUを有するサーバ装置において行われるアプリケーション通知方法であって、
前記ネットワークインタフェース部が、対向ホストから送出されたパケットを受信し、該受信パケットに基づいてメッセージストリームを再構築し、該再構築したメッセージストリームを前記主記憶部に書き込む第1のステップと、
前記CPU上で動作するアプリケーションが、前記主記憶部に書き込まれたメッセージストリームをコマンドとして解釈して前記対向ホストとの通信処理を実行する第2のステップと、を含み、
前記第1のステップは、前記ネットワークインタフェース部が、前記再構築したメッセージストリーム中に予め登録された検知用パターンに適合するパターンがある場合に、該適合パターンを前記コマンドの区切りと判断して、前記再構築したメッセージストリームを前記コマンド毎に前記主記憶部に書き込むステップを含む、アプリケーション通知方法。
An application notification method performed in a server device having a main storage unit, a network interface unit and a CPU,
A first step in which the network interface unit receives a packet sent from the opposite host, reconstructs a message stream based on the received packet, and writes the reconstructed message stream in the main storage unit;
A second step in which an application running on the CPU interprets a message stream written in the main storage unit as a command and executes a communication process with the opposite host;
In the first step, when the network interface unit includes a pattern that matches a detection pattern registered in advance in the reconstructed message stream, the matching pattern is determined as a delimiter of the command, An application notification method including a step of writing the reconstructed message stream to the main storage unit for each command.
前記第1のステップは、前記ネットワークインタフェース部が、前記再構築したメッセージストリームを保持し、該保持したメッセージストリーム中に前記適合パターンがあるか否かを調べ、前記適合パターンがある場合に、前記保持したメッセージストリームの、先頭から前記適合パターンまでのデータを前記主記憶部に書き込むステップをさらに含む、請求項9に記載のアプリケーション通知方法。   In the first step, the network interface unit holds the reconstructed message stream, checks whether or not the matching pattern exists in the held message stream, and if the matching pattern exists, The application notification method according to claim 9, further comprising a step of writing data from a head of the retained message stream to the matching pattern in the main storage unit. 前記検知用パターンは、前記コマンドの開始および終了をそれぞれ示す開始パターンおよび終了パターンを含み、
前記第1のステップは、前記ネットワークインタフェース部が、前記再構築したメッセージストリームを保持し、該保持したメッセージストリーム中に前記開始パターンおよび終了パターンにそれぞれ適合するパターンがあるか否かを調べ、前記開始パターンおよび終了パターンにそれぞれ適合するパターンがある場合に、前記保持したメッセージストリームの、前記開始パターンに適合するパターンから前記終了パターンに適合するパターンまでのデータを前記主記憶部に書き込むステップをさらに含む、請求項9に記載のアプリケーション通知方法。
The detection pattern includes a start pattern and an end pattern indicating the start and end of the command, respectively.
In the first step, the network interface unit holds the reconstructed message stream, checks whether there is a pattern that matches the start pattern and the end pattern in the held message stream, and When there is a pattern that matches each of the start pattern and the end pattern, the step of writing data from the pattern that matches the start pattern to the pattern that matches the end pattern of the held message stream in the main storage unit is further included. The application notification method according to claim 9, further comprising:
前記開始パターンに適合するパターンが検知されると有効とされ、前記終了パターンに適合するパターンが検知されると無効とされる内部フラグが、前記ネットワークインタフェース部に設けられており、
前記第1のステップは、前記ネットワークインタフェース部が、前記内部フラグを参照して、前記開始パターンに適合するパターンから前記終了パターンに適合するパターンまでのデータを判断するステップをさらに含む、請求項11に記載のアプリケーション通知方法。
An internal flag is provided in the network interface unit that is enabled when a pattern that matches the start pattern is detected and disabled when a pattern that matches the end pattern is detected,
The first step further includes a step in which the network interface unit determines data from a pattern matching the start pattern to a pattern matching the end pattern with reference to the internal flag. Application notification method described in 1.
前記対向ホストとの通信が開始される際に、前記アプリケーションが、前記検知用パターンを前記ネットワークインタフェース部に通知するステップをさらに含む、請求項9から12のいずれか1項に記載のアプリケーション通知方法。   The application notification method according to any one of claims 9 to 12, further comprising a step in which the application notifies the network interface unit of the detection pattern when communication with the opposite host is started. . 前記検知用パターンは任意のパターンである、請求項9から13のいずれか1項に記載のアプリケーション通知方法。   The application notification method according to claim 9, wherein the detection pattern is an arbitrary pattern. 前記検知用パターンは、文字列を予め定められた1つの形式で表現する正規表現で表されたパターンである、請求項9から14のいずれか1項に記載のアプリケーション通知方法。   The application notification method according to claim 9, wherein the detection pattern is a pattern represented by a regular expression that represents a character string in a predetermined format. 前記検知用パターンは、固定パターンをさらに含み、
前記第1のステップは、前記アプリケーションから通知された前記検知用パターンが前記固定パターンである場合に、前記正規表現でのパターン検知が可能な正規表現検索ロジックから前記固定パターンでのパターン検知が可能な固定パターン検索ロジックに動的に切り替えるステップをさらに含む、請求項15に記載のアプリケーション通知方法。
The detection pattern further includes a fixed pattern,
In the first step, when the detection pattern notified from the application is the fixed pattern, pattern detection with the fixed pattern is possible from a regular expression search logic capable of pattern detection with the regular expression. The application notification method according to claim 15, further comprising a step of dynamically switching to a fixed pattern search logic.
対向ホストから送出されたパケットを受信し、該受信パケットに基づいてメッセージストリームを再構築し、該再構築したメッセージストリームを主記憶部に書き込む第1の処理を、ネットワークインタフェースカードに実行させ、
前記主記憶部に書き込まれたメッセージストリームをコマンドとして解釈して前記対向ホストとの通信処理を実行する第2の処理を、CPUに実行させるプログラムであって、
前記第1の処理は、前記再構築したメッセージストリーム中に予め登録された検知用パターンに適合するパターンがある場合に、該適合パターンを前記コマンドの区切りと判断して、前記再構築したメッセージストリームを前記コマンド毎に前記主記憶部に書き込む処理を含む、プログラム。
Receiving a packet sent from the opposite host, reconstructing a message stream based on the received packet, causing the network interface card to execute a first process of writing the reconstructed message stream to the main storage unit;
A program that causes a CPU to execute a second process of interpreting a message stream written in the main storage unit as a command and executing a communication process with the opposite host,
In the first process, when there is a pattern that matches a detection pattern registered in advance in the reconstructed message stream, the conforming pattern is determined as a delimiter of the command, and the reconstructed message stream Including a process of writing to the main storage unit for each command.
主記憶部と、該主記憶部に書き込まれたメッセージストリームをコマンドとして解釈して対向ホストとの通信処理を実行するアプリケーション実行部と、を有するサーバ装置に搭載されるネットワークインタフェースカードであって、
前記対向ホストから送出されたパケットを受信するパケット受信部と、
前記パケット受信部で受信したパケットに基づいてメッセージストリームを再構築するメッセージ再構築部と、
前記メッセージ再構築部で再構築したメッセージストリームを保持する受信メッセージ保持部と、
前記受信メッセージ保持部に保持されたメッセージストリーム中に予め登録された検知用パターンに適合する適合パターンがあるか否かを調べるパターン検知部と、を有し、
前記パターン検知部により前記適合パターンが検知されると、前記受信メッセージ保持部で保持したメッセージストリームの、先頭から前記適合パターンまでのデータが、前記主記憶部に書き込まれる、ネットワークインタフェースカード。
A network interface card mounted on a server device having a main storage unit and an application execution unit that interprets a message stream written in the main storage unit as a command and executes a communication process with an opposite host,
A packet receiver for receiving a packet sent from the opposite host;
A message reconstruction unit for reconstructing a message stream based on the packet received by the packet reception unit;
A received message holding unit for holding the message stream reconstructed by the message reconstructing unit;
A pattern detection unit that checks whether there is a matching pattern that matches a detection pattern registered in advance in the message stream held in the received message holding unit,
When the matching pattern is detected by the pattern detection unit, data from the head of the message stream held by the received message holding unit to the matching pattern is written to the main storage unit.
JP2007051411A 2007-03-01 2007-03-01 Network communication system, and application notifying method and program Pending JP2008219252A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007051411A JP2008219252A (en) 2007-03-01 2007-03-01 Network communication system, and application notifying method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007051411A JP2008219252A (en) 2007-03-01 2007-03-01 Network communication system, and application notifying method and program

Publications (1)

Publication Number Publication Date
JP2008219252A true JP2008219252A (en) 2008-09-18

Family

ID=39838801

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007051411A Pending JP2008219252A (en) 2007-03-01 2007-03-01 Network communication system, and application notifying method and program

Country Status (1)

Country Link
JP (1) JP2008219252A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012044303A (en) * 2010-08-16 2012-03-01 Oki Networks Co Ltd Call control signal transmission device, program and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012044303A (en) * 2010-08-16 2012-03-01 Oki Networks Co Ltd Call control signal transmission device, program and method

Similar Documents

Publication Publication Date Title
US11343198B2 (en) Reliable, out-of-order transmission of packets
US10917344B2 (en) Connectionless reliable transport
US10673772B2 (en) Connectionless transport service
US10474514B2 (en) Method for flow control and for reliable communication in a collaborative environment
KR102023122B1 (en) Elastic fabric adapter - connectionless reliable datagrams
US7817634B2 (en) Network with a constrained usage model supporting remote direct memory access
US8671152B2 (en) Network processor system and network protocol processing method
US8458280B2 (en) Apparatus and method for packet transmission over a high speed network supporting remote direct memory access operations
US8131881B2 (en) Completion coalescing by TCP receiver
US6535518B1 (en) System for bypassing a server to achieve higher throughput between data network and data storage system
US9037745B2 (en) Methods and devices for processing incomplete data packets
US20080177872A1 (en) Managing aggregation and sending of communications
US20100268757A1 (en) Pseudo Pipelining of Client Requests
US20070124378A1 (en) Method and system for indicate and post processing in a flow through data architecture
US9667729B1 (en) TCP offload send optimization
US20060168091A1 (en) RNIC-BASED OFFLOAD OF iSCSI DATA MOVEMENT FUNCTION BY INITIATOR
CN102546612B (en) Remote procedure call implementation method based on remote direct memory access (RDMA) protocol in user mode
TW200814672A (en) Method and system for a user space TCP offload engine (TOE)
US20060168306A1 (en) RECOVERY FROM iSCSI CORRUPTION WITH RDMA ATP MECHANISM
US20060168286A1 (en) iSCSI DATAMOVER INTERFACE AND FUNCTION SPLIT WITH RDMA ATP MECHANISM
US20090292825A1 (en) Method and apparatus for in-kernel application-specific processing of content streams
CN112261142A (en) Data retransmission method and device for RDMA (remote direct memory Access) network and FPGA (field programmable Gate array)
US10742776B1 (en) Accelerating isochronous endpoints of redirected USB devices
JP2008219252A (en) Network communication system, and application notifying method and program
US20060168092A1 (en) Scsi buffer memory management with rdma atp mechanism