A method and device for modifying interface cache parameters

By turning off data reception and transmission on the PFC interface and using the cache check timer to check the queue cache status, the network device flow outage problem caused by modifying the PFC interface buffer parameters is solved, and the effective release of the cache is achieved.

CN115460158BActive Publication Date: 2025-02-11新华三技术有限公司合肥分公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210994682.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-18
Publication Date
2025-02-11
Estimated Expiration
2042-08-18

AI Technical Summary

Technical Problem

In the prior art, when modifying the buffer parameters of the PFC interface, it is necessary to turn off data reception of all physical interfaces of the network device, resulting in the entire network device being disconnected.

Method used

By setting the port identifier and parameters of the PFC interface to be modified, closing the data reception and transmission of the PFC interface, starting the cache check timer. When the cache check timer arrives, check the cache of each queue of the PFC interface and is occupied in the cache When the cache checks the timer timer to send and receive data of the interface whose transmission rate is greater than the transmission rate threshold during the timing period.

Benefits of technology

This avoids the interruption caused by modifying the buffer parameters of the PFC interface and closing all interface traffic of the network device, and realizes the effective release of cache.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115460158B_ABST
    Figure CN115460158B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for modifying interface cache parameters. The method includes: setting the port identifier of the priority-based flow control PFC interface to be modified and the parameters to be modified; shutting down the data reception and data transmission of the PFC interface; starting the cache check timer of the PFC interface; when the cache check timer reaches, checking the cache of each queue of the PFC interface; when the cache of any queue of the PFC interface is occupied, shutting down the data transmission and data reception of the interface whose transmission rate is greater than the transmission rate threshold during the timing of the cache check timer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to communication technology, and in particular to a priority-based flow control technology, and specifically to a method and device for modifying interface cache parameters. Background Art

[0002] The Priority-based Flow Control (PFC) function is a sophisticated flow control mechanism that controls the flow of packets based on the priority specified in the 802.1P protocol.

[0003] The PFC interface with the PFC function enabled on the network device has 8 priorities and 8 interface buffer spaces. These 8 priorities correspond to the PFC interface queues one by one, forming 8 virtualized channels. The data cache capacity of each virtualized channel is different.

[0004] When the network device modifies the relevant parameters of each buffer of the PFC interface, such as the PFC threshold, it is necessary to ensure that there is no cached data packet in each queue of the PFC interface, otherwise it will cause the switching chip to process and the cache of the PFC interface to be blocked. Therefore, in order to ensure that the network device modifies the configuration parameters of each buffer of the PFC interface, the PFC interface neither sends data packets received by other physical interfaces nor receives data packets. It is necessary to receive data packets from all physical interfaces of the network device, wait until each cached message of the PFC interface has been sent, and then modify the parameter configuration of the buffer of each queue of the PFC interface.

[0005] However, the disadvantage of the existing method of modifying the buffer parameter configuration of the PFC interface is that shutting down the data reception of all physical interfaces of the network device will cause the entire network device to be disconnected. Summary of the invention

[0006] The purpose of the present application is to provide a method and device for modifying interface buffer parameters to avoid closing the traffic of all interfaces of a network device by modifying the buffer parameters of a PFC interface.

[0007] To achieve the above-mentioned purpose, the present application provides a method for modifying interface cache parameters, the method comprising: setting a port identifier of a priority-based flow control PFC interface to be modified and the parameters to be modified; shutting down data reception and data transmission of the PFC interface; starting a cache check timer of the PFC interface; when the cache check timer expires, checking the cache of each queue of the PFC interface; when the cache of any queue of the PFC interface is occupied, shutting down data transmission and data reception of the interface whose sending rate is greater than a sending rate threshold during the timing period of the cache check timer.

[0008] To achieve the above-mentioned purpose, the present application also provides a device for modifying interface cache parameters, which device, as a dynamic host configuration protocol relay device, includes a processor and a memory; the memory is used to store processor executable instructions; wherein the processor runs the processor executable instructions in the memory to perform the following operations: set the port identifier of the priority-based flow control PFC interface to be modified and the parameters to be modified; turn off data reception and data transmission of the PFC interface; start the cache check timer of the PFC interface; when the cache check timer arrives, check the cache of each queue of the PFC interface; when the cache of any queue of the PFC interface is occupied, turn off data transmission and data reception of the interface whose sending rate is greater than the sending rate threshold during the timing period of the cache check timer.

