Dual-threshold flow table migration method and system based on software and hardware cooperation equipment

By adopting a double threshold decision mechanism in software and hardware collaborative devices, the problem of frequent flow table migration leads to degradation of processing performance is solved, and high-speed and stable data forwarding and efficient utilization of flow table storage is achieved.

CN119449705AActive Publication Date: 2025-02-14Chinese People's Liberation Army Cyberspace Force Information Engineering University
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202411557627.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-02-14
Estimated Expiration
2044-11-04

AI Technical Summary

Technical Problem

The existing flow table migration methods of software and hardware collaborative devices have the problem of frequent flow table migration leading to degradation in the speed limit processing performance of software and hardware.

Method used

The double threshold judgment mechanism is adopted, and by setting the instantaneous traffic migration threshold and the number of flow tables, frequent flow table migrations, and flow table migrations when necessary, to achieve reasonable switching between software and hardware collaborative processing.

Benefits of technology

It effectively avoids invalid and frequent flow table migration, provides high-speed and stable data forwarding capabilities, and optimizes the utilization of flow table storage space through the two-stage flow table aging mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449705A_ABST
    Figure CN119449705A_ABST
Patent Text Reader

Abstract

The invention provides a dual-threshold flow table migration method based on software and hardware cooperation equipment. The method comprises the following steps: a hardware forwarding subsystem receives message data and performs table look-up processing, and if table look-up is hit, the flow of a corresponding flow table is recorded; if the flow is smaller than a preset first instantaneous flow migration threshold value, listing the flow table into a first to-be-migrated list; the first to-be-migrated list is polled and checked every specified time interval, and if the time of the flow table in the first to-be-migrated list is longer than the specified time and the current flow of the flow table is smaller than the first instantaneous flow migration threshold value, the flow table is migrated to a software forwarding subsystem. According to the method, the advantages and characteristics of high hardware processing speed and large software flow table capacity are combined, and meanwhile, a double-threshold judgment mechanism is utilized, so that the problem that the line speed processing performance of software and hardware is reduced due to invalid and frequent flow table migration operation is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network high-speed processing, and in particular to a dual-threshold flow table migration method and system based on software and hardware collaborative equipment. Background Art

[0002] Traditional switching ASIC chips have the characteristics of strong forwarding capabilities, but small flow table capacity. The processing rate based on software DPDK is relatively slow, but it has the advantage of large-capacity flow tables. By designing a flow table migration method and system for software and hardware collaborative devices, the complementary advantages of software and hardware processing can be achieved, and the flow table capacity can be expanded while meeting high-speed processing. Although some existing single-threshold flow table migration methods can realize the migration of flow tables between software and hardware to a certain extent, frequent flow table migration under traffic fluctuations will cause the line-speed processing performance of software and hardware to decline, and it is impossible to achieve reasonable switching of software and hardware collaborative processing, thereby exerting the advantages of software and hardware collaboration. Summary of the invention

[0003] In order to at least solve the problem that frequent flow table migration in existing software and hardware collaborative devices leads to a decrease in software and hardware speed limit processing performance, the present invention provides a dual threshold flow table migration method and system based on software and hardware collaborative devices. The method avoids frequent flow table migration by utilizing a dual threshold decision mechanism, thereby effectively giving play to the advantages of software and hardware collaboration.

[0004] The present invention provides a dual-gate current table migration method based on a software and hardware collaborative device, comprising:

[0005] The hardware forwarding subsystem receives the packet data and performs table lookup processing. If the table lookup hits, the traffic in the corresponding flow table is recorded;

[0006] If the flow rate is less than a preset first instantaneous flow migration threshold, the flow table is included in a first list to be migrated;

[0007] The first list to be migrated is polled at a specified interval. If the time the flow table has been in the first list to be migrated is greater than the specified time and the current traffic of the flow table is less than the first instantaneous traffic migration threshold, the flow table is migrated to the software forwarding subsystem.

[0008] Furthermore, the method further comprises:

[0009] If the number of flow tables in the hardware forwarding subsystem is greater than a preset flow table number threshold, a flow table with the smallest flow in the hardware forwarding subsystem is selected and put into a second list to be migrated;

[0010] The current number of flow tables in the hardware forwarding subsystem is checked by polling at a specified interval. If the current number of flow tables is greater than the flow table number threshold, a flow table with the smallest traffic in the second list to be migrated is migrated to the software forwarding subsystem.

[0011] Furthermore, the method further comprises:

[0012] The software forwarding subsystem receives the message data and performs table lookup processing. If the table lookup is hit, the flow of the corresponding flow table is recorded;

[0013] If the flow rate is less than the preset second instantaneous flow rate migration threshold value, the flow table is included in the third list to be migrated;

[0014] The third list to be migrated is polled at a specified interval. If the time the flow table has been in the third list to be migrated is greater than the specified time and the current traffic of the flow table is less than the second instantaneous traffic migration threshold, the flow table is migrated to the hardware forwarding subsystem.

[0015] Furthermore, the method further comprises:

[0016] If the sum of all flows in the software forwarding subsystem is greater than the preset total flow migration threshold, a flow table with the largest flow in the software forwarding subsystem is selected and put into the fourth list to be migrated;

