P4 assisted cloud eip gateway shared bandwidth traffic policing method and system

By detecting packet rate and configuring buffer fields in the P4 pipeline, the poor adaptability of P4 programmable devices is solved, resulting in lower packet loss rate and latency jitter, reduced user bandwidth costs, and improved communication quality.

CN118075219BActive Publication Date: 2025-11-04CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311701092.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2025-11-04
Estimated Expiration
2043-12-12

AI Technical Summary

Technical Problem

In existing technologies, when the shared bandwidth traffic management function of the EIP gateway is offloaded to the P4 programmable device, the adaptability is poor, resulting in high packet loss rate and large latency jitter during burst traffic, which increases the actual unit price of traffic used by users for shared bandwidth and reduces communication quality.

Method used

By detecting the packet rate in the P4 pipeline segment, configuring time interval fields, decrement buffer fields, elevation buffer fields, and coloring fields, and using virtual buffer registers for buffering, selective packet loss can be achieved, reducing burst traffic packet loss rate and latency jitter.

Benefits of technology

It reduces packet loss rate and latency jitter during bursts of traffic, lowers the actual unit price of traffic for shared bandwidth, and improves communication quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118075219B_ABST
    Figure CN118075219B_ABST
Patent Text Reader

Abstract

The application provides a P4-assisted cloud EIP gateway shared bandwidth flow monitoring method and system, relates to the field of cloud computing, and comprises the following steps: when a first data packet enters a first P4 flow water section, obtaining first data packet flow information and a first data packet rate according to a cloud EIP gateway; when being less than or equal to a preset peak bandwidth, setting a drop buffer field to 0 when a time interval field is equal to 1; when the time interval field is equal to 0, and when a first dye field is a first color, reducing the drop buffer field by one; when the time interval field is equal to 0, and when the first dye field is a second color, keeping the drop buffer field and a rise buffer field unchanged; and when the time interval field is equal to 0, and when the first dye field is a third color, increasing the rise buffer field by one. The technical problem that the existing technology usually directly discards overspeed data packets, thereby causing poor adaptability of unloading an EIP gateway shared bandwidth flow management function to a P4 programmable device is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud computing technology, specifically to a P4-assisted cloud EIP gateway shared bandwidth traffic monitoring method and system. Background Technology

[0002] Software-defined networking (SDN) is one of the core technologies of network virtualization. It divides the network into a control plane and a data plane, centralizing the network control plane. However, the increasing performance overhead of pure software leads to a decline in its practicality. Programmable dedicated switch chips (SDS) combine the high-performance advantages of fixed-function dedicated chips with the flexibility of NFV, offloading virtualized network functions to programmable switching chips and building a programmable data plane, becoming a new trend in cloud network development.

[0003] The P4 processor, a protocol-independent packet processor, can be reprogrammed, parsed with custom protocols, and execute custom functions. Therefore, P4 is widely used to describe the forwarding behavior of such programmable data planes. For cloud EIP gateway shared bandwidth traffic management applications, offloading the EIP gateway's shared bandwidth traffic management functions to a P4 programmable device shows considerable promise. However, due to the extremely limited on-chip storage resources of the P4 programmable device, it cannot provide a large buffer for general traffic shaping. The current solution is to directly discard overspeeding packets. While this strictly limits the rate of shared bandwidth packets, it leads to a high packet loss rate during bursts of traffic, large latency jitter, increases the actual unit cost of shared bandwidth usage for users, and reduces communication quality.

[0004] Existing technologies typically discard excessively fast data packets, leading to poor adaptability when offloading the EIP gateway's shared bandwidth traffic management function to P4 programmable devices. Summary of the Invention

[0005] This application provides a P4-assisted cloud EIP gateway shared bandwidth traffic monitoring method and system to address the technical problem that existing technologies often directly discard excessively fast data packets, resulting in poor adaptability when offloading the EIP gateway shared bandwidth traffic management function to P4 programmable devices.

[0006] In view of the above problems, this application provides a method and system for monitoring shared bandwidth traffic of a P4-assisted cloud EIP gateway.