[0009] The beneficial effect of the present application is that data sending and data receiving of the PFC interface whose cache parameters are to be modified are first closed, and the cache of each queue thereof is released; then data sending and data receiving of the interface with the largest sending rate are closed, and the cache of each queue of the PFC interface whose cache parameters are to be modified is further released, thereby avoiding flow interruption caused by closing all interface traffic of a network device due to modifying the buffer parameters of the PFC interface. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 Shown is a flow chart of a method for modifying interface cache parameters;

[0011] Figures 2A-2C A forwarding diagram of a network device that modifies the cache parameters of a PFC interface provided by the present application;

[0012] Figure 3 This application provides a method for modifying interface cache parameters. DETAILED DESCRIPTION

[0013] The present invention will be described in detail with multiple examples shown in multiple figures. In the following detailed description, multiple specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components and circuits are not described in detail in the examples to avoid making these examples difficult to understand.

[0014] Among the terms used, the term "include" means including but not limited to; the term "contain" means including but not limited to; the terms "above", "within" and "below" are inclusive of the number; the terms "greater than" and "less than" are exclusive of the number. The term "based on" means based on at least a part thereof.

[0015] Figure 1 Shown is a flow chart of a method for modifying interface cache parameters; the method comprises,

[0016] Step 101, setting the port identifier of the PFC interface to be modified and the parameters to be modified;

[0017] Step 102, shut down the data receiving and data sending of the PFC interface to be modified;

[0018] Step 103, start the cache check timer of the PFC interface to be modified;

[0019] Step 104, when the cache check timer arrives, check the cache of each queue of the PFC interface to be modified;

[0020] Step 105: When the buffer of any queue of the PFC interface to be modified is occupied, data transmission and data reception of the interface whose transmission rate is greater than the transmission rate threshold during the timing of the buffer check timer are closed.

[0021] Figure 1 The beneficial effect of the embodiment is that data sending and data receiving of the PFC interface whose cache parameters are to be modified are first closed, and the cache of each queue thereof is released; then data sending and data receiving of the interface with the highest sending rate are closed, and the cache of each queue of the PFC interface whose cache parameters are to be modified is further released, thereby avoiding flow interruption caused by closing all interface traffic of the network device due to modifying the buffer parameters of the PFC interface.

[0022] Figure 2A-2B A forwarding diagram of a network device that modifies the cache parameters of a PFC interface provided by the present application;

[0023] Figure 2A In the figure, the network device 33 is connected to the network devices 31, 32, 34, and 35 through ports P1, P2, P3, and P4, respectively. After the network device 33 receives the broadcast data message 301 through port P1, it sends it to other network devices through ports P2, P3, and P4. After the network device receives the broadcast data message 302 through port P3, it sends it to other network devices through ports P1, P2, and P4.

[0024] When it is necessary to modify the cache parameters of the interface P3 with the PFC function enabled on the network device 33, such as the PFC priority parameter, cache threshold, etc. The CPU of the network device 33 turns off the message reception and transmission of the interface P3 on the switch chip by writing a register, and sets a transmission rate threshold and a port list for the PFC interface P3; wherein the port list is empty.

[0025] The network device 33 starts a timer for the PFC interface P3, waiting for the switch chip to forward the cached data packets of each queue of the PFC interface P3 to the corresponding exit. Figure 2BAs shown, the switching chip of the network device 33 sends the broadcast data message 302 buffered by the different priority queues of the PFC interface P3 to the network devices 31, 32, and 35 through ports P1, P2, and P4. The data transmission and data reception of the interface 31 of the network device 33 are normal, and the network device 33 continues to receive the broadcast data message 301 through the interface 31, and sends it to the network devices 32 and 35 through ports P2 and P4.

[0026] When the timer reaches, the CPU of the network device 33 checks the cache occupancy of each queue of the PFC interface P3. In this embodiment, the CPU of the network device 33 determines that the cache of any queue of the PFC interface P3 is still occupied, and searches for the interface whose sending rate during the timer is greater than the sending rate threshold, which is the interface P2.

[0027] The inventors of the present application discovered in the process of implementing the present application that after the data sending and data receiving of the interface whose cache parameters are to be modified are turned off, the reason why its cache is always occupied and cannot be released is that there is an external physical loop in other interfaces. Therefore, the data packets sent to other interfaces are occupied by the high-priority packets for detecting external loops on other interfaces (such as protocol broadcast packets for loop detection), which occupies the bandwidth, resulting in the inability to forward the cached data packets after the data sending and data receiving of the interface whose cache parameters are to be modified are turned off, resulting in the inability to release the cache.

