JPH09223027A - Message communication equipment - Google Patents

Message communication equipment

Info

Publication number
JPH09223027A
JPH09223027A JP8340908A JP34090896A JPH09223027A JP H09223027 A JPH09223027 A JP H09223027A JP 8340908 A JP8340908 A JP 8340908A JP 34090896 A JP34090896 A JP 34090896A JP H09223027 A JPH09223027 A JP H09223027A
Authority
JP
Japan
Prior art keywords
function
sth
message
stream
driver
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP8340908A
Other languages
Japanese (ja)
Inventor
Ishijima Yoshihiro
ヨシヒロ・イシジマ
Kraus Michael
マイケル・クラウス
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.)
HP Inc
Original Assignee
Hewlett Packard Co
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
Priority claimed from US08/593,313 external-priority patent/US6098112A/en
Application filed by Hewlett Packard Co filed Critical Hewlett Packard Co
Publication of JPH09223027A publication Critical patent/JPH09223027A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To obtain a flexibility capable of providing suitable function in response to the dynamic request of user process or device driver, to the function of STREAMS fixed in accordance with system architecture. SOLUTION: A computer system 100 having a data path for communicating a message between a device and a user process is provided with a device driver 113 which is connected to a device 107 in order to perform the message communication with the device 107 and especially made suitable for identifying a message processing function for processing the message, and a stream head 111 which is arranged between the device driver 113 and the user process 103 in order to communicate the message with the user process and especially made suitable for providing a function controller 125 for controlling the execution of this message processing function identified by this device driver 113.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、データ通信に関す
るもので、特に、デバイスとホスト・コンピュータの
間、同一コンピュータ上で実行する異なるプロセスの
間、および異なるコンピュータの上で実行する複数プロ
セスの間のデータ通信を提供するSTREAMSフレー
ム・ワークに関するものである。
FIELD OF THE INVENTION The present invention relates to data communication, and more particularly, between a device and a host computer, between different processes executing on the same computer, and between multiple processes executing on different computers. The STREAMS framework that provides data communication for

【0002】[0002]

【従来の技術】STREAMSは、種々のタイプのデバ
イス・ドライバと同様に、データ通信ネットワーク・プ
ロトコールを実施するための事実上の業界標準フレーム
・ワークになっている。STREAMSは、アプリケー
ション・プログラムのようなユーザ・レベル・プロセス
とカーネル内のデバイス・ドライバの間の双方向性デー
タ経路を提供するストリームである。典的型ストリーム
は、ストリーム・ヘッド、オプションである処理モジュ
ールおよびデバイス・ドライバという主要な3つのタイ
プの処理エレメントを含む。
BACKGROUND OF THE INVENTION STREAMS, as well as various types of device drivers, have become the de facto industry standard framework for implementing data communication network protocols. STREAMS is a stream that provides a bidirectional data path between user-level processes, such as application programs, and device drivers in the kernel. Canonical streams include three main types of processing elements: stream heads, optional processing modules, and device drivers.

【0003】デバイス・ドライバは、ストリームの終端
すなわち末尾に置かれる。ドライバは、そのオブジェク
ト・ファイルをカーネル・オブジェクト・ファイルに単
にリンクすることによってカーネルに加えられる。しか
しながら、従来技術の教示するところによれば、ストリ
ーム・ヘッドは、カーネル固有の特性を備えていている
ので、固定化されている。
Device drivers are placed at the end or tail of the stream. The driver is added to the kernel by simply linking that object file to the kernel object file. However, according to the teachings of the prior art, the stream head is fixed because it has kernel-specific properties.