[0007] The first aspect of this application provides a P4-assisted cloud EIP gateway shared bandwidth traffic monitoring method, comprising: when a first data packet enters a first P4 pipeline segment, obtaining the first data packet traffic information according to the cloud EIP gateway, inputting it into a speed meter for detection, and obtaining the first data packet rate; when the first data packet rate is less than or equal to a preset peak bandwidth, forwarding the first data packet to a P4 traffic manager and a second P4 pipeline segment, and obtaining a time interval field, a decrement buffer field, an increase buffer field, and a first coloring field; when the time interval field is equal to 1, setting the decrement buffer field to 0; when the time interval field is equal to 0 and the first coloring field is a first color, decrementing the decrement buffer field by one; when the time interval field is equal to 0 and the first coloring field is a second color, keeping the decrement buffer field and the increase buffer field unchanged; when the time interval field is equal to 0 and the first coloring field is a third color, incrementing the increase buffer field by one.

[0008] A second aspect of this application provides a P4-assisted cloud EIP gateway shared bandwidth traffic monitoring system, comprising: a first processing unit, configured to obtain first data packet traffic information from the cloud EIP gateway when a first data packet enters a first P4 pipeline segment, input the information to a speedometer for detection, and obtain the first data packet rate; a second processing unit, configured to forward the first data packet to a P4 traffic manager and a second P4 pipeline segment when the first data packet rate is less than or equal to a preset peak bandwidth, and obtain a time interval field, a decrement buffer field, an increase buffer field, and a first coloring field; a first execution unit, configured to set the decrement buffer field to 0 when the time interval field is equal to 1; a second execution unit, configured to decrement the decrement buffer field by one when the time interval field is equal to 0 and the first coloring field is a first color; a third execution unit, configured to keep the decrement buffer field and the increase buffer field unchanged when the time interval field is equal to 0 and the first coloring field is a second color; and a fourth execution unit, configured to increment the increase buffer field by one when the time interval field is equal to 0 and the first coloring field is a third color.

[0009] One or more technical solutions provided in this application have at least the following technical effects or advantages:

[0010] This application obtains the first data packet traffic information from the cloud EIP gateway when the first data packet enters the first P4 pipeline segment, inputs it to a speed meter for detection, and obtains the first data packet rate. When the first data packet rate is less than or equal to a preset peak bandwidth, the first data packet is forwarded to the P4 traffic manager and the second P4 pipeline segment, obtaining a time interval field, a drop buffer field, an increase buffer field, and a first coloring field. When the time interval field is equal to 1, the drop buffer field is set to 0. When the time interval field is equal to 0 and the first coloring field is the first color, the drop buffer field is decremented by one. When the time interval field is equal to 0 and the first coloring field is the second color, the drop buffer field is decremented by one. The technical solution involves keeping the decrement buffer field and the rise buffer field unchanged; when the time interval field is equal to 0 and the first coloring field is the third color, the rise buffer field is incremented by one. This solution obtains the time interval field, decrement buffer field, rise buffer field, and first coloring field configured on the P4 traffic manager and the second P4 pipeline by determining that the rate of the first data packet is less than or equal to the preset peak bandwidth. According to a specific partitioning rule, data packets are selected and buffered in a virtual buffer register. Compared with the direct packet loss method, this solution achieves the technical effects of reducing the packet loss rate of burst traffic, reducing latency jitter, lowering the actual unit price of traffic used by users in sharing bandwidth, and improving communication quality. Attached Figure Description

[0011] Figure 1 A schematic diagram of the P4-assisted cloud EIP gateway shared bandwidth traffic monitoring method provided in this application;

[0012] Figure 2 A flowchart illustrating the process of segmenting the speedometer in the P4-assisted cloud EIP gateway shared bandwidth traffic monitoring method provided in this application;

[0013] Figure 3 A schematic diagram of the structure of the pipeline processing module obtained in the P4-assisted cloud EIP gateway shared bandwidth traffic monitoring method provided in this application;

[0014] Figure 4 A schematic diagram of the structure of the P4-assisted cloud EIP gateway shared bandwidth traffic monitoring system provided in this application.

[0015] Explanation of reference numerals in the attached drawings: First processing unit 100, second processing unit 200, first execution unit 300, second execution unit 400, third execution unit 500, fourth execution unit 600. Detailed Implementation

[0016] This application provides a P4-assisted cloud EIP gateway shared bandwidth traffic monitoring method and system to address the problem of existing technologies that directly discard excessively fast data packets. While this approach strictly limits the rate of shared bandwidth packets, it leads to a high packet loss rate during bursts of traffic, large latency jitter, increased actual traffic cost per unit of shared bandwidth usage, and reduced communication quality. This also results in poor adaptability when offloading the EIP gateway's shared bandwidth traffic management function to a P4 programmable device. By determining that the rate of the first data packet is less than or equal to a preset peak bandwidth, the application obtains the time interval field, down buffer field, up buffer field, and first coloring field configured on the P4 traffic manager and the second P4 pipeline. According to specific partitioning rules, data packets are selected and buffered in a virtual buffer register. Compared to direct packet loss, this method achieves the technical effects of reducing the high packet loss rate during bursts of traffic, minimizing latency jitter, reducing the actual traffic cost per unit of shared bandwidth usage, and improving communication quality.