[0028] This application Figure 2B In the illustrated embodiment, the CPU of the network device 33 restarts the timer, shuts down the data transmission and data reception of the interface P2 by writing a register, records the interface P2 in the port list, and then reduces the set transmission rate threshold. The present application does not limit the manner in which the CPU of the network device 33 reduces the transmission rate threshold, and the CPU may subtract a transmission rate constant from the initially set transmission rate threshold.

[0029] In the present application, the sending rate threshold initially set by the CPU of the network device 33 may be greater than the sending rate of the interface that occupies the bandwidth; when the timer arrives, the CPU of the network device 33 can check that the cache of the queue of the PFC interface is occupied but there is no interface with a sending rate greater than the sending rate threshold during the timer timing; therefore, the network device 33 lowers the sending rate threshold to discover these interfaces that occupy the bandwidth.

[0030] The CPU of the network device 33 checks whether the reduced sending rate threshold is greater than the minimum sending rate threshold; it should be noted that, in the presence of an external loop, the sending rate of the port that continuously sends high-priority broadcast protocol messages will not be zero, and the minimum sending rate threshold in this application is greater than zero.

[0031] like Figure 2CAs shown, the network device 33 determines that the reduced sending rate threshold is greater than the minimum sending rate threshold. When the timer arrives, the CPU of the network device 33 checks that the cache of each queue of the PFC interface P3 has been released, and modifies the cache parameters of the PFC interface P3 pointed to by the port identifier of the PFC interface P3 written into the register to the parameters to be modified. Then, the CPU of the network device 33 turns on the data sending and receiving of the PFC interface P3 on the switching chip by writing to the register, and then turns on the data sending and receiving of the interface P2 recorded in the port list by writing to the register. The network device 33 clears the port list. Figure 2C As shown, in the process of modifying the cache parameters of the PFC interface P3, the present application does not need to shut down the data sending and data receiving of all interfaces of the network device at the same time, thereby avoiding the interruption of the entire network device.

[0032] If, after the interface P2 is closed in the above example, the CPU of the network device 33 reduces the sending rate threshold after the timer expires, and determines that the reduced sending rate threshold is greater than the minimum sending rate threshold and the cache of a queue of the PFC interface P3 is still occupied, then Figure 2B and 2C In this way, the data transmission and reception of the interface whose transmission rate is greater than the reduced transmission rate threshold during the timer timing is closed, the interface is recorded in the port list of the PFC interface P3, and then the timer is restarted again.

[0033] After lowering the sending rate threshold, the CPU of the network device 33 compares the lowered sending rate threshold with the minimum sending rate threshold; the lowered sending rate threshold is less than or equal to the minimum sending rate threshold, and the CPU of the network device 33 has restarted the timer multiple times to lower the sending rate threshold. In order to avoid data traffic forwarding failure caused by long-term interface closure, when the CPU of the network device 33 determines that the lowered sending rate threshold is less than or equal to the minimum sending rate threshold, it checks the cache of each queue of the PFC interface P3. When the cache of any queue of the PFC interface P3 is still occupied, the data sending and data receiving of each interface whose sending rate is greater than or equal to the minimum sending rate threshold during the previous timer timing is closed, and the data are recorded one by one in the port list of the PFC interface P3, and then the cache parameters of the PFC interface P3 are modified after waiting for a timer to expire; after the modification is completed, the data sending and data receiving of the PFC interface P3 are turned on; the data sending and receiving of each port in the port list are turned on, and then the port list is cleared.

[0034] Figure 3A schematic diagram of a device for modifying interface cache parameters provided by the present application, the device 30 at least includes: a network interface, a switching chip, a CPU and a memory. The memory is used to store processor executable instructions; wherein the processor runs the processor executable instructions in the memory to perform the following operations: setting the port identifier of the priority-based flow control PFC interface to be modified and the parameters to be modified; shutting down the data reception and data transmission of the PFC interface; starting the cache check timer of the PFC interface; when the cache check timer arrives, checking the cache of each queue of the PFC interface; when the cache of any queue of the PFC interface is occupied, shutting down the data transmission and data reception of the interface whose sending rate is greater than the sending rate threshold during the timing of the cache check timer.

[0035] The processor further performs the following operations by running the processor executable instructions in the memory: restarting the cache check timer; recording the interfaces whose sending rates are greater than the sending rate threshold during the timing of the cache check timer in the port list; and reducing the sending rate threshold.

[0036] The processor further performs the following operations by running the processor executable instructions in the memory: determining that the reduced sending rate threshold is greater than the minimum sending rate threshold; when the cache check timer arrives, checking the cache of each queue of the PFC interface; when the cache of each queue of the PFC interface has been released, modifying the cache parameter of the PFC interface pointed to by the port identifier to the parameter to be modified.

