JP2012226471A - Communication method and communication server - Google Patents

Communication method and communication server Download PDF

Info

Publication number
JP2012226471A
JP2012226471A JP2011091947A JP2011091947A JP2012226471A JP 2012226471 A JP2012226471 A JP 2012226471A JP 2011091947 A JP2011091947 A JP 2011091947A JP 2011091947 A JP2011091947 A JP 2011091947A JP 2012226471 A JP2012226471 A JP 2012226471A
Authority
JP
Japan
Prior art keywords
communication
storage area
memory address
driver
data
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.)
Withdrawn
Application number
JP2011091947A
Other languages
Japanese (ja)
Inventor
Nobuhiro Yokoi
伸浩 横井
Le Thanh Man Cao
レタンマン カオ
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2011091947A priority Critical patent/JP2012226471A/en
Publication of JP2012226471A publication Critical patent/JP2012226471A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To reduce a load of a server when performing communication in a virtualized environment.SOLUTION: A communication method includes a server 1 in which a plurality of virtual OSs 2 are executed and a driver OS 3 for managing communication processing is executed, and which comprises a communication device 5 for performing communication. In a shared memory 4, a communication buffer 42 for storing communication data and a communication ring queue 41 for storing a memory address of the communication buffer 42 are set. The driver OS 3 manages the memory address in the communication ring queue 41. The virtual OSs 2 and the communication device 5 refer to the memory address stored in the communication ring queue 41 and perform reading/writing of the communication data to the communication buffer 42.

Description

本発明は、仮想化環境における通信方法および通信サーバの技術に関する。   The present invention relates to a communication method and a communication server technology in a virtual environment.

計算機の物理資源を複数の論理資源に見せかける仮想化ソフトウェアにより、1台の計算機上で複数の仮想的な計算機を同時に稼働させることが可能となる仮想化技術がある。
以下、複数の仮想計算機を動作させる物理計算機を単に「サーバ」と称し、物理計算機(サーバ)上で動作する仮想計算機を「ゲストOS(Operating System)」と称することとする。
このような仮想化技術により、1台のサーバ上におけるプロセッサやメモリなどの物理資源(ハードウェア)を複数のゲストOSが共有して利用することができ、OS毎に複数のサーバを用意する場合に比べて、サーバの運用や管理にかかるコストを省くことができる。
There is a virtualization technology that makes it possible to simultaneously operate a plurality of virtual computers on one computer by using virtualization software that makes the physical resources of the computer appear as a plurality of logical resources.
Hereinafter, a physical computer that operates a plurality of virtual computers is simply referred to as a “server”, and a virtual computer that operates on the physical computer (server) is referred to as a “guest OS (Operating System)”.
With such a virtualization technology, physical resources (hardware) such as processors and memories on one server can be shared and used by multiple guest OSes, and multiple servers are prepared for each OS. Compared to the above, the cost for operation and management of the server can be saved.

仮想化環境では、ゲストOSとハードウェアのインタフェースにドライバOSを使用する方法が用いられる。ドライバOSとは、サーバ上で複数動作しているゲストOSの1つをデバイスドライバ管理専用のドライバOSとしたものである。各ゲストOSはこのドライバOSを通してハードウェアにアクセスする。
この方法を用いることにより、ゲストOSで実行されているドライバに不具合が起きたときにドライバを使用しない他のゲストOSを含むサーバ全体に影響が出ることや、仮想化ソフトウェアに複数のデバイスドライバを組み込むことで、仮想化のためのソフトウェアのサイズがそれに合わせて肥大化してしまう問題を解決している。
In a virtual environment, a method using a driver OS as an interface between a guest OS and a hardware is used. The driver OS is a driver OS dedicated to device driver management, which is one of guest OSes operating on the server. Each guest OS accesses the hardware through this driver OS.
By using this method, when a problem occurs in the driver running on the guest OS, the entire server including other guest OSs that do not use the driver is affected, and multiple device drivers are added to the virtualization software. Incorporating it solves the problem that the size of the software for virtualization grows accordingly.

しかし、ドライバOSを導入する方法には、ドライバOSの負荷により、サーバ全体のシステム性能が制限されてしまうという問題がある。
例えば、ドライバOSに複数のゲストOSからのアクセスが集中し、ドライバOSが複数のゲストOSにハードウェアから入出力するたびに、データを振り分けたり、メモリコピーしたりするため、この振り分けや、コピーのためのプロセッサ負荷、メモリアクセス負荷が増大する。
特に、複数のゲストOSが1つのネットワークカードを使用して通信を行う際に、ドライバOSのプロセッサ負荷、メモリアクセス負荷により、通信速度が制限されてしまうことが問題となっている。
However, the method of installing the driver OS has a problem that the system performance of the entire server is limited by the load of the driver OS.
For example, since access from a plurality of guest OSs concentrates on the driver OS and the driver OS inputs / outputs data to / from the plurality of guest OSs from the hardware, the data is distributed and the memory is copied. Increases the processor load and memory access load.
In particular, when a plurality of guest OSs communicate using a single network card, the communication speed is limited by the processor load and memory access load of the driver OS.

このような問題の対応策として、特許文献1ではサーバが通信データを受信したときに、ドライバOSにゲストOSのID(Identification)をあらかじめ設定しておき、そのIDに基づいて分配先を決めて転送し、設定や転送ルートの簡素化することで、サーバのプロセッサ負荷とメモリ負荷を軽減する負荷分散機能を有した情報処理装置が開示されている。   As a countermeasure against such a problem, in Patent Document 1, when a server receives communication data, an ID (Identification) of a guest OS is set in advance in the driver OS, and a distribution destination is determined based on the ID. An information processing apparatus having a load distribution function for reducing the processor load and memory load of a server by transferring and simplifying settings and transfer routes is disclosed.

特開2010−66931号公報JP 2010-66931 A

特許文献1に記載の技術によって、データ振り分けのためのテーブル検索に使用するプロセッサ負荷が軽減されるものの、ドライバOSが複数のゲストOSにハードウェアから入出力があるたびに、ハードウェア、ドライバOS、ゲストOS間で行われるメモリコピーが実行されなければならない。また、TCP/IP(Transmission Control Protocol/Internet Protocol)のようにヘッダとペイロードを有するパケット構造を持つ通信プロトコルを用いる通信の場合、各ゲストOSは、それぞれゲストOS上で実行されているドライバとは別に、通信アプリケーションを実行することによって、送受信パケットの送受信処理を行っている。この通信アプリケーションが送受信パケットを生成、解析する際のプロセッサ負荷、メモリアクセス負荷の存在も問題となっている。   Although the technology described in Patent Document 1 reduces the processor load used for table search for data distribution, the hardware and driver OS each time the driver OS receives input / output from / to the multiple guest OSs. The memory copy performed between the guest OSs must be executed. Further, in the case of communication using a communication protocol having a packet structure having a header and a payload such as TCP / IP (Transmission Control Protocol / Internet Protocol), each guest OS is a driver executed on the guest OS. Separately, a transmission / reception packet transmission / reception process is performed by executing a communication application. The existence of processor load and memory access load when this communication application generates and analyzes transmitted / received packets is also a problem.

通信の処理をゲストOSからオフロードし、専用ハードウェアによりこれを処理する方法もあるが、前記したゲストOSとハードウェア間の処理におけるプロセッサ負荷、メモリアクセス負荷の問題は解決されない。   There is a method of offloading the communication processing from the guest OS and processing it with dedicated hardware. However, the problems of the processor load and the memory access load in the processing between the guest OS and the hardware are not solved.

このような背景に鑑みて本発明がなされたのであり、本発明は、仮想化環境において通信を行う際におけるサーバの負荷を軽減することを課題とする。   The present invention has been made in view of such a background, and an object of the present invention is to reduce the load on the server when performing communication in a virtual environment.

前記課題を解決するため、本発明は、複数の仮想OSが実行され、さらに、通信処理を管理するドライバOSが実行されるための処理装置と、通信を行うための装置である通信装置と、記憶装置と、を有する通信サーバにおける通信方法であって、前記記憶装置には、通信されるデータである通信データが格納されるための第1の記憶領域と、前記第1の記憶領域のメモリアドレスが格納されるための第2の記憶領域と、が設定されており、前記ドライバOSは、前記第2の記憶領域における前記メモリアドレスを管理し、前記仮想OSおよび前記通信装置は、前記第2の記憶領域に格納されているメモリアドレスを参照して、前記第1の記憶領域に対し、前記通信データの読み書きを行うことを特徴とする。   In order to solve the above-described problem, the present invention provides a processing device for executing a plurality of virtual OSs and further executing a driver OS for managing communication processing, a communication device as a device for performing communication, A communication method in a communication server having a storage device, wherein the storage device stores a first storage area for storing communication data, which is data to be communicated, and a memory of the first storage area A second storage area for storing an address is set, the driver OS manages the memory address in the second storage area, and the virtual OS and the communication device The communication data is read / written from / to the first storage area with reference to the memory address stored in the second storage area.

本発明によれば、仮想化環境において通信を行う際におけるサーバの負荷を軽減することが可能となる。   According to the present invention, it is possible to reduce a load on a server when performing communication in a virtual environment.

第1実施形態に係る仮想システムの構成例を示す図である。It is a figure which shows the structural example of the virtual system which concerns on 1st Embodiment. サーバのハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of a server. 通信データが送受信される際に通る経路を示す図である。It is a figure which shows the path | route which passes when communication data is transmitted / received. 通信関数を通信I/Fパケットへ変換する一例を示す図である。It is a figure which shows an example which converts a communication function into a communication I / F packet. 第1実施形態に係るスイッチ変数管理テーブルの例を示す図である。It is a figure which shows the example of the switch variable management table which concerns on 1st Embodiment. 第1実施形態に係る通信I/Fパケット生成処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the communication I / F packet generation process which concerns on 1st Embodiment. 第1実施形態に係る通信リングキューの説明図である。It is explanatory drawing of the communication ring queue which concerns on 1st Embodiment. 第1実施形態に係る通信リングキューの構成例を示す図である。It is a figure which shows the structural example of the communication ring queue which concerns on 1st Embodiment. 通信I/Fドライバの構成と、他の機能部との関係を示す図である。It is a figure which shows the structure of a communication I / F driver, and the relationship with another function part. 第1実施形態に係る通信I/Fパケット処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the communication I / F packet process which concerns on 1st Embodiment. 第1実施形態に係るアクティブオープンの処理手順の一例を示すシーケンス図である(その1)。It is a sequence diagram which shows an example of the process sequence of the active open which concerns on 1st Embodiment (the 1). 第1実施形態に係るアクティブオープンの処理手順の一例を示すシーケンス図である(その2)。It is a sequence diagram which shows an example of the process sequence of the active open which concerns on 1st Embodiment (the 2). 第1実施形態に係るパッシブオープンの処理手順の一例を示すシーケンス図である(その1)。It is a sequence diagram which shows an example of the process sequence of the passive open which concerns on 1st Embodiment (the 1). 第1実施形態に係るパッシブオープンの処理手順の一例を示すシーケンス図である(その2)。It is a sequence diagram which shows an example of the process sequence of the passive open which concerns on 1st Embodiment (the 2). 第1実施形態に係るパッシブオープンの処理手順の一例を示すシーケンス図である(その3)。It is a sequence diagram which shows an example of the process sequence of the passive open which concerns on 1st Embodiment (the 3). 第1実施形態に係るデータ送信処理の処理手順の一例を示すシーケンス図である。It is a sequence diagram which shows an example of the process sequence of the data transmission process which concerns on 1st Embodiment. 第1実施形態に係るデータ受信処理の処理手順の一例を示すシーケンス図である。It is a sequence diagram which shows an example of the process sequence of the data reception process which concerns on 1st Embodiment. 第1実施形態に係るアクティブクローズの処理手順の一例を示すシーケンス図である。It is a sequence diagram which shows an example of the process sequence of the active close which concerns on 1st Embodiment. 第1実施形態に係るパッシブクローズの処理手順の一例を示すシーケンス図である。It is a sequence diagram which shows an example of the process sequence of the passive close which concerns on 1st Embodiment. 第2実施形態に係る仮想システムの構成例を示す図である。It is a figure which shows the structural example of the virtual system which concerns on 2nd Embodiment. 第2実施形態に係る通信I/Fパケット生成処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the communication I / F packet generation process which concerns on 2nd Embodiment.

次に、本発明を実施するための形態(「実施形態」という)について、適宜図面を参照しながら詳細に説明する。   Next, modes for carrying out the present invention (referred to as “embodiments”) will be described in detail with reference to the drawings as appropriate.

《第1実施形態》
まず、図1〜図19を参照して、本発明の第1実施形態を説明する。
<< First Embodiment >>
First, a first embodiment of the present invention will be described with reference to FIGS.

[システム構成]
図1は、第1実施形態に係る仮想システムの構成例を示す図である。
仮想システムZは、物理的な計算機であるサーバ(通信サーバ)1と、通信先サーバ9とがネットワーク8を介して互いに接続している。
サーバ1には、PCI(Peripheral Component interface)Express(登録商標)などのハードウェアI/F(Interface)6を介して、通信処理の一部をCPU(Central Processing Unit)に代わって行う通信オフロードエンジン(通信装置)5が接続されている。そして、通信オフロードエンジン5は、NI(Network Interface)となるPHY(Physical Layer)などのハードウェアI/F7を介してネットワーク8に接続している。
[System configuration]
FIG. 1 is a diagram illustrating a configuration example of a virtual system according to the first embodiment.
In the virtual system Z, a server (communication server) 1 that is a physical computer and a communication destination server 9 are connected to each other via a network 8.
A communication offload is performed in the server 1 through a hardware I / F (Interface) 6 such as PCI (Peripheral Component Interface) Express (registered trademark) instead of a CPU (Central Processing Unit). An engine (communication device) 5 is connected. The communication offload engine 5 is connected to the network 8 via a hardware I / F 7 such as a PHY (Physical Layer) serving as an NI (Network Interface).

サーバ1では、ハイパバイザ(処理装置)10が実行されており、そのハイパバイザ10が複数のゲストOS2およびドライバOS3を実行・管理している。
ハイパバイザ10は、仮想化技術の1つであり、仮想化環境を実現する仮想化ソフトウェアである。ハイパバイザ10はメインメモリ上で動作しており、ドライバOS3、ゲストOS2を含むすべてのOSはハイパバイザ10上で動作する。なお、メインメモリ上でまず、図示しないホストOSが稼働し、その上でハイパバイザ10が、そのホストOSのアプリケーションとして稼働し、さらに、ハイパバイザ10がドライバOS3やゲストOS2を実行するケースもある。
In the server 1, a hypervisor (processing device) 10 is executed, and the hypervisor 10 executes and manages a plurality of guest OS 2 and driver OS 3.
The hypervisor 10 is one of virtualization technologies, and is virtualization software that realizes a virtualization environment. The hypervisor 10 operates on the main memory, and all the OSs including the driver OS 3 and the guest OS 2 operate on the hypervisor 10. In some cases, a host OS (not shown) is first run on the main memory, and then the hypervisor 10 is run as an application of the host OS, and the hypervisor 10 executes the driver OS 3 and the guest OS 2.

ゲストOS2は、サーバ1上で動作する仮想的なOS(仮想計算機:仮想OS)である。ゲストOS2は仮想化されていない計算機環境で動作するOSと同様の動作をする。仮想化環境下のサーバ1では、複数のゲストOS2が動作可能であり、ゲストOS2として様々な種類のOSを実行できる。
本実施形態では、ゲストOS2は、通信アプリケーション21と、通信I/Fライブラリ処理部23とを実行しているが、これ以外のアプリケーションを実行することも可能である。
通信アプリケーション21は、通信を行うための関数(以下、通信関数と称する)を実行し、ゲストOS2上の通信処理を行う。
The guest OS 2 is a virtual OS (virtual computer: virtual OS) that runs on the server 1. The guest OS 2 operates in the same manner as an OS that operates in a non-virtualized computer environment. In the server 1 under the virtual environment, a plurality of guest OSs 2 can operate, and various types of OSs can be executed as the guest OSs 2.
In the present embodiment, the guest OS 2 executes the communication application 21 and the communication I / F library processing unit 23. However, other applications can be executed.
The communication application 21 executes a function for performing communication (hereinafter referred to as a communication function), and performs communication processing on the guest OS 2.

通信I/Fライブラリ処理部23は、通信アプリケーション21と通信I/Fドライバ31のインタフェースである。
通信I/Fライブラリ処理部23は、通信アプリケーション21で実行された通信関数を、通信I/Fドライバ31で実行可能な通信I/Fパケット(通信情報)へ変換することで、既存の通信アプリケーション21を変更することなく、通信I/Fドライバ31へ通信情報および通信データを渡すI/Fを提供する。
通信I/Fライブラリ処理部23の詳細については、後記して説明する。
The communication I / F library processing unit 23 is an interface between the communication application 21 and the communication I / F driver 31.
The communication I / F library processing unit 23 converts the communication function executed by the communication application 21 into a communication I / F packet (communication information) that can be executed by the communication I / F driver 31, so that the existing communication application An I / F that passes communication information and communication data to the communication I / F driver 31 is provided without changing 21.
Details of the communication I / F library processing unit 23 will be described later.

ドライバOS3は、サーバ1上で動作する仮想OSの1つである。ドライバOS3が各種ハードウェアのドライバを管理することで、サーバ1における各種ハードウェアをゲストOS2が使用できる。ドライバOS3は、様々な種類のOSを使用することができるため、ハードウェアのドライバに合わせて使用するOSを変更することで、特定のOSでしか使えないドライバでも、対応することができる。   The driver OS 3 is one of virtual OSs that operate on the server 1. The driver OS 3 manages drivers of various hardware, so that the guest OS 2 can use various hardware in the server 1. Since the driver OS 3 can use various types of OSs, a driver that can be used only by a specific OS can be supported by changing the OS used according to the hardware driver.

ドライバOS3は、ドライバの1つとして、通信用のドライバである通信I/Fドライバ31を実行している。通信I/Fドライバ31は、通信I/Fライブラリ処理部23より取得した通信I/Fパケットに基づいて、通信情報を通信リングキュー41へ格納する。通信I/Fドライバ31の詳細については、後記して説明する。   The driver OS 3 executes a communication I / F driver 31 that is a communication driver as one of the drivers. The communication I / F driver 31 stores communication information in the communication ring queue 41 based on the communication I / F packet acquired from the communication I / F library processing unit 23. Details of the communication I / F driver 31 will be described later.

なお、通信アプリケーション21と、通信I/Fライブラリ処理部23との間には、ソフトウェアI/F22が介在しており、通信I/Fライブラリ処理部23と、通信I/Fドライバ31間には、ソフトウェアI/F24、32が介在している。通信関数は、一般的な通信関数が使用可能である。たとえば、通信関数としては、TCP/IP通信処理で広く使用されるソケット関数を使用する。   A software I / F 22 is interposed between the communication application 21 and the communication I / F library processing unit 23, and between the communication I / F library processing unit 23 and the communication I / F driver 31. Software I / Fs 24 and 32 are interposed. A general communication function can be used as the communication function. For example, a socket function widely used in TCP / IP communication processing is used as the communication function.

