A dual-gate current limit table migration method and system based on software and hardware collaborative equipment
Through the design of a dual threshold decision mechanism and flow table aging time, the performance degradation problem caused by frequent flow table migration is solved, and stable and efficient data forwarding of software and hardware collaborative devices is achieved.
Patent Information
- Application Number
- CN202411557627.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-11-04
AI Technical Summary
The existing flow table migration method of software and hardware collaborative devices frequently migrates flow tables under traffic fluctuations, resulting in a decrease in the speed limit processing performance of software and hardware, and cannot achieve reasonable software and hardware collaborative processing.
A double threshold judgment mechanism is adopted to design a flow table migration strategy by monitoring the instantaneous flow and quantity of the flow table and combining the aging time of the hardware and software systems to avoid frequent flow table migration operations. The double threshold judgment strategy is used to achieve stable migration of flow tables between hardware and software.
It achieves efficient migration of flow tables between software and hardware systems, avoids ineffective migration, improves the stability and processing performance of data forwarding, and meets the needs of high-speed processing.
Smart Images

Figure CN119449705B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of high-speed network processing, and in particular to a dual-gate flow table migration method and system based on software and hardware collaborative equipment. Background Art
[0002] Traditional switching ASIC chips have 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 equipment, the complementary advantages of software and hardware processing can be achieved, meeting high-speed processing while expanding the flow table capacity. Although some existing single-threshold flow table migration methods can achieve flow table migration between software and hardware to a certain extent, frequent flow table migration under traffic fluctuations will lead to a decrease in the line-speed processing performance of software and hardware, 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. This method avoids frequent flow table migration by utilizing a dual-threshold judgment mechanism, thereby effectively leveraging the advantages of software and hardware collaboration.
[0004] The present invention provides a dual-gate current limiting table migration method based on a software and hardware collaborative device, comprising:
[0005] The hardware forwarding subsystem receives the packet data and performs a table lookup. If a match is found, the flow is recorded in the corresponding flow table.
[0006] If the flow rate is less than a preset first instantaneous flow rate migration threshold, the flow table is included in a first to-be-migrated list;
[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 traffic 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 regular intervals. 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 to-be-migrated list 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 hits, the flow of the corresponding flow table is recorded;
[0013] If the flow rate is less than a preset second instantaneous flow rate migration threshold, the flow table is included in a third to-be-migrated list;
[0014] The third list to be migrated is polled at specified intervals. 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 traffic in the software forwarding subsystem is greater than the preset total traffic migration threshold, select a flow table with the largest traffic in the software forwarding subsystem and put it into the fourth list to be migrated;
[0017] The sum of all current traffic in the software forwarding subsystem 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.
[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] 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. 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 result, 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 result, 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-gate flow table migration system based on a software and hardware collaborative device, comprising: a hardware forwarding subsystem, a software forwarding subsystem, and a controller subsystem;
[0027] The hardware forwarding subsystem is configured to receive message data and perform table lookup processing. If a table lookup result is hit, the flow rate of the corresponding flow table is recorded. If the flow rate is less than a preset first instantaneous flow migration threshold value, the flow table is included in a first to-be-migrated list. The first to-be-migrated list is checked cyclically at a prescribed interval. If the time the flow table has been in the first to-be-migrated list is greater than the prescribed time, and the current flow rate 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 a table lookup result is not hit, the message data is forwarded to the software forwarding subsystem.
[0028] The hardware forwarding subsystem is further configured to monitor the number of flow tables in the hardware forwarding subsystem, and if the number of flow tables in the hardware forwarding subsystem is greater than a preset flow table number threshold, select a flow table with the smallest traffic in the hardware forwarding subsystem and place it in a second list to be migrated, and poll the current number of flow tables in the system at a specified interval, and if the current number of flow tables is greater than the flow table number threshold, migrate the flow table with the smallest traffic in the second list to be migrated to the software forwarding subsystem;
[0029] The software forwarding subsystem is configured to receive message data and perform table lookup processing. If a table lookup result is hit, the flow rate of the corresponding flow table is recorded. If the flow rate is less than a preset second instantaneous flow migration threshold value, the flow table is included in a third list to be migrated. The third list to be migrated is checked repeatedly at a prescribed interval. If the time the flow table has been in the third list to be migrated is greater than the prescribed time and the current flow rate 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 a table lookup result is not hit, the message data is forwarded to the controller subsystem.
[0030] The software forwarding subsystem is further configured to monitor the sum of all traffic in the software forwarding subsystem. If the sum is greater than a preset total traffic migration threshold, the flow table with the largest traffic in the system is selected and placed in a fourth list to be migrated. The sum of all current traffic in the system is polled at a predetermined 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.
[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 configured to monitor that if a flow table exists for a time longer than a set hardware flow table aging time, migrate the flow table to the software forwarding subsystem and mark it as a hardware aging flow table;
[0033] The software forwarding subsystem is further 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] Furthermore, 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 implement 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 results;
[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 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.
[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 that uses the instantaneous flow rate and the number of flow tables to determine whether a flow table needs to be migrated. It also proposes a dual-threshold decision strategy for migrating flow tables, thus enabling flow table migration between hardware and software. While combining the advantages of fast hardware processing speed and large software flow table capacity, the present invention utilizes a dual-threshold decision mechanism to avoid ineffective and frequent flow table migration operations, providing high-speed and stable data forwarding capabilities.
[0040] (2) The present invention also proposes a two-level flow table aging method. By setting the hardware flow table aging time and the software flow table aging time respectively, the flow table is prevented from being stored in the hardware and software systems for a long time, which occupies the flow table storage space utilization, 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 within 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 and hardware collaborative device provided by an embodiment of the present invention;
[0043] Figure 2 A second flow chart of a dual-gating current table migration method based on a software and hardware collaborative device provided by an embodiment of the present invention;
[0044] Figure 3 A third flow chart of a dual-gating current table migration method based on a software and hardware collaborative device provided by an embodiment of the present invention;
[0045] Figure 4 A fourth flow chart of a method for migrating a dual-gating current limiting table based on a software and hardware collaborative device provided by an embodiment of the present invention;
[0046] Figure 5 A schematic structural diagram of a dual-gating current table migration system based on software and hardware collaborative devices provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0048] An embodiment of the present invention provides a dual-gate current limiting table migration method based on a software and hardware collaborative device, comprising:
[0049] (1) Method for migrating flow tables from hardware to software under dual threshold judgment
[0050] Due to the limited capacity of the hardware flow table, to prevent flow table overflow, the flow table will be migrated from hardware to software when one of the following situations occurs. To prevent repeated migration of the flow table due to traffic fluctuations, a dual threshold decision strategy is adopted:
[0051] (1) Figure 1 As shown in the figure, when the instantaneous traffic volume is lower than the hardware traffic double threshold, the flow table needs to be migrated, including:
[0052] Step S101: The hardware forwarding subsystem receives the message data and performs a table lookup. If the table lookup matches, the flow rate 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 a preset first instantaneous flow rate migration threshold, the flow table is included in a first list to be migrated;
[0055] Specifically, if the flow rate is less than the preset first instantaneous flow rate migration threshold 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 the first list of flows to be migrated at a predetermined interval. If the time the flow table has been in the first list of flows to be migrated is greater than the predetermined time and the current flow rate of the flow table is less than the first instantaneous flow rate migration threshold, the flow table is migrated 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 to be migrated L 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 the figure, when the number of hardware flow tables exceeds the double threshold of the number of hardware flow tables, 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 volume in the hardware forwarding subsystem is selected and placed in 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 the hardware forwarding subsystem selects a flow table with the smallest flow, the flow table is placed in the second list to be migrated L hn middle.
[0061] Step S202: polling the hardware forwarding subsystem for the current number of flow tables at a predetermined interval. If the current number of flow tables is greater than a flow table number threshold, migrating the flow table with the smallest traffic in the second to-be-migrated list 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 number 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 is looked up in the software forwarding subsystem.
[0063] (2) Method of migrating flow tables from software to hardware under dual threshold judgment
[0064] To improve system processing performance, it is necessary to transfer the flow tables of high-volume data flows to the hardware forwarding subsystem through flow table migration. Traffic migration from software to hardware occurs when one of the following situations occurs. To avoid repeated flow table migration caused by traffic fluctuations, a dual threshold decision strategy is adopted:
[0065] (1) Figure 3 As shown in the figure, when the instantaneous traffic volume is lower than the hardware traffic double threshold, the flow table needs to be migrated, including:
[0066] Step S301: The software forwarding subsystem receives the message data and performs a table lookup. If the table lookup matches, the flow rate 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 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 the third list of flows to be migrated at a predetermined interval. If the time the flow table has been in the third list of flows to be migrated is greater than the predetermined time and the current flow rate of the flow table is less than the second instantaneous flow rate migration threshold, the flow table is migrated 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 to be migrated L 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 total software 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 a preset total traffic migration threshold, a flow table with the largest traffic in the software forwarding subsystem is selected and placed in a 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 the flow table with the largest traffic in the software forwarding subsystem is selected, it is 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 specified intervals. 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 to-be-migrated list 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) polling to 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 judgment mechanism to avoid invalid and frequent flow table migration operations, thereby providing high-speed and stable data forwarding capabilities.
[0078] (3) Two-stage flow meter aging method
[0079] On the basis of the above embodiment, in order to ensure the utilization of flow table storage space, a two-level flow table aging method is adopted, setting the hardware flow table aging time Th and the software flow table aging time Ts respectively to ensure 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 existed for 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;
[0082] Specifically, if a flow table in the hardware forwarding subsystem is found to have existed for longer 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. The flow table is first 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 for 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 aged 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 a software and hardware collaborative device, comprising: a hardware forwarding subsystem, a software forwarding subsystem and a controller subsystem.
[0088] The hardware forwarding subsystem is used to receive message data and perform table lookup processing. If the table lookup hits, the flow rate of 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 to-be-migrated list. The first to-be-migrated list is checked at a specified interval. If the time the flow table has been in the first to-be-migrated list is greater than a specified time and the current flow rate of the flow table is less than the first instantaneous flow migration threshold, 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 the number is greater than the preset flow table number threshold, the flow table with the smallest traffic in the hardware forwarding subsystem is selected and placed in the second list to be migrated. The current number of flow tables in the system is checked 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 S h , then the flow table is determined to be placed in the first list to be migrated L hs In the system, every time interval 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 to be migrated L 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 S h , then migrate the flow table to the software forwarding subsystem. First, the flow table scheduling component of the software forwarding subsystem copies the flow table in the hardware flow table component to the software flow table component. 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 time interval t hn (t hn It can be customized by the user. The default setting in the embodiment of the present invention is 1s) polling to 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 number threshold value N h , the second list to be migrated L hn The flow table with the smallest traffic volume is migrated to the software forwarding subsystem. The software forwarding subsystem's flow table scheduling component first copies the flow table from the hardware flow table component to the software flow table component. Subsequently, the flow table is deleted from the hardware flow table component. The data in the flow table is then looked up in the software forwarding subsystem.
[0094] The software forwarding subsystem is used to receive message data and perform table lookup processing. If the table lookup hits, the flow rate of the corresponding flow table is recorded. If the flow rate is less than the preset second instantaneous flow 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 flow rate 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 placed in 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 the 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 S s , then the flow table is determined to be placed in the third list to be migrated L ss In the system, every time interval 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 to be migrated L 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 S s , then the flow table is migrated to the hardware forwarding subsystem. First, the flow table scheduling component of the software forwarding subsystem copies the flow table in the software flow table component to the hardware flow table component. 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 the sum of all traffic monitored by the software traffic monitoring component of the software forwarding subsystem is found to be greater than the preset total traffic migration threshold 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 time interval t sn (t sn It can be customized by the user. The default setting in the embodiment of the present invention is 1s) polling to 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 software forwarding subsystem's flow table scheduling component copies the flow table from the software flow table component to the hardware flow table component. Then, the flow table is deleted from the software flow table component. After that, the data of the flow table is 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 implement 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;
[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 message is delivered by the hardware internal interface component. If it is not delivered by the hardware internal interface component, it is directly sent to the hardware forwarding component for matching and searching. If the table hits, 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 designated 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 does 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 designated output interface according to the input and output interface number and other information 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 hits, 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 traffic information of the flow is recorded in the software traffic monitoring component; if the table lookup does not hit, the software forwarding subsystem sends it to the controller subsystem through the software internal interface component for processing.
[0105] After the controller subsystem receives the data from the controller's internal interface component, 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 based on 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 will be migrated to the software forwarding subsystem and marked as a hardware aging flow table;
[0108] The software forwarding subsystem is further 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-supported 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 various embodiments of the present invention.
Claims
1. A dual-gate current limiting table migration method based on software and hardware collaborative equipment, characterized in that: include: The hardware forwarding subsystem receives the packet data and performs a table lookup. If a match is found, the flow is recorded in the corresponding flow table. If the flow rate is less than a preset first instantaneous flow rate migration threshold, the flow table is included in a first to-be-migrated list; polling the first list to be migrated at a predetermined interval, and migrating the flow table to the software forwarding subsystem if the time the flow table has been in the first list to be migrated is greater than the predetermined time and the current flow rate of the flow table is less than the first instantaneous flow migration threshold; Also includes: The software forwarding subsystem receives the message data and performs table lookup processing. If the table lookup hits, the flow of the corresponding flow table is recorded; If the flow rate is less than a preset second instantaneous flow rate migration threshold, the flow table is included in a third to-be-migrated list; The third list to be migrated is polled at specified intervals. 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.
2. The dual-gate current limiting 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 traffic 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 regular intervals. 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 to-be-migrated list is migrated to the software forwarding subsystem.
3. The dual-gate current limiting 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 traffic in the software forwarding subsystem is greater than the preset total traffic migration threshold, select a flow table with the largest traffic in the software forwarding subsystem and put it into the fourth list to be migrated; The sum of all current traffic in the software forwarding subsystem 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.
4. The dual-gate current limiting 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.
5. The dual-gating current table migration method based on software and hardware collaborative equipment according to claim 4 is characterized in that: The method further comprises: 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. If it is greater than the software flow table aging time, the hardware aging flow table is deleted from the software forwarding subsystem.
6. The dual-threshold current table migration method based on software and hardware collaborative equipment according to any one of claims 1 to 5, 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 result, 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 result, 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.
7. A dual-gate current limit 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 configured to receive message data and perform table lookup processing. If a table lookup result is hit, the flow rate of the corresponding flow table is recorded. If the flow rate is less than a preset first instantaneous flow migration threshold value, the flow table is included in a first to-be-migrated list. The first to-be-migrated list is checked cyclically at a prescribed interval. If the time the flow table has been in the first to-be-migrated list is greater than the prescribed time, and the current flow rate 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 a table lookup result is not hit, the message data is forwarded to the software forwarding subsystem. The hardware forwarding subsystem is further configured to monitor the number of flow tables in the hardware forwarding subsystem, and if the number of flow tables in the hardware forwarding subsystem is greater than a preset flow table number threshold, select a flow table with the smallest traffic in the hardware forwarding subsystem and place it in a second list to be migrated, and poll the current number of flow tables in the system at a specified interval, and if the current number of flow tables is greater than the flow table number threshold, migrate the flow table with the smallest traffic in the second list to be migrated to the software forwarding subsystem; The software forwarding subsystem is configured to receive message data and perform table lookup processing. If a table lookup result is found, the flow rate of the corresponding flow table is recorded. If the flow rate is less than a preset second instantaneous flow migration threshold, the flow table is included in a third list to be migrated. The third list to be migrated is checked repeatedly at a prescribed interval. If the time the flow table has been in the third list to be migrated is greater than the prescribed time and the current flow rate of the flow table is less than the second instantaneous flow migration threshold, the flow table is migrated to the hardware forwarding subsystem. If the table does not match, the message data is forwarded to the controller subsystem; The software forwarding subsystem is further configured to monitor the sum of all traffic in the software forwarding subsystem. If the sum is greater than a preset total traffic migration threshold, the flow table with the largest traffic in the system is selected and placed in a fourth list to be migrated. The sum of all current traffic in the system is polled at a predetermined 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. 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.
8. The dual-gate flow table migration system based on software and hardware collaborative equipment according to claim 7 is characterized in that: The hardware forwarding subsystem is further configured to monitor that if a flow table exists for a time longer than a set hardware flow table aging time, migrate the flow table to the software forwarding subsystem and mark it as a hardware aging flow table; The software forwarding subsystem is further 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.
9. The dual-gate current limiting table migration system based on software and hardware collaborative equipment according to claim 7, 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 results; the hardware flow table component is used to realize the flow table configuration management of data flow in the hardware forwarding subsystem; the hardware traffic monitoring component is used to count the traffic volume of 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; 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 results; 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