[0037] The processor further performs the following operations by running the processor executable instructions in the memory: determining that the reduced sending rate threshold is less than or equal to the minimum sending rate threshold; when the cache check timer arrives, checking the cache of each queue of the PFC interface, and when the cache of any queue of the PFC interface is occupied, closing the interface data sending and data receiving of which the sending rate is greater than or equal to the "minimum sending rate threshold" during the timing period of the cache check timer, and after waiting for a cache check timer cycle, modifying the cache parameters of the PFC interface pointed to by the port identifier to the parameters to be modified; and recording the interfaces whose sending rates are greater than or equal to the minimum sending rate threshold during the timing period of the cache check timer in the port list.

[0038] The processor further performs the following operations by running the processor executable instructions in the memory: enabling data sending and data receiving of each interface recorded in the port list; and clearing each interface recorded in the port list.

[0039] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for modifying interface cache parameters, characterized in that: The method comprises: Set the port ID of the priority-based flow control (PFC) interface to be modified and the parameters to be modified; Turn off data reception and data transmission of the PFC interface; Starting a cache check timer of the PFC interface; When the cache check timer arrives, check the cache of each queue of the PFC interface; when the cache of any queue of the PFC interface is occupied, shut down the data transmission and data reception of the interface whose transmission rate is greater than the transmission rate threshold during the timing of the cache check timer; Restarting the cache check timer; recording the interfaces whose sending rates are greater than the sending rate threshold during the timing of the cache check timer in the port list; lowering the sending rate threshold; Determine that the reduced sending rate threshold is greater than the minimum sending rate threshold; when the cache check timer arrives, check the cache of each queue of the PFC interface; when the cache of each queue of the PFC interface has been released, modify the cache parameter of the PFC interface pointed to by the port identifier to the parameter to be modified; Determine that the reduced sending rate threshold is less than or equal to the minimum sending rate threshold; when the cache check timer arrives, check the cache of each queue of the PFC interface; when the cache of any queue of the PFC interface is occupied, close the interface data sending and data receiving whose sending rate is greater than or equal to the minimum sending rate threshold during the timing of the cache check timer, wait for the cache check timer to arrive again, and modify the cache parameter of the PFC interface pointed to by the port identifier to the parameter to be modified; record the interface whose sending rate is greater than or equal to the minimum sending rate threshold during the timing of the cache check timer in the port list.

2. The method according to claim 1, characterized in that: The method further comprises: Enable data transmission and data reception of each interface recorded in the port list; Clear all interfaces recorded in the port list.

3. A device for modifying interface cache parameters, characterized in that: The device includes a processor and a memory; the memory is used to store processor-executable instructions; wherein the processor executes the processor-executable instructions in the memory to perform the following operations: Set the port ID of the priority-based flow control (PFC) interface to be modified and the parameters to be modified; Turn off data reception and data transmission of the PFC interface; Starting a cache check timer of the PFC interface; When the cache check timer arrives, check the cache of each queue of the PFC interface; when the cache of any queue of the PFC interface is occupied, shut down the data transmission and data reception of the interface whose transmission rate is greater than the transmission rate threshold during the timing of the cache check timer; Restarting the cache check timer; recording the interfaces whose sending rates are greater than the sending rate threshold during the timing of the cache check timer in the port list; lowering the sending rate threshold; Determine that the reduced sending rate threshold is greater than the minimum sending rate threshold; when the cache check timer arrives, check the cache of each queue of the PFC interface; when the cache of each queue of the PFC interface has been released, modify the cache parameter of the PFC interface pointed to by the port identifier to the parameter to be modified; Determine that the reduced sending rate threshold is less than or equal to the minimum sending rate threshold; when the cache check timer arrives, check the cache of each queue of the PFC interface; when the cache of any queue of the PFC interface is occupied, wait for the cache check timer to arrive again, close the interface data sending and data receiving whose sending rate is greater than or equal to the minimum sending rate threshold during the timing of the cache check timer, and modify the cache parameter of the PFC interface pointed to by the port identifier to the parameter to be modified; record the interface whose sending rate is greater than or equal to the minimum sending rate threshold during the timing of the cache check timer in the port list.

4. The device according to claim 3, characterized in that The processor further performs the following operations by executing the processor executable instructions in the memory: Enable data transmission and data reception of each interface recorded in the port list; Clear all interfaces recorded in the port list.

Citation Information

Patent Citations

  • Data message processing method, device and equipment

    CN102594669A

  • Port statistical parameter announcement method and equipment

    CN110768916A