A cascading method for hardware switch matching action tables for efficient network monitoring

By building a guidance table-execution table cascade mechanism in the hardware switch, utilizing telemetry data and flow feature encoding to dynamically update table entries, the storage resource limitation problem of Barefoot hardware switches is solved, and efficient flow monitoring and scalability are achieved.

CN119402448BActive Publication Date: 2025-09-19UNIV OF SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410691179.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2025-09-19
Estimated Expiration
2044-05-30

AI Technical Summary

Technical Problem

Barefoot hardware switches face the problem of limited TCAM and SRAM storage resources. As a result, they cannot support a large number of matching action rules, which limits their scalability and flexibility. In particular, the huge number of table entries required in multi-flow monitoring scenarios affects the scalability of P4InfoSen-INT.

Method used

The guidance table-execution table cascade matching action table mechanism is adopted. Through telemetry data encoding and flow feature encoding, the guidance table and execution table are constructed, and the guidance information is dynamically updated to optimize network monitoring, reduce resource overhead and enhance flow scalability.

Benefits of technology

It significantly reduces resource overhead, improves flow scalability, realizes flexible and efficient flow monitoring, supports simultaneous monitoring of more flows, and improves the scalability and flexibility of network equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402448B_ABST
    Figure CN119402448B_ABST
Patent Text Reader

Abstract

This invention discloses a cascading method for hardware switch matching action tables for efficient network monitoring. Based on the efficient network monitoring system P4InfoSen-INT, a cascaded matching action table mechanism, called a "guidance table-execution table," is constructed in the hardware switch. For each data packet, the guidance table matches the packet's flow number with the telemetry data value to obtain guidance information for the packet. The execution table uses this guidance information as a matching domain to match the packet to the corresponding action and execute it. The guidance information in the guidance table constructed in the hardware switch is dynamically updated during the p4runtime runtime, and table entries are downloaded in real time to adjust and optimize network monitoring. This method effectively reuses table entries and distinguishes between flow matching and telemetry data matching, significantly reducing resource overhead and enhancing the flow scalability of P4InfoSen-INT.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network communications, and in particular to a hardware switch matching action table cascading method for efficient network monitoring. Background Art

[0002] Today, with the rise of data center networks and the rapid development of Software Defined Networking (SDN) and Network Function Virtualization (NFV), network traffic is exploding, and network business scenarios are becoming increasingly complex and diverse. Software Defined Networking (SDN) separates the control plane from the data plane, allowing network administrators to customize the data plane's processing logic through programming. This greatly improves the flexibility and scalability of network equipment, enabling network equipment to dynamically adjust to different business scenarios and needs. Barefoot hardware switches are a typical example of programmable data planes. They utilize the Tofino chip based on the PISA architecture and can provide throughput of up to 12.8Tb / s. Their powerful processing capabilities combined with the flexibility of the P4 language allow users to more freely customize and optimize network behavior to meet ever-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. 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 amount of ternary content-addressable memory (TCAM) and static random access memory (SRAM) limits the number of table entries that can be stored. This 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 priority mapping tables (PMTs), 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 monitored flow, up to 64 table entries may be required, and the matching field 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. The method can effectively reuse table entries and distinguish between flow matching and telemetry data matching, thereby significantly reducing resource overhead and enhancing the flow scalability of P4InfoSen-INT, realizing flexible and efficient flow monitoring.

[0006] The purpose 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 built in the hardware switch;

[0009] Step 2: For each data packet, the guidance table matches the data packet's flow number with the telemetry data value to obtain the data packet's guidance information. 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 for a particular flow changes across various intervals or values, or when the flow monitoring requirements in the network change, the p4 runtime dynamically updates the guidance information in the guidance table built in the hardware switch and publishes the table entries 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 entries 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 following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any 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 This is 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 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. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments, and do not constitute a limitation of the present invention. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0019] Figure 1 FIG2 is a flow chart of a method for cascading hardware switch matching action tables for efficient network monitoring according to an embodiment of the present invention. The method includes:

[0020] Step 1: Based on the efficient network monitoring system P4InfoSen-INT, a cascade matching action table mechanism of "guidance table-execution table" is built in the hardware switch;

[0021] In this step, Figure 2 The figure shows a schematic diagram of the cascade matching of the guidance table and execution table according to 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, each telemetry data value of the flow corresponding to the data packet is first used as a key to match 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 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 telemetry data type includes bandwidth Bandwidth, hop delay Latency, inport Inport, and outport Outport.

[0022] The second-level execution table built 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 with the telemetry data value to obtain the data packet's guidance information. 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 the telemetry data code telemetry_index, the action guidance code action_index, and the priority guidance code priority_index;

[0025] Then, the guidance information is matched with the second-level execution table and corresponding actions are performed. The actions performed include collecting bandwidth, collecting delay, collecting input port or collecting output port, thereby realizing flexible and efficient monitoring of multiple flows.

[0026] The telemetry data encoding telemetry_index is an 8-bit number, ranging 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 action the data packet should take under 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 each telemetry data combination of the data packet;

[0029] The telemetry data code telemetry_index, action guidance code action_index and priority guidance code priority_index are transferred 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 encoding telemetry_index, and performs mask matching on the action guidance encoding action_index at different positions according to different telemetry data encoding telemetry_index, to obtain a unique action assigned to the data packet.