さらに、サーバ1は、後記して説明する通信リングキュー(第2の記憶領域)41や、通信バッファ(第1の記憶領域)42を保持している共通メモリ(記憶装置)4を有する。共通メモリ4には、仮想OS2や、通信I/Fドライバ31や、通信オフロードエンジン5がアクセスすることができる。   Further, the server 1 has a communication ring queue (second storage area) 41, which will be described later, and a common memory (storage device) 4 holding a communication buffer (first storage area) 42. The virtual memory 2, the communication I / F driver 31, and the communication offload engine 5 can access the common memory 4.

通信オフロードエンジン5は、通信処理を行う専用ハードウェアである。通信オフロードエンジン5は、プロトコルスタックエンジン51と、セッション管理テーブル52を有している。
セッション管理テーブル52は、通信のセッションに関する固有の状態情報などのセッション情報を管理するテーブルである。
プロトコルスタックエンジン51は、ハードウェアI/F6を介して共通メモリ4にアクセスすることができ、セッション管理テーブル52のセッション情報や、共通メモリ4の通信リングキュー41の通信情報や、通信バッファ42の通信データを基に、通信パケットの生成や解析をして通信先サーバ9と送受信をする。
The communication offload engine 5 is dedicated hardware that performs communication processing. The communication offload engine 5 includes a protocol stack engine 51 and a session management table 52.
The session management table 52 is a table for managing session information such as unique state information related to a communication session.
The protocol stack engine 51 can access the common memory 4 via the hardware I / F 6. The session information in the session management table 52, the communication information in the communication ring queue 41 in the common memory 4, the communication buffer 42 Based on the communication data, a communication packet is generated and analyzed, and transmitted / received to / from the communication destination server 9.

[ハードウェア構成]
図2は、サーバのハードウェア構成の一例を示す図である。
図1のハイパバイザ10、ゲストOS2、ドライバOS3、通信アプリケーション21、通信I/Fライブラリ処理部23、通信I/Fドライバ31などは、ROM(Read Only Memory)203や、HDD(Hard Disk Drive)204に格納されたプログラムが、RAM(Random Access Memory)202に展開され、CPU201によって実行されることによって具現化する。
また、図1の共通メモリ4は、RAM202あるいはHDD204上に保持され、通信データは、通信インタフェース205(図1の通信オフロードエンジン5およびハードウェアI/F7に相当)を介してネットワーク8へ送信される。
[Hardware configuration]
FIG. 2 is a diagram illustrating an example of a hardware configuration of the server.
The hypervisor 10, guest OS 2, driver OS 3, communication application 21, communication I / F library processing unit 23, communication I / F driver 31, and the like in FIG. 1 include a ROM (Read Only Memory) 203 and a HDD (Hard Disk Drive) 204. The program stored in is expanded in a RAM (Random Access Memory) 202 and executed by the CPU 201.
1 is held on the RAM 202 or the HDD 204, and communication data is transmitted to the network 8 via the communication interface 205 (corresponding to the communication offload engine 5 and the hardware I / F 7 in FIG. 1). Is done.

[通信経路]
図3は、通信データが送受信される際に通る経路を示す図である。
図3を参照して、通信アプリケーション21から通信データが送受信される場合における経路の一例を説明する。各部21、23、31における処理の詳細は後記して説明する。
[Communication path]
FIG. 3 is a diagram illustrating a route through which communication data is transmitted and received.
With reference to FIG. 3, an example of a path when communication data is transmitted and received from the communication application 21 will be described. Details of the processing in each unit 21, 23, 31 will be described later.

図3に示すように、通信アプリケーション21と、通信I/Fライブラリ処理部23とはソフトウェアI/F22を介して、通信のための情報の授受を行い、通信I/Fライブラリ処理部23と、通信I/Fドライバ31とはソフトウェアI/F23、32を介して通信のための情報の授受を行う。また、通信I/Fドライバ31と、通信オフロードエンジン5は、PCI Express(登録商標)などのハードウェアI/F6を介して、通信のための情報の授受を行う。さらに、通信オフロードエンジン5と、通信先サーバ9とは、NIとなるPHYなどのハードウェアI/F7およびネットワーク8を介して、通信を行う。   As shown in FIG. 3, the communication application 21 and the communication I / F library processing unit 23 exchange information for communication via the software I / F 22, and the communication I / F library processing unit 23. The communication I / F driver 31 exchanges information for communication via the software I / Fs 23 and 32. In addition, the communication I / F driver 31 and the communication offload engine 5 exchange information for communication via a hardware I / F 6 such as PCI Express (registered trademark). Further, the communication offload engine 5 and the communication destination server 9 communicate with each other via a hardware I / F 7 such as a PHY that is an NI and the network 8.

[通信I/Fライブラリ処理部]
次に、図4〜図6を参照して、通信I/Fライブラリ処理部23について詳細に説明する。
(通信I/Fパケット)
図4は、通信関数を通信I/Fパケットへ変換する一例を示す図である。
図3の説明で示したように、通信I/Fライブラリ処理部23は、通信アプリケーション21で実行された既存の通信関数、例えばTCP/IPで使用されるソケット関数から、通信情報および通信データを取得し、通信I/Fドライバ31へ送信するための通信I/Fパケットを生成する。
図4では、一例として、送信に関する通信関数であるsend関数401から通信I/Fパケット402への変換方法の例を示している。
send関数401は、引数として、通信のコネクションを識別するソケット番号である「sockfd」、送信するデータを格納するメモリアドレスを示す「sbuf」、送信するデータの長さを示す「len」、送信時における様々な機能について設定する「flags」を有する。また、send関数は、リターン値として送信できたデータのサイズを返す。
[Communication I / F Library Processing Unit]
Next, the communication I / F library processing unit 23 will be described in detail with reference to FIGS.
(Communication I / F packet)
FIG. 4 is a diagram illustrating an example of converting a communication function into a communication I / F packet.
As shown in the description of FIG. 3, the communication I / F library processing unit 23 receives communication information and communication data from an existing communication function executed by the communication application 21, for example, a socket function used in TCP / IP. A communication I / F packet to be acquired and transmitted to the communication I / F driver 31 is generated.
FIG. 4 shows an example of a conversion method from the send function 401, which is a communication function related to transmission, to the communication I / F packet 402 as an example.
The send function 401 includes, as arguments, “sockfd” that is a socket number for identifying a communication connection, “sbuf” that indicates a memory address for storing data to be transmitted, “len” that indicates the length of data to be transmitted, and at the time of transmission. “Flags” for setting various functions in the. The send function returns the size of the data that can be transmitted as a return value.

通信I/Fパケット402の先頭には、通信関数の種別を示すスイッチ変数421を設定する。図5で後記するように、スイッチ変数421は関数毎に設定されており、send関数401に対応する通信I/Fパケット402のスイッチ変数421は5番(switch(5))として設定されている。スイッチ変数421に続いて、通信関数の引数をそれぞれ通信I/Fパケット402に設定することによって、通信I/Fライブラリ処理部23は通信関数を通信I/Fパケット402に変換する。
なお、図4で示した通信I/Fパケット402の生成方法は一例であり、他の方法で通信I/Fパケット402を生成してもよいことは当然である。
At the head of the communication I / F packet 402, a switch variable 421 indicating the type of communication function is set. As will be described later in FIG. 5, the switch variable 421 is set for each function, and the switch variable 421 of the communication I / F packet 402 corresponding to the send function 401 is set as No. 5 (switch (5)). . The communication I / F library processing unit 23 converts the communication function into the communication I / F packet 402 by setting the communication function argument in the communication I / F packet 402 following the switch variable 421.
Note that the method of generating the communication I / F packet 402 shown in FIG. 4 is an example, and it is natural that the communication I / F packet 402 may be generated by other methods.

(スイッチ変数管理テーブル501)
図5は、第1実施形態に係るスイッチ変数管理テーブルの例を示す図である。
スイッチ変数管理テーブル501は、例えばHDD204(図2)などに格納されており、通信I/Fライブラリ処理部23は、このスイッチ変数管理テーブル501の情報に従って通信関数を通信I/Fパケットに変換する。
図5に示すように、スイッチ変数管理テーブル501では、各通信関数に対応するスイッチ変数と、その後に設定される変数(通信情報)が、通信I/Fパケットの後からのビット数で設定されている。つまり、通信関数と、通信I/Fパケットとのビット配列との関係が設定されている。
(Switch variable management table 501)
FIG. 5 is a diagram illustrating an example of a switch variable management table according to the first embodiment.
The switch variable management table 501 is stored in the HDD 204 (FIG. 2), for example, and the communication I / F library processing unit 23 converts the communication function into a communication I / F packet according to the information in the switch variable management table 501. .
As shown in FIG. 5, in the switch variable management table 501, the switch variable corresponding to each communication function and the variable (communication information) set thereafter are set by the number of bits after the communication I / F packet. ing. That is, the relationship between the communication function and the bit arrangement of the communication I / F packet is set.

なお、通信I/Fパケットのサイズは、対応する通信関数に合わせて増減してもよい。
図5の例では、先頭のスイッチ変数(135〜128ビット)により、各種通信関数が識別され、スイッチ変数より後の各種変数は、それぞれの通信関数の引数と一致している。なお、通信関数の引数に該当する部分が通信情報となる。
Note that the size of the communication I / F packet may be increased or decreased in accordance with the corresponding communication function.
In the example of FIG. 5, various communication functions are identified by the first switch variable (135 to 128 bits), and the various variables after the switch variable match the arguments of the respective communication functions. The portion corresponding to the argument of the communication function is communication information.

(フローチャート)
図6は、第1実施形態に係る通信I/Fパケット生成処理の手順を示すフローチャートである。
一般的には、通信アプリケーション21による通信が行われる際には、通信関数が使用され、ゲストOS2上で動作している通信処理のためのソフトウェアであるプロトコルスタックにより、通信処理が行われる。
これに対し、本実施形態では、通信アプリケーション21が実行した通信関数を、通信I/Fライブラリ処理部23が通信I/Fドライバ31による実行が可能な通信I/Fパケットへ変換する。
(flowchart)
FIG. 6 is a flowchart illustrating a procedure of communication I / F packet generation processing according to the first embodiment.
Generally, when communication by the communication application 21 is performed, a communication function is used, and communication processing is performed by a protocol stack that is software for communication processing operating on the guest OS 2.
In contrast, in this embodiment, the communication function executed by the communication application 21 is converted into a communication I / F packet that can be executed by the communication I / F driver 31 by the communication I / F library processing unit 23.

通信アプリケーション21は、通信関数を実行する(S101)。
そして、通信I/Fライブラリ処理部23は、通信関数から通信I/Fパケットを生成する(S102)。
通信I/Fライブラリ処理部23による通信I/Fパケットの生成方法は、図4および図5を参照して説明した通りである。
The communication application 21 executes a communication function (S101).
Then, the communication I / F library processing unit 23 generates a communication I / F packet from the communication function (S102).
The method of generating a communication I / F packet by the communication I / F library processing unit 23 is as described with reference to FIGS.

そして、通信I/Fライブラリ処理部23は通信I/Fドライバ31へ通信I/Fパケットを送信する(S103)。
通信I/Fパケット受信した通信I/Fドライバ31は、図7〜図10で後記する処理を行うことによって通信I/Fパケットを処理し、リターン値を通信I/Fライブラリ処理部23へ返し、通信I/Fライブラリ処理部23は、通信I/Fドライバ31から送信されたリターン値を取得する(S104)。
そして、通信I/Fライブラリ処理部23は、取得したリターン値を通信関数のリターン値として通信アプリケーション21へ送信し(S105)、通信I/Fパケット生成処理を完了する。
Then, the communication I / F library processing unit 23 transmits a communication I / F packet to the communication I / F driver 31 (S103).
The communication I / F driver 31 that has received the communication I / F packet processes the communication I / F packet by performing processing described later in FIGS. 7 to 10, and returns a return value to the communication I / F library processing unit 23. The communication I / F library processing unit 23 acquires the return value transmitted from the communication I / F driver 31 (S104).
Then, the communication I / F library processing unit 23 transmits the acquired return value as the return value of the communication function to the communication application 21 (S105), and completes the communication I / F packet generation process.

[通信リングキュー]
次に、図7〜図10を参照して、通信リングキュー41について詳細に説明する。
(通信リングキュー41の説明図)
図7は、第1実施形態に係る通信リングキューの説明図である。
通信I/Fドライバ31は、通信リングキュー41を使用して、通信オフロードエンジン5と通信情報および通信データのやりとりを行う。
通信リングキュー41は、送信リングキュー702と受信リングキュー701とを有する。送信リングキュー702および受信リングキュー701は、通信セッション毎に生成される。
送信リングキュー702には、送信される通信データを格納する送信バッファ711のメモリアドレスなどが格納されている。同様に、受信リングキュー701には、通信データ(通信データ)を格納する受信バッファ712のメモリアドレスが格納されている。なお、送信バッファ711および受信バッファ712は、通信バッファ42を構成するものであり、実際に送受信するデータ本体(通信データ)が格納されている。
[Communication ring queue]
Next, the communication ring queue 41 will be described in detail with reference to FIGS.
(Explanation of communication ring queue 41)
FIG. 7 is an explanatory diagram of the communication ring queue according to the first embodiment.
The communication I / F driver 31 uses the communication ring queue 41 to exchange communication information and communication data with the communication offload engine 5.
The communication ring queue 41 includes a transmission ring queue 702 and a reception ring queue 701. The transmission ring queue 702 and the reception ring queue 701 are generated for each communication session.
The transmission ring queue 702 stores a memory address of a transmission buffer 711 that stores communication data to be transmitted. Similarly, the reception ring queue 701 stores the memory address of the reception buffer 712 that stores communication data (communication data). Note that the transmission buffer 711 and the reception buffer 712 constitute the communication buffer 42 and store data bodies (communication data) that are actually transmitted and received.

通信データの送信時において、通信I/Fドライバ31は、送信リングキュー702に、通信データに関する各変数に関する通信情報(キューデータ)を格納し、通信オフロードエンジン5のプロトコルスタックエンジン51は、格納されたキューデータを基に、送信バッファ711から通信データを取得する。キューデータについては、後記して説明する。
同様に、通信データの受信時において、通信オフロードエンジン5のプロトコルスタックエンジン51が受信リングキュー701に、受信した通信データを格納している受信バッファ712のメモリアドレスなどをキューデータとして格納し、通信I/Fドライバ31は格納されたキューデータを基に、受信バッファ712から通信データを取得する。
At the time of transmission of communication data, the communication I / F driver 31 stores communication information (queue data) regarding each variable regarding communication data in the transmission ring queue 702, and the protocol stack engine 51 of the communication offload engine 5 stores the communication information. Communication data is acquired from the transmission buffer 711 based on the queued data. The queue data will be described later.
Similarly, when receiving communication data, the protocol stack engine 51 of the communication offload engine 5 stores the memory address of the reception buffer 712 storing the received communication data in the reception ring queue 701 as queue data, The communication I / F driver 31 acquires communication data from the reception buffer 712 based on the stored queue data.

送信リングキュー702および受信リングキュー701は、複数のキュー(図7における1区画)で構成されており、このキューがリング状(巡回性)の構成を有しており、一方向へ順番に処理されるため、通信I/Fドライバ31や、通信オフロードエンジン5のプロトコルスタックエンジン51は送信リングキュー702および受信リングキュー701におけるキューが空いている限り、順番に連続してキューデータを設定・取得できる。送信リングキュー702および受信リングキュー701におけるキューが一杯になった場合は、キューが空くまで、通信I/Fドライバ31や、通信オフロードエンジン5は待機状態となる。   The transmission ring queue 702 and the reception ring queue 701 are configured by a plurality of queues (one section in FIG. 7), and this queue has a ring-shaped (cyclicity) configuration, and sequentially processes in one direction. Therefore, the communication I / F driver 31 and the protocol stack engine 51 of the communication offload engine 5 set the queue data successively in order as long as the queues in the transmission ring queue 702 and the reception ring queue 701 are empty. You can get it. When the queues in the transmission ring queue 702 and the reception ring queue 701 are full, the communication I / F driver 31 and the communication offload engine 5 are in a standby state until the queues become empty.

(通信リングキューの構成)
図8は、第1実施形態に係る通信リングキューの構成例を示す図である。図8では、TCP/IP通信を例に通信リングキュー41(図7)の構成例を示している。また、図8では、通信リングキュー41の1つのキュー(図7の通信リングキュー41の1区画)の構成例を示している。
図8(a)は、送信リングキュー702の構成例を示す図である。
送信リングキュー702は、そのキューが有効であることを示すフラグ(格納情報)、TCP/IP通信で使用する宛先ポート番号、拡張用の予約領域、宛先アドレス、送信データサイズ、通信データが格納されている送信バッファ711のメモリアドレスである送信バッファアドレスを有する。なお、送信リングキュー702の拡張時は、各キューのデータ内容を変更したり、各キューのデータを増設したりしてもよい。
ここで、図8(a)、図8(b)とも、「アドレス」は、そのデータが入る共通メモリ4(図1)上のアドレスを示し、ビットは、アドレスの先頭からのビット数である。
(Communication ring queue configuration)
FIG. 8 is a diagram illustrating a configuration example of a communication ring queue according to the first embodiment. FIG. 8 shows a configuration example of the communication ring queue 41 (FIG. 7) taking TCP / IP communication as an example. Further, FIG. 8 shows a configuration example of one queue of the communication ring queue 41 (one section of the communication ring queue 41 in FIG. 7).
FIG. 8A is a diagram illustrating a configuration example of the transmission ring queue 702.
The transmission ring queue 702 stores a flag (storage information) indicating that the queue is valid, a destination port number used in TCP / IP communication, an expansion reserved area, a destination address, a transmission data size, and communication data. A transmission buffer address which is a memory address of the transmission buffer 711. When the transmission ring queue 702 is expanded, the data content of each queue may be changed or the data of each queue may be increased.
Here, in both FIG. 8 (a) and FIG. 8 (b), “address” indicates an address on the common memory 4 (FIG. 1) in which the data is stored, and the bit is the number of bits from the head of the address. .

受信リングキュー701は、送信リングキュー702と同様の構成を有しており、そのキューが有効であることを示すフラグ、TCP/IP通信で使用する送信元ポート番号、拡張用の予約領域、送信元アドレス、受信データサイズ、通信データが格納されている受信バッファ712のメモリアドレスである受信バッファアドレスを有する。なお、受信リングキュー701の拡張時は、各キューのデータ内容を変更したり、各キューのデータを増設したりしてもよい。   The reception ring queue 701 has the same configuration as that of the transmission ring queue 702, a flag indicating that the queue is valid, a transmission source port number used in TCP / IP communication, an expansion reserved area, a transmission It has a reception buffer address which is a memory address of the reception buffer 712 in which the original address, the reception data size, and the communication data are stored. When the reception ring queue 701 is expanded, the data contents of each queue may be changed or the data of each queue may be increased.