[0017] Example 1

[0018] like Figure 1 As shown, this application provides a P4-assisted cloud EIP gateway shared bandwidth traffic monitoring method, including the following steps:

[0019] In a preferred embodiment, before implementing shared bandwidth traffic policing for data packets of the P4 programmable device, a P4-assisted cloud EIP gateway shared bandwidth traffic policing module needs to be configured to implement P4-assisted cloud EIP gateway shared bandwidth traffic policing. The detailed process is as follows:

[0020] Furthermore, when the first data packet enters the first P4 pipeline segment, the traffic information of the first data packet is obtained from the cloud EIP gateway, input into the speed meter for detection, and the rate of the first data packet is obtained. This process also includes:

[0021] In the programmable data plane, configure a timestamp recording register, a subdivision speedometer, a priority table, a priority probability table, and n packet loss limit capacities;

[0022] Configure the time interval field, coloring field, rise buffer field, and fall buffer field for the P4 pipeline packet header;

[0023] Configure the upper limit of the interval between adjacent data packets, and set it as the time interval duration threshold;

[0024] The time interval field is used to process the output value of the timestamp record register in conjunction with the time interval duration threshold; the coloring field is used to store the output value of the subdivision speedometer; the rise buffer field is used to store the output value of the priority table; and the fall buffer field is used to store the output value of the priority probability table.

[0025] In a preferred embodiment, the programmable data plane is configured with a timestamp recording register, a subdivision velocimeter, a priority table, a priority probability table, and n packet loss limits. The timestamp recording register is used to record the time when data packets enter and leave the cloud EIP gateway, the time interval between different data packets passing through the P4 pipeline, and other preset time data components. Preferably, a timestamp processing table is constructed based on the recorded value of the timestamp recording register.