[0017] The sum of all current traffic in the software forwarding subsystem is polled at a specified interval. If the sum of all current traffic is greater than the total traffic migration threshold, the flow table with the largest traffic in the fourth list to be migrated is migrated to the hardware forwarding subsystem.

[0018] Furthermore, the method further comprises:

[0019] If it is found in the hardware forwarding subsystem that a flow table exists for a time longer than the set hardware flow table aging time, the flow table is migrated to the software forwarding subsystem and marked as a hardware aging flow table.

[0020] Furthermore, the method further comprises:

[0021] In the software forwarding subsystem, polling is performed to check whether the existence time of the hardware aging flow table is greater than the preset software flow table aging time. If it is greater than the software flow table aging time, the hardware aging flow table is deleted from the software forwarding subsystem.

[0022] Furthermore, the method further comprises:

[0023] The hardware forwarding subsystem receives the message data and performs table lookup processing, and if the table lookup does not hit the target, forwards the message data to the software forwarding subsystem;

[0024] The software forwarding subsystem receives the message data and performs table lookup processing, and if the table lookup does not hit the target, forwards the message data to the controller subsystem;

[0025] The controller subsystem receives the message data, performs protocol analysis, generates a corresponding flow table, and synchronizes the flow table to the hardware forwarding subsystem.

[0026] In a second aspect, the present invention provides a dual-threshold flow table migration system based on a software-hardware collaborative device, comprising: a hardware forwarding subsystem, a software forwarding subsystem and a controller subsystem;

[0027] The hardware forwarding subsystem is used to receive message data and perform table lookup processing. If the table lookup hits, the flow of the corresponding flow table is recorded. If the flow is less than a preset first instantaneous flow migration threshold value, the flow table is included in a first list to be migrated, and the first list to be migrated is checked by polling at a specified interval. If the time the flow table is in the first list to be migrated is greater than the specified time, and the current flow of the flow table is less than the first instantaneous flow migration threshold value, the flow table is migrated to the software forwarding subsystem; if the table lookup does not hit, the message data is forwarded to the software forwarding subsystem;

[0028] The hardware forwarding subsystem is further used to monitor the number of flow tables of the hardware forwarding subsystem. If the number of flow tables is greater than a preset flow table number threshold, a flow table with the smallest flow rate in the hardware forwarding subsystem is selected and put into a second list to be migrated. The current number of flow tables in the system is checked by polling at a specified interval. If the current number of flow tables is greater than the flow table number threshold, a flow table with the smallest flow rate in the second list to be migrated is migrated to the software forwarding subsystem.

[0029] The software forwarding subsystem is used to receive message data and perform table lookup processing. If the table lookup hits, the flow of the corresponding flow table is recorded. If the flow is less than a preset second instantaneous flow migration threshold value, the flow table is included in a third list to be migrated, and the third list to be migrated is checked at a specified interval. If the time the flow table is in the third list to be migrated is greater than the specified time, and the current flow of the flow table is less than the second instantaneous flow migration threshold value, the flow table is migrated to the hardware forwarding subsystem; if the table lookup does not hit, the message data is forwarded to the controller subsystem;

[0030] The software forwarding subsystem is further used to monitor the sum of all flows in the software forwarding subsystem. If the sum is greater than a preset total flow migration threshold, a flow table with the largest flow in the system is selected and put into a fourth list to be migrated. The sum of all current flows in the system is checked at a specified interval. If the sum of all current flows is greater than the total flow migration threshold, the flow table with the largest flow in the fourth list to be migrated is migrated to the hardware forwarding subsystem.

[0031] The controller subsystem is used to perform protocol analysis on the received message data, generate a corresponding flow table, and synchronize the flow table to the hardware forwarding subsystem.

[0032] Furthermore, the hardware forwarding subsystem is further used to monitor that if the existence time of a certain flow table is greater than the set hardware flow table aging time, the flow table is migrated to the software forwarding subsystem and marked as a hardware aging flow table;

[0033] The software forwarding subsystem is also used to poll and check whether the existence time of the hardware aging flow table is greater than the preset software flow table aging time. If it is greater than the software flow table aging time, the hardware aging flow table is deleted from the software forwarding subsystem.

[0034] Further, the controller subsystem includes a controller internal interface component, a protocol processing component and a flow table configuration component; the controller internal interface component is used to realize communication with the software forwarding subsystem and the hardware forwarding subsystem, and transmit messages and flow tables; the protocol processing component is used to perform protocol analysis on message data and generate corresponding flow tables; the flow table configuration component is used to synchronize the flow table generated by the protocol analysis to the hardware forwarding subsystem through the controller internal interface component;

[0035] The software forwarding subsystem includes a software internal interface component, a flow table scheduling component, a software traffic monitoring component, a software flow table component and a software forwarding component; the software internal interface component is used to realize communication with the controller subsystem and the hardware forwarding subsystem, and transmit messages and flow tables; the flow table scheduling component is used to realize migration scheduling of flow tables between the software forwarding subsystem and the hardware forwarding subsystem; the software traffic monitoring component is used to record and count the traffic size of data flows forwarded and processed in the software forwarding subsystem; the software flow table component is used to realize flow table configuration management of data flows in the software forwarding subsystem; the software forwarding component completes the matching and forwarding function of message data, and forwards it to the controller subsystem or the hardware forwarding subsystem according to the matching result;

