JP2011024027A - Packet transmission control apparatus, hardware circuit, and program - Google Patents

Packet transmission control apparatus, hardware circuit, and program Download PDF

Info

Publication number
JP2011024027A
JP2011024027A JP2009168060A JP2009168060A JP2011024027A JP 2011024027 A JP2011024027 A JP 2011024027A JP 2009168060 A JP2009168060 A JP 2009168060A JP 2009168060 A JP2009168060 A JP 2009168060A JP 2011024027 A JP2011024027 A JP 2011024027A
Authority
JP
Japan
Prior art keywords
packet
transmission
time
unit
buffer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2009168060A
Other languages
Japanese (ja)
Inventor
Daisuke Namihira
大輔 浪平
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2009168060A priority Critical patent/JP2011024027A/en
Publication of JP2011024027A publication Critical patent/JP2011024027A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To achieve complicated QoS control and transmit a packet at correct time. <P>SOLUTION: A packet type identification unit 101 identifies the type of a packet and enqueues the packet to a queue corresponding to the identified packet type among queues 102-1 to 102-n with QoS values set according to the corresponding packet type. For each packet in each queue, a scheduler unit 103 calculates estimated transmission time based on the QoS value of the queue, and dequeues the packet and outputs the packet to a hardware control unit 200 together with time information that indicates the estimated transmission time. A buffer storage processing unit 210 sorts the packets output from the scheduler unit 103 in the order of estimated transmission time, and stores the sorted packets in a buffer unit 220. A transmission processing unit 230 transmits each packet stored in the buffer unit 220 at the estimated transmission time of each packet. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、パケットの送信を制御する技術に関する。   The present invention relates to a technique for controlling packet transmission.

多くのコンピュータネットワークでは、データ通信、音声通話、映像配信などの多様な種類の通信が、同じネットワーク上に流れている。そこで、通信の種類に応じた適切な通信品質を確保するために、端末機、サーバ、または通信経路上にある中継装置もしくはゲートウェイ装置などが、QoS(Quality of Service)制御を行うことがある。   In many computer networks, various types of communication such as data communication, voice call, and video distribution flow on the same network. Therefore, in order to ensure appropriate communication quality according to the type of communication, a terminal, a server, or a relay device or gateway device on a communication path may perform QoS (Quality of Service) control.

QoS制御を行う一方式によれば、QoS制御を行う装置に複数のキューが用意され、通信の種類に応じて、パケットをエンキューするキューが割り当てられる。また、各キューには、通信品質に応じた優先度または帯域などが設定されている。そして、QoS制御を行う装置は、スケジューリング処理を行う。すなわち、QoS制御を行う装置は、各キューの設定に応じて、全キューの中から次に送信するパケットを選ぶとともに、パケットを送信するタイミングを調整する。   According to one method for performing QoS control, a plurality of queues are prepared in a device that performs QoS control, and a queue for enqueuing packets is assigned according to the type of communication. Each queue is set with a priority or a band according to communication quality. And the apparatus which performs QoS control performs a scheduling process. That is, a device that performs QoS control selects a packet to be transmitted next from all the queues according to the setting of each queue, and adjusts the timing of transmitting the packet.

QoS制御のための具体的な技術としては、様々なものが知られているが、例えば、パケットに対する遅延時間を定量的かつ動的に制御することを可能とすることを目的とした、次のようなデータ通信システムが開示されている。   Various specific techniques for QoS control are known. For example, the following is intended to enable quantitative and dynamic control of the delay time for a packet. Such a data communication system is disclosed.

データ通信システムにおいて、パケット管理処理部は、遅延時間制御対象となるパケット群に対応する送信候補キューの配置対象区間を要求遅延時間に基づいて決定する。当該配置対象区間にキュー群が既存し、かつ当該キュー群における間隙の総和が、当該送信候補キューのバーストサイズ以上となる場合に、パケット管理処理部は次のように動作する。すなわち、パケット管理処理部は、当該配置対象区間の末尾位置から送信キューの先頭までの区間に存する間隙を除外して整列し、当該送信候補キューを挿入して再配列する。   In the data communication system, the packet management processing unit determines an arrangement target section of transmission candidate queues corresponding to a packet group to be subjected to delay time control based on the requested delay time. When a queue group already exists in the allocation target section and the total sum of the gaps in the queue group is equal to or larger than the burst size of the transmission candidate queue, the packet management processing unit operates as follows. That is, the packet management processing unit arranges by excluding the gap existing in the section from the end position of the section to be arranged to the head of the transmission queue, inserts the transmission candidate queue, and rearranges.

また、このデータ通信システムにおいて、送信処理部は、送信キューにスケジューリングされた各キューの配列に基づいて、次のように動作する。すなわち、送信処理部は、遅延時間制御の対象となる送信候補キュー群、帯域制御のみの帯域制御キュー群、通信品質保証の対象外となるデフォルトキュー群、の優先順位で、対応するパケット群の送信を行う。   In this data communication system, the transmission processing unit operates as follows based on the arrangement of each queue scheduled in the transmission queue. That is, the transmission processing unit determines the priority of the transmission candidate queue group subject to delay time control, the bandwidth control queue group only for bandwidth control, and the default queue group that is not subject to communication quality guarantee, and Send.

特開平11−243420号公報JP-A-11-243420

ネットワークサービスの多様化にしたがい、QoS制御が複雑化することが予測される。他方で、近年の大容量化したネットワーク回線においてジッタを抑制するためには、QoS制御を行う装置が、正確な時刻にパケットを送信することが望ましい。   As network services diversify, QoS control is expected to become more complicated. On the other hand, in order to suppress jitter in a network line with a large capacity in recent years, it is desirable that a device that performs QoS control transmits a packet at an accurate time.

そこで本発明は、複雑なQoS制御と、正確な時刻にパケットを送信することを両立させることが可能な技術を提供することを目的とする。   Therefore, an object of the present invention is to provide a technique capable of satisfying both complex QoS control and packet transmission at an accurate time.

一態様によればパケット送信制御装置が提供される。前記パケット送信制御装置は、ソフトウェアにしたがって動作するソフトウェア制御部と、ハードウェア回路にしたがって動作するハードウェア制御部とを備える。   According to one aspect, a packet transmission control apparatus is provided. The packet transmission control device includes a software control unit that operates according to software, and a hardware control unit that operates according to a hardware circuit.

前記ソフトウェア制御部はスケジューラ部を備える。また、前記ハードウェア制御部は、バッファ部とバッファ格納処理部と送信処理部を備える。
前記スケジューラ部はスケジューリング処理を行う。前記スケジューリング処理は、格納するパケットの種別に応じてQoS設定値が設定されている複数のキューの各々にエンキューされている各パケットに対して、当該キューに設定された前記QoS設定値に基づいて当該パケットの送信予定時刻を算出し、当該パケットをデキューし、前記送信予定時刻を示す時刻情報とともに前記ハードウェア制御部へ出力する、という処理である。
The software control unit includes a scheduler unit. The hardware control unit includes a buffer unit, a buffer storage processing unit, and a transmission processing unit.
The scheduler unit performs scheduling processing. The scheduling process is performed based on the QoS setting value set in the queue for each packet enqueued in each of a plurality of queues in which the QoS setting value is set according to the type of packet to be stored. This is a process of calculating the scheduled transmission time of the packet, dequeuing the packet, and outputting the packet to the hardware control unit together with time information indicating the scheduled transmission time.

前記バッファ格納処理部は、前記スケジューラ部から出力される各パケットを、各パケットの前記時刻情報に基づいて前記送信予定時刻の順にソートして前記バッファ部に格納する。   The buffer storage processing unit sorts the packets output from the scheduler unit in the order of the scheduled transmission time based on the time information of the packets and stores the packets in the buffer unit.

前記送信処理部は、前記バッファ部に格納された各パケットを、当該パケットの前記送信予定時刻に送信する。   The transmission processing unit transmits each packet stored in the buffer unit at the scheduled transmission time of the packet.

上記パケット送信制御装置によれば、スケジューリング処理のように、ソフトウェアに適した複雑な処理は、ソフトウェア制御部によって行われる。また、ハードウェア制御部は、予め各パケットとともに受け取った時刻情報を利用して、各パケットを送信予定時刻どおりに正確に送信することができる。したがって、上記パケット送信制御装置によれば、複雑なQoS制御と、正確な時刻にパケットを送信することを両立させることが可能である。   According to the packet transmission control device, complicated processing suitable for software, such as scheduling processing, is performed by the software control unit. Also, the hardware control unit can accurately transmit each packet according to the scheduled transmission time by using time information received together with each packet in advance. Therefore, according to the packet transmission control device, it is possible to achieve both the complex QoS control and the packet transmission at the correct time.

パケット送信制御装置のブロック図である。It is a block diagram of a packet transmission control apparatus. パケット送信制御装置のハードウェア構成図である。It is a hardware block diagram of a packet transmission control apparatus. ソフトウェア制御部およびバッファ格納処理部の詳細を示す図である。It is a figure which shows the detail of a software control part and a buffer storage process part. バッファ部の詳細を示す図である。It is a figure which shows the detail of a buffer part. 送信処理部の詳細を示す図である。It is a figure which shows the detail of a transmission process part. スケジューラ部によるスケジューリング処理を説明するフローチャートである。It is a flowchart explaining the scheduling process by a scheduler part. バッファ格納処理部による相対時刻カウント開始処理を説明するフローチャートである。It is a flowchart explaining the relative time count start process by a buffer storage process part. バッファ格納処理部による送信開始指示処理を説明するフローチャートである。It is a flowchart explaining the transmission start instruction | indication process by a buffer storage process part. バッファ格納処理部によるパケット送信依頼処理を説明するフローチャートである。It is a flowchart explaining the packet transmission request process by a buffer storage process part. パケット送信依頼処理によるバッファ部の状態遷移の例を説明する図である。It is a figure explaining the example of the state transition of the buffer part by a packet transmission request process. 送信処理部による送信処理を説明するフローチャートである。It is a flowchart explaining the transmission process by a transmission process part. 送信処理によるバッファ部の状態遷移の例を説明する図である。It is a figure explaining the example of the state transition of the buffer part by transmission processing.

以下、実施形態について、図面を参照しながら詳細に説明する。説明の順序は次のとおりである。
まず、一実施形態によるパケット送信制御装置の構成と動作の概要を、図1および図2を参照して説明する。あわせて、本実施形態によるソフトウェアとハードウェアの連携の利点についても簡単に説明する。
Hereinafter, embodiments will be described in detail with reference to the drawings. The order of explanation is as follows.
First, an outline of the configuration and operation of a packet transmission control apparatus according to an embodiment will be described with reference to FIG. 1 and FIG. In addition, the advantages of the cooperation between software and hardware according to the present embodiment will be briefly described.

その後、図3〜図5を参照して図1の各部の詳細な構成を説明し、図6〜図12を参照してパケット送信制御装置の動作の詳細を説明する。その後、これらの詳細をふまえて、ソフトウェアとハードウェアの連携の利点について、より詳しく説明する。また、最後に、他の実施形態についても説明する。   Thereafter, the detailed configuration of each unit in FIG. 1 will be described with reference to FIGS. 3 to 5, and the details of the operation of the packet transmission control apparatus will be described with reference to FIGS. 6 to 12. Then, based on these details, the advantages of the cooperation between software and hardware will be described in more detail. Finally, other embodiments will be described.

なお、本明細書において、「パケット」という用語は、PDU(Protocol Data Unit)(すなわち、プロトコルに応じた形式を有するデータの送信単位)という一般的な意味を示す。以下では特に限定する場合を除いて、「パケット」という用語は、プロトコル自体やプロトコルが属するレイヤを限定しない意味で用いる。   In this specification, the term “packet” indicates a general meaning of PDU (Protocol Data Unit) (that is, a data transmission unit having a format corresponding to a protocol). Hereinafter, the term “packet” is used in a sense that does not limit the protocol itself and the layer to which the protocol belongs, unless otherwise specified.

本明細書における「パケット」の具体例は、例えば、一般に「フレーム」、「パケット」、「セル」、「データグラム」、「セグメント」などと呼ばれる各種のPDUであり、より具体的には例えば以下のものを含むが、以下の例に限定されない。   Specific examples of “packet” in the present specification are, for example, various PDUs generally called “frame”, “packet”, “cell”, “datagram”, “segment”, and the like. Although the following are included, it is not limited to the following examples.

・データリンク層のMAC(Media Access Control)フレーム、ATM(Asynchronous Transfer Mode)セル
・ネットワーク層のIP(Internet Protocol)データグラム
・トランスポート層のTCP(Transmission Control Protocol)セグメント、UDP(User Datagram Protocol)データグラム、RTP(Real-time Transport Protocol)パケット
図1は、本実施形態によるパケット送信制御装置のブロック図である。図1のパケット送信制御装置1は、QoS制御システムが組み込まれた装置であり、パケットを中継する中継装置である。本実施形態は、例えば、L2(layer 2)スイッチ、L3(layer 3)スイッチ、ルータ、ゲートウェイ装置などの各種中継装置に適用可能である。換言すれば、パケット送信制御装置1は、これら各種中継装置の任意の1種として実装することができる。同様に、パケット送信制御装置1は、端末機やサーバにも適用可能である。
-Data link layer MAC (Media Access Control) frame, ATM (Asynchronous Transfer Mode) cell-Network layer IP (Internet Protocol) datagram-Transport layer TCP (Transmission Control Protocol) segment, UDP (User Datagram Protocol) Datagram, RTP (Real-time Transport Protocol) Packet FIG. 1 is a block diagram of a packet transmission control apparatus according to this embodiment. The packet transmission control device 1 in FIG. 1 is a device in which a QoS control system is incorporated, and is a relay device that relays packets. The present embodiment can be applied to various relay devices such as an L2 (layer 2) switch, an L3 (layer 3) switch, a router, and a gateway device. In other words, the packet transmission control device 1 can be implemented as any one of these various relay devices. Similarly, the packet transmission control device 1 can be applied to terminals and servers.

図1に示すように、パケット送信制御装置1は、ソフトウェアにしたがって動作し、各種制御を行うソフトウェア制御部100と、ハードウェア回路にしたがって動作し、各種制御を行うハードウェア制御部200を備える。   As illustrated in FIG. 1, the packet transmission control device 1 includes a software control unit 100 that operates according to software and performs various controls, and a hardware control unit 200 that operates according to a hardware circuit and performs various controls.

ソフトウェア制御部100は、パケット種別識別部101とキュー群102とスケジューラ部103を備え、キュー群102は、n本のキュー102−1〜102−nを含む(n>1)。また、ハードウェア制御部200は、バッファ格納処理部210とバッファ部220と送信処理部230を備え、バッファ部220は、パケット格納部221と時刻情報格納部222を含む。   The software control unit 100 includes a packet type identification unit 101, a queue group 102, and a scheduler unit 103, and the queue group 102 includes n queues 102-1 to 102-n (n> 1). The hardware control unit 200 includes a buffer storage processing unit 210, a buffer unit 220, and a transmission processing unit 230. The buffer unit 220 includes a packet storage unit 221 and a time information storage unit 222.

パケット送信制御装置1によるQoS制御の概要は次のとおりである。
まず、パケット送信制御装置1が中継あるいは送信しようとするパケットは、ソフトウェア制御部100に入力され、パケット種別識別部101に渡される。パケット種別識別部101は、キューイング処理を行う。すなわち、パケット種別識別部101は、パケットを解析してパケットの種別を識別し、キュー群102のキュー102−1〜102−nのうちどのキューにパケットをエンキューするかを決定し、決定したキューへパケットをエンキューする。なお、種別は任意に定義されていてよい。
The outline of QoS control by the packet transmission control device 1 is as follows.
First, a packet to be relayed or transmitted by the packet transmission control device 1 is input to the software control unit 100 and passed to the packet type identification unit 101. The packet type identification unit 101 performs queuing processing. That is, the packet type identification unit 101 analyzes the packet to identify the type of the packet, determines which queue among the queues 102-1 to 102-n of the queue group 102 is to be enqueued, and determines the determined queue Enqueue packets to Note that the type may be arbitrarily defined.

なお、各キュー102−1〜102−nには予め、対応する種別に応じてQoS設定値が設定されている。QoS設定値の例は、優先度、帯域、または両者の組み合わせである。パケット種別識別部101は、パケットを解析することでパケットの種別を識別する。換言すれば、パケット種別識別部101は、入力されたパケットがどのQoS設定値に適合するのかを認識する。そして、パケット種別識別部101は、適合するQoS設定値が設定されたキューに、パケットをエンキューする。   Note that a QoS setting value is set in advance in each of the queues 102-1 to 102-n according to the corresponding type. Examples of QoS set values are priority, bandwidth, or a combination of both. The packet type identification unit 101 identifies a packet type by analyzing the packet. In other words, the packet type identification unit 101 recognizes which QoS setting value the input packet matches. Then, the packet type identification unit 101 enqueues the packet in the queue in which the appropriate QoS setting value is set.

パケット種別識別部101は、公知のアルゴリズムにしたがって動作してもよい。パケットの解析には、パケットヘッダ内のQoS制御用の所定のフィールドの内容、パケットヘッダ内のその他のフィールドの内容、または、パケットのペイロードに含まれる上位層のプロトコルのヘッダの内容などが利用される。   The packet type identification unit 101 may operate according to a known algorithm. The packet analysis uses the contents of a predetermined field for QoS control in the packet header, the contents of other fields in the packet header, or the contents of the header of the upper layer protocol included in the packet payload. The

例えば、パケット送信制御装置1が具体的にはL2スイッチである場合は、パケット種別識別部101は、パケットのL2ヘッダの内容を解析してもよい。例えば、受け取ったパケットがVLAN(Virtual Local Area Network)タグ付きのMACフレームである場合、パケット種別識別部101は、VLANタグ中のプライオリティ・フィールドの値に応じて、パケットをエンキューするキューを決定してもよい。   For example, when the packet transmission control device 1 is specifically an L2 switch, the packet type identification unit 101 may analyze the content of the L2 header of the packet. For example, when the received packet is a MAC frame with a VLAN (Virtual Local Area Network) tag, the packet type identification unit 101 determines a queue for enqueuing the packet according to the value of the priority field in the VLAN tag. May be.

あるいは、パケット送信制御装置1が具体的にはL3スイッチやルータである場合は、パケット種別識別部101は、キューの決定のためにパケットのL3ヘッダの内容を解析してもよい。例えば、受け取ったパケットがIPパケットである場合、パケット種別識別部101は、IPヘッダ中のToS(Type of Service)フィールドの値に応じてキューを決定してもよい。なお、実施形態に応じて、キューの決定のために、送信元IPアドレス、宛先IPアドレスなどのIPヘッダ中の他のフィールドが使われてもよく、トランスポート層(L4)やアプリケーション層(L7)などの上位層のプロトコルのヘッダが使われてもよい。   Alternatively, when the packet transmission control device 1 is specifically an L3 switch or a router, the packet type identification unit 101 may analyze the contents of the L3 header of the packet in order to determine a queue. For example, when the received packet is an IP packet, the packet type identification unit 101 may determine the queue according to the value of the ToS (Type of Service) field in the IP header. Depending on the embodiment, other fields in the IP header such as the source IP address and the destination IP address may be used to determine the queue, and the transport layer (L4) and application layer (L7) may be used. ) Or other higher layer protocol headers may be used.

上記の例示に限らず、パケット種別識別部101は、実施形態に応じたアルゴリズムにしたがって、パケットを解析し、パケットの種別を識別し、識別した種別に対応するキューをキュー群102の中から選択し、選択したキューにパケットをエンキューする。   Not limited to the above example, the packet type identification unit 101 analyzes the packet according to the algorithm according to the embodiment, identifies the type of the packet, and selects a queue corresponding to the identified type from the queue group 102 And enqueue the packet to the selected queue.

キュー群102の各キュー102−1〜102−nは、エンキューされたパケットを格納するFIFO(First In First Out)キューである。図1では、h番目(1≦h≦n)のキュー102−h内のg番目に格納されているパケットを「Qhg」という参照符号で示している。また、各キュー102−1〜102−n内にエンキューされたパケットは、後にスケジューラ部103によりデキューされる。 Each of the queues 102-1 to 102-n of the queue group 102 is a FIFO (First In First Out) queue that stores enqueued packets. In FIG. 1, the packet stored in the g-th in the h-th (1 ≦ h ≦ n) queue 102-h is indicated by a reference sign “Q hg ”. Further, the packet enqueued in each of the queues 102-1 to 102-n is dequeued later by the scheduler unit 103.

スケジューラ部103は、所定の間隔でスケジューリング処理を繰り返し行う。具体的には、スケジューラ部103は、次にパケットをデキューするキューを決定し、決定したキューからパケットをデキューしてハードウェア制御部200に出力し、出力したパケットの送信をハードウェア制御部200に依頼する。   The scheduler unit 103 repeatedly performs scheduling processing at a predetermined interval. Specifically, the scheduler unit 103 determines a queue for dequeuing the packet next, dequeues the packet from the determined queue, outputs the packet to the hardware control unit 200, and transmits the output packet to the hardware control unit 200. To ask.

詳しくは後述するが、スケジューラ部103は、ハードウェア制御部200がパケットを外部へ送信するタイミング(以下「送信予定時刻」という)を示す情報(以下「時刻情報」という)をパケットと関連付ける。そして、スケジューラ部103は、時刻情報を付したパケットをハードウェア制御部200に出力し、パケットの送信をハードウェア制御部200に依頼する。また、スケジューラ部103は、複数のパケットをまとめて一度にハードウェア制御部200に出力し、それら複数のパケットの送信をハードウェア制御部200に依頼してもよい。   As will be described in detail later, the scheduler unit 103 associates information (hereinafter referred to as “time information”) indicating timing (hereinafter referred to as “transmission scheduled time”) when the hardware control unit 200 transmits the packet to the outside with the packet. The scheduler unit 103 then outputs the packet with the time information to the hardware control unit 200 and requests the hardware control unit 200 to transmit the packet. Further, the scheduler unit 103 may output a plurality of packets at a time to the hardware control unit 200 and request the hardware control unit 200 to transmit the plurality of packets.

ハードウェア制御部200では、時刻情報が付されてスケジューラ部103から出力された各パケットを、バッファ格納処理部210が受け取る。そして、バッファ格納処理部210は、受け取った各パケットと各パケットに付随する時刻情報を、バッファ部220のパケット格納部221と時刻情報格納部222にそれぞれ格納する。   In the hardware control unit 200, the buffer storage processing unit 210 receives each packet attached with time information and output from the scheduler unit 103. Then, the buffer storage processing unit 210 stores each received packet and time information associated with each packet in the packet storage unit 221 and the time information storage unit 222 of the buffer unit 220, respectively.

なお、本実施形態では、バッファ部220は、パケットと時刻情報の組をエントリとして持つ1種のキューであるが、単純なFIFOキューではない。バッファ部220への格納(すなわちエンキュー操作)の際には、キュー内でエントリが送信予定時刻順にソートされて並ぶように、新たなパケットと時刻情報の組が適切な位置に挿入される。   In the present embodiment, the buffer unit 220 is a single queue having a pair of a packet and time information as an entry, but is not a simple FIFO queue. When storing in the buffer unit 220 (that is, enqueue operation), a set of new packets and time information is inserted at an appropriate position so that entries are sorted and arranged in the queue in the order of scheduled transmission times.

詳しくは図9と図10を参照して後述するが、バッファ格納処理部210は、バッファ部220内でエントリが送信予定時刻順にソートされて並ぶようにするため、次のように動作する。   Although details will be described later with reference to FIGS. 9 and 10, the buffer storage processing unit 210 operates as follows in order to arrange the entries in the buffer unit 220 in the order of the scheduled transmission time.

すなわち、バッファ格納処理部210は、バッファ部220のキューの先頭から順に、エンキューしようとするパケットに付された時刻情報と、キュー内のエントリに含まれる時刻情報とを比較する。そして、バッファ格納処理部210は、エンキューしようとするパケットの送信予定時刻以降の時刻が最初に見つかったエントリの直前に新たなエントリを挿入することにより、エンキュー操作を行う。   That is, the buffer storage processing unit 210 compares the time information attached to the packet to be enqueued with the time information included in the entry in the queue in order from the head of the queue of the buffer unit 220. Then, the buffer storage processing unit 210 performs the enqueue operation by inserting a new entry immediately before the entry in which the time after the scheduled transmission time of the packet to be enqueued is first found.

なお、バッファ部220がキューであるという観点から換言すると、パケット格納部221は、キューの各エントリのうちパケットを格納する領域である。また、時刻情報格納部222は、各エントリのうち時刻情報を格納する領域である。   In other words, from the viewpoint that the buffer unit 220 is a queue, the packet storage unit 221 is an area for storing a packet among the entries of the queue. The time information storage unit 222 is an area for storing time information among the entries.

バッファ部220からのデキュー操作は、送信処理部230により行われる。送信処理部230は、送信予定時刻順にソートされたエントリをキューの先頭から順に1つずつデキューし、デキューしたエントリの時刻情報と現在時刻とに基づいて送信予定時刻まで待ってから、デキューしたエントリのパケットを送信する。なお、詳しくは後述するが、送信処理部230は、現在時刻を絶対時刻または相対時刻で表して利用することができる。   The dequeue operation from the buffer unit 220 is performed by the transmission processing unit 230. The transmission processing unit 230 dequeues the entries sorted in order of the scheduled transmission time one by one from the top of the queue, waits until the planned transmission time based on the time information of the dequeued entry and the current time, and then dequeues the entry. Send the packet. As will be described in detail later, the transmission processing unit 230 can use the current time by expressing it as an absolute time or a relative time.

以上のようにして、ソフトウェア制御部100に入力されたパケットはハードウェア制御部200から送信され、パケット送信制御装置1はQoS制御を行いながらパケットの中継を行う。   As described above, the packet input to the software control unit 100 is transmitted from the hardware control unit 200, and the packet transmission control device 1 relays the packet while performing QoS control.

図2は、本実施形態によるパケット送信制御装置1のハードウェア構成図である。図1のパケット送信制御装置1は、具体的には図2に示すような各ハードウェア部品を有する。   FIG. 2 is a hardware configuration diagram of the packet transmission control device 1 according to the present embodiment. Specifically, the packet transmission control device 1 in FIG. 1 has hardware components as shown in FIG.

すなわち、パケット送信制御装置1は、CPU(Central Processing Unit)301とメモリユニット302とRTC(Real Time Clock)303を備える。また、パケット送信制御装置1は、それぞれm個(m>1)のMACチップ304−1〜304−mとPHY(PHYsical layer)チップ305−1〜305−mとポート306−1〜306−mを備える。   That is, the packet transmission control device 1 includes a CPU (Central Processing Unit) 301, a memory unit 302, and an RTC (Real Time Clock) 303. The packet transmission control device 1 includes m (m> 1) MAC chips 304-1 to 304-m, PHY (PHYsical layer) chips 305-1 to 305-m, and ports 306-1 to 306-m, respectively. Is provided.

