WO2014205812A1 - 组表项的添加方法和交换机 - Google Patents

组表项的添加方法和交换机 Download PDF

Info

Publication number
WO2014205812A1
WO2014205812A1 PCT/CN2013/078453 CN2013078453W WO2014205812A1 WO 2014205812 A1 WO2014205812 A1 WO 2014205812A1 CN 2013078453 W CN2013078453 W CN 2013078453W WO 2014205812 A1 WO2014205812 A1 WO 2014205812A1
Authority
WO
WIPO (PCT)
Prior art keywords
group
entries
importance
switch
action
Prior art date
Application number
PCT/CN2013/078453
Other languages
English (en)
French (fr)
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 PCT/CN2013/078453 priority Critical patent/WO2014205812A1/zh
Priority to EP13887701.4A priority patent/EP3001617B1/en
Priority to CN201380077892.9A priority patent/CN105379207B/zh
Priority to PCT/CN2013/080021 priority patent/WO2014205883A1/zh
Publication of WO2014205812A1 publication Critical patent/WO2014205812A1/zh
Priority to US14/981,412 priority patent/US9942113B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/64Hybrid switching systems
    • H04L12/6418Hybrid transport
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • H04L43/062Generation of reports related to network traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/21Flow control; Congestion control using leaky-bucket
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method and an exchange for adding a group entry.
  • OpenFlow is a typical network device architecture with separate control and forwarding, and has attracted widespread attention.
  • the switch In OpenFlow, the switch is connected to the controller (Controller) through a secure channel. In OpenFlow, the switch maintains two tables: a flow table and a group table.
  • the flow table is the core data structure of the switch for forwarding policy control
  • the group table is used to implement the core data structure of actions such as multicast, broadcast or load balancing.
  • the switch is responsible for querying and managing the flow table and group table.
  • OpenFlow group entry can be as shown in Table 1.
  • the controller adds a group entry to the switch via the OFPT_GROUP_MOD (OFPGC_ ADD) message. If the addition is unsuccessful, the switch returns an error message (ofp_error_msg) indicating the type of OFPET_GROUP_MOD_FAILED and the corresponding code (where the group entry overflows to the OFPGMFC_OUT_OF_GROUPS code; the action bucket overflows the OFPGMFC_OUT_OF_BUCKETS code).
  • OFPT_GROUP_MOD OFPT_GROUP_MOD
  • the group entry has no aging mechanism of the entry, so it is easy to cause the group table to overflow.
  • the controller controller sends the group entry, it does not know whether the group table is full or not, but only after receiving the switch. After the error message, the controller can know that the group table is full, and then the corresponding processing is performed. Usually, the controller performs the delete (DELETE) operation and then performs the add (ADD) operation, so that the controller adds additional processing and increases. The burden on the controller.
  • Embodiments of the present invention provide a method and a switch for adding a group entry.
  • a first aspect of the embodiments of the present invention provides a method for adding a group entry, including: receiving, by the switch, a first group of entries sent by the controller, where the first group of entries carries the importance of the first group of entries Instructing information, the importance indication information of the first group of entries is used to indicate the importance of the first group of entries, and the first group of entries includes a first action bucket;
  • the switch determines that the first group of entries cannot be added to the group table, the switch determines whether a second group entry exists in the group table, and the second group table carries the second group table
  • the importance indication information of the item is used to indicate the importance of the second group of entries, wherein the second group of entries is less important than the first
  • the importance of the set of entries, the second set of entries includes a second action bucket; the number of the first action buckets is not greater than a sum of the first value and the number of the second action buckets, the first The value is the number of action buckets available in the group table;
  • the switch deletes the second group entry, and adds the first group entry to the group table.
  • the determining, by the switch, that the first group of entries cannot be added to the group table includes:
  • the switch determines that there is no idle group entry in the group table or the number of the first action bucket is greater than the first value.
  • the importance indication information of the first group of entries is carried in a counter field, a group identifier field, or a new one of the first group of entries In the field.
  • a second aspect of the embodiments of the present invention provides a switch, including:
  • a receiving module configured to receive a first group of entries sent by the controller, where the first group of entries carries the importance indication information of the first group of entries, and the importance indication information of the first group of entries
  • the first group of entries includes a first action bucket
  • the determining module is configured to determine that the first group of entries cannot be added in the group table, and Whether the second set of entries exists in the group table, the second set of entries carries the importance indication information of the second set of entries, and the importance indication information of the second set of entries is used to indicate the Second group
  • the importance of the entry wherein the importance of the second set of entries is lower than the importance of the first set of entries, the second set of entries includes a second action bucket;
  • the number is not greater than the sum of the first value and the number of the second action buckets, and the first value is the number of action buckets available in the group table;
  • an adding module configured to: when the determining module determines that the second group entry exists in the group table, delete the second group entry, and add the first group entry to the group table in.
  • the determining module is specifically configured to determine that the number of the idle group entries or the number of the first action buckets in the group table is greater than Said the first value.
  • a third aspect of the embodiments of the present invention provides a switch, including: a transmitter, a receiver, a memory, and a processor respectively connected to the transmitter, the receiver, and the memory; the receiver, configured to receive a first group of entries sent by the controller, where the first group of entries carries the importance indication information of the first group of entries, and the importance indication information of the first group of entries is used to indicate the The importance of a set of entries, the first set of entries includes a first action bucket; the memory is configured to store program code; and when the program code is executed, the processor is configured to perform the following operations: The first group of entries cannot be added to the group table, and the second group of entries is determined in the group table, and the second group of entries carries the importance indication information of the second group of entries.
  • the importance indication information of the second group of entries is used to indicate the importance of the second group of entries, wherein the importance of the second group of entries is lower than the importance of the first set of entries.
  • Sex the second set of tables
  • the second action bucket is included; the number of the first action bucket is not greater than a sum of the first value and the number of the second action bucket, and the first value is a number of action buckets available in the group table; When it is determined that the second group of entries exists in the group table, deleting the second group of entries, and adding the first group of entries to the group table.
  • the processor is specifically configured to determine that the number of the idle group entries or the number of the first action buckets in the group table is greater than Said the first value.
  • the beneficial effects of the embodiment of the present invention are: after the switch receives the first group of entries sent by the controller, and determines that the first group of entries cannot be added in the group table, the switch determines whether the second group of entries exists in the group table.
  • the second group of entries carries the importance indication information of the second group of entries, and the importance indication information of the second group of entries is used to indicate the importance of the second group of entries, where the second group
  • the importance of the entry is lower than the importance of the first set of entries, and the second set of entries includes the second action bucket;
  • the number of the first action bucket is not greater than the sum of the first value and the number of the second action bucket,
  • the first value is the number of action buckets available in the group table; if the second group entry exists in the group table, the switch deletes the second group entry, and adds the first group entry to the group table; Therefore, the group item with higher importance is preferentially added on the switch.
  • the switch in the embodiment of the present invention can reduce the number of times the error message is sent to the controller, which is beneficial to reducing the processing load of the controller.
  • the embodiment of the invention enables the switch to timely process important group entries and improve the service quality of the important flows.
  • FIG. 1 is a flow chart of an embodiment of a method for adding a group entry of the present invention
  • FIG. 2 is a schematic structural diagram of an embodiment of a switch according to the present invention.
  • FIG. 3 is a schematic structural diagram of another embodiment of a switch according to the present invention. detailed description
  • FIG. 1 is a flowchart of an embodiment of a method for adding a group entry according to the present invention. As shown in FIG. 1 , the method for adding the group entry may include:
  • the switch receives the first group of entries sent by the controller, where the first group of entries carries the importance indication information of the first group of entries, and the importance indication information of the first group of entries is used to indicate the first group.
  • the importance of the entry, the first set of entries above includes the first action bucket.
  • the importance indication information of the first group of entries is carried in a counter of the first group of entries.
  • Field, group ID field, or new field For example, this new field can be important
  • the embodiment of the present invention is not limited thereto, and the name of the newly added field is not limited in the embodiment of the present invention.
  • the importance indication information of the first group of entries may also be carried in some information of the related flow table of the group table, for example, a field indicating the importance of the flow table.
  • the switch determines that the first group entry cannot be added to the group table, and the switch determines whether the second group entry exists in the group table.
  • the second group of entries carries the importance indication information of the second group of entries, and the importance indication information of the second group of entries is used to indicate the importance of the second group of entries, where the second group is The importance of the entry is lower than the importance of the first set of entries, and the second set of entries includes the second action bucket; the number of the first action bucket is not greater than the sum of the first value and the number of the second action bucket.
  • the first value above is the number of action buckets available in the group table.
  • the number of action buckets available in the group table is the difference between the maximum value of the action buckets of the group table and the number of used action buckets in the group table.
  • the switch determines that the first group of entries cannot be added to the group table.
  • the switch determines that the number of idle group entries or the number of the first action buckets in the group table is greater than the first value.
  • the switch deletes the second group entry, and adds the first group entry to the group table.
  • the second group of entries may be a group entry or a plurality of group entries, which is not limited by the present invention.
  • the switch after the switch receives the first group of entries sent by the controller, and determines that the first group of entries cannot be added to the group table, the switch determines whether the second group of entries exists in the group table, and the second group The importance of the second set of entries is used to indicate the importance of the second set of entries, wherein the second set of entries is less important than the importance of the second set of entries.
  • the importance of the first set of entries, the second set of entries includes a second action bucket; the number of the first action buckets is not greater than the sum of the first value and the number of second action buckets, and the first value is the group table
  • the number of action buckets available in the switch if there is a second set of entries in the group table, the switch deletes the second set of entries, and adds the first set of entries to the above-mentioned group table; Adding a group entry with higher importance, so the switch in the embodiment of the present invention can reduce the control
  • the number of times the controller sends an error message helps to reduce the processing load on the controller.
  • the embodiment of the present invention enables the switch to process important group entries in time, and improves the service quality of the important flows.
  • the following is an example of the field added in the group entry as an importance field.
  • the group entry after the importance field is added may be as shown in Table 2.
  • the importance field is a new field, and the importance field carries the importance indication information of the group entry, and the importance indication information of the group entry is used to indicate the importance of the group entry, specifically, the group table.
  • the importance indication information of the item may be the value of the importance field, that is, the value of the importance field may be used to indicate the importance of the group entry.
  • the embodiment of the present invention can solve the problem of group table overflow by adding the above importance field to the group table item, and further can be decomposed into two problems of solving the group table item overflow and the action bucket overflow.
  • the value of the action bucket field in all the group entries of the above group table is less than or equal to the maximum value of the action bucket of the above group table (GROUP_TABLE_MAX_BUCKETS).
  • GROUP_TABLE_MAX_BUCKETS N;
  • the group table entries are G ⁇ G ⁇ ⁇ Gs ⁇ Gs, and the corresponding importance fields are P ⁇ P ⁇ ⁇ Ps ⁇ Ps, the values are arranged from small to large and the smaller the value, the higher the importance.
  • the value of the corresponding action bucket field is ⁇ .. ⁇ and assumes that the group entry to be added is the value of the importance field in the group entry to be added, and the value of the action bucket field is .
  • Shell lj the process of adding the first set of entries to be added is as follows:
  • the switch receives the first group of entries sent by the controller.
  • the value of the importance field in the first group of entries is P, and the value of the action bucket field is .
  • the switch determines that the first group of entries cannot be added to the group table, that is, the switch determines that there is no idle group entry in the group table or the number of the first action bucket is greater than the first value, where the first value is the foregoing group table.
  • the number of action buckets available in the group table wherein the number of action buckets available in the group table is the difference between the maximum value of the action buckets of the group table and the number of used action buckets in the group table; that is, the switch After determining to add the first group of items G above, the group table entry will overflow and/or the action bucket overflows.
  • the switch compares ⁇ , if P s ⁇ P, that is, the importance is lower than the lowest importance group entry in the added table of the above table, the switch sends an error message to the controller, waiting for external processing Further processing; and if? 8 > , that is, the importance is higher than the group entry with the least importance of the added items in the above table, then further comparison is needed (BrHB ⁇ +Bw-Bs+B and N, if (Bi+B - .+ Bs— ⁇ -Bs+Bi) ⁇ N, ie Bi ⁇ ( ⁇ - ,. + ⁇ !) + B S, i.e.
  • the number of the first action bucket is not greater than the sum of the first value and the number of the second action bucket, wherein ⁇ ⁇ is the number of the second action bucket, ( ⁇ - (B 1+ B 2+ ... + B Sl ) ) is the first value, indicating that the replacement G s can be used.
  • G s is the second group of entries.
  • the switch deletes G s from the above group table and adds it to the above group table.
  • an idle position where the position is the idle position of the group table obtained after the deleting of G s, G s is the original position in the group table.
  • the switch can further compare (B 1 + B 2 +...-B sl -B s +B i ) and N, if ⁇ ⁇ , that is, Bi ⁇ (N - (B 1+ B 2 +...+Bs_ 2 ) ) + Bs + Bs_i, indicating that G s and G S4 can be used, and the second set of entries includes G s and G ⁇ , then the switch deletes G s and Gw from the above group table, and adds to the idle location of the above group table, where the idle location is the location obtained by deleting the G ⁇ PG S4 in the group table, specifically , a switch may be added to the original position in the group table and may be added to the home position 08 in the group table.
  • the switch can further compare P s _ 2 and P.
  • the switch sends an error message waiting for further processing by the external processor; if P s _ 2 > P, ie, the importance is higher than the importance of G s _ 2 , the switch further compares (BrHB H+Bs ⁇ - And N, such as Fruit (B!+B 2 +...+ B S 3 - B S 2 + Bs !+Bs+Bi) ⁇ N, ie Bi ⁇ (N- (B!+B 2 +...+ B S 3 +B S 1 + B s ) ) + B S 2 , indicating that the replacement G s _ 2 can be used.
  • BrHB H+Bs ⁇ - And N such as Fruit (B!+B 2 +...+ B S 3 - B S 2 + Bs !+Bs+Bi) ⁇ N, ie Bi ⁇ (N- (B!+B 2 +...+ B S 3 +B S 1 + B s )
  • the second set of entries is G s _ 2
  • the switch deletes G s _ from the above group table. 2 , and will be added to the idle position of the above group table, where the idle position is the position obtained by deleting the G s _ 2 from the group table, that is, the position of G s _ 2 originally in the group table.
  • the second set of entries includes G s and G s _ 2 , and the switch deletes G s from the above group table.
  • G s _ 2 will be added to the idle position of the above group table, where the idle position is the position obtained by deleting the G ⁇ PG S _ 2 in the above group table, specifically, the switch can be added to G s _ 2
  • the location originally in the group table can also be added to the position of 0 8 originally in the group table.
  • the switch always adds the second group of the group table entries that are less important than the first group of entries in the group table according to the principle that the deleted second group of entries has the least number and the least importance.
  • the table entry is deleted, and then the first set of table entries is added to the above group table.
  • the switch may save the group table entry overflow and/or the action bucket overflows, and the switch may add to the group by using the foregoing process.
  • the switch sends different error codes to the controller. For example, when a group entry overflow occurs, if the replacement in the above table cannot be replaced When an entry is added, OFPGMFC_OUT_OF_GROUPS is sent; and when an action bucket overflow occurs, if the added entry in the above group table cannot be replaced, OFPGMFC_OUT_OF_BUCKETS is sent.
  • the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
  • FIG. 2 is a schematic structural diagram of an embodiment of a switch according to the present invention.
  • the switch in this embodiment can implement the process of the embodiment shown in FIG. 1.
  • the switch may include: Module 21, determining module 22 and adding module 23;
  • the receiving module 21 is configured to receive the first group of entries sent by the controller, where the first group of entries carries the importance indication information of the first group of entries, and the importance indication information of the first group of entries is used to indicate The importance of the first set of entries, the first set of entries includes the first action bucket.
  • the importance indication information of the first group of entries is carried in a counter field, a group identification field, or a new field of the first group of entries.
  • the newly added field may be an importance field, and the embodiment of the present invention is not limited thereto.
  • the name of the newly added field is not limited in the embodiment of the present invention.
  • the importance indication information of the first group of entries may also be carried in some information of the related flow table of the group table, for example, a field indicating the importance of the flow table.
  • the determining module 22 is configured to determine that the first group of entries cannot be added to the group table, and whether the second group of entries is included in the group table, and the second group of entries carries the importance of the second group of entries
  • the indication information, the importance indication information of the second group of entries is used to indicate the importance of the second group of entries, wherein the importance of the second group of entries is lower than the importance of the first group of entries, the second group
  • the entry includes a second action bucket; the number of the first action bucket is not greater than a sum of the first value and the number of the second action buckets, and the first value is the number of action buckets available in the group table; wherein, the group The number of action buckets available in the table is the difference between the maximum value of the action buckets of the above group table and the number of used action buckets in the above group table.
  • the adding module 23 is configured to: when the determining module 22 determines that the second group of entries exists in the group table, delete the second group of entries, and add the first group of entries to the group table.
  • the foregoing second group entry may be a group entry or a plurality of group entries, which is not limited by the present invention.
  • the determining module 22 is specifically configured to determine that the number of the idle group entries or the number of the first action buckets in the group table is greater than the first value.
  • the determining module 22 determines that the first group of entries cannot be added in the group table, and the determining module 22 determines whether the second group of tables exists in the group table.
  • Item the second group of entries carrying the importance indication information of the second group of entries, the importance indication information of the second group of entries is used to indicate the importance of the second group of entries, wherein the second group of tables The importance of the item is lower than the importance of the first group of entries, and the second group of items includes the second action bucket; the number of the first action bucket is not greater than the sum of the first value and the number of the second action bucket, the first The value is the number of action buckets available in the group table; if the second group entry exists in the group table, the adding module 23 deletes the second group entry, and adds the first group entry to the group table.
  • the present invention can reduce the number of times an error message is sent to the controller, which is beneficial to reducing the processing load of the controller.
  • the embodiment of the invention enables the switch to process important group entries in time, and improves the service quality of the important flows.
  • FIG. 3 is a schematic structural diagram of another embodiment of the switch according to the present invention.
  • the switch in this embodiment can implement the process of the embodiment shown in FIG. 1 of the present invention.
  • the switch may include: a transmitter 31, a receiver 32, a memory 33, and a processor 34 connected to the transmitter 31, the receiver 32, and the memory 33, respectively; of course, the switch may further include an input/output device.
  • the embodiments of the present invention are not limited herein.
  • the receiver 32 is configured to receive the first group of entries sent by the controller, where the first group of entries carries the importance indication information of the first group of entries, and the importance indication information of the first group of entries is used. In order to indicate the importance of the first group of entries, the first group of entries includes the first action bucket.
  • the importance indication information of the first group of entries is carried in a counter field, a group identification field, or a new field of the first group of entries.
  • the newly added field may be an importance field, and the embodiment of the present invention is not limited thereto.
  • the name of the newly added field is not limited in the embodiment of the present invention.
  • the importance indication information of the first group of entries may also be carried in some information of the related flow table of the group table, for example, a field indicating the importance of the flow table.
  • a memory 33 configured to store program code; when the program code is executed, causing the processor 34 to perform the following operations: determining that the first group of entries cannot be added in the group table, and determining whether the second table exists in the group table a group entry, where the second group of entries carries the importance indication information of the second group of entries, and the importance indication information of the second group of entries is used to indicate the importance of the second group of entries, where The importance of the group entry is lower than the importance of the first set of entries, and the second set of entries includes the second action bucket; the number of the first action bucket is not greater than the sum of the first value and the number of the second action buckets, The first value is the number of action buckets available in the group table.
  • the number of action buckets available in the group table is the maximum value of the action bucket of the group table and the number of used action buckets in the group table.
  • the second group of entries in the group table is determined to be deleted, the second group of entries is deleted, and the first group of entries is added to the group table.
  • the foregoing second group of entries may be a group entry or a plurality of group entries, which is not limited by the present invention.
  • the processor 34 is specifically configured to determine that the idle group entry or the number of the first action buckets in the group table is greater than the first value.
  • the processor 34 determines that the first group of entries cannot be added in the group table, and the processor 34 determines that the group table is There is a second group of entries, where the second group of entries carries the importance indication information of the second group of entries, and the importance indication information of the second group of entries is used to indicate the importance of the second group of entries.
  • the second set of entries is less important than the first set of entries, and the second set of entries includes the second action bucket; the number of the first action buckets is not greater than the first value and the second action bucket.
  • the switch in the embodiment of the present invention can reduce the number of times the error message is sent to the controller, which is beneficial to reducing the processing of the controller. burden.
  • the embodiment of the invention enables the switch to process important group entries in time, and improves the service quality of the important flows.
  • modules in the apparatus in the embodiments may be distributed in the apparatus of the embodiment according to the embodiment description, or the corresponding changes may be located in one or more apparatuses different from the embodiment.
  • the modules of the above embodiments may be combined into one module, or may be further split into a plurality of sub-modules.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提供一种组表项的添加方法和交换机,该组表项的添加方法包括:交换机接收控制器发送的第一组表项,上述第一组表项中携带第一组表项的重要性指示信息,第一组表项包括第一动作桶;交换机确定无法在组表中添加第一组表项,确定上述组表中是否存在第二组表项,其中,第二组表项的重要性低于第一组表项的重要性,第二组表项包括第二动作桶;第一动作桶的数目不大于第一值与第二动作桶的数目之和,第一值为上述组表中可用的动作桶的数目;如果上述组表中存在第二组表项,则交换机删除上述第二组表项,且将第一组表项添加到上述组表中。本发明实施例可以实现在交换机上优先添加重要性较高的组表项,因此本发明实施例中的交换机能减少向控制器发送错误消息的次数,有利于降低控制器的处理负担。另外,本发明实施例能使交换机对重要的组表项进行及时处理,提高了重要流的服务质量。

Description

技术领域
本发明涉及通信技术领域, 尤其涉及一种组表项的添加方法和交换
背景技术
随着网络设备新技术的不断发展, 网络设备向着控制和转发分离的架 构转变。 OpenFlow 便是一个典型的控制和转发相分离的网络设备架构, 并已经引起广泛的关注。
OpenFlow中, 交换机通过一个安全通道连接到控制器 (Controller) 。 OpenFlow 中, 交换机维护两种表: 流表和组表。 流表是交换机进行转发 策略控制的核心数据结构, 而组表用于实现组播、 广播或负载均衡等动作 的核心数据结构。 交换机负责对流表和组表进行查询和管理。
现有技术中, OpenFlow的组表项可以如表 1所示。
表 1
Figure imgf000003_0001
现 有 的 OpenFlow 协 议 中 规 定 , 控 制 器 通 过 OFPT_GROUP_MOD(OFPGC_ ADD)消息向交换机添加组表项。 如果添加 不成功, 那么交换机会返回错误消息 ( ofp_error_msg ) , 并指明 OFPET_GROUP_MOD_FAILED的类型和相应代码 (其中, 组表项溢出返 回 OFPGMFC_OUT_OF_GROUPS 代 码 ; 动 作 桶 溢 出 返 回 OFPGMFC_OUT_OF_BUCKETS代码) 。
但是, 现有技术中, 组表项没有表项老化机制, 因此容易导致组表溢 出, 控制器控制器下发组表项时, 并不知道组表是否已满, 只有在接收到 交换机发送的错误消息之后, 控制器才能获知组表已满, 进而才会进行相 应处理, 通常控制器会先执行删除(DELETE)操作, 再执行添加 (ADD ) 操作, 这样控制器增加了额外处理, 增加了控制器的负担。 发明内容
本发明实施例提供一种组表项的添加方法和交换机。
本发明实施例第一方面提供一种组表项的添加方法, 包括: 交换机接收控制器发送的第一组表项, 所述第一组表项中携带所述第 一组表项的重要性指示信息, 所述第一组表项的重要性指示信息用于指示 所述第一组表项的重要性, 所述第一组表项包括第一动作桶;
所述交换机确定无法在组表中添加所述第一组表项, 所述交换机确定 所述组表中是否存在第二组表项, 所述第二组表项中携带所述第二组表项 的重要性指示信息, 所述第二组表项的重要性指示信息用于指示所述第二 组表项的重要性, 其中, 所述第二组表项的重要性低于所述第一组表项的 重要性, 所述第二组表项包括第二动作桶; 所述第一动作桶的数目不大于 第一值与所述第二动作桶的数目之和, 所述第一值为所述组表中可用的动 作桶的数目;
如果所述组表中存在所述第二组表项, 则所述交换机删除所述第二组 表项, 且将所述第一组表项添加到所述组表中。
结合第一方面, 在第一方面的第一种可能的实现方式中, 所述交换机 确定无法在组表中添加所述第一组表项包括:
所述交换机确定所述组表中不存在空闲组表项或所述第一动作桶的 数目大于所述第一值。
结合第一方面, 在第一方面的第二种可能的实现方式中, 所述第一组 表项的重要性指示信息携带在所述第一组表项的计数器字段、 组标识字段 或新增字段中。
本发明实施例第二方面提供一种交换机, 包括:
接收模块, 用于接收控制器发送的第一组表项, 所述第一组表项中携 带所述第一组表项的重要性指示信息, 所述第一组表项的重要性指示信息 用于指示所述第一组表项的重要性, 所述第一组表项包括第一动作桶; 确定模块, 用于确定无法在组表中添加所述第一组表项, 以及确定所 述组表中是否存在第二组表项, 所述第二组表项中携带所述第二组表项的 重要性指示信息, 所述第二组表项的重要性指示信息用于指示所述第二组 表项的重要性, 其中, 所述第二组表项的重要性低于所述第一组表项的重 要性, 所述第二组表项包括第二动作桶; 所述第一动作桶的数目不大于第 一值与所述第二动作桶的数目之和, 所述第一值为所述组表中可用的动作 桶的数目;
添加模块, 用于当所述确定模块确定所述组表中存在所述第二组表项 时, 删除所述第二组表项, 且将所述第一组表项添加到所述组表中。
结合第二方面, 在第二方面的第一种可能的实现方式中, 所述确定模 块, 具体用于确定所述组表中不存在空闲组表项或所述第一动作桶的数目 大于所述第一值。
本发明实施例第三方面提供一种交换机, 包括: 发送器、 接收器、 存 储器以及分别与所述发送器、 所述接收器和所述存储器连接的处理器; 所述接收器, 用于接收控制器发送的第一组表项, 所述第一组表项中 携带所述第一组表项的重要性指示信息, 所述第一组表项的重要性指示信 息用于指示所述第一组表项的重要性, 所述第一组表项包括第一动作桶; 所述存储器, 用于存储程序代码; 所述程序代码被执行时, 使得所述 处理器执行下述操作: 确定无法在组表中添加所述第一组表项, 以及确定 所述组表中是否存在第二组表项, 所述第二组表项中携带所述第二组表项 的重要性指示信息, 所述第二组表项的重要性指示信息用于指示所述第二 组表项的重要性, 其中, 所述第二组表项的重要性低于所述第一组表项的 重要性, 所述第二组表项包括第二动作桶; 所述第一动作桶的数目不大于 第一值与所述第二动作桶的数目之和, 所述第一值为所述组表中可用的动 作桶的数目; 以及当确定所述组表中存在所述第二组表项时, 删除所述第 二组表项, 且将所述第一组表项添加到所述组表中。
结合第三方面,在第三方面的第一种可能的实现方式中,所述处理器, 具体用于确定所述组表中不存在空闲组表项或所述第一动作桶的数目大 于所述第一值。
本发明实施例的有益效果是: 交换机接收控制器发送的第一组表项之 后, 确定无法在组表中添加第一组表项, 则交换机确定上述组表中是否存 在第二组表项, 该第二组表项中携带第二组表项的重要性指示信息, 该第 二组表项的重要性指示信息用于指示第二组表项的重要性, 其中, 第二组 表项的重要性低于第一组表项的重要性, 第二组表项包括第二动作桶; 上 述第一动作桶的数目不大于第一值与第二动作桶的数目之和, 该第一值为 上述组表中可用的动作桶的数目; 如果上述组表中存在第二组表项, 则交 换机删除第二组表项, 且将第一组表项添加到上述组表中; 从而可以实现 在交换机上优先添加重要性较高的组表项, 因此本发明实施例中的交换机 能减少向控制器发送错误消息的次数, 有利于降低控制器的处理负担。 另 夕卜, 本发明实施例能使交换机对重要的组表项进行及时处理, 提高了重要 流的服务质量。 附图说明 为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述 中所需要使用的附图作一简单地介绍, 显而易见地, 下面描述中的附图是 本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳 动性的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明组表项的添加方法一个实施例的流程图;
图 2为本发明交换机一个实施例的结构示意图;
图 3为本发明交换机另一个实施例的结构示意图。 具体实施方式
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本 发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描 述, 显然,所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提 下所获得的所有其他实施例, 都属于本发明保护的范围。
图 1为本发明组表项的添加方法一个实施例的流程图, 如图 1所示, 该组表项的添加方法可以包括:
101, 交换机接收控制器发送的第一组表项, 上述第一组表项中携带 第一组表项的重要性指示信息, 上述第一组表项的重要性指示信息用于指 示第一组表项的重要性, 上述第一组表项包括第一动作桶。
其中, 上述第一组表项的重要性指示信息携带在第一组表项的计数器 字段、 组标识字段或新增字段中。 举例来说, 该新增字段可以为重要性
( Importance ) 字段, 当然本发明实施例并不仅限于此, 本发明实施例对 新增字段的名称不作限定。 另外, 上述第一组表项的重要性指示信息还可 以携带在上述组表的相关流表的某些信息中, 例如指示流表重要性的字段 中。
102, 交换机确定无法在组表中添加上述第一组表项, 该交换机确定 上述组表中是否存在第二组表项。
其中, 上述第二组表项中携带第二组表项的重要性指示信息, 该第二 组表项的重要性指示信息用于指示第二组表项的重要性, 其中, 上述第二 组表项的重要性低于第一组表项的重要性, 上述第二组表项包括第二动作 桶; 第一动作桶的数目不大于第一值与上述第二动作桶的数目之和, 上述 第一值为组表中可用的动作桶的数目。
其中, 上述组表中可用的动作桶的数目为上述组表的动作桶的最大值 与上述组表中已用的动作桶的数目之差。
具体地, 交换机确定无法在组表中添加上述第一组表项可以为: 交换 机确定上述组表中不存在空闲组表项或第一动作桶的数目大于上述第一 值。
103, 如果上述组表中存在上述第二组表项, 则交换机删除上述第二 组表项, 且将上述第一组表项添加到上述组表中。
其中, 上述第二组表项可以为一个组表项, 也可以为多个组表项, 本 发明对此不作限定。
上述实施例中, 交换机接收控制器发送的第一组表项之后, 确定无法 在组表中添加第一组表项, 则交换机确定上述组表中是否存在第二组表 项, 该第二组表项中携带第二组表项的重要性指示信息, 该第二组表项的 重要性指示信息用于指示第二组表项的重要性, 其中, 第二组表项的重要 性低于第一组表项的重要性, 第二组表项包括第二动作桶; 上述第一动作 桶的数目不大于第一值与第二动作桶的数目之和, 该第一值为上述组表中 可用的动作桶的数目; 如果上述组表中存在第二组表项, 则交换机删除第 二组表项, 且将第一组表项添加到上述组表中; 从而可以实现在交换机上 优先添加重要性较高的组表项, 因此本发明实施例中的交换机能减少向控 制器发送错误消息的次数, 有利于降低控制器的处理负担。 另外, 本发明 实施例能使交换机对重要的组表项进行及时处理, 提高了重要流的服务质 下面以在组表项中新增的字段为重要性字段为例进行说明。
本发明实施例中, 增加重要性字段后的组表项可以如表 2所示。
表 2
Figure imgf000008_0001
表 2中, 重要性字段为新增字段, 该重要性字段携带组表项的重要性 指示信息, 组表项的重要性指示信息用于指示组表项的重要性, 具体地, 上述组表项的重要性指示信息可以为该重要性字段的值, 也就是说, 可以 用上述重要性字段的值来表示组表项的重要性。
本发明实施例可以通过在组表项中增加上述重要性字段解决组表溢出问 题, 进一步可以分解为解决组表项溢出和动作桶溢出两个问题。
1、 通过重要性字段解决组表项溢出的问题。
当组表项条数达到上述组表所能添加组表项的最大数值
( GROUP_TABLE_MAX_ENTRIES )时, 成功进行组表项置换需要同时满足 两个条件:
( 1 ) 待添加的第一组表项的重要性高于要被置换的组表项的重要性;
(2)置换后上述组表所有组表项中动作桶字段的值小于或等于上述组表 的动作桶的最大值 (GROUP_TABLE_MAX_BUCKETS) 。
若 置 换 不 成 功 , 则 向 控 制 器 发 送 错 误 消 息 ( OFPGMFC_OUT_OF_GROUPS ) , 等待控制器进一步处理。
2、 通过重要性字段解决动作桶溢出的问题。
当上述组表所有表项中动作桶字段的值之和达到上述组表的动作桶的最 大值 (GROUP_TABLE_MAX_BUCKETS ) 时, 成功进行组表项置换需要同 时满足两个条件:
( 1 ) 待添加的第一组表项的重要性高于要被置换的组表项的重要性; (2)置换后上述组表所有组表项中动作桶字段的值小于或等于上述组表 的动作桶的最大值 (GROUP_TABLE_MAX_BUCKETS) 。
若 置 换 不 成 功 , 则 向 控 制 器 发 送 错 误 消 息 ( OFPGMFC_OUT_OF_BUCKETS ) , 等待控制器进一步处理。
下 面 假 设 GROUP_TABLE_MAX_ENTRIES=M ,
GROUP_TABLE_MAX_BUCKETS=N; 组表项分别为 G^G^ ^Gs^Gs, 对应 的重要性字段的值分别为 P^P^ ^Ps^Ps, 数值由小到大排列且数值越小重要 性越高, 对应的动作桶字段的值分别为^^^ ..^^^^并假设待添加的组表 项是 待添加的组表项中重要性字段的值为 P,, 动作桶字段的值是 。
贝 lj, 该待添加的第一组表项的添加过程如下:
首先, 交换机接收控制器发送的第一组表项 该第一组表项中重要性 字段的值为 P,, 动作桶字段的值是 。
然后, 交换机确定无法在组表中添加第一组表项, 即该交换机确定组表 中不存在空闲组表项或第一动作桶的数目大于第一值, 其中该第一值为上述 组表中可用的动作桶的数目, 其中, 上述组表中可用的动作桶的数目为上述 组表的动作桶的最大值与上述组表中已用的动作桶的数目之差; 也就是说, 交换机确定添加上述第一组表项 G之后, 上述组表将发生组表项溢出和 /或动 作桶溢出。
具体地, 如果交换机确定8 = ^1, 即上述组表已添加组表项的个数等于上 述组表所能添加组表项的最大数值, 则交换机确定添加 之后, 该交换机保 存的组表将发生组表项溢出;
如果交换机确定8 < ^1, ^Ά 1 + Β2 +...+ Bs_! + Bs + B, > N, 则上述交换 机确定添加 G之后, 交换机保存的组表将发生动作桶溢出;
如果交换机确定8 = ^1, ^ΆΒ1 + Β2 +...+ Bs_i + Bs + B, > N, 则交换机确 定添加 之后, 上述交换机保存的组表将发生组表项溢出和动作桶溢出。
最后, 交换机比较 Ρ^ΡΡ,, 如果 Ps ≤ P,, 即 的重要性低于上述组表已添 加表项中重要性最低的组表项, 则交换机向控制器发送错误消息, 等候外部 处理器进一步处理; 而如果?8 > , 即 的重要性高于上述组表已添加表项中 重要性最低的组表项, 则还需进一步比较 (BrHB ^+Bw-Bs+B 和 N, 若 (Bi+B - .+Bs—丄-Bs+Bi) ≤N, 即 Bi≤ (Ν-
Figure imgf000009_0001
, .+Βδ ! ) ) +BS, 也就是 说, 第一动作桶的数目不大于第一值与第二动作桶的数目之和, 其中, Β Ρ 为第二动作桶的数目, (Ν- (B1+B2+...+Bs l) ) 即为第一值, 则表明可以用 置换 Gs, 这时, Gs即为第二组表项, 接下来, 交换机从上述组表中删除 Gs, 并将 添加到上述组表的空闲位置, 这里的空闲位置即为上述组表在删除 Gs 后获得的位置, 也就是 Gs原本在组表中的位置。
若 (Bi+B -.+Bs—丄-Bs+Bi) >N, 即 B (N- (Bi+B -.+Bs—丄) ) +BS, 则 表明不可以用 置换 Gs, 这时, 交换机会进一步比较 和 , 如果 PS4 < Ρ,, 即 的重要性低于上述组表已添加表项中重要性次低的组表项, 则交换机向 控制器发送错误消息, 等候外部处理器进一步处理; 而如果?^〉^, 即 的 重要性高于上述组表已添加表项中重要性次低的组表项, 则交换机进一步比 较(BrHB -.-Bw+Bs+Bi)和 N, 若(BrHB -.-Bw+Bs+Bi) ≤N, 即 Bi≤ (N- (B1+B2+...+Bs) ) + BS 1, 也就是说, 第一动作桶的数目不大于第一值与第 二动作桶的数目之和,其中,BS— i即为第二动作桶的数目,(N-(B1+B2+...+Bs)) 即为第一值, 则表明可以用 置换 GS4, 这时, GS4即为第二组表项, 接下来, 交换机从上述组表中删除 Gw, 并将 添加到上述组表的空闲位置, 这里的空 闲位置即为上述组表在删除 GS4后获得的位置, 也就是 GS4原本在组表中的位 置。
若 (Bi+B -.-Bw+Bs+Bi) >N, 即 B (N- (B!+B2+...+Bs) ) + BS 1, 则表明不可以用 置换 GS4, 这时, 交换机可以进一步比较 (B1+B2+...-Bs l-Bs+Bi) 和 N, 如果
Figure imgf000010_0001
≤Ν, 即 Bi≤ (N- (B1+B2+...+Bs_2) ) +Bs+Bs_i, 则表明可以用 置换 Gs和 GS4, 这时, 第二 组表项包括 Gs和 G^, 于是交换机从上述组表中删除 Gs和 Gw, 并将 添加到 上述组表的空闲位置,这里的空闲位置即为上述组表在删除 G^PGS4后获得的 位置, 具体地, 交换机可以将 添加到 原本在组表中的位置, 也可以将 添加到 08原本在组表中的位置。
而如果(ΒΓΗΒ^ ..-Bw-Bs+Bi^N,即 Bi >(N-(B1+B2+...+Bs_2) )+ BS 1+BS, 则表明不可以用 置换 Gs和 G^, 这时, 交换机可以进一步比较 Ps_2和 P,, 如 果 Ps_2 ≤ Ρ,, 即 的重要性低于 Gs_2的重要性, 则交换机向控制器发送错误消 息, 等候外部处理器进一步处理; 而如果 Ps_2 > P,, 即 的重要性高于 Gs_2的 重要性, 则交换机进一步比较 (BrHB H+Bs^-
Figure imgf000010_0002
和 N, 如 果 (B!+B2+...+ BS 3 - BS 2+ Bs !+Bs+Bi)≤N,即 Bi≤ (N- (B!+B2+...+ BS 3 +BS 1 + Bs) ) + BS 2, 则表明可以用 置换 Gs_2, 这时, 第二组表项即为 Gs_2, 于是交 换机从上述组表中删除 Gs_2, 并将 添加到上述组表的空闲位置, 这里的空闲 位置即为上述组表在删除 Gs_2后获得的位置, 也就是 Gs_2原本在组表中的位 置。
而如果 (B!+B2+...+ BS 3 - BS 2 + Bs l+Bs+Bi) >N, 即 Bi > (N- (B!+B2+...+ BS 3 +BS 1+ Bs) ) + BS 2, 则表明不可以用 置换 Gs_2, 这时, 交换机可以进一 步比较(BrHB - .+ Bs- Bs—z + Bw-Bs+Bi)和 N, 如果(BrHB .. Bs3 - Bs2 + Bs l-Bs+Bi) ≤N, 即 ≤ (N- (Bi+B - .+ Bs— 3 +Bs— ) + BS + BS2, 则表明 可以用 置换 Gs和 Gs_2, 这时, 第二组表项包括 Gs和 Gs_2, 于是交换机从上述 组表中删除 Gs和 Gs_2, 并将 添加到上述组表的空闲位置, 这里的空闲位置即 为上述组表在删除 G^PGS_2后获得的位置, 具体地, 交换机可以将 添加到 Gs_2原本在组表中的位置, 也可以将 添加到 08原本在组表中的位置。
以此类推, 交换机总是按照删除的第二组表项的个数最少且重要性最低 的原则, 将上述组表已添加组表项中重要性低于上述第一组表项的第二组表 项删除, 然后将第一组表项添加到上述组表中。
需要说明的是,交换机确定添加上述待添加的第一组表项 之后, 该 交换机保存的组表将发生组表项溢出和 /或动作桶溢出时,交换机均可以通 过上述过程将 添加到上述组表中, 区别仅在于当不能用 置换上述组 表中的已添加表项时, 交换机向控制器发送的错误代码不同, 例如, 当发 生组表项溢出时, 如果不能 置换上述组表中的已添加表项, 则发送 OFPGMFC_OUT_OF_GROUPS; 而当发生动作桶溢出时, 如果不能 置 换上述组表中的已添加表项, 则发送 OFPGMFC_OUT_OF_BUCKETS。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分可 以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机可读 取存储介质中, 该程序在执行时, 执行包括上述方法实施例的; 而前述的 存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程序代码的 介质。
图 2为本发明交换机一个实施例的结构示意图, 本实施例中的交换机 可以实现图 1所示实施例的流程, 如图 2所示, 该交换机可以包括: 接收 模块 21、 确定模块 22和添加模块 23 ;
接收模块 21, 用于接收控制器发送的第一组表项, 上述第一组表项中 携带第一组表项的重要性指示信息, 上述第一组表项的重要性指示信息用 于指示第一组表项的重要性, 上述第一组表项包括第一动作桶。
其中, 上述第一组表项的重要性指示信息携带在第一组表项的计数器 字段、 组标识字段或新增字段中。 举例来说, 该新增字段可以为重要性字 段, 当然本发明实施例并不仅限于此, 本发明实施例对新增字段的名称不 作限定。 另外, 上述第一组表项的重要性指示信息还可以携带在上述组表 的相关流表的某些信息中, 例如指示流表重要性的字段中。
确定模块 22, 用于确定无法在组表中添加上述第一组表项, 以及确定 上述组表中是否存在第二组表项, 上述第二组表项中携带第二组表项的重 要性指示信息, 上述第二组表项的重要性指示信息用于指示第二组表项的 重要性, 其中, 第二组表项的重要性低于第一组表项的重要性, 第二组表 项包括第二动作桶; 第一动作桶的数目不大于第一值与上述第二动作桶的 数目之和, 该第一值为上述组表中可用的动作桶的数目; 其中, 上述组表 中可用的动作桶的数目为上述组表的动作桶的最大值与上述组表中已用 的动作桶的数目之差。
添加模块 23,用于当确定模块 22确定上述组表中存在第二组表项时, 删除上述第二组表项, 且将第一组表项添加到上述组表中。 其中, 上述第 二组表项可以为一个组表项,也可以为多个组表项,本发明对此不作限定。
其中, 确定模块 22, 具体用于确定上述组表中不存在空闲组表项或上 述第一动作桶的数目大于第一值。
上述交换机中, 接收模块 21 接收控制器发送的第一组表项之后, 确 定模块 22确定无法在组表中添加第一组表项, 则确定模块 22确定上述组 表中是否存在第二组表项, 该第二组表项中携带第二组表项的重要性指示 信息, 该第二组表项的重要性指示信息用于指示第二组表项的重要性, 其 中, 第二组表项的重要性低于第一组表项的重要性, 第二组表项包括第二 动作桶; 上述第一动作桶的数目不大于第一值与第二动作桶的数目之和, 该第一值为上述组表中可用的动作桶的数目; 如果上述组表中存在第二组 表项, 则添加模块 23删除第二组表项, 且将第一组表项添加到上述组表 中; 从而可以实现在交换机上优先添加重要性较高的组表项, 因此, 本发 明实施例中的交换机能减少向控制器发送错误消息的次数, 有利于降低控 制器的处理负担。 另外, 本发明实施例能使交换机对重要的组表项进行及 时处理, 提高了重要流的服务质量。
图 3为本发明交换机另一个实施例的结构示意图, 本实施例中的交换 机可以实现本发明图 1所示实施例的流程。 如图 3所示, 该交换机可以包 括: 发送器 31、 接收器 32、 存储器 33以及分别与发送器 31、 接收器 32 和存储器 33连接的处理器 34 ; 当然, 该交换机还可以包括输入输出装置 等通用部件, 本发明实施例在此不作任何限制。
其中, 接收器 32, 用于接收控制器发送的第一组表项, 上述第一组表 项中携带第一组表项的重要性指示信息, 上述第一组表项的重要性指示信 息用于指示第一组表项的重要性, 上述第一组表项包括第一动作桶。
其中, 上述第一组表项的重要性指示信息携带在第一组表项的计数器 字段、 组标识字段或新增字段中。 举例来说, 该新增字段可以为重要性字 段, 当然本发明实施例并不仅限于此, 本发明实施例对新增字段的名称不 作限定。 另外, 上述第一组表项的重要性指示信息还可以携带在上述组表 的相关流表的某些信息中, 例如指示流表重要性的字段中。
存储器 33, 用于存储程序代码; 所述程序代码被执行时, 使得处理器 34执行下述操作: 确定无法在组表中添加上述第一组表项, 以及确定上述 组表中是否存在第二组表项, 上述第二组表项中携带第二组表项的重要性 指示信息, 上述第二组表项的重要性指示信息用于指示第二组表项的重要 性, 其中, 第二组表项的重要性低于第一组表项的重要性, 第二组表项包 括第二动作桶; 第一动作桶的数目不大于第一值与上述第二动作桶的数目 之和, 该第一值为上述组表中可用的动作桶的数目; 其中, 上述组表中可 用的动作桶的数目为上述组表的动作桶的最大值与上述组表中已用的动 作桶的数目之差; 以及当确定上述组表中存在第二组表项时, 删除上述第 二组表项, 且将第一组表项添加到上述组表中。 其中, 上述第二组表项可 以为一个组表项, 也可以为多个组表项, 本发明对此不作限定。
本实施例中, 处理器 34, 具体用于确定上述组表中不存在空闲组表项 或上述第一动作桶的数目大于第一值。
上述交换机中, 接收器 32接收控制器发送的第一组表项之后, 处理 器 34确定无法在组表中添加第一组表项, 则处理器 34确定上述组表中是 否存在第二组表项, 该第二组表项中携带第二组表项的重要性指示信息, 该第二组表项的重要性指示信息用于指示第二组表项的重要性, 其中, 第 二组表项的重要性低于第一组表项的重要性, 第二组表项包括第二动作 桶; 上述第一动作桶的数目不大于第一值与第二动作桶的数目之和, 该第 一值为上述组表中可用的动作桶的数目; 如果上述组表中存在第二组表 项, 则处理器 34删除第二组表项, 且将第一组表项添加到上述组表中; 从而可以实现在交换机上优先添加重要性较高的组表项, 因此本发明实施 例中的交换机能减少向控制器发送错误消息的次数, 有利于降低控制器的 处理负担。另外,本发明实施例能使交换机对重要的组表项进行及时处理, 提高了重要流的服务质量。
本领域技术人员可以理解附图只是一个优选实施例的示意图, 附图中 的模块或流程并不一定是实施本发明所必须的。
本领域技术人员可以理解实施例中的装置中的模块可以按照实施例 描述进行分布于实施例的装置中, 也可以进行相应变化位于不同于本实施 例的一个或多个装置中。 上述实施例的模块可以合并为一个模块, 也可以 进一步拆分成多个子模块。
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修 改, 或者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不 使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims

权 利 要 求 书
1、 一种组表项的添加方法, 其特征在于, 包括:
交换机接收控制器发送的第一组表项, 所述第一组表项中携带所述第 一组表项的重要性指示信息, 所述第一组表项的重要性指示信息用于指示 所述第一组表项的重要性, 所述第一组表项包括第一动作桶;
所述交换机确定无法在组表中添加所述第一组表项, 所述交换机确定 所述组表中是否存在第二组表项, 所述第二组表项中携带所述第二组表项 的重要性指示信息, 所述第二组表项的重要性指示信息用于指示所述第二 组表项的重要性, 其中, 所述第二组表项的重要性低于所述第一组表项的 重要性, 所述第二组表项包括第二动作桶; 所述第一动作桶的数目不大于 第一值与所述第二动作桶的数目之和, 所述第一值为所述组表中可用的动 作桶的数目;
当所述组表中存在所述第二组表项时, 所述交换机删除所述第二组表 项, 且将所述第一组表项添加到所述组表中。
2、 根据权利要求 1 所述的方法, 其特征在于, 所述交换机确定无法 在组表中添加所述第一组表项包括:
所述交换机确定所述组表中不存在空闲组表项或所述第一动作桶的 数目大于所述第一值。
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述第一组表项 的重要性指示信息携带在所述第一组表项的计数器字段、 组标识字段或新 增字段中。
4、 一种交换机, 其特征在于, 包括:
接收模块, 用于接收控制器发送的第一组表项, 所述第一组表项中携 带所述第一组表项的重要性指示信息, 所述第一组表项的重要性指示信息 用于指示所述第一组表项的重要性, 所述第一组表项包括第一动作桶; 确定模块, 用于确定无法在组表中添加所述第一组表项, 以及确定所 述组表中是否存在第二组表项, 所述第二组表项中携带所述第二组表项的 重要性指示信息, 所述第二组表项的重要性指示信息用于指示所述第二组 表项的重要性, 其中, 所述第二组表项的重要性低于所述第一组表项的重 要性, 所述第二组表项包括第二动作桶; 所述第一动作桶的数目不大于第 一值与所述第二动作桶的数目之和, 所述第一值为所述组表中可用的动作 桶的数目;
添加模块, 用于当所述确定模块确定所述组表中存在所述第二组表项 时, 删除所述第二组表项, 且将所述第一组表项添加到所述组表中。
5、 根据权利要求 4所述的交换机, 其特征在于,
所述确定模块, 具体用于确定所述组表中不存在空闲组表项或所述第 一动作桶的数目大于所述第一值。
6、 一种交换机, 其特征在于, 包括: 发送器、 接收器、 存储器以及 分别与所述发送器、 所述接收器和所述存储器连接的处理器;
所述接收器, 用于接收控制器发送的第一组表项, 所述第一组表项中 携带所述第一组表项的重要性指示信息, 所述第一组表项的重要性指示信 息用于指示所述第一组表项的重要性, 所述第一组表项包括第一动作桶; 所述存储器, 用于存储程序代码; 所述程序代码被执行时, 使得所述 处理器执行下述操作: 确定无法在组表中添加所述第一组表项, 以及确定 所述组表中是否存在第二组表项, 所述第二组表项中携带所述第二组表项 的重要性指示信息, 所述第二组表项的重要性指示信息用于指示所述第二 组表项的重要性, 其中, 所述第二组表项的重要性低于所述第一组表项的 重要性, 所述第二组表项包括第二动作桶; 所述第一动作桶的数目不大于 第一值与所述第二动作桶的数目之和, 所述第一值为所述组表中可用的动 作桶的数目; 以及当确定所述组表中存在所述第二组表项时, 删除所述第 二组表项, 且将所述第一组表项添加到所述组表中。
7、 根据权利要求 6所述的交换机, 其特征在于,
所述处理器, 具体用于确定所述组表中不存在空闲组表项或所述第一 动作桶的数目大于所述第一值。
PCT/CN2013/078453 2013-06-28 2013-06-28 组表项的添加方法和交换机 WO2014205812A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
PCT/CN2013/078453 WO2014205812A1 (zh) 2013-06-28 2013-06-28 组表项的添加方法和交换机
EP13887701.4A EP3001617B1 (en) 2013-06-28 2013-07-24 Entry adding method and switch
CN201380077892.9A CN105379207B (zh) 2013-06-28 2013-07-24 表项添加方法和交换机
PCT/CN2013/080021 WO2014205883A1 (zh) 2013-06-28 2013-07-24 表项添加方法和交换机
US14/981,412 US9942113B2 (en) 2013-06-28 2015-12-28 Entry adding method and switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/078453 WO2014205812A1 (zh) 2013-06-28 2013-06-28 组表项的添加方法和交换机

Publications (1)

Publication Number Publication Date
WO2014205812A1 true WO2014205812A1 (zh) 2014-12-31

Family

ID=52140887

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2013/078453 WO2014205812A1 (zh) 2013-06-28 2013-06-28 组表项的添加方法和交换机
PCT/CN2013/080021 WO2014205883A1 (zh) 2013-06-28 2013-07-24 表项添加方法和交换机

Family Applications After (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/080021 WO2014205883A1 (zh) 2013-06-28 2013-07-24 表项添加方法和交换机

Country Status (3)

Country Link
US (1) US9942113B2 (zh)
EP (1) EP3001617B1 (zh)
WO (2) WO2014205812A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107404435A (zh) * 2016-05-19 2017-11-28 中兴通讯股份有限公司 一种管理组表项的方法和装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753458A (zh) * 2009-12-30 2010-06-23 杭州华三通信技术有限公司 一种nd邻居表项的处理方法及装置
CN102868578A (zh) * 2012-10-11 2013-01-09 盛科网络(苏州)有限公司 Openflow交换机表项容量的测试方法及测试***
CN102882746A (zh) * 2012-10-11 2013-01-16 盛科网络(苏州)有限公司 Openflow交换机***中流表添加速率的测试方法及***

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7817549B1 (en) * 2006-06-30 2010-10-19 Extreme Networks, Inc. Flexible flow-aging mechanism
US8072894B2 (en) 2007-11-07 2011-12-06 Juniper Networks, Inc. Systems and methods for flow monitoring
CN101686200A (zh) * 2009-08-21 2010-03-31 杭州华三通信技术有限公司 路由转发的方法和设备
JP5743906B2 (ja) * 2010-01-06 2015-07-01 日本電気株式会社 通信制御システム
CN102685006A (zh) * 2012-05-03 2012-09-19 中兴通讯股份有限公司 一种转发数据报文的方法及装置
CN102843298B (zh) * 2012-09-12 2015-08-05 盛科网络(苏州)有限公司 实现交换机芯片Openflow流表优先级的方法及***

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753458A (zh) * 2009-12-30 2010-06-23 杭州华三通信技术有限公司 一种nd邻居表项的处理方法及装置
CN102868578A (zh) * 2012-10-11 2013-01-09 盛科网络(苏州)有限公司 Openflow交换机表项容量的测试方法及测试***
CN102882746A (zh) * 2012-10-11 2013-01-16 盛科网络(苏州)有限公司 Openflow交换机***中流表添加速率的测试方法及***

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107404435A (zh) * 2016-05-19 2017-11-28 中兴通讯股份有限公司 一种管理组表项的方法和装置
CN107404435B (zh) * 2016-05-19 2021-10-15 中兴通讯股份有限公司 一种管理组表项的方法和装置

Also Published As

Publication number Publication date
US9942113B2 (en) 2018-04-10
EP3001617A4 (en) 2016-07-06
EP3001617A1 (en) 2016-03-30
US20160119201A1 (en) 2016-04-28
EP3001617B1 (en) 2018-03-21
WO2014205883A1 (zh) 2014-12-31

Similar Documents

Publication Publication Date Title
US20160285754A1 (en) Packet Processing Method, Device and System
US20110317559A1 (en) Notifying a Controller of a Change to a Packet Forwarding Configuration of a Network Element Over a Communication Channel
RU2587677C2 (ru) Система снижения нагрузки и способ снижения нагрузки
JP5923376B2 (ja) Tcp中継装置
CN103597778A (zh) 用于音频视频网络的增强流预留协议
CN110430135B (zh) 一种报文处理方法和装置
WO2021227561A1 (zh) 通信方法和装置
WO2021063254A1 (zh) 一种信息处理方法、相关设备及计算机存储介质
JP4988487B2 (ja) データの転送方法、装置、プログラム
WO2014079334A1 (zh) 邻居关系处理方法和路由设备
WO2021013321A1 (en) Apparatus, method, and computer program
WO2015081735A1 (zh) 流量卸载的方法、装置及***
WO2014107836A1 (zh) 网络告警的方法和装置
WO2014201635A1 (zh) 一种消息处理的方法及基站
US10511494B2 (en) Network control method and apparatus
WO2014205812A1 (zh) 组表项的添加方法和交换机
US11700189B2 (en) Method for performing task processing on common service entity, common service entity, apparatus and medium for task processing
WO2009062351A1 (fr) Procédé permettant de fusionner des systèmes d&#39;empilement
US9059847B2 (en) Reliable multicast broadcast in wireless networks
CN105591802A (zh) 交换设备升级方法以及装置
CN110830295B (zh) 一种设备管理方法及***
CN114422427A (zh) 一种流量均衡方法、装置、电子设备和存储介质
WO2017166874A1 (zh) 一种基带板的选择方法及装置
WO2021217583A1 (zh) 功率控制方法、用户设备、基站及计算机可读存储介质
JP6206105B2 (ja) 通信システム、通信方法および通信プログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13888315

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13888315

Country of ref document: EP

Kind code of ref document: A1