[0036] The hardware forwarding subsystem includes a hardware internal interface component, a hardware forwarding component, a hardware flow table component, a hardware traffic monitoring component and a high-speed interface component; the hardware internal interface component is used to realize communication with the controller subsystem and the software forwarding subsystem, and to transmit messages and flow tables; the hardware forwarding component is used to complete the matching and forwarding function of message data, and forward it to the software forwarding subsystem according to the matching results; the hardware flow table component is used to realize the flow table configuration management of the data flow in the hardware forwarding subsystem; the hardware traffic monitoring component is used to count the traffic size of the data flow forwarded and processed in the hardware forwarding subsystem; the high-speed interface component is used to realize the high-speed access function of the system and the network environment.

[0037] Furthermore, the controller subsystem runs in a LIUNX distribution environment; the software forwarding subsystem runs in a DPDK system; the hardware forwarding subsystem is built based on FPGA and an ASIC chip that supports SDN; the controller subsystem, the software forwarding subsystem and the hardware forwarding subsystem are interconnected using Ethernet.

[0038] Beneficial effects of the present invention:

[0039] (1) The present invention proposes a dual-threshold flow table migration method, which uses the instantaneous flow rate of the flow table and the number of flow tables to determine whether the flow table needs to be migrated, and proposes a dual-threshold judgment strategy to migrate the flow table, thereby realizing the function of migrating the flow table between software and hardware. The present invention combines the advantages of fast hardware processing speed and large software flow table capacity, while using a dual-threshold judgment mechanism to avoid invalid and frequent flow table migration operations, and provide high-speed and stable data forwarding capabilities.

[0040] (2) The present invention also proposes a two-level flow table aging method, which avoids the flow table being stored in the hardware and hardware systems for a long time and occupying the flow table storage space by setting the hardware and software flow table aging time respectively, thereby ensuring the stable processing performance of the flow table.

[0041] (3) The present invention also proposes a dual-threshold flow table migration system based on software and hardware collaborative equipment. By designing functional modules in each subsystem, a dual-threshold flow table migration method and a two-level flow table aging method can be implemented on the system. This system can provide high-speed and stable data forwarding capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 One of the flow charts of a dual-threshold current table migration method based on a software-hardware collaborative device provided by an embodiment of the present invention;

[0043] Figure 2 A second flow chart of a dual-threshold current table migration method based on a software-hardware collaborative device provided in an embodiment of the present invention;

[0044] Figure 3 A third flow chart of a dual-threshold current table migration method based on a software and hardware collaborative device provided in an embodiment of the present invention;

[0045] Figure 4 A fourth flowchart of a dual-threshold current table migration method based on a software-hardware collaborative device provided by an embodiment of the present invention;

[0046] Figure 5 A schematic structural diagram of a dual-threshold current table migration system based on software and hardware collaborative devices provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] The embodiment of the present invention provides a dual-gate current table migration method based on a software and hardware collaborative device, comprising:

[0049] (I) Method for migrating flow tables from hardware to software under dual threshold judgment

[0050] Due to the limited capacity of the hardware flow table, in order to avoid overflow of the flow table, when one of the following situations occurs, the flow table will be migrated from hardware to software. In order to avoid repeated migration of the flow table due to traffic fluctuations, a double threshold judgment strategy is adopted:

[0051] (1) Figure 1 As shown in the figure, when the instantaneous flow rate is lower than the hardware flow double threshold, the flow table needs to be migrated, including:

[0052] Step S101: The hardware forwarding subsystem receives the message data and performs table lookup processing. If the table lookup is a hit, the flow of the corresponding flow table is recorded;

[0053] Specifically, when the hardware forwarding subsystem receives the message data, a matching search is performed. If there is a flow table corresponding to the message data in the hardware forwarding subsystem, the traffic of the corresponding flow table is recorded.

[0054] Step S102: if the flow rate is less than the preset first instantaneous flow rate migration threshold, the flow table is included in the first list to be migrated;

[0055] Specifically, if the flow rate is less than the preset first instantaneous flow rate migration threshold value S h, then the flow table is determined to be placed in the first list to be migrated L hs middle.

[0056] Step S103: polling and checking the first list to be migrated at a specified interval, if the time the flow table has been in the first list to be migrated is greater than the specified time, and the current flow of the flow table is less than the first instantaneous flow migration threshold, then migrating the flow table to the software forwarding subsystem;

[0057] Specifically, the hardware forwarding subsystem sends a hs (t hs It can be customized by the user. In the embodiment of the present invention, the default setting is 1s) to poll the first list L to be migrated hs Once, when the flow table is in the first list to be migrated L hs The time exceeds the specified time t hs , and the current flow of the flow table is less than the first instantaneous flow migration threshold S h , then migrate the flow table to the software forwarding subsystem. First, copy the flow table to the software forwarding subsystem, and delete the flow table from the hardware forwarding subsystem. After that, the data of the flow table will be looked up in the software forwarding subsystem.

[0058] (2) Figure 2 As shown in FIG. 1 , when the number of hardware flow tables is greater than the double threshold of the number of hardware flow tables, the flow tables need to be migrated, including:

[0059] Step S201: If the number of flow tables in the hardware forwarding subsystem is greater than a preset flow table number threshold, a flow table with the smallest traffic in the hardware forwarding subsystem is selected and put into a second list to be migrated;