メモリユニット302、RTC303およびMACチップ304−1〜304−mは、バス307に接続されている。i番目(1≦i≦m)のMACチップ304−iとPHYチップ305−iの間は、例えばMII(Media Independent Interface)などのインタフェースで接続されている。PHYチップ305−iはポート306−iに接続されており、両者の間には不図示のトランスが設けられていてもよい。   The memory unit 302, the RTC 303, and the MAC chips 304-1 to 304-m are connected to the bus 307. The i-th (1 ≦ i ≦ m) MAC chip 304-i and PHY chip 305-i are connected by an interface such as MII (Media Independent Interface). The PHY chip 305-i is connected to the port 306-i, and a transformer (not shown) may be provided between them.

メモリユニット302は、図2では1つのブロックとして簡略化して図示してあるが、ワークエリア用のRAM(Dynamic Random Access Memory)と、フラッシュメモリなどの不揮発性メモリ装置と、両者にそれぞれ対応するメモリコントローラとを含む。また、実施形態に応じて、メモリユニット302はさらに、例えばルーティングテーブル用にCAM(Content-Addressable Memory)などの他の種類のメモリ装置を含んでもよい。   Although the memory unit 302 is illustrated in a simplified form as one block in FIG. 2, a RAM (Dynamic Random Access Memory) for work area, a non-volatile memory device such as a flash memory, and a memory respectively corresponding to both Including a controller. Also, depending on the embodiment, the memory unit 302 may further include other types of memory devices such as a CAM (Content-Addressable Memory) for a routing table, for example.

メモリユニット302内の不揮発性メモリ装置には、プログラムや予め設定された各種のデータなどが格納される。CPU301は、不揮発性メモリ装置からRAMへプログラムをロードし、RAMをワークエリアとして利用しながら、ロードしたプログラムを実行する。   The nonvolatile memory device in the memory unit 302 stores programs, various preset data, and the like. The CPU 301 loads the program from the nonvolatile memory device to the RAM, and executes the loaded program while using the RAM as a work area.

CPU301とメモリユニット302の間の矢印は、CPU301がメモリコントローラを介してRAMおよび不揮発性メモリ装置にアクセスすることを示している。また、図3〜図5とともに後述するように、MACチップ304−1〜304−mにはレジスタ領域やメモリ領域が実装されている。CPU301は、メモリユニット302のメモリコントローラとバス307を介して、MACチップ304−1〜304−m内のレジスタ領域やメモリ領域を、CPU301のメモリ空間の一部として認識し、アクセスすることができる。   An arrow between the CPU 301 and the memory unit 302 indicates that the CPU 301 accesses the RAM and the nonvolatile memory device via the memory controller. As will be described later with reference to FIGS. 3 to 5, a register area and a memory area are mounted on the MAC chips 304-1 to 304-m. The CPU 301 can recognize and access the register area and the memory area in the MAC chips 304-1 to 304-m as a part of the memory space of the CPU 301 via the memory controller of the memory unit 302 and the bus 307. .

RTC303は、不図示のバッテリーによりバックアップされている回路であり、時刻を刻み続ける。メモリユニット302とMACチップ304−1〜304−mは、バス307を介してRTC303を参照し、現在時刻を認識することができる。本実施形態では、CPU301はRTC303と直接接続されているが、CPU301がバス307を介してRTC303に接続されていてもよい。   The RTC 303 is a circuit backed up by a battery (not shown) and keeps time. The memory unit 302 and the MAC chips 304-1 to 304-m can refer to the RTC 303 via the bus 307 and recognize the current time. In this embodiment, the CPU 301 is directly connected to the RTC 303, but the CPU 301 may be connected to the RTC 303 via the bus 307.

また、CPU301やMACチップ304−1〜304−mは、例えばパケット送信制御装置1の起動時にRTC303を参照して現在時刻を認識し、認識した時刻に基づき内部クロックを設定し、その後は内部クロックが刻む時刻を現在時刻として認識してもよい。   Further, the CPU 301 and the MAC chips 304-1 to 304-m recognize the current time with reference to the RTC 303 when the packet transmission control device 1 is activated, for example, and set the internal clock based on the recognized time. The time marked by may be recognized as the current time.

MACチップ304−1〜304−mはデータリンク層の処理を行い、PHYチップ305−1〜305−mは物理層の処理を行う。また、ポート306−1〜306−mにはケーブルが接続されている。MACチップ304−1〜304−mとPHYチップ305−1〜305−mは、例えばASIC(Application Specific Integrated Circuit)でもよいし、FPGA(Field Programmable Gate Array)などのリコンフィギュラブル回路を利用したものでもよい。   The MAC chips 304-1 to 304-m perform data link layer processing, and the PHY chips 305-1 to 305-m perform physical layer processing. A cable is connected to the ports 306-1 to 306-m. The MAC chips 304-1 to 304-m and the PHY chips 305-1 to 305-m may be, for example, ASICs (Application Specific Integrated Circuits) or those using reconfigurable circuits such as FPGAs (Field Programmable Gate Arrays). But you can.

なお、図2では一例として、ポートとPHYチップとMACチップが1対1対1に対応する単純な場合を示したが、例えば、複数のポートについての処理を1つのPHYチップが行うなど、「1対1対1」以外の対応関係を有する実施形態も可能である。   As an example, FIG. 2 shows a simple case in which a port, a PHY chip, and a MAC chip correspond one-to-one. However, for example, a single PHY chip performs processing for a plurality of ports. Embodiments having a correspondence other than “one to one to one” are possible.

上記のような各ハードウェア部品により、図1の各部が以下のようにして実現される。
CPU301が、必要に応じてRTC303を参照し、メモリユニット302内のRAMをワークエリアとして利用しながらプログラムを実行することで、パケット種別識別部101とスケジューラ部103が実現される。また、キュー群102はメモリユニット302内の記憶装置であるRAMにより実現される。そして、ハードウェア制御部200は、ハードウェア回路の1種である各MACチップ304−i(1≦i≦m)により実現される。
Each part of FIG. 1 is implement | achieved as follows by each hardware component as mentioned above.
When the CPU 301 refers to the RTC 303 as necessary and executes the program while using the RAM in the memory unit 302 as a work area, the packet type identification unit 101 and the scheduler unit 103 are realized. The queue group 102 is realized by a RAM that is a storage device in the memory unit 302. The hardware control unit 200 is realized by each MAC chip 304-i (1 ≦ i ≦ m) which is one type of hardware circuit.

なお、パケット送信制御装置1は、以下のようにしてパケットを中継する。
例えば、ポート306−i(1≦i≦m)から入力される電気信号や光信号などの物理的信号は、ポート306−iに接続されているPHYチップ305−iで論理的信号に変換される。変換後の論理的信号すなわちビット列は、PHYチップ305−iに接続されているMACチップ304−iに出力される。
Note that the packet transmission control device 1 relays packets as follows.
For example, a physical signal such as an electric signal or an optical signal input from the port 306-i (1 ≦ i ≦ m) is converted into a logical signal by the PHY chip 305-i connected to the port 306-i. The The converted logical signal, that is, the bit string is output to the MAC chip 304-i connected to the PHY chip 305-i.

MACチップ304−iは、入力されたビット列からL2パケット(例えばイーサネット(登録商標)フレーム)を認識し、バス307を介してL2パケットをメモリユニット302に出力する。実施形態に応じて、L2パケットはCPU301によりさらに処理を施されることもある。   The MAC chip 304-i recognizes an L2 packet (for example, an Ethernet (registered trademark) frame) from the input bit string, and outputs the L2 packet to the memory unit 302 via the bus 307. Depending on the embodiment, the L2 packet may be further processed by the CPU 301.

例えば、L2パケットにペイロードとして含まれるIPパケットのTTL(Time to Live)フィールドの値を、CPU301がデクリメントしてもよい。また、パケット送信制御装置1がルータの場合は、L2パケットのヘッダに含まれるMACアドレスなどをCPU301が付け替えてもよい。これらの処理は、FCS(Frame Check Sequence)などの再計算をともなう。実施形態に応じて、CPU301は、ソフトウェア制御部100として行う一連の処理の前・途中・後のうち適宜のタイミングで、中継にともなう上記のような処理を行うことができる。   For example, the CPU 301 may decrement the value of the TTL (Time to Live) field of the IP packet included as the payload in the L2 packet. When the packet transmission control device 1 is a router, the CPU 301 may replace the MAC address included in the header of the L2 packet. These processes involve recalculation such as FCS (Frame Check Sequence). Depending on the embodiment, the CPU 301 can perform the above-described processing associated with relaying at an appropriate timing before, during, or after a series of processing performed as the software control unit 100.

また、CPU301は、パケットの送信先ポートを決定する。例えばパケット送信制御装置1がL2スイッチの場合は、不図示のMACアドレス学習テーブルに基づいて、パケット送信制御装置1がルータの場合は、不図示のルーティングテーブルに基づいて、CPU301は送信先ポートを決定する。MACアドレス学習テーブルやルーティングテーブルは、メモリユニット302に格納される。   Further, the CPU 301 determines a transmission destination port of the packet. For example, when the packet transmission control device 1 is an L2 switch, the CPU 301 sets a destination port based on a MAC address learning table (not shown), and when the packet transmission control device 1 is a router, based on a routing table (not shown). decide. The MAC address learning table and the routing table are stored in the memory unit 302.

ここで、送信先ポートが例えばポート306−j(1≦j≦m)に決定されるとする。この場合、パケット種別識別部101としてのCPU301は、パケットを解析し、ポート306−j用のn本のキュー102−1〜102−nのいずれかにパケットをエンキューする。そして、スケジューラ部103としてのCPU301がスケジューリング処理を実行する。   Here, it is assumed that the transmission destination port is determined to be, for example, port 306-j (1 ≦ j ≦ m). In this case, the CPU 301 as the packet type identification unit 101 analyzes the packet and enqueues the packet in any of the n queues 102-1 to 102-n for the port 306-j. And CPU301 as the scheduler part 103 performs a scheduling process.

その結果、パケットは、ポート306−jに対応するハードウェア制御部200としてのMACチップ304−jへと出力される。
なお、MACチップ304−jへの出力の際、パケットには上記のとおり時刻情報が付される。また、実施形態に応じて必要ならばソフトウェア制御部100としてのCPU301がL2パケットへのカプセル化を行うので、MACチップ304−jへはL2パケットが出力される。
As a result, the packet is output to the MAC chip 304-j as the hardware control unit 200 corresponding to the port 306-j.
Note that when outputting to the MAC chip 304-j, time information is attached to the packet as described above. Further, if necessary according to the embodiment, the CPU 301 as the software control unit 100 performs encapsulation into the L2 packet, so that the L2 packet is output to the MAC chip 304-j.

ハードウェア制御部200としてのMACチップ304−jは、送信予定時刻まで待機してから、L2パケットをPHYチップ305−jへと出力する。PHYチップ305−jは、受け取ったL2パケットを物理的信号に変換し、ポート306−jから送信する。   The MAC chip 304-j as the hardware control unit 200 waits until the scheduled transmission time, and then outputs the L2 packet to the PHY chip 305-j. The PHY chip 305-j converts the received L2 packet into a physical signal and transmits it from the port 306-j.

以上のようにしてパケット送信制御装置1は、QoS制御を行いつつ、ポート306−iからポート306−jへとパケットを中継する。
続いて、本実施形態によるソフトウェアとハードウェアの連携の利点についても説明する。本実施形態では、各々の特長を活かしたソフトウェアとハードウェアの連携により、複雑なQoS制御と、正確な時刻にパケットを送信することを両立させることができる。理由は次のとおりである。
As described above, the packet transmission control device 1 relays a packet from the port 306-i to the port 306-j while performing QoS control.
Next, the advantages of cooperation between software and hardware according to this embodiment will be described. In the present embodiment, complicated QoS control and transmission of a packet at an accurate time can be achieved by linking software and hardware utilizing each feature. The reason is as follows.

パケット種別識別部101とスケジューラ部103は、プログラム(すなわちソフトウェア)にしたがって動作する。また、一般に、ソフトウェアによる処理はハードウェアによる処理に比べて、柔軟かつ複雑な制御をより容易に実現することができ、アルゴリズムの頻繁な変更にも対応しやすい。つまり、パケット種別識別部101とスケジューラ部103によるキューイング処理とスケジューリング処理においては、柔軟かつ複雑な制御を実現することも、新たなネットワークサービスの発展にあわせてアルゴリズムを随時変更することも、比較的容易である。   The packet type identification unit 101 and the scheduler unit 103 operate according to a program (that is, software). In general, software processing can more easily realize flexible and complex control than hardware processing, and can easily cope with frequent algorithm changes. In other words, in the queuing processing and scheduling processing by the packet type identification unit 101 and the scheduler unit 103, it is possible to realize flexible and complex control, and to change the algorithm as needed in accordance with the development of new network services. Easy.

他方で、ハードウェア制御部200はハードウェアチップ(すなわちMACチップ304−1〜304−mの各々)により実現されている。一般に、ハードウェアによる処理は、ソフトウェアによる処理に比べて、高速であり、厳密なタイミング制御によるリアルタイム性を実現することも比較的容易である。   On the other hand, the hardware control unit 200 is realized by a hardware chip (that is, each of the MAC chips 304-1 to 304-m). In general, processing by hardware is faster than processing by software, and it is relatively easy to realize real-time performance by strict timing control.

本実施形態でハードウェア制御部200が行う処理は、送信予定時刻順にソートしながらのキューイング処理と、指定された送信予定時刻まで待機してパケットを送信するという処理であり、それほど複雑ではない。よって、ハードウェア制御部200は、ハードウェアの特長を活かして、それぞれの送信予定時刻を厳密に守りながら複数のパケットを次々に送信することができる。   The processing performed by the hardware control unit 200 in the present embodiment is queuing processing while sorting in order of scheduled transmission time, and processing of waiting for a designated scheduled transmission time and transmitting packets, and is not so complicated. . Therefore, the hardware control unit 200 can transmit a plurality of packets one after another while strictly keeping the scheduled transmission times by utilizing the features of the hardware.

したがって、本実施形態によれば、各々の特長を活かしたソフトウェアとハードウェアの連携により、複雑できめ細やかなQoS制御と、リアルタイム性を実現するための短い間隔での正確なパケットの送信とを両立させることができる。   Therefore, according to the present embodiment, complicated and fine-tuned QoS control and accurate packet transmission at short intervals for realizing real-time performance are realized by cooperation of software and hardware utilizing each feature. Both can be achieved.

また、本実施形態によれば、将来新たなネットワークサービスが出現しても、ソフトウェアの書き換えによってソフトウェア制御部100の動作を変更することにより、新たなネットワークサービスに適したQoS制御に切り換えることが比較的容易にできる。すなわち、本実施形態によれば、リアルタイム性を犠牲にすることなく、拡張性にも優れたQoS制御が実現される。   Further, according to the present embodiment, even if a new network service appears in the future, the operation of the software control unit 100 is changed by rewriting software to switch to QoS control suitable for the new network service. Easily. That is, according to the present embodiment, QoS control excellent in expandability is realized without sacrificing real-time performance.

続いて、本実施形態の詳細について、図3〜図12を参照して説明する。図3〜図5は、それぞれ図1の一部について詳細を示す図である。なお、図3〜図5に関しては、図1と共通部分についての説明は省略し、また、動作についての説明は図6〜図12とともに後述する。   Next, details of the present embodiment will be described with reference to FIGS. 3 to 5 are diagrams showing details of a part of FIG. 3 to 5, the description of the parts common to FIG. 1 is omitted, and the description of the operation will be described later with reference to FIGS. 6 to 12.

図3は、ソフトウェア制御部100およびバッファ格納処理部210の詳細を示す図である。なお、図示の都合上、図3では、ソフトウェア制御部100中のキュー群102は省略されており、図1に示したバッファ部220の内部構造も省略されている。   FIG. 3 is a diagram showing details of the software control unit 100 and the buffer storage processing unit 210. For convenience of illustration, in FIG. 3, the queue group 102 in the software control unit 100 is omitted, and the internal structure of the buffer unit 220 shown in FIG. 1 is also omitted.

上記のように、ソフトウェア制御部100は、図2のメモリユニット302とCPU301の協働により実現されるが、図3ではメモリユニット302により実現されるソフトウェア制御部100内のメモリ領域104の詳細が示されている。   As described above, the software control unit 100 is realized by the cooperation of the memory unit 302 and the CPU 301 in FIG. 2, but in FIG. 3, details of the memory area 104 in the software control unit 100 realized by the memory unit 302 are shown. It is shown.

メモリ領域104上には、時刻指定フラグFと送信パケットリスト105が記憶される。また、メモリ領域104はパケットバッファ106としても利用される。
時刻指定フラグFは、「絶対時刻」または「相対時刻」を表す。時刻指定フラグFと送信パケットリスト105は、スケジューラ部103が内部で保持するデータの1つである。パケットバッファ106は、複数のパケットを格納することができるバッファ領域であり、静的または動的にメモリユニット302上に確保され、キュー群102および送信パケットリスト105のために使われる。
On the memory area 104, a time designation flag F and a transmission packet list 105 are stored. The memory area 104 is also used as a packet buffer 106.
The time designation flag F represents “absolute time” or “relative time”. The time designation flag F and the transmission packet list 105 are one piece of data held internally by the scheduler unit 103. The packet buffer 106 is a buffer area capable of storing a plurality of packets, and is statically or dynamically allocated on the memory unit 302 and used for the queue group 102 and the transmission packet list 105.

本実施形態の送信パケットリスト105は、ノードL〜Lを有する線形リストとして実装される。また、先頭のノードLの前にはダミーノードLが設けられている。
各ノードL(0≦i<e)は、次のノードLi+1を指すポインタを含む。また、各ノードL(1≦i≦e)は、パケットバッファ106に格納されているパケットを指すポインタと、図3には不図示の時刻情報を含む。
Transmission packet list 105 of the present embodiment is implemented as a linear list having a node L 1 ~L e. The dummy node L 0 is before the first node L 1 is provided.
Each node L i (0 ≦ i <e) includes a pointer to the next node L i + 1 . Each node L i (1 ≦ i ≦ e) includes a pointer indicating a packet stored in the packet buffer 106 and time information (not shown in FIG. 3).

また、図3に示すように、バッファ格納処理部210は、図7〜図9に示す後述の各処理を実行するハードウェア回路である制御回路211と、1つ以上のレジスタを含むレジスタ領域212とを備える。   Further, as shown in FIG. 3, the buffer storage processing unit 210 includes a control circuit 211 that is a hardware circuit that executes each process described later shown in FIGS. 7 to 9, and a register area 212 including one or more registers. With.

以下、レジスタ領域212内の所定のレジスタRが保持する制御情報を「送信パケットリスト先頭ポインタ」という。送信パケットリスト先頭ポインタとして、ダミーノードLのアドレスが記憶される。 Hereinafter, the control information held by the predetermined register R 1 in the register area 212 is referred to as “transmission packet list head pointer”. As transmission packet list head pointer, address of the dummy node L 0 is stored.

なお、レジスタRは、スケジューラ部103からもアクセス可能なレジスタである。同様に、メモリ領域104中の送信パケットリスト105とパケットバッファ106も、バッファ格納処理部210の制御回路211からアクセス可能である。 Note that the register R 1 is a register that can also be accessed from the scheduler unit 103. Similarly, the transmission packet list 105 and the packet buffer 106 in the memory area 104 can also be accessed from the control circuit 211 of the buffer storage processing unit 210.

図4は、バッファ部220の詳細を示す図である。図4ではソフトウェア制御部100の内部は省略されている。
図4に示すように、バッファ部220は、メモリ領域223とレジスタ領域224を備える。メモリ領域223は、図1に示したパケット格納部221および時刻情報格納部222として利用される。また、本実施形態におけるレジスタ領域224は、5つ以上のレジスタを含み、バッファ格納処理部210および送信処理部230からアクセス可能であり、バッファ格納処理部210を介してソフトウェア制御部100からもアクセス可能である。
FIG. 4 is a diagram illustrating details of the buffer unit 220. In FIG. 4, the inside of the software control unit 100 is omitted.
As shown in FIG. 4, the buffer unit 220 includes a memory area 223 and a register area 224. The memory area 223 is used as the packet storage unit 221 and the time information storage unit 222 shown in FIG. In addition, the register area 224 in this embodiment includes five or more registers and is accessible from the buffer storage processing unit 210 and the transmission processing unit 230, and is also accessed from the software control unit 100 via the buffer storage processing unit 210. Is possible.

レジスタ領域224内の所定の5つのレジスタR〜Rが、それぞれ、時刻指定フラグ、バッファ探索開始位置、エンキュー位置、バッファ部ポインタ、および送信開始指示の格納のために用いられる。レジスタR〜Rに格納されるこれらの制御情報の意味については後述する。 Predetermined five registers R 2 to R 6 in the register area 224 are used for storing a time designation flag, a buffer search start position, an enqueue position, a buffer section pointer, and a transmission start instruction, respectively. The meaning of the control information stored in the registers R 2 to R 6 will be described later.

図5は、送信処理部230の詳細を示す図である。図4ではソフトウェア制御部100の内部は省略されている。また、送信処理部230との関連を示すため、図2のRTC303が図5にも図示されている。   FIG. 5 is a diagram illustrating details of the transmission processing unit 230. In FIG. 4, the inside of the software control unit 100 is omitted. In order to show the relationship with the transmission processing unit 230, the RTC 303 of FIG. 2 is also shown in FIG.

図5に示すように、送信処理部230は、図11に示す後述の処理を実行するハードウェア回路である制御回路231と、1つ以上のレジスタを含むレジスタ領域232と、RTC303を参照可能な内部カウンタ233とを備える。送信処理部230は、バッファ部220からデキューしたパケットに付随する時刻情報を、レジスタ領域232内の所定のレジスタRにコピーして格納する。 As shown in FIG. 5, the transmission processing unit 230 can refer to the control circuit 231 that is a hardware circuit that executes the later-described processing shown in FIG. 11, the register area 232 including one or more registers, and the RTC 303. And an internal counter 233. The transmission processing unit 230 copies the time information associated with the packet dequeued from the buffer unit 220 to a predetermined register R 7 in the register area 232 and stores it.

続いて、図6〜図12を参照して、図1〜図5に構成を示した各部の動作の詳細を説明する。なお、以下では説明の便宜上、次の(a1)〜(a4)のように仮定するが、仮定(a1)〜(a4)により一般性が失われないことは明らかである。   Next, with reference to FIG. 6 to FIG. 12, details of the operation of each unit whose configuration is shown in FIG. 1 to FIG. 5 will be described. In the following, for convenience of explanation, the following assumptions (a1) to (a4) are made, but it is clear that the generality is not lost by the assumptions (a1) to (a4).

(a1)本実施形態のパケット送信制御装置1は、各ポート306−1〜306−mからのトラフィックについて、それぞれQoS制御を行う。
仮定(a1)は、1≦j≦mを満たす各jについて、CPU301とメモリユニット302とRTC303によりソフトウェア制御部100が実現されるとともに、MACチップ304−jによりハードウェア制御部200が実現されることを意味する。つまり、CPU301とメモリユニット302とRTC303は、m個のポート306−1〜306−mに対応するそれぞれのソフトウェア制御部100を兼ねる。
(A1) The packet transmission control device 1 according to the present embodiment performs QoS control for traffic from the ports 306-1 to 306-m.
Assumption (a1) is that for each j satisfying 1 ≦ j ≦ m, the CPU 301, the memory unit 302, and the RTC 303 realize the software control unit 100, and the MAC chip 304-j realizes the hardware control unit 200. Means that. That is, the CPU 301, the memory unit 302, and the RTC 303 also serve as the respective software control units 100 corresponding to the m ports 306-1 to 306-m.

なお、以下では、送信先ポートがポート306−jである場合、すなわちハードウェア制御部200がMACチップ304−jである場合を具体例として説明する。つまり、以下の説明においては、図1のソフトウェア制御部100に入力されるパケットは、送信先ポートがポート306−jであるパケットであり、ハードウェア制御部200からはPHYチップ305−jを介してポート306−jへとパケットが出力される。   Hereinafter, a case where the transmission destination port is the port 306-j, that is, the case where the hardware control unit 200 is the MAC chip 304-j will be described as a specific example. In other words, in the following description, the packet input to the software control unit 100 in FIG. 1 is a packet whose destination port is the port 306-j, and from the hardware control unit 200 via the PHY chip 305-j. The packet is output to the port 306-j.

(a2)ポート306−jから送信しようとするパケットに関して、本実施形態では、キュー群102がn本のキュー102−1〜102−nを含む。
ここで、j≠kかつ1≦k≦mを満たすkについて、ポート306−kに対応するソフトウェア制御部内のキュー群に含まれるキューの本数をn’とする。実施形態により、ポート306−kに対応してメモリユニット302上に実現されるキューの本数n’と、ポート306−jに対応してメモリユニット302上に実現されるキューの本数nは、異なっていてもよいし、同じでもよい。すべてのポート306−1〜306−mについて、同じようにキュー群102が設けられていれば、送信先のポートが決定される前にパケット種別識別部101が種別の識別を行うこともできる。
(A2) Regarding the packet to be transmitted from the port 306-j, in this embodiment, the queue group 102 includes n queues 102-1 to 102-n.
Here, for k satisfying j ≠ k and 1 ≦ k ≦ m, the number of queues included in the queue group in the software control unit corresponding to the port 306-k is n ′. According to the embodiment, the number n ′ of queues realized on the memory unit 302 corresponding to the port 306-k is different from the number n of queues realized on the memory unit 302 corresponding to the port 306-j. May be the same or the same. If the queue group 102 is provided in the same way for all the ports 306-1 to 306-m, the packet type identifying unit 101 can identify the type before the destination port is determined.

(a3)本実施形態では、キュー群102内のキュー102−1〜102−nの各々には、QoS設定値として帯域が設定されている。
なお、実施形態によっては、各キュー102−1〜102−nに優先度、または帯域と優先度の組み合わせが設定されていてもよい。
(A3) In the present embodiment, each of the queues 102-1 to 102-n in the queue group 102 has a bandwidth set as a QoS setting value.
Depending on the embodiment, priority or a combination of bandwidth and priority may be set for each of the queues 102-1 to 102-n.

(a4)本実施形態では、パケット送信制御装置1が備える不図示の入力指示部(例えばボタンや操作パネルなど)を介して、QoS制御の動作モードが、予め「絶対時刻」モードまたは「相対時刻」モードのいずれか一方に設定されている。そして、動作モードの設定値は、図3の時刻指定フラグFに保持される。   (A4) In this embodiment, the QoS control operation mode is set in advance to the “absolute time” mode or “relative time” via an input instruction unit (not shown) provided in the packet transmission control device 1 (for example, a button or an operation panel). ”Mode is set. The set value of the operation mode is held in the time designation flag F in FIG.

なお、このように動作モードが選択可能ではなく、いずれか一方の動作モードに固定されている実施形態も可能である。
以上のように仮定(a1)〜(a4)を設けたうえで、続いて、パケット送信制御装置1の動作の詳細を説明する。
Note that an embodiment in which the operation mode is not selectable in this way and is fixed to one of the operation modes is also possible.
After providing the assumptions (a1) to (a4) as described above, the details of the operation of the packet transmission control device 1 will be described.

