摘要 |
Provided are a method for adding a group entry and a switch. The method for adding a group entry comprises: a switch receiving a first group entry sent by a controller, wherein importance indication information about the first group entry is carried in the first group entry, and the first group entry comprises first action buckets; the switch determining that it is unable to add the first group entry into a group table and determining whether a second group entry exists in the group table, wherein the importance of the second group entry is lower than that of the first group entry, and the second group entry comprises second action buckets, with the number of the first action buckets not being greater than the sum of a first value and the number of the second action buckets, and the first value being the number of available action buckets in the group table; and if the second group table item exists in the group table, the switch deleting the second group entry and adding the first group entry into the group table. The embodiment of the present invention can realize that a group entry with a higher importance is preferentially added onto the switch; therefore, the switch in the embodiment of the present invention can reduce the frequency of sending an error message to the controller, thereby being beneficial for reducing the processing burden of the controller. In addition, the embodiment of the present invention can enable the switch to process an important group entry in real time, improving the quality of service of an important flow. |