[0060] Specifically, when it is found that the number of flow tables of the hardware forwarding subsystem is greater than the set flow table number threshold N h When , a flow table with the smallest flow is selected in the hardware forwarding subsystem, and the flow table is placed in the second list to be migrated L hn middle.

[0061] Step S202: polling and checking the current number of flow tables in the hardware forwarding subsystem at a predetermined interval, if the current number of flow tables is greater than the flow table number threshold, migrating a flow table with the smallest flow in the second list to be migrated to the software forwarding subsystem;

[0062] Specifically, the hardware forwarding subsystem sends a hn (t hn It can be customized by the user. The default setting in the embodiment of the present invention is 1s) to poll and check the current number of flow tables in the hardware forwarding subsystem. If the number of flow tables is greater than the flow quantity threshold value N h , the second list to be migrated Lhn The flow table with the smallest traffic volume is migrated to the software forwarding subsystem. First, the flow table is copied to the software forwarding subsystem and deleted from the hardware forwarding subsystem. After that, the data of the flow table will be looked up in the software forwarding subsystem.

[0063] (II) Method for Migrating Flow Table from Software to Hardware under Double Threshold Judgment

[0064] In order to improve the processing performance of the system, it is necessary to transfer the data flow table of the data with large traffic to the hardware forwarding subsystem through flow table migration. When one of the following situations occurs, the traffic will be migrated from software to hardware. In order to avoid repeated migration of flow tables due to traffic fluctuations, a double threshold judgment strategy is adopted:

[0065] (1) Figure 3 As shown in the figure, when the instantaneous flow rate is lower than the hardware flow double threshold, the flow table needs to be migrated, including:

[0066] Step S301: The software forwarding subsystem receives the message data and performs table lookup processing. If the table lookup is a hit, the flow of the corresponding flow table is recorded;

[0067] Specifically, when the software forwarding subsystem receives the message data, a matching search is performed. If there is a flow table corresponding to the message data in the software forwarding subsystem, the traffic of the corresponding flow table is recorded.

[0068] Step S302: if the flow rate is less than the preset second instantaneous flow rate migration threshold, the flow table is included in the third list to be migrated;

[0069] Specifically, if the flow rate is less than the preset second instantaneous flow rate migration threshold value S s , then the flow table is determined to be placed in the third list to be migrated L ss middle.

[0070] Step S303: polling and checking the third list to be migrated at a specified interval, if the time the flow table is in the third list to be migrated is greater than the specified time, and the current flow of the flow table is less than the second instantaneous flow migration threshold, then migrating the flow table to the hardware forwarding subsystem;

[0071] Specifically, the software forwarding subsystem sends a ss (t ss It can be customized by the user. In the embodiment of the present invention, the default setting is 1s) to poll and check the third list L to be migrated. ss Once, when the flow table is in the third list to be migrated L ss The time exceeds the specified time t ss , and the current flow of the flow table is less than the second instantaneous flow migration threshold S s, then migrate the flow table to the hardware forwarding subsystem. First, copy the flow table to the hardware forwarding subsystem, and delete the flow table from the software forwarding subsystem. After that, the data of the flow table will be looked up in the hardware forwarding subsystem.

[0072] (2) Figure 4 As shown in the figure, when the software processing traffic exceeds the double migration threshold of the software total traffic, the flow table needs to be migrated, including:

[0073] Step S401: If the sum of all traffic in the software forwarding subsystem is greater than the preset total traffic migration threshold, a flow table with the largest traffic in the software forwarding subsystem is selected and put into the fourth list to be migrated;

[0074] Specifically, when it is found that the sum of all traffic monitored in the software forwarding subsystem is greater than the preset total traffic migration threshold F s When , a flow table with the largest traffic in the software forwarding subsystem is selected and put into the fourth list to be migrated L sn middle.

[0075] Step S402: polling the sum of all current traffic in the software forwarding subsystem at a specified interval. If the sum of all current traffic is greater than the total traffic migration threshold, migrate the flow table with the largest traffic in the fourth list to be migrated to the hardware forwarding subsystem.

[0076] Specifically, the software forwarding subsystem sends a sn (t sn It can be customized by the user. The default setting in the embodiment of the present invention is 1s) to poll and check the sum of all current flows in the software forwarding subsystem. If the sum of all current flows is greater than the total flow migration threshold F s When the fourth list to be migrated L sn The flow table with the largest traffic volume is migrated to the hardware forwarding subsystem. First, the flow table is copied to the hardware forwarding subsystem and deleted from the software forwarding subsystem. After that, the data of the flow table will be looked up in the hardware forwarding subsystem.

[0077] The dual-threshold flow table migration method provided in the embodiment of the present invention combines the advantages of fast hardware processing speed and large software flow table capacity, while utilizing a dual-threshold decision mechanism to avoid invalid and frequent flow table migration operations, thereby providing high-speed and stable data forwarding capabilities.

[0078] (III) Two-stage flow meter aging method

[0079] On the basis of the above embodiment, in order to ensure the utilization rate of the flow table storage space, a two-level flow table aging method is adopted, and the hardware flow table aging time Th and the software flow table aging time Ts are set respectively to ensure the stable processing of the flow table:

[0080] (1) Hardware flow table aging method:

[0081] Step S501: if a flow table is found in the hardware forwarding subsystem to have an existence time greater than the set hardware flow table aging time, the flow table is migrated to the software forwarding subsystem and marked as a hardware aging flow table;