図6は、スケジューラ部103によるスケジューリング処理を説明するフローチャートである。スケジューリング処理は、タイマ割り込み等により一定間隔Δτで呼び出される。   FIG. 6 is a flowchart illustrating the scheduling process performed by the scheduler unit 103. The scheduling process is called at a constant interval Δτ by a timer interrupt or the like.

間隔Δτは、パケット送信制御装置1の仕様に応じて適宜決めることができ、例えば10ms程度でもよい。なお、間隔Δτは、図6の一連の処理が時間Δτの間に終わるように決められる。   The interval Δτ can be appropriately determined according to the specifications of the packet transmission control apparatus 1, and may be about 10 ms, for example. The interval Δτ is determined so that the series of processes in FIG. 6 ends during the time Δτ.

スケジューリング処理が呼び出されると、ステップS101でスケジューラ部103は、図3の時刻指定フラグFを参照する。そして、スケジューラ部103は、バッファ格納処理部210を介して、バッファ部220内の図4のレジスタRに、時刻指定フラグFの値をコピーする。 When the scheduling process is called, the scheduler unit 103 refers to the time designation flag F in FIG. 3 in step S101. Then, the scheduler unit 103 copies the value of the time designation flag F to the register R 2 in FIG. 4 in the buffer unit 220 via the buffer storage processing unit 210.

仮定(a4)より、時刻指定フラグFには「絶対時刻」または「相対時刻」のいずれかを示す値が保持されている。時刻指定フラグFが「相対時刻」を示すとき、処理はステップS102に移行し、時刻指定フラグFが「絶対時刻」を示すとき、処理はステップS103に移行する。   From the assumption (a4), the time designation flag F holds a value indicating either “absolute time” or “relative time”. When the time designation flag F indicates “relative time”, the process proceeds to step S102, and when the time designation flag F indicates “absolute time”, the process proceeds to step S103.

ステップS102でスケジューラ部103は、ハードウェア制御部200に、相対時刻のカウント開始を指示する。指示を受けたときのハードウェア制御部200の動作は、図7とともに後述する。ステップS102の実行後、処理はステップS103に移行する。   In step S102, the scheduler unit 103 instructs the hardware control unit 200 to start counting relative time. The operation of the hardware control unit 200 when receiving the instruction will be described later with reference to FIG. After execution of step S102, the process proceeds to step S103.

ステップS103でスケジューラ部103は初期設定を行う。具体的には、スケジューラ部103は、デキュー対象すなわちスケジューリング対象のキューとして1番目のキュー102−1を指定する。   In step S103, the scheduler unit 103 performs initial setting. Specifically, the scheduler unit 103 designates the first queue 102-1 as a dequeue target, that is, a scheduling target queue.

次にステップS104でスケジューラ部103は、デキュー対象のキューにパケットがあるか否かを確認する。デキュー対象のキューにパケットがあれば、処理はステップS105に移行する。デキュー対象のキューにパケットがなければ、現在のデキュー対象のキューに関するスケジューリング処理が終了し、処理はステップS108に移行する。以下では説明の便宜上、デキュー対象のキューがキュー102−h(1≦h≦n)であるとする。   In step S104, the scheduler unit 103 confirms whether there is a packet in the queue to be dequeued. If there is a packet in the queue to be dequeued, the process proceeds to step S105. If there is no packet in the queue to be dequeued, the scheduling process for the current queue to be dequeued ends, and the process proceeds to step S108. Hereinafter, for convenience of explanation, it is assumed that the queue to be dequeued is the queue 102-h (1 ≦ h ≦ n).

なお、キュー102−hにパケットがあるか否かは、例えばキュー102−hの実装に用いられるポインタの値により判断することが可能である。
例えば、本実施形態では、次のような実装を採用することができる。すなわち、送信先ポートがポート306−jと判断されたパケットが、ソフトウェア制御部100に入力されると、パケット種別識別部101が図3のパケットバッファ106上に領域を確保し、確保した領域にパケットを格納する。そして、パケット種別識別部101は、パケットの種別を判定して、どのキューにパケットをエンキューするかを決定する。例えば、パケット種別識別部101は、当該パケットをキュー102−hにエンキューすると決定する。
Note that whether or not there is a packet in the queue 102-h can be determined by, for example, the value of a pointer used for mounting the queue 102-h.
For example, in the present embodiment, the following implementation can be employed. That is, when a packet whose destination port is determined to be port 306-j is input to the software control unit 100, the packet type identification unit 101 secures an area on the packet buffer 106 in FIG. Store the packet. Then, the packet type identification unit 101 determines the type of packet and determines in which queue the packet is enqueued. For example, the packet type identification unit 101 determines to enqueue the packet in the queue 102-h.

ここで、各キュー102−1〜102−nは、単純なFIFOキューであり、パケットバッファ106内の個々のパケットを指すポインタの配列、あるいはそのようなポインタを含むノードによる線形リストとして、メモリ領域104に実装することができる。説明の便宜上、仮に線形リストにより各キュー102−1〜102−nが実装されており、送信パケットリスト105と同様に先頭にはダミーノードがあるとする。   Here, each of the queues 102-1 to 102-n is a simple FIFO queue, which is a memory area as an array of pointers pointing to individual packets in the packet buffer 106, or as a linear list by nodes including such pointers. 104 can be implemented. For convenience of explanation, it is assumed that each of the queues 102-1 to 102-n is implemented by a linear list, and a dummy node is at the head like the transmission packet list 105.

この場合、パケット種別識別部101は、キュー102−hの線形リストの末尾に新たなノードを追加し、追加したノードのポインタが、パケットバッファ106に新たに格納したパケットを指すように設定する。その結果、FIFOキューへのエンキュー操作が実現される。上記の実装例では、ステップS104でスケジューラ部103は、「デキュー対象のキュー102−hを実装する線形リストの先頭のダミーノードのポインタがヌルポインタならば、キュー102−hにはパケットがない」と判断することができる。   In this case, the packet type identification unit 101 adds a new node to the end of the linear list of the queue 102-h and sets the pointer of the added node to point to the packet newly stored in the packet buffer 106. As a result, an enqueue operation to the FIFO queue is realized. In the above implementation example, in step S104, the scheduler unit 103 causes the queue 102-h to have no packet if the pointer of the first dummy node in the linear list that implements the queue 102-h to be dequeued is a null pointer. It can be judged.

もちろん、以上の説明は例示にすぎず、キュー102−1〜102−nの実装方法や、デキュー対象のキュー102−hにパケットがあるか否かの具体的な判断方法は任意である。   Of course, the above description is merely an example, and a method for mounting the queues 102-1 to 102-n and a specific method for determining whether or not there is a packet in the queue 102-h to be dequeued are arbitrary.

ステップS105は、デキュー対象のキュー102−hにパケットがあると確認された場合に実行される。ステップS105でスケジューラ部103は、キュー102−hに設定されている帯域にしたがい、キュー102−hの先頭のパケットの送信予定時刻を計算する。送信予定時刻を計算するアルゴリズムは実施形態に応じて任意だが、例えば、トラフィック・シェーピング・アルゴリズムの1つであるリーキ・バケット(leaky bucket)アルゴリズムが利用されてもよい。   Step S105 is executed when it is confirmed that there is a packet in the queue 102-h to be dequeued. In step S105, the scheduler unit 103 calculates the scheduled transmission time of the first packet in the queue 102-h according to the bandwidth set in the queue 102-h. Although the algorithm for calculating the scheduled transmission time is arbitrary depending on the embodiment, for example, a leaky bucket algorithm, which is one of traffic shaping algorithms, may be used.

例えば、リーキ・バケット・アルゴリズムにおけるバケツの深さをCDV(Cell Delay Variation)と表すことにすると、CDVはバーストしてよいパケット長を表す。また、バケツの穴の大きさが転送レートに対応する。ここで、デキュー対象のキュー102−hに設定されている帯域をB[bps]と表し、スケジューリング間隔を上記のとおりΔτ[s]と表す。すると、1回のスケジューリング処理においてキュー102−hからデキューされるパケットの量は、トラフィック・シェーピングの結果として式(1)のA[byte]に制限される。 For example, if the bucket depth in the leaky bucket algorithm is expressed as CDV (Cell Delay Variation), CDV represents a packet length that may be burst. Also, the size of the bucket hole corresponds to the transfer rate. Here, the bandwidth set in the queue 102-h to be dequeued is represented as B h [bps], and the scheduling interval is represented as Δτ [s] as described above. Then, the amount of packets dequeued from the queue 102-h in one scheduling process is limited to A h [byte] in Expression (1) as a result of traffic shaping.

=B×Δτ÷8 (1)
ここで、キュー102−hに関してステップS105がf回目(f≧1)に実行されたときにキュー102−hの先頭にあるパケットの長さをLとする。スケジューラ部103は、時刻指定フラグFの値に応じて、例えば以下の例示のように送信予定時刻を計算してもよい。
A h = B h × Δτ ÷ 8 (1)
Here, let L f be the length of the packet at the head of the queue 102-h when step S105 is executed f-th (f ≧ 1) for the queue 102-h. The scheduler unit 103 may calculate the scheduled transmission time according to the value of the time designation flag F, for example, as illustrated below.

(b1)時刻指定フラグFが「相対時刻」を示す場合
キュー102−hに関してステップS105がg回目(g≧1)に実行される場合、スケジューラ部103は、例えば次の式(2)で表される送信予定時刻ThgをステップS105で計算してもよい。式(2)で表される送信予定時刻Thgは、後述の図11のステップS503で初期化されてゼロとして表される基準時刻に対する、相対時刻である。
(B1) When the time designation flag F indicates “relative time” When step S105 is executed for the queue 102-h for the g-th time (g ≧ 1), the scheduler unit 103 is expressed by the following equation (2), for example. The scheduled transmission time T hg may be calculated in step S105. The scheduled transmission time T hg represented by the expression (2) is a relative time with respect to the reference time that is initialized in step S503 in FIG.

Figure 2011024027
(b2)時刻指定フラグFが「絶対時刻」を示す場合
キュー102−hに関してステップS105がg回目(g≧1)に実行される場合、スケジューラ部103は、例えば次の式(3)で表される送信予定時刻ThgをステップS105で計算してもよい。
Figure 2011024027
(B2) When the time designation flag F indicates “absolute time” When step S105 is executed for the queue 102-h for the g-th time (g ≧ 1), the scheduler unit 103 is expressed by the following equation (3), for example. The scheduled transmission time T hg may be calculated in step S105.

Figure 2011024027
なお、式(3)中の時刻τは、図6の処理が呼び出された時刻を示す。また、後述の理由から式(3)中のτmarginには、予め間隔Δτ以上の長さが設定されている。時刻指定フラグFが「絶対時刻」を示す場合、スケジューラ部103は、式(3)より、例えばg=1の場合にはステップS105においてThg=Th1=τ+τmarginと計算することができる。
Figure 2011024027
Note that the time τ 0 in the expression (3) indicates the time when the process of FIG. 6 is called. For reasons described later, the length of τ margin in the equation (3) is set in advance to a length greater than the interval Δτ. When the time designation flag F indicates “absolute time”, the scheduler unit 103 can calculate from formula (3) as T hg = T h1 = τ 0 + τ margin in step S105 when g = 1, for example. it can.

続いてステップS106でスケジューラ部103は、ステップS105で計算した送信予定時刻Thgが送信対象の時刻であるか否かを判断する。
ステップS106において、「あるパケットQhgの送信予定時刻Thgが送信対象の時刻である」とは、「パケットQhgは、今回の図6のスケジューリング処理においてハードウェア制御部200へ送信を依頼する対象である」という意味である。換言すれば、「パケットQhgの送信予定時刻Thgが送信対象の時刻ではない」とは、「送信予定時刻Thgは遅いので、パケットQhgに関しては、次に図6のスケジューリング処理が呼び出されたときに送信予定時刻を計算しなおせばよい」という意味である。
Subsequently, in step S106, the scheduler unit 103 determines whether the scheduled transmission time T hg calculated in step S105 is a transmission target time.
In step S106, the "scheduled transmission time T hg of a packet Q hg is the time of transmission target", "packet Q hg requests the transmission to the hardware control unit 200 in the scheduling process of this FIG. 6 It means "It is a target." In other words, the "scheduled transmission time T hg packet Q hg is not the time to be transmitted", the "scheduled transmission time T hg is slow, for packet Q hg, then scheduling process of FIG. 6 is called This means that it is only necessary to recalculate the scheduled transmission time.

そのため、ステップS106での判断は、図6のスケジューリング処理が呼び出される割り込み間隔Δτに依存する。なお、CPU301上で動作するOS(Operating System)の割り込み間隔の最小単位が例えば10msの場合、間隔Δτ=10[ms]でもよい。   Therefore, the determination in step S106 depends on the interrupt interval Δτ at which the scheduling process of FIG. 6 is called. If the minimum unit of the interrupt interval of the OS (Operating System) operating on the CPU 301 is 10 ms, for example, the interval Δτ = 10 [ms] may be used.

具体的には、時刻指定フラグFの値に応じて、スケジューラ部103は、例えば次のように判断してもよい。
(c1)時刻指定フラグFが「相対時刻」を示す場合
この場合、スケジューラ部103は、「送信予定時刻Thgが式(4)を満たすときのみ、送信予定時刻Thgは送信対象の時刻である」と判断してもよい。
Specifically, depending on the value of the time designation flag F, the scheduler unit 103 may make a determination as follows, for example.
(C1) In this case when the time specified flag F indicates "relative time", the scheduler unit 103, only when the "scheduled transmission time T hg satisfies Equation (4), scheduled transmission time T hg in time to be transmitted It may be determined that there is.

hg<Δτ (4)
(c2)時刻指定フラグFが「絶対時刻」を示す場合
この場合、スケジューラ部103は、「送信予定時刻Thgが式(5)を満たすときのみ、送信予定時刻Thgは送信対象の時刻である」と判断してもよい。
T hg <Δτ (4)
(C2) in this case when the time specified flag F indicates "absolute time", the scheduler unit 103, only when the "scheduled transmission time T hg satisfies the formula (5), scheduled transmission time T hg in time to be transmitted It may be determined that there is.

hg<τ+τmargin+Δτ (5)
例えば上記の式(4)または(5)に基づいて、スケジューラ部103が「送信予定時刻Thgが送信対象の時刻である」と判断すると、キュー102−hについての処理を続行するため、処理はステップS107に移行する。逆に、スケジューラ部103が「送信予定時刻Thgが送信対象の時刻ではない」と判断すると、現在のデキュー対象のキュー102−hに関する処理を完了させるため、処理はステップS108に移行する。
T hg0 + τ margin + Δτ (5)
For example, if the scheduler unit 103 determines that “the scheduled transmission time T hg is the time to be transmitted” based on the above formula (4) or (5), the process for the queue 102-h is continued. Moves to step S107. Conversely, when the scheduler unit 103 determines that “the scheduled transmission time T hg is not the transmission target time”, the process proceeds to step S108 in order to complete the processing related to the current dequeue target queue 102-h.

ステップS107でスケジューラ部103は、現在のデキュー対象のキュー102−hの先頭のパケットをキュー102−hからデキューする。そして、スケジューラ部103は、デキューしたパケットと、ステップS105で計算した送信予定時刻Thgを表す時刻情報とを、スケジューラ部103内部に保持する。そして処理はステップS104に戻る。 In step S107, the scheduler unit 103 dequeues the head packet of the current dequeue target queue 102-h from the queue 102-h. Then, the scheduler unit 103 holds the dequeued packet and the time information indicating the scheduled transmission time T hg calculated in step S105 in the scheduler unit 103. Then, the process returns to step S104.

なお、ステップS104〜S107の繰り返しにより、ステップS107が2回目以降に実行される場合、スケジューラ部103は既に、送信予定のパケットと時刻情報の組を1組以上、既に保持している。よって、この場合は、ステップS107でスケジューラ部103は、既に保持している内容に加えて、新たにデキューしたパケットとその送信予定時刻を示す時刻情報を保持することになる。   When step S107 is executed for the second and subsequent times by repeating steps S104 to S107, the scheduler unit 103 already holds one or more pairs of packets and time information that are scheduled to be transmitted. Therefore, in this case, in step S107, the scheduler unit 103 holds time information indicating the newly dequeued packet and its scheduled transmission time in addition to the contents already held.

なお、ステップS107は、具体的には、図3の送信パケットリスト105のノードを増やす操作であり、詳述すれば以下のとおりである。
ステップS107でスケジューラ部103は、送信パケットリスト105の末尾に新たなノードを追加する。なお、スケジューラ部103の内部データである送信パケットリスト105は、ステップS103または後述のステップS110でスケジューラ部103がデキュー対象のキューをキュー102−hに決定するごとに、初期化される。送信パケットリスト105は、初期状態において、ヌルポインタを有するダミーノードLのみを持つ。
Note that step S107 is specifically an operation for increasing the number of nodes in the transmission packet list 105 of FIG. 3, and will be described in detail as follows.
In step S <b> 107, the scheduler unit 103 adds a new node to the end of the transmission packet list 105. The transmission packet list 105, which is internal data of the scheduler unit 103, is initialized every time the scheduler unit 103 determines the queue to be dequeued as the queue 102-h in step S103 or step S110 described later. The transmission packet list 105 has only a dummy node L 0 having a null pointer in the initial state.

ここで、前述のようにキュー102−hは、パケットバッファ106中のパケットを指すポインタを使って実装されている。例えば、ステップS107において注目しているキュー102−hの先頭のパケットとは、パケットバッファ106中のいずれかの領域に格納されているパケットQjhgである。そして、キュー102−hの実装に使われている線形リスト(不図示)の、ダミーノードを除いて先頭のノードのポインタが、このパケットバッファ106内のパケットQjhgを指している。 Here, as described above, the queue 102-h is mounted using a pointer that points to a packet in the packet buffer 106. For example, the leading packet of the queue 102-h that is focused in step S 107 is the packet Q jhg stored in any area in the packet buffer 106. The pointer of the head node of the linear list (not shown) used to implement the queue 102-h, excluding the dummy node, points to the packet Q jhg in the packet buffer 106.

例えば、ステップS107においてスケジューラ部103は、パケットQjhgを指すポインタの値を、送信パケットリスト105に新たに追加した末尾のノードが持つポインタにコピーする。また、スケジューラ部103は、キュー102−hの実装に使われている線形リストの、ダミーノードを除いて先頭のノードを削除する。その結果として、パケットQjhgの実体はパケットバッファ106中で何ら変化することなく、キュー102−hからのパケットQjhgのデキューと、送信パケットリスト105へのパケットQjhgの追加が実現される。 For example, in step S <b> 107, the scheduler unit 103 copies the value of the pointer indicating the packet Q jhg to the pointer of the last node newly added to the transmission packet list 105. In addition, the scheduler unit 103 deletes the first node of the linear list used for mounting the queue 102-h, excluding the dummy nodes. As a result, the substance of the packet Q jhg does not change in the packet buffer 106, and the packet Q jhg is dequeued from the queue 102-h and the packet Q jhg is added to the transmission packet list 105.

もちろん、実施形態に応じて、上記に例示した線形リストとは異なる実装によりステップS107の操作が実現されてもよい。
なお、ステップS107においてスケジューラ部103はさらに、ステップS105で計算した送信予定時刻Thgを示す時刻情報を、新たに送信パケットリスト105に追加した末尾のノードに格納する。そして、現在のデキュー対象であるキュー102−hに関するスケジューリング処理を続行するため、処理はステップS104に戻る。
Of course, depending on the embodiment, the operation of step S107 may be realized by implementation different from the linear list exemplified above.
In step S107, the scheduler unit 103 further stores time information indicating the scheduled transmission time T hg calculated in step S105 in the last node added to the transmission packet list 105. And in order to continue the scheduling process regarding the queue 102-h that is the current dequeue target, the process returns to step S104.

なお、このようにしてステップS104〜S107の処理をスケジューラ部103が繰り返す理由は、次のとおりである。すなわち、今回の割り込みにより開始した図6の処理でキュー102−hからデキューする対象の全パケットを、後述のステップS109でまとめてハードウェア制御部200へとデキューして、一括してハードウェア制御部200に送信を依頼するためである。   The reason why the scheduler unit 103 repeats the processes in steps S104 to S107 in this way is as follows. That is, all the packets to be dequeued from the queue 102-h in the process of FIG. 6 started by the current interruption are collectively dequeued to the hardware control unit 200 in step S109 described later, and the hardware control is performed collectively. This is for requesting the transmission to the unit 200.

他方で、デキュー対象のキュー102−hにパケットが存在しないとステップS104で判断された場合、または計算した送信予定時刻が今回のスケジューリング処理では送信対象の時刻に当たらないとS106で判断された場合、ステップS108が実行される。つまり、ステップS108が実行されるのは、現在のデキュー対象のキュー102−hに関するスケジューリング処理を完了する条件が整った場合である。   On the other hand, if it is determined in step S104 that there is no packet in the queue 102-h to be dequeued, or if it is determined in S106 that the calculated scheduled transmission time does not correspond to the transmission target time in the current scheduling process Step S108 is executed. That is, step S108 is executed when a condition for completing the scheduling process related to the current dequeue target queue 102-h is satisfied.

よって、ステップS108においてスケジューラ部103は、デキュー対象のキュー102−hに対応して保持している図3の送信パケットリスト105を参照し、送信対象のパケットをスケジューラ部103自身の内部で保持しているか否かを判断する。   Therefore, in step S108, the scheduler unit 103 refers to the transmission packet list 105 of FIG. 3 held corresponding to the dequeue target queue 102-h, and holds the transmission target packet inside the scheduler unit 103 itself. Judge whether or not.

具体的には、送信パケットリスト105の先頭のダミーノードLのポインタがヌルポインタであれば、スケジューラ部103は送信対象のパケットを保持していないので、処理はステップS110に移行する。逆に、ダミーノードLのポインタがヌルポインタではなく、ノードLを指していれば、スケジューラ部103は送信対象のパケットを少なくとも1つは保持しているので、処理はステップS109に移行する。 Specifically, the pointer of the head of the dummy node L 0 of the transmission packet list 105 if the null pointer, the scheduler unit 103 does not hold the packet to be transmitted, the process proceeds to step S110. On the contrary, if the pointer of the dummy node L 0 is not the null pointer but points to the node L 1 , the scheduler unit 103 holds at least one packet to be transmitted, and the process proceeds to step S 109. .

ステップS109でスケジューラ部103は、自身の内部に送信対象として保持しているパケット群(すなわち1つ以上のパケット)のすべてについて、一括してハードウェア制御部200に送信を依頼する。具体的には、スケジューラ部103は、送信パケットリスト105のダミーノードLのアドレスを、送信パケットリスト先頭ポインタとして図3のレジスタRに書き込むことで、パケットの送信を依頼する。 In step S <b> 109, the scheduler unit 103 requests the hardware control unit 200 to transmit all the packet groups (that is, one or more packets) held as a transmission target in itself. Specifically, the scheduler unit 103, the address of the dummy node L 0 of the transmitted packet list 105, by writing to the register R 1 in FIG. 3 as a transmission packet list head pointer, a request for transmission of a packet.

なお、ハードウェア制御部200は、レジスタRへの値の書き込みを検出することで、パケットの送信が依頼されたと認識し、後述の図9の処理を開始する。
このように、本実施形態ではスケジューラ部103がバッファ格納処理部210内のレジスタ領域212にアクセス可能であり、かつ後述するとおりバッファ格納処理部210はソフトウェア制御部100内のメモリ領域104にアクセス可能である。換言すれば、CPU301はMACチップ304−j内のレジスタ領域212にアクセス可能であり、MACチップ304−jはメモリユニット302内のRAMにアクセス可能である。
The hardware control unit 200, by detecting the writing of a value to the register R 1, recognizes that the transmission of the packet is requested, to start the process of FIG. 9 described later.
Thus, in this embodiment, the scheduler unit 103 can access the register area 212 in the buffer storage processing unit 210, and the buffer storage processing unit 210 can access the memory area 104 in the software control unit 100 as described later. It is. In other words, the CPU 301 can access the register area 212 in the MAC chip 304-j, and the MAC chip 304-j can access the RAM in the memory unit 302.

以上のようにしてステップS109が実行されると、処理はステップS110に移行する。
ステップS110でスケジューラ部103は、スケジューリング処理の対象すなわちデキュー対象のキューとして、次のキュー102−(h+1)を選択する。つまり、スケジューラ部103は注目するキュー番号を1インクリメントする。
When step S109 is executed as described above, the process proceeds to step S110.
In step S110, the scheduler unit 103 selects the next queue 102- (h + 1) as a scheduling process target, that is, a dequeue target queue. That is, the scheduler unit 103 increments the target queue number by 1.

そして、ステップS111でスケジューラ部103は、ステップS110で更新されたキュー番号(h+1)が、キュー群102のキューの本数nを超えているか否かを判断する。   In step S111, the scheduler unit 103 determines whether the queue number (h + 1) updated in step S110 exceeds the number n of queues in the queue group 102.

もし、n≧h+1であれば、未処理のキュー102−(h+1)がキュー群102内に残っているので、処理はステップS104に戻る。他方、n<h+1であれば、キュー群102のすべてのキュー102−1〜102−nについてスケジューリング処理が完了しているので、処理はステップS112へ移行する。   If n ≧ h + 1, the unprocessed queue 102- (h + 1) remains in the queue group 102, and the process returns to step S104. On the other hand, if n <h + 1, since the scheduling process has been completed for all the queues 102-1 to 102-n of the queue group 102, the process proceeds to step S112.

ステップS112でスケジューラ部103は、図3の時刻指定フラグFを参照する。時刻指定フラグFが「相対時刻」を示すとき、処理はステップS113に移行し、時刻指定フラグFが「絶対時刻」を示すとき、図6の処理は終了する。   In step S112, the scheduler unit 103 refers to the time designation flag F in FIG. When the time designation flag F indicates “relative time”, the process proceeds to step S113. When the time designation flag F indicates “absolute time”, the process in FIG. 6 ends.

ステップS113でスケジューラ部103は、ハードウェア制御部200に送信開始を指示する。具体的には、スケジューラ部103は、図8の処理を行うようハードウェア制御部200に指示し、図6の処理を終了する。   In step S113, the scheduler unit 103 instructs the hardware control unit 200 to start transmission. Specifically, the scheduler unit 103 instructs the hardware control unit 200 to perform the process of FIG. 8, and ends the process of FIG.

続いて、図7〜図9を参照して、バッファ格納処理部210の動作を説明する。上記の図6に関する説明のとおり、バッファ格納処理部210に対して、スケジューラ部103は以下の3種類の指示を出す。   Next, the operation of the buffer storage processing unit 210 will be described with reference to FIGS. As described above with reference to FIG. 6, the scheduler unit 103 issues the following three types of instructions to the buffer storage processing unit 210.