【0004】ストリーム・ヘッドは、(「ユーザ空間」
として知られる)ユーザ・プロセス・レベルとストリー
ムの残りの部分の間のインターフェースを提供し、
(「カーネル空間」として知られる)カーネル・プロセス
・レベルにおいてのみ実行する一組のルーチンを含む。
従来技術のストリーム・ヘッドの各々は、それがサポー
トする限られた処理オプションの中から選択できる小さ
い範囲に対してのみカストマイズすることが可能である
に過ぎない。従来技術においては、ストリーム・ヘッド
処理ルーチンは、システムのあらゆるストリームについ
て使用される。
The stream head is ("user space")
Provides the interface between the user process level (known as
It contains a set of routines that execute only at the kernel process level (known as "kernel space").
Each of the prior art stream heads can only customize to a small range that can be selected from the limited processing options it supports. In the prior art, stream head processing routines are used for every stream in the system.

【0005】ストリームへのアクセスは、STREAM
Sファイル記述子を持つopen(オープン)システム呼び出
しを介して提供される。例えば、ユーザ・プロセスがシ
ステム呼び出しを行うと、ストリーム・ヘッド・ルーチ
ンが起動され、データのコピー、メッセージ生成および
制御動作が実行される。デバイス・ドライバがまだオー
プンされていなければ、オープン・システム呼び出しが
ストリームを構築する。一旦ストリームが構築され、オ
ープンが成功裡に完了すれば、同一デバイスに対する別
のオープン呼び出しは、同一のストリームを参照する新
しいファイル記述子を作成する。
Access to the stream is STREAM
Provided via the open system call with the S file descriptor. For example, when a user process makes a system call, the stream head routine is invoked to perform data copying, message generation and control operations. The open system call builds the stream if the device driver is not already open. Once the stream has been constructed and the open has completed successfully, another open call to the same device will create a new file descriptor referencing the same stream.

【0006】ストリーム・ヘッドは、ユーザ・プロセス
・レベルとカーネル・プロセス・レベルの間でデータを
コピーすることができるストリーム中の唯一のコンポー
ネントである。その他すべてのコンポーネントは単にメ
ッセージを通信することによってデータ転送を実行する
だけなので、それらコンポーネントはユーザ・プロセス
との直接の対話から隔離されている。このように、オー
プン・ストリームのモジュールおよびドライバは、カー
ネル・プロセス・レベルの文脈の範囲内でのみ実行する
ので、ユーザ・プロセス・レベルの文脈または情報の知
識を持たない。このような文脈欠如は、ユーザ・プロセ
スとカーネル・コンポーネントの間の通信を処理するた
めに「1サイズですべてを賄う」アプローチを促進す
る。そのようなアプローチは、オープンするデバイスに
関して現在どのようなユーザ・プロセスが実行していよ
うともそれらプロセスの変更要求を充足するようにモジ
ュールおよびドライバのストリーム・データ解釈、スト
リーム実行行動等を適合させる上で制約を課すものであ
る。例えば、従来技術のSTREAMSにおけるモジュ
ールおよびドライバは、32ビット・カーネルおよびプ
ロセッサ・アーキテクチャ上で実行される32ビット・
アプリケーションから、64ビット・カーネルおよびプ
ロセッサ・アーキテクチャ上で実行される64ビット・
アプリケーションへの移行をサポートする適応面におい
て、特に制約を持つ。64ビット・カーネルに移行する
場合コンピュータ・ユーザが32ビット・ユーザ・アプ
リケーションに対して払わなければならない投資を防ぐ
ため、32ビット・ユーザ・アプリケーションと64ビ
ット・ユーザ・アプリケーションの両方が64ビット・
カーネル上の実行をサポートされるように、STREA
MSは適合されなければならない。オープン・ストリー
ムのモジュールおよびドライバが上述の例のような64
ビット・カーネルの文脈の範囲内でのみ実行し、従っ
て、32ビット・アプリケーションの文脈知識を欠如し
ているので、それらモジュールおよびドライバは、64
ビット・アプリケーションの要求事項と相違する32ビ
ット・アプリケーションの要求事項を充足するようにス
トリーム・データ解釈、ストリーム実行行動などを適合
することが制約される。
The stream head is the only component in the stream that can copy data between the user process level and the kernel process level. All other components perform the data transfer by simply communicating messages, thus isolating them from direct interaction with the user process. Thus, open stream modules and drivers have no knowledge of user process level context or information as they execute only within the context of kernel process level. Such lack of context facilitates a "one size fits all" approach to handle communication between user processes and kernel components. Such an approach adapts the stream data interpretation, stream execution behavior, etc. of modules and drivers to satisfy the change requests of whatever user processes are currently executing on open devices. It imposes restrictions. For example, the modules and drivers in the prior art STREAMS are 32-bit kernels that execute on a 32-bit kernel and processor architecture.
From an application, a 64-bit kernel running on a 64-bit kernel and processor architecture
There are particular restrictions in terms of adaptation that support the transition to applications. When migrating to a 64-bit kernel, both the 32-bit user application and the 64-bit user application are 64-bit
STREA to support execution on the kernel
The MS has to be adapted. 64 open stream modules and drivers as in the example above
Because they only execute within the context of the bit kernel, and therefore lack the context knowledge of 32-bit applications, those modules and drivers are
It is constrained to adapt stream data interpretation, stream execution behavior, etc. to meet the requirements of 32-bit applications that differ from the requirements of bit applications.

【0007】一般的に、データに接触する時は必ず、ア
プリケーションおよびカーネルの処理性能は劣化する。
従って、データがストリーム・ヘッドにおいてアクセス
される時は必ず、ストリーム・ヘッドにおいて可能な限
り多数の相互に排除的な動作を並列的に実行すべきであ
るということがすぐれたガイドラインであり、それによ
って、下流においてデータに再び接触されなければなら
ない必要性が減少する。
Generally, whenever data is contacted, application and kernel processing performance is degraded.
Therefore, it is a good guideline that whenever data is accessed at the stream head, as many parallel mutually exclusive operations as possible should be performed at the stream head. , Reduces the need to re-contact the data downstream.

【0008】[0008]

【発明が解決しようとする課題】従って、デバイスまた
はユーザ・プロセスの動的要求に応じたメッセージ処理
の実行をストリーム・ヘッドにおいて制御することがで
きる装置および方法が必要とされる。すなわち、カーネ
ル・レベル・ストリーム処理モジュールまたはデバイス
・ドライバに関するメッセージ処理関数を識別し、デバ
イスまたはユーザ・プロセスの要求のような種々のシス
テム要求に従ってストリーム・データ解釈、ストリーム
実行行動等を適合するためそれら諸関数がストリーム・
ヘッドにおいて使用可能となるように、ストリーム・ヘ
ッドにおけるそれら識別された諸関数の実行を制御する
装置および方法が必要とされる。
Accordingly, what is needed is an apparatus and method that can control the performance of message processing at the stream head in response to the dynamic demands of a device or user process. That is, to identify message processing functions for kernel level stream processing modules or device drivers, and to adapt stream data interpretation, stream execution behavior, etc. according to various system requirements such as those of the device or user process. Functions are streams
What is needed is an apparatus and method for controlling the execution of those identified functions in a stream head so that it can be used in the head.

【0009】[0009]

【課題を解決するための手段】本発明は、カーネル・レ
ベル・ストリーム処理モジュールまたはデバイス・ドラ
イバに関するメッセージ処理関数を識別し、デバイスま
たはユーザ・プロセスの要求のような種々のシステム要
求に従ってストリーム・データ解釈、ストリーム実行行
動等を適合するためそれら諸関数がストリーム・ヘッド
において使用可能となるように、ストリーム・ヘッドに
おけるそれら識別された諸関数の実行を制御する装置お
よび方法を提供する。
SUMMARY OF THE INVENTION The present invention identifies a message processing function for a kernel level stream processing module or device driver to stream data according to various system requirements, such as the requirements of a device or user process. An apparatus and method for controlling the execution of those identified functions at a stream head so that the functions are available at the stream head for adapting interpretations, stream execution behaviors, and the like.

【0010】一般的には、本発明は、デバイス・ドライ
バまたはストリーム処理モジュールによって識別される
メッセージ処理関数の実行を制御する関数コントローラ
を含むように特別に適合されたストリーム・ヘッドを含
む。好ましくは、デバイス・ドライバまたはストリーム
処理モジュールは、例えばデバイス・ドライバがストリ
ームを構築するためオープンされる時、あるいは、スト
リーム処理モジュールがストリーム上で使用可能にされ
る時、ストリームのメッセージを処理する関数をストリ
ーム・ヘッドに初期的に登録する。代替的形態として
は、ドライバまたはモジュールは、ストリーム・ヘッド
に1つまたは複数のパラメータを渡して、メッセージ毎
に関数を起動する。
In general, the present invention includes a stream head specifically adapted to include a function controller that controls the execution of message processing functions identified by a device driver or stream processing module. Preferably, the device driver or stream processing module is a function that processes the messages of the stream, for example when the device driver is opened to build the stream or when the stream processing module is enabled on the stream. Is initially registered with the stream head. Alternatively, the driver or module passes one or more parameters to the stream head to invoke the function for each message.

【0011】特に利点を持つ局面として、本発明は、デ
ータ形式変換関数を識別して、32ビット・ユーザ・ア
プリケーションの要求に従ってストリーム・データ解
釈、ストリーム実行行動等を適合するようにストリーム
・ヘッドにおける関数の実行を制御する64ビット・カ
ーネル・モジュールまたはドライバを提供する。同様
に、本発明は、プロトコール変換関数を識別して、ユー
ザ・アプリケーションのプロトコール形式要求に従って
メッセージ・プロトコール形式を変換するようにストリ
ーム・ヘッドにおける関数の実行を制御するモジュール
またはドライバを提供する。
In a particularly advantageous aspect, the present invention identifies a data format conversion function in the stream head to adapt stream data interpretation, stream execution behavior, etc., as required by a 32-bit user application. Provides a 64-bit kernel module or driver that controls the execution of functions. Similarly, the invention provides a module or driver that identifies the protocol conversion function and controls the execution of the function at the stream head to convert the message protocol format according to the protocol format requirements of the user application.

【0012】更に、関数を識別するモジュールまたはド
ライバによって、また、本発明に従ってストリーム・ヘ
ッドにおける関数の実行を制御することによって、可能
な限り多数の相互に排除的な動作が関数によって並列的
に実行され、そのため、下流においてデータに接触する
必要性が減少する。例えば、ネットワーキング・プロト
コールに関して最も共通的な必要タスクの1つは、デー
タ・パケットを送信する際にデータ完全性を維持するた
めチェックサムを計算することである。チェックサムを
サポートしていない従来技術の標準的コピー関数copyin
()とは対照的に、本発明は、カーネル・レベル・モジュ
ールまたはドライバ特有の関数を識別し、該関数のスト
リーム・ヘッドにおける実行を制御して、必要なチェッ
クサムを平行して生成している間にデータをユーザ空間
からカーネル空間に移動させる関数が使用可能とさせ
る。
Moreover, by the module or driver identifying the function and by controlling the execution of the function in the stream head according to the invention, as many mutually exclusive operations as possible are performed by the function in parallel. Therefore, the need to contact the data downstream is reduced. For example, one of the most common requisite tasks for networking protocols is computing checksums to maintain data integrity when sending data packets. Prior art standard copy function copyin without checksum support
In contrast to (), the present invention identifies a kernel level module or driver specific function and controls its execution at the stream head to generate the required checksum in parallel. Enables functions to move data from user space to kernel space while in progress.

【0013】加えて、本発明は、関数を識別するモジュ
ールまたはドライバを提供し、カーネル内のモジュール
またはドライバの状態の動的変化に応答してストリーム
・ヘッドにおける関数の実行を制御する手段および方法
を提供する。例えば、本発明は、接続ネットワークから
受け取る新しい情報に基づくモジュールまたはドライバ
の優先状態の変更に応答して、ストリーム・ヘッド上で
通常の優先度を持つメッセージとして既に待ち行列に入
れられたメッセージを優先処理すべきメッセージに変換
する関数を識別する手段および方法を提供する。
In addition, the present invention provides means and methods for providing a module or driver for identifying a function and controlling execution of the function at the stream head in response to dynamic changes in the state of the module or driver in the kernel. I will provide a. For example, the present invention prioritizes messages already queued as normal priority messages on the stream head in response to a change in module or driver priority state based on new information received from the connection network. Means and methods are provided for identifying a function that transforms a message to be processed.

【0014】[0014]

【発明の実施の形態】本発明の好ましい実施形態のブロ
ック図が図1に示されている。適切なソフトウェアによ
って制御された1つまたは複数のマイクロプロセッサを
好ましくは含むコンピュータ・システム100の範囲内
において、ストリームは、ユーザ・プロセス103と例
えばハードウェア装置または疑似装置のようなデバイス
107の間におけるメッセージの双方向通信を提供す
る。3つの主要タイプのストリーム処理エレメントは、
ストリーム・ヘッド111、オプションである処理モジ
ュール112、および例えばハードウェア・デバイス・
ドライバまたは疑似デバイス・ドライバのようなデバイ
ス・ドライバ113である。好ましい実施形態におい
て、本発明は、ストリーム・ヘッドにおいてメッセージ
処理関数を登録することができるようにSTREAMS
フレーム・ワークを拡張する。本発明に関連したSTR
EAMSの詳細は、UNIX System V Network Programmin
g by S. Rago,Addison Wesley professional computing
series(1993)のChapter 3およびChapter 9ないし11に
記載されている。
DETAILED DESCRIPTION OF THE INVENTION A block diagram of a preferred embodiment of the present invention is shown in FIG. Within the scope of computer system 100, which preferably includes one or more microprocessors controlled by appropriate software, a stream is between a user process 103 and a device 107, eg, a hardware device or pseudo device. Provides two-way communication of messages. The three main types of stream processing elements are:
A stream head 111, an optional processing module 112, and a hardware device, for example
A device driver 113, such as a driver or pseudo device driver. In a preferred embodiment, the present invention allows STREAMS to register message processing functions at the stream head.
Extend the framework. STR related to the present invention
For details on EAMS, see UNIX System V Network Programmin.
g by S. Rago, Addison Wesley professional computing
It is described in Chapter 3 and Chapters 9 to 11 of the series (1993).

【0015】図1に示されているように、デバイス・ド
ライバ11は、デバイスとの間でメッセージを通信する
ためデバイスに接続されている。モジュールおよびドラ
イバは、メッセージを通信することによってのみデータ
転送を実行するので、ユーザ・アプリケーション・プロ
グラムのようなユーザ・プロセスとのいかなる直接対話
からも隔離されている。ストリーム・ヘッドは、ユーザ
・プロセスとのメッセージ通信を行うためデバイス・ド
ライバとユーザ・プロセスの間に配置される。STRE
AMSフレーム・ワークの範囲内において、上記3つの
タイプの処理エレメントの中で、ストリーム・ヘッド
が、ユーザ・プロセス・レベルとカーネル・プロセス・
レベルの間でデータをコピーすることができる唯一の処
理エレメントである。詳細は後述するが、本発明は、1
つまたは複数のメッセージ処理関数121を識別するカ
ーネル・レベルのモジュールまたはドライバを備える。
好ましくは、メッセージ処理関数の各々は、図1に示さ
れる少くとも1つの関数ポインタによって識別される。
ストリーム・ヘッドは、識別されたメッセージ処理関数
のストリーム・ヘッドにおける実行を制御するコントロ
ーラ125を含む。
As shown in FIG. 1, the device driver 11 is connected to the device for communicating messages to and from the device. Modules and drivers perform data transfer only by communicating messages, and thus are isolated from any direct interaction with a user process, such as a user application program. The stream head is located between the device driver and the user process for message communication with the user process. STRE
Within the scope of the AMS framework, among the above three types of processing elements, the stream head is the user process level and the kernel process
It is the only processing element that can copy data between levels. Although the details will be described later, the present invention is
It comprises a kernel-level module or driver that identifies one or more message processing functions 121.
Preferably, each message processing function is identified by at least one function pointer shown in FIG.
The stream head includes a controller 125 that controls the execution at the stream head of the identified message processing function.

【0016】本発明の好ましい実施形態において、デバ
イス・ドライバがストリームを構築する時、あるいは、
ストリーム処理モジュールがストリーム上で使用可能と
される時、ストリーム・ヘッドにおいてメッセージ処理
関数を登録するため、ドライバまたはモジュールは、ス
トリーム・ヘッドにおけるコントローラに関数ポインタ
を伝える。従って、好ましい実施形態において、ストリ
ーム・ヘッドは、レジスタ・ブロックまたは1つのレジ
スタ127を含み、そこに関数ポインタを記録すること
によってメッセージ処理関数の識別情報を記録する。代
替的には、ドライバまたはモジュールは、メッセージ毎
に1つまたは複数のパラメータをストリーム・ヘッドに
渡してメッセージ処理関数を起動させる。従って、デバ
イス107またはユーザ・プロセス103の要求事項の
ようなシステム要求事項に従って、ストリーム・データ
解釈、ストリーム実行行動等を適合することができるよ
うに関数がストリーム・ヘッドにおいて使用可能とされ
る。
In a preferred embodiment of the invention, when the device driver builds the stream, or
When a stream processing module is enabled on a stream, the driver or module passes the function pointer to the controller at the stream head to register the message processing function at the stream head. Thus, in the preferred embodiment, the stream head includes a register block or one register 127 to record the identity of the message processing function by recording the function pointer therein. Alternatively, the driver or module passes one or more parameters for each message to the stream head to invoke the message processing function. Therefore, functions are made available at the stream head so that stream data interpretation, stream execution behavior, etc. can be adapted according to system requirements such as those of device 107 or user process 103.

【0017】好ましくは、ストリーム・ヘッドのレジス
タ・ブロックおよびコントローラは、モジュールまたは
ドライバによって登録された関数に対応する関数ポイン
タを記録するパブリック・データ構造を含む適切なソフ
トウェアを使用して該コンピュータ・システムの範囲内
で実現される。パブリック・データ構造は、モジュール
またはドライバによって登録された関数に対応する関数
ポインタを保持する。関数ベクトルが、現在の関数登録
状態を反映する。従って、ストリーム・ヘッド命令<str
eam.h>の範囲内に以下のようなパブリック・データ構造
が定義される。
Preferably, the stream head register block and controller use suitable software including public data structures that record function pointers corresponding to functions registered by the module or driver. It is realized within the range of. The public data structure holds a function pointer that corresponds to the function registered by the module or driver. The function vector reflects the current function registration status. Therefore, the stream head instruction <str
The following public data structures are defined within eam.h>.

【0018】[0018]

【表1】 struct sth_func_reg{ int (*sth_copyin)(); /* 書込側copyin */ int sth_copyin_threshold; /* sth_copyin()に渡されるパラメータ */ int (*sth_32_to_64)(); /* 書込側32-to-64ビット変換関数 */ int (*sth_write_opt)(); /* 書込側オプション関数 */ int (*sth_read_opt)(); /* 読取側オプション関数 */ int (*sth_ioctl_opt)(); /* ioctlオプション関数 */ int (*sth_64_to_32)(); /* 読取側64-to-32ビット変換関数 */ }[Table 1] struct sth_func_reg {int (* sth_copyin) (); / * Writing side copyin * / int sth_copyin_threshold; / * Parameter passed to sth_copyin () * / int (* sth_32_to_64) (); / * Writing side 32-to-64-bit conversion function * / int (* sth_write_opt) (); / * Write side option function * / int (* sth_read_opt) (); / * Read side option function * / int (* sth_ioctl_opt) () ; / * ioctl option function * / int (* sth_64_to_32) (); / * reader 64-bit conversion function * /}

【0019】ストリーム・ヘッド宣言(すなわちプライ
ベート構造)の範囲内において、以下の構造が定義され
る。
Within the scope of the stream head declaration (ie private structure), the following structures are defined.

【0020】[0020]

【表2】 struct sth_s { ... struct sth_func_reg_sth_f_reg; ... }[Table 2] struct sth_s {... struct sth_func_reg_sth_f_reg; ...}

【0021】図2は、本発明の好ましい実施形態の動作
の流れを例示している。好ましい実施形態において、ス
トリーム・モジュールまたはドライバは、str_func_ins
tall()を介して関数を登録する。モジュールまたはドラ
イバの導入時、またはモジュールまたはドライバが関数
を登録することを決断する時はいつでも、str_func_ins
tall()が呼び出される。例えば、ドライバAが、書込み
または読取り経路上で使用するアプリケーションのた
め、32から64ビットへおよび64ビットから32ビ
ットへの変換関数を識別する。これらの関数はそのドラ
イバがオープンされる時登録される。これによって、単
一のドライバ・インスタンスが32ビットおよび64ビ
ット・アプリケーションを同時にサポートすることが可
能となる。同様に、モジュール・イネーブル(使用可能)
動作が発生する場合、STREAMSは、モジュールの
オープン・ルーチンを起動して、ストリーム・ヘッド登
録を実行する。
FIG. 2 illustrates the operational flow of the preferred embodiment of the present invention. In the preferred embodiment, the stream module or driver is str_func_ins
Register the function via tall (). Whenever a module or driver is installed, or whenever a module or driver decides to register a function, str_func_ins
tall () is called. For example, driver A identifies the 32 to 64 bit and 64 bit to 32 bit conversion functions for the application to use on the write or read path. These functions are registered when the driver is opened. This allows a single driver instance to support 32-bit and 64-bit applications simultaneously. Similarly, module enable (enabled)
If an action occurs, STREAMS invokes the module's open routine to perform stream head registration.

【0022】図2に示されるように、モジュールが関数
ポインタを使用してsth_32_to_64関数を識別して、記録
のためストリーム・ヘッドのコントローラにその関数ポ
インタを転送する。モジュールがメッセージを送ること
によって該関数を使用不可にする場合もある。例えば、
モジュールはメッセージを送ることによって関数を使用
不可にして、その結果、 sth->sth_func_reg.sth_32_to_64 = NULL と表現されるようにデータ構造中におけるレコードの評
価が無(ヌル)になる。
As shown in FIG. 2, the module uses the function pointer to identify the sth_32_to_64 function and forwards the function pointer to the stream head controller for recording. The module may also disable the function by sending a message. For example,
The module disables the function by sending a message, which results in no (null) evaluation of the record in the data structure as expressed by sth-> sth_func_reg.sth_32_to_64 = NULL.

【0023】2つのSTREAMSコンポーネントが、
例えば2つのsth_read_opt()関数のような矛盾するメッ
セージ処理関数を登録した場合、ストリーム・ヘッド構
造は、スタックの範囲内に最高位のコンポーネント関数
を反映するであろう。矛盾がなければ、ストリーム・ヘ
ッドは両方のコンポーネントの関数機能を反映するであ
ろう。好ましい呼び出しシーケンスは次の通りである。
Two STREAMS components are
If you register conflicting message handling functions, such as two sth_read_opt () functions, the stream head structure will reflect the highest component function within the stack. If there is no conflict, the stream head will reflect the functional capabilities of both components. The preferred calling sequence is as follows:

【0024】[0024]

【表3】str_func_install(struct sth_func_reg*func_
reg,int func_mask);func_maskは、次のいずれかから構
成されるビット・マスクである。
[Table 3] str_func_install (struct sth_func_reg * func_
reg, int func_mask); func_mask is a bit mask composed of any of the following.

【0025】[0025]

【表4】 /* func-maskのためのフラグ */ #define FUNC_REG_COPYIN_ENABLE 0X0001 #define FUNC_REG_COPYIN_DISABLE 0X0002 #define FUNC_REG_32_TO_64_ENABLE 0X0004 #define FUNC_REG_32_TO_64_DISABLE 0X0008 #define FUNC_REG_WRITE_OPT_ENABLE 0X0010 #define FUNC_REG_WRITE_OPT_DISABLE 0X0020 #define FUNC_REG_READ_OPT_ENABLE 0X0040 #define FUNC_REG_READ_OPT_DISABLE 0X0080 #define FUNC_REG_64_TO_32_ENABLE 0X0100 #define FUNC_REG_64_TO_32_DISABLE 0X0200 #define FUNC_REG_IOCTL_OPT_ENABLE 0X0400 #define FUNC_REG_IOCTL_OPT_DISABLE 0X0800[Table 4] / * flags for the func-mask * / #define FUNC_REG_COPYIN_ENABLE 0X0001 #define FUNC_REG_COPYIN_DISABLE 0X0002 #define FUNC_REG_32_TO_64_ENABLE 0X0004 #define FUNC_REG_32_TO_64_DISABLE 0X0008 #define FUNC_REG_WRITE_OPT_ENABLE 0X0010 #define FUNC_REG_WRITE_OPT_DISABLE 0X0020 #define FUNC_REG_READ_OPT_ENABLE 0X0040 #define FUNC_REG_READ_OPT_DISABLE 0X0080 #define FUNC_REG_64_TO_32_ENABLE 0X0100 #define FUNC_REG_64_TO_32_DISABLE 0X0200 #define FUNC_REG_IOCTL_OPT_ENABLE 0X0400 #define FUNC_REG_IOCTL_OPT_DISABLE 0X0800

【0026】この呼出しシーケンスは、オープン時また
はモジュール起動時にどの関数が自動的に登録されるか
を指定する。func_regおよびfunc_maskは、そのモジュ
ール・スイッチ・テーブル・エントリに次のように記憶
される。
This calling sequence specifies which functions are automatically registered at open or at module startup. func_reg and func_mask are stored in the module switch table entry as follows:

【0027】[0027]

【表5】 struct modsw{ struct modsw* d_next; struct modsw* d_prev; char d_namee[FMNAMESZ+1]; char d_flags; SQHP d_sqh; int d_curstr; struct streamtab*d_str; struct streamtab*d_default_alt; int d_naltstr; struct streamtab**d_altstr; int d_sq_level; int d_refcnt; int d_major; struct sth_s* d_pmux_top; int d_func_mask; struct sth_func_reg*d_func_reg; };[Table 5] struct modsw {struct modsw * d_next; struct modsw * d_prev; char d_namee [FMNAMESZ + 1]; char d_flags; SQHP d_sqh; int d_curstr; struct streamtab * d_str; struct streamtab * d_default_alt; int d_naltstr; struct streamtab * d_altstr; int d_sq_level; int d_refcnt; int d_major; struct sth_s * d_pmux_top; int d_func_mask; struct sth_func_reg * d_func_reg;};

【0028】モジュールまたはドライバは、M_SETOPTS
メッセージを通してストリーム・ヘッドに通知すること
によって登録されたメッセージ処理関数を起動または停
止させる。これは、<stream.h>内に定義されたstroptio
nsデータ構造を拡張することによって行われる。
The module or driver is M_SETOPTS
Starts or stops the registered message handling functions by notifying the stream head through a message. This is stroptio defined in <stream.h>
This is done by extending the ns data structure.

【0029】[0029]

【表6】 struct stroptions { ulong so_flags; /* セットすべきオプション */ short so_readopt; /* 読取オプション */ ushort so_wroff; /* 書込オフセット */ long so_minpsz; /* 最小読取パケット・サイズ */ long so_maxpsz; /* 最大読取パケット・サイズ */ ulong so_hiwat; /* 読取待ち行列上限マーク */ ulong so_lowat; /* 読取待ち行列下限マーク */ unsigned char so_band; /* 上下限マークの幅 */[Table 6] struct stroptions {ulong so_flags; / * Option to be set * / short so_readopt; / * Read option * / ushort so_wroff; / * Write offset * / long so_minpsz; / * Minimum read packet size * / long so_maxpsz; / * Maximum read packet size * / ulong so_hiwat; / * Read queue high mark * / ulong so_lowat; / * Read queue low mark * / unsigned char so_band; / * Upper and lower mark width * /

【0030】このデータ構造を次のように拡張すること
によって、関数登録をサポートしないモジュールまたは
ドライバが従来通り動作し続けるようにオリジナルのレ
イアウトが維持される。
By extending this data structure as follows, the original layout is maintained so that modules or drivers that do not support function registration continue to operate as before.

【0031】[0031]

【表7】 struct stroptions { ulong so_flags; /* セットすべきオプション */ short so_readopt; /* 読取オプション */ ushort so_wroff; /* 書込オフセット */ longso_minpsz; /* 最小読取パケット・サイズ */ longso_maxpsz; /* 最大読取パケット・サイズ */ ulong so_hiwat; /* 読取待ち行列上限マーク */ ulong so_lowat; /* 読取待ち行列下限マーク */ unsigned char so_band; /* 上下限マークの幅 */ short so_device_id; /* ドライバまたはモジュール識別子 */ short so_func_mask; /* イネーブルされた関数 */ };[Table 7] struct stroptions {ulong so_flags; / * Option to be set * / short so_readopt; / * Read option * / ushort so_wroff; / * Write offset * / longso_minpsz; / * Minimum read packet size * / longso_maxpsz; / * Maximum read packet size * / ulong so_hiwat; / * Read queue high mark * / ulong so_lowat; / * Read queue low mark * / unsigned char so_band; / * Upper and lower mark width * / short so_device_id; / * Driver or module identifier * / short so_func_mask; / * enabled functions * /};

【0032】so-device-idは、ドライバまたはモジュー
ルがシステム内に導入される時返されるデバイス識別子
である。好ましい実施形態に関して、これはstr_instal
l()経由で実行される。str_install()は、関数登録を実
行することを望む時はいつでも利用することができる広
域変数にドライバまたはモジュールが記録するユニーク
なso_device_idを生成する。so_func_maskは、どの関数
が起動されるべきかあるいは動作停止されるべきかを指
定する。ビットが定義されていない場合は、対応する登
録されたメッセージ処理関数は有効のままとされる。
The so-device-id is the device identifier returned when the driver or module is installed in the system. For the preferred embodiment, this is str_instal
It is executed via l (). str_install () creates a unique so_device_id that the driver or module records in a global variable that is available whenever it wants to perform a function registration. so_func_mask specifies which function should be activated or deactivated. If the bit is not defined, the corresponding registered message handling function remains valid.

【0033】モジュールまたはドライバは、それらがス
トリーム・ヘッド特性を修正するために選択するいかな
る時点においても、特別に適合されたM_SETOPTSメッセ
ージを送出する能力を持つ。この構造が解読される時、
ストリーム・ヘッドのコードは、so_func_maskを検査し
て、セットされたフラグに基いて対応するストリーム・
ヘッド関数アドレスを記録するかあるいは無効にする。
関数が使用可能とされるかあるいは使用可能のままとさ
れる場合、ストリーム・ヘッドは、フラグをセットし
て、ストリーム・ヘッド・メッセージ処理の間に関数登
録が検査されなければならないことを標示する。
Modules or drivers are capable of sending specially adapted M_SETOPTS messages at any time they choose to modify stream head characteristics. When this structure is deciphered,
The code for the stream head checks so_func_mask and based on the flags set, the corresponding stream
Record or invalidate head function address.
If the function is enabled or remains enabled, the stream head sets a flag to indicate that the function registration should be checked during stream head message processing. .

【0034】システム呼び出しと連係して本発明を使用
するため、以下のような適合が行われる。write()シス
テム呼び出しに関して、下記のコードがSTREAMS
実施形態に追加される。登録される書込み関数は、好ま
しくは、ユーザ空間からカーネル空間へのデータの移動
を自動チェックサム計算と結合するプロトコール依存型
チェックサム・オフロード関数を含む。この技術を使用
することによって、本発明は、STREAMSフレーム
・ワークに付加価値を与えながらプロトコールからの独
立を維持し続ける。
To use the present invention in conjunction with system calls, the following adaptations are made. Regarding the write () system call, the following code is STREAMS
Added to the embodiment. Registered write functions preferably include protocol dependent checksum offload functions that combine the movement of data from user space to kernel space with automatic checksum calculations. By using this technique, the present invention continues to remain protocol independent while adding value to the STREAMS framework.

【0035】好ましくは、そのようなコピー/チェック
サム(copyin/checksum)結合関数は、処理性能を向上さ
せるためしきい値変数を参照しなければならない。この
しきい値変数はオリジナルのデータ構造の一部として記
憶され、関数に渡される。次に、関数はuniopの長さフ
ィールドを調べ、しきい値変数と比較して、登録された
copyin関数を実行することが適切か否かを判断する。上
記動作を行わない環境はプロトーコル依存型であるが、
基本プロトコールが長さ512バイトのような小さいパ
ケットのみを送り出すことを許容し、アプリケーション
が8Kバイト単位のデータを送り出すような場合が、こ
のようなケースであろう。そのようなケースでは、16
個の登録したコピー/チェックサム結合関数呼び出しお
よびその他の関連オーバーヘッドを起動するのではな
く、標準のコピーおよびチェックサム処理を使用する方
が処理性能は高い。起動すべき時点等のための適切な公
式を決定することは、各プロトコール毎になんらかの実
験を必要とするであろうが、これは、STREAMSフ
レーム・ワークおよび本発明の実施形態とは無関係であ
る。次の命令コードの例は、write()システム呼び出し
と連係する本発明の動作に関するものである。
Preferably, such a copyin / checksum combining function must reference a threshold variable to improve processing performance. This threshold variable is stored as part of the original data structure and passed to the function. Then the function looks up the length field of uniop, compares it with the threshold variable, and registers
Determine if it is appropriate to execute the copyin function. The environment that does not perform the above operation is protocol dependent type,
This may be the case when the basic protocol allows only small packets, such as 512 bytes long, to be sent out, and the application sends out 8 Kbytes of data. In such cases, 16
The performance is better using standard copy and checksum processing rather than invoking a single registered copy / checksum combination function call and other related overhead. Determining the appropriate formula for when to launch etc will require some experimentation for each protocol, which is independent of the STREAMS framework and embodiments of the invention. . The following opcode examples relate to the operation of the invention in conjunction with the write () system call.

【0036】[0036]

【表8】 /* もしも関数が登録されていれば、コントローラは適切な関数を実行する */ if (sth->sth_flags & F_STH_FUNC_REG_ENABLED){ if (sth->sth_f_reg.sth_copyin) { error = (*sth->sth_f_reg.sth_copyin)(mp, w_cnt, uiop, sth->sth_copyin_threshold); /* EAGAINであれば, copyinは実行されなかったので、通常のタスクを実行 */ if (error == EAGAIN) UIOMOVE_WRITE(mp, cnt, uiop, error); if (error) goto error_processing_code) }else{ UIOMOVE_WRITE(mp, cnt, uiop, error); } /* コントローラは呼び出し元が32ビット・アプリケーションであって、 *かつ定義されていれば、32から64ビットへの変換を実行する。 *これはmblk上で実行される。 */ if (sth->sth_f_reg.sth_32_to_64 && uarea->32bit_hint) error = (*sth->sth_f_reg.sth_32_to_64)(mp); /* その他の形式のオプション処理が出力方向データ上で実行されることを *ドライバ/モジュールが望む場合、これをmblk上で実行する。 */ if (sth->sth_f_reg.sth_write_opt) error = (*sth->sth_f_reg.sth_write_opt)(mp); }else{ /* 関数は定義されていないので、オリジナルのコードを実行する。 */ }[Table 8] / * If the function is registered, the controller executes the appropriate function * / if (sth-> sth_flags & F_STH_FUNC_REG_ENABLED) {if (sth-> sth_f_reg.sth_copyin) {error = (* sth -> sth_f_reg.sth_copyin) (mp, w_cnt, uiop, sth-> sth_copyin_threshold); / * If EAGAIN, copyin was not executed, so the normal task is executed * / if (error == EAGAIN) UIOMOVE_WRITE ( mp, cnt, uiop, error); if (error) goto error_processing_code)} else {UIOMOVE_WRITE (mp, cnt, uiop, error);} / * The controller is a 32-bit application and is * and defined If so, the conversion from 32 to 64 bits is performed. * This is run on mblk. * / if (sth-> sth_f_reg.sth_32_to_64 && uarea-> 32bit_hint) error = (* sth-> sth_f_reg.sth_32_to_64) (mp); / * Indicates that other types of option processing are performed on the output direction data * Run this on mblk if the driver / module wants it. * / if (sth-> sth_f_reg.sth_write_opt) error = (* sth-> sth_f_reg.sth_write_opt) (mp);} else {/ * The function is not defined, so the original code is executed. * /}

【0037】書込み経路コードの残りの部分は通常通り
実行される。putmsg()/putpmsg()に関して、STREA
MSフレーム・ワークは、次のように拡張される。putm
sg()/putpmsg()は、M_PROTOまたはM_PCPROTOメッセー
ジを用いて、より低位のモジュールまたはドライバに渡
される制御データを呼び出し元が指定することを可能に
する。このデータは、一旦それがカーネルに持ち込まれ
ると、変換または後処理を必要とするかもしれない。こ
のような場合の例は、TPI(すなわちTransport Provi
der Interfaceトランスポート・プロバイダ・インター
フェース)の32ビット版を使用してコンパイルされた
32ビット・アプリケーションである。このインターフ
ェースは、本発明によって32ビットとしても64ビッ
トとしても正しく解読されるデータ・エレメントを含む
構造を定義する。これらのデータ・エレメントは、64
ビット・システムが正しくデータ解釈を行うためには、
64ビット・データ要素に変換される必要がある。加え
て、それがカーネルに一旦持ち込まれたなら、制御デー
タはなにがしかの他の変換形式を必要とするかもしれな
い(注:write()経路上のような代替的copyin経路を経由
して持ち込まれる通常のデータは変更されなくてよ
い)。適切な命令コードの1例は次の通りである。
The rest of the write path code executes normally. STREA regarding putmsg () / putpmsg ()
The MS framework is extended as follows. putm
sg () / putpmsg () allows the caller to specify the control data passed to the lower module or driver using the M_PROTO or M_PCPROTO message. This data may require conversion or post-processing once it is brought into the kernel. An example of such a case is the TPI (ie Transport Provi
der Interface (Transport Provider Interface) is a 32-bit application compiled using a 32-bit version. This interface defines a structure containing data elements that are correctly decoded by the present invention as either 32 or 64 bits. These data elements are 64
In order for the bit system to correctly interpret the data,
It needs to be converted to a 64-bit data element. Additionally, once it is brought into the kernel, the control data may need some other form of transformation (note: it is brought in via an alternate copyin path, such as on the write () path). The normal data that is submitted does not have to change). An example of a suitable instruction code is as follows.

【0038】[0038]

【表9】 /* もし処理中であれば制御部分がカーネルに先ずコピーされる。 *通常のコピー(copyin)動作が実行され、次に後処理を次のように実行する。 */ if (error = COPYIN(user_ptr, mp, cnt, ctl)){ /* エラーからの回復処理を実行する */ } if (sth->sth_flags & F_STH_FUNC_REG_ENABLED) { if (sth->sth_f_reg.sth_copyin) { error = (*sth->sth_f_reg.sth_copyin)(mp, w_cnt, uiop, sth->sth_copyin_threshold); /* EAGAINであれば、copyinは実行されなかったので、通常タスクを実行する。 */ if (error == EAGAIN) error = COPYIN(user_ptr, mp, cnt, ctl); if (error) goto error_processing_code; }else{ COPYIN(user_ptr, mp, cnt, ctl);} /* 呼び出し元が32ビット・アプリケーションであって、 *かつ定義されていれば、32から64ビットへの変換を実行する。 */ if (sth->sth_f_reg.sth_32_to_64 && uarea->32bit_hint) error = (*sth->sth_f_reg.sth_32_to_64)(mp); /* その他の形式のオプション処理が出力方向データ上で実行されることを *ドライバ/モジュールが望む場合、これをmblk上で実行する。 */ if (sth->sth_f_reg.sth_write_opt) error = (*sth->sth_f_reg.sth_write_opt)(mp); }else{ /* 関数は定義されていないので、オリジナルのコードを実行する。 */[Table 9] / * If it is in process, the control part is first copied to the kernel. * The normal copy in operation is performed, then the post processing is performed as follows. * / if (error = COPYIN (user_ptr, mp, cnt, ctl)) {/ * Perform error recovery processing * /} if (sth-> sth_flags & F_STH_FUNC_REG_ENABLED) {if (sth-> sth_f_reg.sth_copyin) {error = (* sth-> sth_f_reg.sth_copyin) (mp, w_cnt, uiop, sth-> sth_copyin_threshold); / * If EAGAIN, copyin was not executed, so the normal task is executed. * / if (error == EAGAIN) error = COPYIN (user_ptr, mp, cnt, ctl); if (error) goto error_processing_code;} else {COPYIN (user_ptr, mp, cnt, ctl);} / * Caller is 32 Performs 32 to 64 bit conversion if it is a bit application and * and is defined. * / if (sth-> sth_f_reg.sth_32_to_64 && uarea-> 32bit_hint) error = (* sth-> sth_f_reg.sth_32_to_64) (mp); / * Indicates that other types of option processing are performed on the output direction data * Run this on mblk if the driver / module wants it. * / if (sth-> sth_f_reg.sth_write_opt) error = (* sth-> sth_f_reg.sth_write_opt) (mp);} else {/ * The function is not defined, so the original code is executed. * /

【0039】read()システム呼び出しに関しては、コー
ドは本質的に同様であるが、その関数の機能性は、モジ
ュール/ドライバ修正を必要とする関数機能性と置き換
えられる。本発明は、32ビット・ユーザ・プロセスの
要求事項に従ってストリーム・データ解釈、ストリーム
実行行動等に適合する関数を処理する64ビット・カー
ネルのモジュールまたはドライバを備える。特に、この
関数は、ユーザ・プロセスのスレッドを検査して32ビ
ット形式を必要としているのか64ビット形式を必要と
しているのか判断する。ユーザ・プロセスが32ビット
形式を必要としているとすれば、該関数は、ユーザ・プ
ロセスによって必要とされる32ビット・データ形式と
デバイス・ドライバによって必要とされる64ビット・
データ形式の間でメッセージのデータ形式を変換する。
同様に、接続時に初期的に受け入れられたプロトコール
の現在時使用バージョンと(例えばインターネット・プ
ロトコル(IP)バージョン4ではなくインターネット・
プロトコル(IP)バージョン6と)アプリケーションが
対話できない場合は、データはその時点で正しいプロト
コール形式に変換される。以下は、この関数のコードの
1例である。
With respect to the read () system call, the code is essentially similar, but the functionality functionality is replaced with the functionality functionality that requires module / driver modification. The present invention comprises a 64-bit kernel module or driver that handles functions adapted to stream data interpretation, stream execution behavior, etc. according to the requirements of a 32-bit user process. In particular, this function examines the thread of the user process to determine if it needs the 32-bit format or the 64-bit format. If the user process requires a 32-bit format, the function returns a 32-bit data format required by the user process and a 64-bit data format required by the device driver.
Convert the message data format between data formats.
Similarly, the current-used version of the protocol initially accepted at the time of connection (for example, Internet Protocol (IP) version 4
If the application cannot interact with the protocol (IP) version 6, the data is then converted into the correct protocol format. The following is an example of the code for this function.

【0040】[0040]

【表10】 /* 関数が既に登録されていれば、コントローラは適切な関数を実行する。*/ if (sth->sth_flags & F_STH_FUNC_REG_ENABLED){ /* その他の形式のオプション処理が出力方向データ上で実行されることを *ドライバ/モジュールが望む場合、これをmblk上で実行する。 *IPv4からIPv6への変換が実行されるのはこの場合の1例である。 */ if (sth->sth_f_reg.sth_read_opt) rror = (*sth->sth_f_reg.sth_read_opt)(mp); } /* 呼び出し元アプリケーションが32ビット・アプリケーションで、 *その変換関すが登録されていれば、データをユーザ空間へ移動する前に *その関数を起動する。 t application and there is a */ if (sth->sth_f_reg.sth_64_to_32 && uarea->32bit_hint) error = (*sth->sth_f_reg.sth_64_to_32)(mp); } /* データ移動に関する現在時実施形態を使用してデータを移動する */ UIOMOVE_READ(mp, cnt, uiop, error);[Table 10] / * If the function is already registered, the controller executes the appropriate function. * / if (sth-> sth_flags & F_STH_FUNC_REG_ENABLED) {/ * If the driver / module wants any other form of optional processing * to be performed on the outbound data, do this on mblk. * It is an example of this case that the conversion from IPv4 to IPv6 is performed. * / if (sth-> sth_f_reg.sth_read_opt) rror = (* sth-> sth_f_reg.sth_read_opt) (mp);} / * If the calling application is a 32-bit application and the * transformation is registered, then Invoke the function * before moving the data to user space. t application and there is a * / if (sth-> sth_f_reg.sth_64_to_32 && uarea-> 32bit_hint) error = (* sth-> sth_f_reg.sth_64_to_32) (mp);} / * To move data * / UIOMOVE_READ (mp, cnt, uiop, error);

【0041】getmsg()およびgetpmsg() システム呼び出
しに関連した本発明の使用は、上述のread()システム呼
び出しの場合に類似しているが、メッセージの制御デー
タ部分を取り扱うために追加のコードが含まれる。その
コードの例は以下の通りである。
The use of the invention in connection with the getmsg () and getpmsg () system calls is similar to that of the read () system call above, but with additional code to handle the control data portion of the message. included. An example of the code is as follows.

【0042】[0042]

【表11】 /* 関数が既に登録されていれば、コントローラは適切な関数を実行する。*/ if (sth->sth_flags & F_STH_FUNC_REG_ENABLED) { /* その他の形式のオプション処理が出力方向データ上で実行されることを *ドライバ/モジュールが望む場合、これをmblk上で実行する。 *IPv4からIPv6への変換が実行されるのはこの場合の1例である。 */ if (sth->sth_f_reg.sth_read_opt) error = (*sth->sth_f_reg.sth_read_opt)(mp); /* 次に、メッセージのM_DAYTA部分に対して、32ビット変換を、 *もしその関数が存在し登録されていれば、実行する。 */ if (sth->sth_f_reg.sth_64_to_32 && uarea->32bit_hint) error = (*sth->sth_f_reg.sth_64_to_32)(mp); } error = COPYOUT(mp, user_ptr, cnt, ctl);[Table 11] / * If the function is already registered, the controller executes the appropriate function. * / if (sth-> sth_flags & F_STH_FUNC_REG_ENABLED) {/ * If the driver / module wants some other form of * optional processing to be done on outbound data, do this on mblk. * It is an example of this case that the conversion from IPv4 to IPv6 is performed. * / if (sth-> sth_f_reg.sth_read_opt) error = (* sth-> sth_f_reg.sth_read_opt) (mp); / * Next, perform 32-bit conversion for the M_DAYTA part of the message, * if that function exists. If it is registered, execute it. * / if (sth-> sth_f_reg.sth_64_to_32 && uarea-> 32bit_hint) error = (* sth-> sth_f_reg.sth_64_to_32) (mp);} error = COPYOUT (mp, user_ptr, cnt, ctl);

【0043】登録された関数処理が完了すると、データ
を通常の実行経路を使用するユーザ空間へ移動する。
When the registered function processing is completed, the data is moved to the user space using the normal execution path.

【0044】ioctl経路に関しては、データがカーネル
から移動されているのかカーネルへ移動しているのかに
従って、同様のステップが実行される。オプションとし
てのioct関数がデータの移動を実行するものと、あるい
は、データの移動を制限して上述の事前または事後処理
の役割を単純化すると、実施上は仮定される。ioctlは
異なるモジュールまたはドライバと通信することもでき
る点は理解されるべきであろう。従って、このオプショ
ン構造が利用されるならば、これらのメッセージがどの
ように解釈されるかという点に関する理解を持って(通
常は最高位のモジュール/ドライバが最終アービタであ
るという理解の下で)、モジュールおよびドライバは構
築される。このioctl経路が完全性の目的のために定義
されているが、ioctlがメッセージ毎の関数を使用する
ことが推奨される。なぜならば、ioctlを処理するモジ
ュールまたはドライバの各々が特定のメッセージを目標
とすることができるからである。コードの例は次の通り
である。
With respect to the ioctl path, similar steps are performed depending on whether data is being moved to or from the kernel. It is assumed in practice that the optional ioct function performs the data movement, or limits the data movement to simplify the role of the pre- or post-processing described above. It should be appreciated that ioctls can also communicate with different modules or drivers. Therefore, if this optional structure is used, have an understanding of how these messages are interpreted (under the understanding that the highest module / driver is usually the final arbiter). , Modules and drivers are built. Although this ioctl path is defined for completeness purposes, it is recommended that ioctl use per-message functions. This is because each module or driver that handles ioctls can target a particular message. An example of the code is as follows.

【0045】[0045]

【表12】if (sth->sth_flags & F_STH_FUNC_REG_ENAB
LED &&sth->sth_f_reg.sth_ioctl_opt) error = (*sth->sth_f_reg.sth_ioctl_opt)(mp, direct
ion_hint);
[Table 12] if (sth-> sth_flags & F_STH_FUNC_REG_ENAB
LED &&sth-> sth_f_reg.sth_ioctl_opt) error = (* sth-> sth_f_reg.sth_ioctl_opt) (mp, direct
ion_hint);

【0046】更に、本発明は関数を識別するモジュール
またはドライバを備え、カーネル内のモジュールまたは
ドライバの状態の動的変化に応答してストリーム・ヘッ
ドにおける実行を制御する手段を提供する。例えば、本
発明は、接続ネットワークから受け取る新しい情報を基
にしたモジュールまたはドライバの優先度状態の変更に
応答して、ストリーム・ヘッド上の待ち行列に既に保持
されているメッセージの処理順位を通常から優先に変換
する関数を識別する手段を提供する。これにより、要求
される機能を提供するため、ユーザ・アプリケーション
またはインターフェース・ライブラリを修正する必要性
がなくなる。
The present invention further comprises a module or driver that identifies a function and provides means for controlling execution at the stream head in response to dynamic changes in the state of the module or driver in the kernel. For example, the present invention typically prioritizes the processing of messages already held in the queue on the stream head in response to a change in module or driver priority state based on new information received from the connection network. It provides a means to identify the function to convert to priority. This eliminates the need to modify the user application or interface library to provide the required functionality.

【0047】本発明の代替実施形態において、STRE
AMSフレーム・ワークは、M_COPYOUTに関するread, g
etmsg, getpmsg, ioctlのような入力方向経路上でメッ
セージ毎に関数登録を実行するモジュールまたはドライ
バの能力をサポートするように拡張される。このような
機能性が提供される理由は、モジュールまたはドライバ
が上流方向に向かうすべてのメッセージについて1つの
関数セットが常に起動される必要はなく、ある番号Nの
パケットだけについて必要とされるに過ぎない場合があ
るからである。このような機能性はシステムに柔軟性を
持たせるために追加される。そのような関数を提供する
根本的概念はなお同じである。そのような関数は、起動
されたアプリケーションに基づいてデータを変換するた
めに起動される。最も一般的用途は、本発明のパラメー
タについて常に例としてあげている64ビット対32ビ
ットの変換のためである。第1に、ユーザ・データを記
述するために使用されるメッセージ構造が適切に修正さ
れる。このデータ構造は<stream.h>内に定義される。
In an alternative embodiment of the invention, the STRE
The AMS framework uses read, g for M_COPYOUT
It is extended to support the ability of a module or driver to perform function registration per message on the ingress path, such as etmsg, getpmsg, ioctl. The reason such functionality is provided is that the module or driver need not always have one function set invoked for every message going upstream, but only for a packet with a number N. This is because there are cases where it does not exist. Such functionality is added to make the system flexible. The underlying concept of providing such a function is still the same. Such a function is invoked to transform the data based on the launched application. The most common use is for the 64-bit to 32-bit conversion, which is always given as an example for the parameters of the invention. First, the message structure used to describe the user data is modified appropriately. This data structure is defined in <stream.h>.

【0048】[0048]

【表13】 struct msgb { struct msgb* b-next; /* 待ち行列上の次のメッセージ */ struct msgb* b_prev; /* 待ち行列上の前のメッセージ */ struct msgb* b-cont; /* 次のメッセージ・ブロック */ unsigned char* b-rptr; /* 最初の未読データ・バイト */ unsigned char* b-wptr; /* 再ション未書込データ・バイト */ struct datab* b-datap; /* データ・ブロック */ unsigned char b-band; /* メッセージ優先度 */ unsigned char b-pad1; unsigned short b_flag; /* メッセージ・フラグ */ (int32 *) b_func; /* 起動されるべき関数 */ MSG_KERNEL_FIELDS };[Table 13] struct msgb {struct msgb * b-next; / * Next message on the queue * / struct msgb * b_prev; / * Previous message on the queue * / struct msgb * b-cont; / * Next message block * / unsigned char * b-rptr; / * First unread data byte * / unsigned char * b-wptr; / * Rewrite unwritten data byte * / struct datab * b-datap; / * Data block * / unsigned char b-band; / * message priority * / unsigned char b-pad1; unsigned short b_flag; / * message flag * / (int32 *) b_func; / * function to be invoked * / MSG_KERNEL_FIELDS};

【0049】加えて、msgb->b_flagフィールド内に新し
いフラグが定義される。この新しいフラグは、ユーザ・
データがカーネルからユーザ空間へ次のアプリケーショ
ン・システム呼び出しを介して移動される時、msgb構造
内に記憶されている関数がユーザ・データに対して起動
されなければならないことを標示するために使用され
る。
In addition, a new flag is defined in the msgb-> b_flag field. This new flag is
Used to indicate that the function stored in the msgb structure must be invoked for user data when the data is moved from the kernel to user space via the next application system call. It

【0050】[0050]

【表14】#define MSGFUNCREG 0x2000 /* データに組
み込まれた関数を実行する。*/
[Table 14] #define MSGFUNCREG 0x2000 / * Execute the function embedded in the data. * /

【0051】代替実施形態では、b_flagフィールドがセ
ットされるが、どの登録メッセージ処理関数を起動すべ
きかを示すフラグが使用される。これはまたドライバ/
モジュールが新しいmsgbフィールドb_device_id内にdev
ice_id値を含むことを必要とする。
In an alternative embodiment, the b_flag field is set, but a flag is used that indicates which registration message processing function should be invoked. This is also a driver /
The module has dev in the new msgb field b_device_id
Requires inclusion of the ice_id value.

【0052】[0052]

【表15】 #define MSGREADOPT 0x6000 #define MSGIOCTLOPT 0xaOOO #define MSG64TO32 OxbOOO[Table 15] #define MSGREADOPT 0x6000 #define MSGIOCTLOPT 0xaOOO #define MSG64TO32 OxbOOO

【0053】前述のコードは次のように修正される。re
ad, getmsg, getpmsg, およびioctl経路に関して、コー
ドは、コントローラによって実行される以下の2行を含
む。
The above code is modified as follows. re
For the ad, getmsg, getpmsg, and ioctl paths, the code contains the following two lines executed by the controller.

【0054】[0054]

【表16】 /* メッセージ毎の処理がイネーブルされているか検査する。*/ if (mp->b_flag & MSGFUNCREG) error = (*mp->b_func)(mp, uarea->32bithint); /* 関数が登録されていれば、適切な関数を実行する。*/ if (sth->sth_flags & F_STH_FUNC_REG_ENABLED) { ... }[Table 16] / * Checks whether the processing for each message is enabled. * / if (mp-> b_flag & MSGFUNCREG) error = (* mp-> b_func) (mp, uarea-> 32bithint); / * If the function is registered, execute the appropriate function. * / if (sth-> sth_flags & F_STH_FUNC_REG_ENABLED) {...}

【0055】代替実施形態は次の通りである。An alternative embodiment is as follows.

【0056】[0056]

【表17】 /* メッセージ毎の処理がイネーブルされているか検査する。*/ if (mp->b_flag & MSGFUNCREG){ error = (*(find_func(b_device_id, b_flag))(mp, uarea->32bithint); /* 関数が登録されていれば、適切な関数を実行する。*/ if (sth->sth_flags & F_STH_FUNC_REG_ENABLED){ ... }[Table 17] / * Check whether the processing for each message is enabled. * / if (mp-> b_flag & MSGFUNCREG) {error = (* (find_func (b_device_id, b_flag)) (mp, uarea-> 32bithint); / * If the function is registered, execute the appropriate function. * / if (sth-> sth_flags & F_STH_FUNC_REG_ENABLED) {...}

【0057】これらのレジスタ関数ため種々の構造およ
びコーディングを使用することができる。以下は単純な
構造の1例である。
Various structures and codings can be used for these register functions. The following is an example of a simple structure.

【0058】[0058]

【表18】 int32 drv_a_32_to_64(MBLKP mp) { /* メッセージ・タイプを検査して実行すべき変換コードを決定する。 *メッセージ・タイプ毎に一組の変換コードが存在するであろう。 *各ドライバまたはモジュールが、アプリケーションとそれ自身の間で情報を *通信するためにABI(アプリケーション・バイナリ・インターフェース *Application Binary Interface)を作成することが最適であろう。 *そうすることによって、すべてのメッセージ・タイプを理解するために厄介な *コードを作成することなくメッセージ毎に変換を行うことができる。 *呼び出し元のアプリケーション・インスタンスが32ビットで *コンパイルされたアプリケーションであれば、この変換コードは *入力方向64から32ビットへの経路上で変換を反転させるため *再使用される。その他のタイプのオプション処理またはコピー/チェックサム *に関しては、データの移動/操作がメッセージ毎のものであるので *同様のコードが存在する可能性がある。例えば、ioctl経路について通常 *コピー・チェックサムを必要としない。代わって、所与のオプションとしての *実行経路を実行する必要なしにユーザとカーネル間のデータ移動の間に *データの自動変換を実行するcopyin/修正ユーティリティが必要と *されるかもしれない。 */ switch(mp->b_datap->db_type){ case M_DATA: /* あらかじめ定義されたドライバABIに基づいて変換を実行 */ break; case M_PROTO: /* あらかじめ定義されたドライバABIに基づいて変換を実行 */ break; case M_PCPROTO: /* あらかじめ定義されたドライバABIに基づいて変換を実行 */ break; case M_IOCTL: /* あらかじめ定義されたドライバABIに基づいて変換を実行 */ break; case M_COPYIN: /* あらかじめ定義されたドライバABIに基づいて変換を実行 */ break; case M_COPYOUT: /* あらかじめ定義されたドライバABIに基づいて変換を実行 */ break; default: /* 何も実行しない */ } }[Table 18] int32 drv_a_32_to_64 (MBLKP mp) {/ * Check the message type to determine the conversion code to be executed. * There will be one set of conversion codes for each message type. * It would be best for each driver or module to create an ABI (Application Binary Interface) to * communicate information between the application and itself. By doing so, you can do the per-message conversion without writing the tedious * code to understand all message types. * If the calling application instance is a 32-bit compiled * application, this conversion code is reused * to reverse the conversion * on the path from input direction 64 to 32 bits. For other types of option processing or copy / checksum *, similar code may exist * because data movement / manipulation is per message. For example, you don't usually need * copy checksums for ioctl paths. Alternatively, a copyin / modify utility may be required to perform * automatic conversion of data during data movement between the user and the kernel without having to * execute the given execution path. * / switch (mp-> b_datap-> db_type) {case M_DATA: / * Perform conversion based on pre-defined driver ABI * / break; case M_PROTO: / * Convert based on pre-defined driver ABI Execute * / break; case M_PCPROTO: / * Execute conversion based on pre-defined driver ABI * / break; case M_IOCTL: / * Execute conversion based on pre-defined driver ABI * / break; case M_COPYIN: / * Perform conversion based on predefined driver ABI * / break; case M_COPYOUT: / * Perform conversion based on predefined driver ABI * / break; default: / * Do nothing * /} }

【0059】以上記述の通り、本発明は、メッセージ処
理関数を識別するカーネル・レベルのモジュールまたは
ドライバを備え、ストリーム・ヘッドにおけるメッセー
ジ処理関数の実行を制御する装置および方法を提供す
る。本発明の特定の実施形態を上記の通り記述したが、
本発明はそのような実施形態の特定の形態または構成に
限定されるべきではなく、本発明の有効範囲および精神
を逸脱することなく上記実施形態に対する種々の修正お
よび変更は可能である。
As described above, the present invention provides an apparatus and method for controlling the execution of a message processing function at the stream head, comprising a kernel level module or driver that identifies the message processing function. While particular embodiments of the invention have been described above,
The invention should not be limited to the particular forms or configurations of such embodiments, and various modifications and changes can be made to the above embodiments without departing from the scope and spirit of the invention.

【0060】本発明には、例として次のような実施様態
が含まれる。 (1)デバイスとユーザ・プロセスの間でメッセージを
通信するためのデータ経路を有するコンピュータ・シス
テムにおいて、上記デバイスとメッセージを通信するた
め該デバイスに接続され、メッセージを処理するメッセ
ージ処理関数を識別するように特に適合されたデバイス
・ドライバと、上記ユーザ・プロセスとメッセージを通
信するため上記デバイス・ドライバと上記ユーザ・プロ
セスの間に接続され、上記デバイス・ドライバによって
識別された上記メッセージ処理関数の実行を制御する関
数コントローラを含むように特に適合されたストリーム
・ヘッドと、を備える装置。 (2)上記デバイス・ドライバが、上記メッセージ処理
関数を識別する関数ポインタを備え、上記関数ポインタ
を上記ストリーム・ヘッドの上記関数コントローラに転
送するように適合され、上記関数コントローラが上記関
数ポインタを受け取るように適合された、上記(1)に
記載の装置。 (3)上記ストリーム・ヘッドが、上記メッセージ処理
関数の識別を記録するレジスタを含む、上記(1)に記
載の装置。 (4)上記メッセージ処理関数が、メッセージのデータ
形式を変換する関数を含む、上記(1)に記載の装置。 (5)上記メッセージ処理関数が、上記ユーザ・プロセ
スによって生成されたメッセージのデータ形式を決定す
るため上記ユーザ・プロセスのスレッドを検査する関数
を含む、上記(1)に記載の装置。
The present invention includes the following embodiments as examples. (1) In a computer system having a data path for communicating a message between a device and a user process, identifying a message processing function connected to the device for communicating a message with the device and processing the message. A device driver specially adapted to perform message processing functions identified by the device driver connected between the device driver and the user process for communicating messages with the user process. A stream head specially adapted to include a function controller for controlling the. (2) The device driver comprises a function pointer identifying the message processing function and is adapted to transfer the function pointer to the function controller of the stream head, the function controller receiving the function pointer. The apparatus according to (1) above, which is adapted to: (3) The apparatus according to (1) above, wherein the stream head includes a register for recording an identification of the message processing function. (4) The device according to (1), wherein the message processing function includes a function that converts a data format of a message. (5) The apparatus according to (1) above, wherein the message processing function includes a function for checking a thread of the user process to determine a data format of a message generated by the user process.

【0061】(6)上記メッセージ処理関数が、上記ユ
ーザ・プロセスによって必要とされるい32ビット・デ
ータ形式と上記デバイス・ドライバによって必要とされ
る64ビット・データ形式の間でメッセージのデータ形
式を変換する関数を含む、上記(1)に記載の装置。 (7)上記メッセージ処理関数が、メッセージのプロト
コール形式を変換する関数を含む、上記(1)に記載の
装置。 (8)上記メッセージ処理関数が、メッセージの各々に
関してチェックサムを生成する関数を含む、上記(1)
に記載の装置。 (9)上記ストリーム・ヘッドが、メッセージを保持す
る待ち行列を含み、上記メッセージ処理関数が、上記ス
トリーム・ヘッドの待ち行列上に保持されているメッセ
ージを修正することによって上記デバイス・ドライバの
状態の動的変化に応答する関数を含む、上記(1)に記
載の装置。 (10)上記ストリーム・ヘッドが、メッセージを保持
するための待ち行列を含み、上記メッセージ処理関数
が、上記ストリーム・ヘッドの上記待ち行列上に保持さ
れているメッセージの優先度を修正することによって上
記デバイス・ドライバの優先度状態の動的変化に応答す
る関数を含む、上記(1)に記載の装置。 (11)コンピュータ・システムにおいて、メッセージ
処理関数を識別するように特に適合されたストリーム処
理モジュールと、ユーザ・プロセスとメッセージを通信
するため上記ストリーム処理モジュールとユーザ・プロ
セスの間に接続され、ストリーム処理モジュールによっ
て識別された上記メッセージ処理関数の実行を制御する
関数コントローラを含むように特に適合されたストリー
ム・ヘッドと、を備える装置。
(6) The message processing function converts the data format of the message between the 32-bit data format required by the user process and the 64-bit data format required by the device driver. The apparatus according to (1) above, which includes a function to perform. (7) The device according to (1), wherein the message processing function includes a function for converting a protocol format of a message. (8) The message processing function includes a function that generates a checksum for each of the messages.
An apparatus according to claim 1. (9) The stream head includes a queue to hold messages, and the message processing function modifies the messages held on the stream head queue to check the status of the device driver. The device according to (1) above, comprising a function responsive to dynamic changes. (10) The stream head includes a queue for holding messages, and the message processing function modifies the priority of messages held on the queue of the stream head. The apparatus according to (1) above, including a function that responds to dynamic changes in the priority state of the device driver. (11) In a computer system, a stream processing module specially adapted for identifying a message processing function, and a stream processing module connected between the stream processing module and the user process for communicating a message with the user process. A stream head specially adapted to include a function controller controlling execution of the message processing function identified by the module.

【0062】(12)コンピュータ・システムにおいて
デバイスとユーザ・プロセスの間でメッセージを通信す
る方法であって、上記デバイスとデバイス・ドライバの
間でのメッセージの通信と、上記デバイス・ドライバと
ストリーム・ヘッドの間でのメッセージの通信と、メッ
セージ処理関数の識別と、上記ストリーム・ヘッドにお
ける上記メッセージ処理関数の登録と、上記メッセージ
処理関数の実行と、上記ストリーム・ヘッドと上記ユー
ザ・プロセスの間でのメッセージの通信と、を含むメッ
セージ通信方法。 (13)上記メッセージ処理関数の識別が、メッセージ
処理関数識別のためデバイス・ドライバの使用を含む、
上記(12)に記載のメッセージ通信方法。 (14)上記デバイス・ドライバと上記ストリーム・ヘ
ッド間のメッセージ通信が処理モジュールを経由して実
行され、上記メッセージ処理関数の識別が、上記処理モ
ジュールを使用して実行される、上記(12)に記載の
メッセージ通信方法。 (15)上記メッセージ処理関数の実行が、メッセージ
のデータ形式変換を含む、上記(12)に記載のメッセ
ージ通信方法。 (16)上記メッセージ処理関数の実行が、上記ユーザ
・プロセスによって生成されたメッセージのデータ形式
を決定するための上記ユーザ・プロセスのスレッドの検
査を含む、上記(12)に記載のメッセージ通信方法。 (17)上記メッセージ処理関数の実行が、上記ユーザ
・プロセスによって必要とされる32ビット・データ形
式と上記デバイス・ドライバによって必要とされる64
ビット・データ形式の間でのメッセージのデータ形式変
換を含む、上記(12)に記載のメッセージ通信方法。 (18)上記メッセージ処理関数の実行が、メッセージ
のプロトコール形式変換を含む、上記(12)に記載の
メッセージ通信方法。 (19)上記メッセージ処理関数の実行が、メッセージ
の各々に関するチェックサム生成を含む、上記(12)
に記載のメッセージ通信方法。 (20)上記ストリーム・ヘッドの待ち行列におけるメ
ッセージの保持を含み、上記メッセージ処理関数の実行
が、上記ストリーム・ヘッドの待ち行列上に保持されて
いるメッセージの修正による上記デバイス・ドライバの
状態の動的変化への応答を含む、上記(12)に記載の
メッセージ通信方法。
(12) A method of communicating a message between a device and a user process in a computer system, the message communication between the device and the device driver, the device driver and the stream head. Communication of messages between them, identification of message processing functions, registration of said message processing functions at said stream head, execution of said message processing functions, and between said stream head and said user process. A message communication method including: (13) identifying the message processing function includes using a device driver to identify the message processing function,
The message communication method according to (12) above. (14) In (12) above, message communication between the device driver and the stream head is executed via a processing module, and identification of the message processing function is executed using the processing module. Message communication method described. (15) The message communication method according to (12), wherein the execution of the message processing function includes data format conversion of a message. (16) The message communication method according to (12), wherein the execution of the message processing function includes checking a thread of the user process for determining a data format of a message generated by the user process. (17) Execution of the message processing function requires a 32-bit data format required by the user process and 64 required by the device driver.
The message communication method according to (12) above, which includes data format conversion of a message between bit data formats. (18) The message communication method according to (12), wherein the execution of the message processing function includes protocol format conversion of a message. (19) Execution of the message processing function includes checksum generation for each of the messages.
The message communication method described in. (20) Including the holding of a message in the stream head queue, and executing the message processing function changes the state of the device driver by modifying the message held in the stream head queue. The message communication method according to (12) above, which includes a response to a dynamic change.

【0063】[0063]

【発明の効果】本発明は、STREAMSが実施されて
いるシステム・アーキテクチャに従って従来固定的であ
ったSTREAMSのシステム関数が、ユーザ・プロセ
スまたはデバイス・ドライバの動的要求に応答して適切
な機能を提供することができる柔軟性を付与するという
効果を奏する。これによって、例えば、64ビット・カ
ーネルおよびプロセッサ・アーキテクチャ上で32ビッ
ト・カーネルおよびプロセッサ・アーキテクチャ上で実
行される32ビット・アプリケーションを、アプリケー
ションの変更を行うことなく、64ビット・カーネルお
よびプロセッサ・アーキテクチャ上で実行することが可
能となる。
According to the present invention, the system functions of STREAMS, which are conventionally fixed according to the system architecture in which STREAMS is implemented, perform appropriate functions in response to a dynamic request of a user process or a device driver. The effect of providing flexibility that can be provided is exhibited. This allows, for example, a 32-bit application running on a 64-bit kernel and processor architecture to run on a 64-bit kernel and processor architecture without making application changes. It will be possible to run on.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の好ましい実施形態の1つを示すブロッ
ク図である。
FIG. 1 is a block diagram showing one of the preferred embodiments of the present invention.

【図2】本発明の好ましい実施形態の動作の流れを示す
図である。
FIG. 2 is a diagram showing an operational flow of a preferred embodiment of the present invention.

【符号の説明】[Explanation of symbols]

100 コンピュータ・システム 103 ユーザ・プロセス 107 デバイス 111 ストリーム・ヘッド 112 モジュール 113 デバイス・ドライバ 121 メッセージ処理関数 125 コントローラ 127 レジスタ 100 Computer System 103 User Process 107 Device 111 Stream Head 112 Module 113 Device Driver 121 Message Processing Function 125 Controller 127 Register

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】デバイスとユーザ・プロセスの間でメッセ
ージを通信するためのデータ経路を有するコンピュータ
・システムにおいて、 上記デバイスとメッセージを通信するため該デバイスに
接続され、メッセージを処理するメッセージ処理関数を
識別するように特に適合されたデバイス・ドライバと、 上記ユーザ・プロセスとメッセージを通信するため上記
デバイス・ドライバと上記ユーザ・プロセスの間に接続
され、上記デバイス・ドライバによって識別された上記
メッセージ処理関数の実行を制御する関数コントローラ
を含むように特に適合されたストリーム・ヘッドと、 を備える装置。
1. A computer system having a data path for communicating a message between a device and a user process, comprising a message processing function connected to the device for communicating a message with the device and processing the message. A device driver specially adapted to identify, said message handling function connected between said device driver and said user process for communicating messages with said user process and identified by said device driver A stream head specially adapted to include a function controller for controlling execution of the stream.
JP8340908A 1996-01-31 1996-12-20 Message communication equipment Pending JPH09223027A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US08/593,313 US6098112A (en) 1995-10-19 1996-01-31 Streams function registering
US593,313 1996-01-31

Publications (1)

Publication Number Publication Date
JPH09223027A true JPH09223027A (en) 1997-08-26

Family

ID=24374253

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8340908A Pending JPH09223027A (en) 1996-01-31 1996-12-20 Message communication equipment

Country Status (1)

Country Link
JP (1) JPH09223027A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004507825A (en) * 2000-08-24 2004-03-11 レッド ハット インコーポレイテッド Method and apparatus for processing a communication request in a server without switching context

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004507825A (en) * 2000-08-24 2004-03-11 レッド ハット インコーポレイテッド Method and apparatus for processing a communication request in a server without switching context
JP2008102935A (en) * 2000-08-24 2008-05-01 Red Hat Inc Method and apparatus for handling communication request at server without context switching
US8631092B2 (en) 2000-08-24 2014-01-14 Red Hat, Inc. Embedded protocol objects

Similar Documents

Publication Publication Date Title
US6098112A (en) Streams function registering
US7451456B2 (en) Network device driver architecture
US5815707A (en) Dynamic function replacement for streams framework
EP1086421B1 (en) Method and computer program product for offloading processing tasks from software to hardware
US6029000A (en) Mobile communication system with cross compiler and cross linker
US6678734B1 (en) Method for intercepting network packets in a computing device
Takahashi et al. PM2: High performance communication middleware for heterogeneous network environments
US20090043921A1 (en) Method and System for Virtualization and Re-Direction of I/O Connections to Peripheral Devices
JPH09231157A (en) Method for controlling input/output (i/o) device connected to computer
EP2080102A2 (en) Network interface techniques
CN113067849B (en) Network communication optimization method and device based on Glusterfs
CN112015522B (en) System function expansion method, device and computer readable storage medium
US7076551B2 (en) Using remote procedure calls to manage co-processor resources
EP0930793B1 (en) Mobile equipment with a plurality of processors
US7418714B2 (en) Employing three parameter buffer access in connection with SMBus notifications
US7296187B1 (en) Hardware debug device having script-based host interface
US6202145B1 (en) System and method for eliminating a ring transition while executing in protected mode
JPH09223027A (en) Message communication equipment
US7434223B2 (en) System and method for allowing a current context to change an event sensitivity of a future context
US20080126649A1 (en) Low latency mechanism for asynchronously running a code segment on a processor in a remote computer by transmitting a special network packet or datalink frame that causes a hardware interrupt
JP4317348B2 (en) Information processing apparatus, input / output method, and program
Yamamoto et al. Tinet+ tecs: Component-based tcp/ip protocol stack for embedded systems
WO2023082609A1 (en) Data processing method and related device
EP1249758B1 (en) Using remote procedure calls to manage co-processor resources
CN114866534A (en) Image processing method, device, equipment and medium

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050201

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20050425

A602 Written permission of extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A602

Effective date: 20050428

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050722

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20051004