[0082] Specifically, when it is found in the hardware forwarding subsystem that a flow table exists for a time greater than the set hardware flow table aging time Th, the flow table is migrated to the software forwarding subsystem and marked as a hardware aging flow table. First, the flow table is copied to the software forwarding subsystem, and the corresponding flow table in the hardware flow table component is deleted, completing the first-level aging process of the flow table.

[0083] (2) Software flow table aging method:

[0084] Step S502: polling in the software forwarding subsystem to check whether the existence time of the hardware aging flow table is greater than the preset software flow table aging time. If it is greater than the software flow table aging time, deleting the hardware aging flow table from the software forwarding subsystem;

[0085] Specifically, the software forwarding subsystem is polled to check whether the existence time of the hardware aging flow table is greater than the preset software flow table aging time Ts. If it is greater than Ts, the corresponding flow table in the software flow table component is deleted, completing the secondary aging processing of the flow table.

[0086] The two-level flow table aging method provided by the embodiment of the present invention ensures stable processing of the flow table by setting the software flow table aging time and the hardware flow table aging time to delete the aging flow tables in the corresponding hardware forwarding subsystem and the software forwarding subsystem.

[0087] like Figure 5 As shown, an embodiment of the present invention further provides a dual-threshold flow table migration system based on software and hardware collaborative devices, including: a hardware forwarding subsystem, a software forwarding subsystem and a controller subsystem.

[0088] The hardware forwarding subsystem is used to receive the message data and perform table lookup processing. If the table lookup hits, the flow of the corresponding flow table is recorded. If the flow is less than the preset first instantaneous flow migration threshold value, the flow table is included in the first list to be migrated, and the first list to be migrated is checked at a specified interval. If the time the flow table is in the first list to be migrated is greater than the specified time, and the current flow of the flow table is less than the first instantaneous flow migration threshold value, the flow table is migrated to the software forwarding subsystem; if the table lookup does not hit, the message data is forwarded to the software forwarding subsystem;

[0089] It is also used to monitor the number of flow tables in the hardware forwarding subsystem. If it is greater than the preset flow table number threshold, the flow table with the smallest traffic in the hardware forwarding subsystem is selected and put into the second list to be migrated. The current number of flow tables in the system is polled at a specified interval. If the current number of flow tables is greater than the flow table number threshold, the flow table with the smallest traffic in the second list to be migrated is migrated to the software forwarding subsystem.

[0090] Specifically, the hardware forwarding subsystem includes a hardware internal interface component, a hardware forwarding component, a hardware flow table component, a hardware traffic monitoring component and a high-speed interface component; the hardware internal interface component is used to realize communication with the controller subsystem and the software forwarding subsystem, and to transmit messages and flow tables; the hardware forwarding component is used to complete the matching and forwarding function of message data, and forward it to the software forwarding subsystem according to the matching results; the hardware flow table component is used to realize the flow table configuration management of the data flow in the hardware forwarding subsystem; the hardware traffic monitoring component is used to count the traffic size of the data flow forwarded and processed in the hardware forwarding subsystem; the high-speed interface component is used to realize the high-speed access function between the system and the network environment.

[0091] It can be understood that the hardware forwarding subsystem can realize the function of migrating the flow table from the hardware forwarding subsystem to the software forwarding subsystem:

[0092] The hardware forwarding subsystem receives the message data and performs a matching search. If there is a flow table corresponding to the message data in the hardware forwarding subsystem, the hardware traffic monitoring component records the traffic of the corresponding flow table. If the traffic is less than the preset first instantaneous traffic migration threshold value S h , then the flow table is determined to be placed in the first list to be migrated L hs In the system, every specified time t hs (t hs It can be customized by the user. In the embodiment of the present invention, the default setting is 1s) to poll the first list L to be migrated hs Once, when the flow table is in the first list to be migrated L hs The time exceeds the specified time t hs , and the instantaneous flow in the hardware flow monitoring component corresponding to the flow table is still less than the first instantaneous flow migration threshold value S h , then migrate the flow table to the software forwarding subsystem. First, the flow table in the hardware flow table component is copied to the software flow table component through the flow table scheduling component of the software forwarding subsystem. Then, the flow table is deleted from the hardware flow table component. After that, the data of the flow table will be looked up in the software forwarding subsystem.

[0093] When it is found that the number of flow tables in the hardware flow table component of the hardware forwarding subsystem is greater than the set flow table number threshold N hWhen the hardware traffic monitoring component of the hardware forwarding subsystem selects a flow table information with the smallest traffic, and puts the flow table into the second list to be migrated L hn In the system, every specified time t hn (t hn It can be customized by the user. The default setting in the embodiment of the present invention is 1s) to poll and check the current number of flow tables in the hardware flow table component of the hardware forwarding subsystem. If the number of flow tables is greater than the flow quantity threshold value N h , the second list to be migrated L hn The flow table with the smallest flow in the hardware flow table component is migrated to the software forwarding subsystem. First, the flow table in the hardware flow table component is copied to the software flow table component through the flow table scheduling component of the software forwarding subsystem. Then, the flow table is deleted from the hardware flow table component. After that, the data of the flow table will be looked up in the software forwarding subsystem.