[通信I/Fドライバ31]
次に、図9および図10を参照して、通信I/Fドライバ31について詳細に説明する。
(構成図)
図9は、通信I/Fドライバの構成と、他の機能部との関係を示す図である。図9において、図1と同様の構成については、同一の符号を付して説明を省略する。また、図9において、通信I/Fライブラリ処理部23、ソフトウェアI/F22、24、32、ハードウェアI/F6は省略されている。
通信I/Fドライバ31は、通信I/Fスイッチ処理部901、割込処理部902を有している。なお、通信I/Fドライバ31は、ライン921を介して、直接通信オフロードエンジン5のプロトコルスタックエンジン51における内部レジスタ(図示せず)およびメモリ(図示せず)に対して、読み書きすることも可能である。
通信I/Fスイッチ処理部901は、通信I/Fライブラリ処理部23から渡される通信I/Fパケットのスイッチ番号に従って関数処理を行う。通信I/Fスイッチ処理部901の詳細については後記する。
割込処理部902は、通信オフロードエンジン5のプロトコルスタックエンジン51における割込処理部911など、各種ハードウェアによる通信I/Fドライバ31への割り込みを処理する。
[Communication I / F driver 31]
Next, the communication I / F driver 31 will be described in detail with reference to FIGS. 9 and 10.
(Diagram)
FIG. 9 is a diagram illustrating the relationship between the configuration of the communication I / F driver and other functional units. In FIG. 9, the same components as those of FIG. In FIG. 9, the communication I / F library processing unit 23, the software I / Fs 22, 24, and 32, and the hardware I / F 6 are omitted.
The communication I / F driver 31 includes a communication I / F switch processing unit 901 and an interrupt processing unit 902. Note that the communication I / F driver 31 can also read and write to an internal register (not shown) and a memory (not shown) in the protocol stack engine 51 of the direct communication offload engine 5 via the line 921. Is possible.
The communication I / F switch processing unit 901 performs function processing according to the switch number of the communication I / F packet passed from the communication I / F library processing unit 23. Details of the communication I / F switch processing unit 901 will be described later.
The interrupt processing unit 902 processes an interrupt to the communication I / F driver 31 by various hardware such as the interrupt processing unit 911 in the protocol stack engine 51 of the communication offload engine 5.

共通メモリ4における通信リングキュー41は、ゲストOS2(#1)に対応した通信リングキュー41(#1)や、ゲストOS2(#2)に対応した通信リングキュー41(#2)のようにゲストOS2毎に生成される。さらに、通信リングキュー41は、ゲストOS2上で動作する通信アプリケーションプロセス951毎に生成される。図9の例では、ゲストOS2(#1)で実行されている通信アプリケーションプロセス951(#1a)に対する通信リングキュー41(#1a)、ゲストOS2(#2)で実行されている通信アプリケーションプロセス951(#2a)に対応する通信リングキュー41(#2a)、通信アプリケーションプロセス951(#2b)に対応する通信リングキュー41(#2b)が生成されている。それぞれの通信リングキュー41が送信リングキュー702および受信リングキュー701を有することは前記した通りである。ここで、通信アプリケーションプロセス951は、通信アプリケーション21(図1)におけるプロセスである。   The communication ring queue 41 in the common memory 4 is a guest such as the communication ring queue 41 (# 1) corresponding to the guest OS2 (# 1) and the communication ring queue 41 (# 2) corresponding to the guest OS2 (# 2). Generated for each OS2. Further, the communication ring queue 41 is generated for each communication application process 951 operating on the guest OS 2. In the example of FIG. 9, the communication ring queue 41 (# 1a) for the communication application process 951 (# 1a) executed in the guest OS2 (# 1) and the communication application process 951 executed in the guest OS2 (# 2) The communication ring queue 41 (# 2a) corresponding to (# 2a) and the communication ring queue 41 (# 2b) corresponding to the communication application process 951 (# 2b) are generated. As described above, each communication ring queue 41 has a transmission ring queue 702 and a reception ring queue 701. Here, the communication application process 951 is a process in the communication application 21 (FIG. 1).

通信データを通信先サーバ9へ送信する場合、通信I/Fドライバ31の通信I/Fスイッチ処理部901は、送信リングキュー702に各種通信情報を格納し、該当するキューのフラグ(図8参照)を「有効」にする。
送信が連続して実行される場合、通信I/Fドライバ31の通信I/Fスイッチ処理部901は送信リングキュー702の各キューに通信情報を次々と格納し、そのキューのフラグを「有効」にする。
When transmitting communication data to the destination server 9, the communication I / F switch processing unit 901 of the communication I / F driver 31 stores various communication information in the transmission ring queue 702, and flags the corresponding queue (see FIG. 8). ) To “Enable”.
When transmission is executed continuously, the communication I / F switch processing unit 901 of the communication I / F driver 31 stores communication information in each queue of the transmission ring queue 702 one after another, and sets the flag of the queue to “valid”. To.

通信オフロードエンジン5のプロトコルスタックエンジン51は、送信リングキュー702のフラグを参照し、「有効」であればその送信リングキュー702の宛先ポート番号、宛先アドレスの情報(いずれも図8参照)を取得し、さらに、送信バッファアドレス(図8参照)から通信データが格納されている送信バッファ711のメモリアドレスを取得する。そして、通信オフロードエンジン5のプロトコルスタックエンジン51は、送信リングキュー702の送信データサイズを参照し、取得した送信バッファアドレスから参照した送信データサイズ分の長さのデータを取得し、取得したデータを通信データとして宛先アドレス(通信先サーバ9)へ送信する。その後、通信オフロードエンジン5のプロトコルスタックエンジン51は、送信リングキュー702のフラグを「無効」にし、次の送信リングキュー702を処理する。   The protocol stack engine 51 of the communication offload engine 5 refers to the flag of the transmission ring queue 702. If “valid”, the destination port number and destination address information of the transmission ring queue 702 (both refer to FIG. 8). Further, the memory address of the transmission buffer 711 storing the communication data is acquired from the transmission buffer address (see FIG. 8). Then, the protocol stack engine 51 of the communication offload engine 5 refers to the transmission data size of the transmission ring queue 702, acquires data having a length corresponding to the transmission data size referred to from the acquired transmission buffer address, and acquires the acquired data. Is transmitted as communication data to the destination address (communication destination server 9). Thereafter, the protocol stack engine 51 of the communication offload engine 5 sets the flag of the transmission ring queue 702 to “invalid” and processes the next transmission ring queue 702.

通信データを通信先サーバ9から受信する場合、通信アプリケーション21がrecv(receive)関数を実行する。recv関数には、受信バッファアドレスが引数として設定されており、通信I/Fパケットの通信情報として、この受信バッファアドレスを受け取った通信I/Fドライバ31は、受信バッファアドレスを受信リングキュー701の受信バッファアドレスに格納する。
通信オフロードエンジン5のプロトコルスタックエンジン51は、通信先サーバ9から通信データを受信すると、受信リングキュー701のうち、フラグが「無効」となっているキューの受信バッファアドレスを取得し、取得した受信バッファアドレスに該当する受信バッファ712に受信した通信データを格納する。そして、通信オフロードエンジン5のプロトコルスタックエンジン51は、格納した通信データのサイズを、受信リングキュー701の受信データサイズ(図8参照)の部分に設定し、受信リングキュー701の処理対象フラグ(図8参照)を「有効」にする。通信I/Fドライバ31の通信I/Fスイッチ処理部901は、受信リングキュー701のフラグが「有効」であるキューの受信バッファアドレスと通信データサイズを参照し、通信I/Fライブラリ処理部23へリターン値を返して、さらに、通信I/Fライブラリ処理部23は通信アプリケーション21へリターン値を送信する。
通信アプリケーション21は、通信I/Fドライバ31からリターン値を受信すると、実行したrecv関数の引数に設定されている受信バッファアドレスから、受信した通信データを取得する。
When receiving communication data from the communication destination server 9, the communication application 21 executes a recv (receive) function. In the recv function, a reception buffer address is set as an argument, and the communication I / F driver 31 that has received this reception buffer address as communication information of the communication I / F packet receives the reception buffer address in the reception ring queue 701. Store in the receive buffer address.
When the protocol stack engine 51 of the communication offload engine 5 receives the communication data from the communication destination server 9, the protocol stack engine 51 acquires the reception buffer address of the queue whose flag is “invalid” from the reception ring queue 701 and acquires the received buffer address The received communication data is stored in the reception buffer 712 corresponding to the reception buffer address. Then, the protocol stack engine 51 of the communication offload engine 5 sets the size of the stored communication data in the reception data size (see FIG. 8) portion of the reception ring queue 701, and sets the processing target flag ( “Refer to FIG. 8” is set to “valid”. The communication I / F switch processing unit 901 of the communication I / F driver 31 refers to the reception buffer address and communication data size of the queue for which the flag of the reception ring queue 701 is “valid”, and the communication I / F library processing unit 23 Then, the communication I / F library processing unit 23 transmits the return value to the communication application 21.
When receiving the return value from the communication I / F driver 31, the communication application 21 acquires the received communication data from the reception buffer address set in the argument of the executed recv function.

その後、通信I/Fドライバ31の通信I/Fスイッチ処理部901は受信リングキュー701の処理対象フラグを「無効」にする。
再度、通信アプリケーション21がrecv関数を実行した場合、受信バッファアドレス、受信バッファサイズ等を設定し、受信リングキュー701のフラグを受信可能に設定する。
Thereafter, the communication I / F switch processing unit 901 of the communication I / F driver 31 sets the processing target flag of the reception ring queue 701 to “invalid”.
When the communication application 21 executes the recv function again, the reception buffer address, the reception buffer size, and the like are set, and the flag of the reception ring queue 701 is set to be receivable.

このようにすることで、送信時、受信時とも、各機能部間の通信データのやりとりは、通信バッファ42のメモリアドレスで行うため、通信データのコピーに関するプロセッサ負荷を低減することができる。つまり、通信バッファ42のメモリアドレス(例えば、C言語におけるポインタ)で通信データのやりとりが管理され、通信バッファ42に格納されている通信データ本体は移動しないされない(コピー)こととなり、通信データのコピーに関するプロセッサ負荷や、メモリ負荷を低減することができる。   By doing so, since communication data is exchanged between the functional units at the time of transmission and reception at the memory address of the communication buffer 42, it is possible to reduce the processor load related to the copy of the communication data. That is, the communication data is managed by the memory address of the communication buffer 42 (for example, a pointer in C language), and the main body of the communication data stored in the communication buffer 42 is not moved (copied). Processor load and memory load can be reduced.

(通信I/Fパケット処理)
図10は、第1実施形態に係る通信I/Fパケット処理の手順を示すフローチャートである。
まず、通信I/Fドライバ31の通信I/Fスイッチ処理部901は、通信I/Fライブラリ処理部23から通信I/Fパケット301を受信する(S201)。
そして、通信I/Fスイッチ処理部901は、受信した通信I/Fパケットの先頭のスイッチ変数(図4)を判定する(S202)。これにより、通信I/Fスイッチ処理部901は、受信した通信I/Fパケットが、どの通信関数に対応するかを判定する。通信I/Fスイッチ変数と、通信関数の種別との対応は、図5で前記したスイッチ変数管理テーブル501に準じる。
(Communication I / F packet processing)
FIG. 10 is a flowchart illustrating a communication I / F packet processing procedure according to the first embodiment.
First, the communication I / F switch processing unit 901 of the communication I / F driver 31 receives the communication I / F packet 301 from the communication I / F library processing unit 23 (S201).
Then, the communication I / F switch processing unit 901 determines the head switch variable (FIG. 4) of the received communication I / F packet (S202). As a result, the communication I / F switch processing unit 901 determines which communication function the received communication I / F packet corresponds to. The correspondence between the communication I / F switch variable and the type of the communication function conforms to the switch variable management table 501 described above with reference to FIG.

スイッチ変数が「0」であれば(S202→0)、通信I/Fスイッチ処理部901は通信関数名を「socket」と判定し、通信I/Fドライバ31および通信オフロードエンジン5は図8におけるライン921を介して、通信で使用するソケットを生成し、共通メモリ4上に通信リングキュー41を生成するsocket関数処理を行う(S203)。
スイッチ変数が「1」であれば(S202→1)、通信I/Fスイッチ処理部901は通信関数名を「bind」と判定し、図9におけるライン921を介して、生成したソケットに自己情報(アドレス、ポート番号)を割り当てるbind関数処理を行う(S204)。
スイッチ変数が「2」であれば(S202→2)、通信I/Fスイッチ処理部901は通信関数名を「listen」と判定し、通信I/Fドライバ31および通信オフロードエンジン5は図9におけるライン921を介して、自己情報を割り当てたソケットを待ち受けソケットとして登録するlisten関数処理を行う(S205)。
If the switch variable is “0” (S202 → 0), the communication I / F switch processing unit 901 determines that the communication function name is “socket”, and the communication I / F driver 31 and the communication offload engine 5 perform FIG. A socket used for communication is generated via the line 921 in FIG. 5 and socket function processing for generating the communication ring queue 41 on the common memory 4 is performed (S203).
If the switch variable is “1” (S202 → 1), the communication I / F switch processing unit 901 determines that the communication function name is “bind”, and sends the self-information to the generated socket via the line 921 in FIG. A bind function process for assigning (address, port number) is performed (S204).
If the switch variable is “2” (S202 → 2), the communication I / F switch processing unit 901 determines that the communication function name is “listen”, and the communication I / F driver 31 and the communication offload engine 5 perform FIG. The listen function process for registering the socket to which the self information is assigned as a standby socket is performed via the line 921 (S205).

スイッチ変数が「3」であれば(S202→3)、通信I/Fスイッチ処理部901は通信関数名を「accept」と判定し、通信I/Fドライバ31および通信オフロードエンジン5は図9におけるライン921を介して、接続相手の待ち受けを行い、接続が確立した場合、新たにソケットを生成するaccept関数処理を行う(S206)。
スイッチ変数が「4」であれば(S202→4)、通信I/Fスイッチ処理部901は通信関数名を「connect」と判定し、通信I/Fドライバ31および通信オフロードエンジン5は図9におけるライン921を介して、指定したアドレスおよびポート番号に対して接続要求を発行するconnect関数処理を行う(S207)。
If the switch variable is “3” (S202 → 3), the communication I / F switch processing unit 901 determines that the communication function name is “accept”, and the communication I / F driver 31 and the communication offload engine 5 perform FIG. The connection partner is waited for through the line 921, and when the connection is established, an accept function process for generating a new socket is performed (S206).
If the switch variable is “4” (S202 → 4), the communication I / F switch processing unit 901 determines that the communication function name is “connect”, and the communication I / F driver 31 and the communication offload engine 5 perform FIG. Then, a connect function process for issuing a connection request to the designated address and port number is performed via the line 921 (S207).

スイッチ変数が「5」であれば(S202→5)、通信I/Fスイッチ処理部901は通信関数名を「send」と判定し、通信I/Fドライバ31および通信オフロードエンジン5は通信データの送信を行うsend関数処理を行う(S208)。
スイッチ変数が「6」であれば(S202→6)、通信I/Fスイッチ処理部901は通信関数名を「recv(receive)」と判定し、通信I/Fドライバ31および通信オフロードエンジン5は通信データの受信を行うrecv関数処理を行う(S209)。
スイッチ変数が「7」であれば(S202→7)、通信I/Fスイッチ処理部901は通信関数名を「close」と判定し、通信I/Fドライバ31および通信オフロードエンジン5は図9におけるライン921を介して、ソケットを閉じるclose関数処理を行う(S210)。
ステップS203〜S210の各処理の詳細は後記する。
なお、これら関数はアプリケーション処理のオフロード化に合わせて増減してもよい。
If the switch variable is “5” (S202 → 5), the communication I / F switch processing unit 901 determines that the communication function name is “send”, and the communication I / F driver 31 and the communication offload engine 5 communicate data. The send function processing for transmitting is performed (S208).
If the switch variable is “6” (S202 → 6), the communication I / F switch processing unit 901 determines that the communication function name is “recv (receive)”, and the communication I / F driver 31 and the communication offload engine 5 Performs recv function processing for receiving communication data (S209).
If the switch variable is “7” (S202 → 7), the communication I / F switch processing unit 901 determines that the communication function name is “close”, and the communication I / F driver 31 and the communication offload engine 5 perform FIG. A close function process for closing the socket is performed via the line 921 (S210).
Details of each processing in steps S203 to S210 will be described later.
Note that these functions may be increased or decreased as application processing is offloaded.

ステップS203〜S210の各処理を終了した後、通信I/Fスイッチ処理部901は、各通信関数が要求するリターン値を、通信I/Fライブラリへ送信し(S211)、通信I/Fパケット処理を終了する。   After completing each processing of steps S203 to S210, the communication I / F switch processing unit 901 transmits a return value requested by each communication function to the communication I / F library (S211), and performs communication I / F packet processing. Exit.

[TCP/IP通信の例]
次に、図1、図7、図9を参照しつつ、図11〜図19に沿って、本実施形態の一例としてTCP/IP通信を行った時のシーケンスを説明する。
TCP/IP通信では、送受信の通信に先立っての準備として接続確立シーケンスが必要となる。TCP/IP通信では、シーケンス番号と呼ばれる番号を使用して、どこまで送信および受信したかを管理するが、このシーケンス番号の初期値を送信側、受信側で交換し合い、通信を開始する。
[Example of TCP / IP communication]
Next, a sequence when TCP / IP communication is performed as an example of the present embodiment will be described along FIGS. 11 to 19 with reference to FIGS. 1, 7, and 9.
In TCP / IP communication, a connection establishment sequence is required as preparation prior to transmission / reception communication. In TCP / IP communication, a number called a sequence number is used to manage how far the data has been transmitted and received. The initial value of this sequence number is exchanged between the transmitting side and the receiving side, and communication is started.

(アクティブオープン)
図11および図12は、第1実施形態に係るアクティブオープンの処理手順の一例を示すシーケンス図である。なお、アクティブオープンは、サーバ1の方から通信先サーバ9に対して先に接続確立の要求を送信するオープン処理である。
まず、ゲストOS2の通信アプリケーション21が、socket関数を実行し(S301)、通信用のソケットを生成する。
そして、通信I/Fライブラリ処理部23が、実行されたsocket関数を基に、図6のステップS102における通信I/Fパケット生成処理を行って、socket関数に対応する通信I/Fパケットを生成し、生成した通信I/Fパケットを通信I/Fドライバ31へ送信する(S302:図6のS103に相当)。
(Active open)
FIG. 11 and FIG. 12 are sequence diagrams showing an example of an active open processing procedure according to the first embodiment. The active open is an open process in which the server 1 transmits a connection establishment request to the communication destination server 9 first.
First, the communication application 21 of the guest OS 2 executes a socket function (S301), and generates a communication socket.
Then, the communication I / F library processing unit 23 performs communication I / F packet generation processing in step S102 of FIG. 6 based on the executed socket function, and generates a communication I / F packet corresponding to the socket function. Then, the generated communication I / F packet is transmitted to the communication I / F driver 31 (S302: equivalent to S103 in FIG. 6).

通信I/Fパケットを受信した通信I/Fドライバ31の通信I/Fスイッチ処理部901は、図10のステップS202の処理を行い、受信した通信I/Fパケットがsocket関数に対応するものであると判定すると、共通メモリ4上に実行している通信アプリケーション21に対応する通信リングキュー41を生成する(S303)。さらに、通信I/Fスイッチ処理部901はセッション情報を生成し、通信オフロードエンジン5のセッション管理テーブル52に、生成したセッション情報を格納する(S304)。ステップS303、S304の処理が図10のステップS203に相当する処理(socket関数処理)である。
そして、通信I/Fドライバ31の通信I/Fスイッチ処理部901は、通信I/Fライブラリ処理部23へリターン値を送信し(S305:図10のS211に相当)、さらに、通信I/Fライブラリ処理部23は通信アプリケーション21へリターン値(ソケットの識別子)を送信する(S306)。
The communication I / F switch processing unit 901 of the communication I / F driver 31 that has received the communication I / F packet performs the process of step S202 in FIG. 10, and the received communication I / F packet corresponds to the socket function. If it is determined that there is a communication ring queue 41 corresponding to the communication application 21 being executed on the common memory 4 (S303). Further, the communication I / F switch processing unit 901 generates session information, and stores the generated session information in the session management table 52 of the communication offload engine 5 (S304). The processing in steps S303 and S304 is processing (socket function processing) corresponding to step S203 in FIG.
Then, the communication I / F switch processing unit 901 of the communication I / F driver 31 transmits a return value to the communication I / F library processing unit 23 (S305: equivalent to S211 in FIG. 10), and further, the communication I / F The library processing unit 23 transmits a return value (socket identifier) to the communication application 21 (S306).

続いて、通信アプリケーション21は、connect関数を実行する(S307)。
通信I/Fライブラリ処理部23は、実行されたconnect関数を基に、図6のステップS102の処理により、対応する通信I/Fパケットを生成し、通信I/Fドライバ31へ送信する(S308:図6のS103に相当)。
この通信I/Fパケットを受信した通信I/Fドライバ31の通信I/Fスイッチ処理部901は、図10のステップS202の処理を行い、受信した通信I/Fパケットがconnect関数に対応するものであると判定すると、通信先サーバ9の宛先アドレスなどのセッション情報を通信オフロードエンジン5のセッション管理テーブル52へ格納し、接続確立を行う(S309)。
Subsequently, the communication application 21 executes a connect function (S307).
Based on the executed connect function, the communication I / F library processing unit 23 generates a corresponding communication I / F packet by the processing in step S102 of FIG. 6, and transmits it to the communication I / F driver 31 (S308). : Equivalent to S103 in FIG. 6).
The communication I / F switch processing unit 901 of the communication I / F driver 31 that has received this communication I / F packet performs the process of step S202 of FIG. 10, and the received communication I / F packet corresponds to the connect function. If it is determined, the session information such as the destination address of the communication destination server 9 is stored in the session management table 52 of the communication offload engine 5 to establish a connection (S309).