[0026] like Figure 2 As shown, a segmentation velocimeter is a functional component used to measure and classify the rate of data packet traffic. For example, a cloud EIP gateway is tested using a velocimeter to obtain the peak information rate, which is then set as the shared bandwidth rate limit for the cloud EIP gateway. A preset agreed-upon information rate is set as the segmentation detection rate, where the root node of the tree represents the rate interval [0, B], where B is the maximum allowed bandwidth of the link. c This refers to the rate limit of the EIP bandwidth packet, which is the aforementioned agreed information rate. B0 is the user-preset rate threshold; allocating a dual-rate three-color token bucket speed meter resource at the root node of the tree can further subdivide the interval [0, B] into [0, B0], [B0, B... c ], [B c The three intervals [B0, B0] constitute the left, middle, and right child leaf nodes. Different speed measurement results are colored according to the dual-rate three-color token bucket speedometer resources. For example: when the speedometer measures a green speed, it enters the left child leaf node [0, B0]; if it measures a yellow speed, it enters the middle child leaf node [B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B1, B1, B1, B2 ...2, B1, B2, B2, B2, B3, B4, B5, B6, B7, B8, B9, B1, B1, B1, B2, B1, B2, B1, B2, B1, B c If it is red, then proceed to the right child node [B]. c [B]. A fine-grained velocimeter is used to subdivide and color data packet flow rates, facilitating packet classification and processing.

[0027] The priority table is used to analyze the priority parameters of packets matched in a given virtual buffer register. The priority probability table is used to analyze the probability of the packet buffer being cleared; the higher the packet priority, the higher the probability of the buffer being cleared. The maximum capacity for n packet loss refers to the maximum capacity of the virtual buffer register.

[0028] Specifically, the configuration process for a timestamp recording register, a subdivision speedometer, a priority table, a priority probability table, and n packet loss limit capacities is as follows:

[0029] Furthermore, in the programmable data plane, a timestamp recording register, a subdivision velocimeter, a priority table, a priority probability table, and n packet loss limit capacities are configured, including:

[0030] In the programmable data plane, n virtual buffer registers are configured for the shared bandwidth packet of the cloud EIP gateway, wherein the n virtual buffer registers have n priority tags and n limit capacity tags;

[0031] Construct a priority table based on the n priority labels;

[0032] Based on the n priority tags and combined with the pseudo-random number generator, a priority probability table is configured, where the priority probability represents the probability of clearing the cache for different priorities. The higher the priority, the greater the priority probability.

[0033] Configure n packet loss limits for the n virtual buffer registers based on the n limit capacity labels;

[0034] Configure a subdivision velocimeter, which is used to monitor the flow rate within the production line;

[0035] Configure a timestamp recording register, which is used to record the arrival timestamp of data packets.

[0036] In a preferred embodiment, in the programmable data plane, n virtual buffer registers are configured for each cloud EIP gateway sharing bandwidth packets. These n virtual buffer registers have n priority tags and n limit capacity tags. The n priority tags are determined based on the service traffic volume of the n virtual buffer registers; the higher the service traffic, the larger the priority tag, and vice versa. The n limit capacity tags represent the maximum capacity of the n virtual buffer registers. The limit capacity refers to the maximum number of data elements the buffer can hold.

[0037] Furthermore, based on the n priority tags, a priority table is constructed for analyzing the traffic size of data packets and then assigning priorities. Preferably, the n priority tags of the priority table are marked in the diffserv field of the IP header. The diffserv field is deployed in the IP header to implement the priority assignment of data packets.

[0038] Furthermore, based on the n priority tags and combined with the pseudo-random number generator, a priority probability table is configured, where the priority probability represents the cache clearing probability of different priorities. The higher the priority, the greater the priority probability. The pseudo-random number generator is used to generate the priority probability, and its generation principle is: the higher the priority, the greater the priority probability.

[0039] Furthermore, a segmented velocimeter is configured to monitor the flow rate within the pipeline. The detailed process has been described above. A timestamp recording register is configured to record the timestamps of data packets arriving at the pipeline.

[0040] Furthermore, the detailed process for configuring the time interval field, coloring field, rise buffer field, and fall buffer field in the P4 pipeline packet header is as follows:

[0041] Furthermore, configure the time interval field, coloring field, rise buffer field, and fall buffer field for the P4 pipeline packet header, including:

[0042] The time interval field has a length of 1 bit, the coloring field has a length of 2 bits, the ascending buffer field has a length of log2n bits, and the descending buffer field has a length of log2n bits.

[0043] Furthermore, it also includes: a time interval field used to analyze whether the time interval between the arrival timestamps of adjacent data packets in the P4 pipeline's Ingress and Egress has timed out, setting an upper limit for the arrival interval of adjacent data packets, preferably 30 seconds, i.e., the time interval duration threshold described later; when the time interval between the arrival timestamps of adjacent data packets is greater than the time interval duration threshold, the time interval field is set to 1; if the time interval between the arrival timestamps of adjacent data packets is less than or equal to the time interval duration threshold, the time interval field is set to 0. Preferably, in the IP header, the time interval field is characterized by hdr.tout1 or hdr.tout0, and its length is 1 bit. A coloring field is used to store the coloring results of the subdivision velocimeter. Different field identifiers correspond to different coloring results, and different field identifiers are custom-defined. Preferably, in the IP header, the coloring field is characterized by hdr.clr + a character. The ascending buffer field records the priority of the buffer used when overspeed data packets need to be cached, preferably represented by hdr.buf_id, where id represents the priority of the overspeed data packets to be cached. The descending buffer field records the priority of the buffer used when bandwidth utilization is insufficient and the buffer needs to be cleared, preferably represented by hdr.buf_id, where id represents the priority of the buffer that needs to be cleared due to insufficient bandwidth utilization. The length of the ascending buffer field is log2n bits, and the length of the descending buffer field is log2n bits.

[0044] Furthermore, in the P4 pipeline, either a SIP-EIP table or a DIP-EIP table is configured. The SIP-EIP table is used to determine the EIP gateway based on the gateway outbound traffic of data packets and the source IP in the SIP-EIP table. The DIP-EIP table is used to determine the inbound EIP gateway based on the gateway inbound traffic of data packets and the source IP in the DIP-EIP table. This allows for the identification of the EIP gateway that needs to be speed tested.

[0045] In summary, as Figure 3As shown, the P4 pipeline is configured with a timestamp processing table, a priority table, a priority probability table, a SIP-EIP table or a DIP-EIP table, a peak bandwidth velocimeter, and a segmentation velocimeter, enabling pre-identification of data packets. Among these, R... t The timestamp identifier is used, P is the priority probability, and M1~M n Let R1 be the maximum capacity of n buffers, and R2 be the maximum capacity of n buffers. n Represents n virtual buffer registers.

[0046] S10: When the first data packet enters the first P4 pipeline segment, the first data packet traffic information is obtained according to the cloud EIP gateway, and the data packet rate is obtained by inputting it into the speed meter for detection.

[0047] In a preferred embodiment, when the first P4 pipeline receives the first data packet, the matching cloud EIP gateway is determined using the SIP-EIP table or DIP-EIP table, the peak bandwidth of the cloud EIP gateway is obtained, and the first data packet traffic information of the first data packet is extracted. The peak bandwidth of the cloud EIP gateway is preferably twice the EIP shared bandwidth rate limit. The first data packet traffic information is measured using a peak broadband speed meter to obtain the first data packet rate, which characterizes the flow rate of the first data packet.

[0048] S20: When the rate of the first data packet is less than or equal to the preset peak bandwidth, forward the first data packet to the P4 traffic manager and the second P4 pipeline segment to obtain the time interval field, the down buffer field, the up buffer field and the first coloring field;

[0049] Furthermore, when the rate of the first data packet is less than or equal to the preset peak bandwidth, the first data packet is forwarded to the P4 traffic manager and the second P4 pipeline segment to obtain the time interval field, the down buffer field, the up buffer field, and the first coloring field, including:

[0050] Obtain the first data packet timestamp identifier of the first data packet;

[0051] Input the timestamp identifier of the first data packet into the timestamp processing table to generate the first timestamp record register value;

[0052] Configure the time interval field based on the value recorded in the first timestamp record register;

[0053] According to the priority table, match the first priority field of the first data packet, wherein the first priority field is the up buffer field;

[0054] Based on the result of the pseudo-random number generator, match the second priority field of the first data packet in the priority probability table, wherein the first priority field is a decremented buffer field;

[0055] Based on the subdivision speed meter, the rate of the first data packet is colored to obtain the first colored field.

[0056] In a preferred embodiment, when the rate of the first data packet is greater than the preset peak bandwidth, i.e., the peak bandwidth in step S10, the data packet is discarded. Figure 3 As shown, whenever an EIP gateway accesses the P4 pipeline, an overspeed packet drop table is constructed based on a preset peak bandwidth. This enables the decision of whether to drop overspeed packets. If the rate of the first data packet is less than or equal to the preset peak bandwidth, it is not dropped. At this time, based on the timestamp processing table, priority table, priority probability table, and subdivision speed meter, the time interval field, decrement buffer field, ascend buffer field, and first coloring field are determined.

[0057] S30: When the time interval field is equal to 1, set the decrement buffer field to 0;

[0058] S40: When the time interval field is equal to 0, and when the first coloring field is the first color, decrement the drop buffer field by one;

[0059] S50: When the time interval field is equal to 0, and when the first coloring field is the second color, the falling buffer field and the rising buffer field remain unchanged;

[0060] S60: When the time interval field is equal to 0, and when the first coloring field is the third color, increment the rise buffer field by one.

[0061] In a preferred embodiment, the buffer update table is configured with processing rules for the time interval field, the descending buffer field, the ascending buffer field, and the first coloring field, as detailed below:

[0062] When the time interval field equals 1, the decrement buffer field is set to 0. This indicates that the arrival timestamp of an adjacent data packet has timed out, and the virtual buffer corresponding to the EIP needs to be cleared, with its size set to 0. When the time interval field equals 0, and when the first coloring field is the first color, when... Figure 2 In the example where the first color is green, the decrement buffer field is decremented by one, ensuring it is non-negative; when the time interval field is equal to 0, and when the first coloring field is the second color, when... Figure 2 In the example where the second color is yellow, the descending buffer field and the ascending buffer field remain unchanged; when the time interval field is equal to 0, and when the first coloring field is the third color, when... Figure 2 In the example where the third color is red, the increment buffer field is incremented by one.

[0063] This application embodiment transforms underutilized P4 switch bandwidth resources into virtual buffer resources, defines their priority and size in software, implements EIP traffic control within the pipeline, achieves selective packet loss, reduces packet loss rate and jitter under burst traffic, and reduces the actual unit price of traffic used by users' EIP shared bandwidth.

[0064] Furthermore, based on the value recorded in the first timestamp record register, a time interval field is configured, including:

[0065] Configure the time interval duration threshold and backtrack the first time identifier, wherein the first time identifier is the timestamp register value recorded by the previous data packet entering the pipeline;

[0066] Calculate the first time difference between the value recorded in the first timestamp record register and the first time identifier;

[0067] When the first time difference is greater than the time interval duration threshold, the time interval field is configured to 1;

[0068] When the first time difference is less than or equal to the time interval duration threshold, the time interval field is configured to 0.

[0069] In a preferred embodiment, the processing rules for the timestamp processing table are as follows:

[0070] Configure a time interval threshold, which is the timeout threshold for adjacent data packets passing through the P4 pipeline, and backtrack the first time identifier, where the first time identifier is the timestamp register record value of the previous data packet entering the pipeline; calculate the time interval between the first timestamp record register record value of the current data packet entering the pipeline and the first time identifier to obtain the first time difference; when the first time difference is greater than the time interval threshold, configure the time interval field to 1, and when the first time difference is less than or equal to the time interval threshold, configure the time interval field to 0.

[0071] Furthermore, it also includes:

[0072] The first data packet is discarded when the time interval field is equal to 0, the first coloring field is the third color, and the rise buffer field is greater than the corresponding packet loss buffer limit capacity.

[0073] In a preferred embodiment, such as Figure 3 As shown, the P4 pipeline is also configured with a buffer overflow packet discard table, and its execution rules are as follows: when the time interval field is equal to 0, when the first coloring field is the third color, and when the rise buffer field is greater than the corresponding packet loss buffer limit capacity, the first data packet is discarded.

[0074] Furthermore, it also includes:

[0075] If the rate of the first data packet is greater than the preset peak bandwidth, the first data packet is discarded.

[0076] In a preferred embodiment, such as Figure 3 As shown, the P4 pipeline is also equipped with an overspeed packet drop table, and its execution rule is as follows: when the rate of the first data packet is greater than the preset peak bandwidth, the first data packet is dropped.

[0077] In summary, the embodiments of this application have at least the following technical effects:

[0078] The P4-assisted cloud EIP gateway shared bandwidth traffic monitoring method provided in this application obtains the time interval field, down buffer field, up buffer field, and first coloring field configured on the P4 traffic manager and the second P4 pipeline by obtaining the first data packet rate being less than or equal to the preset peak bandwidth. According to a specific partitioning rule, the data packets are selected and buffered by a virtual buffer register. Compared with the direct packet loss method, this method achieves the technical effects of reducing the packet loss rate of burst traffic, reducing latency jitter, reducing the actual traffic unit price of users using shared bandwidth, and improving communication quality.

[0079] Example 2

[0080] Based on the same inventive concept as the P4-assisted cloud EIP gateway shared bandwidth traffic monitoring method in the aforementioned embodiments, such as Figure 4 As shown, this application provides a P4-assisted cloud EIP gateway shared bandwidth traffic monitoring system, including:

[0081] The first processing unit 100 is used to obtain the first data packet traffic information according to the cloud EIP gateway when the first data packet enters the first P4 pipeline segment, input it into the speed meter for detection, and obtain the first data packet rate.

[0082] The second processing unit 200 is used to forward the first data packet to the P4 traffic manager and the second P4 pipeline segment when the rate of the first data packet is less than or equal to the preset peak bandwidth, and to obtain the time interval field, the decrement buffer field, the rise buffer field and the first coloring field.

[0083] The first execution unit 300 is configured to set the decrement buffer field to 0 when the time interval field is equal to 1;

[0084] The second execution unit 400 is used to decrement the down buffer field by one when the time interval field is equal to 0 and when the first coloring field is the first color.

[0085] The third execution unit 500 is configured to keep the descending buffer field and the ascending buffer field unchanged when the time interval field is equal to 0 and when the first coloring field is the second color;

[0086] The fourth execution unit 600 is used to increment the rise buffer field by one when the time interval field is equal to 0 and when the first coloring field is the third color.

[0087] Furthermore, the second processing unit 200 performs the following steps:

[0088] Obtain the first data packet timestamp identifier of the first data packet;

[0089] Input the timestamp identifier of the first data packet into the timestamp processing table to generate the first timestamp record register value;

[0090] Configure the time interval field based on the value recorded in the first timestamp record register;

[0091] According to the priority table, match the first priority field of the first data packet, wherein the first priority field is the up buffer field;

[0092] Based on the result of the pseudo-random number generator, match the second priority field of the first data packet in the priority probability table, wherein the first priority field is a decremented buffer field;

[0093] Based on the subdivision speed meter, the rate of the first data packet is colored to obtain the first colored field.

[0094] Furthermore, the second processing unit 200 performs the following steps:

[0095] Configure the time interval duration threshold and backtrack the first time identifier, wherein the first time identifier is the timestamp register value recorded by the previous data packet entering the pipeline;

[0096] Calculate the first time difference between the value recorded in the first timestamp record register and the first time identifier;

[0097] When the first time difference is greater than the time interval duration threshold, the time interval field is configured to 1;

[0098] When the first time difference is less than or equal to the time interval duration threshold, the time interval field is configured to 0.

[0099] Furthermore, the fourth execution unit 600 execution steps also include:

[0100] The first data packet is discarded when the time interval field is equal to 0, the first coloring field is the third color, and the rise buffer field is greater than the corresponding packet loss buffer limit capacity.

[0101] Furthermore, the second processing unit 200 also includes the following steps:

[0102] If the rate of the first data packet is greater than the preset peak bandwidth, the first data packet is discarded.

[0103] Furthermore, the first processing unit 100 also includes the following steps:

[0104] In the programmable data plane, configure a timestamp recording register, a subdivision speedometer, a priority table, a priority probability table, and n packet loss limit capacities;

[0105] Configure the time interval field, coloring field, rise buffer field, and fall buffer field for the P4 pipeline packet header;

[0106] Configure the upper limit of the interval between adjacent data packets, and set it as the time interval duration threshold;

[0107] The time interval field is used to process the output value of the timestamp record register in conjunction with the time interval duration threshold; the coloring field is used to store the output value of the subdivision speedometer; the rise buffer field is used to store the output value of the priority table; and the fall buffer field is used to store the output value of the priority probability table.

[0108] Furthermore, the first processing unit 100 also includes the following steps:

[0109] In the programmable data plane, n virtual buffer registers are configured for the shared bandwidth packet of the cloud EIP gateway, wherein the n virtual buffer registers have n priority tags and n limit capacity tags;

[0110] Construct a priority table based on the n priority labels;

[0111] Based on the n priority tags and combined with the pseudo-random number generator, a priority probability table is configured, where the priority probability represents the probability of clearing the cache for different priorities. The higher the priority, the greater the priority probability.

[0112] Configure n packet loss limits for the n virtual buffer registers based on the n limit capacity labels;

[0113] Configure a subdivision velocimeter, which is used to monitor the flow rate within the production line;

[0114] Configure a timestamp recording register, which is used to record the arrival timestamp of data packets.

[0115] Furthermore, the second processing unit 200 also includes the following steps:

[0116] The time interval field has a length of 1 bit, the coloring field has a length of 2 bits, the ascending buffer field has a length of log2n bits, and the descending buffer field has a length of log2n bits.

[0117] Furthermore, the second processing unit 200 also includes the following steps:

[0118] The up buffer field is used to record the priority of the buffer used when it is necessary to cache overspeed data packets, and the down buffer field is used to record the priority of the buffer used when bandwidth utilization is insufficient and the buffer needs to be cleared.

[0119] This specification and accompanying drawings are merely illustrative examples of this application and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from its scope. Therefore, if such modifications and modifications fall within the scope of this application and its equivalents, this application intends to include such modifications and modifications.

Claims

1. A P4-assisted cloud EIP gateway shared bandwidth traffic monitoring method, characterized in that, include: When the first data packet enters the first P4 pipeline segment, the traffic information of the first data packet is obtained from the cloud EIP gateway, and then input into the speed meter for detection to obtain the rate of the first data packet. When the rate of the first data packet is less than or equal to the preset peak bandwidth, the first data packet is forwarded to the P4 traffic manager and the second P4 pipeline to obtain the time interval field, the decrement buffer field, the rise buffer field and the first coloring field. When the time interval field is equal to 1, the decrement buffer field is set to 0; When the time interval field is equal to 0, and when the first coloring field is the first color, the decrement buffer field is decremented by one; When the time interval field is equal to 0, and when the first coloring field is the second color, the descending buffer field and the ascending buffer field remain unchanged; When the time interval field is equal to 0, and when the first coloring field is the third color, increment the rise buffer field by one.

2. The method as described in claim 1, characterized in that, When the rate of the first data packet is less than or equal to the preset peak bandwidth, the first data packet is forwarded to the P4 traffic manager and the second P4 pipeline segment, obtaining the time interval field, the decrement buffer field, the increment buffer field, and the first coloring field, including: Obtain the first data packet timestamp identifier of the first data packet; Input the timestamp identifier of the first data packet into the timestamp processing table to generate the first timestamp record register value; Configure the time interval field based on the value recorded in the first timestamp record register; According to the priority table, match the first priority field of the first data packet, wherein the first priority field is the up buffer field; Based on the result of the pseudo-random number generator, match the second priority field of the first data packet in the priority probability table, wherein the first priority field is a decremented buffer field; Based on the subdivision speed meter, the rate of the first data packet is colored to obtain the first colored field.

3. The method as described in claim 2, characterized in that, Based on the value recorded in the first timestamp record register, configure the time interval field, including: Configure the time interval duration threshold and backtrack the first time identifier, wherein the first time identifier is the timestamp register value recorded by the previous data packet entering the pipeline; Calculate the first time difference between the value recorded in the first timestamp record register and the first time identifier; When the first time difference is greater than the time interval duration threshold, the time interval field is configured to 1; When the first time difference is less than or equal to the time interval duration threshold, the time interval field is configured to 0.

4. The method as described in claim 1, characterized in that, Also includes: The first data packet is discarded when the time interval field is equal to 0, the first coloring field is the third color, and the rise buffer field is greater than the corresponding packet loss buffer limit capacity.

5. The method as described in claim 1, characterized in that, Also includes: If the rate of the first data packet is greater than the preset peak bandwidth, the first data packet is discarded.

6. The method as described in claim 1, characterized in that, When the first data packet enters the first P4 pipeline segment, the traffic information of the first data packet is obtained from the cloud EIP gateway, input into the speedometer for detection, and the rate of the first data packet is obtained. This process also includes: In the programmable data plane, configure a timestamp recording register, a subdivision speedometer, a priority table, a priority probability table, and n packet loss limit capacities; Configure the time interval field, coloring field, rise buffer field, and fall buffer field for the P4 pipeline packet header; Configure the upper limit of the interval between adjacent data packets, and set it as the time interval duration threshold; The time interval field is used to process the output value of the timestamp record register in conjunction with the time interval duration threshold; the coloring field is used to store the output value of the subdivision speedometer; the rise buffer field is used to store the output value of the priority table; and the fall buffer field is used to store the output value of the priority probability table.

7. The method as described in claim 6, characterized in that, In the programmable data plane, configure a timestamp recording register, a subdivision velocimeter, a priority table, a priority probability table, and n packet loss limit capacities, including: In the programmable data plane, n virtual buffer registers are configured for the shared bandwidth packet of the cloud EIP gateway, wherein the n virtual buffer registers have n priority tags and n limit capacity tags; Construct a priority table based on the n priority labels; Based on the n priority tags and combined with the pseudo-random number generator, a priority probability table is configured, where the priority probability represents the probability of clearing the cache for different priorities. The higher the priority, the greater the priority probability. Configure n packet loss limits for the n virtual buffer registers based on the n limit capacity labels; Configure a subdivision velocimeter, which is used to monitor the flow rate within the production line; Configure a timestamp recording register, which is used to record the arrival timestamp of data packets.

8. The method as described in claim 2, characterized in that, Configure the time interval field, coloring field, rise buffer field, and fall buffer field for the P4 pipeline packet header, including: The time interval field has a length of 1 bit, the coloring field has a length of 2 bits, the ascending buffer field has a length of log2 n bits, and the descending buffer field has a length of log2 n bits.

9. The method as described in claim 1, characterized in that, Also includes: The "Upward Buffer" field records the priority of the buffer used when overspeed data packets need to be cached, while the "Downward Buffer" field records the priority of the buffer used when bandwidth utilization is insufficient and the buffer needs to be cleared.

10. A P4-assisted cloud EIP gateway shared bandwidth traffic monitoring system, characterized in that, include: The first processing unit is used to obtain the first data packet traffic information from the cloud EIP gateway when the first data packet enters the first P4 pipeline segment, input the information into the speed meter for detection, and obtain the rate of the first data packet. The second processing unit is used to forward the first data packet to the P4 traffic manager and the second P4 pipeline when the rate of the first data packet is less than or equal to the preset peak bandwidth, and to obtain the time interval field, the down buffer field, the up buffer field and the first coloring field. The first execution unit is configured to set the decrement buffer field to 0 when the time interval field is equal to 1; The second execution unit is configured to decrement the decrement buffer field by one when the time interval field is equal to 0 and when the first coloring field is the first color. The third execution unit is configured to keep the descending buffer field and the ascending buffer field unchanged when the time interval field is equal to 0 and when the first coloring field is the second color; The fourth execution unit is used to increment the rise buffer field by one when the time interval field is equal to 0 and when the first coloring field is the third color.

Citation Information

Patent Citations

  • Method and system for dividing last-level shared cache

    CN107577616A

  • Large-flow quintuple query method based on P4 programmable switch

    CN115967673A