[0094] The software forwarding subsystem is used to receive the message data and perform table lookup processing. If the table lookup hits, the flow of the corresponding flow table is recorded. If the flow is less than the preset second instantaneous flow migration threshold value, the flow table is included in the third list to be migrated, and the third list to be migrated is checked at a specified interval. If the time the flow table is in the third list to be migrated is greater than the specified time, and the current flow of the flow table is less than the second instantaneous flow migration threshold value, the flow table is migrated to the hardware forwarding subsystem; if the table lookup does not hit, the message data is forwarded to the controller subsystem;

[0095] It is also used to monitor the sum of all traffic in the software forwarding subsystem. If it is greater than the preset total traffic migration threshold, the flow table with the largest traffic in the system is selected and put into the fourth list to be migrated. The sum of all current traffic in the system is polled at specified intervals. If the sum of all current traffic is greater than the total traffic migration threshold, the flow table with the largest traffic in the fourth list to be migrated is migrated to the hardware forwarding subsystem.

[0096] Specifically, the software forwarding subsystem includes a software internal interface component, a flow table scheduling component, a software traffic monitoring component, a software flow table component and a software forwarding component; the software internal interface component is used to realize communication with the controller subsystem and the hardware forwarding subsystem, and to transmit messages and flow tables; the flow table scheduling component is used to realize migration scheduling of flow tables between the software forwarding subsystem and the hardware forwarding subsystem; the software traffic monitoring component is used to record and count the traffic size of data flows forwarded and processed in the software forwarding subsystem; the software flow table component is used to realize flow table configuration management of data flows in the software forwarding subsystem; the software forwarding component completes the matching and forwarding function of message data, and forwards it to the controller subsystem or the hardware forwarding subsystem according to the matching results.

[0097] It can be understood that the software forwarding subsystem can realize the function of migrating the flow table from the software forwarding subsystem to the hardware forwarding subsystem:

[0098] The software forwarding subsystem receives the message data and performs a matching search. If there is a flow table corresponding to the message data in the software forwarding subsystem, the software flow monitoring component records the flow of the corresponding flow table. If the flow is less than the preset second instantaneous flow migration threshold value S s , then the flow table is determined to be placed in the third list to be migrated L ss In the system, every specified time t ss (t ss It can be customized by the user. In the embodiment of the present invention, the default setting is 1s) to poll and check the third list L to be migrated. ss Once, when the flow table is in the third list to be migrated L ss The time exceeds the specified time t ss , and the instantaneous flow in the software flow monitoring component corresponding to the flow table is still less than the second instantaneous flow migration threshold value S s , then migrate the flow table to the hardware forwarding subsystem. First, the flow table in the software flow table component is copied to the hardware flow table component through the flow table scheduling component of the software forwarding subsystem. Then, the flow table is deleted from the software flow table component. After that, the data of the flow table will be looked up in the hardware forwarding subsystem.

[0099] When it is found that the sum of all traffic monitored by the software traffic monitoring component of the software forwarding subsystem is greater than the preset total traffic migration threshold value F s When the flow table with the largest flow in the software flow monitoring component is selected, it is put into the fourth list to be migrated L sn In the system, every specified time t sn (t sn It can be customized by the user. The default setting in the embodiment of the present invention is 1s) to poll and check the sum of all current flows in the software flow monitoring component. If the sum of all current flows is greater than the total flow migration threshold F s When the fourth list to be migrated L sn The flow table with the largest traffic volume is migrated to the hardware forwarding subsystem. First, the flow table in the software flow table component is copied to the hardware flow table component through the flow table scheduling component of the software forwarding subsystem. Then, the flow table is deleted from the software flow table component, and then the data of the flow table will be looked up in the hardware forwarding subsystem.

[0100] The controller subsystem is used to perform protocol analysis on the received message data, generate the corresponding flow table, and synchronize the flow table to the hardware forwarding subsystem.

[0101] Specifically, the controller subsystem includes a controller internal interface component, a protocol processing component and a flow table configuration component; wherein the controller internal interface component is used to realize communication with the software forwarding subsystem and the hardware forwarding subsystem, and transmit messages and flow tables; the protocol processing component is used to perform protocol analysis on message data and generate corresponding flow tables; the flow table configuration component is used to synchronize the flow table generated by the protocol analysis to the hardware forwarding subsystem through the controller internal interface component;

[0102] It should be noted that the data processing operation flow of each of the above subsystems is as follows:

[0103] After the system is powered on, the message arrives at the high-speed interface component of the hardware forwarding subsystem. First, it determines whether the arrived message is a message delivered by the hardware internal interface component. If it is not a message delivered by the hardware internal interface component, it is directly sent to the hardware forwarding component for matching and searching. If the table is hit, the hardware traffic monitoring component records the traffic size of the flow table corresponding to the message. If it is a data message, it is forwarded to the specified output interface in the hardware forwarding subsystem according to the result of the table lookup, and the data message is sent out of the system. If it is a protocol message, it is directly sent to the controller subsystem through the internal interface interconnection; if the table is not hit, the hardware forwarding subsystem sends it to the software subsystem through the hardware internal interface component for processing; if it is a message delivered by the hardware internal interface component, the hardware forwarding subsystem can send the data message out of the system from the specified output interface according to the information such as the input and output interface number in the stack field defined by the chip.