そして、通信オフロードエンジン5のプロトコルスタックエンジン51は、ゲストOS2に該当する通信リングキュー41にアクセスし(S310)、送信リングキュー702および受信リングキュー701のキューデータを取得し(S311)、受信に対応できるようにする(受信対応準備完了)。以下、アクセスする受信リングキュー701は、処理対象となっているゲストOS2に対応している受信リングキュー701である(図9参照)。なお、各キューデータには、対応する受信バッファ712のメモリアドレスがあらかじめ格納されており、その他の情報は空欄となっている。
そして、通信オフロードエンジン5のプロトコルスタックエンジン51は、接続が確立された通信先サーバ9に対して、ネットワーク8を通して、SYN(SYNchronize)フラグをセットしたTCP/IPパケット(SYNパケット)を送信する(図12のS312)。
Then, the protocol stack engine 51 of the communication offload engine 5 accesses the communication ring queue 41 corresponding to the guest OS 2 (S310), acquires the queue data of the transmission ring queue 702 and the reception ring queue 701 (S311), and receives the data. Ready for reception (ready for reception). Hereinafter, the reception ring queue 701 to be accessed is the reception ring queue 701 corresponding to the guest OS 2 to be processed (see FIG. 9). Each queue data stores a memory address of the corresponding reception buffer 712 in advance, and other information is blank.
Then, the protocol stack engine 51 of the communication offload engine 5 transmits a TCP / IP packet (SYN packet) in which a SYN (Synchronize) flag is set through the network 8 to the communication destination server 9 with which the connection has been established. (S312 in FIG. 12).

SYNパケットを受信した通信先サーバ9は、受信したTCP/IPパケットの応答として、SYNフラグとACK(ACKnowledgement)フラグをセットしたTCP/IPパケット(SYN−ACKパケット)をサーバ1へ送信する(S313)。
通信先サーバ9からSYN−ACKパケットを受信した通信オフロードエンジン5のプロトコルスタックエンジン51は、このTCP/IPパケットを受信した旨を示すACKフラグをセットしたTCP/IPパケット(ACKパケット)を送り通信先サーバ9へ送信する(S314)
The communication destination server 9 that has received the SYN packet transmits a TCP / IP packet (SYN-ACK packet) in which a SYN flag and an ACK (ACKnowledgement) flag are set to the server 1 as a response to the received TCP / IP packet (S313). ).
The protocol stack engine 51 of the communication offload engine 5 that has received the SYN-ACK packet from the communication destination server 9 sends a TCP / IP packet (ACK packet) in which an ACK flag indicating that this TCP / IP packet has been received is set. It transmits to the communication destination server 9 (S314).


そして、通信オフロードエンジン5の割込処理部911は通信I/Fドライバ31の割込処理部902へ、接続確立完了割込を通知し(S315)、接続確立完了割込を受信した通信I/Fドライバ31の割込処理部902は通信オフロードエンジン5の割込処理部911へ接続確立完了割込を受けたことを通知する割込クリアする(S316)ことにより接続確立完了割込の通知を受け取ったことを通信オフロードエンジン5へ通知する。なお、ステップS309〜S316の処理が図10のステップS207の処理(connect関数処理)に該当する。
.
Then, the interrupt processing unit 911 of the communication offload engine 5 notifies the interrupt processing unit 902 of the communication I / F driver 31 of the connection establishment completion interrupt (S315), and the communication I that has received the connection establishment completion interrupt. The interrupt processing unit 902 of the / F driver 31 clears the interrupt that notifies the interrupt processing unit 911 of the communication offload engine 5 that the connection establishment completion interrupt has been received (S316). The communication offload engine 5 is notified that the notification has been received. Note that the processing in steps S309 to S316 corresponds to the processing in step S207 (connect function processing) in FIG.

続いて、通信I/Fドライバ31の通信I/Fスイッチ処理部901は、接続確立が完了したことを示すリターン値を通信I/Fライブラリ処理へ送信し(S317:図10のS211に相当)、通信I/Fライブラリ処理部23は通信アプリケーション21へリターン値を送信する(S318:図6のS105に相当)ことにより、接続確立完了を通信アプリケーション21へ通知する。
以上が、アクティブオープンのシーケンスである。仮想システムZは、このシーケンスにより、通信データの送受信が可能となる。
Subsequently, the communication I / F switch processing unit 901 of the communication I / F driver 31 transmits a return value indicating that the connection establishment is completed to the communication I / F library process (S317: equivalent to S211 in FIG. 10). Then, the communication I / F library processing unit 23 sends a return value to the communication application 21 (S318: corresponding to S105 in FIG. 6), thereby notifying the communication application 21 of the completion of connection establishment.
The above is the active open sequence. The virtual system Z can transmit and receive communication data by this sequence.

(パッシブオープン)
図13〜図15は、第1実施形態に係るパッシブオープンの処理手順の一例を示すシーケンス図である。パッシブオープンは、相手が自分に対して先に接続確立の要求を送信するオープン処理である。
まず、ゲストOS2の通信アプリケーション21が、socket関数を実行する(S401)。
そして、通信I/Fライブラリ処理部23が、生成されたsocket関数を基に、図6のステップS102における通信I/Fパケット生成処理を行って、socket関数に対応する通信I/Fパケットを生成し、生成した通信I/Fパケットを通信I/Fドライバ31へ送信する(S402:図6のS103に相当)。
(Passive open)
13 to 15 are sequence diagrams illustrating an example of a passive open processing procedure according to the first embodiment. Passive open is an open process in which a partner sends a connection establishment request to itself first.
First, the communication application 21 of the guest OS 2 executes a socket function (S401).
Then, the communication I / F library processing unit 23 performs communication I / F packet generation processing in step S102 of FIG. 6 based on the generated socket function, and generates a communication I / F packet corresponding to the socket function. Then, the generated communication I / F packet is transmitted to the communication I / F driver 31 (S402: equivalent to S103 in FIG. 6).

通信I/Fパケットを受信した通信I/Fドライバ31の通信I/Fスイッチ処理部901は、図10のステップS202の処理を行い、受信した通信I/Fパケットがsocket関数に対応するものであると判定すると、共通メモリ4上に通信リングキュー41を生成し(S403)、セッション情報を生成し、通信オフロードエンジン5のセッション管理テーブル52に、生成したセッション情報を格納する(S404)。なお、ステップS403、404の処理が図10のステップS203の処理(socket関数処理)に該当する。
そして、通信I/Fドライバ31の通信I/Fスイッチ処理部901は、通信I/Fライブラリ処理部23へリターン値(ソケットの識別子)を送信し(S405:図10のS211に相当)、さらに通信I/Fライブラリ処理部23は通信アプリケーション21へリターン値を送信する(S406:図6のS105に相当)。
The communication I / F switch processing unit 901 of the communication I / F driver 31 that has received the communication I / F packet performs the process of step S202 in FIG. 10, and the received communication I / F packet corresponds to the socket function. When it is determined that there is a communication ring queue 41 on the common memory 4 (S403), session information is generated, and the generated session information is stored in the session management table 52 of the communication offload engine 5 (S404). Note that the processing in steps S403 and 404 corresponds to the processing in step S203 (socket function processing) in FIG.
Then, the communication I / F switch processing unit 901 of the communication I / F driver 31 transmits a return value (socket identifier) to the communication I / F library processing unit 23 (S405: equivalent to S211 in FIG. 10). The communication I / F library processing unit 23 transmits a return value to the communication application 21 (S406: corresponding to S105 in FIG. 6).

次に、通信アプリケーション21は、bind関数を実行する(S407)。
通信I/Fライブラリ処理部23は、実行されたbind関数を、図6のステップS102の通信I/Fパケット生成処理により、対応する通信I/Fパケットを生成し、通信I/Fドライバ31へ送信する(S408::図6のS103に相当)。
この通信I/Fパケットを受信した通信I/Fドライバ31の通信I/Fスイッチ処理部901は、図10のステップS202の処理を行い、受信した通信I/Fパケットがbind関数に対応するものであると判定すると、セッション情報を生成し、生成したセッション情報をセッション管理テーブル52に格納する(S409)。なお、ステップS409の処理が図10のステップS204の処理(bind関数処理)に該当する。
続いて、通信I/Fドライバ31の通信I/Fスイッチ処理部901は、リターン値を通信I/Fライブラリ処理部23へ送信し(S410:図10のS211に相当)、さらに、通信I/Fライブラリ処理部23はリターン値を通信アプリケーション21へ送信する(S411:図6のS105に相当)ことで、セッション情報の格納が完了したことを通信アプリケーション21へ通知する。
Next, the communication application 21 executes the bind function (S407).
The communication I / F library processing unit 23 generates a corresponding communication I / F packet from the executed bind function by the communication I / F packet generation processing in step S <b> 102 of FIG. 6, and sends it to the communication I / F driver 31. Transmit (S408 :: equivalent to S103 in FIG. 6).
The communication I / F switch processing unit 901 of the communication I / F driver 31 that has received this communication I / F packet performs the process of step S202 in FIG. 10, and the received communication I / F packet corresponds to the bind function. If it is determined, the session information is generated, and the generated session information is stored in the session management table 52 (S409). Note that the processing in step S409 corresponds to the processing in step S204 (bind function processing) in FIG.
Subsequently, the communication I / F switch processing unit 901 of the communication I / F driver 31 transmits a return value to the communication I / F library processing unit 23 (S410: equivalent to S211 in FIG. 10), and further, the communication I / F The F library processing unit 23 transmits a return value to the communication application 21 (S411: corresponding to S105 in FIG. 6), thereby notifying the communication application 21 that the storage of the session information has been completed.

続いて、通信アプリケーション21はlisten関数を実行する(図14のS412)。
通信I/Fライブラリ処理部23は、実行されたlisten関数を、図6のステップS102の通信I/Fパケット生成処理を行うことによって、対応する通信I/Fパケットを生成し、通信I/Fドライバ31へ送信する(S413:図6のS103に相当)。
この通信I/Fパケットを受信した通信I/Fドライバ31の通信I/Fスイッチ処理部901は、図10のステップS202の処理を行い、受信した通信I/Fパケットがlisten関数に対応するものであると判定すると、通信オフロードエンジン5のセッション管理テーブル52に対して受信確立フラグをセットする(S414)。これにより、通信オフロードエンジン5は、通信先サーバ9からの接続確立を受けることができる。
そして、通信オフロードエンジン5のプロトコルスタックエンジン51は、通信リングキュー41にアクセスし(S415)、送信リングキュー702および受信リングキュー701のキューデータを取得し(S416)、受信に対応できるようにする(受信対応準備完了)。なお、各キューデータには、対応する受信バッファ712のメモリアドレスがあらかじめ格納されており、その他の情報は空欄となっている。
Subsequently, the communication application 21 executes a listen function (S412 in FIG. 14).
The communication I / F library processing unit 23 generates a corresponding communication I / F packet by performing the communication I / F packet generation process in step S102 of FIG. 6 on the executed listen function, and generates a communication I / F. The data is transmitted to the driver 31 (S413: equivalent to S103 in FIG. 6).
The communication I / F switch processing unit 901 of the communication I / F driver 31 that has received this communication I / F packet performs the process of step S202 of FIG. 10, and the received communication I / F packet corresponds to the listen function. If it is determined, the reception establishment flag is set in the session management table 52 of the communication offload engine 5 (S414). Accordingly, the communication offload engine 5 can receive connection establishment from the communication destination server 9.
Then, the protocol stack engine 51 of the communication offload engine 5 accesses the communication ring queue 41 (S415), acquires the queue data of the transmission ring queue 702 and the reception ring queue 701 (S416), and can handle reception. (Reception ready) Each queue data stores a memory address of the corresponding reception buffer 712 in advance, and other information is blank.

ステップS416が終了すると、通信オフロードエンジン5の割込処理部911は、受信準備完了を通知するための受信準備完了割込を通信I/Fドライバ31へ送信する(S417)。
受信対応準備完了の通知を受信した通信I/Fドライバ31の割込処理部902は、割込クリアする(S418)ことにより受信対応準備完了の通知を受け取ったことを通信オフロードエンジン5へ通知する。なお、ステップS414〜S418の処理が図10のステップS205(listen関数処理)の処理に該当する。
When step S416 ends, the interrupt processing unit 911 of the communication offload engine 5 transmits a reception preparation completion interrupt for notifying completion of reception preparation to the communication I / F driver 31 (S417).
The interrupt processing unit 902 of the communication I / F driver 31 that has received the reception ready preparation notification notifies the communication offload engine 5 that the reception ready preparation notification has been received by clearing the interrupt (S418). To do. Note that the processing in steps S414 to S418 corresponds to the processing in step S205 (listen function processing) in FIG.

その後、通信I/Fドライバ31の通信I/Fスイッチ処理部901は、listen関数処理が終了したことを示すリターン値を通信I/Fライブラリ処理部23へ送信し(S419:図10のS211に相当)、通信I/Fライブラリ処理部23は通信アプリケーション21へリターン値を送信する(S420:図6のS105に相当)ことで、受信対応準備完了を通信アプリケーション21へ通知する。   Thereafter, the communication I / F switch processing unit 901 of the communication I / F driver 31 transmits a return value indicating that the listen function processing has been completed to the communication I / F library processing unit 23 (S419: S211 in FIG. 10). Correspondingly), the communication I / F library processing unit 23 transmits a return value to the communication application 21 (S420: corresponding to S105 in FIG. 6), thereby notifying the communication application 21 of completion of reception correspondence preparation.

listen関数処理のリターン値を受信することで、受信対応準備完了の通知を受信した通信アプリケーション21はaccept関数を実行する(S421)。
そして、通信I/Fライブラリ処理部23が、生成されたaccept関数を基に、図6のステップS102における通信I/Fパケット生成処理を行って、accept関数に対応する通信I/Fパケットを生成し、生成した通信I/Fパケットを通信I/Fドライバ31へ送信する(S422:図6のS103に相当)。
通信I/Fパケットを受信した通信I/Fドライバ31の通信I/Fスイッチ処理部901は、図10のステップS202の処理を行い、受信した通信I/Fパケットがaccept関数に対応するものであると判定すると、通信先サーバ9との接続確立待機状態となる(S423)。
By receiving the return value of the listen function process, the communication application 21 that has received the notification of completion of reception correspondence execution executes the accept function (S421).
Then, the communication I / F library processing unit 23 performs communication I / F packet generation processing in step S102 of FIG. 6 based on the generated accept function, and generates a communication I / F packet corresponding to the accept function. Then, the generated communication I / F packet is transmitted to the communication I / F driver 31 (S422: equivalent to S103 in FIG. 6).
The communication I / F switch processing unit 901 of the communication I / F driver 31 that has received the communication I / F packet performs the process of step S202 in FIG. 10, and the received communication I / F packet corresponds to the accept function. If it is determined that there is a connection established server 9 is set in a connection establishment standby state (S423).

通信先サーバ9が、サーバ1に対し、SYNフラグがセットされたTCP/IPパケット(SYNパケット)をネットワーク8を介して送信し(図15のS424)、通信オフロードエンジン5のプロトコルスタックエンジン51が、このSYNパケットを受信すると、通信オフロードエンジン5の割込処理部911は、接続確立を通知するための接続確立割込を通信I/Fドライバ31へ送信する(S425)。
そして、通信I/Fドライバ31の割込処理部902は、割込クリアする(S426)ことにより接続確立割込の通知を受け取ったことを通信オフロードエンジン5へ通知する。
The communication destination server 9 transmits a TCP / IP packet (SYN packet) with the SYN flag set to the server 1 via the network 8 (S424 in FIG. 15), and the protocol stack engine 51 of the communication offload engine 5 However, when receiving this SYN packet, the interrupt processing unit 911 of the communication offload engine 5 transmits a connection establishment interrupt for notifying the connection establishment to the communication I / F driver 31 (S425).
Then, the interrupt processing unit 902 of the communication I / F driver 31 notifies the communication offload engine 5 that the notification of the connection establishment interrupt has been received by clearing the interrupt (S426).

続いて、通信オフロードエンジン5のプロトコルスタックエンジン51は、通信先サーバ9へ接続確立を通知するSYNフラグとACKフラグをセットしたTCP/IPパケット(SYN−ACKパケット)を通信先サーバ9へ送信する(S427)。
通信先サーバ9は、SYN−ACKパケットを受信すると、このTCP/IPパケットを受信したことを通知するためのACKフラグをセットしたTCP/IPパケット(ACKパケット)を通信先サーバ9へ送信する(S428)。
Subsequently, the protocol stack engine 51 of the communication offload engine 5 transmits a TCP / IP packet (SYN-ACK packet) in which the SYN flag and the ACK flag for notifying the communication destination server 9 of the connection establishment are set to the communication destination server 9. (S427).
Upon receiving the SYN-ACK packet, the communication destination server 9 transmits a TCP / IP packet (ACK packet) in which an ACK flag for notifying that the TCP / IP packet has been received is set to the communication destination server 9 ( S428).

ACKパケットを受信したサーバ1における通信オフロードエンジン5の割込処理部911は、通信I/Fドライバ31へ接続確立成功割込を送信する(S429)。
通信I/Fドライバ31の割込処理部902は、割込クリアする(S430)ことにより信確立成功割込の通知を受け取ったことを通信オフロードエンジン5へ通知する。
そして、通信I/Fドライバ31の通信I/Fスイッチ処理部901は、新たに通信リングキュー41を共通メモリ4上に生成する(S431)。
The interrupt processing unit 911 of the communication offload engine 5 in the server 1 that has received the ACK packet transmits a connection establishment success interrupt to the communication I / F driver 31 (S429).
The interrupt processing unit 902 of the communication I / F driver 31 notifies the communication offload engine 5 that the notification of the successful communication establishment interrupt has been received by clearing the interrupt (S430).
Then, the communication I / F switch processing unit 901 of the communication I / F driver 31 newly generates the communication ring queue 41 on the common memory 4 (S431).

