TWI748613B - Switch - Google Patents

Switch Download PDF

Info

Publication number
TWI748613B
TWI748613B TW109129263A TW109129263A TWI748613B TW I748613 B TWI748613 B TW I748613B TW 109129263 A TW109129263 A TW 109129263A TW 109129263 A TW109129263 A TW 109129263A TW I748613 B TWI748613 B TW I748613B
Authority
TW
Taiwan
Prior art keywords
egress
queue
queues
cache
urgency
Prior art date
Application number
TW109129263A
Other languages
Chinese (zh)
Other versions
TW202209926A (en
Inventor
呂國正
林永昌
潘鈺梅
Original Assignee
瑞昱半導體股份有限公司
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 瑞昱半導體股份有限公司 filed Critical 瑞昱半導體股份有限公司
Priority to TW109129263A priority Critical patent/TWI748613B/en
Priority to US17/412,504 priority patent/US20220070109A1/en
Application granted granted Critical
Publication of TWI748613B publication Critical patent/TWI748613B/en
Publication of TW202209926A publication Critical patent/TW202209926A/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/622Queue service order
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/6215Individual queue per QOS, rate or priority
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3027Output queuing

Abstract

A switch is provided. The switch includes a plurality of absorb queues, a plurality of egress ports and an absorb scheduler. Each of the egress ports has a plurality of egress queues, and each of the egress queues is connected to a different one of the absorb queues. The switch generates an urgency for each of the egress queues of each of the egress ports, the urgency is used to reflect the degree that the corresponding egress queue is about no packet to send soon, and the urgency of the absorb queue could be retrieved from the urgency of each of the connected egress queues. The absorb scheduler selects one of the absorb queues to send its stored packet to target egress queues of target egress ports according to the urgency of each of the absorb queues.

Description

交換機switch

本發明涉及一種排程方法,且特別涉及一種交換機的排程方法。The invention relates to a scheduling method, and in particular to a scheduling method of an exchange.

交換機在轉發封包時,為了區分不同資料流的傳送順序,出口埠(Egress Port)會有多個出口佇列(Queue)。每一出口佇列用來存放不同優先級的封包,並配予不同出口佇列權重(Weight)以決定不同優先級的封包的傳送比例。也就是說,出口埠可使用排程器(Scheduler)決定選擇哪個出口佇列送封包,並依據出口佇列權重,決定從選擇的出口佇列中抓取多少個封包做傳送。When the switch forwards packets, in order to distinguish the transmission sequence of different data streams, the egress port has multiple egress queues. Each egress queue is used to store packets of different priority levels, and is assigned different egress queue weights to determine the transmission ratio of packets of different priority levels. In other words, the egress port can use the scheduler to determine which egress queue to choose to send packets, and according to the egress queue weight, decide how many packets to grab from the selected egress queue for transmission.

如圖1所示,出口埠P0有兩個出口佇列Q0和Q1分別用來存放優先級為S1和S2的封包,並當出口埠P0的出口佇列Q0和Q1的出口佇列權重分別為1和2時,即{Q0:Q1}=1:2,出口埠P0的排程器10則依據上述出口佇列權重,決定從出口埠P0的出口佇列Q0抓取優先級為S1的一個封包做傳送,並決定從出口埠P0的出口佇列Q1抓取優先級為S2的兩個封包做傳送。如果出口埠的排程器想從選擇的出口佇列中抓取封包,卻遇到選擇的出口佇列沒有封包可送時,排程器就會去抓下一出口佇列內的封包做傳送,以至於出口佇列權重失衡。As shown in Figure 1, the egress port P0 has two egress queues Q0 and Q1 to store packets with priority S1 and S2 respectively, and when the egress queues Q0 and Q1 of the egress port P0 have the weights of the egress queues respectively 1 and 2, ie {Q0:Q1}=1:2, the scheduler 10 of the exit port P0 decides to grab the one with priority S1 from the exit queue Q0 of the exit port P0 based on the above-mentioned exit queue weight The packet is sent, and it is decided to grab the two packets with priority S2 from the egress queue Q1 of the egress port P0 for transmission. If the scheduler of the egress port wants to grab a packet from the selected egress queue, but when there is no packet to send in the selected egress queue, the scheduler will grab the packet in the next egress queue for transmission , So that the weight of the export queue is out of balance.

另外,轉發封包可分為單播(Unicast)、多播(Multicast)和廣播(Broadcast),單播是指一個封包只能送往單一個出口佇列和單一個出口埠,而多播和廣播是指一個封包可送往多個出口佇列和多個出口埠。而在高頻寬的交換器為了節省存放轉發封包的記憶體空間,一般會採取中央的記憶體架構來讓所有的出口佇列共同使用,然而這種架構受限於記憶體的頻寬能力。因此,對於多播/廣播封包而言,交換機需要花多次才能把多播/廣播封包送到所需前往的多個出口埠的多個出口佇列。為了彌補這部分運作上的低效能,交換機在設計上可將多播/廣播封包存放在中央緩存記憶體(Central Absorb Memory),同時為了因應出口佇列的出口佇列權重,中央緩存記憶體可配置有多個緩存佇列(Absorb Queue)和緩存排程器。In addition, forwarding packets can be divided into Unicast, Multicast and Broadcast. Unicast means that a packet can only be sent to a single egress queue and a single egress port, while multicast and broadcast It means that a packet can be sent to multiple egress queues and multiple egress ports. In high-bandwidth switches, in order to save memory space for storing and forwarding packets, a central memory architecture is generally adopted for common use by all egress queues. However, this architecture is limited by the bandwidth capability of the memory. Therefore, for multicast/broadcast packets, the switch takes multiple times to send the multicast/broadcast packets to multiple egress queues of multiple egress ports to which it needs to go. In order to make up for this part of the operational inefficiency, the switch is designed to store multicast/broadcast packets in the central buffer memory (Central Absorb Memory). At the same time, in response to the export queue weight of the export queue, the central buffer memory can be Configured with multiple buffer queues (Absorb Queue) and buffer schedulers.

每一緩存佇列也用來存放不同優先級的封包,並配予不同緩存佇列權重以決定不同優先級的封包的傳送比例。一般而言,緩存佇列和出口佇列會存在對應關係,以便封包可從緩存佇列送到對應的出口佇列,且緩存排程器則依據緩存佇列權重將緩存佇列內的封包送到所需前往的出口埠的出口佇列。如圖2所示,緩存佇列AQ0連接出口埠P0、P1和P2的出口佇列Q0,且緩存佇列AQ1連接出口埠P0、P1和P2的出口佇列Q1。緩存佇列AQ0存放兩個封包,第一個封包要送往出口埠P0和P1的出口佇列Q0,而第二個封包要送往出口埠P0和P2的出口佇列Q0。另外,緩存佇列AQ1也存放兩個封包,但這兩個封包都要送往出口埠P0、P1和P2的出口佇列Q1。為了方便以下說明,圖2已示意緩存佇列AQ0和AQ1內的這些封包在通過緩存排程器13送到所需前往的出口埠的出口佇列後的存放樣貌。Each buffer queue is also used to store packets of different priorities, and different buffer queue weights are assigned to determine the transmission ratio of packets of different priorities. Generally speaking, there will be a corresponding relationship between the cache queue and the egress queue, so that packets can be sent from the cache queue to the corresponding egress queue, and the cache scheduler sends the packets in the cache queue according to the weight of the cache queue Go to the exit queue of the exit port you need to go to. As shown in Figure 2, the cache queue AQ0 is connected to the egress queue Q0 of the egress ports P0, P1 and P2, and the cache queue AQ1 is connected to the egress queue Q1 of the egress ports P0, P1 and P2. The buffer queue AQ0 stores two packets. The first packet is sent to the egress queue Q0 of the egress ports P0 and P1, and the second packet is sent to the egress queue Q0 of the egress ports P0 and P2. In addition, the buffer queue AQ1 also stores two packets, but these two packets must be sent to the egress queue Q1 of the egress ports P0, P1, and P2. For the convenience of the following description, FIG. 2 has shown the storage appearance of these packets in the buffer queues AQ0 and AQ1 after being sent to the exit queue of the desired exit port through the buffer scheduler 13.

為了不影響出口佇列的出口佇列權重,緩存排程器13可對於緩存佇列AQ0和AQ1配置適合的緩存佇列權重。如圖3A所示,當緩存佇列AQ0和AQ1存放要送往出口埠P0的封包,且出口埠P0的出口佇列Q0和Q1的出口佇列權重分別為1和8時,緩存排程器13則可配置緩存佇列AQ0和AQ1的緩存佇列權重分別為1和8,即{AQ0:AQ1}=1:8。類似地,如圖3B所示,當緩存佇列AQ0和AQ1存放要送往出口埠P1的封包,且出口埠P1的出口佇列Q0和Q1的出口佇列權重分別為8和1時,緩存排程器13則可配置緩存佇列AQ0和AQ1的緩存佇列權重分別為8和1,即{AQ0:AQ1}=8:1。In order not to affect the egress queue weight of the egress queue, the cache scheduler 13 may configure appropriate cache queue weights for the cache queues AQ0 and AQ1. As shown in Figure 3A, when the cache queues AQ0 and AQ1 store packets to be sent to the egress port P0, and the egress queue weights of the egress queues Q0 and Q1 of the egress port P0 are 1 and 8, respectively, the cache scheduler 13. The cache queue weights of the configurable cache queues AQ0 and AQ1 are 1 and 8, respectively, that is, {AQ0:AQ1}=1:8. Similarly, as shown in Figure 3B, when the cache queues AQ0 and AQ1 store packets to be sent to the egress port P1, and the egress queue weights of the egress queues Q0 and Q1 of the egress port P1 are 8 and 1, respectively, the cache The scheduler 13 can configure the cache queue weights of the cache queues AQ0 and AQ1 to be 8 and 1, respectively, that is, {AQ0:AQ1}=8:1.

另外,如圖3C所示,當緩存佇列AQ0和AQ1存放要送往出口埠P1和P2的封包,且出口埠P2的出口佇列Q0和Q1的出口佇列權重分別為4和1時,緩存排程器13就會將出口埠P1的出口佇列Q0的出口佇列權重和出口埠P2的出口佇列Q0的出口佇列權重取平均值作為緩存佇列AQ0的緩存佇列權重,並且將出口埠P1的出口佇列Q1的出口佇列權重和出口埠P2的出口佇列Q1的出口佇列權重取平均值作為緩存佇列AQ1的緩存佇列權重,即{AQ0:AQ1}={(8+4)/2:(1+1)/2}=6:1。也就是說,當緩存排程器13服務的對象是多個出口埠,且這些出口埠所配置的出口佇列權重一致時,緩存佇列AQ0和AQ1的緩存佇列權重就能有簡單的配置基礎,但當緩存排程器13服務的多個出口埠所配置的出口佇列權重懸殊時,緩存排程器13將無法配置出適合的緩存佇列權重。In addition, as shown in Figure 3C, when the buffer queues AQ0 and AQ1 store packets to be sent to the egress ports P1 and P2, and the egress queue weights of the egress queues Q0 and Q1 of the egress port P2 are 4 and 1, respectively, The cache scheduler 13 will take the average of the egress queue weight of the egress queue Q0 of the egress port P1 and the egress queue weight of the egress queue Q0 of the egress port P2 as the cache queue weight of the cache queue AQ0, and Take the average of the egress queue weight of the egress queue Q1 of the egress port P1 and the egress queue weight of the egress queue Q1 of the egress port P2 as the cache queue weight of the cache queue AQ1, namely {AQ0:AQ1}={ (8+4)/2: (1+1)/2}=6:1. In other words, when the target of the cache scheduler 13 is multiple egress ports, and the egress queue weights configured for these egress ports are the same, the cache queue weights of the cache queues AQ0 and AQ1 can be easily configured Basically, but when the egress queue weights configured for multiple egress ports served by the cache scheduler 13 are very different, the cache scheduler 13 will not be able to configure a suitable cache queue weight.

如圖3D所示,因為出口埠P0的{Q0:Q1}和出口埠P1的{Q0:Q1}取平均為1:1,即{AQ0:AQ1}={(1+8)/2:(8+1)/2}=1:1,所以緩存佇列AQ0和AQ1存放要送往出口埠P0和P1的封包是用1:1的比例送往,但出口埠P0的排程器10則期望用1:8的比例送出出口埠P0的出口佇列Q0和Q1的封包,以至於出口埠P0的出口佇列Q1的封包會送得比較快,容易出現出口埠P0的出口佇列Q1空掉而沒有封包可送的情形,且一旦出口佇列空掉就會讓出口佇列權重失衡。因此,如何設計出一種交換機的排程方法以避免出口佇列權重失衡則成為本領域的一項重要課題。As shown in Figure 3D, because {Q0:Q1} of outlet port P0 and {Q0:Q1} of outlet port P1 are averaged 1:1, that is, {AQ0:AQ1}={(1+8)/2:( 8+1)/2}=1:1, so the buffer queues AQ0 and AQ1 store the packets to be sent to the egress ports P0 and P1 at a ratio of 1:1, but the scheduler 10 of the egress port P0 is It is expected to send out the packets of the egress queue Q0 and Q1 of the egress port P0 with a ratio of 1:8, so that the packets of the egress queue Q1 of the egress port P0 will be sent faster, and the egress queue Q1 of the egress port P0 is likely to be empty. If there is no packet to send, and once the egress queue is empty, the weight of the egress queue will be unbalanced. Therefore, how to design a switch scheduling method to avoid the imbalance of the export queue weight has become an important issue in this field.

有鑑於此,本發明實施例提供一種轉發封包的排程方法,用於包括多個緩存佇列、多個出口埠和緩存排程器的交換機中。每一出口埠具有多個出口佇列,每一出口埠的每一出口佇列連接到這些緩存佇列的不同一個,且排程方法包括如下步驟。首先,針對每一出口埠的每一出口佇列產生一緊急度,且該緊急度用來反映對應的出口佇列即將快沒有封包送的程度。接著,根據每一出口佇列的緊急度,緩存排程器選擇這些緩存佇列的一個來送出其存放的封包至所需前往的目標出口埠的目標出口佇列。In view of this, an embodiment of the present invention provides a scheduling method for forwarding packets, which is used in a switch that includes multiple cache queues, multiple egress ports, and a cache scheduler. Each egress port has multiple egress queues, each egress queue of each egress port is connected to a different one of these cache queues, and the scheduling method includes the following steps. First, an urgency is generated for each egress queue of each egress port, and the urgency is used to reflect the degree to which the corresponding egress queue is about to be out of packets. Then, according to the urgency of each egress queue, the cache scheduler selects one of these cache queues to send the stored packets to the target egress queue of the desired egress port.

除此之外,本發明實施例另提供一種交換機,包括多個緩存佇列、多個出口埠和緩存排程器。每一出口埠具有多個出口佇列,每一出口埠的每一出口佇列連接到這些緩存佇列的不同一個。交換機針對每一出口埠的每一出口佇列可產生一緊急度,且該緊急度用來反映對應的出口佇列即將快沒有封包送的程度。緩存排程器則根據每一出口佇列的緊急度,選擇這些緩存佇列的一個來送出其存放的封包至所需前往的目標出口埠的目標出口佇列。In addition, the embodiment of the present invention further provides a switch including a plurality of cache queues, a plurality of egress ports, and a cache scheduler. Each egress port has multiple egress queues, and each egress queue of each egress port is connected to a different one of these cache queues. The switch can generate an urgency for each egress queue of each egress port, and the urgency is used to reflect the degree to which the corresponding egress queue is about to be out of packets. The cache scheduler selects one of these cache queues according to the urgency of each egress queue to send the stored packets to the target egress queue of the desired egress port.

為使能更進一步瞭解本發明的特徵及技術內容,請參閱以下有關本發明的詳細說明與圖式,然而所提供的圖式僅用於提供參考與說明,並非用來對本發明加以限制。In order to further understand the features and technical content of the present invention, please refer to the following detailed description and drawings about the present invention. However, the provided drawings are only for reference and description, and are not used to limit the present invention.

以下是通過特定的具體實施例來說明本發明的實施方式,本領域技術人員可由本說明書所提供的內容瞭解本發明的優點與效果。本發明可通過其他不同的具體實施例加以施行或應用,本說明書中的各項細節也可基於不同觀點與應用,在不悖離本發明的構思下進行各種修改與變更。另外,本發明的附圖僅為簡單示意說明,並非依實際尺寸的描繪,事先聲明。以下的實施方式將進一步詳細說明本發明的相關技術內容,但所提供的內容並非用以限制本發明的保護範圍。The following are specific specific examples to illustrate the implementation of the present invention. Those skilled in the art can understand the advantages and effects of the present invention from the content provided in this specification. The present invention can be implemented or applied through other different specific embodiments, and various details in this specification can also be based on different viewpoints and applications, and various modifications and changes can be made without departing from the concept of the present invention. In addition, the drawings of the present invention are merely schematic illustrations, and are not drawn according to actual size, and are stated in advance. The following embodiments will further describe the related technical content of the present invention in detail, but the provided content is not intended to limit the protection scope of the present invention.

應當理解的是,雖然本文中可能會使用到“第一”、“第二”、“第三”等術語來描述各種元件或者信號,但這些元件或者信號不應受這些術語的限制。這些術語主要是用以區分一元件與另一元件,或者一信號與另一信號。另外,本文中所使用的術語“或”,應視實際情況可能包含相關聯的列出項目中的任一個或者多個的組合。It should be understood that although terms such as “first”, “second”, and “third” may be used herein to describe various elements or signals, these elements or signals should not be limited by these terms. These terms are mainly used to distinguish one element from another, or one signal from another signal. In addition, the term "or" used in this text should include any one or a combination of more of the associated listed items depending on the actual situation.

請同時參閱圖4和圖5,圖4是本發明實施例所提供的排程方法的步驟流程圖,圖5則是本發明實施例所提供的交換機使用圖4的排程方法的第一示意圖。如圖5所示,交換機5可包括多個緩存佇列、多個出口埠和緩存排程器53。如前所述,每一緩存佇列用來存放不同優先級的封包,每一出口埠具有多個出口佇列,且每一出口埠的每一出口佇列連接到這些緩存佇列的不同一個,以也用來存放不同優先級的封包。Please refer to FIG. 4 and FIG. 5 at the same time. FIG. 4 is a flowchart of the steps of the scheduling method provided by an embodiment of the present invention, and FIG. 5 is a first schematic diagram of the switch provided by an embodiment of the present invention using the scheduling method of FIG. 4 . As shown in FIG. 5, the switch 5 may include multiple cache queues, multiple egress ports, and a cache scheduler 53. As mentioned earlier, each buffer queue is used to store packets of different priorities, each egress port has multiple egress queues, and each egress queue of each egress port is connected to a different one of these cache queues , So it is also used to store packets of different priorities.

為了方便以下說明,圖5僅以兩個緩存佇列AQ0、AQ1和三個出口埠為例,但本發明不以此為限制。因此,圖5的每一出口埠具有兩個出口佇列Q0和Q1,且每一出口埠的出口佇列Q0和Q1分別連接到緩存佇列AQ0和AQ1,以用來存放不同優先級的封包。另外,交換機5可針對每一出口埠的每一出口佇列產生一緊急度Q n_URG。以圖5為例, n為0或1,且緊急度Q n_URG用來反映對應的出口佇列Q n即將快沒有封包送的程度。 For the convenience of the following description, FIG. 5 only takes two cache queues AQ0, AQ1 and three egress ports as an example, but the present invention is not limited thereto. Therefore, each egress port in Figure 5 has two egress queues Q0 and Q1, and the egress queues Q0 and Q1 of each egress port are respectively connected to the buffer queues AQ0 and AQ1 to store packets of different priorities. . In addition, the switch 5 can generate an urgency Q n _URG for each egress queue of each egress port. Taking FIG. 5 as an example, n is 0 or 1, and the urgency Q n _URG is used to reflect the degree to which the corresponding egress queue Q n is about to be out of packets.

實作上,每一出口佇列可個別配置高、低兩個閾值,即高閾值THR_HIGH和低閾值THR_LOW。接著,交換機5可將每一出口佇列目前累積的封包數量作為其佇列使用量,並根據封包數量和這兩個閾值的比較結果來產生緊急度Q n_URG。舉例來說,當出口埠P1的出口佇列Q0目前累積的封包數量小於等於低閾值THR_LOW時,交換機5可針對出口埠P1的出口佇列Q0產生數值為1的緊急度Q0_URG。 In practice, each exit queue can be individually configured with high and low thresholds, namely the high threshold THR_HIGH and the low threshold THR_LOW. Then, the switch 5 can use the currently accumulated number of packets in each egress queue as its queue usage, and generate the urgency Q n _URG according to the comparison result of the number of packets and the two thresholds. For example, when the current accumulated number of packets in the egress queue Q0 of the egress port P1 is less than or equal to the low threshold THR_LOW, the switch 5 can generate an urgency Q0_URG of 1 for the egress queue Q0 of the egress port P1.

另外,當出口埠P0的出口佇列Q1目前累積的封包數量大於低閾值THR_LOW,並小於等於高閾值THR_HIGH時,交換機5可針對出口埠P0的出口佇列Q1產生數值為2的緊急度Q1_URG。相對地,當出口埠P0的出口佇列Q0目前累積的封包數量大於高閾值THR_HIGH時,交換機5可針對出口埠P0的出口佇列Q0產生數值為3的緊急度Q0_URG,但本發明皆不以此為限制。總而言之,在本實施例中,每一出口佇列的緊急度Q n_URG是可根據其佇列使用量和至少一閾值的比較結果來產生,且本實施例假設數值越低的緊急度Q n_URG代表對應的出口佇列Q n越即將快沒有封包送。 In addition, when the number of packets currently accumulated in the egress queue Q1 of the egress port P0 is greater than the low threshold THR_LOW and less than or equal to the high threshold THR_HIGH, the switch 5 can generate an urgency Q1_URG of 2 for the egress queue Q1 of the egress port P0. In contrast, when the number of packets currently accumulated in the egress queue Q0 of the egress port P0 is greater than the high threshold THR_HIGH, the switch 5 can generate an urgency Q0_URG of 3 for the egress queue Q0 of the egress port P0, but the present invention does not apply This is a limitation. In summary, in this embodiment, the urgency Q n _URG of each exit queue can be generated based on the comparison result of its queue usage and at least a threshold value, and this embodiment assumes that the lower the urgency Q n is, _URG represents the corresponding egress queue Q n, the sooner there will be no packets to be sent.

另一方面,當每一出口佇列目前累積的封包數量相同時,流速越快的出口佇列Q n越即將快沒有封包送。因此,在其它實施例中,每一出口佇列的緊急度Q n_URG也是可根據其佇列使用量和流速的比較結果來產生,反正只要是以佇列使用量來決定緊急度Q n_URG就能符合本發明的技術精神。類似地,交換機5將封包數量作為佇列使用量只是舉例,本發明不限制交換機5計算佇列使用量的具體實現方式。在其它實施例中,交換機5也可將位元組計數(Byte Count)作為佇列使用量,反正只要緩存排程器53是根據每一出口佇列的佇列使用量來調度緩存佇列就能符合本發明的技術精神。也就是說,根據每一出口佇列的緊急度Q n_URG,緩存排程器53可選擇多個緩存佇列的一個來送出其存放的封包至所需前往的目標出口埠的目標出口佇列。 On the other hand, when the number of packets currently accumulated in each egress queue is the same, the faster the egress queue Q n with the faster flow rate, the sooner no packets will be sent. Therefore, in other embodiments, the urgency Q n _URG of each exit queue can also be generated based on the comparison result of its queue usage and flow rate. Anyway, as long as the queue usage is used to determine the urgency Q n _URG It can conform to the technical spirit of the present invention. Similarly, the switch 5 using the number of packets as the queue usage amount is just an example, and the present invention does not limit the specific implementation manner of the switch 5 in calculating the queue usage amount. In other embodiments, the switch 5 can also use Byte Count as the queue usage. Anyway, as long as the cache scheduler 53 schedules the cache queue according to the queue usage of each egress queue. It can conform to the technical spirit of the present invention. That is to say, according to the urgency Q n _URG of each egress queue, the cache scheduler 53 can select one of multiple cache queues to send the stored packets to the target egress queue of the target egress port to which it needs to go. .

在本實施例中,每一出口佇列可回傳緊急度Q n_URG至連接的緩存佇列AQ n。接著,根據連接的每一出口佇列的緊急度Q n_URG,交換機5可決定每一緩存佇列的一轉發封包緊急度AQ n_URG,且轉發封包緊急度AQ n_URG用來反映對應的緩存佇列AQ n急需要送出其存放的封包的程度。以圖5為例,出口埠P0、P1和P2的出口佇列Q0分別回傳數值為3、1和3的緊急度Q0_URG至連接的緩存佇列AQ0,且交換機5可從中選出數值最低的緊急度Q0_URG作為緩存佇列AQ0的轉發封包緊急度AQ0_URG,即AQ0_URG=1。應當理解的是,為了能反映緩存佇列AQ0急需要送出封包的程度,所以交換機5選擇數值最低的緊急度Q0_URG作為緩存佇列AQ0的轉發封包緊急度AQ0_URG,但本發明不以此為限制。 In this embodiment, each egress queue can return the urgency Q n _URG to the connected cache queue AQ n . Then, according to the urgency Q n _URG of each connected egress queue, the switch 5 can determine a forwarding packet urgency AQ n _URG of each buffer queue, and the forwarding packet urgency AQ n _URG is used to reflect the corresponding cache The degree to which the queue AQ n urgently needs to send its stored packets. Taking Figure 5 as an example, the exit queue Q0 of the exit ports P0, P1, and P2 returns the urgency Q0_URG with values of 3, 1, and 3 to the connected buffer queue AQ0, and the switch 5 can select the emergency with the lowest value. The degree Q0_URG is used as the urgency degree AQ0_URG of the forwarded packet of the buffer queue AQ0, that is, AQ0_URG=1. It should be understood that, in order to reflect the degree to which the buffer queue AQ0 urgently needs to send packets, the switch 5 selects the lowest urgency Q0_URG as the forwarding packet urgency AQ0_URG of the buffer queue AQ0, but the present invention is not limited by this.

同理,出口埠P0、P1和P2的出口佇列Q1分別回傳數值為2、3和3的緊急度Q1_URG至連接的緩存佇列AQ1,且交換機5可從中選出數值最低的緊急度Q1_URG作為緩存佇列AQ1的轉發封包緊急度AQ1_URG,即AQ1_URG=2。因此,對於圖5的轉發封包緊急度AQ0_URG為1且轉發封包緊急度AQ1_URG為2來說,緩存排程器53就會優先調度緩存佇列AQ0來送出其存放的封包到所需前往的出口埠P m的出口佇列Q0。以圖5為例, m為0、1或2,反正就看送出的封包所需前往哪個出口埠。也就是說,根據每一緩存佇列的轉發封包緊急度AQ n_URG,緩存排程器53可選擇最急需要送出封包的緩存佇列來做調度。 In the same way, the exit queue Q1 of the exit ports P0, P1, and P2 returns the urgency Q1_URG with values of 2, 3, and 3 to the connected cache queue AQ1, and the switch 5 can select the lowest urgency Q1_URG from among them. The urgency of forwarding packets in the buffer queue AQ1 is AQ1_URG, that is, AQ1_URG=2. Therefore, for the urgency of forwarding packets AQ0_URG of FIG. 5 is 1 and the urgency of forwarding packets AQ1_URG is 2, the buffer scheduler 53 will prioritize the scheduling of the buffer queue AQ0 to send the stored packets to the desired egress port. The exit queue of P m is Q0. Take Figure 5 as an example, m is 0, 1, or 2, anyway, it depends on which exit port the sent packet needs to go to. In other words, according to the urgency of forwarding packets AQ n _URG of each buffer queue, the buffer scheduler 53 can select the buffer queue that needs to send the packet most urgently for scheduling.

本發明不限制緩存排程器53的具體實現方式,且為了方便以下說明,圖式中的緩存排程器53將大多用以處在緩存佇列和出口佇列間的一框來表示。另外,在每次有封包由緩存佇列AQ n送到出口佇列Q n後,就會讓出口佇列Q n的佇列使用量產生變化,從而影響出口佇列Q n的緊急度Q n_URG,並連帶影響緩存佇列AQ n的轉發封包緊急度AQ n_URG。因此,每一出口佇列會一直回傳緊急度Q n_URG給連接的緩存佇列AQ n,使得緩存佇列AQ n的轉發封包緊急度AQ n_URG也就一直被更新,並當緩存排程器53要對多個緩存佇列來做調度時,緩存排程器53就可使用最即時的轉發封包緊急度AQ n_URG來作為選擇依據。 The present invention does not limit the specific implementation of the cache scheduler 53, and for the convenience of the following description, the cache scheduler 53 in the figure will mostly be represented by a frame between the cache queue and the exit queue. Further, each time a packet from the queue buffer queue AQ n Q n to the outlet, the outlet will allow Queue amount Q n queue changed and thus affecting the degree of urgency queues outlet of Q n Q n _URG, and also affect the cache forwards the packet queue AQ n the urgency of the AQ n _URG. Therefore, each exit queue will always return the urgency of Q n _URG to cache the connection queue AQ n, so that the cache queue AQ n packet forwarding the urgency of AQ n _URG also been updated, and when the cache schedule When the server 53 needs to schedule multiple buffer queues, the buffer scheduler 53 can use the most immediate forwarding packet urgency AQ n _URG as a selection basis.

由此可見,相較於現有技術,緩存排程器53除了可不需對於緩存佇列AQ0和AQ1配置緩存佇列權重外,也不需依據緩存佇列權重來調度緩存佇列AQ0和AQ1,而是可根據每一出口佇列的佇列使用量來調度緩存佇列AQ0和AQ1。因此,如圖4所示,在步驟S410中,交換機5可針對每一出口埠的每一出口佇列產生緊急度Q n_URG,且緊急度Q n_URG用來反映對應的出口佇列Q n即將快沒有封包送的程度。接著,在步驟S430中,根據每一出口佇列的緊急度Q n_URG,緩存排程器53可選擇多個緩存佇列的一個來送出其存放的封包至所需前往的目標出口埠的目標出口佇列。 It can be seen that, compared with the prior art, the cache scheduler 53 does not need to configure the cache queue weights for the cache queues AQ0 and AQ1, and does not need to schedule the cache queues AQ0 and AQ1 according to the cache queue weights. It is possible to schedule the cache queues AQ0 and AQ1 according to the queue usage of each egress queue. Therefore, as shown in FIG. 4, in step S410, the switch 5 can generate an urgency Q n _URG for each exit queue of each exit port, and the urgency Q n _URG is used to reflect the corresponding exit queue Q n There will be no packet delivery soon. Then, in step S430, according to the urgency Q n _URG of each egress queue, the cache scheduler 53 can select one of the multiple cache queues to send the stored packets to the destination of the desired egress port Export queue.

如前所述,因為每一出口佇列可回傳緊急度Q n_URG至連接的緩存佇列AQ n,所以圖4的方法更可包括步驟S420,但也可以省略步驟S420。在步驟S420中,根據連接的每一出口佇列的緊急度Q n_URG,交換機5可決定每一緩存佇列的轉發封包緊急度AQ n_URG,且轉發封包緊急度AQ n_URG用來反映對應的緩存佇列AQ n急需要送出其存放的封包的程度。相對地,步驟S430的「根據每一出口佇列的緊急度Q n_URG,緩存排程器53選擇多個緩存佇列的一個」就可以是指根據每一緩存佇列的轉發封包緊急度AQ n_URG,緩存排程器53選擇最急需要送出封包的緩存佇列。由於細節已如同前述內容所陳,故於此就不再多加贅述。 As mentioned above, because each egress queue can return the urgency Q n _URG to the connected cache queue AQ n , the method in FIG. 4 may further include step S420, but step S420 may also be omitted. In step S420, according to the urgency Q n _URG of each egress queue of the connection, the switch 5 can determine the urgency of forwarding packets AQ n _URG of each buffer queue, and the urgency of forwarding packets AQ n _URG is used to reflect the corresponding The extent to which the buffer queue AQ n urgently needs to send the stored packets. In contrast, in step S430, "according to the urgency Q n _URG of each egress queue, the cache scheduler 53 selects one of the multiple cache queues" can refer to the forwarding packet urgency AQ of each cache queue. n _URG, the buffer scheduler 53 selects the buffer queue that needs to send the packet most urgently. Since the details are as stated in the foregoing content, I will not repeat them here.

另一方面,當緩存排程器53在選擇多個緩存佇列的一個時,如果這些緩存佇列有兩個以上的轉發封包緊急度都反映對應的這些緩存佇列最急需要送出封包的話,緩存排程器53則採用輪循(Round Robin)或隨機的方式選擇對應的這些緩存佇列的一個。以圖6為例, n改為0、1或2。也就是說,每一出口埠具有三個出口佇列Q0、Q1和Q2,且每一出口埠的出口佇列Q0、Q1和Q2分別連接到緩存佇列AQ0、AQ1和AQ2。因此,當轉發封包緊急度AQ0_URG和AQ1_URG皆為1,且轉發封包緊急度AQ2_URG為2時,緩存排程器53就應該會優先調度緩存佇列AQ0和AQ1。概念上,圖6的緩存排程器53可輪流調度緩存佇列AQ0和AQ1,且每次只調度緩存佇列AQ0或AQ1來送出其存放的一筆封包到所需前往的出口埠P m的出口佇列Q0或Q1,但事實上,因為緊急度Q n_URG的改變會影響到緩存排程器53的選擇結果,所以圖6的緩存排程器53也可採用隨機的方式選擇緩存佇列AQ0或AQ1來送出其存放的一筆封包到所需前往的出口埠P m的出口佇列Q0或Q1。 On the other hand, when the cache scheduler 53 selects one of the multiple cache queues, if the urgency of forwarding packets in these cache queues with more than two forwarded packets all reflects that the corresponding cache queues most urgently need to send the packet, The cache scheduler 53 selects one of these cache queues in a round robin or random manner. Taking Figure 6 as an example, n is changed to 0, 1, or 2. That is, each egress port has three egress queues Q0, Q1, and Q2, and the egress queues Q0, Q1, and Q2 of each egress port are connected to the cache queues AQ0, AQ1, and AQ2, respectively. Therefore, when the urgency of forwarding packets AQ0_URG and AQ1_URG are both 1, and the urgency of forwarding packets AQ2_URG is 2, the cache scheduler 53 should prioritize the scheduling of the cache queues AQ0 and AQ1. Conceptually, the cache scheduler 53 of FIG. 6 can schedule the cache queues AQ0 and AQ1 in turn, and only schedule the cache queues AQ0 or AQ1 each time to send a packet stored in it to the exit of the desired exit port P m Queue Q0 or Q1, but in fact, because the change of the urgency Q n _URG will affect the selection result of the cache scheduler 53, the cache scheduler 53 in FIG. 6 can also select the cache queue AQ0 in a random manner. Or AQ1 sends a packet stored in it to the exit queue Q0 or Q1 of the desired exit port P m.

從另一角度而言,如果偏袒單一個緩存佇列一直將存放的封包送到某一出口佇列的話,可能會讓其它出口佇列飢餓到沒有封包可送,導致出口佇列權重失衡。以圖6為例,轉發封包緊急度AQ0_URG和AQ1_URG是分別根據出口埠P1的出口佇列Q0的緊急度Q0_URG和出口埠P0的出口佇列Q1緊急度Q1_URG來決定。因此,如果緩存排程器53優先調度緩存佇列AQ0來送出其存放的封包到出口埠P1的出口佇列Q0,且出口埠P1的出口佇列Q0的出口佇列權重較大,甚至是絕對優先權(Strict Priority,SP)的話,出口埠P1的出口佇列Q0就會一直被出口埠P1的排程器51來做調度,以至於轉發封包緊急度AQ0_URG可能會一直處於為1的情形,且緩存排程器53也就一直調度緩存佇列AQ0,而沒有機會調度緩存佇列AQ1,使得出口埠P0的出口佇列Q1容易出現沒有封包送的情形。From another point of view, if a single cache queue always sends the stored packets to a certain egress queue, it may starve other egress queues to the point that there are no packets to send, resulting in an imbalance in the weight of the egress queue. Taking Figure 6 as an example, the forwarding packet urgency levels AQ0_URG and AQ1_URG are determined according to the urgency level Q0_URG of the egress queue Q0 of the egress port P1 and the egress queue Q1 urgency Q1_URG of the egress port P0, respectively. Therefore, if the cache scheduler 53 preferentially schedules the cache queue AQ0 to send its stored packets to the egress queue Q0 of the egress port P1, and the egress queue Q0 of the egress port P1 has a larger weight, even absolute With Strict Priority (SP), the egress queue Q0 of the egress port P1 will always be scheduled by the scheduler 51 of the egress port P1, so that the urgency of forwarding packets AQ0_URG may always be 1. In addition, the cache scheduler 53 always schedules the cache queue AQ0, and has no opportunity to schedule the cache queue AQ1, so that the egress queue Q1 of the egress port P0 is prone to no packet transmission.

另外,在本實施例中,緊急度Q n_URG為1代表對應的出口佇列Q n目前累積的封包數量小於等於低閾值THR_LOW,且這有兩種情形所導致出口佇列Q n累積的封包數量小於等於低閾值THR_LOW。第一種情形是出口佇列Q n累積的封包快要被送完,所以緩存佇列AQ n急需要送出封包到出口佇列Q n,而第二種情形是還沒有封包被送到出口佇列Q n,所以緩存排程器53可暫緩調度緩存佇列AQ n。以圖7為例,中央緩存記憶體64的每一緩存佇列更可對送往每一出口埠的封包進行計數,並根據計數的結果決定每一出口埠的每一出口佇列的一無意義狀態值P mQ n_EMP_STA。 In addition, in this embodiment, the urgency Q n _URG of 1 means that the current accumulated number of packets in the corresponding egress queue Q n is less than or equal to the low threshold THR_LOW, and there are two situations that result in the accumulated packets in the egress queue Q n The number is less than or equal to the low threshold THR_LOW. The first situation is that the accumulated packets in the egress queue Q n are about to be delivered, so the buffer queue AQ n urgently needs to send the packets to the egress queue Q n , and the second situation is that no packets have been sent to the egress queue. Q n , so the cache scheduler 53 can postpone scheduling the cache queue AQ n . Taking Figure 7 as an example, each cache queue of the central cache memory 64 can also count the packets sent to each egress port, and determine the absence of each egress queue of each egress port based on the counting result Meaning state value P m Q n _EMP_STA.

舉例來說,當緩存佇列AQ n對送往出口埠P m的封包進行計數,且計數的結果等於0時,本實施例則決定出口埠P m的出口佇列Q n的無意義狀態值P mQ n_EMP_STA為成立(TRUE)。反之,當緩存佇列AQ n對送往出口埠P m的封包進行計數,且計數的結果不等於0時,本實施例則決定出口埠P m的出口佇列Q n的無意義狀態值P mQ n_EMP_STA為不成立(FALSE)。也就是說,無意義狀態值P mQ n_EMP_STA可用來指示是否沒有封包被送到出口埠P m的出口佇列Q n。如圖7所示,緩存佇列AQ0只有會送封包到出口埠P0和P2,而沒有會送封包到出口埠P1。因此,出口埠P0和P2的出口佇列Q0的無意義狀態值P0Q0_EMP_STA和P2Q0_EMP_STA皆為FALSE,且出口埠P1的出口佇列Q0的無意義狀態值P1Q0_EMP_STA為TRUE。 For example, when the buffer queue AQ n counts the packets sent to the egress port P m , and the result of the count is equal to 0, this embodiment determines the meaningless state value of the egress queue Q n of the egress port P m P m Q n _EMP_STA is established (TRUE). Conversely, when the buffer queue AQ n counts the packets sent to the egress port P m , and the result of the count is not equal to 0, this embodiment determines the meaningless state value P of the egress queue Q n of the egress port P m m Q n _EMP_STA is not established (FALSE). In other words, the meaningless status value P m Q n _EMP_STA can be used to indicate whether no packets are sent to the egress queue Q n of the egress port P m . As shown in Figure 7, the buffer queue AQ0 will only send packets to the egress port P0 and P2, but not the egress port P1. Therefore, the meaningless state values P0Q0_EMP_STA and P2Q0_EMP_STA of the egress queue Q0 of the egress ports P0 and P2 are both FALSE, and the meaningless state value P1Q0_EMP_STA of the egress queue Q0 of the egress port P1 is TRUE.

另外,圖7的每一緩存佇列更可配置一邏輯電路,用來接收與對應的緩存佇列AQ n連接的每一出口埠的每一出口佇列的無意義狀態值P mQ n_EMP_STA和回傳的緊急度Q n_URG,以決定緩存佇列AQ n的轉發封包緊急度AQ n_URG,並且將緩存佇列AQ n的轉發封包緊急度AQ n_URG傳送至緩存排程器53。在本實施例中,每一邏輯電路則利用無意義狀態值P mQ n_EMP_STA來對出口埠P m的出口佇列Q n的緊急度Q n_URG做前置處理,以排除對應的緩存佇列AQ n從未送出封包到出口佇列Q n的情形。也就是說,根據無意義狀態值P mQ n_EMP_STA,邏輯電路可調整出口埠P m的出口佇列Q n回傳的緊急度Q n_URG。 In addition, each cache queue of FIG. 7 can be further configured with a logic circuit for receiving the meaningless state value P m Q n _EMP_STA of each egress queue of each egress port connected to the corresponding cache queue AQ n and the degree of urgency backhaul Q n _URG, to determine the cache queue AQ n the degree of urgency of the packet forwarding AQ n _URG, and the buffer queue AQ n the degree of urgency of the packet forwarding AQ n _URG conveyed to scheduler buffer 53. In this embodiment, each logic circuit uses the meaningless state value P m Q n _EMP_STA to pre-process the urgency Q n _URG of the egress queue Q n of the egress port P m to exclude the corresponding cache queue. The situation where the row AQ n never sends a packet to the egress queue Q n . That is to say, according to the meaningless state value P m Q n _EMP_STA, the logic circuit can adjust the urgency Q n _URG returned by the exit queue Q n of the exit port P m.

舉例來說,當無意義狀態值P mQ n_EMP_STA為TRUE時,邏輯電路可調整出口埠P m的出口佇列Q n的緊急度Q n_URG為一特別值,例如4來表示出口埠P m的出口佇列Q n不需要緩存佇列AQ n的服務。如圖7所示,因為無意義狀態值P1Q0_EMP_STA為TRUE,所以邏輯電路65可調整出口埠P1的出口佇列Q0的緊急度Q0_URG從1變更為4。這樣一來,根據出口埠P0和P2的出口佇列Q0分別回傳的緊急度Q0_URG為3和3,以及調整後的出口埠P1的出口佇列Q0的緊急度Q0_URG為4,邏輯電路65可從中選出數值最低的緊急度Q0_URG作為緩存佇列AQ0的轉發封包緊急度AQ0_URG,即AQ0_URG=3。由於細節已如同前述內容所陳,故於此就不再多加贅述。 For example, when the meaningless state value P m Q n _EMP_STA is TRUE, the logic circuit can adjust the urgency Q n _URG of the exit queue Q n of the exit port P m to a special value, such as 4 to indicate the exit port P m exit queue buffer queue Q n AQ n need not service. As shown in FIG. 7, because the meaningless state value P1Q0_EMP_STA is TRUE, the logic circuit 65 can adjust the urgency Q0_URG of the exit queue Q0 of the exit port P1 from 1 to 4. In this way, the urgency Q0_URG returned by the exit queue Q0 of the exit ports P0 and P2 is 3 and 3 respectively, and the adjusted urgency Q0_URG of the exit queue Q0 of the exit port P1 is 4, and the logic circuit 65 can The lowest urgency Q0_URG is selected as the forwarding packet urgency AQ0_URG of the buffer queue AQ0, that is, AQ0_URG=3. Since the details are as stated in the foregoing content, I will not repeat them here.

另一方面,由前述內容可知,閾值會影響緊急度Q n_URG的對應值,所以實作上,本發明可將連接速度(Link Speed)、限流速度(Rate Limit)、出口佇列權重,以及出口佇列是否被賦予SP等因素來作為閾值的配置依據。以圖8為例,雖然出口埠P0、P1和P2的連接速度都是1Gbps,但出口埠P2的出口佇列Q1被賦予SP來優先被選出傳送封包,所以可預期出口埠P2的出口佇列Q1將不會累積太多封包,從而其閾值也就需要配置高一點來讓緩存排程器更積極地調度封包到出口佇列Q1,例如出口埠P2的出口佇列Q1的高閾值THR_HIGH和低閾值THR_LOW,以真實反映SP佇列的需求。 On the other hand, it can be seen from the foregoing that the threshold will affect the corresponding value of the urgency Q n _URG, so in practice, the present invention can set the link speed (Link Speed), the current limit speed (Rate Limit), and the weight of the exit queue, And whether the exit queue is assigned SP and other factors as the basis for the configuration of the threshold. Taking Figure 8 as an example, although the connection speeds of the egress ports P0, P1, and P2 are all 1Gbps, the egress queue Q1 of the egress port P2 is given SP to be selected to transmit packets first, so the egress queue of the egress port P2 can be expected Q1 will not accumulate too many packets, so its threshold needs to be configured higher to allow the cache scheduler to more actively schedule packets to the egress queue Q1, such as the high threshold THR_HIGH and low of the egress queue Q1 of the egress port P2 Threshold value THR_LOW, to truly reflect the demand of SP queue.

另外,當出口埠P0的出口佇列Q0和Q1的出口佇列權重分別為1和8時,出口埠P0的出口佇列Q1就會比出口埠P0的出口佇列Q0有8倍的機會被選出傳送封包。然後,為了維持封包的傳送比例能夠1:8,交換機5會希望出口埠P0的出口佇列Q1一直有封包累積以等待被送出。因此,出口埠P0的出口佇列Q1的封包需求大於出口埠P0的出口佇列Q0的封包需求,且出口埠P0的出口佇列Q1的閾值也就可配置得比出口埠P0的出口佇列Q0的閾值高,來讓緩存排程器更積極地調度封包到出口佇列Q1。總而言之,本發明不限制配置閾值的具體實現方式。In addition, when the outlet queue weights of the outlet queues Q0 and Q1 of the outlet port P0 are 1 and 8, respectively, the outlet queue Q1 of the outlet port P0 will be 8 times more likely than the outlet queue Q0 of the outlet port P0. Select the transmission packet. Then, in order to maintain the packet transmission ratio of 1:8, the switch 5 hopes that the egress queue Q1 of the egress port P0 will always accumulate packets to be sent out. Therefore, the packet demand of the egress queue Q1 of the egress port P0 is greater than the packet demand of the egress queue Q0 of the egress port P0, and the threshold of the egress queue Q1 of the egress port P0 can be configured to be higher than that of the egress queue of the egress port P0 The threshold of Q0 is high to allow the cache scheduler to more actively schedule packets to the egress queue Q1. All in all, the present invention does not limit the specific implementation manner of configuring the threshold.

綜上所述,本發明實施例所提供的交換機,除了可不需對於緩存佇列配置緩存佇列權重外,也不需依據緩存佇列權重來調度緩存佇列,而是可根據每一出口佇列的佇列使用量來調度緩存佇列。因此,本發明能滿足不同出口佇列的需求,且即時服務需要封包的出口佇列,讓出口佇列權重不會失衡,也讓緩存排程器可更有效率的運作。In summary, the switch provided by the embodiment of the present invention does not need to configure the cache queue weight for the cache queue, and does not need to schedule the cache queue according to the cache queue weight, but can be based on each egress queue. The queue usage of the row is used to schedule the cache queue. Therefore, the present invention can meet the needs of different egress queues, and real-time services require a packaged egress queue, so that the weight of the egress queue will not be unbalanced, and the cache scheduler can operate more efficiently.

以上所提供的內容僅為本發明的優選可行實施例,並非因此侷限本發明的申請專利範圍,所以凡是運用本發明說明書及圖式內容所做的等效技術變化,均包含於本發明的申請專利範圍內。The content provided above is only the preferred and feasible embodiments of the present invention, and does not limit the scope of the patent application of the present invention. Therefore, all equivalent technical changes made using the description and schematic content of the present invention are included in the application of the present invention. Within the scope of the patent.

5:交換機 P0,P1,P2:出口埠 Q0,Q1,Q2:出口佇列 AQ0,AQ1,AQ2:緩存佇列 10,11,12,50,51,52:出口埠的排程器 13,53:緩存排程器 THR_HIGH,THR_LOW:閾值 Q0_URG,Q1_URG,Q2_URG:緊急度 AQ0_URG,AQ1_URG,AQ2_URG:轉發封包緊急度 S410~S430:流程步驟 64:中央緩存記憶體 P0Q0_EMP_STA~P2Q0_EMP_STA:無意義狀態值 65,66,67:邏輯電路5: Switch P0, P1, P2: Outlet port Q0, Q1, Q2: Exit queue AQ0, AQ1, AQ2: cache queue 10,11,12,50,51,52: Scheduler for exit port 13,53: Cache Scheduler THR_HIGH, THR_LOW: threshold Q0_URG, Q1_URG, Q2_URG: Urgency AQ0_URG, AQ1_URG, AQ2_URG: urgency of forwarding packets S410~S430: Process steps 64: Central cache memory P0Q0_EMP_STA~P2Q0_EMP_STA: meaningless status value 65, 66, 67: logic circuit

圖1是出口埠使用排程器依據出口佇列權重,決定從出口佇列中抓取多少個封包做傳送的示意圖。Figure 1 is a schematic diagram of the egress port using the scheduler to determine how many packets are captured from the egress queue for transmission based on the egress queue weight.

圖2是緩存佇列內的封包在通過現有的緩存排程器送到所需前往的出口埠的出口佇列的示意圖。Fig. 2 is a schematic diagram of the egress queue of packets in the cache queue that are sent to the egress port they need to go to through the existing cache scheduler.

圖3A至圖3D是現有的緩存排程器對於緩存佇列配置緩存佇列權重的示意圖。3A to 3D are schematic diagrams of the existing cache scheduler configuring the cache queue weight for the cache queue.

圖4是本發明實施例所提供的排程方法的步驟流程圖。Fig. 4 is a flowchart of the steps of a scheduling method provided by an embodiment of the present invention.

圖5是本發明實施例所提供的交換機使用圖4的排程方法的第一示意圖。FIG. 5 is a first schematic diagram of a switch provided by an embodiment of the present invention using the scheduling method of FIG. 4.

圖6是本發明實施例所提供的交換機使用圖4的排程方法的第二示意圖。FIG. 6 is a second schematic diagram of a switch provided by an embodiment of the present invention using the scheduling method of FIG. 4.

圖7是本發明實施例所提供的交換機使用圖4的排程方法的第三示意圖。FIG. 7 is a third schematic diagram of a switch provided by an embodiment of the present invention using the scheduling method of FIG. 4.

圖8是本發明實施例所提供的交換機使用圖4的排程方法的第四示意圖。FIG. 8 is a fourth schematic diagram of a switch provided by an embodiment of the present invention using the scheduling method of FIG. 4.

5:交換機 5: Switch

P0,P1,P2:出口埠 P0, P1, P2: Outlet port

Q0,Q1:出口佇列 Q0, Q1: Exit queue

AQ0,AQ1:緩存佇列 AQ0, AQ1: cache queue

50,51,52:出口埠的排程器 50, 51, 52: Scheduler of the exit port

53:緩存排程器 53: Cache Scheduler

THR_HIGH,THR_LOW:閾值 THR_HIGH, THR_LOW: threshold

Q0_URG,Q1_URG:緊急度 Q0_URG, Q1_URG: Urgency

AQ0_URG,AQ1_URG:轉發封包緊急度 AQ0_URG, AQ1_URG: The urgency of forwarding packets

Claims (9)

一種交換機,包括: 多個緩存佇列; 多個出口埠,每一該些出口埠具有多個出口佇列,每一該些出口埠的每一該些出口佇列連接到該些緩存佇列的不同一個,其中該交換機針對每一該些出口埠的每一該些出口佇列產生一緊急度,且該緊急度用來反映對應的該出口佇列即將快沒有封包送的程度;以及 一緩存排程器,根據每一該些出口佇列的該緊急度,選擇該些緩存佇列的一個來送出其存放的該封包至所需前往的目標出口埠的目標出口佇列。 A switch including: Multiple cache queues; A plurality of egress ports, each of the egress ports has a plurality of egress queues, each of the egress queues of each of the egress ports is connected to a different one of the cache queues, wherein the switch is for each of the Each of the exit queues of the exit ports generates a degree of urgency, and the degree of urgency is used to reflect the degree to which the corresponding exit queue is about to be out of packets; and A cache scheduler, according to the urgency of each of the egress queues, selects one of the cache queues to send the stored packet to the target egress queue of the target egress port to which it needs to go. 如請求項1所述的交換機,其中每一該些出口佇列的該緊急度是根據其佇列使用量和至少一閾值的比較結果來產生。The switch according to claim 1, wherein the urgency of each of the exit queues is generated based on the comparison result of the queue usage and at least a threshold. 如請求項1所述的交換機,其中每一該些出口佇列的該緊急度是根據其佇列使用量和流速的比較結果來產生。The switch according to claim 1, wherein the urgency of each of the exit queues is generated based on the comparison result of the queue usage and the flow rate. 如請求項1所述的交換機,其中每一該些出口佇列回傳該緊急度至連接的該緩存佇列,且該交換機更用來: 根據連接的每一該些出口佇列的該緊急度,決定每一該些緩存佇列的一轉發封包緊急度,且該轉發封包緊急度用來反映對應的該緩存佇列急需要送出其存放的該封包的程度。 The switch according to claim 1, wherein each of the exit queues returns the urgency to the connected cache queue, and the switch is further used to: According to the urgency of each of the egress queues of the connection, determine the urgency of a forwarded packet for each of the cache queues, and the urgency of the forwarded packet is used to reflect that the corresponding cache queue urgently needs to be sent out for storage The extent of the packet. 如請求項4所述的交換機,其中該緩存排程器根據每一該些出口佇列的該緊急度,選擇該些緩存佇列的一個的步驟包括: 根據每一該些緩存佇列的該轉發封包緊急度,該緩存排程器選擇最急需要送出該封包的該緩存佇列。 The switch according to claim 4, wherein the step of the cache scheduler selecting one of the cache queues according to the urgency of each of the exit queues includes: According to the urgency of the forwarded packet in each of the buffer queues, the buffer scheduler selects the buffer queue that needs to send the packet most urgently. 如請求項5所述的交換機,其中當該些緩存佇列有兩個以上的該些轉發封包緊急度都反映對應的該些緩存佇列最急需要送出該封包時,該緩存排程器採用輪循或隨機的方式選擇對應的該些緩存佇列的一個。The switch according to claim 5, wherein when the urgency of the forwarded packets with more than two packets in the cache queues reflects that the corresponding cache queues most urgently need to send the packet, the cache scheduler adopts Select one of the corresponding cache queues in a round-robin or random manner. 如請求項5所述的交換機,其中每一該些緩存佇列更對送往每一該些出口埠的該封包進行計數,並且根據該計數的結果決定每一該些出口埠的每一該些出口佇列的一無意義狀態值。The switch according to claim 5, wherein each of the buffer queues further counts the packets sent to each of the egress ports, and determines each of the egress ports according to the result of the counting. A meaningless status value for these exit queues. 如請求項7所述的交換機,其中該無意義狀態值用來指示是否沒有該封包被送到對應的該出口埠的該出口佇列。The switch according to claim 7, wherein the meaningless status value is used to indicate whether the packet is not sent to the egress queue of the corresponding egress port. 如請求項8所述的交換機,其中每一該些緩存佇列更配置一邏輯電路,根據該無意義狀態值,調整對應的該出口埠的該出口佇列回傳的該緊急度。The switch according to claim 8, wherein each of the cache queues is further configured with a logic circuit to adjust the urgency of the egress queue return of the corresponding egress port according to the meaningless state value.
TW109129263A 2020-08-27 2020-08-27 Switch TWI748613B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW109129263A TWI748613B (en) 2020-08-27 2020-08-27 Switch
US17/412,504 US20220070109A1 (en) 2020-08-27 2021-08-26 Switch and scheduling method for packet forwarding of the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109129263A TWI748613B (en) 2020-08-27 2020-08-27 Switch

Publications (2)

Publication Number Publication Date
TWI748613B true TWI748613B (en) 2021-12-01
TW202209926A TW202209926A (en) 2022-03-01

Family

ID=80357351

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109129263A TWI748613B (en) 2020-08-27 2020-08-27 Switch

Country Status (2)

Country Link
US (1) US20220070109A1 (en)
TW (1) TWI748613B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102201988A (en) * 2011-05-12 2011-09-28 西北工业大学 Scheduling method of avionics full duplex switched Ethernet (AFDX) exchanger
CN104852863A (en) * 2015-04-15 2015-08-19 清华大学 Method and device for managing dynamic threshold in switch of shared cache
WO2017000872A1 (en) * 2015-06-30 2017-01-05 中兴通讯股份有限公司 Buffer allocation method and device
TWI593253B (en) * 2011-05-18 2017-07-21 馬維爾國際貿易有限公司 Network traffic scheduler and associated method, computer program and computer program product
US20180227247A1 (en) * 2015-02-03 2018-08-09 Avago Technologies General Ip (Singapore) Pte. Ltd. Early queueing network device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7317727B2 (en) * 2003-05-21 2008-01-08 International Business Machines Corporation Method and systems for controlling ATM traffic using bandwidth allocation technology
US9485188B2 (en) * 2013-02-01 2016-11-01 International Business Machines Corporation Virtual switching based flow control

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102201988A (en) * 2011-05-12 2011-09-28 西北工业大学 Scheduling method of avionics full duplex switched Ethernet (AFDX) exchanger
TWI593253B (en) * 2011-05-18 2017-07-21 馬維爾國際貿易有限公司 Network traffic scheduler and associated method, computer program and computer program product
US20180227247A1 (en) * 2015-02-03 2018-08-09 Avago Technologies General Ip (Singapore) Pte. Ltd. Early queueing network device
CN104852863A (en) * 2015-04-15 2015-08-19 清华大学 Method and device for managing dynamic threshold in switch of shared cache
WO2017000872A1 (en) * 2015-06-30 2017-01-05 中兴通讯股份有限公司 Buffer allocation method and device

Also Published As

Publication number Publication date
TW202209926A (en) 2022-03-01
US20220070109A1 (en) 2022-03-03

Similar Documents

Publication Publication Date Title
US10764208B2 (en) Distributed switch architecture
US7426185B1 (en) Backpressure mechanism for switching fabric
US7953002B2 (en) Buffer management and flow control mechanism including packet-based dynamic thresholding
US8218546B2 (en) Interleaved processing of dropped packets in a network device
US7058057B2 (en) Network switch port traffic manager having configurable packet and cell servicing
US9083655B2 (en) Internal cut-through for distributed switches
US8467295B2 (en) System and methods for distributed quality of service enforcement
US20070070895A1 (en) Scaleable channel scheduler system and method
US20020141427A1 (en) Method and apparatus for a traffic optimizing multi-stage switch fabric network
US20110038261A1 (en) Traffic manager and a method for a traffic manager
US20020097733A1 (en) Packet transmitting apparatus
US20100150164A1 (en) Flow-based queuing of network traffic
US20110019544A1 (en) Systems for scheduling the transmission of data in a network device
WO2002062013A2 (en) Methods and systems providing fair queuing and priority scheduling to enhance quality of service in a network
EP1654616A2 (en) Method and apparatus for bandwidth guarantee and overload protection in a network switch
KR20030019608A (en) Method and apparatus for reducing pool starvation in a shared memory switch
WO2003005227A1 (en) Method and apparatus for allocating link bandwidth
CA2462793C (en) Distributed transmission of traffic streams in communication networks
US20050047405A1 (en) Switching device for controlling data packet flow
US7477636B2 (en) Processor with scheduler architecture supporting multiple distinct scheduling algorithms
US8879578B2 (en) Reducing store and forward delay in distributed systems
JP4164771B2 (en) Load balance type switch device and load balance type switch method
US7769026B2 (en) Efficient sort scheme for a hierarchical scheduler
TWI748613B (en) Switch
US7619971B1 (en) Methods, systems, and computer program products for allocating excess bandwidth of an output among network users