[0104] After the software forwarding subsystem receives data from the software internal interface component, it performs flow table matching and forwarding in the software forwarding component. If the table lookup is a hit, the data packet is encapsulated into the chip-defined stack internal format according to the table lookup result, and the forwarding outbound interface and processing action are sent to the hardware forwarding subsystem through the internal interface component between subsystems, and the flow information of the flow is recorded in the software traffic monitoring component; if the table lookup is not a hit, the software forwarding subsystem sends it to the controller subsystem for processing through the software internal interface component.

[0105] After the controller subsystem receives the data from the internal interface component of the controller, it performs protocol analysis on the message data in the protocol processing component and generates the corresponding protocol response message and flow table information. The flow table configuration component dynamically synchronizes the generated flow table information to the hardware forwarding subsystem through the internal structure components between subsystems according to the status of the hardware flow table component. At the same time, the internal interface component is used to fill in the interface number information according to the chip stack field definition and send it to the hardware forwarding subsystem.

[0106] It should be noted that the data processing process is described to enable those skilled in the art to better understand the functions of the system of the present invention. Data processing and flow table migration functions can be performed simultaneously.

[0107] Furthermore, the hardware forwarding subsystem is also used to monitor that if the existence time of a certain flow table is greater than the set hardware flow table aging time, the flow table is migrated to the software forwarding subsystem and marked as a hardware aging flow table;

[0108] The software forwarding subsystem is also used to poll and check whether the existence time of the hardware aging flow table is greater than the preset software flow table aging time. If it is greater than the software flow table aging time, the hardware aging flow table is deleted from the software forwarding subsystem.

[0109] Furthermore, the controller subsystem runs in the LIUNX distribution environment; the software forwarding subsystem runs in the DPDK system; the hardware forwarding subsystem is built based on FPGA and SDN-supporting ASIC chips; the controller subsystem, software forwarding subsystem and hardware forwarding subsystem are interconnected using Ethernet.

