JP2021144324A - Communication device, method for controlling communication device, and integrated circuit - Google Patents
Communication device, method for controlling communication device, and integrated circuit Download PDFInfo
- Publication number
- JP2021144324A JP2021144324A JP2020041070A JP2020041070A JP2021144324A JP 2021144324 A JP2021144324 A JP 2021144324A JP 2020041070 A JP2020041070 A JP 2020041070A JP 2020041070 A JP2020041070 A JP 2020041070A JP 2021144324 A JP2021144324 A JP 2021144324A
- Authority
- JP
- Japan
- Prior art keywords
- transmission
- priority
- descriptor
- communication device
- transmission 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.)
- Granted
Links
- 238000004891 communication Methods 0.000 title claims abstract description 60
- 238000000034 method Methods 0.000 title claims description 17
- 230000005540 biological transmission Effects 0.000 claims abstract description 266
- 230000006870 function Effects 0.000 claims description 5
- 238000012545 processing Methods 0.000 abstract description 15
- 239000000872 buffer Substances 0.000 description 12
- 230000010365 information processing Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- MHABMANUFPZXEB-UHFFFAOYSA-N O-demethyl-aloesaponarin I Natural products O=C1C2=CC=CC(O)=C2C(=O)C2=C1C=C(O)C(C(O)=O)=C2C MHABMANUFPZXEB-UHFFFAOYSA-N 0.000 description 4
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- RTZKZFJDLAIYFH-UHFFFAOYSA-N Diethyl ether Chemical compound CCOCC RTZKZFJDLAIYFH-UHFFFAOYSA-N 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/36—Handling requests for interconnection or transfer for access to common bus or bus system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/36—Handling requests for interconnection or transfer for access to common bus or bus system
- G06F13/362—Handling requests for interconnection or transfer for access to common bus or bus system with centralised access control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/24—Traffic characterised by specific attributes, e.g. priority or QoS
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Bus Control (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Communication Control (AREA)
Abstract
Description
本発明は、優先度に応じたEtherパケット送信を自動振り分けする通信装置に関する。 The present invention relates to a communication device that automatically distributes Ether packet transmission according to priority.
従来、産業用制御装置に用いられる通信手段は多数あり、EtherCAT(登録商標)などが多く用いられてきている。データ容量の増加またはリアルタイム性の向上の為に、Gigabpsに対応したEtherCAT Gへの対応または、Time Sensitive Network(以下、TSN)への対応が求められている。更に、一定周期での制御データの通信と、不定期での情報データの通信とが混在した通信規格が求められている。 Conventionally, there are many communication means used for industrial control devices, and EtherCAT (registered trademark) and the like are often used. In order to increase the data capacity or improve the real-time performance, it is required to support EtherCAT G compatible with Gigabits or to support Time Sensitive Network (hereinafter, TSN). Further, there is a demand for a communication standard in which control data communication at regular intervals and information data communication at irregular intervals are mixed.
制御データは低遅延、小ジッターである必要があり、大容量の情報データよりも、制御データは高優先に通信を行う必要がある。この通信を実現するため、FirmWare(以下、FW)が、送信データの種類により、送信の優先順位を決め、それに応じて通信経路の振り分け処理を行うことが従来技術として知られている。 The control data needs to have low delay and low jitter, and the control data needs to communicate with high priority over a large amount of information data. In order to realize this communication, it is known as a prior art that a Firmware (hereinafter referred to as FW) determines a transmission priority according to the type of transmission data and performs a communication route distribution process according to the priority.
特許文献1に、送信されるデータの優先度によって、複数ある送信バッファを、排他的に切り替える技術が開示されている。 Patent Document 1 discloses a technique for exclusively switching a plurality of transmission buffers according to the priority of transmitted data.
しかしながら、上述のような従来技術は、FWによる通信経路の振り分け処理に時間がかかり、産業用制御装置のCPU負荷を増大させ、遅延を発生させるという課題がある。 However, the above-mentioned conventional technique has a problem that it takes time to distribute the communication path by the FW, the CPU load of the industrial control device is increased, and a delay is generated.
また、高優先度を優先して処理していた場合、低優先度のバッファが送信ポートを排他的に占有している間に、高優先度のバッファにデータが入った場合、高優先度のデータの送信は開始されず、遅延が発生する課題がある。 In addition, when processing with high priority is prioritized, if data enters the high priority buffer while the low priority buffer exclusively occupies the transmission port, the high priority buffer is used. There is a problem that data transmission is not started and a delay occurs.
本発明の一様態は、主メモリを備える情報処理装置のプロセッサの負荷を低減し、かつ、優先度に応じて適切に送信順を調停することを目的とする。 An object of the present invention is to reduce the load on the processor of the information processing apparatus including the main memory, and to appropriately arbitrate the transmission order according to the priority.
本発明の一様態に係る通信装置は、主メモリにDMA(Direct Memory Access)方式でアクセスする通信装置であって、前記主メモリの送信ディスクリプタ領域から送信ディスクリプタを取得し、前記送信ディスクリプタに基づいて前記送信ディスクリプタに対応する送信データの優先度を判定し、判定された優先度に対応するキューに前記送信ディスクリプタを渡す送信ディスクリプタフェッチと、複数の優先度にそれぞれ対応した複数のキューであって、前記主メモリから前記送信ディスクリプタに対応する送信データを取得する前記複数のキューと、優先度に応じて前記複数のキューに格納された前記送信データの送信順を調停する送信調停部と、を備える。 The communication device according to the uniform state of the present invention is a communication device that accesses the main memory by a DMA (Direct Memory Access) method, acquires a transmission descriptor from the transmission descriptor area of the main memory, and is based on the transmission descriptor. A transmission descriptor fetch that determines the priority of the transmission data corresponding to the transmission descriptor and passes the transmission descriptor to the queue corresponding to the determined priority, and a plurality of queues corresponding to the plurality of priorities. It includes the plurality of queues for acquiring transmission data corresponding to the transmission descriptor from the main memory, and a transmission arbitration unit for arranging the transmission order of the transmission data stored in the plurality of queues according to the priority. ..
上記の構成によれば、送信ディスクリプタフェッチによって、主メモリにDMAでアクセスし、送信ディスクリプタに基づいて優先度を判定する。優先度を基に、送信順を調停されたキューからデータを送信できる。これにより、例えば主メモリを備える情報処理装置のプロセッサの負荷を低減し、かつ、優先度に応じて適切に送信順を調停することができる。 According to the above configuration, the main memory is accessed by DMA by the transmit descriptor fetch, and the priority is determined based on the transmit descriptor. Data can be sent from a queue whose transmission order is arbitrated based on the priority. Thereby, for example, the load on the processor of the information processing apparatus including the main memory can be reduced, and the transmission order can be appropriately arbitrated according to the priority.
前記通信装置は、前記送信ディスクリプタフェッチが、前記送信ディスクリプタに基づいて、前記送信ディスクリプタに対応する前記送信データのヘッダの少なくとも一部を取得し、前記送信データのヘッダの少なくとも一部に基づいて前記送信データの優先度を判定してもよい。 In the communication device, the transmission descriptor fetch acquires at least a part of the header of the transmission data corresponding to the transmission descriptor based on the transmission descriptor, and the transmission data is based on at least a part of the header of the transmission data. The priority of the transmitted data may be determined.
上記の構成によれば、優先度を判定するために、ヘッダに加えて、全データを取得する必要がなく、送信データの一部だけ取得すればよい。そのため、必要なデータアクセスが減り、低負荷で優先度判定ができる。 According to the above configuration, in order to determine the priority, it is not necessary to acquire all the data in addition to the header, and only a part of the transmission data needs to be acquired. Therefore, the required data access is reduced, and the priority can be determined with a low load.
前記通信装置は、前記送信ディスクリプタフェッチが、前記送信データのヘッダに含まれる宛先アドレスに基づいて前記送信データの優先度を判定する、構成でもよい。 The communication device may be configured such that the transmission descriptor fetch determines the priority of the transmission data based on the destination address included in the header of the transmission data.
上記の構成によれば、優先度を判定するための情報は、ヘッダのみでよい。そのため、部分的なデータアクセスにより、低負荷で優先度判定ができる。 According to the above configuration, the information for determining the priority needs only the header. Therefore, the priority can be determined with a low load by partial data access.
前記通信装置は、複数の宛先アドレスと、前記複数の優先度とを関連付けて記憶する優先度記憶部を備えていてもよい。 The communication device may include a priority storage unit that stores a plurality of destination addresses in association with the plurality of priorities.
上記の構成によれば、宛先アドレスから優先度を調べるためにFWへの問い合わせが不要になり、高速な送信が可能になる。 According to the above configuration, it is not necessary to make an inquiry to the FW in order to check the priority from the destination address, and high-speed transmission becomes possible.
前記通信装置は、前記送信ディスクリプタが、前記送信データに関する優先度情報を含み、前記送信ディスクリプタフェッチが、前記優先度情報に基づいて、前記送信データの優先度を判定する、構成でもよい。 The communication device may be configured such that the transmission descriptor includes priority information regarding the transmission data, and the transmission descriptor fetch determines the priority of the transmission data based on the priority information.
前記通信装置は、前記送信ディスクリプタが、前記送信データの宛先アドレスを含み、前記送信ディスクリプタフェッチが、前記宛先アドレスに基づいて前記送信データの優先度を判定する、構成であってもよい。 The communication device may be configured such that the transmission descriptor includes a destination address of the transmission data and the transmission descriptor fetch determines the priority of the transmission data based on the destination address.
本発明の一様態に係る通信装置の制御方法は、主メモリにDMA(Direct Memory Access)方式でアクセスする通信装置の制御方法であって、前記主メモリの送信ディスクリプタ領域から送信ディスクリプタを取得するステップと、前記送信ディスクリプタに基づいて前記送信ディスクリプタに対応する送信データの優先度を判定するステップと、判定された優先度に対応するキューに前記送信ディスクリプタを渡すステップと、前記主メモリから前記送信ディスクリプタに対応する送信データを取得するステップと、優先度に応じて複数の前記送信データの送信順を調停するステップと、を含む。 The control method of the communication device according to the uniform state of the present invention is a control method of the communication device that accesses the main memory by the DMA (Direct Memory Access) method, and is a step of acquiring a transmission descriptor from the transmission descriptor area of the main memory. A step of determining the priority of the transmission data corresponding to the transmission descriptor based on the transmission descriptor, a step of passing the transmission descriptor to the queue corresponding to the determined priority, and the transmission descriptor from the main memory. A step of acquiring the transmission data corresponding to the above, and a step of arranging the transmission order of the plurality of transmission data according to the priority are included.
前記通信装置として機能する集積回路は、前記送信ディスクリプタフェッチと、前記複数のキューと、前記送信調停部と、として機能する、ハードウェアの論理回路が形成されていてもよい。 The integrated circuit that functions as the communication device may be formed with a hardware logic circuit that functions as the transmission descriptor fetch, the plurality of queues, and the transmission arbitration unit.
本発明の一態様によれば、主メモリを備える情報処理装置のプロセッサの負荷を低減し、かつ、優先度に応じて適切に送信順を調停することができる。 According to one aspect of the present invention, the load on the processor of the information processing apparatus including the main memory can be reduced, and the transmission order can be appropriately arbitrated according to the priority.
〔実施形態1〕
§1 適用例
図2は、本実施形態の情報処理装置1の構成要素を示すブロック図である。情報処理装置1では、FW(ドライバ23)によって送信データの優先度振分を行うのではなく、通信装置4で送信データのヘッダ内にある宛先アドレスから、優先度をハードウェア処理で判別する。その後、優先度に基づき、送信キューを振り分けられ、送信データの送信順を調停されながら送信される。そのため、FWによって優先度振分を行い送信する従来技術よりも、FWの処理を低減することができ、低遅延・低負荷な処理が実現できる。
[Embodiment 1]
§1 Application example FIG. 2 is a block diagram showing components of the information processing apparatus 1 of the present embodiment. In the information processing device 1, the priority is not sorted by the FW (driver 23), but the priority is determined by hardware processing from the destination address in the header of the transmission data in the
§2 構成例
〔通信装置の機能構成〕
図1と図2は、本実施形態の情報処理装置の構成要素を示すブロック図である。情報処理装置1は、CPU2(中央演算処理装置)と、主メモリ3と、通信装置4と、を備える。
§2 Configuration example [Functional configuration of communication device]
1 and 2 are block diagrams showing components of the information processing apparatus of the present embodiment. The information processing device 1 includes a CPU 2 (central processing unit), a
CPU2は、複数のアプリケーション21と、TCP/IPスタック22と、ドライバ23と、OS24(Operating System)と、を動作させる。CPU2はソフトウェアを動作させるプロセッサ(ハードウェア)で、FWを動作させている。
The
アプリケーション21は、ソフトウェアであり、OS24上で動作する。TCP/IPスタック22は、TCP/IP通信のプロトコルに関するソフトウェアである。ドライバ23は、ソフトウェアとハードウェアの仲立ちをするソフトウェアである。
The
主メモリ3は、送信ディスクリプタ領域31と、送信データ領域32と、を備える。送信ディスクリプタは送信データに関わる情報をまとめたヘッダである。
The
主メモリ3は、CPU2が処理したまたは処理に用いるデータを保存しておく記憶装置であり、例えばDRAM(Dynamic Random Access Memory)、SRAM(Static Random Access Memory)、SDRAM(Synchronous Dynamic Random Access Memory)、SSD(Solid State Drive)、HDD(Hard Disc Drive)、またはSDカードなどの記憶装置である。送信ディスクリプタ領域31は、送信ディスクリプタを複数格納しておくデータ領域である。送信データ領域32は、送信データを複数格納しておくデータ領域である。
The
通信装置4(通信コントローラ)は、送信ディスクリプタフェッチ41と、2以上の複数の送信キュー42と、インタフェース43と、優先度記憶部44と、送信調停部45と、送受信ポート46と、を備える。通信装置4は、送信データを送信する処理を行うハードウェアである。通信装置4は、例えばネットワークインタフェースカード(NIC)であり、ASIC(Application Specific Integrated Circuit)、またはFPGA(Field-Programmable Gate Array)で構成された集積回路である。通信装置4は、送信データに優先度をつけ通信する機能を有する。
The communication device 4 (communication controller) includes a transmission descriptor fetch 41, two or
送信ディスクリプタフェッチ41は、送信ディスクリプタを解釈し、送信キューへの振り分けを行う。送信ディスクリプタフェッチ41は、送信データの優先度に応じて、優先度に対応する送信キュー42に送信ディスクリプタを出力する。送信キュー42は、送信ディスクリプタを保存しておき、先入れ先出しで送信データを送受信ポートから送信できる。送信キュー42は、送信優先度が高優先度(TX0)のものから低優先度(TXm)のものまで複数ある。インタフェース43(I/F)は、CPU2と主メモリ3と通信する。
The transmission descriptor fetch 41 interprets the transmission descriptor and distributes it to the transmission queue. The transmission descriptor fetch 41 outputs a transmission descriptor to the
優先度記憶部44は、複数の宛先アドレスと複数の優先度とを互いに関連付けて記憶する。送信調停部45は、複数の送信キューの優先度を考慮し、送信順を調停する。
The
送受信ポート46は、実際にデータ(送信データ/受信データ)を、ネットワークを介して複数の外部装置へ送受信する部位である。ここでは、ネットワークとしてEthernet(登録商標)を想定した例を説明するが、これに限らない。ネットワークは、EtherCAT、EtherCAT G、またはTSN等のネットワークであってもよい。複数のネットワークがブランチコントローラを介して送受信ポート46に接続されていてもよい。外部装置としては、複数の優先度があり、外部装置に応じて優先度は異なる。外部装置としては、センサ入力、またはバルブ制御などの低遅延で定周期の制御データを送受信すべき高優先度の外部装置と、画像処理装置などの大容量の情報データを送受信すべき遅延を許した低優先度の外部装置とがある。
The transmission /
送信ディスクリプタフェッチ41は、DMAC411と、振分部412と、を有する。複数の送信キュー42は、それぞれ、ディスクリプタFIFO421と、DMAC422と、データFIFO423と、を有する。DMAC411、422は、主メモリにDMA(Direct Memory Access)方式でアクセスする。振分部412は、送信データの優先度を確認し、該当する優先度の送信キュー42に振り分ける。ディスクリプタFIFO421(ディスクリプタバッファ)は、送信ディスクリプタを保存しておき、先入れ先出しで取り出せる。データFIFO423(データバッファ)は、送信データを保存しておき、先入れ先出しで取り出せる。
The transmission descriptor fetch 41 has a DMAC 411 and a
主メモリ3は、通信装置4のインタフェース43と、CPU2を介して接続されている。通信装置4のインタフェース43は、送信ディスクリプタフェッチ41と、2以上の送信キュー42と、接続されている。送信ディスクリプタフェッチ41は、2以上の送信キュー42と接続されている。接続されている箇所では、通信によりデータの受け渡しが可能である。
The
送信ディスクリプタフェッチ41と2以上の送信キュー42とは、DMAC411、422を用いて、インタフェース43を介して、主メモリと通信できる。
The transmission descriptor fetch 41 and the two or
図3は、送信ディスクリプタと送信データのデータ構造を示す図である。送信ディスクリプタ5は、バッファアドレス領域51と、送信完了フラグ領域52と、予約領域53と、を有する。
FIG. 3 is a diagram showing a data structure of a transmission descriptor and transmission data. The transmission descriptor 5 has a
バッファアドレス領域51は、主メモリ3における送信データ6の格納アドレスを含む領域である。送信完了フラグ領域52は、送信ディスクリプタ5に対応する送信データ6が送信されたか否かを示す情報を含む領域である。予約領域53は、その他通信に必要な情報および予備領域を含む。
The
送信データ6は、Ethernetフレームである。送信データ6は、ヘッダ60と、IPフレーム61と、を含む。送信データ6のヘッダ60は、宛先MACアドレス領域62と、予約領域63と、を含む。送信データ6のIPフレーム61は、IPフレーム61のヘッダ64と、データ領域67とを含む。IPフレーム61のヘッダ64は、宛先IPアドレス領域65と、予約領域66と、を含む。
The
宛先MACアドレス領域62は、送信先の外部装置(宛先)のMACアドレスを含む領域である。宛先IPアドレス領域65は、送信先の外部装置(宛先)のIPアドレスを含む領域である。予約領域63、66は、その他通信に必要な情報および予備領域を含む。宛先MACアドレス領域62と宛先IPアドレス領域65とのうちいずれか一方でも設定されていれば送信は成立するプロトコルを採用している。
The destination
§3 動作例
図4は、通信装置のCPU2の動作フローチャートである。まず、CPU2での処理の流れを記す。
§3 Operation example FIG. 4 is an operation flowchart of the
ドライバ23は、通信装置4のインタフェース43を介して、予め優先度記憶部44に複数の宛先アドレスと複数の優先度とを互いに関連付けて設定する。宛先アドレスとしては、MACアドレス、IPアドレス、および/またはその他ネットワーク独自のアドレスでもよい。また、宛先アドレスがIPアドレスの場合、IPv6に対応していてもよい。
The
宛先と優先度との関係は、上位のコンピュータでユーザが任意に設定したものを、CPU2が主メモリ3に保存しておく。宛先と優先度との関係は、通信装置4の初期化時に主メモリ3から通信装置4に読み込まれる。
As for the relationship between the destination and the priority, the
CPU2内では、複数のアプリケーション21が動作している。アプリケーション21は、APIを利用し、TCP/IPスタック22に対し、パケット送信を行う(S11)。
A plurality of
TCP/IPスタック22は、受信したパケットを基に、IPフレーム61を生成し、生成したIPフレーム61をドライバ23に送信する(S12)。IPフレーム61の宛先IPアドレス領域には、宛先IPアドレスが、設定されていてもよい。
The TCP /
ドライバ23は、Ethernet(登録商標)フレームを生成し、主メモリ3の送信データ領域32に、生成したEthernetフレームを送信データ6として書き込む(S13)。Ethernetフレーム(送信データ6)の宛先MACアドレス領域62には、宛先MACアドレスが、設定されていてもよい。この時、OS24は、主メモリ3の領域管理を行う。
The
ドライバ23は、送信ディスクリプタ5を生成し、主メモリ3の送信ディスクリプタ領域31に送信ディスクリプタ5を書き込む(S14)。この時、OS24は、主メモリ3の領域管理を行う。ドライバ23は、主メモリ3の送信データ領域32に書き込んだ送信データ6の先頭アドレスおよびデータ長を、送信ディスクリプタ5のバッファアドレス領域51に格納する。
The
ドライバ23は、通信装置4の送信ディスクリプタフェッチ41に対して、インタフェース43を介して、送信ディスクリプタ5を用意したことを通知する(S15)。この通知を受けて、通信装置4の送信ディスクリプタフェッチ41は動作を開始する。ドライバ23は、処理を終了する。
The
CPU2は、アプリケーション21からパケット送信が行われると、S11からの処理を繰り返す。
When the packet is transmitted from the
図5は、通信装置4の動作フローチャートである。次に、通信装置4での処理の流れを記す。
FIG. 5 is an operation flowchart of the
送信ディスクリプタフェッチ41は、ドライバ23から送信ディスクリプタ5を用意したことの通知を受けると、DMAC411によって、DMA方式で主メモリ3の送信ディスクリプタ領域31にアクセスし、送信ディスクリプタ5を一つ取得する(S21)。
Upon receiving the notification from the
DMAC411は、送信ディスクリプタ5の中の、バッファアドレス領域51を参照し、参照したアドレスを利用して、主メモリ3に格納されている送信データ6のヘッダの少なくとも一部を取得する(S22)。例えば、DMAC411は、送信データ6のヘッダ60全体および/またはヘッダ64全体を取得してもよいし、宛先MACアドレス領域62または宛先IPアドレス領域65を含むヘッダ60またはヘッダ64の一部を取得してもよい。すなわち、DMAC411は、送信データ6のうち、宛先アドレスの情報を含む送信データ6の一部を取得する。そのため、DMAC411は、送信データ6の他の一部(データ領域67)を取得しなくてもよい。DMAC411は、振分部412に、取得したヘッダ60、64を出力する。
The DMAC411 refers to the
送信ディスクリプタフェッチ41の振分部412は、ヘッダ60、64に含まれる宛先アドレスに基づいて、送信データ6の優先度を判定する。振分部412は、優先度記憶部44から、受け取った宛先アドレスと優先度との関係を示す情報を取得し、該宛先アドレスに送信される送信データ6の優先度を判定する(S23)。
The
送信ディスクリプタフェッチ41の振分部412は、判定した優先度を用いて、優先度に対応する送信キュー42内のディスクリプタFIFO421に送信ディスクリプタ5を渡す(S24)。
The
送信キュー42のDMAC422は、ディスクリプタFIFO421から送信ディスクリプタ5を取得する。DMAC422は、送信ディスクリプタ5が示す主メモリ3のアドレスから、送信ディスクリプタ5に対応する送信データ6を取得する(S25)。DMAC422は、取得した送信データ6をデータFIFO423に格納する。
The
送信調停部45は、優先度に応じて複数の送信キュー42に格納された複数の送信データ6の送信順を調停する。送信調停部45は、優先度がより高い送信キュー42から順に、送信キュー42に送信指令を出力する。送信キュー42は、送信調停部45の調停によった送信指令に従い、送信動作を開始する。送信指令を受けた送信キュー42は、データFIFO423に格納された送信データ6を、送受信ポート46から送信する(S26)。
The
送信完了後、送信キュー42は、主メモリ3の送信ディスクリプタ領域31内の該当する送信ディスクリプタ5の送信完了フラグ領域52に、送信データ6の送信が完了した旨を示す送信完了フラグを記載する(S27)。
After the transmission is completed, the
(参考例)
参考例として、ドライバで優先度振分を行う場合について説明する。この場合、優先度が異なる複数の送信キューに応じて、異なる複数の送信ディスクリプタ領域および複数の送信データ領域を主メモリに確保する必要がある。ドライバが複数の送信データ領域から1つの送信データ領域を選択して送信データを書き込むとき、および複数の送信ディスクリプタ領域から1つの送信ディスクリプタ領域を選択して送信ディスクリプタを書き込むとき、OSによる主メモリの領域管理が必要になる。また、ドライバは、優先度を判定し、優先度に応じて1つの送信キューを選択して、起動する該送信キューのDMACを指定する必要がある。すなわち、ドライバは、優先度に応じて通信装置へのレジスタアクセスを変更する必要がある。各送信キューは、対応する送信ディスクリプタ領域から送信ディスクリプタを取得する。このように、ドライバで優先度振分を行う場合、ドライバ(FW)、およびOSにおいて、優先度に応じた処理が必要になる。そのため、ドライバおよびOSにおける負荷が増大し、処理の遅延が生じ得る。
(Reference example)
As a reference example, a case where the driver performs priority distribution will be described. In this case, it is necessary to allocate a plurality of different transmission descriptor areas and a plurality of transmission data areas in the main memory according to the plurality of transmission queues having different priorities. When the driver selects one transmission data area from multiple transmission data areas and writes transmission data, and when the driver selects one transmission descriptor area from multiple transmission descriptor areas and writes the transmission descriptor, the OS determines the main memory. Area management is required. Further, the driver needs to determine the priority, select one transmission queue according to the priority, and specify the DMAC of the transmission queue to be activated. That is, the driver needs to change the register access to the communication device according to the priority. Each transmit queue gets a transmit descriptor from the corresponding transmit descriptor area. In this way, when the driver performs priority distribution, the driver (FW) and the OS need to perform processing according to the priority. Therefore, the load on the driver and the OS increases, and processing delay may occur.
§ 作用・効果
一方、本実施形態に係る情報処理装置1は、ドライバ23(FW)によって、優先度に関係なく、一つの送信ディスクリプタ領域と、一つの送信データ領域とにデータを格納する。その後、通信装置4は、送信ディスクリプタフェッチ41でのハードウェア処理により優先度振分をする。優先度振分された送信データは、送信調停部により送信順を制御され送信される。そのため、情報処理装置1は、ドライバ23(FW)によって優先度振分を行う参考例よりも、ドライバ23およびOS24の処理負荷を低減することができる。また、複数の送信ディスクリプタ領域のメモリスイッチおよび複数の送信データ領域のメモリスイッチに起因するメモリアクセスのオーバーヘッドを低減することができる。それゆえ、OS24によるメモリ管理が容易である。これにより、高速・低負荷な処理が実現でき、リアルタイム性の向上が見込める。また、ドライバ23は、通信装置4の1つの送信ディスクリプタフェッチ41のみにアクセスすればよいので、既存のドライバおよびOSを流用することができる。
§ Action / Effect On the other hand, the information processing apparatus 1 according to the present embodiment stores data in one transmission descriptor area and one transmission data area by the driver 23 (FW) regardless of the priority. After that, the
〔変形例1〕
実施形態1ではS21〜S23において、送信ディスクリプタフェッチ41は、送信ディスクリプタ5を一度読み込み、バッファアドレス領域51から送信データ6のアドレスを取得する。取得した一部の送信データ6内の、宛先MACアドレス領域62から宛先MACアドレスを、または、宛先IPアドレス領域65から宛先IPアドレスを取得する。振分部412は、これら、MACアドレスまたはIPアドレスと優先度との関係から、優先度の判定を行う。このステップを短縮するために、送信ディスクリプタ5の予約領域53に、宛先アドレス領域を設けてもよい。そしてドライバ23は、宛先アドレス領域に宛先MACアドレスまたは宛先IPアドレスを保存してもよい。この場合、送信ディスクリプタフェッチ41は、送信データの一部を取得せず、送信ディスクリプタのみから、送信データの優先度判定ができる。
[Modification 1]
In the first embodiment, in S21 to S23, the transmission descriptor fetch 41 reads the transmission descriptor 5 once and acquires the address of the
〔変形例2〕
実施形態1ではS22とS23とで、送信ディスクリプタフェッチ41は、送信データ6から宛先MACアドレスまたは宛先IPアドレスを取得し、優先度記憶部44の情報と照合し優先度を判定する。このステップを短縮するために、送信ディスクリプタ5の予約領域53に、優先度領域を設けてもよい。送信データの優先度は、アプリケーション21によって決定される。S11において、TCP/IPスタック22は、アプリケーション21によって決定された優先度情報をパケットに付加する。そしてドライバ23は、優先度領域に直接送信データに関する優先度情報(送信データの優先度を示す情報)を保存してもよい。送信ディスクリプタフェッチ41は、S22およびS23の処理をスキップし、送信ディスクリプタのみから、送信データの優先度判定ができる。S24で、振分部412は、その優先度に基づき、送信データを送信キューに振り分けできる。
[Modification 2]
In the first embodiment, in S22 and S23, the transmission descriptor fetch 41 acquires the destination MAC address or the destination IP address from the
この場合、同じ宛先アドレスでも送信データに応じて異なる優先度をアプリケーション21で設定できる利点がある。
In this case, there is an advantage that the
本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。 The present invention is not limited to the above-described embodiments, and various modifications can be made within the scope of the claims, and the embodiments obtained by appropriately combining the technical means disclosed in the different embodiments. Is also included in the technical scope of the present invention.
1 情報処理装置
2 CPU
3 主メモリ
4 通信装置
5 送信ディスクリプタ
6 送信データ
21 アプリケーション
22 TCP/IPスタック
23 ドライバ
24 OS
31 送信ディスクリプタ領域
32 送信データ領域
41 送信ディスクリプタフェッチ
42 送信キュー
43 インタフェース
44 優先度記憶部
45 送信調停部
46 送受信ポート
51 バッファアドレス領域
52 送信完了フラグ領域
53、63、66 予約領域
60、64 ヘッダ
61 IPフレーム
62 宛先MACアドレス領域
65 宛先IPアドレス領域
67 データ領域
1
3
31
Claims (8)
前記主メモリの送信ディスクリプタ領域から送信ディスクリプタを取得し、前記送信ディスクリプタに基づいて前記送信ディスクリプタに対応する送信データの優先度を判定し、判定された優先度に対応するキューに前記送信ディスクリプタを渡す送信ディスクリプタフェッチと、
複数の優先度にそれぞれ対応した複数のキューであって、前記主メモリから前記送信ディスクリプタに対応する送信データを取得する前記複数のキューと、
優先度に応じて前記複数のキューが取得した複数の前記送信データの送信順を調停する送信調停部と、
を備える通信装置。 A communication device that accesses the main memory by the DMA (Direct Memory Access) method.
The transmission descriptor is acquired from the transmission descriptor area of the main memory, the priority of the transmission data corresponding to the transmission descriptor is determined based on the transmission descriptor, and the transmission descriptor is passed to the queue corresponding to the determined priority. Send descriptor fetch and
A plurality of queues corresponding to a plurality of priorities, the plurality of queues for acquiring transmission data corresponding to the transmission descriptor from the main memory, and the plurality of queues.
A transmission arbitration unit that arbitrates the transmission order of the plurality of transmission data acquired by the plurality of queues according to the priority.
A communication device equipped with.
前記送信ディスクリプタに基づいて、前記送信ディスクリプタに対応する前記送信データのヘッダの少なくとも一部を取得し、
前記送信データのヘッダの少なくとも一部に基づいて前記送信データの優先度を判定する、請求項1に記載の通信装置。 The transmit descriptor fetch is
Based on the transmit descriptor, at least a part of the header of the transmission data corresponding to the transmit descriptor is acquired.
The communication device according to claim 1, wherein the priority of the transmission data is determined based on at least a part of the header of the transmission data.
前記送信ディスクリプタフェッチは、前記優先度情報に基づいて、前記送信データの優先度を判定する、請求項1に記載の通信装置。 The transmission descriptor includes priority information regarding the transmission data.
The communication device according to claim 1, wherein the transmission descriptor fetch determines the priority of the transmission data based on the priority information.
前記送信ディスクリプタフェッチは、前記宛先アドレスに基づいて前記送信データの優先度を判定する、請求項1に記載の通信装置。 The transmission descriptor includes a destination address of the transmission data.
The communication device according to claim 1, wherein the transmission descriptor fetch determines the priority of the transmission data based on the destination address.
前記主メモリの送信ディスクリプタ領域から送信ディスクリプタを取得するステップと、
前記送信ディスクリプタに基づいて前記送信ディスクリプタに対応する送信データの優先度を判定するステップと、
判定された優先度に対応するキューに前記送信ディスクリプタを渡すステップと、
前記主メモリから前記送信ディスクリプタに対応する送信データを取得するステップと、
優先度に応じて複数の前記送信データの送信順を調停するステップと、を含む通信装置の制御方法。 It is a control method of a communication device that accesses the main memory by the DMA (Direct Memory Access) method.
A step of acquiring a transmission descriptor from the transmission descriptor area of the main memory, and
A step of determining the priority of transmission data corresponding to the transmission descriptor based on the transmission descriptor, and
The step of passing the transmission descriptor to the queue corresponding to the determined priority, and
A step of acquiring transmission data corresponding to the transmission descriptor from the main memory, and
A method of controlling a communication device including a step of arbitrating a plurality of transmission orders of transmission data according to a priority.
前記送信ディスクリプタフェッチと、前記複数のキューと、前記送信調停部と、として機能する、ハードウェアの論理回路が形成されていることを特徴とする集積回路。 An integrated circuit that functions as the communication device according to claim 1.
An integrated circuit characterized in that a hardware logic circuit that functions as the transmission descriptor fetch, the plurality of queues, and the transmission arbitration unit is formed.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020041070A JP7435054B2 (en) | 2020-03-10 | 2020-03-10 | Communication device, control method for communication device, and integrated circuit |
PCT/JP2021/001751 WO2021181896A1 (en) | 2020-03-10 | 2021-01-20 | Communication apparatus, control method for communication apparatus, and integrated circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020041070A JP7435054B2 (en) | 2020-03-10 | 2020-03-10 | Communication device, control method for communication device, and integrated circuit |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021144324A true JP2021144324A (en) | 2021-09-24 |
JP7435054B2 JP7435054B2 (en) | 2024-02-21 |
Family
ID=77671300
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020041070A Active JP7435054B2 (en) | 2020-03-10 | 2020-03-10 | Communication device, control method for communication device, and integrated circuit |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP7435054B2 (en) |
WO (1) | WO2021181896A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114979142A (en) * | 2022-05-16 | 2022-08-30 | 深圳市金瑞铭科技有限公司 | Data processing method and system for edge equipment of cloud platform |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001257684A (en) | 2000-03-09 | 2001-09-21 | Fuji Xerox Co Ltd | Computer system |
JP2003319009A (en) | 2002-04-24 | 2003-11-07 | Communication Research Laboratory | Data communication control method, data communication control system, data sending mechanism, data communication control program, and data communication control program recording medium |
JP2011182369A (en) | 2010-03-04 | 2011-09-15 | Ricoh Co Ltd | Data transfer apparatus, data transfer method, data transfer program, and recording medium |
-
2020
- 2020-03-10 JP JP2020041070A patent/JP7435054B2/en active Active
-
2021
- 2021-01-20 WO PCT/JP2021/001751 patent/WO2021181896A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
WO2021181896A1 (en) | 2021-09-16 |
JP7435054B2 (en) | 2024-02-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11799764B2 (en) | System and method for facilitating efficient packet injection into an output buffer in a network interface controller (NIC) | |
US7620745B2 (en) | Transferring data between a memory and peripheral units employing direct memory access control | |
CA2573156C (en) | Apparatus and method for supporting memory management in an offload of network protocol processing | |
US6044418A (en) | Method and apparatus for dynamically resizing queues utilizing programmable partition pointers | |
US8660133B2 (en) | Techniques to utilize queues for network interface devices | |
EP3544247B1 (en) | Transfer control device, transfer control method and computer-readable medium | |
JP2008086027A (en) | Method and device for processing remote request | |
WO2006019512A1 (en) | Apparatus and method for supporting connection establishment in an offload of network protocol processing | |
US20150215226A1 (en) | Device and Method for Packet Processing with Memories Having Different Latencies | |
US20100299459A1 (en) | Reflecting bandwidth and priority in network attached storage i/o | |
US20040120332A1 (en) | System and method for sharing a resource among multiple queues | |
US11165705B2 (en) | Data transmission method, device, and computer storage medium | |
US7209489B1 (en) | Arrangement in a channel adapter for servicing work notifications based on link layer virtual lane processing | |
JP3290302B2 (en) | Data exchange processing method and apparatus | |
WO2021181896A1 (en) | Communication apparatus, control method for communication apparatus, and integrated circuit | |
JP2008541276A (en) | Simultaneous read response confirmation extended direct memory access unit | |
JP2008060700A (en) | Buffer control device and buffer control method | |
CN111970213A (en) | Queuing system | |
JP2009188655A (en) | Communication control method, information processing system, information processor, and program | |
WO2019163518A1 (en) | Load distribution system and load distribution method | |
US20150301963A1 (en) | Dynamic Temporary Use of Packet Memory As Resource Memory | |
JP2000115224A (en) | Inter-lan connection system with buffer capacity control function | |
JP7435055B2 (en) | Communication device, control method for communication device, and integrated circuit | |
WO2021112947A1 (en) | Apparatus and methods for managing packet transfer across a memory fabric physical layer interface | |
JP6620760B2 (en) | Management node, terminal, communication system, communication method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230111 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20240109 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240122 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7435054 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |