Double exchange plane data processing apparatus, method and network exchange chip
By introducing shared cache units and data slice merging technology into dual-switching plane network switching chips, the problems of excessive cache resource requirements and insufficient scalability are solved, achieving more efficient data forwarding and reducing design costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU CENTEC COMM CO LTD
- Filing Date
- 2023-10-07
- Publication Date
- 2026-07-21
AI Technical Summary
In the existing technology, the design cost of dual-switching planar network switching chips is high due to the excessive demand for cache resources, and the existing solutions lack scalability in complex network service scenarios.
A shared cache unit is used to store data from the dual switching planes, and storage and transmission costs are reduced by merging data slices. The interface output unit can directly obtain the data to be forwarded from the shared cache unit for forwarding.
It improves data forwarding efficiency, saves cache resources, reduces the design cost of network switching chips, and has strong scalability.
Smart Images

Figure CN117319327B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically, to a dual-switching plane data processing apparatus, method, and network switching chip. Background Technology
[0002] In the dual-switching-plane architecture of converged networks, the network is divided into two independent switching planes, each handling a portion of network traffic independently. In existing technologies, considering factors such as data processing efficiency and network performance, the storage resource requirements for cached data are substantial, leading to high design costs for network switching chips. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a dual-switching-plane data processing apparatus, method and network switching chip, which uses a shared cache unit to store data of the dual-switching-plane, thereby effectively reducing the design cost of the network switching chip.
[0004] To achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows:
[0005] In a first aspect, the present invention provides a dual-switching-plane data processing device, comprising an interface module, a receiving and scheduling unit, two service processing units, a shared buffer unit, and an interface output unit; the receiving and scheduling unit is communicatively connected to the interface module and the two service processing units; the shared buffer unit is communicatively connected to the two service processing units and the interface output unit; the two service processing units correspond to different switching planes.
[0006] The receiving and scheduling unit is used to receive data segments sent by the interface module, merge at least one data segment of the same data packet, and send the merged data to the service processing unit corresponding to the switching plane to which the data segment belongs.
[0007] Each of the aforementioned service processing units is used to process the received merged data to obtain the data to be forwarded, save the data to be forwarded to the shared cache unit, and after all the data to be forwarded in the same data packet is saved to the shared cache unit, send the control information of the complete data packet to the interface output unit.
[0008] The interface output unit is used to read the data to be forwarded from the shared cache unit according to the control information and forward it.
[0009] In an optional implementation, the receiving scheduling unit includes a receiving splitting unit, a pre-buffering unit, and two switching plane scheduling units; each switching plane scheduling unit is provided with at least one scheduling queue; the two switching plane scheduling units correspond to different switching planes; the receiving splitting unit is communicatively connected to the interface module, the pre-buffering unit, and the scheduling queues; the switching plane scheduling unit is communicatively connected to the scheduling queues and the service processing unit.
[0010] The receiving splitting unit is used to assign a scheduling queue identifier corresponding to the switching plane to which the received data segment belongs to the data segment, save the data segment and the scheduling queue identifier to the pre-buffering unit, and notify the pre-buffering unit to merge at least one data segment in the same data packet; the data segments in the same data packet are assigned the same scheduling queue identifier.
[0011] The pre-caching unit is used to merge at least one data segment of the same data packet to obtain merged data, and send the management information corresponding to the merged data to the receiving and splitting unit; the management information includes the address of the pre-caching unit corresponding to the merged data, the length of the merged data, and the scheduling queue identifier;
[0012] The receiving and splitting unit is also used to save the management information into the corresponding scheduling queue according to the scheduling queue identifier in the received management information;
[0013] Each of the switching plane scheduling units is used to monitor its corresponding scheduling queue, obtain the management information from the corresponding scheduling queue, obtain the corresponding merged data from the pre-caching unit according to the management information, and send the merged data to the service processing unit corresponding to its switching plane.
[0014] In an optional implementation, the receiving splitting unit is used to allocate a first scheduling queue identifier to the data slice when the switching plane to which the received data slice belongs is a first switching plane, and save the data slice and the first scheduling queue identifier to the pre-buffering unit; the first switching plane corresponds to a first switching plane scheduling unit and a first service processing unit, and the first scheduling queue identifier is the identifier of the first scheduling queue set in the first switching plane scheduling unit;
[0015] The pre-buffer unit is used to merge at least one data segment of the same data packet in the first switching plane, and send the first management information corresponding to the first merged data to the receiving splitting unit; the first management information includes the address of the pre-buffer unit corresponding to the first merged data, the length of the first merged data, and the identifier of the first scheduling queue.
[0016] The receiving and splitting unit is further configured to save the first management information to the corresponding first scheduling queue according to the first scheduling queue identifier in the received first management information;
[0017] The first switching plane scheduling unit is used to monitor the first scheduling queue, obtain the first management information from the first scheduling queue, obtain the corresponding first merged data from the pre-caching unit according to the first management information, and send the first merged data to the first service processing unit.
[0018] In an optional implementation, the first service processing unit includes a plurality of first processing sub-units; the interface output unit is provided with a first control queue and a forwarding scheduling unit; each of the first processing sub-units is communicatively connected to the shared cache unit and the first control queue; the forwarding scheduling unit is communicatively connected to the first control queue and the shared cache unit.
[0019] The first processing subunit is used to process the received first merged data, save the obtained first data to be forwarded to the shared cache unit, and after the first data to be forwarded in the same data packet is saved to the shared cache unit, save the first control information corresponding to the first complete data packet to the first control queue of the designated interface output unit.
[0020] The forwarding scheduling unit is used to obtain the first control information from the first control queue, and read the corresponding first data to be forwarded from the shared cache unit according to the first control information for forwarding.
[0021] In an optional implementation, the receiving splitting unit is used to allocate a second scheduling queue identifier to the data slice when the switching plane to which the received data slice belongs is the second switching plane, and save the data slice and the second scheduling queue identifier to the pre-buffering unit; the second switching plane corresponds to the second switching plane scheduling unit and the second service processing unit, and the second scheduling queue identifier is the identifier of the second scheduling queue set in the second switching plane scheduling unit;
[0022] The pre-buffer unit is used to merge at least one data segment of the same data packet in the second switching plane, and send the second management information corresponding to the second merged data to the receiving splitting unit; the second management information includes the address of the pre-buffer unit corresponding to the second merged data, the length of the second merged data, and the second scheduling queue identifier;
[0023] The receiving and splitting unit is further configured to save the second management information to the corresponding second scheduling queue according to the second scheduling queue identifier in the received second management information;
[0024] The second switching plane scheduling unit is used to monitor the second scheduling queue, obtain the second management information from the second scheduling queue, obtain the corresponding second merged data from the pre-caching unit according to the second management information, and send the second merged data to the second service processing unit.
[0025] In an optional implementation, the second service processing unit includes multiple second processing sub-units; the interface output unit is provided with a second control queue and a forwarding scheduling unit; each second processing sub-unit is communicatively connected to the shared cache unit and the second control queue; the forwarding scheduling unit is communicatively connected to the second control queue and the shared cache unit.
[0026] The second processing subunit is used to process the received second merged data, save the obtained second data to be forwarded to the shared cache unit, and after the second data to be forwarded in the same data packet is saved to the shared cache unit, save the second control information corresponding to the second complete data packet to the second control queue of the designated interface output unit.
[0027] The forwarding scheduling unit is used to obtain the second control information from the second control queue, and read the corresponding second data to be forwarded from the shared cache unit according to the second control information for forwarding.
[0028] In an optional implementation, the shared cache unit is further configured to store the data to be forwarded sent by the service processing unit in a local cache, and send the data to be forwarded to the corresponding service processing unit at the cache address of the shared cache unit.
[0029] In an optional implementation, when the complete data packet includes multiple data to be forwarded, the control information includes the cache address of each data to be forwarded in the shared cache unit and the length of each data to be forwarded;
[0030] The shared cache unit is used to receive the query instruction sent by the interface output unit, read the corresponding data to be forwarded according to the cache address of each data to be forwarded in the shared cache unit and the length of each data to be forwarded in the control information carried by the query instruction, and send the read data to be forwarded to the interface output unit.
[0031] Secondly, the present invention provides a dual-switching-plane data processing method applied to a dual-switching-plane data processing device, the dual-switching-plane data processing device comprising an interface module, a receiving and scheduling unit, two service processing units, a shared buffer unit, and an interface output unit; the receiving and scheduling unit is communicatively connected to the interface module and the two service processing units; the shared buffer unit is communicatively connected to the two service processing units and the interface output unit; the two service processing units correspond to different switching planes.
[0032] The receiving and scheduling unit receives the data segments sent by the interface module, merges at least one data segment of the same data packet, and sends the merged data to the service processing unit corresponding to the switching plane to which the data segment belongs.
[0033] Each of the service processing units processes the received merged data to obtain the data to be forwarded, saves the data to be forwarded to the shared cache unit, and after all the data to be forwarded in the same data packet is saved to the shared cache unit, sends the control information of the complete data packet to the interface output unit.
[0034] The interface output unit reads the data to be forwarded from the shared cache unit according to the control information and forwards it.
[0035] Thirdly, the present invention provides a network switching chip, the network switching chip including a dual-switching plane data processing device as described in any of the foregoing embodiments.
[0036] Compared to existing technologies, the dual-switching-plane data processing apparatus, method, and network switching chip provided in this invention include an interface module, a receiving scheduling unit, two service processing units, a shared buffer unit, and an interface output unit. The receiving scheduling unit is communicatively connected to the interface module and the two service processing units. The shared buffer unit is communicatively connected to the two service processing units and the interface output unit. The two service processing units correspond to different switching planes. The receiving scheduling unit receives data segments sent by the interface module, merges at least one data segment of the same data packet, and sends the merged data to the service processing unit corresponding to the switching plane to which the data segment belongs. Each service processing unit processes the received merged data to obtain data to be forwarded, saves the data to be forwarded to the shared buffer unit, and after all the data to be forwarded for the same data packet is saved to the shared buffer unit, sends the control information of the complete data packet to the interface output unit. The interface output unit reads the data to be forwarded from the shared buffer unit according to the control information and forwards it. By merging data slices to reduce data storage and transmission costs, using a shared cache unit to store data from both switching planes, and supporting the interface output unit to directly obtain data to be forwarded from the shared cache unit for forwarding, data forwarding efficiency is improved and cache resources are saved, thereby reducing the design cost of network switching chips.
[0037] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0038] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 A schematic diagram of the structure of the dual-switching plane data processing device provided in an embodiment of the present invention is shown.
[0040] Figure 2 It shows Figure 1 A schematic diagram of the structure of a receiving and scheduling unit.
[0041] Figure 3 This diagram illustrates yet another structural schematic of the dual-switching plane data processing apparatus provided in an embodiment of the present invention.
[0042] Figure 4 A schematic flowchart of a dual-exchange plane data processing method provided by an embodiment of the present invention is shown.
[0043] Figure 5 It shows Figure 4 A flowchart illustrating the sub-steps of steps S10, S20, and S30.
[0044] Icons: 10 - Dual-plane data processing device; 100 - Interface module; 200 - Receive scheduling unit; 201 - Receive splitting unit; 202 - Pre-buffering unit; 203 - Switching plane scheduling unit; 204 - Scheduling queue; 205 - First switching plane scheduling unit; 206 - Second switching plane scheduling unit; 207 - First scheduling queue; 208 - Second scheduling queue; 300 - Service processing unit; 301 - First service processing unit; 302 - Second service processing unit; 303 - First processing subunit; 304 - Second processing subunit; 400 - Shared buffer unit; 500 - Interface output unit; 501 - Control queue; 502 - Forwarding scheduling unit; 503 - First control queue; 504 - Second control queue. Detailed Implementation
[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0046] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0047] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0048] Converged networks represent an application trend that implements multiple switching planes within a single network switching unit, typically including two switching planes. Different switching planes process the received network data packets according to their service type. These switching planes operate independently, meeting diverse network service processing requirements and offering a wide range of applications.
[0049] The inventors discovered that the patent "A Dual-Plane Switching Method Supporting Mixed Transmission of Multiple Frame Types" (Application No.: 202011603675.7, Publication No.: CN112751788A) discloses a dual-plane switching method that supports mixed transmission of multiple frame types. This method sets up high-priority and low-priority preprocessing buffers for each port. The data received by each port is divided into high-priority data and low-priority data according to the service type. High-priority data is processed by the high-priority preprocessing buffer corresponding to the port, and low-priority data is processed by the low-priority preprocessing buffer corresponding to the port. The processed high-priority and low-priority data are then sent to the high-priority switching plane and the low-priority switching plane, respectively.
[0050] The two switching planes operate in parallel, and the data on the two planes do not affect each other during the switching process. This switching mechanism is used in systems with high reliability to ensure that real-time high-priority traffic is not affected by other non-real-time low-priority traffic, thereby ensuring the stable transmission of high-priority traffic.
[0051] However, since each port has its own high and low priority preprocessing buffers to cache network data frames, the cache resources consumed increase with the number of ports, resulting in a waste of storage resources and a significant increase in the design cost of the network switching chip. Furthermore, this dual-plane solution only supports the forwarding of network data frames and cannot meet the needs of complex network service applications, such as supporting common network processing services like multicasting of network data frames, thus lacking application scalability.
[0052] Another patent, "A Dual-Plane Time-Triggered Ethernet Switch and Packet Switching Method" (Application No.: 201810509357.0, Publication No.: CN108712351B), discloses a dual-plane time-triggered Ethernet switch and packet switching method. This method classifies data according to frame type and sends time-triggered (TT) service frames to the time-triggered TT switching plane and event-triggered (ET) service frames to the event-triggered ET switching plane. The two switching planes process services independently, ensuring absolute priority forwarding of time-triggered TT services and reducing forwarding latency. This method can be applied to high-speed, low-latency time-triggered switching networks. However, in this technical solution, the time-triggered TT switching plane does not store service frames; it processes them quickly and forwards them. This limits its application scope and scalability to specific switching scenarios.
[0053] Based on this, embodiments of the present invention provide a dual-switching-plane data processing apparatus and method, which reduces data storage and transmission costs by merging data slices, uses a shared cache unit to store data of the dual-switching-plane, and supports the interface output unit to directly obtain the data to be forwarded from the shared cache unit for forwarding, thereby improving data forwarding efficiency and saving cache resources, and thus reducing the design cost of network switching chips.
[0054] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0055] Please refer to Figure 1 , Figure 1 A schematic diagram of the structure of a dual-switching-plane data processing device 10 provided in an embodiment of the present invention is shown. The device provides an implementation method for a dual-switching-plane data processing device. The dual-switching-plane data processing device 10 includes an interface module 100, a receive scheduling unit 200, two service processing units 300, a shared buffer unit 400, and an interface output unit 500. The receive scheduling unit 200 is communicatively connected to the interface module 100 and the two service processing units 300. The shared buffer unit 400 is communicatively connected to the two service processing units 300 and the interface output unit 500. The two service processing units 300 correspond to different switching planes.
[0056] The receiving and scheduling unit 200 is used to receive data segments sent by the interface module 100, merge at least one data segment of the same data packet, and send the merged data to the service processing unit 300 corresponding to the switching plane to which the data segment belongs.
[0057] Each service processing unit 300 is used to process the received merged data to obtain the data to be forwarded, and save the data to be forwarded to the shared buffer unit 400. After all the data to be forwarded in the same data packet is saved to the shared buffer unit 400, the control information of the complete data packet is sent to the interface output unit 500.
[0058] The interface output unit 500 is used to read the data to be forwarded from the shared buffer unit 400 according to the control information and forward it.
[0059] In this embodiment of the invention, the shared cache unit 400 is used to write data to be forwarded from two service processing units 300 into the cache unit, and to read the data to be forwarded from the cache unit according to the request of the interface output unit 500. By setting the shared cache unit 400, cache allocation can be flexibly performed according to the service scenario, realizing a shared cache unit for dual switching planes, eliminating the need to set up a separate cache unit for each switching plane, and maximizing the utilization of the data cache unit.
[0060] In summary, the dual-switching-plane data processing device provided in this embodiment of the invention includes an interface module, a receiving and scheduling unit, two service processing units, a shared buffer unit, and an interface output unit. The receiving and scheduling unit is communicatively connected to the interface module and the two service processing units. The shared buffer unit is communicatively connected to the two service processing units and the interface output unit. The two service processing units correspond to different switching planes. The receiving and scheduling unit receives data fragments sent by the interface module, merges at least one data fragment of the same data packet, and sends the merged data to the service processing unit corresponding to the switching plane to which the data fragment belongs. Each service processing unit processes the received merged data to obtain data to be forwarded, saves the data to be forwarded to the shared buffer unit, and after all the data to be forwarded for the same data packet is saved to the shared buffer unit, sends the control information of the complete data packet to the interface output unit. The interface output unit reads the data to be forwarded from the shared buffer unit according to the control information and forwards it. By merging data fragments, data storage and transmission costs are reduced. A shared buffer unit is used to store data from both switching planes, and the interface output unit can directly obtain the data to be forwarded from the shared buffer unit for forwarding, thereby improving data forwarding efficiency and saving buffer resources, and thus reducing the design cost of the network switching chip.
[0061] Optionally, in practical applications, the network switching chip uses a receive scheduling unit 200 to split and merge receive time slices, thereby reducing data storage and transmission costs and improving data processing and transmission efficiency. Please refer to... Figure 2 The receiving scheduling unit 200 includes a receiving splitting unit 201, a pre-buffering unit 202, and two switching plane scheduling units 203. Each switching plane scheduling unit 203 is equipped with at least one scheduling queue 204, and the two switching plane scheduling units 203 correspond to different switching planes. The receiving splitting unit 201 is communicatively connected to the interface module 100, the pre-buffering unit 202, and the scheduling queue 204. The switching plane scheduling unit 203 is communicatively connected to the scheduling queue 204 and the service processing unit 300.
[0062] Specifically, the receiving splitting unit 201 assigns a scheduling queue identifier corresponding to the switching plane to which the received data segment belongs, saves the data segment and the scheduling queue identifier to the pre-buffering unit 202, and notifies the pre-buffering unit 202 to merge at least one data segment in the same data packet. Data segments in the same data packet are assigned the same scheduling queue identifier.
[0063] The pre-buffer unit 202 is used to merge at least one data segment of the same data packet to obtain merged data, and send the management information corresponding to the merged data to the receiving and splitting unit 201. The management information includes the address of the pre-buffer unit corresponding to the merged data, the length of the merged data, and the scheduling queue identifier.
[0064] The receiving and splitting unit 201 is also used to save the management information into the corresponding scheduling queue 204 according to the scheduling queue identifier in the received management information.
[0065] Each switching plane scheduling unit 203 is used to monitor its corresponding scheduling queue 204, obtain management information from the corresponding scheduling queue 204, obtain the corresponding merged data from the pre-buffering unit 202 according to the management information, and send the merged data to the service processing unit 300 corresponding to its switching plane.
[0066] In this embodiment of the invention, the receiving splitting unit determines the switching plane to which the data slice belongs based on the received data slice and a preset rule. Assuming that the network switching chip divides the data type into service data and control data when it is powered on and initialized, the preset rule assigns the switching plane to which the service data and control data belong respectively.
[0067] As another implementation, assuming the network switching chip uses the Interlaken protocol to transmit data, Interlaken is a scalable, channel-based chip-to-chip interconnect protocol. The Interlaken protocol receives data from 256 logical channels. During power-on initialization, the network switching chip allocates the data received from the 256 logical channels to two switching planes. The default rule is to assign the logical channel corresponding to the Interlaken protocol to its respective switching plane. Therefore, this embodiment of the invention can flexibly adjust the services of the service processing unit according to the application scenario, exhibiting strong scalability.
[0068] In this embodiment of the invention, the receiving splitting unit 201 is further configured to count the length and time interval of all unmerged data segments of the same data packet written to the pre-caching unit 202. When the length or time interval of all unmerged data segments of the same data packet written to the pre-caching unit 202 meets a preset merging condition, the pre-caching unit 202 is notified to merge at least one data segment of the same data packet. The time interval can be the difference between the time when the last data segment of the data packet was written to the pre-caching unit 202 and the current time, or it can be the difference between the time when the latest data segment of the same data packet was written to the pre-caching unit 202 and the current time. The specific implementation method is not limited in this invention.
[0069] It should be noted that, please refer to Figure 3 The two switching plane scheduling units 203 are the first switching plane scheduling unit 205 and the second switching plane scheduling unit 206, respectively. The scheduling queue 204 includes the first scheduling queue 207 and the second scheduling queue 208. The first switching plane scheduling unit 205 accesses and operates the first scheduling queue 207, and the second switching plane scheduling unit 206 accesses and operates the second scheduling queue 208.
[0070] The two service processing units 300 are a first service processing unit 301 and a second service processing unit 302. The first service processing unit 301 receives merged data sent by the first switching plane scheduling unit 205, and the second service processing unit 302 receives merged data sent by the second switching plane scheduling unit 206. The interface output unit 500 includes a control queue 501, which comprises a first control queue 503 and a second control queue 504. The first control queue 503 stores control information sent by the first service processing unit 301, and the second control queue 504 stores control information sent by the second service processing unit 302. This ensures that the two interactive planes do not interfere with each other and independently process data belonging to their respective switching planes.
[0071] Optionally, in practical applications, please refer to Figure 3 The receiving and splitting unit 201 is used to allocate a first scheduling queue identifier to the data slice when the receiving data slice belongs to the first switching plane, and save the data slice and the first scheduling queue identifier to the pre-buffering unit 202. The first switching plane corresponds to the first switching plane scheduling unit 205 and the first service processing unit 301, and the first scheduling queue identifier is the identifier of the first scheduling queue 207 set in the first switching plane scheduling unit 205.
[0072] The pre-buffer unit 202 is used to merge at least one data segment of the same data packet in the first switching plane and send the first management information corresponding to the first merged data to the receiving and splitting unit 201. The first management information includes the address of the pre-buffer unit corresponding to the first merged data, the length of the first merged data, and the identifier of the first scheduling queue.
[0073] The receiving and splitting unit 201 is also used to save the first management information to the corresponding first scheduling queue 207 according to the first scheduling queue identifier in the received first management information.
[0074] The first switching plane scheduling unit 205 is used to monitor the first scheduling queue 207, obtain first management information from the first scheduling queue 207, obtain the corresponding first merged data from the pre-caching unit 202 according to the first management information, and send the first merged data to the first service processing unit 301.
[0075] In this embodiment of the invention, in order to improve the processing efficiency of data slices in the first switching plane, multiple first scheduling queues 207 can be set up for the first switching plane scheduling unit 205 to receive and store data slices belonging to the first switching plane in parallel, thereby improving data processing efficiency.
[0076] It should be noted that the first switching plane scheduling unit monitors the first scheduling queue 207 in real time. When the first scheduling queue 207 is not empty, it obtains the first control information from the first scheduling queue 207 for processing. When there are multiple first scheduling queues 207, the first control information in each first scheduling queue 207 can be obtained by polling, weighted polling, or sequentially traversing according to priority from high to low. This invention does not limit the scope of the invention.
[0077] Optionally, in practical applications, the efficiency of the first business processing unit 301 in processing the first merged data can be improved by setting up multiple first processing sub-units 303. Please refer to... Figure 3 The first service processing unit 301 includes multiple first processing sub-units 303. The interface output unit 500 is equipped with a first control queue 503 and a forwarding scheduling unit 502. Each first processing sub-unit 303 is communicatively connected to the shared cache unit 400 and the first control queue 503. The forwarding scheduling unit 502 is communicatively connected to the first control queue 503 and the shared cache unit 400.
[0078] The first processing subunit 303 is used to process the received first merged data, save the obtained first data to be forwarded to the shared buffer unit 400, and after the first data to be forwarded in the same data packet is saved to the shared buffer unit 400, save the first control information corresponding to the first complete data packet to the first control queue 503 of the designated interface output unit 500.
[0079] The forwarding scheduling unit 502 is used to obtain first control information from the first control queue 503, and read the corresponding first data to be forwarded from the shared cache unit 400 according to the first control information for forwarding.
[0080] In this embodiment of the invention, multiple first processing subunits 303 are used to concurrently process the first merged data sent by the first switching plane scheduling unit 205. The first processing subunits 303 are used to process data according to business application scenarios, such as editing the first merged data or specifying the interface output unit 500 for data forwarding.
[0081] It should be noted that, in order to reduce the cache resources of the network switching chip, the interface output unit 500 does not cache the data to be forwarded. Instead, it caches the first control information of the first data to be forwarded by setting the first control queue 503, and reads the corresponding first data to be forwarded from the shared cache unit 400 through the first control information for forwarding.
[0082] Optionally, in practical applications, please refer to Figure 3The receiving and splitting unit 201 is used to allocate a second scheduling queue identifier to the data slice when the receiving data slice belongs to the second switching plane, and save the data slice and the second scheduling queue identifier to the pre-buffering unit 202; the second switching plane corresponds to the second switching plane scheduling unit 206 and the second service processing unit 302, and the second scheduling queue identifier is the identifier of the second scheduling queue 208 set in the second switching plane scheduling unit 206.
[0083] The pre-buffer unit 202 is used to merge at least one data segment of the same data packet in the second switching plane and send the second management information corresponding to the second merged data to the receiving splitting unit 201; the second management information includes the address of the pre-buffer unit corresponding to the second merged data, the length of the second merged data, and the second scheduling queue identifier.
[0084] The receiving and splitting unit 201 is also used to save the second management information to the corresponding second scheduling queue 208 according to the second scheduling queue identifier in the received second management information.
[0085] The second switching plane scheduling unit 206 is used to monitor the second scheduling queue 208, obtain second management information from the second scheduling queue 208, obtain the corresponding second merged data from the pre-caching unit 202 according to the second management information, and send the second merged data to the second service processing unit 302.
[0086] Optionally, in practical applications, please refer to Figure 3 The second service processing unit 302 includes multiple second processing sub-units 304; the interface output unit 500 is provided with a second control queue 504 and a forwarding scheduling unit 502; each second processing sub-unit 304 is communicatively connected to the shared cache unit 400 and the second control queue 504; the forwarding scheduling unit 502 is communicatively connected to the second control queue 504 and the shared cache unit 400.
[0087] The second processing subunit 304 is used to process the received second merged data, save the obtained second data to be forwarded to the shared buffer unit 400, and after the second data to be forwarded in the same data packet is saved to the shared buffer unit 400, save the second control information corresponding to the second complete data packet to the second control queue 504 of the designated interface output unit.
[0088] The forwarding scheduling unit 502 is used to obtain second control information from the second control queue 504, and read the corresponding second data to be forwarded from the shared cache unit 400 according to the second control information for forwarding.
[0089] In this embodiment of the invention, multiple second processing subunits 304 are used to concurrently process the second merged data sent by the second switching plane scheduling unit 206. To reduce the cache resources of the network switching chip, the interface output unit 500 does not cache the data to be forwarded, but instead caches the first control information of the second data to be forwarded by setting a second control queue 504.
[0090] It should be noted that the forwarding scheduling unit can obtain the corresponding data to be forwarded by polling, weighted polling, or sequentially traversing each first control queue and second control queue according to priority from high to low, and forward the corresponding data to be forwarded according to the requirements of the receiving protocol. This invention does not limit this.
[0091] Optionally, in practical applications, the shared cache unit 400 is also used to store the data to be forwarded sent by the service processing unit in a local cache, and send the data to be forwarded at the cache address of the shared cache unit 400 to the corresponding service processing unit 300.
[0092] In this embodiment of the invention, the storage space in the shared cache unit 400 is used to receive data to be forwarded from two switching planes. When the two switching planes write the data to be forwarded into the shared cache unit 400, the shared cache unit 400 allocates a cache address for each piece of data to be forwarded, each piece of data to be forwarded is written into the corresponding cache address, and the cache address is sent to the service processing unit 300 corresponding to the data to be forwarded.
[0093] It should be noted that the shared cache unit 400 can manage the correspondence between the data to be forwarded and the cache address through a linked list. The present invention does not limit the specific management method of the shared cache unit 400 for managing the data to be forwarded.
[0094] Optionally, in practical applications, when a complete data packet includes multiple pieces of data to be forwarded, the control information includes the cache address of each piece of data to be forwarded in the shared cache unit and the length of each piece of data to be forwarded.
[0095] The shared cache unit 400 is used to receive the query command sent by the interface output unit, read the corresponding data to be forwarded in the shared cache unit according to the cache address of each data to be forwarded in the control information carried by the query command and the length of each data to be forwarded, and send the read data to be forwarded to the interface output unit 500.
[0096] In this embodiment of the invention, the shared cache unit 400 determines the storage space location for storing the data to be forwarded based on the cache address of each received data to be forwarded, and reads the corresponding data to be forwarded starting from the storage space location according to the length of the data to be forwarded. When the data to be forwarded corresponding to the query instruction has been read, all the read data to be forwarded is sent to the interface output unit 500.
[0097] Based on the same inventive concept, this embodiment of the invention also provides a dual-exchange plane data processing method. Its basic principle and the resulting technical effects are the same as those in the above embodiments. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments.
[0098] Please refer to Figure 4 , Figure 4 This diagram illustrates a flowchart of a dual-switching-plane data processing method provided by an embodiment of the present invention. The method is applied to a dual-switching-plane data processing device, which includes an interface module, a receiving and scheduling unit, two service processing units, a shared buffer unit, and an interface output unit. The receiving and scheduling unit is communicatively connected to the interface module and the two service processing units. The shared buffer unit is communicatively connected to the two service processing units and the interface output unit. The two service processing units correspond to different switching planes. The method includes the following steps:
[0099] Step S10: The receiving and scheduling unit receives the data slices sent by the interface module, merges at least one data slice of the same data packet, and sends the merged data to the service processing unit corresponding to the switching plane to which the data slice belongs.
[0100] In step S20, each service processing unit processes the received merged data to obtain the data to be forwarded, saves the data to be forwarded to the shared cache unit, and after all the data to be forwarded in the same data packet is saved to the shared cache unit, sends the control information of the complete data packet to the interface output unit.
[0101] In step S30, the interface output unit reads the data to be forwarded from the shared buffer unit according to the control information and forwards it.
[0102] In summary, the dual-switching-plane data processing method provided in this embodiment of the invention is applied to a dual-switching-plane data processing device, which includes an interface module, a receiving and scheduling unit, two service processing units, a shared buffer unit, and an interface output unit. The receiving and scheduling unit is communicatively connected to the interface module and the two service processing units. The shared buffer unit is communicatively connected to the two service processing units and the interface output unit. The two service processing units correspond to different switching planes. The receiving and scheduling unit receives data segments sent by the interface module, merges at least one data segment of the same data packet, and sends the merged data to the service processing unit corresponding to the switching plane to which the data segment belongs. Each service processing unit processes the received merged data to obtain data to be forwarded, saves the data to be forwarded to the shared buffer unit, and after all the data to be forwarded for the same data packet is saved to the shared buffer unit, sends the control information of the complete data packet to the interface output unit. The interface output unit reads the data to be forwarded from the shared buffer unit according to the control information and forwards it. By merging data slices to reduce data storage and transmission costs, using a shared cache unit to store data from both switching planes, and supporting the interface output unit to directly obtain data to be forwarded from the shared cache unit for forwarding, data forwarding efficiency is improved and cache resources are saved, thereby reducing the design cost of network switching chips.
[0103] Optionally, the receiving scheduling unit includes a receiving splitting unit, a pre-buffering unit, and two switching plane scheduling units. Each switching plane scheduling unit is equipped with at least one scheduling queue, and the two switching plane scheduling units correspond to different switching planes. The receiving splitting unit is communicatively connected to the interface module, the pre-buffering unit, and the scheduling queues, while the switching plane scheduling units are communicatively connected to the scheduling queues and the service processing unit. Figure 4 The sub-steps of step S10 may include:
[0104] The receiving and splitting unit assigns a scheduling queue identifier to the corresponding switching plane of the received data segment, saves the data segment and the scheduling queue identifier to the pre-buffering unit, and notifies the pre-buffering unit to merge at least one data segment from the same data packet. Specifically, data segments within the same data packet are assigned the same scheduling queue identifier.
[0105] The pre-buffer unit merges at least one data segment of the same data packet to obtain merged data, and sends the management information corresponding to the merged data to the receiving and splitting unit. The management information includes the address of the pre-buffer unit corresponding to the merged data, the length of the merged data, and the scheduling queue identifier.
[0106] The receiving and splitting unit saves the management information to the corresponding scheduling queue based on the scheduling queue identifier in the received management information. Each switching plane scheduling unit monitors its corresponding scheduling queue, retrieves management information from the corresponding scheduling queue, obtains the corresponding merged data from the pre-buffering unit based on the management information, and sends the merged data to the service processing unit corresponding to its switching plane.
[0107] Alternatively, please refer to Figure 5 When the receiving data slice belongs to the first switching plane, Figure 4 The sub-steps of step S10 may include:
[0108] In step S101, the receiving and splitting unit assigns a first scheduling queue identifier to the data slice and saves the data slice and the first scheduling queue identifier to the pre-buffer unit. The first switching plane corresponds to the first switching plane scheduling unit and the first service processing unit, and the first scheduling queue identifier is the identifier of the first scheduling queue set in the first switching plane scheduling unit.
[0109] In step S102, the pre-buffer unit merges at least one data segment of the same data packet in the first switching plane and sends the first management information corresponding to the first merged data to the receiving splitter unit. The first management information includes the address of the pre-buffer unit corresponding to the first merged data, the length of the first merged data, and the identifier of the first scheduling queue.
[0110] Step S103: The receiving and splitting unit saves the first management information into the corresponding first scheduling queue according to the first scheduling queue identifier in the received first management information.
[0111] In step S104, the first switching plane scheduling unit monitors the first scheduling queue, obtains the first management information from the first scheduling queue, obtains the corresponding first merged data from the pre-caching unit according to the first management information, and sends the first merged data to the first service processing unit.
[0112] Alternatively, please refer to Figure 5 When the receiving data slice belongs to the first switching plane, the first service processing unit includes multiple first processing sub-units, and the interface output unit is equipped with a first control queue and a forwarding scheduling unit. Each first processing sub-unit is communicatively connected to both the shared buffer unit and the first control queue, and the forwarding scheduling unit is communicatively connected to both the first control queue and the shared buffer unit. Figure 4 The sub-steps of steps S20 and S30 may include:
[0113] In step S201, the first processing subunit processes the received first merged data and saves the obtained first data to be forwarded to the shared buffer unit. After all the first data to be forwarded in the same data packet is saved to the shared buffer unit, the first control information corresponding to the first complete data packet is saved to the first control queue of the designated interface output unit.
[0114] In step S301, the forwarding scheduling unit obtains the first control information from the first control queue, and reads the corresponding first data to be forwarded from the shared cache unit according to the first control information for forwarding.
[0115] Alternatively, please refer to Figure 5 When the receiving data slice belongs to the second switching plane, Figure 4 The sub-steps of step S10 may include:
[0116] In step S111, the receiving and splitting unit assigns a second scheduling queue identifier to the data slice and saves the data slice and the second scheduling queue identifier to the pre-buffer unit. The second switching plane corresponds to the second switching plane scheduling unit and the second service processing unit, and the second scheduling queue identifier is the identifier of the second scheduling queue set in the second switching plane scheduling unit.
[0117] In step S112, the pre-buffer unit merges at least one data fragment of the same data packet in the second switching plane and sends the second management information corresponding to the second merged data to the receiving splitting unit; the second management information includes the address of the pre-buffer unit corresponding to the second merged data, the length of the second merged data, and the second scheduling queue identifier.
[0118] Step S113: The receiving and splitting unit saves the second management information into the corresponding second scheduling queue according to the second scheduling queue identifier in the received second management information.
[0119] In step S114, the second switching plane scheduling unit monitors the second scheduling queue, obtains the second management information from the second scheduling queue, obtains the corresponding second merged data from the pre-buffering unit according to the second management information, and sends the second merged data to the second service processing unit.
[0120] Alternatively, please refer to Figure 5 When the receiving data slice belongs to the second switching plane, the second service processing unit includes multiple second processing sub-units, and the interface output unit is equipped with a second control queue and a forwarding scheduling unit. Each second processing sub-unit is communicatively connected to the shared buffer unit and the second control queue, and the forwarding scheduling unit is communicatively connected to both the second control queue and the shared buffer unit. Figure 4 The sub-steps of steps S20 and S30 may include:
[0121] In step S211, the second processing subunit processes the received second merged data and saves the obtained second data to be forwarded to the shared buffer unit. After all the second data to be forwarded in the same data packet is saved to the shared buffer unit, the second control information corresponding to the second complete data packet is saved to the second control queue of the designated interface output unit.
[0122] In step S311, the forwarding scheduling unit obtains the second control information from the second control queue, and reads the corresponding second data to be forwarded from the shared cache unit according to the second control information for forwarding.
[0123] Optionally, the shared cache unit stores the data to be forwarded sent by the service processing unit in its local cache, and sends the cache address of the data to be forwarded in the shared cache unit to the corresponding service processing unit.
[0124] Optionally, when the complete data packet includes multiple pieces of data to be forwarded, the control information includes the cache address of each piece of data to be forwarded in the shared cache unit and the length of each piece of data to be forwarded. The shared cache unit receives a query command sent by the interface output unit, reads the corresponding piece of data to be forwarded according to the cache address of each piece of data to be forwarded in the shared cache unit and the length of each piece of data to be forwarded in the control information carried in the query command, and sends the read piece of data to be forwarded to the interface output unit.
[0125] This invention also provides a network switching chip, which includes the dual-switching plane data processing device disclosed in the above embodiments.
[0126] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0127] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0128] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0129] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A dual-switching plane data processing device, characterized in that, It includes an interface module, a receive scheduling unit, two service processing units, a shared buffer unit, and an interface output unit; the receive scheduling unit is communicatively connected to the interface module and the two service processing units; the shared buffer unit is communicatively connected to the two service processing units and the interface output unit; the two service processing units correspond to different switching planes. The receiving and scheduling unit is used to receive data segments sent by the interface module, merge at least one data segment of the same data packet, and send the merged data to the service processing unit corresponding to the switching plane to which the data segment belongs. Each of the aforementioned service processing units is used to process the received merged data to obtain the data to be forwarded, save the data to be forwarded to the shared cache unit, and after all the data to be forwarded in the same data packet is saved to the shared cache unit, send the control information of the complete data packet to the interface output unit. The interface output unit is used to read the data to be forwarded from the shared cache unit according to the control information and forward it.
2. The dual-switching plane data processing apparatus according to claim 1, characterized in that, The receiving scheduling unit includes a receiving splitting unit, a pre-buffering unit, and two switching plane scheduling units; each switching plane scheduling unit is equipped with at least one scheduling queue; the two switching plane scheduling units correspond to different switching planes; the receiving splitting unit is communicatively connected to the interface module, the pre-buffering unit, and the scheduling queues; the switching plane scheduling units are communicatively connected to the scheduling queues and the service processing unit. The receiving splitting unit is used to assign a scheduling queue identifier corresponding to the switching plane to which the received data slice belongs to the data slice, save the data slice and the scheduling queue identifier to the pre-buffering unit, and notify the pre-buffering unit to merge at least one data slice in the same data packet; the data slices in the same data packet are assigned the same scheduling queue identifier. The pre-caching unit is used to merge at least one data segment of the same data packet to obtain merged data, and send the management information corresponding to the merged data to the receiving and splitting unit; the management information includes the address of the pre-caching unit corresponding to the merged data, the length of the merged data, and the scheduling queue identifier; The receiving and splitting unit is also used to save the management information into the corresponding scheduling queue according to the scheduling queue identifier in the received management information; Each of the switching plane scheduling units is used to monitor its corresponding scheduling queue, obtain the management information from the corresponding scheduling queue, obtain the corresponding merged data from the pre-caching unit according to the management information, and send the merged data to the service processing unit corresponding to its switching plane.
3. The dual-switching plane data processing device according to claim 2, characterized in that, The receiving and splitting unit is used to allocate a first scheduling queue identifier to the data slice when the switching plane to which the received data slice belongs is the first switching plane, and save the data slice and the first scheduling queue identifier to the pre-buffering unit; the first switching plane corresponds to the first switching plane scheduling unit and the first service processing unit, and the first scheduling queue identifier is the identifier of the first scheduling queue set in the first switching plane scheduling unit; The pre-buffer unit is used to merge at least one data segment of the same data packet in the first switching plane, and send the first management information corresponding to the first merged data to the receiving splitting unit; the first management information includes the address of the pre-buffer unit corresponding to the first merged data, the length of the first merged data, and the identifier of the first scheduling queue. The receiving and splitting unit is further configured to save the first management information to the corresponding first scheduling queue according to the first scheduling queue identifier in the received first management information; The first switching plane scheduling unit is used to monitor the first scheduling queue, obtain the first management information from the first scheduling queue, obtain the corresponding first merged data from the pre-caching unit according to the first management information, and send the first merged data to the first service processing unit.
4. The dual-switching plane data processing apparatus according to claim 3, characterized in that, The first service processing unit includes multiple first processing sub-units; the interface output unit is equipped with a first control queue and a forwarding scheduling unit; each first processing sub-unit is communicatively connected to the shared cache unit and the first control queue; the forwarding scheduling unit is communicatively connected to the first control queue and the shared cache unit. The first processing subunit is used to process the received first merged data, save the obtained first data to be forwarded to the shared cache unit, and after the first data to be forwarded in the same data packet is saved to the shared cache unit, save the first control information corresponding to the first complete data packet to the first control queue of the designated interface output unit. The forwarding scheduling unit is used to obtain the first control information from the first control queue, and read the corresponding first data to be forwarded from the shared cache unit according to the first control information for forwarding.
5. The dual-switching plane data processing apparatus according to claim 2, characterized in that, The receiving and splitting unit is used to allocate a second scheduling queue identifier to the data slice when the switching plane to which the received data slice belongs is the second switching plane, and save the data slice and the second scheduling queue identifier to the pre-buffering unit; the second switching plane corresponds to the second switching plane scheduling unit and the second service processing unit, and the second scheduling queue identifier is the identifier of the second scheduling queue set in the second switching plane scheduling unit; The pre-buffer unit is used to merge at least one data segment of the same data packet in the second switching plane, and send the second management information corresponding to the second merged data to the receiving splitting unit; the second management information includes the address of the pre-buffer unit corresponding to the second merged data, the length of the second merged data, and the second scheduling queue identifier; The receiving and splitting unit is further configured to save the second management information to the corresponding second scheduling queue according to the second scheduling queue identifier in the received second management information; The second switching plane scheduling unit is used to monitor the second scheduling queue, obtain the second management information from the second scheduling queue, obtain the corresponding second merged data from the pre-caching unit according to the second management information, and send the second merged data to the second service processing unit.
6. The dual-switching plane data processing apparatus according to claim 5, characterized in that, The second service processing unit includes multiple second processing sub-units; the interface output unit is equipped with a second control queue and a forwarding scheduling unit; each second processing sub-unit is communicatively connected to the shared cache unit and the second control queue; the forwarding scheduling unit is communicatively connected to the second control queue and the shared cache unit. The second processing subunit is used to process the received second merged data, save the obtained second data to be forwarded to the shared cache unit, and after the second data to be forwarded in the same data packet is saved to the shared cache unit, save the second control information corresponding to the second complete data packet to the second control queue of the designated interface output unit. The forwarding scheduling unit is used to obtain the second control information from the second control queue, and read the corresponding second data to be forwarded from the shared cache unit according to the second control information for forwarding.
7. The dual-switching plane data processing apparatus according to claim 1, characterized in that, The shared cache unit is also used to store the data to be forwarded sent by the service processing unit in a local cache, and send the data to be forwarded to the corresponding service processing unit at the cache address of the shared cache unit.
8. The dual-switching plane data processing apparatus according to claim 1, characterized in that, When the complete data packet includes multiple data to be forwarded, the control information includes the cache address of each data to be forwarded in the shared cache unit and the length of each data to be forwarded; The shared cache unit is used to receive the query instruction sent by the interface output unit, read the corresponding data to be forwarded according to the cache address of each data to be forwarded in the shared cache unit and the length of each data to be forwarded in the control information carried by the query instruction, and send the read data to be forwarded to the interface output unit.
9. A dual-exchange plane data processing method, characterized in that, This invention relates to a dual-switching-plane data processing device, which includes an interface module, a receiving and scheduling unit, two service processing units, a shared buffer unit, and an interface output unit. The receiving and scheduling unit is communicatively connected to the interface module and the two service processing units. The shared buffer unit is communicatively connected to the two service processing units and the interface output unit. The two service processing units correspond to different switching planes. The receiving and scheduling unit receives the data segments sent by the interface module, merges at least one data segment of the same data packet, and sends the merged data to the service processing unit corresponding to the switching plane to which the data segment belongs. Each of the service processing units processes the received merged data to obtain the data to be forwarded, saves the data to be forwarded to the shared cache unit, and after all the data to be forwarded in the same data packet is saved to the shared cache unit, sends the control information of the complete data packet to the interface output unit. The interface output unit reads the data to be forwarded from the shared cache unit according to the control information and forwards it.
10. A network switching chip, characterized in that, The network switching chip includes the dual-switching plane data processing device as described in any one of claims 1-8.