そして、通信I/Fドライバ31の通信I/Fスイッチ処理部901は、通信用の通信リングキュー41を共通メモリ4上に生成した旨を通信オフロードエンジン5に通知することでサーバ1と通信先サーバ9との間の通信用セッションを生成する(S432)。
続いて、通信オフロードエンジン5のプロトコルスタックエンジン51は、ステップS431で生成された通信リングキュー41にアクセスし(S433)、通信リングキュー41からデータを取得する(S434)ことによって通信可能状態となる。なお、ステップS423〜S434の処理が図10のステップS206の処理(accept関数処理)に該当する。
The communication I / F switch processing unit 901 of the communication I / F driver 31 communicates with the server 1 by notifying the communication offload engine 5 that the communication ring queue 41 for communication has been generated on the common memory 4. A communication session with the destination server 9 is generated (S432).
Subsequently, the protocol stack engine 51 of the communication offload engine 5 accesses the communication ring queue 41 generated in step S431 (S433), acquires data from the communication ring queue 41 (S434), and sets the communication ready state. Become. Note that the processing in steps S423 to S434 corresponds to the processing in step S206 (accept function processing) in FIG.

そして、通信I/Fドライバ31の通信I/Fスイッチ処理部901は、新たに生成したソケットの識別子をリターン値として通信I/Fライブラリ処理部23へ送信し(S435)、さらに通信I/Fライブラリ処理部23は、このリターン値を通信アプリケーション211へ送信し(S436)、パッシブオープン処理を終了する。
以上が、パッシブオープンのシーケンスである。仮想システムZは、このシーケンスにより、通信データの送受信が可能となる。
Then, the communication I / F switch processing unit 901 of the communication I / F driver 31 transmits the newly generated socket identifier as a return value to the communication I / F library processing unit 23 (S435), and further the communication I / F. The library processing unit 23 transmits this return value to the communication application 211 (S436), and ends the passive open process.
The above is the passive open sequence. The virtual system Z can transmit and receive communication data by this sequence.

(送信処理)
図16は、第1実施形態に係るデータ送信処理の処理手順の一例を示すシーケンス図である。
前記したアクティブオープンあるいはパッシブオープンによる接続確立後に図16の処理が実行される。
まず、送信処理に先立って、通信アプリケーション21は送信する通信データを生成し、共通メモリ4(送信バッファ)上に通信データを格納するための領域を確保し、送信バッファ711に通信データを格納すると、格納した送信バッファ711のメモリアドレスを取得する。
そして、通信アプリケーション21がsend関数を実行する(S501)。このとき、send関数の引数には、通信データを格納した送信バッファ711のメモリアドレスが設定される。
続いて、通信I/Fライブラリ処理部23が、生成されたsend関数を基に、図6のステップS102における通信I/Fパケット生成処理を行って、send関数に対応する通信I/Fパケットを生成し、生成した通信I/Fパケットを通信I/Fドライバ31へ送信する(S502:図6のS103に相当)。
(Transmission process)
FIG. 16 is a sequence diagram illustrating an example of a processing procedure of data transmission processing according to the first embodiment.
The process shown in FIG. 16 is executed after the connection is established by active open or passive open.
First, prior to the transmission process, the communication application 21 generates communication data to be transmitted, secures an area for storing the communication data on the common memory 4 (transmission buffer), and stores the communication data in the transmission buffer 711. The memory address of the stored transmission buffer 711 is acquired.
Then, the communication application 21 executes the send function (S501). At this time, the memory address of the transmission buffer 711 storing the communication data is set as an argument of the send function.
Subsequently, the communication I / F library processing unit 23 performs communication I / F packet generation processing in step S102 of FIG. 6 based on the generated send function, and generates a communication I / F packet corresponding to the send function. The generated communication I / F packet is transmitted to the communication I / F driver 31 (S502: equivalent to S103 in FIG. 6).

通信I/Fパケットを受信した通信I/Fドライバ31の通信I/Fスイッチ処理部901は、図10のステップS202の処理を行い、受信した通信I/Fパケットがsend関数に対応するものであると判定すると、送信リングキュー702に送信する通信データのサイズ(送信データサイズ(図8))と、通信データが格納されている送信バッファ711のメモリアドレス(送信バッファアドレス(図8))を格納し(S503)、該当するキューのフラグを「有効」とする。なお、前記したように通信I/Fパケットには、通信関数の引数が設定されているので、送信バッファ711のアドレスや、通信データのサイズも通信I/Fパケットに設定されている。   The communication I / F switch processing unit 901 of the communication I / F driver 31 that has received the communication I / F packet performs the process of step S202 in FIG. 10, and the received communication I / F packet corresponds to the send function. If it is determined that there is, the size of the communication data to be transmitted to the transmission ring queue 702 (transmission data size (FIG. 8)) and the memory address (transmission buffer address (FIG. 8)) of the transmission buffer 711 in which the communication data is stored. Store (S503), and set the flag of the corresponding queue to “valid”. As described above, since the communication function argument is set in the communication I / F packet, the address of the transmission buffer 711 and the size of the communication data are also set in the communication I / F packet.

その後、通信I/Fドライバ31の通信I/Fスイッチ処理部901は通信オフロードエンジン5へデータ送信要求を送信する(S504)。このとき、送信を連続して実行する場合は、その都度データ送信要求を通信オフロードエンジン5へ送信せずに、通信オフロードエンジン5が次々と送信リングキュー702のフラグを確認し、フラグが「有効」となっているキューに該当する送信バッファ711の通信データを通信先サーバ9へ送信するようにしてもよい。   Thereafter, the communication I / F switch processing unit 901 of the communication I / F driver 31 transmits a data transmission request to the communication offload engine 5 (S504). At this time, when transmission is continuously executed, the communication offload engine 5 checks the flag of the transmission ring queue 702 one after another without transmitting the data transmission request to the communication offload engine 5 each time. The communication data in the transmission buffer 711 corresponding to the “valid” queue may be transmitted to the communication destination server 9.

データ送信要求を受信した通信オフロードエンジン5のプロトコルスタックエンジン51は、送信リングキュー702にアクセスし(S505)、送信リングキュー702のデータを取得する(S506)。
そして、通信オフロードエンジン5のプロトコルスタックエンジン51は、送信リングキュー702における送信バッファアドレス(図8)に該当する通信バッファ42の送信バッファ711にアクセスし(S507)、送信リングキュー702における送信データサイズ(図8)分の通信データを取得する(S508)。
The protocol stack engine 51 of the communication offload engine 5 that has received the data transmission request accesses the transmission ring queue 702 (S505), and acquires data in the transmission ring queue 702 (S506).
Then, the protocol stack engine 51 of the communication offload engine 5 accesses the transmission buffer 711 of the communication buffer 42 corresponding to the transmission buffer address (FIG. 8) in the transmission ring queue 702 (S507), and transmits the transmission data in the transmission ring queue 702. Communication data for the size (FIG. 8) is acquired (S508).

そして、通信オフロードエンジン5のプロトコルスタックエンジン51は、取得した通信データから送信パケットを生成し(S509)、送信リングキュー702における宛先アドレス(図8)を基に、通信先サーバ9へ送信パケットを送信する(S510)。
そして、通信先サーバ9は、通信データ(すべての通信パケット)を受信すると、データを受信した旨をACKフラグをセットしたTCP/IPパケット(ACKパケット)としてサーバ1へ送信する(S511)
Then, the protocol stack engine 51 of the communication offload engine 5 generates a transmission packet from the acquired communication data (S509), and transmits the transmission packet to the communication destination server 9 based on the destination address (FIG. 8) in the transmission ring queue 702. Is transmitted (S510).
Upon receiving the communication data (all communication packets), the communication destination server 9 transmits to the server 1 a TCP / IP packet (ACK packet) in which the ACK flag is set, indicating that the data has been received (S511).

ACKパケットを受信した通信オフロードエンジン5の割込処理部911は、送信完了を通知するための送信完了割込を通信I/Fドライバ31へ通知する(S512)。
通信I/Fドライバ31の割込処理部902は、割込クリアを通信オフロードエンジン5へ送信する(S513)ことにより、送信完了割込の通知を受け取ったことを通信オフロードエンジン5へ通知する。なお、ステップS503〜S513の処理が図10のステップS208の処理(send関数処理)に該当する。
その後、通信I/Fドライバ31の通信I/Fスイッチ処理部901は通信I/Fライブラリ処理部23へ送信できた通信データのバイト数をリターン値として送信し(S514:図10のS211に相当)、通信I/Fライブラリ処理部23は通信アプリケーション21へ送信できた通信データのサイズをリターン値として送信する(S515:図6のS105に相当)。
以上が、データ送信のシーケンスである。仮想システムZは、このシーケンスにより、通信データを通信先サーバ9へ送信する。
The interrupt processing unit 911 of the communication offload engine 5 that has received the ACK packet notifies the communication I / F driver 31 of a transmission completion interrupt for notifying the completion of transmission (S512).
The interrupt processing unit 902 of the communication I / F driver 31 notifies the communication offload engine 5 that the notification of the transmission completion interrupt has been received by transmitting an interrupt clear to the communication offload engine 5 (S513). To do. Note that the processing in steps S503 to S513 corresponds to the processing in step S208 (send function processing) in FIG.
Thereafter, the communication I / F switch processing unit 901 of the communication I / F driver 31 transmits the number of bytes of communication data that can be transmitted to the communication I / F library processing unit 23 as a return value (S514: equivalent to S211 in FIG. 10). ), The communication I / F library processing unit 23 transmits the size of the communication data transmitted to the communication application 21 as a return value (S515: equivalent to S105 in FIG. 6).
The above is the data transmission sequence. The virtual system Z transmits communication data to the communication destination server 9 by this sequence.

(別の送信形態例1)
なお、本実施形態では、通信アプリケーション21が通信データを格納するための共通メモリ4上の領域(つまり、送信バッファ711)を確保しているが、これに限らず、以下のような処理としてもよい。
すなわち、通信アプリケーション21ではなく、通信I/Fドライバ31が、予め共通メモリ4上に領域を確保しておき、そのメモリアドレスを通信アプリケーション21へ送信する。通信アプリケーション21は、send関数を実行する際に、通信I/Fドライバ31から取得したメモリアドレスを引数として実行するとともに、送信する通信データを通信I/Fドライバ31から送信されたメモリアドレスへ格納する。以降は、図16のステップS501〜S515の処理が行われるようにしてもよい。
(Another transmission example 1)
In this embodiment, an area on the common memory 4 (that is, the transmission buffer 711) for the communication application 21 to store communication data is secured. However, the present invention is not limited to this, and the following processing is also possible. Good.
That is, not the communication application 21 but the communication I / F driver 31 reserves an area on the common memory 4 in advance and transmits the memory address to the communication application 21. When executing the send function, the communication application 21 executes the memory address acquired from the communication I / F driver 31 as an argument, and stores the communication data to be transmitted in the memory address transmitted from the communication I / F driver 31. To do. Thereafter, steps S501 to S515 in FIG. 16 may be performed.

(これまで用いられていた一般的な送信処理)
ここで、これまで用いられていた一般的な送信処理を説明する。
(a1)送信処理に先立って、通信アプリケーションは送信する通信データを生成し、メモリ上に通信データを格納するための領域を確保し、送信バッファに通信データを格納する。
(a2)通信アプリケーションが、通信データを格納したメモリのメモリアドレスを引数としたsend関数を実行する。
(a3)ゲストOSで実行されているプロトコルスタックが、自身が予め確保してあるメモリ上の領域に、send関数の引数として設定されているメモリアドレスに格納されている通信データをコピーする(1回目のデータコピー)。
(a4)プロトコルスタックは、コピーした通信データから通信パケットを生成する。
(a5)プロトコルスタックは、ドライバOSへ生成した通信パケットをコピーする(2回目のデータコピー)。
(a6)ドライバOSは、通信パケットをネットワークカードへ転送し、ネットワークカードが通信先サーバへ通信パケットを送信する。
(General transmission processing used so far)
Here, a general transmission process used so far will be described.
(A1) Prior to the transmission process, the communication application generates communication data to be transmitted, secures an area for storing the communication data on the memory, and stores the communication data in the transmission buffer.
(A2) The communication application executes a send function with the memory address of the memory storing the communication data as an argument.
(A3) The protocol stack executed in the guest OS copies the communication data stored in the memory address set as the argument of the send function to the memory area reserved by itself (1) Second data copy).
(A4) The protocol stack generates a communication packet from the copied communication data.
(A5) The protocol stack copies the generated communication packet to the driver OS (second data copy).
(A6) The driver OS transfers the communication packet to the network card, and the network card transmits the communication packet to the communication destination server.

このように、これまで用いられていた一般的な送信処理では、送信処理の際に2回のデータコピーが発生している。これに対し、本実施形態に係る送信処理では、送信リングキュー702の送信バッファアドレス(図8)に通信データが格納されている送信バッファ711のメモリアドレス(送信バッファアドレス)が格納され、通信I/Fドライバ31、通信オフロードエンジン5は、この送信バッファアドレスを参照して通信データを読み込んで、送信する。このため、通信アプリケーション21が送信バッファ711へ通信データを格納してから、通信オフロードエンジン5が通信データ(通信パケット)を送信するまで、通信データが他の場所へコピーされることはない。つまり、本実施形態に係る送信処理ではデータコピーは発生しない。   As described above, in the general transmission processing that has been used so far, two data copies are generated during the transmission processing. In contrast, in the transmission process according to the present embodiment, the memory address (transmission buffer address) of the transmission buffer 711 in which communication data is stored is stored in the transmission buffer address (FIG. 8) of the transmission ring queue 702, and the communication I The / F driver 31 and the communication offload engine 5 read the communication data with reference to the transmission buffer address and transmit it. For this reason, the communication data is not copied to another place until the communication offload engine 5 transmits the communication data (communication packet) after the communication application 21 stores the communication data in the transmission buffer 711. That is, data copy does not occur in the transmission processing according to the present embodiment.

(別の送信形態例2)
また、仮想システムZは本実施形態の送信処理において、以下のような処理をしてもよい。
(b1)通信I/Fドライバ31は、予め共通メモリ4上に通信データを格納するための領域(これが、送信バッファ711となる)を確保しておき、その領域のメモリアドレスを保持している。
(b2)通信アプリケーション21が送信する通信データを生成し、通信アプリケーション21が確保している共通メモリ4上の領域(通信I/Fドライバ31が確保している領域とは別)に通信データを格納する。
以下、図16のステップS501、S502の処理が行われ、通信I/Fドライバ31は、通信アプリケーション21が通信データを格納したメモリアドレスを有している通信I/Fパケットを受信する。通信I/Fドライバ31は、通信I/Fパケットにおけるメモリアドレスから、通信データを取得すると、自身が確保した領域(送信バッファ711)にコピーする(データコピー)。
そして、通信I/Fドライバ31は、コピーした領域(送信バッファ711)のメモリアドレスを、送信バッファアドレスとして送信リングキュー702に格納する。
以下、図16と同様にして、通信データが送信される。
(Another transmission example 2)
Further, the virtual system Z may perform the following processing in the transmission processing of the present embodiment.
(B1) The communication I / F driver 31 reserves an area for storing communication data in advance in the common memory 4 (this is the transmission buffer 711) and holds the memory address of that area. .
(B2) Generate communication data to be transmitted by the communication application 21, and store the communication data in an area on the common memory 4 secured by the communication application 21 (separate from the area secured by the communication I / F driver 31). Store.
Thereafter, the processing of steps S501 and S502 in FIG. 16 is performed, and the communication I / F driver 31 receives a communication I / F packet having a memory address where the communication application 21 stores communication data. When the communication I / F driver 31 acquires the communication data from the memory address in the communication I / F packet, the communication I / F driver 31 copies it to the area (transmission buffer 711) secured by itself (data copy).
Then, the communication I / F driver 31 stores the memory address of the copied area (transmission buffer 711) in the transmission ring queue 702 as a transmission buffer address.
Thereafter, communication data is transmitted in the same manner as in FIG.

この方法では、データコピーが1回発生しているが、2回のデータコピーが発生する一般的な送信処理よりも、データコピーの回数を少なくすることができる。   In this method, data copying occurs once, but the number of times of data copying can be reduced as compared with general transmission processing in which data copying occurs twice.

(受信処理)
図17は、第1実施形態に係るデータ受信処理の処理手順の一例を示すシーケンス図である。図17の処理は、図11、図12のアクティブオープンあるいは図13〜図15のパッシブオープンによる接続確立後に実行される。
受信処理に先立って、通信アプリケーション21は、共通メモリ4上に通信データを格納するための領域を確保する。
まず、通信アプリケーション21がrecv(receive)関数を実行する(S601)。このrecv関数には、受信した通信データが格納される受信バッファ712のメモリアドレスが設定されている。
続いて、通信I/Fライブラリ処理部23が、実行されたrecv関数を基に、図6のステップS102における通信I/Fパケット生成処理を行って、recv関数に対応する通信I/Fパケットを生成し、生成した通信I/Fパケットを通信I/Fドライバ31へ送信する(S602:図6のS103に相当)。この通信I/Fパケットには、recv関数に設定されている受信した通信データが格納される受信バッファ712のメモリアドレスが通信情報の1つとして設定される。
(Reception processing)
FIG. 17 is a sequence diagram illustrating an example of a processing procedure of data reception processing according to the first embodiment. The process of FIG. 17 is executed after the connection is established by the active open of FIGS. 11 and 12 or the passive open of FIGS.
Prior to the reception process, the communication application 21 secures an area for storing communication data on the common memory 4.
First, the communication application 21 executes a recv (receive) function (S601). In this recv function, the memory address of the reception buffer 712 in which the received communication data is stored is set.
Subsequently, the communication I / F library processing unit 23 performs communication I / F packet generation processing in step S102 of FIG. 6 based on the executed recv function, and generates a communication I / F packet corresponding to the recv function. The generated communication I / F packet is transmitted to the communication I / F driver 31 (S602: equivalent to S103 in FIG. 6). In this communication I / F packet, the memory address of the reception buffer 712 in which the received communication data set in the recv function is stored is set as one piece of communication information.

通信I/Fパケットを受信した通信I/Fドライバ31の通信I/Fスイッチ処理部901は、図10のステップS202の処理を行い、受信した通信I/Fパケットがrecv関数に対応するものであると判定した後、通信I/Fパケットの通信情報を通信リングキュー42の受信リングキュー702に格納し(S603)、受信待機状態となる(S604)。ステップS603の処理において、通信I/Fスイッチ処理部901は、通信I/Fパケットに設定されている受信バッファ712のメモリアドレスを、受信バッファアドレス(図8)として、受信リングキュー701に格納する。このとき、通信I/Fスイッチ処理部901は、格納したキューと対応しているresv関数(通信アプリケーションプロセス951)を記憶しておく。   The communication I / F switch processing unit 901 of the communication I / F driver 31 that has received the communication I / F packet performs the process of step S202 in FIG. 10, and the received communication I / F packet corresponds to the recv function. After determining that there is, the communication information of the communication I / F packet is stored in the reception ring queue 702 of the communication ring queue 42 (S603), and a reception standby state is entered (S604). In the processing of step S603, the communication I / F switch processing unit 901 stores the memory address of the reception buffer 712 set in the communication I / F packet in the reception ring queue 701 as the reception buffer address (FIG. 8). . At this time, the communication I / F switch processing unit 901 stores a resv function (communication application process 951) corresponding to the stored queue.