(d1)パケット送信制御装置1が相対時刻モードで動作している場合のステップS102における相対時刻のカウント開始の指示
(d2)パケット送信制御装置1が相対時刻モードで動作している場合のステップS113における送信開始の指示
(d3)ステップS109での1つ以上のパケットについての送信の指示
すなわち、パケット送信制御装置1が絶対時刻モードで動作している場合、1回のスケジューリング処理ごとに、ハードウェア制御部200はスケジューラ部103から、(d3)の指示をU回受け取る。ここで、Uはキュー群102のうち、今回のスケジューリング処理における送信対象のパケットを有するキューの数であり、0≦U≦nである。また、パケット送信制御装置1が相対時刻モードで動作している場合、1回のスケジューリング処理ごとに、ハードウェア制御部200はスケジューラ部103から、(d1)の指示を1回受け、(d3)の指示をU回受け、(d2)の指示を1回受ける。
(D1) Relative time count start instruction in step S102 when the packet transmission control device 1 is operating in the relative time mode (d2) Step S113 when the packet transmission control device 1 is operating in the relative time mode (D3) Transmission instruction for one or more packets in step S109 In other words, when the packet transmission control device 1 is operating in the absolute time mode, the hardware for each scheduling process The control unit 200 receives the instruction (d3) U times from the scheduler unit 103. Here, U is the number of queues that have packets to be transmitted in the current scheduling process in the queue group 102, and 0 ≦ U ≦ n. When the packet transmission control device 1 is operating in the relative time mode, the hardware control unit 200 receives the instruction (d1) from the scheduler unit 103 once for each scheduling process, and (d3) Is received U times and (d2) is received once.

以下では、ハードウェア制御部200が(d1)、(d2)、(d3)の指示を受けたことを契機として行う動作について、それぞれ図7、図8、図9を参照して説明する。
図7は、バッファ格納処理部210による相対時刻カウント開始処理を説明するフローチャートである。
Hereinafter, operations performed when the hardware control unit 200 receives the instructions (d1), (d2), and (d3) will be described with reference to FIGS. 7, 8, and 9, respectively.
FIG. 7 is a flowchart for explaining the relative time count start processing by the buffer storage processing unit 210.

ステップS201でバッファ格納処理部210は、図4に示すようにバッファ部220がレジスタRに記憶している送信開始指示の値を上書きして、「停止」を示す値を設定する。 Buffer storing process section 210 in step S201 is to overwrite the value of the transmission start instruction buffer unit 220 as shown in FIG. 4 is stored in the register R 6, is set to indicate the "STOP".

そして、ステップS202でバッファ格納処理部210は、バッファ部220のメモリ領域223に実装されているキューの最後の位置を獲得する。図7の説明における「最後の位置」とは、次にパケットをエンキューする位置であり、図4のレジスタRに記憶されるエンキュー位置により表される。そして、バッファ格納処理部210は、レジスタRから読み取って獲得したエンキュー位置の値を、バッファ探索開始位置としてレジスタRにコピーして設定する。 In step S202, the buffer storage processing unit 210 acquires the last position of the queue mounted in the memory area 223 of the buffer unit 220. The “last position” in the description of FIG. 7 is a position where the packet is enqueued next, and is represented by an enqueue position stored in the register R 4 of FIG. The buffer storage unit 210, the value of enqueue position acquired by reading from the register R 4, sets copy the register R 3 as a buffer search starting position.

なお、以上のステップS201とS202の動作によって相対時刻のカウントが開始される理由は、図11とあわせて後述する。
図8は、バッファ格納処理部210による送信開始指示処理を説明するフローチャートである。
The reason why the relative time is started by the operations in steps S201 and S202 will be described later in conjunction with FIG.
FIG. 8 is a flowchart for explaining the transmission start instruction process by the buffer storage processing unit 210.

ステップS301でバッファ格納処理部210は、バッファ部220が図4のレジスタRに記憶している送信開始指示の値を上書きして、「送信」を示す値を設定し、図8の処理を終了する。 Buffer storing process section 210 in step S301 is to overwrite the value of the transmission start instruction buffer unit 220 are stored in the register R 6 in FIG. 4, it sets the value indicating the "transmission", the process in FIG. 8 finish.

図9は、バッファ格納処理部210によるパケット送信依頼処理を説明するフローチャートである。また、図10は、パケット送信依頼処理によるバッファ部220の状態遷移の例を説明する図である。   FIG. 9 is a flowchart for explaining packet transmission request processing by the buffer storage processing unit 210. FIG. 10 is a diagram for explaining an example of the state transition of the buffer unit 220 by the packet transmission request process.

ステップS401でバッファ格納処理部210の制御回路211は、図4のレジスタRに記憶されている時刻指定フラグの値を参照する。そして、時刻指定フラグが相対時刻を表していれば、処理はステップS402に移行し、時刻指定フラグが絶対時刻を表していれば、処理はステップS403に移行する。なお、図6のステップS101に関して説明したとおり、時刻指定フラグには相対時刻または絶対時刻のいずれかを示す値が既に設定されている。 Step S401 the control circuit 211 of the buffer storing process section 210 refers to the value of the time designation flag stored in the register R 2 in FIG. If the time designation flag represents a relative time, the process proceeds to step S402. If the time designation flag represents an absolute time, the process proceeds to step S403. Note that, as described with reference to step S101 in FIG. 6, a value indicating either relative time or absolute time has already been set in the time designation flag.

ステップS402で制御回路211は、バッファ部220のレジスタRに格納されているバッファ探索開始位置の値を獲得する。そして、制御回路211は、獲得した値を、レジスタRにバッファ部ポインタとして書き込み、保持する。バッファ部ポインタは、バッファ格納処理部210がバッファ部220にパケットをエンキューする位置を検索するために利用するポインタであり、バッファ格納処理部210が現在検索している位置を表す。 Step S402 in the control circuit 211 obtains the value of the buffer search start position stored in the register R 3 of the buffer unit 220. Then, the control circuit 211, the acquired value, the write as buffer pointer in register R 5, holds. The buffer unit pointer is a pointer used by the buffer storage processing unit 210 to search for a position where the packet is enqueued in the buffer unit 220, and represents a position where the buffer storage processing unit 210 is currently searching.

なお、バッファ探索開始位置の値は、図6のステップS102を契機として呼び出される図7の処理のステップS202において設定済みである。ステップS402の実行直後では、バッファ探索開始位置は、所定間隔Δτで繰り返される図6のスケジューリング処理のうちの今回のスケジューリング処理が開始された時点で、バッファ部220にエンキュー済みの最後のエントリの次のエントリを示す。   Note that the value of the buffer search start position has already been set in step S202 of the process of FIG. 7 called in response to step S102 of FIG. Immediately after execution of step S402, the buffer search start position is the next of the last entry enqueued in the buffer unit 220 at the time when the current scheduling process of the scheduling process of FIG. 6 repeated at a predetermined interval Δτ is started. Indicates an entry.

図10(A)は、ステップS402の実行後のバッファ部220を、バッファ部ポインタを示す矢印とともに表している。
ステップS402の実行時には、前回のスケジューリング処理の結果としてエンキューされたエントリが1個以上バッファ部220に残っている可能性もあるし、1個も残っていない可能性もある。したがって、図10(A)において0≦eである。説明の便宜上、前回のスケジューリング処理の結果としてエンキューされた、各々パケットPと時刻情報T(1≦k≦e)を含むe個(0≦e)のエントリが、ステップS402の実行時にバッファ部220に残っているとする。すると、ステップS402の実行結果として、バッファ部ポインタは、(e+1)番目のエントリを指すように設定される。
FIG. 10A shows the buffer unit 220 after execution of step S402 together with an arrow indicating a buffer unit pointer.
At the time of execution of step S402, one or more entries enqueued as a result of the previous scheduling process may remain in the buffer unit 220, or none may remain. Therefore, 0 ≦ e in FIG. For convenience of explanation, e entries (0 ≦ e) each including a packet P k and time information T k (1 ≦ k ≦ e) enqueued as a result of the previous scheduling process are buffered when step S402 is executed. It is assumed that it remains in the part 220. Then, as an execution result of step S402, the buffer unit pointer is set to point to the (e + 1) th entry.

なお、バッファ部220のキュー内の個々のエントリには一意にパケットが対応するので、以下では「バッファ部ポインタが指すエントリ」のかわりに「バッファ部ポインタが指すパケット」のような表現をすることもある。   In addition, since a packet uniquely corresponds to each entry in the queue of the buffer unit 220, the expression "packet pointed to by the buffer unit pointer" is used instead of "entry pointed by the buffer unit pointer" below. There is also.

また、図6のスケジューリング処理の1回の実行につき、図6のステップS109は複数回実行される場合があり、図9の処理はステップS109の実行のたびに呼び出される。したがって、以下に説明する図9の処理から、下記(e1)と(e2)が成り立つ。   6 may be executed a plurality of times for each execution of the scheduling process of FIG. 6, and the process of FIG. 9 is called each time step S109 is executed. Therefore, the following (e1) and (e2) hold from the processing of FIG. 9 described below.

(e1)ある1回のスケジューリング処理に対応して図9の処理が初めて呼び出されたときのステップS402の実行時には、バッファ探索開始位置以降にはエントリが存在しない。よって、図10(A)において矢印で表されるバッファ部ポインタは、空のエントリを指す。   (E1) At the time of execution of step S402 when the process of FIG. 9 is called for the first time corresponding to a certain scheduling process, there is no entry after the buffer search start position. Therefore, the buffer unit pointer represented by an arrow in FIG. 10A indicates an empty entry.

(e2)ある1回のスケジューリング処理に対応して図9の処理が2回目以降に呼び出されたときのステップS402の実行時には、バッファ部220は、図9の処理が前回呼び出されたときにエンキューされたエントリをバッファ探索開始位置以降に有する。よって、図10(A)において矢印で表されるバッファ部ポインタが指すエントリは、空ではない。   (E2) At the time of execution of step S402 when the process of FIG. 9 is called for the second time or later in response to a certain scheduling process, the buffer unit 220 enqueues when the process of FIG. 9 is called last time. The registered entry is included after the buffer search start position. Therefore, the entry pointed to by the buffer pointer indicated by the arrow in FIG. 10A is not empty.

上記(e1)と(e2)のいずれの場合でも、時刻指定フラグが「相対時刻」を表す場合は、送信予定時刻の比較対象の範囲を示すため、上記のようにバッファ部ポインタにバッファ探索開始位置の値がコピーされる。   In both cases (e1) and (e2), when the time designation flag indicates “relative time”, the buffer search is started in the buffer section pointer as described above to indicate the comparison target range of the scheduled transmission time. The position value is copied.

他方、時刻指定フラグが「絶対時刻」を示す場合には、ステップS403で制御回路211が、バッファ部220からキューの先頭位置を獲得する。そして、制御回路211は、獲得した値を、図4のレジスタRにバッファ部ポインタとして書き込み、保持する。 On the other hand, when the time designation flag indicates “absolute time”, the control circuit 211 acquires the head position of the queue from the buffer unit 220 in step S403. Then, the control circuit 211, the acquired value, the write as buffer pointer in register R 5 in FIG. 4, hold.

図10(B)は、ステップS403の実行後のバッファ部220を、バッファ部ポインタを示す矢印とともに表している。なお、前回のスケジューリング処理の結果としてエンキューされたエントリが、ステップS403の実行時点でバッファ部220に残っているか否かとは関係なく、バッファ部ポインタは、図10(B)に示すとおり、バッファ部220の先頭のエントリを指すように設定される。   FIG. 10B shows the buffer unit 220 after execution of step S403 together with an arrow indicating a buffer unit pointer. Note that regardless of whether or not the entry enqueued as a result of the previous scheduling process remains in the buffer unit 220 at the time of execution of step S403, the buffer unit pointer is as shown in FIG. 220 is set to indicate the first entry.

そして、ステップS402またはS403においてバッファ部ポインタが設定されると、処理はステップS404に移行する。ステップS404で制御回路211は、送信予定の1つ以上のパケットを含むパケット群の先頭のパケットの時刻情報を獲得し、先頭のパケットの送信予定時刻を認識する。なお、上記パケット群は、換言すれば、図6のステップS109でスケジューラ部103がハードウェア制御部200に送信を依頼したパケット群である。   When the buffer unit pointer is set in step S402 or S403, the process proceeds to step S404. In step S404, the control circuit 211 obtains time information of the first packet of the packet group including one or more packets scheduled to be transmitted, and recognizes the scheduled transmission time of the first packet. In other words, the packet group is a packet group for which the scheduler unit 103 has requested the hardware control unit 200 to transmit in step S109 of FIG.

具体的には、スケジューラ部103が図3の送信パケットリスト105を使って管理しているパケット群のうち、ダミーノードLを除く先頭のノードLが保持している時刻情報を、制御回路211がステップS404で獲得する。以下では、ステップS404で獲得された時刻情報が表す送信予定時刻を便宜的に「送信パケット時刻」という。なお、ステップS404の前提として、図3においてバッファ格納処理部210の制御回路211は、スケジューラ部103が利用するメモリ領域104を参照することができるようになっている。 Specifically, the time information held in the leading node L 1 excluding the dummy node L 0 in the packet group managed by the scheduler unit 103 using the transmission packet list 105 in FIG. 211 obtains in step S404. Hereinafter, the scheduled transmission time represented by the time information acquired in step S404 is referred to as “transmission packet time” for convenience. As a premise of step S404, in FIG. 3, the control circuit 211 of the buffer storage processing unit 210 can refer to the memory area 104 used by the scheduler unit 103.

続いて、ステップS405で制御回路211は、レジスタRに格納されているバッファ部ポインタが指すパケットの時刻情報を時刻情報格納部222から獲得し、獲得した時刻情報が表す送信予定時刻を認識する。以下では、認識された送信予定時刻を便宜的に「バッファ部時刻」という。 Subsequently, the control circuit 211 at step S405, recognizes the scheduled transmission time to acquire the time information of the packet pointed buffer pointer stored in the register R 5 from the time information storage unit 222, represents acquired time information . Hereinafter, the recognized scheduled transmission time is referred to as “buffer section time” for convenience.

そして、ステップS406で制御回路211は、送信パケット時刻とバッファ部時刻を比較する。送信パケット時刻よりもバッファ部時刻の方が早ければ、処理はステップS407に移行する。両者が同時刻か、または送信パケット時刻よりもバッファ部時刻の方が遅ければ、処理はステップS410に移行する。   In step S406, the control circuit 211 compares the transmission packet time with the buffer unit time. If the buffer section time is earlier than the transmission packet time, the process proceeds to step S407. If both are the same time or the buffer time is later than the transmission packet time, the process proceeds to step S410.

ステップS407で制御回路211は、レジスタRに格納されているバッファ部ポインタを、バッファ部220における次のパケットを指すように変更する。
そしてステップS408で制御回路211は、ステップS407で変更したバッファ部ポインタが指す位置にパケットがあるか否かを判断する。
Step S407 in the control circuit 211, a buffer unit pointer stored in the register R 5, is modified to point to the next packet in the buffer unit 220.
In step S408, the control circuit 211 determines whether there is a packet at the position indicated by the buffer unit pointer changed in step S407.

ステップS408で「変更後のバッファ部ポインタが指す位置にパケットがある」と判断されるのは、まだステップS406の比較の対象となっていないパケットがバッファ部220のパケット格納部221内に存在する場合である。したがって、次のパケットについて比較を行うために、処理はステップS405に戻る。   In step S408, it is determined that “there is a packet at the position pointed to by the changed buffer unit pointer” because there is a packet in the packet storage unit 221 of the buffer unit 220 that has not yet been compared in step S406. Is the case. Therefore, the process returns to step S405 to compare the next packet.

図10(C)は、ステップS407でのバッファ部ポインタの変更の後、ステップS408で「変更後のバッファ部ポインタが指す位置にパケットがある」と判断される場合の例を示す。すなわち、図10(C)に示すように、ステップS407の処理の実行前にバッファ部ポインタが指すエントリがパケットPと時刻情報Tを含むとすると、ステップS407によりバッファ部ポインタは次のエントリを指すように変更される。そして、図10(C)のように、変更後のバッファ部ポインタが指すエントリが、空ではなくパケットPj+1と時刻情報Tj+1を有する場合、処理はステップS408からステップS405に戻る。 FIG. 10C shows an example in which, after the buffer unit pointer is changed in step S407, it is determined in step S408 that “there is a packet at the position pointed to by the changed buffer unit pointer”. That is, as shown in FIG. 10C, if the entry pointed to by the buffer unit pointer includes the packet P j and the time information T j before the execution of the process of step S407, the buffer unit pointer is moved to the next entry by step S407. To point to Then, as shown in FIG. 10C, when the entry pointed to by the buffer section pointer after the change is not empty and includes the packet P j + 1 and the time information T j + 1 , the process returns from step S408 to step S405.

逆に、ステップS408で「変更後のバッファ部ポインタが指す位置にパケットがない」と判断されるのは、ステップS407で変更する前のバッファ部ポインタが指していたパケットが、バッファ部220内の最後のパケットである場合である。この場合、ステップS404で得た送信パケット時刻は、バッファ部220の時刻情報格納部222に格納されている最も遅い送信予定時刻より遅いので、処理はステップS409に移行する。   On the contrary, it is determined in step S408 that “there is no packet at the position pointed to by the changed buffer unit pointer” because the packet pointed to by the buffer unit pointer before the change in step S407 is in the buffer unit 220. This is the case of the last packet. In this case, since the transmission packet time obtained in step S404 is later than the latest scheduled transmission time stored in the time information storage unit 222 of the buffer unit 220, the process proceeds to step S409.

ステップS409で制御回路211は、送信予定のパケット(より正確には、1組以上の、送信予定のパケットと時刻情報の組であって、まだバッファ部220に格納されていないもの)をすべて、バッファ部220の最後尾の位置に順に挿入する。そして制御回路211は、図4のレジスタRに格納されているエンキュー位置の値を、ステップS409での挿入処理後のキューの最後の位置を示すように、更新する。ステップS409の実行後、図9の処理は終了する。 In step S409, the control circuit 211 determines all the packets to be transmitted (more precisely, one or more sets of packets to be transmitted and time information that have not yet been stored in the buffer unit 220), They are inserted in order at the last position of the buffer unit 220. The control circuit 211, the value of enqueue position stored in the register R 4 in FIG. 4, to indicate the last position of the queue after insertion processing in step S409, the updating. After execution of step S409, the process of FIG. 9 ends.

なお、本実施形態において、ステップS409での挿入処理(すなわちエンキュー処理)は、DMA(Direct Memory Access)により行われる。すなわち、制御回路211が実装されているMACチップ304−jは、ソフトウェア制御部100を実現するCPU301を介さずに、直接メモリユニット302内のメモリ領域104にアクセスする。具体的には、制御回路211は、レジスタRの送信パケットリスト先頭ポインタを用いてメモリ領域104上の送信パケットリスト105をたどりながら、順にパケットと時刻情報を取得してバッファ部220に挿入する。 In the present embodiment, the insertion process (that is, enqueue process) in step S409 is performed by DMA (Direct Memory Access). That is, the MAC chip 304-j on which the control circuit 211 is mounted directly accesses the memory area 104 in the memory unit 302 without going through the CPU 301 that implements the software control unit 100. Specifically, the control circuit 211 sequentially acquires and inserts the packet and time information into the buffer unit 220 while using the transmission packet list head pointer of the register R 1 to trace the transmission packet list 105 on the memory area 104. .

図10(D)は、ステップS407、S408、S409の順に処理が進む場合の例を示す。すなわち、図10(D)に示すように、ステップS407の処理の実行前にバッファ部ポインタが指すエントリがパケットPと時刻情報Tを含むとすると、ステップS407によりバッファ部ポインタは次のエントリを指すように変更される。そして、図10(D)のように、変更後のバッファ部ポインタが指すエントリが空である場合、処理はステップS408からステップS409に移行する。 FIG. 10D illustrates an example in which the process proceeds in the order of steps S407, S408, and S409. That is, as shown in FIG. 10D, if the entry pointed to by the buffer section pointer includes the packet P j and the time information T j before the execution of the process of step S407, the buffer section pointer is moved to the next entry by step S407. To point to Then, as shown in FIG. 10D, when the entry pointed to by the changed buffer unit pointer is empty, the process proceeds from step S408 to step S409.

ここで、ステップS409の時点で、まだバッファ部220に格納されていないパケットと時刻情報の組がa(1≦a)個残っているとする。a個のパケットを「Pnew−1」〜「Pnew−a」という参照符号で表し、パケットPnew−1〜Pnew−aそれぞれに対応する時刻情報を「Tnew−1」〜「Tnew−a」という参照符号で表す。なお、パケットPnew−1〜Pnew−aそのものは図3のパケットバッファ106に格納されており、時刻情報Tnew−1〜Tnew−aの各々は送信パケットリスト105内の各ノードに格納されている。 Here, it is assumed that there are a (1 ≦ a) pairs of packets and time information that are not yet stored in the buffer unit 220 at the time of step S409. The a packets are represented by reference symbols “P new-1 ” to “P new-a ”, and time information corresponding to each of the packets P new−1 to P new-a is represented by “T new−1 ” to “T new ”. " new-a ". The packets P new-1 to P new-a themselves are stored in the packet buffer 106 in FIG. 3, and each of the time information T new-1 to T new-a is stored in each node in the transmission packet list 105. Has been.

ここで、キュー102−h(1≦h≦n)はFIFOキューである。よって、キュー102−hに関して図6のステップS109が実行され、図9の処理が呼び出される場合、図6の処理から明らかに、1≦g<aを満たすすべてのgについて、時刻情報Tnew−gが表す時刻は時刻情報Tnew−(g+1)が表す時刻以前の時刻である。 Here, the queue 102-h (1 ≦ h ≦ n) is a FIFO queue. Therefore, when step S109 of FIG. 6 is executed for the queue 102-h and the process of FIG. 9 is called, the time information Tnew− is obtained for all g satisfying 1 ≦ g <a, clearly from the process of FIG. The time represented by g is a time before the time represented by the time information Tnew- (g + 1) .

また、ステップS409が実行される場合、ステップS406の判断結果のとおり、送信パケット時刻(すなわち時刻情報Tnew−1が示す時刻)よりも、バッファ部時刻(すなわち図10(D)の時刻情報Tが表す時刻)の方が早い。つまり、1≦g≦aを満たすすべてのgについて、時刻情報Tnew−gが表す時刻よりも、時刻情報Tが表す時刻の方が早い。 Further, when step S409 is executed, as shown in the determination result of step S406, the buffer unit time (that is, the time information T of FIG. 10D) rather than the transmission packet time (that is, the time indicated by the time information Tnew-1 ). The time represented by j ) is earlier. That is, for all g satisfying 1 ≦ g ≦ a, the time represented by the time information T j is earlier than the time represented by the time information T new-g .

したがって、ステップS409において制御回路211は、図10(D)に示すように、時刻情報Tnew−1〜Tnew−aとともにパケットPnew−1〜Pnew−aをバッファ部220の最後に順にエンキューする。その結果、ステップS409の実行後のバッファ部220は、時刻情報格納部222に格納された各時刻情報によりソートされた状態でエントリを保持することとなる。 Therefore, in step S409, the control circuit 211 sequentially transmits the packets Pnew -1 to Pnew -a together with the time information Tnew -1 to Tnew -a to the end of the buffer unit 220 as shown in FIG. Enqueue. As a result, the buffer unit 220 after the execution of step S409 holds the entries in a state of being sorted by each time information stored in the time information storage unit 222.

さて、ここでステップS406の分岐の説明に戻ると、上記のとおり、バッファ部時刻が送信パケット時刻以降であれば、処理はステップS410に移行する。ステップS410では、ステップS404で注目している送信予定のパケットとその時刻情報を有するエントリを、現在のバッファ部ポインタが指すエントリの直前に挿入する処理が行われる。   Now, returning to the description of the branch in step S406, as described above, if the buffer time is after the transmission packet time, the process proceeds to step S410. In step S410, processing is performed to insert the entry having the packet scheduled for transmission in step S404 and its time information immediately before the entry pointed to by the current buffer section pointer.

具体的には、ステップS410で制御回路211は、バッファ部ポインタの指す位置に、送信予定のパケット群の先頭のパケットおよび当該パケットの時刻情報を挿入する。すなわち、パケットはパケット格納部221に、時刻情報は時刻情報格納部222に格納される。なお、ステップS409と同様に、ステップS410でもDMAによりバッファ部220への挿入処理が行われる。   Specifically, in step S410, the control circuit 211 inserts the first packet of the packet group to be transmitted and the time information of the packet at the position indicated by the buffer unit pointer. That is, the packet is stored in the packet storage unit 221 and the time information is stored in the time information storage unit 222. Note that, similarly to step S409, the insertion processing into the buffer unit 220 is also performed by DMA in step S410.