[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A dual-gate current table migration method based on software and hardware collaborative equipment, characterized in that: include: The hardware forwarding subsystem receives the packet data and performs table lookup processing. If the table lookup hits, the traffic in the corresponding flow table is recorded; If the flow rate is less than a preset first instantaneous flow migration threshold, the flow table is included in a first list to be migrated; The first list to be migrated is polled at a specified interval. If the time the flow table has been in the first list to be migrated is greater than the specified time and the current traffic of the flow table is less than the first instantaneous traffic migration threshold, the flow table is migrated to the software forwarding subsystem.

2. The dual-threshold flow table migration method based on software and hardware collaborative equipment according to claim 1 is characterized in that: The method further comprises: If the number of flow tables in the hardware forwarding subsystem is greater than a preset flow table number threshold, a flow table with the smallest flow in the hardware forwarding subsystem is selected and put into a second list to be migrated; The current number of flow tables in the hardware forwarding subsystem is checked by polling at a specified interval. If the current number of flow tables is greater than the flow table number threshold, a flow table with the smallest traffic in the second list to be migrated is migrated to the software forwarding subsystem.

3. The dual-threshold flow table migration method based on software and hardware collaborative equipment according to claim 1 is characterized in that: The method further comprises: The software forwarding subsystem receives the message data and performs table lookup processing. If the table lookup is hit, the flow of the corresponding flow table is recorded; If the flow rate is less than the preset second instantaneous flow rate migration threshold value, the flow table is included in the third list to be migrated; The third list to be migrated is polled at a specified interval. If the time the flow table has been in the third list to be migrated is greater than the specified time and the current traffic of the flow table is less than the second instantaneous traffic migration threshold, the flow table is migrated to the hardware forwarding subsystem.

4. The dual-threshold flow table migration method based on software and hardware collaborative equipment according to claim 1 is characterized in that: The method further comprises: If the sum of all flows in the software forwarding subsystem is greater than the preset total flow migration threshold, a flow table with the largest flow in the software forwarding subsystem is selected and put into the fourth list to be migrated; The sum of all current traffic in the software forwarding subsystem is polled at a specified interval. If the sum of all current traffic is greater than the total traffic migration threshold, the flow table with the largest traffic in the fourth list to be migrated is migrated to the hardware forwarding subsystem.

5. The dual-threshold flow table migration method based on software and hardware collaborative equipment according to claim 1 is characterized in that: The method further comprises: If it is found in the hardware forwarding subsystem that a flow table exists for a time longer than the set hardware flow table aging time, the flow table is migrated to the software forwarding subsystem and marked as a hardware aging flow table.

6. The dual-threshold flow table migration method based on software and hardware collaborative equipment according to claim 5 is characterized in that: The method further comprises: In the software forwarding subsystem, polling is performed to check whether the existence time of the hardware aging flow table is greater than the preset software flow table aging time. If it is greater than the software flow table aging time, the hardware aging flow table is deleted from the software forwarding subsystem.

7. The dual-threshold current table migration method based on software and hardware collaborative equipment according to any one of claims 1 to 6, characterized in that: The method further comprises: The hardware forwarding subsystem receives the message data and performs table lookup processing, and if the table lookup does not hit the target, forwards the message data to the software forwarding subsystem; The software forwarding subsystem receives the message data and performs table lookup processing, and if the table lookup does not hit the target, forwards the message data to the controller subsystem; The controller subsystem receives the message data, performs protocol analysis, generates a corresponding flow table, and synchronizes the flow table to the hardware forwarding subsystem.

8. A dual-gate current table migration system based on software and hardware collaborative equipment, characterized in that: include: Hardware forwarding subsystem, software forwarding subsystem and controller subsystem; The hardware forwarding subsystem is used to receive message data and perform table lookup processing. If the table lookup hits, the flow of the corresponding flow table is recorded. If the flow is less than a preset first instantaneous flow migration threshold value, the flow table is included in a first list to be migrated, and the first list to be migrated is checked by polling at a specified interval. If the time the flow table is in the first list to be migrated is greater than the specified time, and the current flow of the flow table is less than the first instantaneous flow migration threshold value, the flow table is migrated to the software forwarding subsystem; if the table lookup does not hit, the message data is forwarded to the software forwarding subsystem; The hardware forwarding subsystem is further used to monitor the number of flow tables of the hardware forwarding subsystem. If the number of flow tables is greater than a preset flow table number threshold, a flow table with the smallest flow rate in the hardware forwarding subsystem is selected and put into a second list to be migrated. The current number of flow tables in the system is checked by polling at a specified interval. If the current number of flow tables is greater than the flow table number threshold, a flow table with the smallest flow rate in the second list to be migrated is migrated to the software forwarding subsystem. The software forwarding subsystem is used to receive message data and perform table lookup processing. If the table lookup hits, the flow of the corresponding flow table is recorded. If the flow is less than a preset second instantaneous flow migration threshold value, the flow table is included in a third list to be migrated, and the third list to be migrated is checked at a specified interval. If the time the flow table is in the third list to be migrated is greater than the specified time, and the current flow of the flow table is less than the second instantaneous flow migration threshold value, the flow table is migrated to the hardware forwarding subsystem; If the table lookup fails, the message data is forwarded to the controller subsystem; The software forwarding subsystem is further used to monitor the sum of all flows in the software forwarding subsystem. If the sum is greater than a preset total flow migration threshold, a flow table with the largest flow in the system is selected and put into a fourth list to be migrated. The sum of all current flows in the system is checked at a specified interval. If the sum of all current flows is greater than the total flow migration threshold, the flow table with the largest flow in the fourth list to be migrated is migrated to the hardware forwarding subsystem. The controller subsystem is used to perform protocol analysis on the received message data, generate a corresponding flow table, and synchronize the flow table to the hardware forwarding subsystem.

9. The dual-threshold flow table migration system based on software and hardware collaborative equipment according to claim 8 is characterized in that: The hardware forwarding subsystem is further used to monitor that if the existence time of a certain flow table is greater than the set hardware flow table aging time, the flow table is migrated to the software forwarding subsystem and marked as a hardware aging flow table; The software forwarding subsystem is also used to poll and check whether the existence time of the hardware aging flow table is greater than the preset software flow table aging time. If it is greater than the software flow table aging time, the hardware aging flow table is deleted from the software forwarding subsystem.

10. The dual-threshold flow table migration system based on software and hardware collaborative equipment according to claim 8, characterized in that: The hardware forwarding subsystem includes a hardware internal interface component, a hardware forwarding component, a hardware flow table component, a hardware traffic monitoring component and a high-speed interface component; the hardware internal interface component is used to realize communication with the controller subsystem and the software forwarding subsystem, and transmit messages and flow tables; the hardware forwarding component is used to complete the matching and forwarding function of message data, and forward it to the software forwarding subsystem according to the matching result; the hardware flow table component is used to realize the flow table configuration management of the data flow in the hardware forwarding subsystem; the hardware traffic monitoring component is used to count the traffic size of the data flow forwarded in the hardware forwarding subsystem; the high-speed interface component is used to realize the high-speed access function between the system and the network environment; The software forwarding subsystem includes a software internal interface component, a flow table scheduling component, a software traffic monitoring component, a software flow table component and a software forwarding component; the software internal interface component is used to realize communication with the controller subsystem and the hardware forwarding subsystem, and transmit messages and flow tables; the flow table scheduling component is used to realize migration scheduling of flow tables between the software forwarding subsystem and the hardware forwarding subsystem; the software traffic monitoring component is used to record and count the traffic size of data flows forwarded and processed in the software forwarding subsystem; the software flow table component is used to realize flow table configuration management of data flows in the software forwarding subsystem; the software forwarding component completes the matching and forwarding function of message data, and forwards it to the controller subsystem or the hardware forwarding subsystem according to the matching result; The controller subsystem includes a controller internal interface component, a protocol processing component and a flow table configuration component; the controller internal interface component is used to realize communication with the software forwarding subsystem and the hardware forwarding subsystem, and transmit messages and flow tables; the protocol processing component is used to perform protocol analysis on message data and generate corresponding flow tables; the flow table configuration component is used to synchronize the flow table generated by protocol analysis to the hardware forwarding subsystem through the controller internal interface component.

Citation Information

Patent Citations

  • SDN (software defined network)-based network processor microcode and flow table implementing device and method

    CN105553851A

  • Mechanism for increasing hierarchically-distributed SDN (Software Defined Network) control plane routing efficiency

    CN105847146A

  • Multi-controller dynamic deployment method of software defined spatial information network

    CN107276662A

  • Flow table entry storage method and device, switch and computer readable medium

    CN108924047A

  • Overload protection method and device of flow table

    CN109120531A