そして、通信先サーバ9がサーバ1へ通信データをTCP/IPパケットとして送信し(S605)、通信オフロードエンジン5のプロトコルスタックエンジン51が、この通信データを受信すると、「無効」となっている受信リングキュー701を参照し、そのキューの受信バッファアドレス(図8)が示す受信バッファ712に通信データを格納し(S606)、該当するキューのフラグを「有効」にする。このとき、プロトコルスタックエンジン51は、受信した通信データのサイズを、受信リングキュー701の受信データサイズ(図8)に格納する。
通信データの格納が完了すると、通信オフロードエンジン5のプロトコルスタックエンジン51は通信先サーバ1に対して、ACKフラグをセットしたTCP/IPパケット(ACKパケット)を送信する(S607)。
Then, the communication destination server 9 transmits communication data as a TCP / IP packet to the server 1 (S605), and when the protocol stack engine 51 of the communication offload engine 5 receives this communication data, it becomes “invalid”. Referring to the reception ring queue 701, the communication data is stored in the reception buffer 712 indicated by the reception buffer address (FIG. 8) of the queue (S606), and the flag of the corresponding queue is set to “valid”. At this time, the protocol stack engine 51 stores the size of the received communication data in the reception data size of the reception ring queue 701 (FIG. 8).
When the storage of the communication data is completed, the protocol stack engine 51 of the communication offload engine 5 transmits a TCP / IP packet (ACK packet) with the ACK flag set to the communication destination server 1 (S607).

ACKパケットの送信後、通信オフロードエンジン5の割込処理部911は受信完了を通知するための受信完了割込を通信I/Fドライバ31へ送信する(S608)。なお、連続受信している場合、通信オフロードエンジン5のプロトコルスタックエンジン51は、受信完了割込を受信のたびに送信しなくてもよく、通信I/Fドライバ31の通信I/Fスイッチ処理部901が、一定時間毎に、受信リングキュー701のフラグを確認し、フラグが「有効」となっているキューが存在したら、割込処理部911は受信完了を通知するための受信完了割込を通信I/Fドライバ31へ送信するようにしてもよい。   After transmitting the ACK packet, the interrupt processing unit 911 of the communication offload engine 5 transmits a reception completion interrupt for notifying the completion of reception to the communication I / F driver 31 (S608). In the case of continuous reception, the protocol stack engine 51 of the communication offload engine 5 does not have to transmit a reception completion interrupt every time it is received, and the communication I / F switch 31 performs communication I / F switch processing. The unit 901 checks the flag of the reception ring queue 701 at regular intervals, and if there is a queue whose flag is “valid”, the interrupt processing unit 911 receives a reception completion interrupt for notifying the completion of reception. May be transmitted to the communication I / F driver 31.

受信完了割込を受信した通信I/Fドライバ31の割込処理部902は、割込クリアを通信オフロードエンジン5へ送信する(S609)ことにより受信完了割込の通知を受け取ったことを通信オフロードエンジン5へ通知する。
そして、通信I/Fドライバ31の通信I/Fスイッチ処理部901は、受信リングキュー701へアクセスし(S610)、フラグが「有効」となっているキューがあると、そのキューのキューデータを取得して(S611)、受信データサイズに格納されている受信した通信データのサイズを取得する。そして、通信I/Fスイッチ処理部901は、このキューに対応するrecv関数(通信アプリケーションプロセス951)へ向け、通信I/Fライブラリ処理部23へリターン値を送信し(S612:図10のS211に相当)、通信I/Fライブラリ処理部23は通信アプリケーション21へリターン値を送信する(S613:図6のS105に相当)。このリターン値は、受信した通信データのサイズである。リターン値を受信した通信アプリケーション21は、自身が実行したrecv関数の引数に設定されていたメモリアドレスから、リターン値として取得したサイズ分のデータ(通信データ)を取得する(S614)。
以上が、データ受信のシーケンスである。このシーケンスにより、通信データを受信する。
The interrupt processing unit 902 of the communication I / F driver 31 that has received the reception completion interrupt communicates that the reception completion interrupt notification has been received by transmitting an interrupt clear to the communication offload engine 5 (S609). Notify the off-road engine 5.
Then, the communication I / F switch processing unit 901 of the communication I / F driver 31 accesses the reception ring queue 701 (S610). If there is a queue whose flag is “valid”, the queue data of the queue is stored. Obtaining (S611), the size of the received communication data stored in the received data size is obtained. The communication I / F switch processing unit 901 transmits a return value to the communication I / F library processing unit 23 toward the recv function (communication application process 951) corresponding to this queue (S612: S211 in FIG. 10). The communication I / F library processing unit 23 transmits a return value to the communication application 21 (S613: corresponding to S105 in FIG. 6). This return value is the size of the received communication data. The communication application 21 that has received the return value acquires data (communication data) for the size acquired as the return value from the memory address set in the argument of the recv function executed by itself (S614).
The above is the data reception sequence. Communication data is received by this sequence.

(別の受信形態例1)
また、本実施形態では、recv関数の実行にともなう通信I/Fパケットによって、通信I/Fドライバ31に受信のための領域(受信バッファ712)のメモリアドレスが通知されるが、recv関数の実行前に、予め通信I/Fドライバ31へ通信アプリケーション21が確保した領域(受信バッファ712)のメモリアドレスが通知されてもよい。この通知の際には、通信I/Fライブラリ処理部23によって生成された通信I/Fパケットに当該メモリアドレスが設定されることによって、通信I/Fドライバ31への通知が行われる。
この場合、通信I/Fドライバ31が通知されたメモリアドレスを、受信リングキュー701の受信バッファアドレス(図8)に格納した後に、通信アプリケーション21がrecv関数を実行することとなる。このときのrecv関数は、通信I/Fドライバ31へ通知されたメモリアドレスが引数として設定される。
なお、この例では、recv関数の実行前に、通信オフロードエンジン5が通信先サーバ9から通信データを受信し、受信バッファアドレスが示す受信バッファ712に通信データを格納することも可能である。
なお、この場合、図6および図10の処理を行わなくてもよい。
(Another reception example 1)
In this embodiment, the memory address of the reception area (reception buffer 712) is notified to the communication I / F driver 31 by the communication I / F packet associated with the execution of the recv function. Before, the memory address of the area (reception buffer 712) secured by the communication application 21 may be notified to the communication I / F driver 31 in advance. In this notification, the communication I / F driver 31 is notified by setting the memory address in the communication I / F packet generated by the communication I / F library processing unit 23.
In this case, after the memory address notified by the communication I / F driver 31 is stored in the reception buffer address (FIG. 8) of the reception ring queue 701, the communication application 21 executes the recv function. In the recv function at this time, the memory address notified to the communication I / F driver 31 is set as an argument.
In this example, it is also possible for the communication offload engine 5 to receive communication data from the communication destination server 9 and store the communication data in the reception buffer 712 indicated by the reception buffer address before executing the recv function.
In this case, the processing of FIGS. 6 and 10 may not be performed.

(これまで用いられていた一般的な受信処理)
ここで、これまで用いられていた一般的な受信処理を説明する。
(c1)通信アプリケーションがrecv関数を実行する。このrecv関数には受信バッファへのメモリアドレスが引数として設定されている。
(c2)ネットワークカードが、通信先サーバからの通信データ(通信パケット)を受信すると、ネットワークカードはドライバOSへ通信データ(通信パケット)を転送する。なお、通信データの受信後に、通信アプリケーションがrecv関数を実行してもよい。
(c3)ドライバOSは、転送された通信データ(通信パケット)をゲストOSのプロトコルスタックへコピーする(1回目のデータコピー)。
(c4)プロトコルスタックは、コピーされた通信データ(通信パケット)をパケット処理すると、recv関数で引数として設定されているメモリアドレスへ、通信データをコピーする(2回目のデータコピー)。
(c5)プロトコルスタックは、受信した通信データのサイズをリターン値として、通信アプリケーションへ送信する。
(General reception processing used so far)
Here, a general reception process used so far will be described.
(C1) The communication application executes the recv function. In this recv function, a memory address to the reception buffer is set as an argument.
(C2) When the network card receives the communication data (communication packet) from the communication destination server, the network card transfers the communication data (communication packet) to the driver OS. Note that the communication application may execute the recv function after receiving the communication data.
(C3) The driver OS copies the transferred communication data (communication packet) to the protocol stack of the guest OS (first data copy).
(C4) When packet processing is performed on the copied communication data (communication packet), the protocol stack copies the communication data to the memory address set as an argument in the recv function (second data copy).
(C5) The protocol stack transmits the received communication data size as a return value to the communication application.

このように、これまで用いられていた一般的な受信処理では、受信処理の際に2回のデータコピーが発生している。これに対し、本実施形態に係る受信処理では、受信リングキュー701の受信バッファアドレス(図8)に、通信データが格納されている受信バッファ712のメモリアドレス(送信バッファアドレス)が格納され、通信オフロードエンジン5は、この受信バッファアドレスが示す受信バッファ712に受信した通信データを格納する。
そして、通信アプリケーション21は、この受信バッファアドレスを基に、通信データを読み出す。
このため、通信オフロードエンジン5が受信バッファ712へ通信データを格納してから、通信アプリケーション21が通信データ(通信パケット)を読み出すまで、通信データが他の場所へコピーされることはない。つまり、本実施形態に係る受信処理ではデータコピーは発生しない。
As described above, in the general reception process used so far, two data copies are generated during the reception process. On the other hand, in the reception process according to the present embodiment, the memory address (transmission buffer address) of the reception buffer 712 in which communication data is stored is stored in the reception buffer address (FIG. 8) of the reception ring queue 701. The offload engine 5 stores the received communication data in the reception buffer 712 indicated by the reception buffer address.
Then, the communication application 21 reads communication data based on this reception buffer address.
For this reason, the communication data is not copied to another location until the communication application 21 reads the communication data (communication packet) after the communication offload engine 5 stores the communication data in the reception buffer 712. That is, no data copy occurs in the reception process according to the present embodiment.

(受信形態例2)
また、仮想システムZは本実施形態の受信処理において、以下のような処理をしてもよい。
(d1)通信アプリケーション21は、共通メモリ4上に通信データを格納するための領域を確保する。
(d2)通信I/Fドライバ31は、共通メモリ4上に通信データを格納するための領域を確保し、受信リングキュー701の受信バッファアドレス(図8)に、この領域のメモリアドレスを格納する。なお、通信I/Fドライバ31が確保する領域は、通信アプリケーション21が確保する領域とは異なるものである。通信I/Fドライバ31が確保する領域が、受信バッファ712となる。なお、(1)、(2)の処理順番は逆でもよい。
(d3)通信アプリケーション21がrecv関数を実行する。recv関数の引数は、通信アプリケーション21が確保した領域のメモリアドレスが設定される。
(d4)通信I/Fライブラリ処理部23は、recv関数の引数であるメモリアドレスを有する通信I/Fパケットを生成し、通信I/Fドライバ31へ送信する。
(Reception form example 2)
Further, the virtual system Z may perform the following processing in the reception processing of the present embodiment.
(D1) The communication application 21 secures an area for storing communication data on the common memory 4.
(D2) The communication I / F driver 31 secures an area for storing communication data on the common memory 4, and stores the memory address of this area in the reception buffer address (FIG. 8) of the reception ring queue 701. . Note that the area secured by the communication I / F driver 31 is different from the area secured by the communication application 21. An area secured by the communication I / F driver 31 is a reception buffer 712. The processing order of (1) and (2) may be reversed.
(D3) The communication application 21 executes the recv function. The memory address of the area secured by the communication application 21 is set as an argument of the recv function.
(D4) The communication I / F library processing unit 23 generates a communication I / F packet having a memory address that is an argument of the recv function, and transmits it to the communication I / F driver 31.

(d4)通信オフロードエンジン5が、通信先サーバ9から通信データを受信すると、図17のS604〜S608と同様の処理が行われる。なお、(3)、(4)の処理順番は逆でもよい。
(d5)通信I/Fドライバ31は、「有効」となっている受信リングキュー701のキューがあれば、そのキューの受信バッファアドレスが示す受信バッファ712から通信データを取得し、その通信データを、受信した通信I/Fパケットの(つまり、recv関数の引数で示されている)メモリアドレスへコピーする(データコピー)。つまり、通信I/Fドライバ31は、受信バッファ712から取得した通信データを、通信アプリケーション21が確保した共通メモリ4上の領域へコピーする。また、処理対象となっているキューの受信データサイズから通信データのサイズを取得する。
(d6)通信I/Fドライバ31は、受信した通信データのサイズをリターン値として、通信I/Fライブラリ処理部23を介して、通信アプリケーション21へリターン値を送信する。
(d7)通信アプリケーション21は、recv関数の引数として設定したメモリアドレスから、リターン値として取得したサイズ分の通信データを取得する。
なお、この場合、図6および図10の処理を行わなくてもよい。
(D4) When the communication offload engine 5 receives the communication data from the communication destination server 9, processing similar to S604 to S608 in FIG. 17 is performed. The processing order of (3) and (4) may be reversed.
(D5) If there is a queue of the reception ring queue 701 that is “valid”, the communication I / F driver 31 acquires the communication data from the reception buffer 712 indicated by the reception buffer address of the queue, and transmits the communication data. The data is copied (data copy) to the memory address of the received communication I / F packet (that is, indicated by the argument of the recv function). That is, the communication I / F driver 31 copies the communication data acquired from the reception buffer 712 to an area on the common memory 4 secured by the communication application 21. The communication data size is acquired from the received data size of the queue to be processed.
(D6) The communication I / F driver 31 transmits the return value to the communication application 21 via the communication I / F library processing unit 23 using the size of the received communication data as a return value.
(D7) The communication application 21 acquires communication data for the size acquired as the return value from the memory address set as the argument of the recv function.
In this case, the processing of FIGS. 6 and 10 may not be performed.

この方法では、データコピーが1回発生しているが、2回のデータコピーが発生する一般的な受信処理よりも、データコピーの回数を少なくすることができる。   In this method, data copying occurs once, but the number of times of data copying can be reduced as compared with general reception processing in which data copying occurs twice.

(アクティブクローズ)
TCP/IPの通信では、送受信の通信の終了処理として通信終了シーケンスが必要となるが、図18および図19を参照して、通信終了処理としてもクローズ処理を説明する。
図18は、第1実施形態に係るアクティブクローズの処理手順の一例を示すシーケンス図である。アクティブクローズとは、サーバ1がクローズ処理を行う処理である。
まず、通信アプリケーション21が、close関数を実行する(S701)。
続いて、通信I/Fライブラリ処理部23が、実行されたclose関数を基に、図6のステップS102における通信I/Fパケット生成処理を行って、close関数に対応する通信I/Fパケットを生成し、生成した通信I/Fパケットを通信I/Fドライバ31へ送信する(S702:図6のS103に相当)。
通信I/Fパケットを受信した通信I/Fドライバ31の通信I/Fスイッチ処理部901は、図10のステップS202の処理を行い、受信した通信I/Fパケットがclose関数に対応するものであると判定すると、通信オフロードエンジン5へセッションのクローズを指示する(S703)。
(Active close)
In TCP / IP communication, a communication end sequence is required as a transmission / reception communication end process. With reference to FIGS. 18 and 19, a close process will be described as a communication end process.
FIG. 18 is a sequence diagram illustrating an example of an active close processing procedure according to the first embodiment. Active close is processing in which the server 1 performs close processing.
First, the communication application 21 executes a close function (S701).
Subsequently, the communication I / F library processing unit 23 performs communication I / F packet generation processing in step S102 of FIG. 6 based on the executed close function, and generates a communication I / F packet corresponding to the close function. The generated communication I / F packet is transmitted to the communication I / F driver 31 (S702: equivalent to S103 in FIG. 6).
The communication I / F switch processing unit 901 of the communication I / F driver 31 that has received the communication I / F packet performs the process of step S202 in FIG. 10, and the received communication I / F packet corresponds to the close function. If it is determined that there is a session, the communication offload engine 5 is instructed to close the session (S703).

クローズ処理を指示された通信オフロードエンジン5のプロトコルスタックエンジン51は、FIN(FINish)フラグをセットしたTCP/IPパケット(FINパケット)を通信先サーバ9へ送信する(S704)。
FINパケットを受信した通信先サーバ9は、FINフラグと、ACKフラグをセットしたTCP/IPパケット(FIN−ACKパケット)をサーバ1へ送信する(S705)。
FIN−ACKパケットを受信した通信オフロードエンジン5のプロトコルスタックエンジン51は、該パケットを受信したことを通信先サーバ9へ伝えるため、ACKフラグをセットしたTCP/IPパケット(ACKパケット)を通信先サーバ9へ送信する(S706)。
The protocol stack engine 51 of the communication offload engine 5 instructed to perform the close process transmits a TCP / IP packet (FIN packet) in which the FIN (FINish) flag is set to the communication destination server 9 (S704).
The destination server 9 that has received the FIN packet transmits a TCP / IP packet (FIN-ACK packet) in which the FIN flag and the ACK flag are set to the server 1 (S705).
The protocol stack engine 51 of the communication offload engine 5 that has received the FIN-ACK packet transmits a TCP / IP packet (ACK packet) in which the ACK flag is set to the communication destination in order to notify the communication destination server 9 that the packet has been received. It transmits to the server 9 (S706).

ACKパケットを送信した通信オフロードエンジン5の割込処理部911は、終了(クローズ)処理完了を通知するための終了処理完了割込を通信I/Fドライバ31へ送信する(S707)。
通信I/Fドライバ31の割込処理部902は、割込クリアをする(S708)ことにより終了処理完了割込の通知を受け取ったことを通信オフロードエンジン5へ通知する。
そして、通信I/Fドライバ31の通信I/Fスイッチ処理部901は、共通メモリ4の通信リングキュー41をクリアし(S709)、通信オフロードエンジン5のセッション管理テーブル52をクリアする(S710)ことによりセッション情報をクリアする。なお、ステップS703〜S710の処理が図10のステップS210の処理(close関数処理)に該当する。
The interrupt processing unit 911 of the communication offload engine 5 that has transmitted the ACK packet transmits an end process completion interrupt for notifying the end of the end (close) process to the communication I / F driver 31 (S707).
The interrupt processing unit 902 of the communication I / F driver 31 notifies the communication offload engine 5 that the end processing completion interrupt notification has been received by clearing the interrupt (S708).
Then, the communication I / F switch processing unit 901 of the communication I / F driver 31 clears the communication ring queue 41 of the common memory 4 (S709), and clears the session management table 52 of the communication offload engine 5 (S710). Clear session information. Note that the processing in steps S703 to S710 corresponds to the processing in step S210 (close function processing) in FIG.