続いてステップS411で制御回路211は、バッファ部ポインタの値を更新する。すなわち、制御回路211は、図4のレジスタRに格納されているバッファ部ポインタの値を、今ステップS410で挿入したパケットの次のパケット(すなわちステップS410の実行直前にバッファ部ポインタが指していたパケット)を指すように変更する。 In step S411, the control circuit 211 updates the value of the buffer unit pointer. That is, the control circuit 211, the value of the buffer pointer stored in the register R 5 in FIG. 4, points to the buffer unit pointer immediately before execution of the next packet (i.e., step S410 of packets inserted Now step S410 To point to the packet.

図10(E)は、ステップS406、S410、S411の順に処理が進む場合の例を示す。図10(E)の例では、バッファ部時刻は、ステップS406でバッファ部ポインタが指すエントリの時刻情報Tが表す時刻である。ここで、ステップS404で注目している送信予定のパケットを「Pnew」という参照符号で表し、パケットPnewの送信予定時刻を「Tnew」という参照符号で表す。 FIG. 10E shows an example in which processing proceeds in the order of steps S406, S410, and S411. In the example of FIG. 10 (E), the buffer unit time is the time represented by the time information T j of the entry point buffer pointer at step S406. Here, the packet scheduled to be transmitted in step S404 is represented by a reference symbol “P new ”, and the scheduled transmission time of the packet P new is represented by a reference symbol “T new ”.

つまり、図10(E)の例ではステップS406において、時刻情報Tnewの示す時刻が、時刻情報Tの示す時刻以前であると判断される。そこで、図10(E)に示すように、パケットPnewと時刻情報Tnewを含むエントリが、パケットPと時刻情報Tを含むエントリの直前に挿入されるようにするための処理(すなわち上記のステップS410とS411の処理)が行われる。 That is, in the example of FIG. 10 (E) In step S406, the time indicated by the time information T new is determined that the time before the indicated time information T j. Therefore, as shown in FIG. 10E , an entry including the packet P new and the time information T new is inserted into the entry including the packet P j and the time information T j immediately before the entry (that is, Steps S410 and S411 described above are performed.

そして、次のステップS412で制御回路211は、送信予定のパケット群の先頭のパケットを削除する。
ここで、制御回路211は、図3のレジスタRに格納されている送信パケットリスト先頭ポインタを利用して、送信パケットリスト105のダミーノードLを参照することができるので、送信パケットリスト105をたどることができる。
Then, in the next step S412, the control circuit 211 deletes the leading packet of the packet group scheduled to be transmitted.
Here, the control circuit 211 can refer to the dummy node L 0 of the transmission packet list 105 using the transmission packet list head pointer stored in the register R 1 of FIG. Can be traced.

例えば図3の具体例を参照して説明すると、ステップS412で制御回路211は、送信パケットリスト105の先頭のノードLを削除し、ダミーノードLのポインタを、次のノードLを指すように変更する。なお、送信パケットリスト105がダミーノードLと先頭のノードLしか含まない場合は、ステップS412で制御回路211は、ノードLを削除し、ダミーノードLのポインタにヌルポインタを設定する。また、制御回路211は、ノードLのポインタが指していたパケットQjh1が占めていたパケットバッファ106中の領域を明示的に解放してもよい。 For example With reference to the embodiment of FIG. 3, the control circuit 211 at step S412 deletes the beginning of the node L 1 of the transmission packet list 105, the pointer of the dummy node L 0, points to the next node L 2 Change as follows. If the transmission packet list 105 includes only the dummy node L 0 and the first node L 1 , the control circuit 211 deletes the node L 1 and sets a null pointer as the pointer of the dummy node L 0 in step S 412. . Further, the control circuit 211 may be explicitly freed space in the packet buffer 106 a packet Q JH1 a pointer node L 1 was pointing accounted.

以上の処理により、ステップS412の実行後は、送信パケットリスト105中の次のパケット(図3を参照する上記の例では、今まで先頭から2番目だったノードLのポインタが指すパケットQjh2)が、新たな「送信予定のパケット群の先頭のパケット」となる。 With the above processing, after the execution of step S412, in the above example that refers to the next packet (Figure 3 during transmission packet list 105, the packet pointed to the node L 2 was the second from the beginning until now Q JH2 ) Becomes a new “first packet of a packet group to be transmitted”.

そして、次のステップS413において、制御回路211は、送信予定のパケットがまだあるか否かを判断する。すなわち、制御回路211は、ステップS412の変更の結果、ダミーノードLのポインタが、新たな先頭のノードLを指すか、それともヌルポインタであるかを判定する。送信予定のパケットがまだ送信パケットリスト105内に残っていれば、次の送信予定のパケットをバッファ部220にエンキューするため、処理はステップS404に戻る。他方、送信予定のパケットがもう残っていなければ、図9の処理は終了する。 Then, in the next step S413, the control circuit 211 determines whether there are still packets to be transmitted. That is, the control circuit 211, a result of the change in step S412, the pointer of the dummy node L 0 is or refers to the new head of the node L 2, or determines whether a null pointer. If the packet to be transmitted still remains in the transmission packet list 105, the process returns to step S404 to enqueue the next packet to be transmitted to the buffer unit 220. On the other hand, if there are no more packets to be transmitted, the process of FIG. 9 ends.

以上説明した図9の処理により、図6においてスケジューラ部103がデキュー対象のキュー102−hに関して送信パケットリスト105により管理していた1個以上のパケットは、各々の送信予定時刻とともにバッファ部220内の適切な位置に挿入される。   Through the process of FIG. 9 described above, one or more packets managed by the scheduler unit 103 in the transmission packet list 105 with respect to the queue 102-h to be dequeued in FIG. Inserted at the appropriate position.

すなわち、上記「適切な位置」とは、時刻情報格納部222内の時刻情報が示す時刻の順に、バッファ部220内のエントリがソートされた状態となるような位置である。なお、図9の処理によるソートは、具体的には、最も早い時刻を表す時刻情報がバッファ部220の先頭のエントリに含まれるような、昇順ソートである。   That is, the “appropriate position” is a position where the entries in the buffer unit 220 are sorted in the order of the time indicated by the time information in the time information storage unit 222. The sort by the processing of FIG. 9 is specifically an ascending order sort in which time information representing the earliest time is included in the top entry of the buffer unit 220.

また、ソートされる範囲は、レジスタRの時刻指定フラグが「絶対時刻」を示す場合は、バッファ部220の全体である。他方、時刻指定フラグが「相対時刻」を示す場合は、レジスタRのバッファ探索開始位置が示す位置以降の範囲でソートされるように、パケットと時刻情報の組がバッファ部220に挿入される。 Moreover, the range to be sorted, when the time designation flag register R 2 indicates "absolute time" is the entire buffer unit 220. On the other hand, if the time indication flag indicates "relative time", as sorted by the scope of the subsequent position indicated by the buffer search start position of the register R 3, a set of packets and the time information is inserted into the buffer unit 220 .

ここで、上記のようにバッファ部ポインタは、バッファ部220の先頭から末尾へ向かう方向に合わせて順次更新されるだけで、逆方向にバッファ部ポインタを戻す必要はない。つまり、1度の(one-pass)バッファ部220の検索により、効率的に、送信予定時刻順にソートしつつバッファ部220へのエンキューを行うことが可能である。   Here, as described above, the buffer unit pointer is sequentially updated in accordance with the direction from the beginning to the end of the buffer unit 220, and there is no need to return the buffer unit pointer in the reverse direction. That is, it is possible to perform the enqueue to the buffer unit 220 while efficiently sorting in order of the scheduled transmission time by searching the one-pass buffer unit 220 once.

このような効率的なソート処理が可能な理由は、第1に、送信パケットリスト105内でパケットが送信予定時刻順にソートされて管理されているからである。第2の理由は、図9の処理が呼び出された時点でたとえバッファ部220内にパケットが残っているとしても、残っているパケットは以前に図9の処理が呼び出されたときの結果として、送信予定時刻順にソートされているからである。   The reason why such an efficient sorting process is possible is because, firstly, packets are sorted and managed in the order of scheduled transmission time in the transmission packet list 105. The second reason is that even if a packet remains in the buffer unit 220 when the process of FIG. 9 is called, the remaining packet is obtained as a result of the previous call of the process of FIG. This is because they are sorted in order of scheduled transmission time.

ところで、ハードウェア制御部200内の送信処理部230は、図7〜図10を参照して説明したバッファ格納処理部210による上記の処理と並行して、バッファ部220から各パケットを各送信予定時刻にデキューしてPHYチップ305−jに出力する。   Incidentally, the transmission processing unit 230 in the hardware control unit 200 plans to transmit each packet from the buffer unit 220 in parallel with the above-described processing by the buffer storage processing unit 210 described with reference to FIGS. Dequeue at time and output to PHY chip 305-j.

図11は、送信処理部230による送信処理を説明するフローチャートである。また、図12は、送信処理によるバッファ部220の状態遷移の例を説明する図である。図12の表記法は図10と同様であるが、図12ではバッファ部ポインタではなくバッファ探索開始位置が矢印で表されている。   FIG. 11 is a flowchart for explaining the transmission processing by the transmission processing unit 230. FIG. 12 is a diagram illustrating an example of state transition of the buffer unit 220 by transmission processing. The notation of FIG. 12 is the same as that of FIG. 10, but in FIG. 12, the buffer search start position is represented by an arrow instead of the buffer section pointer.

なお、パケット送信制御装置1に電源が入れられると、各MACチップ304−1〜304−nが図11の処理を開始する。図示のとおり、図11の処理は、パケット送信制御装置1の起動中は永久にループして繰り返される。以下では説明の便宜上、MACチップ304−jにより実現されるハードウェア制御部200中の送信処理部230が図11の処理を行う場合を例とする。   When the packet transmission control device 1 is turned on, each of the MAC chips 304-1 to 304-n starts the process of FIG. As shown in the figure, the process of FIG. 11 is repeated in a loop forever while the packet transmission control device 1 is activated. In the following, for convenience of explanation, an example in which the transmission processing unit 230 in the hardware control unit 200 realized by the MAC chip 304-j performs the process of FIG.

ステップS501で、図5に示す送信処理部230の制御回路231は、図4のレジスタRに格納されている時刻指定フラグの値を参照する。そして、時刻指定フラグが相対時刻を表していれば、処理はステップS502に移行し、時刻指定フラグが相対時刻を表していれば、処理はステップS503に移行する。 In step S501, the control circuit 231 of the transmission processing unit 230 shown in FIG. 5 refers to the value of the time designation flag stored in the register R 2 in FIG. If the time designation flag represents relative time, the process proceeds to step S502. If the time designation flag represents relative time, the process proceeds to step S503.

ステップS502で制御回路231は、図5に示す送信処理部230の内部カウンタ233を、RTC303が示す絶対時刻で初期化する。内部カウンタ233は内部クロックの一例である。初期化された内部カウンタ233は、以後、時刻のカウントを継続的に実施し続ける。ステップS502の初期化の後、処理はステップS511に移行し、後述のステップS511〜S514の処理が繰り返される。   In step S <b> 502, the control circuit 231 initializes the internal counter 233 of the transmission processing unit 230 illustrated in FIG. 5 with the absolute time indicated by the RTC 303. The internal counter 233 is an example of an internal clock. The initialized internal counter 233 continues to count time thereafter. After initialization in step S502, the process proceeds to step S511, and processes in steps S511 to S514 described later are repeated.

他方、時刻指定フラグが相対時刻を表すときは、ステップS503〜S510の処理が繰り返される。
ステップS503で制御回路231は、内部クロックとしての内部カウンタ233が表す相対時刻を、0に初期化する(すなわちリセットする)。初期化された内部カウンタ233は、以後、時刻のカウントを継続的に実施し続ける。ステップS503の初期化の後、処理はステップS504に移行する。
On the other hand, when the time designation flag indicates relative time, the processes of steps S503 to S510 are repeated.
In step S503, the control circuit 231 initializes the relative time represented by the internal counter 233 as the internal clock to 0 (that is, resets). The initialized internal counter 233 continues to count time thereafter. After initialization in step S503, the process proceeds to step S504.

ステップS504で制御回路231は、図4に示すバッファ部220内のレジスタRに記憶されている送信開始指示の値を参照する。送信開始指示の値が「停止」を示す場合、処理はステップS505に移行し、送信開始指示の値が「送信」を示す場合、処理はステップS507に移行する。 Control circuit in step S504 231 refers to the value of the transmission start instruction stored in the register R 6 in the buffer section 220 shown in FIG. If the value of the transmission start instruction indicates “stop”, the process proceeds to step S505. If the value of the transmission start instruction indicates “transmission”, the process proceeds to step S507.

ここで、送信開始指示の値は、図7のステップS201の実行後、図8のステップS301が実行されるまでは、「停止」を示す。換言すれば、スケジューラ部103によるある1回のスケジューリング処理に関して、図6のステップS102を契機として図7の処理が実行された後、ステップS113を契機として図8の処理が実行されるまで、送信開始指示の値は「停止」を示す。   Here, the value of the transmission start instruction indicates “stop” after execution of step S201 in FIG. 7 until step S301 in FIG. 8 is executed. In other words, with respect to a single scheduling process performed by the scheduler unit 103, after the process of FIG. 7 is executed with step S102 of FIG. 6 as a trigger, transmission is performed until the process of FIG. 8 is executed with step S113 as a trigger. The value of the start instruction indicates “stop”.

したがって、送信開始指示の値が「停止」を示す場合、バッファ部220中のパケットのうち、前回のスケジューリング処理の結果としてバッファ部220にエンキューされたものは、PHYチップ305−jへ出力して問題ない。しかし、今回のスケジューリング処理においてバッファ部220にエンキューされたパケットは、まだPHYチップ305−jへ出力せず、バッファ部220に保持し続けることが適切である。   Therefore, when the value of the transmission start instruction indicates “stop”, packets enqueued in the buffer unit 220 as a result of the previous scheduling process among the packets in the buffer unit 220 are output to the PHY chip 305-j. no problem. However, it is appropriate that the packets enqueued in the buffer unit 220 in the current scheduling process are not yet output to the PHY chip 305-j and kept in the buffer unit 220.

換言すれば、送信開始指示の値が「停止」を示す場合、PHYチップ305−jへ出力してよいパケットとは、バッファ部220において、図7のステップS202でレジスタRに設定されたバッファ探索開始位置よりも前の位置に保持されているものである。すなわち、制御回路231はバッファ探索開始位置よりも前の位置に保持されているパケットをバッファ部220からデキューして、PHYチップ305−jを介してポート306−jから送信してから、パケットの送信を止めればよい。 In other words, if the value of the transmission start instruction indicates "stop", and may packets output to the PHY chip 305-j, and the buffer unit 220, it is set in the register R 3 in step S202 in FIG. 7 buffer It is held at a position before the search start position. That is, the control circuit 231 dequeues the packet held at the position before the buffer search start position from the buffer unit 220, transmits the packet from the port 306-j via the PHY chip 305-j, and then transmits the packet. Stop sending.

そこで、制御回路231はステップS505において、バッファ部220のレジスタRに格納されているバッファ探索開始位置の値を獲得する。
そして、制御回路231はステップS506で、バッファ部220のキューの先頭位置の値が、獲得したバッファ探索開始位置の値と同一か否かを判断する。図9の処理により、バッファ部220中では送信予定時刻順にパケットがソートされているので、キューの先頭のパケットとは、すなわち次に送信する予定のパケットである。
Therefore, the control circuit 231 at step S505, acquires the value of the buffer search start position stored in the register R 3 of the buffer unit 220.
In step S506, the control circuit 231 determines whether the value of the head position of the queue of the buffer unit 220 is the same as the acquired value of the buffer search start position. 9, the packets are sorted in the buffer unit 220 in the order of the scheduled transmission time. Therefore, the first packet in the queue is the packet to be transmitted next.

ステップS506において2つの値が同一であれば、前回のスケジューリング処理の結果としてバッファ部220にエンキューされたパケットはすべてPHYチップ305−jに出力済みである。換言すれば、バッファ探索開始位置より前の位置にあるパケットのデキューは完了しており、バッファ探索開始位置の値によらずPHYチップ305−jに出力してよいパケットはもう存在しない。   If the two values are the same in step S506, all the packets enqueued in the buffer unit 220 as a result of the previous scheduling process have already been output to the PHY chip 305-j. In other words, the packet at the position before the buffer search start position has been dequeued, and there is no longer any packet that can be output to the PHY chip 305-j regardless of the value of the buffer search start position.

よって、この場合は処理がステップS503に戻り、制御回路231は再度ステップS503で内部カウンタ233を0に初期化する。そして、送信開始指示の値が「停止」を示す間、待機のためにステップS503〜S506が繰り返される。送信開始指示の値が「送信」を示す値に変化すると、処理はステップS504からステップS507へと移行する。   Therefore, in this case, the process returns to step S503, and the control circuit 231 initializes the internal counter 233 to 0 again in step S503. Then, while the value of the transmission start instruction indicates “stop”, steps S503 to S506 are repeated for standby. When the value of the transmission start instruction changes to a value indicating “transmission”, the process proceeds from step S504 to step S507.

他方、ステップS506で2つの値が異なると判断された場合、前回のスケジューリング処理の結果としてバッファ部220にエンキューされたパケットが、まだ1つ以上バッファ部220に残っている。よって、この場合は、残っているパケットをPHYチップ305−jに出力するため、処理がステップS507に移行する。   On the other hand, if it is determined in step S506 that the two values are different, one or more packets enqueued in the buffer unit 220 as a result of the previous scheduling process still remain in the buffer unit 220. Therefore, in this case, since the remaining packet is output to the PHY chip 305-j, the process proceeds to step S507.

ステップS507〜S510は、バッファ部220からパケットをデキューしてPHYチップ305−jに出力することで、パケット送信制御装置1のポート306−jからパケットを送信するための処理である。   Steps S507 to S510 are processes for transmitting a packet from the port 306-j of the packet transmission control device 1 by dequeuing the packet from the buffer unit 220 and outputting the packet to the PHY chip 305-j.

ステップS507で制御回路231は、バッファ部220のキューの先頭にパケットが存在するか否かを判断する。キューの先頭にパケットが存在すれば処理はステップS508に移行する。他方、キューの先頭にパケットが存在しなければ、送信対象が存在しないということなので、処理はステップS504に戻る。例えばバッファ部220のキューが線形リストにより実現されている場合、ダミーノードのポインタの値に基づいて、制御回路231はステップS507の判断を行うことができる。   In step S507, the control circuit 231 determines whether or not there is a packet at the head of the queue of the buffer unit 220. If there is a packet at the head of the queue, the process proceeds to step S508. On the other hand, if there is no packet at the head of the queue, it means that there is no transmission target, so the process returns to step S504. For example, when the queue of the buffer unit 220 is realized by a linear list, the control circuit 231 can make the determination in step S507 based on the value of the dummy node pointer.

なお、送信開始指示が「停止」を示している場合は、ステップS506からステップS507へと処理が移行したという経緯から明らかなとおり、必ずステップS507においてキューの先頭にパケットが存在する。よって、処理はステップS506、S507、S508の順に進む。   Note that if the transmission start instruction indicates “stop”, a packet always exists at the head of the queue in step S507, as is clear from the fact that the process has shifted from step S506 to step S507. Therefore, the process proceeds in the order of steps S506, S507, and S508.

他方、送信開始指示が「送信」を示している場合は、今回のスケジューリング処理の結果としてバッファ部220にエンキューされたすべてのパケットがPHYチップ305−jへ出力された後、ステップS504とS507が交互に繰り返される。そして、次回のスケジューリング処理の開始を契機として送信開始指示の値が変更されると、処理はステップS504からS505に移行する。   On the other hand, when the transmission start instruction indicates “transmission”, after all the packets enqueued in the buffer unit 220 as a result of the current scheduling process are output to the PHY chip 305-j, steps S504 and S507 are performed. Repeated alternately. Then, when the value of the transmission start instruction is changed at the start of the next scheduling process, the process proceeds from step S504 to S505.

さて、バッファ部220のキューの先頭にパケットが存在する場合、ステップS507に続いてステップS508が実行される。ステップS508で制御回路231は、バッファ部220のキューの先頭のパケットと時刻情報をデキューして獲得する。例えば、バッファ部220のキューが線形リストを使って実装されている場合、ステップS508は、具体的には次のように実行されてもよい。   If there is a packet at the head of the queue of the buffer unit 220, step S508 is executed following step S507. In step S508, the control circuit 231 dequeues and acquires the first packet in the queue of the buffer unit 220 and time information. For example, when the queue of the buffer unit 220 is implemented using a linear list, step S508 may be specifically executed as follows.

すなわち、制御回路231は、キューの先頭のエントリの時刻情報を、図5のレジスタRに時刻情報として格納する。また、制御回路231は、例えば図5のレジスタ領域232中の不図示のレジスタに、バッファ部220のキューを実装するための上記線形リストの、ダミーノードを除く先頭ノードのポインタ(すなわち図4のメモリ領域223中に格納されているパケットを指すポインタ)の値をコピーする。 That is, the control circuit 231 stores the time information of the first entry in the queue, as the time information in the register R 7 in Figure 5. Further, the control circuit 231 is a pointer of the first node excluding the dummy node in the linear list for mounting the queue of the buffer unit 220 in, for example, a register (not shown) in the register area 232 of FIG. The value of the pointer pointing to the packet stored in the memory area 223 is copied.

そして、制御回路231は、線形リストの先頭ノードを削除し、ダミーノードのポインタを、先頭ノードの次のノードを指すように更新する。なお、もし「先頭ノードの次のノード」が存在しなければ、制御回路231は、ダミーノードのポインタにヌルポインタを設定すればよい。   Then, the control circuit 231 deletes the first node of the linear list, and updates the dummy node pointer to point to the next node after the first node. If there is no “next node after the first node”, the control circuit 231 may set a null pointer as the dummy node pointer.

例えば上記の処理により、制御回路231は、バッファ部220のキューの先頭のパケットと時刻情報をデキューし、デキューしたパケットと時刻情報を送信処理部230が一時的に管理するようにすることができる。   For example, through the above processing, the control circuit 231 can dequeue the first packet in the queue of the buffer unit 220 and time information, and the transmission processing unit 230 can temporarily manage the dequeued packet and time information. .

続いて、ステップS509で制御回路231は、図5のレジスタRに格納されている時刻情報と、内部クロックすなわち内部カウンタ233の示す時刻とを読み取り、2つの時刻を比較する。内部カウンタ233が示す時刻が、パケットの送信予定時刻(すなわちレジスタRに格納されている時刻情報が示す時刻)に達していれば、処理はステップS510に移行する。つまり、2つの時刻が同じか、またはレジスタRの時刻情報が示す時刻の方が内部カウンタ233の示す時刻よりも早ければ、処理はステップS510に移行する。 Subsequently, the control circuit 231 at step S509, the reading and the time information stored in the register R 7 of FIG. 5, the internal clock That time indicated by the internal counter 233 and compares the two times. The time indicated by the internal counter 233, if reached scheduled transmission time of the packet (i.e., the time indicated by the time information stored in the register R 7), the process proceeds to step S510. That is, if the two times are the same or the time indicated by the time information in the register R 7 is earlier than the time indicated by the internal counter 233, the process proceeds to step S510.

他方、内部カウンタ233が示す時刻がパケットの送信予定時刻に達していなければ、処理はステップS509に戻る。すなわち、制御回路231は、内部カウンタ233の示す時刻がパケットの送信予定時刻に達するまで待機する。   On the other hand, if the time indicated by the internal counter 233 has not reached the scheduled transmission time of the packet, the process returns to step S509. That is, the control circuit 231 waits until the time indicated by the internal counter 233 reaches the scheduled packet transmission time.

なお、図11にはステップS509の処理の繰り返しとして待機が表現されているが、実施形態によっては、必ずしもステップS509での比較を繰り返す必要はない。例えば、内部カウンタ233は、時刻のカウントアップを行うだけでなく、指定された時刻に割り込み信号を発生させる機能を有するものであってもよい。その場合、ステップS508で制御回路231がデキューした時刻情報を内部カウンタ233に指定することで、パケットの送信予定時刻になると内部カウンタ233が割り込み信号を発生させる。そして、割り込み信号を契機として、処理がステップS509からステップS510に移行してもよい。   In FIG. 11, standby is expressed as the repetition of the process in step S509. However, depending on the embodiment, the comparison in step S509 need not be repeated. For example, the internal counter 233 may have a function of generating an interrupt signal at a designated time as well as counting up the time. In this case, the time information dequeued by the control circuit 231 in step S508 is designated to the internal counter 233, so that the internal counter 233 generates an interrupt signal at the scheduled packet transmission time. Then, the processing may move from step S509 to step S510 with the interrupt signal as a trigger.

いずれにしろ、送信処理部230は、時刻に基づく信号(例えば、時刻のカウント値を示す信号や割り込み信号など)を発生させる回路(例えば内部カウンタ233)を使って、パケットの送信を送信予定時刻まで遅延させることができる。   In any case, the transmission processing unit 230 uses a circuit (for example, an internal counter 233) that generates a signal based on time (for example, a signal indicating a time count value or an interrupt signal) to transmit a packet at a scheduled transmission time. Can be delayed.

そして、ステップS510で制御回路231は、ステップS508でデキューしたパケットの送信を実施する。例えば、制御回路231は、ステップS508に関して説明した上記不図示のレジスタが指すパケットを図4のメモリ領域223から読み出し、MIIなどのインタフェースを介してPHYチップ305−jへと出力する。   In step S510, the control circuit 231 transmits the packet dequeued in step S508. For example, the control circuit 231 reads the packet pointed to by the register (not shown) described with reference to step S508 from the memory area 223 of FIG. 4, and outputs the packet to the PHY chip 305-j via an interface such as MII.

その結果、パケットは、スケジューラ部103によってスケジューリングされた送信予定時刻どおりに、PHYチップ305−jを介してポート306−jから送信される。ステップS510の実行後、処理はステップS504に戻る。   As a result, the packet is transmitted from the port 306-j via the PHY chip 305-j in accordance with the scheduled transmission time scheduled by the scheduler unit 103. After execution of step S510, the process returns to step S504.

なお、送信開始指示の値が「送信」を示す場合、制御回路231は、バッファ探索開始位置とは関係なくパケットのデキューと送信を継続してよい。しかし、ステップS510での1つのパケットの送信のたびに、処理はステップS504に戻り、逐一、送信開始指示の値が確認される。その理由は次のとおりである。   When the value of the transmission start instruction indicates “transmission”, the control circuit 231 may continue the packet dequeuing and transmission regardless of the buffer search start position. However, each time one packet is transmitted in step S510, the process returns to step S504, and the value of the transmission start instruction is confirmed one by one. The reason is as follows.

送信処理部230による図11の処理とは独立に、かつ並行して、スケジューラ部103がスケジューリング処理を行っている。そのため、制御回路231がパケットのデキューと送信を継続する途中で送信開始指示の値が変化する可能性がある。送信開始指示の値が変化しても、スケジューラ部103によるスケジューリング結果のとおりに正しくパケットの送信を行うことができるようにするため、本実施形態では、ステップS510の後で処理がステップS504に戻り、送信開始指示の値が再確認される。   Independently and in parallel with the processing of FIG. 11 by the transmission processing unit 230, the scheduler unit 103 performs scheduling processing. Therefore, the value of the transmission start instruction may change while the control circuit 231 continues to dequeue and transmit the packet. Even if the value of the transmission start instruction changes, in order to enable the packet transmission to be performed correctly according to the scheduling result by the scheduler unit 103, in this embodiment, the process returns to step S504 after step S510. The value of the transmission start instruction is reconfirmed.

なお、以上説明したステップS503〜S510の処理により、例えば図12に示すようにバッファ部220の状態が遷移する。
図12は、前回のスケジューリング処理の結果バッファ部220にエンキューされたパケットと時刻情報がまだバッファ部220に残っているうちに、スケジューラ部103が今回のスケジューリング処理を開始した例を示す。この場合、図12に矢印で示すようにバッファ探索開始位置は、前回のスケジューリング処理の結果エンキューされた最後のエントリ(パケットPと時刻情報Tを含むエントリ)の次のエントリを指す(1≦r)。また、今回のスケジューリング処理を契機として、送信開始指示の値は「停止」を示す値に変化する。
Note that the state of the buffer unit 220 changes as shown in FIG.
FIG. 12 shows an example in which the scheduler unit 103 starts the current scheduling process while the packet and time information enqueued in the buffer unit 220 as a result of the previous scheduling process still remain in the buffer unit 220. In this case, as indicated by an arrow in FIG. 12, the buffer search start position indicates the entry next to the last entry (entry including packet Pr and time information Tr ) enqueued as a result of the previous scheduling process (1). ≦ r). In addition, the value of the transmission start instruction changes to a value indicating “stop” triggered by the current scheduling process.

さらに、今回のスケジューリング処理の進行につれて、バッファ格納処理部210が図9の処理を行う。したがって、バッファ探索開始位置が指すエントリ以降にもパケット(例えばパケットPr+1)と時刻情報(例えば時刻情報Tr+1)が順次エンキューされていく。 Further, the buffer storage processing unit 210 performs the process of FIG. 9 as the current scheduling process proceeds. Accordingly, packets (for example, packet P r + 1 ) and time information (for example, time information T r + 1 ) are sequentially enqueued after the entry indicated by the buffer search start position.

例えば、バッファ部220は、前回のスケジューリング処理の結果エンキューされたパケットP〜Pと時刻情報T〜Tと、さらに今回のスケジューリング処理の進行につれてエンキューされたパケットPr+1と時刻情報Tr+1を保持している。この状況で図11のステップS504が実行され、処理がステップS505に移行し、図12に矢印で示すバッファ探索開始位置の値が獲得されるとする。 For example, the buffer unit 220 includes the packets P 1 to P r and time information T 1 to T r enqueued as a result of the previous scheduling process, and the packet P r + 1 and time information T enqueued as the current scheduling process progresses. r + 1 is held. In this situation, step S504 in FIG. 11 is executed, the process proceeds to step S505, and the value of the buffer search start position indicated by the arrow in FIG. 12 is acquired.

すると、バッファ探索開始位置の値はバッファ部220の先頭位置の値とは異なるので、処理はステップS507、S508、S509と進む。そして、ステップS509での適宜の待機の後、ステップS510でパケットPがパケット送信制御装置1から送信される。そして処理はステップS504に戻る。 Then, since the value of the buffer search start position is different from the value of the head position of the buffer unit 220, the process proceeds to steps S507, S508, and S509. After the appropriate waiting on step S509, the packet P 1 is transmitted from the packet transmission control apparatus 1 in step S510. Then, the process returns to step S504.

上記と同様の一連の処理を制御回路231が繰り返すことで、パケットP〜Pも順次パケット送信制御装置1から送信されていく。すると、パケットPr+1と時刻情報Tr+1のエントリがバッファ部220の先頭に位置するようになる。 The control circuit 231 repeats a series of processes similar to the above, so that the packets P 2 to P r are also transmitted from the packet transmission control device 1 sequentially. Then, the entry of the packet Pr + 1 and the time information Tr + 1 is positioned at the head of the buffer unit 220.

この状況でステップS504が実行されると、処理はステップS505、S506と進んだ後、ステップS503に戻る。そして、送信開始指示の値が「送信」を示す値に更新されるまで、ステップS503〜S506が繰り返される。   When step S504 is executed in this situation, the process proceeds to steps S505 and S506, and then returns to step S503. Then, steps S503 to S506 are repeated until the value of the transmission start instruction is updated to a value indicating “transmission”.

その後、今回のスケジューリング処理の終了にともなって、図8の処理により送信開始指示の値が「送信」を示す値に更新されると、処理はステップS504からステップS507へ移行する。そして、今回のスケジューリング処理の結果としてバッファ部220にエンキューされたパケットを送信するためのステップS507〜S510の処理が行われる。   Thereafter, when the value of the transmission start instruction is updated to a value indicating “transmission” by the process of FIG. 8 with the end of the current scheduling process, the process proceeds from step S504 to step S507. And the process of step S507-S510 for transmitting the packet enqueued to the buffer part 220 as a result of this scheduling process is performed.

なお、図12ではバッファ部220の4つの状態を例示したが、説明の簡略化のため、どの状態においてもパケットPの次にはパケットPr+1が保持されている場合を示してある。しかし、実際には、図9の処理に関して説明したとおり、バッファ部220へのエンキュー処理はソート処理をともなう。 In FIG. 12, four states of the buffer unit 220 are illustrated, but for simplification of description, a case where the packet Pr + 1 is held next to the packet Pr in any state is shown. However, in practice, as described with reference to the processing of FIG. 9, the enqueue processing to the buffer unit 220 involves sort processing.

よって、図11の処理と並行して、時刻情報Tr+1よりも早い送信予定時刻のパケットが、バッファ探索開始位置に挿入されることもあり、その結果、パケットPr+1と時刻情報Tr+1が次のエントリに繰り下がることもある。つまり、図12において、矢印が示すバッファ探索開始位置のパケットは、途中でパケットPr+1から他のパケットP’r+1となり、パケットPr+1がバッファ探索開始位置よりも後ろの位置に移動することもある。 Therefore, in parallel with the processing of FIG. 11, a packet with a transmission scheduled time earlier than the time information Tr + 1 may be inserted at the buffer search start position. As a result, the packet Pr + 1 and the time information Tr + 1 are next. May go down to the next entry. That is, in FIG. 12, the packet at the buffer search start position indicated by the arrow is changed from the packet P r + 1 to another packet P ′ r + 1 on the way, and the packet P r + 1 may move to a position after the buffer search start position. .

ここで、ステップS501の分岐の説明に戻る。時刻指定フラグが絶対時刻を示すとステップS501で判断された場合、上記ステップS502の実行後に、制御回路231はステップS511〜S514を繰り返し実行する。時刻指定フラグが絶対時刻を示す場合は、バッファ探索開始位置とは無関係に、時刻にのみ基づく処理により、スケジューリングされたとおりのパケット送信が可能となる。   Here, the description returns to the branch in step S501. If it is determined in step S501 that the time designation flag indicates an absolute time, after executing step S502, the control circuit 231 repeatedly executes steps S511 to S514. When the time designation flag indicates absolute time, packet transmission as scheduled can be performed by processing based only on time regardless of the buffer search start position.

ステップS511で制御回路231は、バッファ部220のキューの先頭にパケットが存在するか否かを、ステップS507と同様の仕方で判断する。キューの先頭にパケットが存在すれば、処理はステップS512に移行する。他方、キューの先頭にパケットが存在しなければ、制御回路231はステップS511を繰り返し、パケットがバッファ部220にエンキューされるまで待機する。   In step S511, the control circuit 231 determines whether there is a packet at the head of the queue of the buffer unit 220 in the same manner as in step S507. If there is a packet at the head of the queue, the process proceeds to step S512. On the other hand, if there is no packet at the head of the queue, the control circuit 231 repeats step S511 and waits until the packet is enqueued in the buffer unit 220.

ステップS512で制御回路231は、バッファ部220のキューの先頭のパケットと時刻情報をデキューして獲得する。ステップS512の詳細は、ステップS508と同様である。   In step S512, the control circuit 231 dequeues and acquires the first packet in the queue of the buffer unit 220 and time information. The details of step S512 are the same as step S508.

そして、ステップS513で制御回路231は、図5のレジスタRに格納されている時刻情報と、内部クロックすなわち内部カウンタ233の示す時刻とを読み取り、2つの時刻を比較する。内部カウンタ233が示す時刻が、パケットの送信予定時刻(すなわちレジスタRに格納されている時刻情報が示す時刻)に達していれば、処理はステップS514に移行する。 Then, the control circuit 231 in step S513 reads the time information stored in the register R 7 of FIG. 5, the internal clock That time indicated by the internal counter 233 and compares the two times. The time indicated by the internal counter 233, if reached scheduled transmission time of the packet (i.e., the time indicated by the time information stored in the register R 7), the process proceeds to step S514.

他方、内部カウンタ233が示す時刻がパケットの送信予定時刻に達していなければ、処理はステップS513に戻る。すなわち、制御回路231は、内部カウンタ233の示す時刻がパケットの送信予定時刻に達するまで待機する。ステップS509と同様に、ステップS513の処理には、割り込みが利用可能である。   On the other hand, if the time indicated by the internal counter 233 has not reached the scheduled transmission time of the packet, the process returns to step S513. That is, the control circuit 231 waits until the time indicated by the internal counter 233 reaches the scheduled packet transmission time. As in step S509, an interrupt can be used for the processing in step S513.

そして、ステップS514で制御回路231は、ステップS512でデキューしたパケットの送信を実施する。ステップS514の詳細は、ステップS510と同様である。ステップS514の実行後、処理はステップS511に戻る。   In step S514, the control circuit 231 transmits the packet dequeued in step S512. The details of step S514 are the same as step S510. After execution of step S514, the process returns to step S511.

ところで、以上詳細に説明した本実施形態の利点は、図2に関する説明の後に簡単に述べたとおりであるが、より詳細に考察すれば下記のごとくである。以下、本実施形態の利点を明らかにするため、第1比較例としてハードウェア単独でのQoS制御の例を取り上げ、第2比較例としてソフトウェア単独でのQoS制御の例を取り上げる。本実施形態は、上記のとおり、ソフトウェアとハードウェアが連携するハイブリッド方式を採用している。   By the way, the advantages of the present embodiment described in detail above are as described briefly after the description relating to FIG. 2, but are as follows when considered in more detail. Hereinafter, in order to clarify the advantages of the present embodiment, an example of QoS control with hardware alone is taken as a first comparative example, and an example of QoS control with software alone is taken as a second comparative example. As described above, this embodiment employs a hybrid system in which software and hardware cooperate.

第1比較例では、下記(f1)と(f2)の問題が生じる。
(f1)キューイング処理における困難
パケットの種類を識別し適切なキューにパケットをエンキューするキューイング処理をハードウェアで実現することは困難である。その理由は、種類を識別する処理が複雑であり、新たなネットワークサービスの出現などにともなってキューイング処理への機能追加が求められることも多々あるからである。
In the first comparative example, the following problems (f1) and (f2) occur.
(F1) Difficulties in queuing process It is difficult to implement a queuing process that identifies the type of packet and enqueues the packet in an appropriate queue by hardware. The reason for this is that the type identification process is complicated, and it is often required to add a function to the queuing process as a new network service appears.

一般に、ソフトウェアを使わずにハードウェア回路により複雑な処理を実装するのは困難であり、たとえ実装可能だとしても、開発コストなどが嵩む。また、機能追加が求められると、種別を識別する処理ロジックの変更にともなってハードウェア回路の設計をやり直すことになる。よって、第1比較例において頻繁な機能追加に対応することは、コストの面から非現実的である。   In general, it is difficult to implement a complex process using a hardware circuit without using software, and even if it can be implemented, development costs increase. When a function addition is required, the hardware circuit is redesigned in accordance with the change of the processing logic for identifying the type. Therefore, it is unrealistic from the viewpoint of cost to cope with frequent function addition in the first comparative example.

また、従来のQoS制御では、パケットに含まれる低位レイヤ(例えばL2またはL3)のヘッダ中の特定のフィールドの値に応じてキューを割り当てることが行われていたが、近年では、QoS制御により多くのことが望まれる。具体的には、L4ないしL7といった高位レイヤのヘッダに含まれる情報まで用いてパケットの種別を識別することにより、よりきめ細やかなQoS制御を実現することが望まれるようになりつつある。   Further, in the conventional QoS control, a queue is assigned according to the value of a specific field in the header of a lower layer (for example, L2 or L3) included in the packet. It is desirable. Specifically, it is becoming desirable to realize finer QoS control by identifying packet types using information included in higher layer headers such as L4 to L7.

高位レイヤの情報は、低位レイヤのヘッダ(と、場合によってはトレイラ)によってカプセル化されているので、高位レイヤの情報を得るにはパケットを深く調べなくてはならない。しかし、仮に、ハードウェア回路によってパケットを深く調べ、高位レイヤの情報を使ったQoS制御を実現しようとすれば、回路の規模も複雑さも増大し、その結果として、回路の開発段階で不具合の発生も増える。その結果、不具合を克服して製造段階に至ること自体が、非常に困難である。   Since the higher layer information is encapsulated by the lower layer header (and possibly a trailer), the packet must be scrutinized to obtain the higher layer information. However, if a packet is deeply examined by a hardware circuit and QoS control using information in a higher layer is realized, the scale and complexity of the circuit will increase, resulting in the occurrence of defects at the circuit development stage. Will also increase. As a result, it is very difficult to overcome the defects and reach the manufacturing stage.

さらに、近年は次々と新しいアプリケーションが増えている。これらの新たなアプリケーションに逐一対応してQoS制御の処理ロジックを頻繁に変更することは、上記のとおり非現実的である。   In addition, new applications are increasing in recent years. As described above, it is impractical to frequently change the QoS control processing logic in correspondence with these new applications.

(f2)スケジューリング処理における困難
一般にスケジューリング処理は、1つのポートに対応して用意されている複数のキューのすべてに対して、個々のパケットを実際に送信するタイミングを制御する処理や、キュー間での調停処理を含む。このようなスケジューリング処理をハードウェア回路により実現するのは困難であり、不具合の発生を防ぐことは非常に難しい。また、不具合に対処するためにも大変な注意と膨大な検証を要する。
(F2) Difficulties in scheduling processing In general, scheduling processing is a process for controlling the timing of actually transmitting individual packets for all of a plurality of queues prepared for one port, and between queues. Mediation process. It is difficult to implement such scheduling processing by a hardware circuit, and it is very difficult to prevent the occurrence of defects. Moreover, great care and enormous verification are required in order to deal with defects.

そこで、不具合の発生を抑えるための現実的な対策としては、キューの本数を8本程度の少ない本数に制限し、QoS制御の機能も制限することが考えられる。しかし、その代償として、きめ細やかなQoS制御を達成することはできなくなる。   Therefore, as a practical measure for suppressing the occurrence of problems, it is conceivable to limit the number of queues to a small number of about 8, and to limit the QoS control function. However, at the cost of this, detailed QoS control cannot be achieved.

以上のように第1比較例では(f1)と(f2)の問題が発生する一方で、第2比較例では、下記(f3)の問題が生じる。
(f3)スケジューリング処理における困難
第2比較例においては、第1比較例における(f1)の問題は生じないか、または軽微である。すなわち、ソフトウェアによる制御では、処理アルゴリズムを柔軟に記述することが可能なので、高位レイヤの情報を用いてパケットの種別をきめ細やかに識別することが比較的容易であり、頻繁な更新にも比較的対応しやすい。しかし、第2比較例ではスケジューリング処理に問題がある。
As described above, the problems (f1) and (f2) occur in the first comparative example, while the problem (f3) described below occurs in the second comparative example.
(F3) Difficulty in scheduling processing In the second comparative example, the problem (f1) in the first comparative example does not occur or is slight. In other words, software control can flexibly describe processing algorithms, so it is relatively easy to finely identify packet types using high-layer information, and it is relatively easy to update frequently. Easy to handle. However, the second comparative example has a problem in the scheduling process.

例えば帯域制御を実現するためには、スケジューリング処理は、1つのポートに対応して用意されている複数のキューのすべてに対して、個々のパケットを実際に送信するタイミングを制御する処理を含むことになる。また、優先制御を実現するためには、スケジューリング処理は、次にパケットをデキューするキューを選択する処理を含み、場合によっては同じ優先度の複数のキュー間での調停処理を含む。そして、キュー間の調停や送信のタイミングの制御には、時間的に非常にシビアな処理が求められる。   For example, in order to realize bandwidth control, the scheduling process includes a process for controlling the timing of actually transmitting individual packets for all of a plurality of queues prepared corresponding to one port. become. In order to realize priority control, the scheduling process includes a process of selecting a queue for dequeuing a packet next, and in some cases includes an arbitration process between a plurality of queues having the same priority. In order to perform arbitration between queues and control of transmission timing, processing that is very severe in time is required.

しかし、ソフトウェアによる制御は一般にハードウェアによる制御に比べて速度で劣る。そのため、所望の精度で時間的に正確な送信を第2比較例において実現することは困難である。その理由は、以下のとおり、第2比較例において考えられる様々なアプローチそれぞれに欠点があるからである。   However, control by software is generally inferior in speed to control by hardware. Therefore, it is difficult to realize temporally accurate transmission with desired accuracy in the second comparative example. The reason for this is that each of the various approaches considered in the second comparative example has drawbacks as follows.

第2比較例においては、例えば自然で単純な設計として、一定の間隔でスケジューリング処理を呼び出し、当該間隔の時間内でパケットを送信することが考えられる。説明の便宜上、例えば、上記間隔は10msであり、あるキュー(以下、便宜的に「キューX」という)には「1秒間に1000パケットを送信する」と示すQoS値が設定されているものとする。すると、
1000[パケット]×10[ms]/1000[ms]=10[パケット]
なので、設定どおりの送信のためには、1回スケジューリング処理が呼び出されるごとにキューXから10パケットを送信することになる。10msの間に10パケットを送信することは、可能かもしれない。
In the second comparative example, for example, as a natural and simple design, it is conceivable to call a scheduling process at a constant interval and transmit a packet within the time interval. For convenience of explanation, for example, the interval is 10 ms, and a QoS value indicating that “1000 packets are transmitted per second” is set in a certain queue (hereinafter referred to as “queue X” for convenience). To do. Then
1000 [packet] × 10 [ms] / 1000 [ms] = 10 [packet]
Therefore, 10 packets are transmitted from the queue X every time the scheduling process is called for transmission as set. It may be possible to send 10 packets in 10 ms.

しかし、もしキューXに「1秒間に1000万パケットを送信する」と設定されていれば、1回スケジューリング処理が呼び出されるごとにキューXから10万パケットを送信することになる。10msの間に10万パケットを送信する制御をソフトウェアで実現することは非現実的である。   However, if “send 10 million packets per second” is set in queue X, 100,000 packets will be sent from queue X each time the scheduling process is called. It is impractical to realize control for transmitting 100,000 packets in 10 ms by software.

なお、パケット数ではなくバイト数でQoS値が表されていても同様である。つまり、キューに低い帯域が設定されている場合は、10msという期間内でスケジューリング処理とパケットの送信を完了することが可能であっても、帯域の設定値が大きい場合は。10msという期間内で処理を完了することができない可能性が高い。なぜなら、帯域の設定値が大きい場合は、1回のスケジューリング処理における処理対象のパケットの数も多く、10msあたりの処理量も多いからである。   The same applies if the QoS value is represented not by the number of packets but by the number of bytes. In other words, when a low bandwidth is set in the queue, the scheduling processing and packet transmission can be completed within a period of 10 ms, but the bandwidth setting value is large. There is a high possibility that the process cannot be completed within a period of 10 ms. This is because when the bandwidth setting value is large, the number of packets to be processed in one scheduling process is large and the processing amount per 10 ms is also large.

そこで、第2比較例においては、スケジューリング処理の呼び出し間隔を長くするというアプローチが考えられるが、下記の理由から、ジッタを大きくしてしまうという問題をはらんでおり、非実用的である。   Therefore, in the second comparative example, an approach of increasing the calling interval of the scheduling process can be considered. However, for the following reason, there is a problem of increasing the jitter, which is impractical.

例えば、呼び出し間隔を1sとし、キューXには上記と同じく「1秒間に1000パケットを送信する」と設定されているものとする。すると、10msを単位とした10パケットずつの送信が繰り返されるかわりに、1sごとにバースト的に一気に1000パケットが送信されることになる。この場合、受信側の装置からは、「回線速度で一気に1000パケットの受信が続き、その後1s近くパケットの受信が途絶える」というパターンの繰り返しにより、パケットが送信されている、と見える。   For example, it is assumed that the call interval is 1 s and that “send 1000 packets per second” is set in the queue X as described above. Then, instead of repeating transmission of 10 packets in units of 10 ms, 1000 packets are transmitted in bursts every 1 s. In this case, from the receiving side device, it is seen that the packet is transmitted by repeating the pattern that “the reception of 1000 packets continues at a line speed and then the reception of packets for about 1 s stops thereafter”.

ところで、近年では回線が広帯域化しており、10Gbps以上の回線も珍しくない。すると、上記の例では非常に短い時間の間に1000パケットが受信される。よって、バッファ溢れ等でパケットロスに陥らないようにするには、受信側の装置は、1000パケットを格納可能なバッファを備える必要がある。   By the way, in recent years, the line has become wider, and a line of 10 Gbps or higher is not uncommon. Then, 1000 packets are received in a very short time in the above example. Therefore, in order to prevent packet loss due to buffer overflow or the like, the receiving apparatus needs to have a buffer capable of storing 1000 packets.

また、1sごとのバースト送信ではジッタが大きくなり、音声等のリアルタイム性が問われる通信では、品質が大きく劣化する。例えば、ジッタがあまりに大きいと、スムーズな会話ができなくなるといった不具合が生じる。   In addition, jitter is increased in burst transmission every 1 s, and quality is greatly deteriorated in communication in which real-time property such as voice is required. For example, if the jitter is too large, there is a problem that smooth conversation cannot be performed.

このように、スケジューリング処理の呼び出し間隔を長くするというアプローチは、バッファ容量の面からもジッタの面からも問題がある。
そこで、第2比較例においては、逆に、スケジューリング処理の呼び出し間隔を短くするというアプローチも考えられる。しかし、上記のとおり、例えば10msという間隔でも、キューに設定された帯域の値によっては、処理が完了しないかもしれない。また、一定間隔での処理の呼び出しには割り込みが使われることが多いが、呼び出し間隔を短くするほど割り込みの発生頻度が上がり、割り込みのオーバヘッドも無視することができなくなる。そのため、第2比較例では、スケジューリング処理の呼び出し間隔が長くても短くても、それぞれに問題が生じる。
As described above, the approach of increasing the calling interval of the scheduling process has a problem in terms of both buffer capacity and jitter.
Therefore, in the second comparative example, conversely, an approach of shortening the calling interval of the scheduling process can be considered. However, as described above, even if the interval is, for example, 10 ms, the process may not be completed depending on the value of the bandwidth set in the queue. In addition, interrupts are often used to call processing at regular intervals, but as the call interval is shortened, the frequency of occurrence of interrupts increases, and the overhead of interrupts cannot be ignored. Therefore, in the second comparative example, a problem arises regardless of whether the calling interval of the scheduling process is long or short.

そこで第2比較例におけるさらに別のアプローチとして、複数のCPUを利用してスケジューリング処理を分散して行うことも考えられる。しかし、一般のスケジューリング処理には分散することのできない調停処理が含まれるため、並列分散処理のメリットは限定的である。   Therefore, as another approach in the second comparative example, it can be considered that the scheduling process is performed in a distributed manner using a plurality of CPUs. However, since general scheduling processing includes arbitration processing that cannot be distributed, the benefits of parallel distributed processing are limited.

例えば、10本のキューがあり、それぞれに帯域が設定されているとする。あるキューから1つパケットを送信した後、次にどのキューからパケットを送信するのかを決定するためには、10本のキューすべてについて当該キュー内で次に送信する対象のパケットの送信予定時刻を計算し、10個の時刻を比較することになる。   For example, it is assumed that there are 10 queues and the bandwidth is set for each. In order to determine from which queue a packet is to be transmitted next after one packet is transmitted from a certain queue, the scheduled transmission time of the packet to be transmitted next in the queue is determined for all ten queues. Calculate and compare 10 times.

例えば、送信予定時刻の計算は、各キューに対応する10個のCPUで分散して行うことも可能だが、10個の時刻を比較する処理、すなわち10本のキュー間での調停処理は、分散して実行するのが不適当である。したがって、複数のCPUを利用したとしても、並列処理による処理時間の短縮はあまり期待できない。   For example, the calculation of the scheduled transmission time can be performed in a distributed manner with 10 CPUs corresponding to each queue, but the process of comparing 10 times, that is, the arbitration process between 10 queues is distributed. It is inappropriate to execute it. Therefore, even if a plurality of CPUs are used, the reduction of processing time due to parallel processing cannot be expected.

よって、いずれのアプローチを採用しても、第2比較例においては、スケジューリング処理の複雑性とリアルタイム性を両立させることが非常に困難である。
以上の第1および第2比較例と比べて再度本実施形態について検討すると、以下のとおり様々な利点がある。
Therefore, whichever approach is adopted, in the second comparative example, it is very difficult to achieve both the complexity of the scheduling process and the real-time property.
When this embodiment is examined again as compared with the first and second comparative examples, there are various advantages as follows.

(g1)きめ細やかで複雑なQoS制御と、優れた拡張性
本実施形態では、パケットの種別を識別するキューイング処理はパケット種別識別部101が行い、スケジューリング処理はスケジューラ部103が行う。また、本実施形態では(f2)の問題がないので、キュー群102のキューの本数nを少なく制限する必要もない。
(G1) Fine and complex QoS control and excellent extensibility In this embodiment, the packet type identifying unit 101 performs the queuing process for identifying the packet type, and the scheduler unit 103 performs the scheduling process. Further, in the present embodiment, since there is no problem of (f2), it is not necessary to limit the number n of queues in the queue group 102 to be small.

よって、本実施形態によれば、キュー群102に多数のキューを設けて高位レイヤの情報を用いるなどして、きめ細やかで複雑なQoS制御を実現することが可能であり、(f1)および(f2)の問題が解決される。また、パケット種別識別部101とスケジューラ部103がソフトウェアを使って実現されるので、本実施形態は、キューイング処理やスケジューリング処理のアルゴリズムの頻繁な変更にも対応しやすく、拡張性に優れている。   Therefore, according to the present embodiment, it is possible to realize fine and complex QoS control by providing a large number of queues in the queue group 102 and using information of a higher layer, and the like (f1) and ( The problem of f2) is solved. In addition, since the packet type identification unit 101 and the scheduler unit 103 are realized using software, this embodiment is easy to deal with frequent changes in algorithms for queuing processing and scheduling processing, and has excellent expandability. .

(g2)高いリアルタイム性
本実施形態によれば、ハードウェア回路であるMACチップ304−j(1≦j≦m)により実現されるハードウェア制御部200は、図9と図11の処理を実行するだけで、パケットの種別を識別するキューイング処理やスケジューリング処理は行わない。つまり、ハードウェア制御部200は、予め指定された時刻情報にしたがって送信予定時刻になるまでパケットの送信を遅延させるという、比較的単純な処理を行っている。
(G2) High Real-Time Property According to the present embodiment, the hardware control unit 200 realized by the MAC chip 304-j (1 ≦ j ≦ m) that is a hardware circuit executes the processes of FIG. 9 and FIG. Only the queuing process and the scheduling process for identifying the packet type are not performed. That is, the hardware control unit 200 performs a relatively simple process of delaying packet transmission until the scheduled transmission time is reached according to time information designated in advance.

よって、本実施形態は、上記(f1)と(f2)の問題を避けることができ、ハードウェア制御部200を実現するMACチップ304−1〜304−mの製作工数および開発コストを削減することもできる。   Therefore, this embodiment can avoid the above problems (f1) and (f2), and reduce the man-hours and development costs of the MAC chips 304-1 to 304-m that implement the hardware control unit 200. You can also.

そして、本実施形態によれば、内部カウンタ233という比較的単純なハードウェアを利用するだけで厳密なタイミング制御を実現することができ、パケットを送信予定時刻どおりに正確に送信することができる。したがって、上記(f3)のようなジッタは、本実施形態においては生じない。その結果、高いリアルタイム性が実現される。   According to the present embodiment, strict timing control can be realized only by using a relatively simple hardware such as the internal counter 233, and a packet can be transmitted accurately according to a scheduled transmission time. Therefore, the jitter as described in (f3) does not occur in this embodiment. As a result, a high real-time property is realized.

(g3)上記(g1)と(g2)の両立
上記(f1)〜(f3)の考察から明らかなように、第1または第2比較例においては、複雑なQoS制御とリアルタイム性とを両立させることが非常に困難であり、拡張性とリアルタイム性を両立させることも非常に困難である。それに対して本実施形態では、上記のとおり、ソフトウェアとハードウェアそれぞれの特長を活かしてソフトウェア制御部100とハードウェア制御部200が連携することにより、上記(g1)と(g2)をともに実現することができる。
(G3) Coexistence of (g1) and (g2) As is clear from the considerations of (f1) to (f3) above, in the first or second comparative example, both complex QoS control and real-time characteristics are achieved. It is very difficult to achieve both scalability and real-time performance. On the other hand, in this embodiment, as described above, the software control unit 100 and the hardware control unit 200 cooperate with each other by utilizing the features of software and hardware, thereby realizing both (g1) and (g2). be able to.

換言すれば、本実施形態では、ソフトウェア制御部100とハードウェア制御部200が、協働しながらも各々独立して並行に処理を進めるため、上記(g1)と(g2)の両立が可能となっている。   In other words, in the present embodiment, since the software control unit 100 and the hardware control unit 200 cooperate with each other and proceed in parallel independently, the above (g1) and (g2) can be compatible. It has become.

つまり、ソフトウェア制御部100でスケジューリング処理が呼び出される間隔Δτによらず、ハードウェア制御部200は、ジッタのない正確な送信予定時刻どおりのパケットの送信を行うことができる。したがって、間隔Δτは、実際のパケットの送信間隔を考慮することなく、ソフトウェア制御部100にとって適切な値に決めることができる。   That is, regardless of the interval Δτ at which the scheduling process is called by the software control unit 100, the hardware control unit 200 can transmit a packet according to an accurate scheduled transmission time without jitter. Therefore, the interval Δτ can be determined to be an appropriate value for the software control unit 100 without considering the actual packet transmission interval.

例えば、間隔Δτは、ソフトウェア制御部100を実現するCPU301やメモリユニット302の仕様に基づいて、割り込み処理のオーバヘッドやキュー群102の容量などに応じた適切な値に決めることができる。なお、間隔Δτは、スケジューラ部103を実現するソフトウェアに予め定数としてプログラムされていてもよい。   For example, the interval Δτ can be determined to an appropriate value according to the interrupt processing overhead, the capacity of the queue group 102, and the like based on the specifications of the CPU 301 and the memory unit 302 that implement the software control unit 100. Note that the interval Δτ may be programmed in advance in software that implements the scheduler unit 103 as a constant.

また、本実施形態は、第1および第2比較例に対する上記(g1)〜(g3)の利点を有するだけでなく、下記(g4)の効果を奏し、(g4)の効果は(g5)の仕組みにより支えられている。したがって、本実施形態のパケット送信制御装置1は、今後ますます求められるようになるネットワーク上でのQoS処理における様々な要求に応えることができる。   Moreover, this embodiment has not only the advantages (g1) to (g3) described above with respect to the first and second comparative examples, but also the following effect (g4), and the effect (g4) is that of (g5). Supported by the mechanism. Therefore, the packet transmission control device 1 according to the present embodiment can meet various requests for QoS processing on the network that will be increasingly required in the future.

(g4)複数のパケットの送信を一度にまとめて依頼することによる効率化
近年の広帯域化に適したQoS制御を実現するには、処理がなるべく効率化されていることが好ましい。本実施形態では、図6のステップS109のように複数のパケットの送信をスケジューラ部103がまとめてバッファ格納処理部210に依頼することで、効率化が達成されており、処理時間も短縮されている。本実施形態で効率化が可能な理由を、第3比較例と比べながら説明すれば以下のとおりである。
(G4) Efficiency improvement by requesting transmission of a plurality of packets all at once In order to realize QoS control suitable for wide band in recent years, it is preferable that the processing is made as efficient as possible. In this embodiment, as shown in step S109 of FIG. 6, the scheduler unit 103 collectively requests the buffer storage processing unit 210 to transmit a plurality of packets, thereby achieving efficiency and shortening the processing time. Yes. The reason why efficiency can be improved in this embodiment will be described as follows in comparison with the third comparative example.

以下に第3比較例として取り上げる、ある種のQoS制御装置では、n本のキューが存在する場合、スケジューリング処理が呼び出されるたびに以下の一連の処理が行われる。
・すべてのh(1≦h≦n)について、h番目のキューの設定値(例えば設定された帯域の値)を使ってh番目のキューの先頭のパケットの送信予定時刻を計算すること。
In a certain QoS control apparatus, which will be taken up as a third comparative example below, when n queues exist, the following series of processes is performed every time the scheduling process is called.
For all h (1 ≦ h ≦ n), use the setting value of the h-th queue (for example, the set bandwidth value) to calculate the scheduled transmission time of the first packet in the h-th queue.

・計算したn個の送信予定時刻の中で最も早いものを選択すること。
・選択した送信予定時刻に対応するキューから先頭のパケットをデキューすること。
・デキューしたパケットを、選択した送信予定時刻に送信するよう、後段の処理に依頼すること。
Select the earliest of the calculated n scheduled transmission times.
-Dequeue the first packet from the queue corresponding to the selected scheduled transmission time.
-Request the subsequent processing to send the dequeued packet at the selected scheduled transmission time.

つまり、第3比較例では、1つのパケットのデキューのためにn個の送信予定時刻が比較される。換言すれば、スケジューリング処理の呼び出し間隔(すなわち割り込み間隔)Δτの間に行われるn個の送信予定時刻間の比較処理の回数は、間隔Δτの間に出力されるパケットの数と同じである。   That is, in the third comparative example, n transmission scheduled times are compared for dequeuing one packet. In other words, the number of comparison processes between n scheduled transmission times performed during the scheduling process call interval (that is, the interrupt interval) Δτ is the same as the number of packets output during the interval Δτ.

このように第3比較例では、ジッタを抑制して送信予定時刻どおりにパケットを送信することを目的として、1つのパケットをデキューするたびに、毎回n個の送信予定時刻間の比較処理が行われる。しかしキューに設定された帯域が大きい場合やキューの本数nが多い場合は、比較処理の処理量は、無視することができず、場合によっては厖大な量となる。   As described above, in the third comparative example, each time a packet is dequeued, a comparison process between n transmission scheduled times is performed every time a packet is dequeued for the purpose of suppressing the jitter and transmitting the packet according to the transmission scheduled time. Is called. However, when the bandwidth set for the queue is large or when the number of queues n is large, the processing amount of the comparison process cannot be ignored and may be a large amount depending on the case.

他方、本実施形態では第3比較例のような比較処理が不要であり、処理が効率化されている。本実施形態において、毎回の比較処理が不要であり、図6のステップS109のようにあるキュー102−hにエンキューされた複数のパケットについてまとめて送信をバッファ格納処理部210に依頼することが可能な理由は、次のとおりである。   On the other hand, in the present embodiment, the comparison process as in the third comparative example is unnecessary, and the process is made efficient. In this embodiment, each time comparison processing is unnecessary, and it is possible to request the buffer storage processing unit 210 to collectively transmit a plurality of packets enqueued in the queue 102-h as in step S109 of FIG. The reason is as follows.

すなわち、本実施形態では、スケジューラ部103がバッファ格納処理部210に送信を依頼する順序は、必ずしもパケットの送信予定時刻順ではない。なぜなら、スケジューラ部103は、キュー間での送信予定時刻の比較を行わないからである。   That is, in the present embodiment, the order in which the scheduler unit 103 requests the buffer storage processing unit 210 to transmit is not necessarily the order of packet transmission scheduled times. This is because the scheduler unit 103 does not compare scheduled transmission times between queues.

しかし、本実施形態によれば、送信予定時刻順にパケットを処理するソート処理は、バッファ格納処理部210による図9の処理に含まれており、下記(g5)の仕組みにより、送信順序が逆転しないことが保証される。よって、たとえスケジューラ部103がパケットの送信予定時刻順とは異なる順序でパケットの送信を依頼しても、「送信依頼の順序が送信予定時刻順でないためにパケットの送信順が狂い、ジッタが発生する」といった事態には陥らない。   However, according to the present embodiment, the sort processing for processing packets in the order of the scheduled transmission time is included in the processing of FIG. 9 by the buffer storage processing unit 210, and the transmission order is not reversed by the mechanism (g5) below. It is guaranteed. Therefore, even if the scheduler unit 103 requests packet transmission in an order different from the order in which packets are scheduled to be transmitted, “the order of transmission requests is not in the order of scheduled transmission times, so the order in which packets are transmitted out of order and jitter occurs. It does not fall into the situation.

すなわち、本実施形態によれば、スケジューリング処理においてn個の送信予定時刻同士の比較を繰り返す必要がないので、スケジューラ部103によるスケジューリング処理の簡略化および効率化が達成されている。また、この効率化は、ソフトウェア制御部100とハードウェア制御部200の連携により、送信予定時刻どおりの正確な送信を犠牲にすることなく達成される。   That is, according to the present embodiment, since it is not necessary to repeat comparison of n transmission scheduled times in the scheduling process, simplification and efficiency of the scheduling process by the scheduler unit 103 is achieved. In addition, this efficiency is achieved without sacrificing accurate transmission according to the scheduled transmission time by the cooperation of the software control unit 100 and the hardware control unit 200.

(g5)送信の順序の逆転を防ぐ仕組み
上記(g4)の効果は、パケットの送信依頼の順が送信予定時刻順と違っていても実際の送信の順序では逆転が生じないことが保証されてこそ、有効である。本実施形態では逆転を防ぐために以下の仕組みが利用される。
(G5) Mechanism for preventing reversal of transmission order The effect of the above (g4) is guaranteed that no reversal occurs in the actual transmission order even if the order of packet transmission requests is different from the order of scheduled transmission times. It is effective. In the present embodiment, the following mechanism is used to prevent reverse rotation.

絶対時刻モードにおいて逆転を防ぐ仕組みは、式(3)中のτmargin(≧Δτ)である。実施形態によって図6のステップS105で用いられる計算式は任意であり、式(3)以外の式が用いられてもよい。しかし、絶対時刻モードにおいて送信の順序の逆転を防ぐために、スケジューラ部103は、ステップS105ではどのパケットに対しても送信予定時刻として(τ+τmargin)以降の時刻を計算することが望ましい。 The mechanism for preventing reverse rotation in the absolute time mode is τ margin (≧ Δτ) in the equation (3). Depending on the embodiment, the calculation formula used in step S105 of FIG. 6 is arbitrary, and formulas other than formula (3) may be used. However, in order to prevent reversal of the transmission order in the absolute time mode, it is desirable that the scheduler unit 103 calculates a time after (τ 0 + τ margin ) as a scheduled transmission time for any packet in step S105.

例えば、スケジューリング処理の呼び出し間隔Δτが10msであり、τmargin=Δτでもよい。なお、間隔Δτは、間隔Δτの間に受信可能な量のパケットについてのスケジューリング処理をスケジューラ部103が間隔Δτの間に終了することができるように(すなわちスケジューリング処理が破綻しないように)、予め決められている。 For example, the scheduling process call interval Δτ may be 10 ms, and τ margin = Δτ. Note that the interval Δτ is set in advance so that the scheduler unit 103 can complete the scheduling process for the amount of packets that can be received during the interval Δτ during the interval Δτ (that is, the scheduling process does not fail). It has been decided.

間隔Δτの決定にあたっては、パケット送信制御装置1の各ポート306−1〜306−mに接続可能なケーブルの種類や割り込み処理のオーバヘッドなどが考慮されてもよい。また、間隔Δτでスケジューリング処理を行うのに十分な性能のCPU301が選ばれてパケット送信制御装置1に搭載されている。   In determining the interval Δτ, the type of cable that can be connected to each of the ports 306-1 to 306-m of the packet transmission control device 1 and the overhead of interrupt processing may be taken into consideration. In addition, a CPU 301 having sufficient performance for performing the scheduling process at the interval Δτ is selected and mounted in the packet transmission control apparatus 1.

時刻τに呼び出された図6のスケジューリング処理において、スケジューラ部103がどのパケットに対しても送信予定時刻として(τ+τmargin)以降の時刻を計算することで、送信の順序の逆転は防止される。理由は以下のとおりである。 In the scheduling process of FIG. 6 called at time τ 0 , the scheduler unit 103 calculates the time after (τ 0 + τ margin ) as the scheduled transmission time for any packet, thereby preventing the transmission order from being reversed. Is done. The reason is as follows.

上記のとおり間隔Δτは、スケジューリング処理が破綻しないように予め適切に決められている。よって、時刻τに呼び出された今回のスケジューリング処理が完了する時刻は(τ+Δτ)以前である。 As described above, the interval Δτ is appropriately determined in advance so that the scheduling process does not fail. Therefore, the time when the current scheduling process called at time τ 0 is completed is before (τ 0 + Δτ).

また、どのパケットに対しても送信予定時刻として(τ+τmargin)以降の時刻が計算されるとすると、τmargin≧Δτなので、今回のスケジューリング処理において計算される送信予定時刻は、いずれも(τ+Δτ)以降である。よって、今回のスケジューリング処理で計算される送信予定時刻はいずれも、今回のスケジューリング処理の完了以降の時刻である。 Further, if a time after (τ 0 + τ margin ) is calculated as the scheduled transmission time for any packet, since τ margin ≧ Δτ, any of the scheduled transmission times calculated in this scheduling process is ( (τ 0 + Δτ) or later. Therefore, all the scheduled transmission times calculated in the current scheduling process are times after the completion of the current scheduling process.

ここで、簡単のため、バッファ格納処理部210による図9の処理にかかる時間を無視することができるとする。
すると、今回のスケジューリング処理においてスケジューラ部103がバッファ格納処理部210に送信を依頼したすべてのパケットが、送信予定時刻以前に、送信予定時刻順にソートされた状態でバッファ部220に格納される。そして、バッファ部220に格納された複数のパケットは、送信予定時刻どおりに、順に送信処理部230によりPHYチップ305−j(1≦j≦m)へ出力され、ポート306−jから送信される。
Here, for simplicity, it is assumed that the time required for the processing of FIG. 9 by the buffer storage processing unit 210 can be ignored.
Then, in the current scheduling process, all packets requested by the scheduler unit 103 to be transmitted to the buffer storage processing unit 210 are stored in the buffer unit 220 in a state of being sorted in order of the scheduled transmission time before the scheduled transmission time. The plurality of packets stored in the buffer unit 220 are sequentially output to the PHY chip 305-j (1 ≦ j ≦ m) by the transmission processing unit 230 in accordance with the scheduled transmission time, and transmitted from the port 306-j. .

つまり、τmargin≧Δτであれば、今回のスケジューリング処理における送信予定のパケットの送信順が逆転することがない、と保証される。
また、バッファ格納処理部210による図9の処理にかかる時間の最大値(τsortとする)を無視することができない場合についても同様である。すなわち、τmargin≧Δτ+τsortであれば、パケットの送信順が逆転することがない、と保証される。
That is, if τ margin ≧ Δτ, it is guaranteed that the transmission order of packets scheduled to be transmitted in the current scheduling process will not be reversed.
The same applies to the case where the maximum value of the time required for the processing of FIG. 9 by the buffer storage processing unit 210 (tau sort ) cannot be ignored. That is, if τ margin ≧ Δτ + τ sort , it is guaranteed that the packet transmission order will not be reversed.

他方、相対時刻モードにおいて逆転を防ぐ仕組みは、図4のバッファ探索開始位置と送信開始指示を使った処理である。以下に、図6〜図12の間の関連を補足しながら、送信順の逆転が生じない理由を説明する。   On the other hand, the mechanism for preventing reverse rotation in the relative time mode is a process using the buffer search start position and the transmission start instruction in FIG. The reason why the transmission order is not reversed will be described below while supplementing the relationship between FIGS.

説明の便宜上、例えば間隔Δτ=10[ms]とすると、相対時刻モードでは、送信予定時刻は、0ms以上10ms以下の値で表される。送信予定時刻が10msを超えないのは、スケジューリング処理のたびに内部カウンタ233が0にリセットされるからである。   For convenience of explanation, assuming that the interval Δτ = 10 [ms], for example, in the relative time mode, the scheduled transmission time is represented by a value between 0 ms and 10 ms. The reason why the scheduled transmission time does not exceed 10 ms is that the internal counter 233 is reset to 0 every time the scheduling process is performed.

すなわち、スケジューラ部103は、図6のステップS102の処理により、時刻τ0に呼び出された今回のスケジューリング処理の開始をバッファ格納処理部210に通知する。すると、バッファ格納処理部210が図7の処理を実行する。そして、送信処理部230は、もし前回のスケジューリング処理の結果としてバッファ部220に残っているパケットがあれば、図11のステップS504〜S510の処理を繰り返す。やがて、前回のスケジューリング処理の結果としてバッファ部220に残っているパケットがなくなると、ステップS503において内部カウンタ233がリセットされる。つまり、スケジューラ部103は、スケジューリング処理の開始を通知することで、送信開始指示の値の変化を引き起こし、間接的に、相対時刻のカウント開始をハードウェア制御部200に指示している。   That is, the scheduler unit 103 notifies the buffer storage processing unit 210 of the start of the current scheduling process called at time τ0 by the process of step S102 of FIG. Then, the buffer storage processing unit 210 executes the process of FIG. Then, if there is a packet remaining in the buffer unit 220 as a result of the previous scheduling process, the transmission processing unit 230 repeats the processes of steps S504 to S510 in FIG. Eventually, when there is no packet remaining in the buffer unit 220 as a result of the previous scheduling process, the internal counter 233 is reset in step S503. In other words, the scheduler unit 103 notifies the start of the scheduling process, thereby causing a change in the value of the transmission start instruction, and indirectly instructs the hardware control unit 200 to start counting relative time.

その後、スケジューラ部103は、ステップS113の処理により、今回のスケジューリング処理の終了をバッファ格納処理部210に通知する。すると、バッファ格納処理部210が図8の処理を実行する。その結果、送信処理部230がステップS504の判断に続いてステップS507を実行し、今回のスケジューリング処理において送信予定時刻が計算されたパケットの送信が始まる。   Thereafter, the scheduler unit 103 notifies the buffer storage processing unit 210 of the end of the current scheduling process through the process of step S113. Then, the buffer storage processing unit 210 executes the process of FIG. As a result, the transmission processing unit 230 executes step S507 following the determination in step S504, and transmission of the packet whose transmission scheduled time is calculated in the current scheduling process is started.

以上のようにして、スケジューリング処理のたびに内部カウンタ233が0にリセットされる。よって、相対時刻モードでは、送信予定時刻は、内部カウンタ233がリセットされた時点を基準時刻として、0以上Δτ以下の値で表される。   As described above, the internal counter 233 is reset to 0 for each scheduling process. Therefore, in the relative time mode, the scheduled transmission time is represented by a value not less than 0 and not more than Δτ, with the time when the internal counter 233 is reset as the reference time.

また、図12に例示したパケットP〜Pのように、今回のスケジューリング処理が行われている期間中、バッファ部220には、時刻(τ−Δτ)に呼び出された前回のスケジューリング処理の結果エンキューされたパケットが残っていることがある。 Further, as the packet P 1 to P r illustrated in Figure 12, during a period in which the current scheduling process is performed, the buffer unit 220, the previous scheduling process is called time (τ 0 -Δτ) As a result, enqueued packets may remain.

例えば、パケットPの時刻情報Tは、「9ms」という相対時刻を示すかもしれない。他方で、今回のスケジューリング処理の結果としてバッファ部220に新たにエンキューされるパケットPr+1の時刻情報Tr+1は、「1ms」という相対時刻を示すかもしれない。ここで、時刻情報Tと時刻情報Tr+1は異なる基準時刻に対する相対時刻なので、時刻情報Tが示す時刻の方が、時刻情報Tr+1が示す時刻よりも早い。 For example, the time information T r of the packet P r may indicate a relative time referred to as "9ms". On the other hand, the time information T r + 1 of the packet P r + 1 that is newly enqueued in the buffer unit 220 as a result of the current scheduling process may indicate a relative time of “1 ms”. Since time information T r and time information T r + 1 is a relative time with respect to different reference time, towards the time indicated by the time information T r it is earlier than the time indicated by the time information T r + 1.

しかし、仮に、バッファ格納処理部210の制御回路211が単に「1」と「9」という値のみに基づいてソート処理を行うとすれば、制御回路211は誤って「時刻情報Tr+1が示す時刻の方が、時刻情報Tが示す時刻よりも早い」と判断することになる。その結果、パケットPr+1がパケットPより遥かに早く送信されてしまい、送信順序が守られず、ひいてはジッタが発生することになる。 However, if the control circuit 211 of the buffer storage processing unit 210 simply performs the sort process based on only the values “1” and “9”, the control circuit 211 erroneously indicates “the time indicated by the time information Tr + 1. Is earlier than the time indicated by the time information Tr ”. As a result, the packet P r + 1 is transmitted much earlier than the packet P r , the transmission order is not maintained, and as a result, jitter occurs.

本実施形態では、図4のバッファ探索開始位置と送信開始指示を使うことで、送信順序の逆転が防止される。すなわち、ハードウェア制御部200内の各部は、送信開始指示の値によって、スケジューラ部103によるスケジューリング処理の開始と終了を認識することができる。また、ハードウェア制御部200は、バッファ探索開始位置の値から、前回のスケジューリング処理でバッファ部220にエンキューされたパケットと、今回のスケジューリング処理でバッファ部220にエンキューされたパケットとを区別することができる。   In this embodiment, the reverse of the transmission order is prevented by using the buffer search start position and the transmission start instruction in FIG. That is, each unit in the hardware control unit 200 can recognize the start and end of the scheduling process by the scheduler unit 103 based on the value of the transmission start instruction. Further, the hardware control unit 200 distinguishes the packet enqueued in the buffer unit 220 in the previous scheduling process and the packet enqueued in the buffer unit 220 in the current scheduling process from the value of the buffer search start position. Can do.

よって、バッファ格納処理部210は、バッファ探索開始位置に基づいて、前回のスケジューリング処理でバッファ部220にエンキューされた時刻情報を、図9でのソート処理における時刻情報の比較対象から除外することができる。   Therefore, the buffer storage processing unit 210 may exclude the time information enqueued in the buffer unit 220 in the previous scheduling process from the time information comparison target in the sort process in FIG. 9 based on the buffer search start position. it can.

また、送信処理部230は、バッファ探索開始位置と送信開始指示に基づいて、今回のスケジューリング処理が行われている期間中には、今回のスケジューリング処理でバッファ部220にエンキューされたパケットを送信対象から除外することができる。すなわち、送信処理部230は、今回のスケジューリング処理の終了を認識してはじめて、今回のスケジューリング処理でバッファ部220にエンキューされたパケットの送信を開始する。そのため、スケジューラ部103がキュー間の調停を行わなくても、送信順が逆転することはない。   In addition, the transmission processing unit 230 transmits the packet enqueued in the buffer unit 220 in the current scheduling process during the current scheduling process based on the buffer search start position and the transmission start instruction. Can be excluded. That is, the transmission processing unit 230 starts transmitting the packet enqueued in the buffer unit 220 in the current scheduling process only after recognizing the end of the current scheduling process. Therefore, even if the scheduler unit 103 does not perform arbitration between queues, the transmission order is not reversed.

例えば「5ms」を示す時刻情報が付されたパケットがキュー102−1に対応してバッファ部220にエンキューされ、その後、「1ms」を示す時刻情報が付されたパケットがキュー102−nに対応してバッファ部220にエンキューされるとする。しかし、前者のパケットがバッファ部220にエンキューされても、送信処理部230は、「停止」を示す送信開始指示の値に基づき、前者のパケットをすぐには送信せず、今回のスケジューリング処理が終了するまで待つ。よって、前者のパケットと後者のパケットの送信順が入れ替わることはない。   For example, a packet with time information indicating “5 ms” is enqueued in the buffer unit 220 corresponding to the queue 102-1, and then a packet with time information indicating “1 ms” corresponds to the queue 102-n. Assume that the data is enqueued in the buffer unit 220. However, even if the former packet is enqueued in the buffer unit 220, the transmission processing unit 230 does not immediately transmit the former packet based on the value of the transmission start instruction indicating “stop”, and the current scheduling process is not performed. Wait for it to finish. Therefore, the transmission order of the former packet and the latter packet is not switched.

なお、本発明は上記の実施形態に限られるものではなく、様々に変形可能である。以下にその例をいくつか述べる。
図1〜図5に示した構成は例示であり、適宜変更することができる。例えば、上記では線形リストを用いて送信パケットリスト105やバッファ部220を実装する例について説明したが、線形リスト以外のデータ構造を利用する実施形態も可能である。
The present invention is not limited to the above-described embodiment, and can be variously modified. Some examples are described below.
The configurations shown in FIGS. 1 to 5 are examples and can be changed as appropriate. For example, although an example in which the transmission packet list 105 and the buffer unit 220 are implemented using a linear list has been described above, an embodiment using a data structure other than the linear list is also possible.

また、図3〜図5に別々のブロックとして示した各部は、理解を容易にするために便宜上分けてあるが、物理的な構成は任意に変更することができる。例えば、物理的にはMACチップ304−j(1≦j≦m)上に実装されている1つのレジスタ領域が、レジスタ領域212とレジスタ領域224とレジスタ領域232を含んでいてもよい。   3 to 5 are separated for convenience in order to facilitate understanding, but the physical configuration can be arbitrarily changed. For example, one register area physically mounted on the MAC chip 304-j (1 ≦ j ≦ m) may include a register area 212, a register area 224, and a register area 232.

また、ソフトウェア制御部100とハードウェア制御部200が制御情報を共有する方法は実施形態に応じて任意である。図3〜図5に示すハードウェア制御部200内の各種レジスタ(すなわちMACチップ304−j内のレジスタ)を使った制御情報の共有は、共有のための手法の一例にすぎない。例えば、CPU301とMACチップ304−jを結ぶ特定の信号線を介して、制御情報の1つである送信開始指示の値がソフトウェア制御部100からハードウェア制御部200に通知されてもよい。   Further, the method of sharing the control information between the software control unit 100 and the hardware control unit 200 is arbitrary depending on the embodiment. Sharing control information using various registers in the hardware control unit 200 shown in FIGS. 3 to 5 (that is, registers in the MAC chip 304-j) is only an example of a technique for sharing. For example, the value of a transmission start instruction, which is one piece of control information, may be notified from the software control unit 100 to the hardware control unit 200 via a specific signal line connecting the CPU 301 and the MAC chip 304-j.

また、図3には1つのCPU301が例示されているが、複数のCPUをパケット送信制御装置1が含んでもよい。例えば、複数のCPUまたはマルチコアCPUを利用する実施形態も可能である。例えば、ポート306−1〜306−mにそれぞれ対応するm個のソフトウェア制御部100としての処理を、複数のCPUまたは複数のコアが分散して実行することができる。   3 illustrates one CPU 301, the packet transmission control apparatus 1 may include a plurality of CPUs. For example, an embodiment using a plurality of CPUs or multi-core CPUs is also possible. For example, the processing as the m software control units 100 corresponding to the ports 306-1 to 306-m can be executed in a distributed manner by a plurality of CPUs or a plurality of cores.

なお、本実施形態では、キュー102−1〜102−n間での比較をスケジューラ部103が行う必要がないので、本実施形態のスケジューリング処理は並列処理との親和性が高い。したがって、上記のようなポートごとの並列分散処理よりもさらに粒度の細かい並列分散処理も可能である。   In this embodiment, since the scheduler unit 103 does not need to perform comparison between the queues 102-1 to 102-n, the scheduling processing of this embodiment has high affinity with parallel processing. Accordingly, parallel distributed processing with finer granularity than the parallel distributed processing for each port as described above is possible.

例えば、ある1つのポート306−j(1≦j≦m)に対応するスケジューラ部103は、各々が1本のキュー102−h(1≦h≦n)について図6のステップS104〜S109を実行するn個のCPUまたはn個のコアにより実現されてもよい。上記の例に限らず、パケット種別識別部101とスケジューラ部103が行う処理は、様々な仕方で分散することが可能である。   For example, the scheduler unit 103 corresponding to a certain port 306-j (1 ≦ j ≦ m) executes steps S104 to S109 in FIG. 6 for each queue 102-h (1 ≦ h ≦ n). May be realized by n CPUs or n cores. The processing performed by the packet type identification unit 101 and the scheduler unit 103 is not limited to the above example, and can be distributed in various ways.

また、上記実施形態では、QoS制御の一例としてパケット送信制御装置1が帯域制御を行う場合を説明した。しかし、実施形態に応じて、パケット送信制御装置1は、帯域制御でなく、CoS(Class of Service)などを利用した優先制御を行ってもよく、帯域制御と優先制御を組み合わせた制御を行ってもよい。   In the above embodiment, the case where the packet transmission control apparatus 1 performs bandwidth control as an example of QoS control has been described. However, according to the embodiment, the packet transmission control device 1 may perform priority control using CoS (Class of Service) or the like instead of bandwidth control, or perform control combining bandwidth control and priority control. Also good.

優先制御の場合にスケジューラ部103は、例えば、「どのキューにも回線速度が帯域として割り当てられている」と見なして送信予定時刻を計算することもできる。また、優先制御においてスケジューラ部103は、「キューの番号(1〜n)が若いほど優先度が高い」という前提にしたがってキュー102−1から順にスケジューリング処理を行ってもよい。また、低優先度のキューからパケットが全く送信されなくなるという事態を防ぐため、スケジューラ部103は、例えば重み付きラウンドロビンアルゴリズムにしたがって動作してもよい。   In the case of priority control, for example, the scheduler unit 103 can calculate the scheduled transmission time on the assumption that “the line speed is assigned to any queue as a bandwidth”. In the priority control, the scheduler unit 103 may perform the scheduling process in order from the queue 102-1, in accordance with the premise that “the lower the queue number (1 to n) is, the higher the priority is”. In order to prevent a situation in which no packet is transmitted from the low priority queue, the scheduler unit 103 may operate according to a weighted round robin algorithm, for example.

最後に、さらに下記の付記を開示する。
(付記1)
ソフトウェアにしたがって動作するソフトウェア制御部と、ハードウェア回路にしたがって動作するハードウェア制御部とを備え、
前記ソフトウェア制御部は、
格納するパケットの種別に応じてQoS設定値が設定されている複数のキューの各々にエンキューされている各パケットに対して、当該キューに設定された前記QoS設定値に基づいて当該パケットの送信予定時刻を算出し、当該パケットをデキューし、前記送信予定時刻を示す時刻情報とともに前記ハードウェア制御部へ出力する、というスケジューリング処理を行うスケジューラ部を備え、
前記ハードウェア制御部は、
バッファ部と、
前記スケジューラ部から出力される各パケットを、各パケットの前記時刻情報に基づいて前記送信予定時刻の順にソートして前記バッファ部に格納するバッファ格納処理部と、
前記バッファ部に格納された各パケットを、当該パケットの前記送信予定時刻に送信する送信処理部を備える、
ことを特徴とするパケット送信制御装置。
(付記2)
前記スケジューラ部は、前記複数のキューのうち第1のキューからデキュー対象のすべてのパケットを前記ハードウェア制御部に出力してから、前記複数のキューのうち第2のキューから前記ハードウェア制御部へのパケットの出力を行うことを特徴とする付記1に記載のパケット送信制御装置。
(付記3)
前記時刻情報は相対時刻で表されており、
前記送信処理部は、前記スケジューラ部からの送信開始指示があるまで待ってから各パケットの送信を開始する、
ことを特徴とする付記1または2に記載のパケット送信制御装置。
(付記4)
前記スケジューラ部は、前記スケジューリング処理の開始と終了を前記ハードウェア制御部に通知し、
前記送信処理部は、前記スケジューラ部から前記スケジューリング処理の開始が通知されると、前記送信開始指示として前記スケジューラ部が前記スケジューリング処理の終了を通知するまで、前記スケジューリング処理にともなって前記スケジューラ部から出力されて前記バッファ部に格納される各パケットの送信の開始を待つ、
ことを特徴とする付記3に記載のパケット送信制御装置。
(付記5)
前記スケジューラ部は所定の間隔で前記スケジューリング処理を繰り返し、
前記スケジューラ部が前記スケジューリング処理の開始を通知したときに前記バッファ部にパケットが残っている場合、前記送信処理部は、残っている前記パケットを前記送信開始指示がなくても送信する、
ことを特徴とする付記3または4に記載のパケット送信制御装置。
(付記6)
前記時刻情報は絶対時刻で表されており、
前記スケジューラ部は所定の間隔で前記スケジューリング処理を繰り返し、
前記スケジューラ部が算出する前記送信予定時刻は、前記スケジューリング処理を次に開始する時刻以降の時刻である、
ことを特徴とする付記1または2に記載のパケット送信制御装置。
(付記7)
前記ハードウェア制御部が、前記ソフトウェア制御部からアクセス可能なレジスタを備え、
前記レジスタを介して前記ソフトウェア制御部と前記ハードウェア制御部との間で制御情報が共有される
ことを特徴とする付記1から6のいずれか1項に記載のパケット送信制御装置。
(付記8)
パケット送信制御装置で用いられるハードウェア回路であって、
バッファ部と、
複数のパケットを、各パケットの送信予定時刻を示す時刻情報とともに受け取り、前記時刻情報に基づいて前記複数のパケットを前記送信予定時刻の順にソートして前記バッファ部に格納するバッファ格納処理部と、
前記バッファ部に格納された前記複数のパケットの各々を、当該パケットの前記送信予定時刻に送信する送信処理部と、
を備えることを特徴とするハードウェア回路。
(付記9)
前記時刻情報は相対時刻で表されており、
前記送信処理部は、前記コンピュータからの送信開始指示があるまで待ってから各パケットの送信を開始する、
ことを特徴とする付記8に記載のハードウェア回路。
(付記10)
前記コンピュータとの間で共有する制御情報を格納する、前記コンピュータからアクセス可能なレジスタをさらに備える
ことを特徴とする付記8または9に記載のハードウェア回路。
(付記11)
格納するパケットの種別に応じてQoS設定値が設定されている複数のキューの各々にエンキューされている各パケットに対して、当該キューに設定された前記QoS設定値に基づいて当該パケットの送信予定時刻を算出する処理と、
当該パケットをデキューし、前記送信予定時刻を示す時刻情報とともに出力するスケジューリング処理を、
コンピュータに実行させることを特徴とするプログラム。
(付記12)
前記プログラムは、
所定の間隔で前記スケジューリング処理を前記コンピュータに繰り返し実行させ、
前記送信予定時刻として、前記スケジューリング処理を次に開始する時刻以降の時刻を前記コンピュータに算出させる
ことを特徴とする付記11に記載のプログラム。
(付記13)
前記スケジューリング処理において前記コンピュータに、
前記複数のキューのうち第1のキューからデキュー対象のすべてのパケットを出力させてから、前記複数のキューのうち第2のキューからのパケットの出力を行わせる
ことを特徴とする付記11または12に記載のプログラム。
(付記14)
前記時刻情報は相対時刻で表されており、
前記プログラムはさらに前記コンピュータに、
前記スケジューリング処理を開始する際に、前記スケジューリング処理の結果として出力される各パケットの送信を待つように、各パケットの出力先であるハードウェア回路に指示し、
前記スケジューリング処理を終了する際に、前記スケジューリング処理の結果として前記ハードウェア回路に出力された各パケットの送信を開始するように前記ハードウェア回路に指示する
処理を行わせることを特徴とする付記11から13のいずれか1項に記載のプログラム。
(付記15)
前記コンピュータにさらに、
複数のパケットの種別をそれぞれ識別し、前記複数のパケットの各々を、前記複数のキューのうちで当該パケットの前記種別に対応するキューにエンキューするキューイング処理を行わせる
ことを特徴とする付記11から14のいずれか1項に記載のプログラム。
(付記16)
パケット送信制御装置が備えるコンピュータが、格納するパケットの種別に応じてQoS設定値が設定されている複数のキューの各々にエンキューされている各パケットに対して、
当該キューに設定された前記QoS設定値に基づいて、ソフトウェアにしたがって当該パケットの送信予定時刻を算出し、
当該パケットをデキューし、
当該パケットを、前記送信予定時刻を示す時刻情報とともに出力し、
前記パケット送信制御装置が備えるハードウェア回路が、前記時刻情報がそれぞれ付されて前記コンピュータから出力された複数のパケットを受け取り、
前記ハードウェア回路が、前記複数のパケットを前記送信予定時刻の順にソートして格納し、
前記ハードウェア回路が、記憶した前記複数のパケットの各々を、当該パケットの前記送信予定時刻に送信する、
ことを特徴とする方法。
Finally, the following additional notes are disclosed.
(Appendix 1)
A software control unit that operates according to software, and a hardware control unit that operates according to a hardware circuit;
The software controller is
For each packet enqueued in each of a plurality of queues in which a QoS setting value is set according to the type of packet to be stored, the transmission schedule of the packet is based on the QoS setting value set in the queue A scheduler unit that performs a scheduling process of calculating a time, dequeuing the packet, and outputting the packet together with time information indicating the scheduled transmission time;
The hardware control unit
A buffer section;
A buffer storage processing unit that sorts each packet output from the scheduler unit in the order of the scheduled transmission time based on the time information of each packet and stores it in the buffer unit;
A transmission processing unit that transmits each packet stored in the buffer unit at the scheduled transmission time of the packet;
A packet transmission control device.
(Appendix 2)
The scheduler unit outputs all packets to be dequeued from the first queue among the plurality of queues to the hardware control unit, and then from the second queue among the plurality of queues to the hardware control unit. 2. The packet transmission control device according to appendix 1, wherein the packet transmission control device outputs a packet to
(Appendix 3)
The time information is expressed in relative time,
The transmission processing unit waits until there is a transmission start instruction from the scheduler unit, and then starts transmission of each packet.
The packet transmission control device according to appendix 1 or 2, characterized by the above.
(Appendix 4)
The scheduler unit notifies the hardware control unit of the start and end of the scheduling process,
When the scheduling processing unit is notified of the start of the scheduling process, the transmission processing unit receives the scheduling process from the scheduler unit until the scheduler unit notifies the end of the scheduling process as the transmission start instruction. Wait for the start of transmission of each packet that is output and stored in the buffer unit,
4. The packet transmission control device according to appendix 3, wherein
(Appendix 5)
The scheduler unit repeats the scheduling process at predetermined intervals,
When a packet remains in the buffer unit when the scheduler unit notifies the start of the scheduling process, the transmission processing unit transmits the remaining packet without the transmission start instruction,
The packet transmission control device according to appendix 3 or 4, characterized by the above.
(Appendix 6)
The time information is expressed in absolute time,
The scheduler unit repeats the scheduling process at predetermined intervals,
The scheduled transmission time calculated by the scheduler unit is a time after the time when the scheduling process is started next.
The packet transmission control device according to appendix 1 or 2, characterized by the above.
(Appendix 7)
The hardware control unit comprises a register accessible from the software control unit;
The packet transmission control device according to any one of appendices 1 to 6, wherein control information is shared between the software control unit and the hardware control unit via the register.
(Appendix 8)
A hardware circuit used in a packet transmission control device,
A buffer section;
A buffer storage processing unit that receives a plurality of packets together with time information indicating a transmission scheduled time of each packet, sorts the plurality of packets in the order of the transmission scheduled time based on the time information, and stores them in the buffer unit;
A transmission processing unit that transmits each of the plurality of packets stored in the buffer unit at the scheduled transmission time of the packet;
A hardware circuit comprising:
(Appendix 9)
The time information is expressed in relative time,
The transmission processing unit waits until there is a transmission start instruction from the computer and then starts transmitting each packet.
9. The hardware circuit according to appendix 8, wherein
(Appendix 10)
The hardware circuit according to appendix 8 or 9, further comprising a register that stores control information shared with the computer and is accessible from the computer.
(Appendix 11)
For each packet enqueued in each of the plurality of queues in which the QoS setting value is set according to the type of packet to be stored, the transmission schedule of the packet is based on the QoS setting value set in the queue Processing to calculate time,
A scheduling process that dequeues the packet and outputs the packet together with time information indicating the scheduled transmission time.
A program characterized by being executed by a computer.
(Appendix 12)
The program is
Causing the computer to repeatedly execute the scheduling process at predetermined intervals;
The program according to appendix 11, wherein the computer calculates a time after the time when the scheduling process is next started as the scheduled transmission time.
(Appendix 13)
In the scheduling process, the computer
Supplementary note 11 or 12, wherein all packets to be dequeued are output from a first queue among the plurality of queues, and then packets are output from a second queue among the plurality of queues. The program described in.
(Appendix 14)
The time information is expressed in relative time,
The program is further stored on the computer.
When starting the scheduling process, instruct the hardware circuit that is the output destination of each packet to wait for the transmission of each packet output as a result of the scheduling process,
Supplemental Note 11: When finishing the scheduling process, the hardware circuit is instructed to start transmission of each packet output to the hardware circuit as a result of the scheduling process. 14. The program according to any one of 1 to 13.
(Appendix 15)
In addition to the computer,
A queuing process for identifying a plurality of packet types and enqueueing each of the plurality of packets into a queue corresponding to the type of the packet among the plurality of queues is performed. 15. The program according to any one of 1 to 14.
(Appendix 16)
For each packet enqueued in each of a plurality of queues in which a QoS setting value is set according to the type of packet stored by the computer included in the packet transmission control device,
Based on the QoS setting value set in the queue, calculate the scheduled transmission time of the packet according to software,
Dequeue the packet,
The packet is output together with time information indicating the scheduled transmission time,
A hardware circuit provided in the packet transmission control device receives a plurality of packets output from the computer with the time information attached thereto,
The hardware circuit sorts and stores the plurality of packets in order of the scheduled transmission time,
The hardware circuit transmits each of the stored packets at the scheduled transmission time of the packets.
A method characterized by that.

1 パケット送信制御装置
100 ソフトウェア制御部
101 パケット種別識別部
102 キュー群
102−1〜102−n キュー
103 スケジューラ部
104 メモリ領域
105 送信パケットリスト
106 パケットバッファ
200 ハードウェア制御部
210 バッファ格納処理部
211 制御回路
212 レジスタ領域
220 バッファ部
221 パケット格納部
222 時刻情報格納部
223 メモリ領域
224 レジスタ領域
230 送信処理部
231 制御回路
232 レジスタ領域
233 内部カウンタ
301 CPU
302 メモリユニット
303 RTC
304−1〜304−m MACチップ
305−1〜305−m PHYチップ
306−1〜306−m ポート
307 バス
、Qhg、Qjhg パケット
時刻情報
ノード
F 時刻指定フラグ
〜R レジスタ
DESCRIPTION OF SYMBOLS 1 Packet transmission control apparatus 100 Software control part 101 Packet type identification part 102 Queue group 102-1 to 102-n Queue 103 Scheduler part 104 Memory area 105 Transmission packet list 106 Packet buffer 200 Hardware control part 210 Buffer storage process part 211 Control Circuit 212 Register area 220 Buffer section 221 Packet storage section 222 Time information storage section 223 Memory area 224 Register area 230 Transmission processing section 231 Control circuit 232 Register area 233 Internal counter 301 CPU
302 Memory unit 303 RTC
304-1 to 304-m MAC chip 305 - 1 to 305-m PHY chip 306-1~306-m port 307 bus P i, Q hg, Q jhg packet T i time information L i node F time designation flag R 1 ~R 7 register

Claims (5)

ソフトウェアにしたがって動作するソフトウェア制御部と、ハードウェア回路にしたがって動作するハードウェア制御部とを備え、
前記ソフトウェア制御部は、
格納するパケットの種別に応じてQoS設定値が設定されている複数のキューの各々にエンキューされている各パケットに対して、当該キューに設定された前記QoS設定値に基づいて当該パケットの送信予定時刻を算出し、当該パケットをデキューし、前記送信予定時刻を示す時刻情報とともに前記ハードウェア制御部へ出力する、というスケジューリング処理を行うスケジューラ部を備え、
前記ハードウェア制御部は、
バッファ部と、
前記スケジューラ部から出力される各パケットを、各パケットの前記時刻情報に基づいて前記送信予定時刻の順にソートして前記バッファ部に格納するバッファ格納処理部と、
前記バッファ部に格納された各パケットを、当該パケットの前記送信予定時刻に送信する送信処理部を備える、
ことを特徴とするパケット送信制御装置。
A software control unit that operates according to software, and a hardware control unit that operates according to a hardware circuit;
The software controller is
For each packet enqueued in each of a plurality of queues in which a QoS setting value is set according to the type of packet to be stored, the transmission schedule of the packet is based on the QoS setting value set in the queue A scheduler unit that performs a scheduling process of calculating a time, dequeuing the packet, and outputting the packet together with time information indicating the scheduled transmission time;
The hardware control unit
A buffer section;
A buffer storage processing unit that sorts each packet output from the scheduler unit in the order of the scheduled transmission time based on the time information of each packet and stores it in the buffer unit;
A transmission processing unit that transmits each packet stored in the buffer unit at the scheduled transmission time of the packet;
A packet transmission control device.
前記スケジューラ部は、前記複数のキューのうち第1のキューからデキュー対象のすべてのパケットを前記ハードウェア制御部に出力してから、前記複数のキューのうち第2のキューから前記ハードウェア制御部へのパケットの出力を行うことを特徴とする請求項1に記載のパケット送信制御装置。   The scheduler unit outputs all packets to be dequeued from the first queue among the plurality of queues to the hardware control unit, and then from the second queue among the plurality of queues to the hardware control unit. The packet transmission control device according to claim 1, wherein the packet transmission control device outputs a packet to the packet. 前記時刻情報は相対時刻で表されており、
前記送信処理部は、前記スケジューラ部からの送信開始指示があるまで待ってから各パケットの送信を開始する、
ことを特徴とする請求項1または2に記載のパケット送信制御装置。
The time information is expressed in relative time,
The transmission processing unit waits until there is a transmission start instruction from the scheduler unit, and then starts transmission of each packet.
The packet transmission control apparatus according to claim 1 or 2, wherein
パケット送信制御装置で用いられるハードウェア回路であって、
バッファ部と、
複数のパケットを、各パケットの送信予定時刻を示す時刻情報とともに受け取り、前記時刻情報に基づいて前記複数のパケットを前記送信予定時刻の順にソートして前記バッファ部に格納するバッファ格納処理部と、
前記バッファ部に格納された前記複数のパケットの各々を、当該パケットの前記送信予定時刻に送信する送信処理部と、
を備えることを特徴とするハードウェア回路。
A hardware circuit used in a packet transmission control device,
A buffer section;
A buffer storage processing unit that receives a plurality of packets together with time information indicating a transmission scheduled time of each packet, sorts the plurality of packets in the order of the transmission scheduled time based on the time information, and stores them in the buffer unit;
A transmission processing unit that transmits each of the plurality of packets stored in the buffer unit at the scheduled transmission time of the packet;
A hardware circuit comprising:
格納するパケットの種別に応じてQoS設定値が設定されている複数のキューの各々にエンキューされている各パケットに対して、当該キューに設定された前記QoS設定値に基づいて当該パケットの送信予定時刻を算出する処理と、
当該パケットをデキューし、前記送信予定時刻を示す時刻情報とともに出力するスケジューリング処理を、
コンピュータに実行させることを特徴とするプログラム。
For each packet enqueued in each of a plurality of queues in which a QoS setting value is set according to the type of packet to be stored, the transmission schedule of the packet is based on the QoS setting value set in the queue Processing to calculate time,
A scheduling process that dequeues the packet and outputs the packet together with time information indicating the scheduled transmission time.
A program characterized by being executed by a computer.
JP2009168060A 2009-07-16 2009-07-16 Packet transmission control apparatus, hardware circuit, and program Withdrawn JP2011024027A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009168060A JP2011024027A (en) 2009-07-16 2009-07-16 Packet transmission control apparatus, hardware circuit, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009168060A JP2011024027A (en) 2009-07-16 2009-07-16 Packet transmission control apparatus, hardware circuit, and program

Publications (1)

Publication Number Publication Date
JP2011024027A true JP2011024027A (en) 2011-02-03

Family

ID=43633690

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009168060A Withdrawn JP2011024027A (en) 2009-07-16 2009-07-16 Packet transmission control apparatus, hardware circuit, and program

Country Status (1)

Country Link
JP (1) JP2011024027A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008135841A (en) * 2006-11-27 2008-06-12 Denso Corp Method of controlling transmission timing of relay apparatus, relay apparatus, and communication system
JP2014179838A (en) * 2013-03-15 2014-09-25 Yamaha Corp Communication device and program
JP2015201683A (en) * 2014-04-04 2015-11-12 日本電気通信システム株式会社 Method of simultaneous output in information transmission, and system of simultaneous output in information transmission
JP2016026642A (en) * 2015-09-17 2016-02-18 グリー株式会社 Game management program, game management method, and game management system
US10659557B2 (en) 2017-11-17 2020-05-19 Kabushiki Kaisha Toshiba Information processing apparatus, information processing method, and computer program product
JP2020088514A (en) * 2018-11-20 2020-06-04 株式会社東芝 Transmission device, communication device, communication system, transmission method, and program
JP2020149503A (en) * 2019-03-14 2020-09-17 株式会社東芝 Information processing device, information processing method, and program
CN113328960A (en) * 2020-02-28 2021-08-31 华为技术有限公司 Queue cache management method and device, storage medium and equipment
CN114600434A (en) * 2019-10-22 2022-06-07 华为技术有限公司 System and method for differentiating services by in-band signaling
KR20230003116A (en) 2020-06-11 2023-01-05 주식회사 히타치하이테크 Distributed control system and semiconductor inspection device having the same
WO2024004153A1 (en) * 2022-06-30 2024-01-04 日本電気株式会社 Packet control system, packet control method, and packet control device
WO2024004152A1 (en) * 2022-06-30 2024-01-04 日本電気株式会社 Packet control system, packet control method, and packet control device

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008135841A (en) * 2006-11-27 2008-06-12 Denso Corp Method of controlling transmission timing of relay apparatus, relay apparatus, and communication system
JP2014179838A (en) * 2013-03-15 2014-09-25 Yamaha Corp Communication device and program
JP2015201683A (en) * 2014-04-04 2015-11-12 日本電気通信システム株式会社 Method of simultaneous output in information transmission, and system of simultaneous output in information transmission
JP2016026642A (en) * 2015-09-17 2016-02-18 グリー株式会社 Game management program, game management method, and game management system
US10659557B2 (en) 2017-11-17 2020-05-19 Kabushiki Kaisha Toshiba Information processing apparatus, information processing method, and computer program product
JP7030673B2 (en) 2018-11-20 2022-03-07 株式会社東芝 Transmitters, communication devices, communication systems, transmission methods, and programs
JP2020088514A (en) * 2018-11-20 2020-06-04 株式会社東芝 Transmission device, communication device, communication system, transmission method, and program
US11425711B2 (en) 2018-11-20 2022-08-23 Kabushiki Kaisha Toshiba Transmission device, communication device, communication system, transmission method, and computer program product
JP7145794B2 (en) 2019-03-14 2022-10-03 株式会社東芝 Information processing device, information processing method, and program
US11032208B2 (en) 2019-03-14 2021-06-08 KABUSHIKl KAISHA TOSHIBA Information processing apparatus, information processing method, and computer program product
JP2020149503A (en) * 2019-03-14 2020-09-17 株式会社東芝 Information processing device, information processing method, and program
CN114600434A (en) * 2019-10-22 2022-06-07 华为技术有限公司 System and method for differentiating services by in-band signaling
CN113328960A (en) * 2020-02-28 2021-08-31 华为技术有限公司 Queue cache management method and device, storage medium and equipment
CN113328960B (en) * 2020-02-28 2023-11-17 华为技术有限公司 Queue cache management method, device, storage medium and equipment
KR20230003116A (en) 2020-06-11 2023-01-05 주식회사 히타치하이테크 Distributed control system and semiconductor inspection device having the same
WO2024004153A1 (en) * 2022-06-30 2024-01-04 日本電気株式会社 Packet control system, packet control method, and packet control device
WO2024004152A1 (en) * 2022-06-30 2024-01-04 日本電気株式会社 Packet control system, packet control method, and packet control device
JP7485213B1 (en) 2022-06-30 2024-05-16 日本電気株式会社 Packet control system, packet control method, and packet control device

Similar Documents

Publication Publication Date Title
JP2011024027A (en) Packet transmission control apparatus, hardware circuit, and program
US10764215B2 (en) Programmable broadband gateway hierarchical output queueing
US10601713B1 (en) Methods and network device for performing cut-through
US8831025B2 (en) Parallel processing using multi-core processor
US11637786B1 (en) Multi-destination traffic handling optimizations in a network device
US7212535B2 (en) Scheduling items using mini-quantum values
EP1646192A2 (en) Packet switch, scheduling device, drop control circuit, multicast control circuit and QOS control device
US20150215226A1 (en) Device and Method for Packet Processing with Memories Having Different Latencies
US7843940B2 (en) Filling token buckets of schedule entries
US20140317220A1 (en) Device for efficient use of packet buffering and bandwidth resources at the network edge
CN112804157A (en) Programmable congestion control
US8792511B2 (en) System and method for split ring first in first out buffer memory with priority
US7830797B1 (en) Preserving packet order for data flows when applying traffic shapers
US10764198B2 (en) Method to limit packet fetching with uncertain packet sizes to control line rate
US12081321B2 (en) Centralized control of time gates for time sensitive networking (TSN)
US7350208B1 (en) Method and apparatus for scheduling using a resource variable decreased by amounts corresponding to the efficiency of the resource
US10581759B1 (en) Sharing packet processing resources
Benet et al. Providing in-network support to coflow scheduling
US7583678B1 (en) Methods and apparatus for scheduling entities using a primary scheduling mechanism such as calendar scheduling filled in with entities from a secondary scheduling mechanism
KR100378372B1 (en) Apparatus and method for packet switching in data network
US12101260B1 (en) Multi-destination traffic handling optimizations in a network device
WO2022022222A1 (en) Method for sending data packet, and network device
Stergiou et al. Performance study of a regulated switch system for double priority traffic

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20121002