[0031] In the specific implementation, Figure 3 The figure shows a schematic diagram of the implementation process of the hardware switch matching action table cascade solution according to an embodiment of the present invention. After the "guidance table-execution table" cascade matching action table mechanism is established in the hardware switch, the data packet processing steps 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) The data packet then enters the second-level execution table for matching, using the telemetry data code telemetry_index and the action guidance code action_index as matching keys to obtain the unique action that the data packet should execute and the priority of the action;

[0035] 4) The packet is sent out of the egress 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 types of 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 latency data use range matching, and ingress and egress port data use ternary matching. The unique telemetry_index corresponding to the data packet is obtained by simultaneously matching the four key values ​​and 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 exact matching according to the flow number of the data packet, and are also stored in egress_metadata_t.

[0040] 4) If Figure 2 As shown in the figure, 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 the 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 Figure 1 shows a schematic diagram of the action_index encoding scheme described in an embodiment of the present invention. For each of the 64 telemetry data combinations, the action_index uses two bits to encode the corresponding action: 00 represents latency data acquisition, 01 represents bandwidth data acquisition, 10 represents egress data acquisition, and 11 represents ingress data acquisition. Thus, for any telemetry data combination, a packet only needs to match the two bits of the action_index corresponding to the mask to determine the action to be executed.

[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 numerical values / intervals corresponding to the 12 telemetry data, the corresponding priorities are obtained by sorting and encoded with 4 bits. In this way, the corresponding priorities for the same action will be different.

[0044] For example Figure 2In the guidance table-execution table shown, the delay 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 cascaded table structure proposed in this embodiment, each additional monitored stream requires only one entry in the stream signature encoding table. The matching field length of this entry is equal to the stream number, which was set to 8 bits in the test experiment. With the proposed encoding scheme, a single stage's resources can support simultaneous monitoring of at least 256 streams.

[0046] Step 3: When the distribution of telemetry data for a particular flow changes across various intervals or values, or when the flow monitoring requirements in the network change, the guidance information in the guidance table built in the hardware switch is dynamically updated during the p4 runtime (the protocol used by the SDN controller to control the p4 device), and table entries are downloaded in real time to adjust and optimize network monitoring.

[0047] In this step, the process of updating the entries in the flow feature coding table in the guidance table is as follows:

[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 in the figure, the control plane calculates the latest distribution of telemetry data based on the collected telemetry data, calculates the table entries of the new flow feature coding table, and then updates the table entries in the switch at runtime through the p4 runtime interface.

[0053] It should be noted that the contents not described in detail in the embodiments of the present invention belong to the prior art known to those skilled in the art.

[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 monitoring a single flow through the design of the "guidance table-execution table" cascade 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 and matching scheme for the guidance table and execution table proposed in this invention implements the "guidance-execution" process efficiently and concisely through clever field coding and matching, avoiding complex operations such as comparisons or calculations in the switch and introducing unnecessary overhead into the system.

[0057] 3) The present invention encodes flow features by designing action guidance code action_index and priority guidance code priority_index. Data packets can be matched in the flow feature coding table according to the Flow Number to obtain the action_index and priority_index that can uniquely identify the flow, and the execution table is matched 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 codes and the re-issuance of corresponding flow feature coding table entries, reducing the overhead caused by updating flow monitoring requirements.

[0058] In addition, those skilled in the art will understand that all or part of the steps in the above-mentioned embodiment method can be implemented by instructing the relevant 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 description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection 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 any form of implication that the information constitutes prior art already 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 built in the hardware switch; In step 1, the first-level guidance table built in the hardware switch includes two sub-tables: a telemetry data encoding table and a flow feature encoding table. When processing a data packet, the telemetry data values ​​of the corresponding flow of the data packet are first used as keys to match the corresponding telemetry data code telemetry_index in the telemetry data encoding table. At the same time, the flow number of the data packet is used as a key to match the corresponding action guidance code action_index and priority guidance code priority_index in the flow feature encoding table. The second-level execution table built in the hardware switch is based on the output of the guidance table. It uses the telemetry data code telemetry_index and the action guidance code action_index as matching keys to match the unique action that the data packet should execute and the priority of the action. Step 2: For each data packet, the guidance table matches the data packet's flow number with the telemetry data value to obtain the data packet's guidance information. 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 for a particular flow changes across various intervals or values, or when the flow monitoring requirements in the network change, the p4 runtime dynamically updates the guidance information in the guidance table built in the hardware switch and publishes the table entries 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: The types of the telemetry data include bandwidth, latency, inport, and outport.

3. The hardware switch matching action table cascading method for efficient network monitoring according to claim 1, characterized in that: In step 2, when a packet enters the egress pipeline of the hardware switch, it is first matched against 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, based on the guidance information, it is matched against the second-level execution table and the corresponding action is executed. The executed action includes the acquisition bandwidth, acquisition delay, acquisition ingress port, or acquisition egress port. The telemetry data encoding telemetry_index is an 8-bit number, ranging 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 action the data packet should take under 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 each telemetry data combination of the data packet; The telemetry data code telemetry_index, action guidance code action_index and priority guidance code priority_index are transferred 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 encoding telemetry_index, and performs mask matching on the action guidance encoding action_index at different positions according to different telemetry data encoding telemetry_index, to obtain a unique action assigned to the data packet.

4. The hardware switch matching action table cascading method for efficient network monitoring according to claim 1, characterized in that: In step 3, the process of updating the entries of the flow feature coding table in the guidance table is as follows: 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 codes 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