そして、通信I/Fドライバ31の通信I/Fスイッチ処理部901は、通信終了処理の完了を示すリターン値を通信I/Fライブラリ処理部23へ送信し(S711:図10のS211に相当)、さらに、通信I/Fライブラリ処理部23は、このリターン値を通信アプリケーション21へ送信する(S712:図6のS105に相当)。
以上が、アクティブクローズのシーケンスである。仮想システムZは、このシーケンスにより、通信のクローズが可能となる。
Then, the communication I / F switch processing unit 901 of the communication I / F driver 31 transmits a return value indicating completion of the communication end processing to the communication I / F library processing unit 23 (S711: equivalent to S211 in FIG. 10). Further, the communication I / F library processing unit 23 transmits this return value to the communication application 21 (S712: corresponding to S105 in FIG. 6).
The above is the active close sequence. The virtual system Z can close communication by this sequence.

(パッシブクローズ処理)
図19は、第1実施形態に係るパッシブクローズの処理手順の一例を示すシーケンス図である。パッシブクローズは、通信先サーバ9が先に通信終了を送信するクローズ処理である。
まず、通信先サーバ9が、FINフラグをセットしたTCP/IPパケット(FINパケット)をサーバ1へ送信する(S801)。
FINパケットを受信した通信オフロードエンジン5のプロトコルスタックエンジン51は、ACKフラグをセットしたTCP/IPパケット(ACKパケット)を通信先サーバ9へ送信する(S802)。
そして、通信オフロードエンジン5の割込処理部911は、FINパケットを受信したことを通知するための終了通知受信割込を通信I/Fドライバ31へ送信する(S803)。
割り込みを受信した通信I/Fドライバ31の割込処理部902は、割込クリアする(S804)ことにより終了通知受信割込の通知を受け取ったことを通信オフロードエンジン5へ通知する。
(Passive close processing)
FIG. 19 is a sequence diagram illustrating an example of a processing procedure for passive close according to the first embodiment. The passive close is a close process in which the communication destination server 9 transmits a communication end first.
First, the communication destination server 9 transmits a TCP / IP packet (FIN packet) with the FIN flag set to the server 1 (S801).
The protocol stack engine 51 of the communication offload engine 5 that has received the FIN packet transmits a TCP / IP packet (ACK packet) in which the ACK flag is set to the communication destination server 9 (S802).
Then, the interrupt processing unit 911 of the communication offload engine 5 transmits an end notification reception interrupt for notifying that the FIN packet has been received to the communication I / F driver 31 (S803).
The interrupt processing unit 902 of the communication I / F driver 31 that has received the interrupt notifies the communication offload engine 5 that the notification of the end notification reception interrupt has been received by clearing the interrupt (S804).

その後、通信アプリケーション21がclose関数を実行する(S805)。
続いて、通信I/Fライブラリ処理部23が、生成されたclose関数を基に、図6のステップS102における通信I/Fパケット生成処理を行って、close関数に対応する通信I/Fパケットを生成し、生成した通信I/Fパケットを通信I/Fドライバ31へ送信する(S806:図6のS103に相当)。
通信I/Fパケットを受信した通信I/Fドライバ31の通信I/Fスイッチ処理部901は図10のステップS202の処理を行い、受信した通信I/Fパケットがclose関数に対応するものであると判定すると、通信オフロードエンジン5へクローズ処理を指示する(S807)。
Thereafter, the communication application 21 executes a close function (S805).
Subsequently, the communication I / F library processing unit 23 performs communication I / F packet generation processing in step S102 of FIG. 6 based on the generated close function, and generates a communication I / F packet corresponding to the close function. The generated communication I / F packet is transmitted to the communication I / F driver 31 (S806: equivalent to S103 in FIG. 6).
The communication I / F switch processing unit 901 of the communication I / F driver 31 that has received the communication I / F packet performs the process of step S202 in FIG. 10, and the received communication I / F packet corresponds to the close function. If it is determined, close processing is instructed to the communication offload engine 5 (S807).

クローズ処理を指示された通信オフロードエンジン5のプロトコルスタックエンジン51は、通信先サーバ9へFINフラグをセットしたTCP/IPパケット(FINパケット)を送信する(S808)。なお、ステップS802が省略されて、ステップS803〜S807が行われ、ステップS808の段階で、プロトコルスタックエンジン51はステップS802におけるACKパケットと、ステップS808におけるFINパケットを合わせたFIN−ACKパケットを通信サーバ9へ送信するようにしてもよい。   The protocol stack engine 51 of the communication offload engine 5 instructed to perform the close process transmits a TCP / IP packet (FIN packet) with the FIN flag set to the communication destination server 9 (S808). Note that step S802 is omitted, and steps S803 to S807 are performed. In step S808, the protocol stack engine 51 transmits a FIN-ACK packet that is a combination of the ACK packet in step S802 and the FIN packet in step S808 to the communication server. You may make it transmit to 9.

FINパケットを受信した通信先サーバ9は、ACKフラグをセットしたTCP/IPパケット(ACKパケット)をサーバ1へ送信する(S809)ことによって、FINパケットを受信したことをサーバ1へ通知する。
ACKパケットを受信した通信オフロードエンジン5の割込処理部911は、終了(クローズ)処理完了を通知するための終了処理完了割込を通信I/Fドライバ31へ送信する(S810)。
そして、通信I/Fドライバ31の割込処理部902は、通信オフロードエンジン5へ割込クリアする(S811)ことにより終了処理完了割込の通知を受け取ったことを通信オフロードエンジン5へ通知する。
The destination server 9 that has received the FIN packet notifies the server 1 that the FIN packet has been received by transmitting a TCP / IP packet (ACK packet) in which the ACK flag is set to the server 1 (S809).
Receiving the ACK packet, the interrupt processing unit 911 of the communication offload engine 5 transmits an end process completion interrupt for notifying the end of the end (close) process to the communication I / F driver 31 (S810).
Then, the interrupt processing unit 902 of the communication I / F driver 31 notifies the communication offload engine 5 that the notification of the end processing completion interrupt has been received by clearing the interrupt to the communication offload engine 5 (S811). To do.

その後、通信I/Fドライバ31の通信I/Fスイッチ処理部901は、通信リングキュー41をクリアし(S812)、通信オフロードエンジン5のセッション管理テーブル52をクリアする(S813)ことにより、セッション情報をクリアする。なお、ステップS807〜S813の処理が図10のステップS210の処理(close処理)に該当する。
そして、通信I/Fドライバ31の通信I/Fスイッチ処理部901は、通信終了処理の完了を示すリターン値を通信I/Fライブラリ処理部23へ送信し(S814:図10のS211に相当)、さらに、通信I/Fライブラリ処理部23は、このリターン値を通信アプリケーション21へ返す(S815:図6のS105に相当)。
以上が、パッシブクローズのシーケンスである。このシーケンスにより、通信のクローズが可能となる。
Thereafter, the communication I / F switch processing unit 901 of the communication I / F driver 31 clears the communication ring queue 41 (S812), and clears the session management table 52 of the communication offload engine 5 (S813). Clear information. Note that the processing in steps S807 to S813 corresponds to the processing in step S210 (close processing) in FIG.
Then, the communication I / F switch processing unit 901 of the communication I / F driver 31 transmits a return value indicating completion of the communication end processing to the communication I / F library processing unit 23 (S814: equivalent to S211 in FIG. 10). Further, the communication I / F library processing unit 23 returns this return value to the communication application 21 (S815: corresponding to S105 in FIG. 6).
The above is the passive close sequence. With this sequence, communication can be closed.

[まとめ]
第1実施形態によれば、通信バッファ42のメモリアドレス(例えば、C言語におけるポインタ)で通信データのやりとりが管理され、通信バッファ42に格納されている通信データ本体は移動しない(コピー)されないこととなり、通信データのコピーに関するプロセッサ負荷を低減することができる。すなわち、通信処理によるゲストOS2やドライバOS3のプロセッサ負荷やメモリアクセス負荷などの処理オーバヘッドを改善し、ゲストOS2が動作するサーバ1全体の通信処理負荷の軽減と通信性能を向上させることができる。
[Summary]
According to the first embodiment, the exchange of communication data is managed by the memory address of the communication buffer 42 (for example, a pointer in C language), and the communication data main body stored in the communication buffer 42 is not moved (copied). Thus, it is possible to reduce the processor load related to the copy of communication data. That is, it is possible to improve processing overhead such as processor load and memory access load of the guest OS 2 and driver OS 3 due to communication processing, and to reduce communication processing load and communication performance of the entire server 1 on which the guest OS 2 operates.

また、第1実施形態によれば、既存の通信関数(ソケット関数など)を通信I/Fライブラリ処理部23で、通信I/Fパケットに変換して利用することで、ゲストOS2上で動作する通信アプリケーション21の変更や、使用する通信関数を新しくすることなしに、本実施形態に係る通信I/Fドライバ31および通信オフロードエンジン5を導入することが可能となる。
そして、通信データのコピーに関するプロセッサ負荷の軽減に伴うサーバ1全体の処理負荷低減により、サーバ1へのゲストOS2収容台数も増加させることができる。
Further, according to the first embodiment, the communication I / F library processing unit 23 converts an existing communication function (such as a socket function) into a communication I / F packet and uses it, thereby operating on the guest OS 2. The communication I / F driver 31 and the communication offload engine 5 according to the present embodiment can be introduced without changing the communication application 21 or renewing the communication function to be used.
Further, the number of guest OSs 2 accommodated in the server 1 can be increased by reducing the processing load of the entire server 1 due to the reduction of the processor load related to the copy of communication data.

なお、本実施形態では、通信バッファ42のサイズとメモリアドレスは、通信アプリケーション21が管理していることを想定しているが、これに限らず、通信I/Fドライバ31が管理してもよい。この場合、通信アプリケーション21は通信バッファ42を使用することができないので、通信アプリケーション21が通信I/Fドライバ31へ通信データをわたす必要がある。そのため、通信アプリケーション21と、通信I/Fドライバ31との間で通信データのデータコピーが発生することとなる。   In the present embodiment, it is assumed that the size and memory address of the communication buffer 42 are managed by the communication application 21, but the present invention is not limited to this, and the communication I / F driver 31 may manage the size and memory address. . In this case, since the communication application 21 cannot use the communication buffer 42, the communication application 21 needs to pass communication data to the communication I / F driver 31. Therefore, data copy of communication data occurs between the communication application 21 and the communication I / F driver 31.

仮想化環境では、動作中のサーバ1上で動作するゲストOS2を停止することなく、他の仮想化環境のサーバ1へ移すライブマイグレーションという技術がある。この技術により、さまざまなサービスを提供し続けながら、ゲストOS2が動作するサーバ1を変更することができるので、サーバ1が高負荷時は、ゲストOS2を他のサーバ1へ移すことで負荷分散を行うなど、より自由度の高い管理が可能となる。   In the virtual environment, there is a technique called live migration that moves the guest OS 2 operating on the operating server 1 to the server 1 of another virtual environment without stopping. With this technology, the server 1 on which the guest OS 2 operates can be changed while continuing to provide various services. Therefore, when the server 1 is heavily loaded, load distribution is achieved by moving the guest OS 2 to another server 1. Management with a higher degree of freedom is possible.

第1実施形態に係る通信I/Fライブラリ処理部23、通信I/Fドライバ31、通信オフロードエンジン5の環境で、ライブマイグレーションを実現する場合、通信I/Fドライバ31の通信リングキュー41、通信オフロードエンジン5内のセッション管理テーブル52を異動先のサーバ1へ移すことで対応可能となる。移行先のサーバ1に通信オフロードエンジン5がない場合は、ゲストOS2内の通信処理を行うプロトコルスタック25の対応する部分へセッション管理テーブル52の情報を格納し、通信リングキュー41と、通信バッファ42とを共通メモリ4へ格納することによりライブマイグレーションを実現することができる。   When live migration is realized in the environment of the communication I / F library processing unit 23, the communication I / F driver 31, and the communication offload engine 5 according to the first embodiment, the communication ring queue 41 of the communication I / F driver 31; This can be dealt with by moving the session management table 52 in the communication offload engine 5 to the destination server 1. When the migration destination server 1 does not have the communication offload engine 5, the information of the session management table 52 is stored in the corresponding part of the protocol stack 25 that performs communication processing in the guest OS 2, and the communication ring queue 41, the communication buffer 42 is stored in the common memory 4 to realize live migration.

《第2実施形態》
次に、図20および図21を参照して、本発明の第2実施形態について説明する。
[システム構成]
図20は、第2実施形態に係る仮想システムの構成例を示す図である。図20において、図1と同様の構成については同一の符号を付して説明を省略し、図1と異なる点について説明を行うこととする。
図20の仮想システムZaが図1の仮想システムZと異なる点は、各ゲストOS2aがプロトコルスタック25を有する点である。プロトコルスタック25は、通信処理を行うための既存の技術である。
プロトコルスタック25は、図2に示されているROM203や、HDD204に格納されたプログラムが、RAM202に展開され、CPU201によって実行されることによって具現化する。
<< Second Embodiment >>
Next, a second embodiment of the present invention will be described with reference to FIGS.
[System configuration]
FIG. 20 is a diagram illustrating a configuration example of a virtual system according to the second embodiment. 20, the same components as those in FIG. 1 are denoted by the same reference numerals, description thereof is omitted, and differences from FIG. 1 are described.
The virtual system Za in FIG. 20 is different from the virtual system Z in FIG. 1 in that each guest OS 2 a has a protocol stack 25. The protocol stack 25 is an existing technology for performing communication processing.
The protocol stack 25 is realized by a program stored in the ROM 203 or the HDD 204 shown in FIG. 2 being expanded in the RAM 202 and executed by the CPU 201.

第2実施形態における通信I/Fライブラリ処理部23は、例えば図5のスイッチ変数管理テーブル501に登録されていない通信関数が実行されている場合は既存のプロトコルスタック25を介して通信処理を行う。つまり、通信I/Fライブラリ処理部23は通信リングキュー41や、通信バッファ42を介して、通信データの送受信を行うための通信関数として、登録されていない通信関数が実行されている場合は既存のプロトコルスタック25を介して通信処理を行う。
なお、これに限らず、プロトコルスタック25で通信処理される通信関数は、ユーザによって任意に設定されてもよい。
なお、ドライバOS3aの通信I/Fドライバ31aは、通信I/Fパケットに対する通信処理および通信I/Fパケットに変換されていない通信関数を処理するRAWモードを行うことができる。
For example, when a communication function that is not registered in the switch variable management table 501 of FIG. 5 is executed, the communication I / F library processing unit 23 in the second embodiment performs communication processing via the existing protocol stack 25. . In other words, the communication I / F library processing unit 23 is an existing communication function that is not registered as a communication function for transmitting and receiving communication data via the communication ring queue 41 and the communication buffer 42. The communication processing is performed via the protocol stack 25.
However, the present invention is not limited to this, and the communication function to be communicated by the protocol stack 25 may be arbitrarily set by the user.
Note that the communication I / F driver 31a of the driver OS 3a can perform a RAW mode in which a communication process for a communication I / F packet and a communication function that has not been converted into a communication I / F packet are processed.

通信オフロードエンジン5がスイッチ変数管理テーブル501に登録されていない(非対応な)通信パケットを受信するときは、あらかじめ通信アプリケーション21より、非対応通信であるモードをとることを通知されており、この場合、通信オフロードエンジン5は通常のネットワークカードとして振る舞う。そして、通信オフロードエンジン5は、この通信データを通信I/Fドライバ31、または、図示しない既存のネットワーク8ドライバへ送信する。通信I/Fドライバ31、または、既存ネットワークカードは、プロトコルスタック25へ通信データを送信し、プロトコルスタック25が既存の受信処理を行う。この後、通信I/Fライブラリ処理部23、または、図示しない既存の通信関数I/Fを介して、通信アプリケーション211へ受信された通信データが送信される。
なお、スイッチ変数管理テーブル501に登録されている通信関数でも、図4に示す引数の通信のコネクション(通信コネクション)を識別するソケット番号などで判別し、該当するソケット番号のものは、プロトコルスタック25で処理を行うようにしてもよい。通信コネクションは、例えば、ソケット番号などで指定されるが、これに限らず、ユーザなどによって指定されてもよい。
When the communication offload engine 5 receives a communication packet that is not registered in the switch variable management table 501 (non-compliant), the communication application 21 is notified in advance that the mode for non-compliant communication is taken, In this case, the communication offload engine 5 behaves as a normal network card. Then, the communication offload engine 5 transmits this communication data to the communication I / F driver 31 or an existing network 8 driver (not shown). The communication I / F driver 31 or the existing network card transmits communication data to the protocol stack 25, and the protocol stack 25 performs existing reception processing. Thereafter, the received communication data is transmitted to the communication application 211 via the communication I / F library processing unit 23 or an existing communication function I / F (not shown).
Note that the communication function registered in the switch variable management table 501 is also determined by the socket number for identifying the communication connection (communication connection) of the argument shown in FIG. You may make it process by. The communication connection is specified by, for example, a socket number, but is not limited thereto, and may be specified by a user or the like.

《フローチャート》
(通信I/Fパケット)
図21は、第2実施形態に係る通信I/Fパケット生成処理の手順を示すフローチャートである。
ステップS101(図6)の後、通信I/Fライブラリ処理部23は、ステップS101で実行された通信関数が図5に示すスイッチ変数管理テーブル501に登録されているか否かを判定する(S101a)。
ステップS101aの結果、実行された通信関数がスイッチ変数管理テーブル501に登録されている場合(S101a→Yes)、通信I/Fライブラリ処理部23は図6のステップS102〜S105と同様の処理を行う。
ステップS101aの結果、実行された通信関数がスイッチ変数管理テーブル501に登録されていない場合(S101a→No)、既存のプロトコルスタック25が通信関数を処理する(S102a)。なお、通信関数がスイッチ変数管理テーブル501に登録されているか否かではなく、通信のコネクションを識別するソケット番号などを基に、既存のプロトコルスタック25が、その通信関数を処理するか否かを判別するようにしてもよい。
"flowchart"
(Communication I / F packet)
FIG. 21 is a flowchart illustrating a procedure of communication I / F packet generation processing according to the second embodiment.
After step S101 (FIG. 6), the communication I / F library processing unit 23 determines whether or not the communication function executed in step S101 is registered in the switch variable management table 501 shown in FIG. 5 (S101a). .
As a result of step S101a, when the executed communication function is registered in the switch variable management table 501 (S101a → Yes), the communication I / F library processing unit 23 performs the same processing as steps S102 to S105 of FIG. .
As a result of step S101a, when the executed communication function is not registered in the switch variable management table 501 (S101a → No), the existing protocol stack 25 processes the communication function (S102a). It should be noted that whether or not the existing protocol stack 25 processes the communication function based on the socket number for identifying the communication connection, rather than whether or not the communication function is registered in the switch variable management table 501. You may make it discriminate | determine.

(第2実施形態のまとめ)
第2実施形態によれば、スイッチ関数管理テーブルに登録されていない、つまり、第1実施形態に係る技術に対し、非対応の通信関数や、非対応のプロトコルや、非対応のパケットで通信する時も通信を行なうことができる。なお、第2実施形態に係る仮想システムZにおける通信時のマイグレーション(ライブマイグレーション)は、ゲストOS2上のプロトコルスタック25の情報も転送することで実現できる。
(Summary of the second embodiment)
According to the second embodiment, it is not registered in the switch function management table, that is, communicates with the technology according to the first embodiment using a non-compliant communication function, a non-compliant protocol, or a non-compliant packet. Communication is possible even at times. Note that migration (live migration) during communication in the virtual system Z according to the second embodiment can be realized by transferring information of the protocol stack 25 on the guest OS 2 as well.

