Hardware switch matching action table cascading method for efficient network monitoring
By building a cascading matching action table mechanism of ‘guidance table-execution table’ in hardware switches, the problem of limited storage resources of Barefoot hardware switches is solved, and efficient flow monitoring and scalability are achieved.
Patent Information
- Application Number
- CN202410691179.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-05-30
AI Technical Summary
Barefoot hardware switches face limitations in terms of storage resources, especially the limited number of TCAM and SRAM, which leads to the inability to support a large number of matching action rules, limiting their scalability and flexibility, especially in multi-stream monitoring scenarios.
Using a hardware switch matching action table cascade method, by constructing a cascade matching action table mechanism of 'guidance table-execution table', the guidance table obtains guidance information based on the flow number of the data packet and the telemetry data value matching, and the execution table is carried out according to the The guidance information is used as a matching domain to match the corresponding actions for the data packet and is executed, and the guidance information of the guidance table is dynamically updated through p4 runtime to realize the adjustment and optimization of network monitoring.
Effectively multiplex table entries, distinguish flow matching and telemetry data matching, significantly reduce resource overhead, enhance flow scalability of P4InfoSen-INT, realize flexible and efficient flow monitoring, and improve flow scalability.
Smart Images

Figure CN119402448A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network communication, and in particular to a hardware switch matching action table cascading method for efficient network monitoring. Background Art
[0002] Nowadays, with the rise of data center networks, the rapid development of software defined networking (SDN) and network function virtualization (NFV), network traffic has exploded, and network business scenarios have become increasingly complex and diverse. Software defined networking separates the control plane and the data plane, allowing network administrators to customize the processing logic of the data plane through programming, greatly improving the flexibility and scalability of network devices, allowing network devices to be dynamically adjusted according to different business scenarios and needs. Barefoot hardware switches are typical representatives of programmable data planes. They use Tofino chips based on the PISA architecture and can provide up to 12.8Tb / s throughput. Its powerful processing power combined with the flexibility of the P4 language allows users to customize and optimize network behavior more freely to meet changing network needs.
[0003] At the same time, the increasingly complex network environment and unpredictable traffic patterns have also brought huge challenges to network measurement. One of the key issues is how to effectively control resource overhead while ensuring network monitoring accuracy. This is because highly dynamic network environments require frequent network status collection and reporting, and the collection and reporting of network status data not only consumes computing and memory resources on network elements (such as switches and routers), but also consumes bandwidth resources on network links. To address this problem, P4InfoSen-INT, an efficient network monitoring system based on in-band network telemetry (INT), proposes that the network can make autonomous decisions based on the amount of information in the telemetry data, thereby effectively collecting key information with lower bandwidth overhead. Currently, P4InfoSen-INT has been deployed on Barefoot hardware switches.
[0004] However, Barefoot hardware switches face significant limitations in terms of storage resources. In particular, the limited number of ternary content addressable memories (TCAM) and static random access memories (SRAM) limits the number of table entries that can be stored, which means that the switch may not be able to support a large number of matching action rules, thus limiting its scalability and flexibility. In P4InfoSen-INT, due to the merging of the priority mapping table (PMT), the number of table entries required to monitor each flow is huge, which seriously affects the scalability of P4InfoSen-INT in multi-flow monitoring scenarios. Experiments show that for each additional monitoring flow, up to 64 table entries may be required, and the matching domain length of each table entry is 88 bits. In this case, the TCAM capacity of a stage can only support the simultaneous monitoring of 23 flows, which greatly limits the application scenarios of P4InfoSen-INT. Summary of the invention
[0005] The purpose of the present invention is to provide a hardware switch matching action table cascading method for efficient network monitoring, which can effectively reuse table items and distinguish flow matching from telemetry data matching, thereby significantly reducing resource overhead and enhancing the flow scalability of P4InfoSen-INT, and realizing flexible and efficient flow monitoring.
[0006] The objective of the present invention is achieved through the following technical solutions:
[0007] A hardware switch matching action table cascading method for efficient network monitoring, the method comprising:
[0008] Step 1: Based on the efficient network monitoring system P4InfoSen-INT, a cascade matching action table mechanism of "guidance table-execution table" is constructed in the hardware switch;
[0009] Step 2: For each data packet, the guidance table matches the data packet's flow number and telemetry data value to obtain the guidance information of the data packet, and the execution table uses the guidance information as the matching field to match the data packet to the corresponding action and execute it;
[0010] Step 3: When the distribution of telemetry data of a certain flow in each interval / value changes, or the flow monitoring requirements in the network change, the guidance information of the guidance table constructed in the hardware switch is dynamically updated by p4 runtime, and the table items are issued in real time to adjust and optimize network monitoring.
[0011] It can be seen from the technical solution provided by the present invention that the above method can effectively reuse table items and distinguish flow matching from telemetry data matching, thereby significantly reducing resource overhead and enhancing the flow scalability of P4InfoSen-INT, realizing flexible and efficient flow monitoring, and improving flow scalability. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0013] Figure 1 A schematic flow chart of a method for cascading hardware switch matching action tables for efficient network monitoring provided by an embodiment of the present invention;
[0014] Figure 2 A schematic diagram of the composition of the guidance table-execution table cascade matching according to an embodiment of the present invention;
[0015] Figure 3 A schematic diagram of the implementation process of the hardware switch matching action table cascading solution according to an embodiment of the present invention;
[0016] Figure 4 Schematic diagram of the action_index encoding scheme according to an embodiment of the present invention;
[0017] Figure 5 It is a schematic diagram of the priority_index encoding scheme described in an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments, which does not constitute a limitation of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] Figure 1 The figure shows a flow chart of a method for cascading hardware switch matching action tables for efficient network monitoring provided by an embodiment of the present invention, the method comprising:
[0020] Step 1: Based on the efficient network monitoring system P4InfoSen-INT, a cascade matching action table mechanism of "guidance table-execution table" is constructed in the hardware switch;
[0021] In this step, Figure 2 The figure shows a schematic diagram of the composition of the guidance table-execution table cascade matching in an embodiment of the present invention. The first-level guidance table constructed in the hardware switch includes two sub-tables: a telemetry data encoding table and a flow feature encoding table. When processing a data packet, firstly, each telemetry data value of the flow corresponding to the data packet is used as a key to match in the telemetry data encoding table to obtain the corresponding telemetry data code telemetry_index; at the same time, the flow number FlowNumber of the data packet is used as a key to match in the flow feature encoding table to obtain the corresponding action guidance code action_index and priority guidance code priority_index; in a specific implementation, the types of the telemetry data include bandwidth Bandwidth, hop delay Latency, inport Inport and outport Outport;
[0022] The second-level execution table constructed in the hardware switch is based on the output of the guidance table, that is, the telemetry data code telemetry_index and the action guidance code action_index are used as matching keys to match the unique action that the data packet should execute and the priority of the action.
[0023] Step 2: For each data packet, the guidance table matches the data packet's flow number and telemetry data value to obtain the guidance information of the data packet, and the execution table uses the guidance information as the matching field to match the data packet to the corresponding action and execute it;
[0024] In this step, when the data packet enters the egress pipeline of the hardware switch, it is first matched with the first-level guidance table to obtain the corresponding guidance information, including telemetry data encoding telemetry_index, action guidance encoding action_index and priority guidance encoding priority_index;
[0025] Then, the guidance information is matched with the second-level execution table and corresponding actions are executed. The executed actions include acquisition bandwidth, acquisition delay, acquisition input port or acquisition output port, so as to realize flexible and efficient monitoring of multiple flows.
[0026] The telemetry data encoding telemetry_index is an 8-bit number, from 0000 0000 to 0011 1111, which identifies 64 interval / value combinations of each telemetry data.
[0027] The action guidance code action_index is a 128-bit number used to indicate what actions the data packet should take under each of the 64 telemetry data combinations;
[0028] The priority guidance code priority_index is a 48-bit number used to indicate the priority of each action corresponding to the data packet under each telemetry data combination;
[0029] The telemetry data code telemetry_index, the action guidance code action_index and the priority guidance code priority_index are transmitted between the guidance table and the execution table through the metadata egress_metadata_t defined by the hardware switch;
[0030] The execution table performs an exact match on the telemetry data code telemetry_index, and performs mask matching on the action guidance code action_index at different positions according to different telemetry data codes telemetry_index, to obtain a unique action assigned to the data packet.
[0031] In the specific implementation, Figure 3 The figure is a schematic diagram of the implementation process of the cascading scheme of the hardware switch matching action table according to the embodiment of the present invention. After the cascade matching action table mechanism of "guidance table-execution table" is constructed in the hardware switch, the processing steps of the data packet in the hardware switch are as follows:
[0032] 1) The data packet enters the Barefoot hardware switch, such as Figure 3 As shown, it passes through the inlet pipeline, packet replication and traffic management module and enters the outlet pipeline;
[0033] 2) In the egress pipeline, the data packet is first matched against the first-level guidance table. Specifically, the data packet first matches the telemetry data encoding table to obtain its corresponding telemetry data encoding telemetry_index, and then matches the flow feature encoding table to obtain action_index and priority_index;
[0034] 3) Then the data packet enters the second-level execution table for matching, using the telemetry data code telemetry_index and the action guidance code action_index as the matching key, matching to obtain the only action that the data packet should execute and the priority of the action;
[0035] 4) The packet is sent out of the Barefoot hardware switch and enters the link.
[0036] For example, the specific matching process of a data packet in the "guidance table-execution table" cascade matching action table is as follows:
[0037] 1) The data packet reads four telemetry data corresponding to the flow: bandwidth, latency, ingress port, and egress port.
[0038] 2) If Figure 2 As shown in the telemetry data encoding table, bandwidth and delay data use range matching, ingress and egress port data use ternary matching, and the unique telemetry_index corresponding to the data packet is obtained by simultaneously matching the four key values, which is stored in the metadata egress_metadata_t defined by the switch.
[0039] 3) If Figure 2 As shown, in the flow feature encoding table, the corresponding action_index and priority_index are obtained by accurately matching the flow number of the data packet, and are also stored in egress_metadata_t.
[0040] 4) If Figure 2 As shown, in the execution table, the data packet reads telemetry_index and action_index from egress_metadata_t as the key of the execution table, and obtains the corresponding action and action priority through mask matching.
[0041] like Figure 2 As shown, in the execution table, different telemetry_index represents the fields at different positions in action_index that need to be matched. For example, when telemetry_index=0000 0000, the corresponding telemetry data is the first combination. At this time, the first two bits of action_index should be matched to obtain the action corresponding to the data packet.
[0042] For example, Figure 4 The figure shows a schematic diagram of the action_index encoding scheme according to an embodiment of the present invention. For 64 telemetry data combinations, action_index uses 2 bits to encode the corresponding action, 00 represents the acquisition of delay data, 01 represents the acquisition of bandwidth data, 10 represents the acquisition of egress port data, and 11 represents the acquisition of ingress port data. In this way, for any combination of telemetry data, the data packet only needs to match the two bits of the corresponding position of action_index through the mask to obtain the action that the data packet should execute.
[0043] Figure 5 The figure shows a schematic diagram of the priority_index encoding scheme according to an embodiment of the present invention. For the values / intervals corresponding to the 12 telemetry data, the corresponding priorities are obtained by sorting and encoded with 4 bits. In this way, for the same action, the corresponding priorities will be different.
[0044] For example Figure 2In the guidance table-execution table shown, the delayed data collected in the matching action table corresponds to four actions, each action has a different priority, and the priority_index field position read is also different.
[0045] Under the cascade table structure proposed in the embodiment of the present invention, each additional monitoring flow only needs to add an entry in the flow feature coding table, and the length of the matching domain of the entry is the length of the flow number, which is set to 8 bits in the test experiment. Under the coding scheme proposed in the present invention, the resources of a stage can support the simultaneous monitoring of at least 256 flows.
[0046] Step 3: When the distribution of telemetry data of a certain flow in each interval / value changes, or the flow monitoring requirements in the network change, the guidance information of the guidance table constructed in the hardware switch is dynamically updated during the p4 runtime (the protocol used by the SDN controller to control the p4 device), and the table items are issued in real time to adjust and optimize network monitoring.
[0047] In this step, the table entry update process of the flow feature coding table in the guidance table is:
[0048] 1) Enumerate the actions that should be taken for each telemetry data combination based on the telemetry data distribution map after the change;
[0049] 2) Assign values to the action guidance code action_index in order according to the action code;
[0050] 3) Sort the distribution probability of all telemetry data;
[0051] 4) Assign values to the priority guidance code priority_index in order.
[0052] like Figure 3 As shown, the control plane calculates the latest distribution of the telemetry data based on the collected telemetry data, calculates the table entries of the new flow feature encoding table, and then updates the table entries in the switch at runtime through the p4 runtime interface.
[0053] It is worth noting that the contents not described in detail in the embodiments of the present invention belong to the prior art known to professional and technical personnel in the field.
[0054] In summary, the method described in the embodiment of the present invention has the following advantages:
[0055] 1) The present invention can effectively reduce the storage resource overhead caused by the monitoring of a single flow through the cascade design of "guidance table-execution table" while maintaining the core operating principle of P4InfoSen-INT. The telemetry data encoding table and execution table proposed in the present invention are fixed and can be reused by all network flows. Under this framework, the flow feature encoding table proposed in the present invention extracts and encodes features for each network flow. In this way, for each network flow that needs to be monitored, the system only needs to extract a corresponding table entry from the flow feature encoding table to complete the monitoring of the flow. The design of the cascade table greatly increases the number of flows that the system can monitor simultaneously, which greatly improves the flow scalability compared to the existing P4InfoSen-INT solution;
[0056] 2) The coding matching scheme of the guidance table and the execution table proposed in the present invention realizes the "guidance-execution" process efficiently and concisely through clever field coding and matching, avoiding complex operations such as comparison or calculation in the switch, and also avoiding introducing additional unnecessary overhead to the system;
[0057] 3) The present invention encodes the flow features by designing action guidance code action_index and priority guidance code priority_index. The data packet can match the action_index and priority_index that can uniquely identify the flow in the flow feature coding table according to the Flow Number, and perform matching in the execution table accordingly. The introduction and design of flow feature coding can concisely express the flow features required in P4InfoSen-INT, and the process of updating flow monitoring requirements can be abstracted into the recalculation of flow feature coding and the re-issuance of corresponding flow feature coding table entries, reducing the overhead caused by the update of flow monitoring requirements.
[0058] In addition, a person skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be implemented by instructing related hardware through a program, and the corresponding program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc.
[0059] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed in the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims. The information disclosed in the background technology section of this article is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as an admission or in any form that the information constitutes prior art known to those skilled in the art.
Claims
1. A hardware switch matching action table cascading method for efficient network monitoring, characterized in that: The method comprises: Step 1: Based on the efficient network monitoring system P4InfoSen-INT, a cascade matching action table mechanism of "guidance table-execution table" is constructed in the hardware switch; Step 2: For each data packet, the guidance table matches the data packet's flow number and telemetry data value to obtain the guidance information of the data packet, and the execution table uses the guidance information as the matching field to match the data packet to the corresponding action and execute it; Step 3: When the distribution of telemetry data of a certain flow in each interval / value changes, or the flow monitoring requirements in the network change, the guidance information of the guidance table constructed in the hardware switch is dynamically updated by p4 runtime, and the table items are issued in real time to adjust and optimize network monitoring.
2. The hardware switch matching action table cascading method for efficient network monitoring according to claim 1 is characterized in that: In step 1, the first-level guidance table constructed in the hardware switch includes two sub-tables: a telemetry data encoding table and a flow feature encoding table; when processing a data packet, firstly, each telemetry data value of the flow corresponding to the data packet is used as a key to match in the telemetry data encoding table to obtain the corresponding telemetry data code telemetry_index; at the same time, the flow number of the data packet is used as a key to match in the flow feature encoding table to obtain the corresponding action guidance code action_index and priority guidance code priority_index; The second-level execution table constructed in the hardware switch is based on the output of the guidance table, that is, the telemetry data code telemetry_index and the action guidance code action_index are used as matching keys to match the unique action that the data packet should execute and the priority of the action.
3. The hardware switch matching action table cascading method for efficient network monitoring according to claim 2 is characterized in that: The types of telemetry data include bandwidth, latency, inport, and outport.
4. The hardware switch matching action table cascading method for efficient network monitoring according to claim 1 is characterized in that: In step 2, when the data packet enters the egress pipeline of the hardware switch, it is first matched with the first-level guidance table to obtain the corresponding guidance information, including the telemetry data code telemetry_index, the action guidance code action_index and the priority guidance code priority_index; then it is matched with the second-level execution table according to the guidance information and the corresponding action is executed, including the acquisition bandwidth, acquisition delay, acquisition input port or acquisition output port; The telemetry data encoding telemetry_index is an 8-bit number, from 0000 0000 to 0011 1111, which identifies 64 interval / value combinations of each telemetry data. The action guidance code action_index is a 128-bit number used to indicate what actions the data packet should take under each of the 64 telemetry data combinations; The priority guidance code priority_index is a 48-bit number used to indicate the priority of each action corresponding to the data packet under each telemetry data combination; The telemetry data code telemetry_index, the action guidance code action_index and the priority guidance code priority_index are transmitted between the guidance table and the execution table through the metadata egress_metadata_t defined by the hardware switch; The execution table performs an exact match on the telemetry data code telemetry_index, and performs mask matching on the action guidance code action_index at different positions according to different telemetry data codes telemetry_index, to obtain a unique action assigned to the data packet.
5. The hardware switch matching action table cascading method for efficient network monitoring according to claim 1, characterized in that: In step 3, the table entry update process of the flow feature coding table in the guidance table is: 1) Enumerate the actions that should be taken for each telemetry data combination based on the telemetry data distribution map after the change; 2) Assign values to the action guidance code action_index in order according to the action code; 3) Sort the distribution probability of all telemetry data; 4) Assign values to the priority guidance code priority_index in order.
Citation Information
Patent Citations
Whole network flow visualization method and device based on in-band network telemetry (INT)
CN108199924A
Real-time programmable sampling in-band network telemetering method
CN109672591A
In-band telemetering method of virtual SDN (Software Defined Network) in-band telemetering system based on segment routing
CN114501190A
Method for deploying random forest model on P4 switch
CN114866281A
Method for acquiring network congestion information in combination with in-band network telemetering
CN115118663A