また、第2実施形態によれば、非対応の通信関数や、非対応のプロトコルや、非対応のパケットや、指定した通信コネクションで通信する時に、既存のプロトコルスタック25へ処理を切り替えることにより、ゲストOS2上で動作する通信アプリケーション21の変更や、新たな通信関数を使用することなしに、第1実施形態に係る通信I/Fライブラリ処理部23、通信I/Fドライバ31および通信オフロードエンジン5を用いて、通信を行うことができる。   In addition, according to the second embodiment, when communication is performed using an incompatible communication function, an incompatible protocol, an incompatible packet, or a specified communication connection, by switching processing to the existing protocol stack 25, Without changing the communication application 21 running on the guest OS 2 or using a new communication function, the communication I / F library processing unit 23, the communication I / F driver 31, and the communication offload engine according to the first embodiment. 5 can be used for communication.

1、1a サーバ(通信サーバ)
2、2a ゲストOS
3、3a ドライバOS
4 共通メモリ(記憶装置)
5 通信オフロードエンジン(通信装置)
6、7 ハードウェアI/F
8 ネットワーク
9 通信先サーバ(通信先装置)
10 ハイパバイザ(処理装置)
21 通信アプリケーション
22、24、32 ソフトウェアI/F
23 通信I/Fライブラリ処理部
25 プロトコルスタック
31、31a 通信I/Fドライバ
41 通信リングキュー(第2の記憶領域)
42 通信バッファ(第1の記憶領域)
51 プロトコルスタックエンジン
52 セッション管理テーブル
401 ソケット関数
402 通信I/Fパケット(通信情報)
501 スイッチ変数管理テーブル
701 受信リングキュー
702 送信リングキュー
711 送信バッファ
712 受信バッファ
901 通信I/Fスイッチ処理部
902 割込処理部(通信I/Fドライバ)
911 割込処理部(通信オフロードエンジン)
Z、Za 仮想システム
1, 1a server (communication server)
2, 2a Guest OS
3, 3a Driver OS
4 Common memory (storage device)
5 Communication off-road engine (communication device)
6, 7 Hardware I / F
8 Network 9 Destination server (communication destination device)
10 Hypervisor (Processor)
21 Communication application 22, 24, 32 Software I / F
23 Communication I / F Library Processing Unit 25 Protocol Stack 31, 31a Communication I / F Driver 41 Communication Ring Queue (Second Storage Area)
42 Communication buffer (first storage area)
51 Protocol Stack Engine 52 Session Management Table 401 Socket Function 402 Communication I / F Packet (Communication Information)
501 Switch variable management table 701 Reception ring queue 702 Transmission ring queue 711 Transmission buffer 712 Reception buffer 901 Communication I / F switch processing unit 902 Interrupt processing unit (communication I / F driver)
911 Interrupt processing unit (communication offload engine)
Z, Za virtual system

Claims (10)

複数の仮想OSが実行され、さらに、通信処理を管理するドライバOSが実行されるための処理装置と、通信を行うための装置である通信装置と、記憶装置と、を有する通信サーバにおける通信方法であって、
前記記憶装置には、通信されるデータである通信データが格納されるための第1の記憶領域と、前記第1の記憶領域のメモリアドレスが格納されるための第2の記憶領域と、が設定されており、
前記ドライバOSは、
前記第2の記憶領域における前記メモリアドレスを管理し、
前記仮想OSおよび前記通信装置は、
前記第2の記憶領域に格納されているメモリアドレスを参照して、前記第1の記憶領域に対し、前記通信データの読み書きを行う
ことを特徴とする通信方法。
A communication method in a communication server having a processing device for executing a plurality of virtual OSs and further executing a driver OS for managing communication processing, a communication device as a device for performing communication, and a storage device Because
The storage device includes a first storage area for storing communication data, which is data to be communicated, and a second storage area for storing a memory address of the first storage area. Is set,
The driver OS is
Managing the memory address in the second storage area;
The virtual OS and the communication device are:
A communication method, wherein the communication data is read from and written to the first storage area with reference to a memory address stored in the second storage area.
前記第2の記憶領域は、複数存在するとともに、巡回性を有しており、メモリアドレスが格納された前記第2の記憶領域には、前記通信データが格納されているか否かの情報である格納情報が付与され、
前記仮想OSおよび前記通信装置は、
前記格納情報が付与された第2の記憶領域から、順々に前記メモリアドレスを参照する
ことを特徴とする請求項1に記載の通信方法。
A plurality of the second storage areas are present and have cyclicity, and the second storage area in which the memory address is stored is information indicating whether or not the communication data is stored. Storage information is given,
The virtual OS and the communication device are:
The communication method according to claim 1, wherein the memory address is sequentially referred to from the second storage area to which the storage information is assigned.
前記通信データの送信時において、
前記仮想OSは、
前記通信データを送信するための通信関数を実行し、
前記前記通信データを、前記第1の記憶領域に格納し、
前記通信データを格納した第1の記憶領域のメモリアドレスを含む通信情報を生成し、
前記ドライバOSは、
前記通信情報のメモリアドレスを前記第2の記憶領域に格納し、
前記通信装置は、
前記第2の記憶領域に格納されたメモリアドレスが示す前記第1の記憶領域から前記通信データを取得し、
前記通信データを通信先装置へ送信する
ことを特徴とする請求項1または請求項2に記載の通信方法。
At the time of transmission of the communication data,
The virtual OS is
Executing a communication function for transmitting the communication data;
Storing the communication data in the first storage area;
Generating communication information including a memory address of a first storage area storing the communication data;
The driver OS is
Storing the memory address of the communication information in the second storage area;
The communication device
Obtaining the communication data from the first storage area indicated by the memory address stored in the second storage area;
The communication method according to claim 1 or 2, wherein the communication data is transmitted to a communication destination device.
前記通信データの送信時において、
前記ドライバOSは、
前記通信データを格納するための第1の記憶領域のメモリアドレスを取得し、
前記取得したメモリアドレスを前記仮想OSへ通知し、
前記仮想OSは、
前記通信データを送信するための通信関数を実行し、
前記前記通信データを、前記通知されたメモリアドレスが示す前記第1の記憶領域に格納し、
前記通信データを格納した第1の記憶領域のメモリアドレスを含む通信情報を生成し、
前記ドライバOSは、
前記通信情報のメモリアドレスを前記第2の記憶領域に格納し、
前記通信装置は、
前記第2の記憶領域に格納されたメモリアドレスが示す前記第1の記憶領域から前記通信データを取得し、
前記通信データを通信先装置へ送信する
ことを特徴とする請求項1または請求項2に記載の通信方法。
At the time of transmission of the communication data,
The driver OS is
Obtaining a memory address of a first storage area for storing the communication data;
Notifying the acquired memory address to the virtual OS,
The virtual OS is
Executing a communication function for transmitting the communication data;
Storing the communication data in the first storage area indicated by the notified memory address;
Generating communication information including a memory address of a first storage area storing the communication data;
The driver OS is
Storing the memory address of the communication information in the second storage area;
The communication device
Obtaining the communication data from the first storage area indicated by the memory address stored in the second storage area;
The communication method according to claim 1 or 2, wherein the communication data is transmitted to a communication destination device.
前記通信データの送信時において、
前記ドライバOSは、予め前記第1の記憶領域のメモリアドレスを取得しており、
前記仮想OSは、
前記通信データを送信するための通信関数を実行し、
前記前記通信データを、前記第1の記憶領域および第2の記憶領域とは異なる第3の記憶領域に格納し、
前記第3の記憶領域のメモリアドレスを含む通信情報を生成し、
前記ドライバOSは、
前記通信情報におけるメモリアドレスを基に、前記第3の記憶領域から通信データを取得すると、
前記予め取得していた前記第1の記憶領域のメモリアドレスを基に、前記第1の記憶領域へ前記取得した通信データをコピーし、
前記通信装置は、
前記第2の記憶領域に格納されたメモリアドレスが示す前記第1の記憶領域から前記通信データを取得し、
前記通信データを通信先装置へ送信する
ことを特徴とする請求項1または請求項2に記載の通信方法。
At the time of transmission of the communication data,
The driver OS has acquired the memory address of the first storage area in advance,
The virtual OS is
Executing a communication function for transmitting the communication data;
Storing the communication data in a third storage area different from the first storage area and the second storage area;
Generating communication information including a memory address of the third storage area;
The driver OS is
When acquiring communication data from the third storage area based on the memory address in the communication information,
Based on the memory address of the first storage area acquired in advance, copy the acquired communication data to the first storage area,
The communication device
Obtaining the communication data from the first storage area indicated by the memory address stored in the second storage area;
The communication method according to claim 1 or 2, wherein the communication data is transmitted to a communication destination device.
前記通信データの受信時において、
前記仮想OSは、
前記通信データを受信するため第1の記憶領域のメモリアドレスを引数とする前記通信関数を実行し、
前記通信関数の引数の前記メモリアドレスを含む通信情報を生成し、
前記ドライバOSは、
前記通信情報におけるメモリアドレスを、前記第2の記憶領域に格納し、
前記通信装置は、
通信先装置から前記通信データを受信し、
前記第2の記憶領域に格納されている前記メモリアドレスが示す前記第1の記憶領域に前記受信した通信データを格納し、
前記ドライバOSは、
前記第2の記憶領域に前記通信データが格納されたことを検知すると、
前記仮想OSへ、前記第1の記憶領域に前記通信データが格納されたことを通知し、
前記通知を受けた仮想OSは、
前記通信関数の引数における前記メモリアドレスが示す前記第1の記憶領域から、前記通信データを取得する
ことを特徴とする請求項1または請求項2に記載の通信方法。
When receiving the communication data,
The virtual OS is
Executing the communication function with the memory address of the first storage area as an argument to receive the communication data;
Generating communication information including the memory address of the argument of the communication function;
The driver OS is
Storing the memory address in the communication information in the second storage area;
The communication device
Receiving the communication data from the communication destination device;
Storing the received communication data in the first storage area indicated by the memory address stored in the second storage area;
The driver OS is
When detecting that the communication data is stored in the second storage area,
Notifying the virtual OS that the communication data is stored in the first storage area,
The virtual OS that has received the notification
The communication method according to claim 1 or 2, wherein the communication data is acquired from the first storage area indicated by the memory address in an argument of the communication function.
前記通信データの受信時において、
前記仮想OSは、
前記通信データを格納するための前記第1の記憶領域のメモリアドレスを取得し、
前記取得したメモリアドレスが含まれる通信情報を生成し、
前記ドライバOSは、
前記通信情報のメモリアドレスを、前記第2の記憶領域に格納し、
前記通信装置は、
通信先装置から前記通信データを受信し、
前記第2の記憶領域に格納されている前記メモリアドレスが示す前記第1の記憶領域に前記受信した通信データを格納し、
前記ドライバOSは、
前記第2の記憶領域に前記通信データが格納されたことを検知すると、
前記仮想OSへ、前記第1の記憶領域に前記通信データが格納されたことを通知し、
前記通知を受けた仮想OSは、
前記取得したメモリアドレスが示す前記第1の記憶領域から、前記通信データを取得する
ことを特徴とする請求項1または請求項2に記載の通信方法。
When receiving the communication data,
The virtual OS is
Obtaining a memory address of the first storage area for storing the communication data;
Generating communication information including the acquired memory address;
The driver OS is
Storing the memory address of the communication information in the second storage area;
The communication device
Receiving the communication data from the communication destination device;
Storing the received communication data in the first storage area indicated by the memory address stored in the second storage area;
The driver OS is
When detecting that the communication data is stored in the second storage area,
Notifying the virtual OS that the communication data is stored in the first storage area,
The virtual OS that has received the notification
The communication method according to claim 1 or 2, wherein the communication data is acquired from the first storage area indicated by the acquired memory address.
前記通信データの受信時において、
前記ドライバOSは、
予め前記第1の記憶領域のメモリアドレスを取得し、前記メモリアドレスを前記第2の記憶領域へ格納しており、
前記仮想OSは、
前記前記通信データを、前記第1の記憶領域および前記第2の記憶領域とは異なる第3の記憶領域に格納し、
前記第3の記憶領域のメモリアドレスを引数とする前記通信関数を実行し、
前記通信関数の引数である第3の記憶領域のメモリアドレスを有する通信情報を生成し、
前記通信装置は、
通信先装置から前記通信データを受信し、
前記第2の記憶領域に格納されている前記メモリアドレスが示す前記第1の記憶領域に前記受信した通信データを格納し、
前記ドライバOSは、
前記第2の記憶領域に前記通信データが格納されたことを検知すると、
前記第2の記憶領域に格納されている前記メモリアドレスが示す前記第1の記憶領域から前記通信データを取得し、
前記通信情報における前記第3の記憶領域のメモリアドレスが示す記憶領域へ、前記取得した通信データをコピーし、
前記仮想OSへ、前記第1の記憶領域に前記通信データが格納されたことを通知し、
前記通知を受けた仮想OSは、
前記通信関数の引数である前記第3の記憶領域のメモリアドレスが示す記憶領域から、前記通信データを取得する
ことを特徴とする請求項1または請求項2に記載の通信方法。
When receiving the communication data,
The driver OS is
Obtaining a memory address of the first storage area in advance, storing the memory address in the second storage area;
The virtual OS is
Storing the communication data in a third storage area different from the first storage area and the second storage area;
Executing the communication function with the memory address of the third storage area as an argument;
Generating communication information having a memory address of a third storage area which is an argument of the communication function;
The communication device
Receiving the communication data from the communication destination device;
Storing the received communication data in the first storage area indicated by the memory address stored in the second storage area;
The driver OS is
When detecting that the communication data is stored in the second storage area,
Obtaining the communication data from the first storage area indicated by the memory address stored in the second storage area;
Copy the acquired communication data to the storage area indicated by the memory address of the third storage area in the communication information,
Notifying the virtual OS that the communication data is stored in the first storage area,
The virtual OS that has received the notification
The communication method according to claim 1, wherein the communication data is acquired from a storage area indicated by a memory address of the third storage area that is an argument of the communication function.
前記仮想OSは、
前記第1の記憶領域および第2の記憶領域を介して通信データを処理する関数として登録されていない通信関数や、指定された通信コネクションを処理するためのプロトコルスタックを有している
ことを特徴とする請求項1から請求項8のいずれか一項に記載の通信方法。
The virtual OS is
A communication function that is not registered as a function for processing communication data via the first storage area and the second storage area, or a protocol stack for processing a specified communication connection is provided. The communication method according to any one of claims 1 to 8.
複数の仮想OSが実行され、さらに、通信処理を管理するドライバOSが実行されるための処理装置と、通信を行うための装置である通信装置と、記憶装置と、を有する通信サーバであって、
前記通信データが格納されるための第1の記憶領域と、前記第1の記憶領域のメモリアドレスを格納するための第2の記憶領域と、が設定されている記憶装置と、
前記ドライバOSは、
前記第2の記憶領域における前記メモリアドレスを管理し、
前記仮想OSおよび前記通信装置は、
前記第2の記憶領域に格納されているメモリアドレスを参照して、前記第1の記憶領域に対し、前記通信データの読み書きを行う
ことを特徴とする通信サーバ。
A communication server including a processing device for executing a plurality of virtual OSs, and further executing a driver OS for managing communication processing, a communication device as a device for performing communication, and a storage device. ,
A storage device in which a first storage area for storing the communication data and a second storage area for storing a memory address of the first storage area are set;
The driver OS is
Managing the memory address in the second storage area;
The virtual OS and the communication device are:
The communication server reads / writes the communication data to / from the first storage area with reference to a memory address stored in the second storage area.
JP2011091947A 2011-04-18 2011-04-18 Communication method and communication server Withdrawn JP2012226471A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011091947A JP2012226471A (en) 2011-04-18 2011-04-18 Communication method and communication server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011091947A JP2012226471A (en) 2011-04-18 2011-04-18 Communication method and communication server

Publications (1)

Publication Number Publication Date
JP2012226471A true JP2012226471A (en) 2012-11-15

Family

ID=47276588

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011091947A Withdrawn JP2012226471A (en) 2011-04-18 2011-04-18 Communication method and communication server

Country Status (1)

Country Link
JP (1) JP2012226471A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014235501A (en) * 2013-05-31 2014-12-15 株式会社日立製作所 Control method of storage device, storage device and information processing device
JP2015046134A (en) * 2013-08-29 2015-03-12 セイコーエプソン株式会社 Transmission system, transmission device, and data transmission method
US9823943B2 (en) 2014-05-12 2017-11-21 Fujitsu Limited Apparatus and method for controlling virtual machine migrations based on flow information
JP2018182628A (en) * 2017-04-19 2018-11-15 富士通株式会社 Information processing device, information processing method and information processing program
JP2018181134A (en) * 2017-04-19 2018-11-15 富士通株式会社 Information processing apparatus, information processing method, and information processing program
US10686881B2 (en) 2013-08-29 2020-06-16 Seiko Epson Corporation Transmission system, transmission device, and data transmission method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014235501A (en) * 2013-05-31 2014-12-15 株式会社日立製作所 Control method of storage device, storage device and information processing device
JP2015046134A (en) * 2013-08-29 2015-03-12 セイコーエプソン株式会社 Transmission system, transmission device, and data transmission method
US10686881B2 (en) 2013-08-29 2020-06-16 Seiko Epson Corporation Transmission system, transmission device, and data transmission method
US9823943B2 (en) 2014-05-12 2017-11-21 Fujitsu Limited Apparatus and method for controlling virtual machine migrations based on flow information
JP2018182628A (en) * 2017-04-19 2018-11-15 富士通株式会社 Information processing device, information processing method and information processing program
JP2018181134A (en) * 2017-04-19 2018-11-15 富士通株式会社 Information processing apparatus, information processing method, and information processing program

Similar Documents

Publication Publication Date Title
US9893977B2 (en) System and method for supporting live migration of virtual machines in a virtualization environment
US20220318184A1 (en) Virtual rdma switching for containerized applications
US7996569B2 (en) Method and system for zero copy in a virtualized network environment
EP2831729B1 (en) System and method for supporting live migration of virtual machines based on an extended host channel adaptor (hca) model
EP3361387B1 (en) Data transmission method, equipment and system
WO2018035856A1 (en) Method, device and system for implementing hardware acceleration processing
JP2012226471A (en) Communication method and communication server
US9535873B2 (en) System, computer-implemented method and computer program product for direct communication between hardward accelerators in a computer cluster
US20070074206A1 (en) Operating cell processors over a network
US8370855B2 (en) Management of process-to-process intra-cluster communication requests
WO2011096307A1 (en) Proxy device and operation method thereof
JP2013041409A (en) Information processing apparatus, interruption control method and interruption control program
WO2014106321A1 (en) Pcie network-based virtual machine communication method, server and system
EP3159802B1 (en) Sharing method and device for pcie i/o device and interconnection system
WO2016065611A1 (en) File access method, system and host
US20100161704A1 (en) Management of Process-to-Process Inter-Cluster Communication Requests
US9098354B2 (en) Management of application to I/O device communication requests between data processing systems
Abbasi et al. A performance comparison of container networking alternatives
JP5124430B2 (en) Virtual machine migration method, server, and program
WO2022001808A1 (en) System and interrupt processing method
US8521895B2 (en) Management of application to application communication requests between data processing systems
US11836105B2 (en) Communication device, information processing system, and communication method
JP5518143B2 (en) Virtual machine migration method, server, program, and virtual machine system
US8560594B2 (en) Management of process-to-process communication requests
WO2010064661A1 (en) Parallel computation system, and method and program therefor

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140701