Message processing methods, devices, switches, storage media and software products

By adding message operation types to analysis commands to generate access control list entries, the problem of insufficient ACL resources in NetAnalysis technology is solved, enabling more efficient calculation of network performance metrics.

CN119743452BActive Publication Date: 2025-10-28NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411959018.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-10-28
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

The existing NetAnalysis technology has insufficient resources when generating access control lists (ACLs), resulting in limited ACL resources for the driver chip to filter RoCEv2 packets, which cannot meet the requirements.

Method used

By adding message operation types to analysis commands, multiple access control list entries are generated, reducing the number of generated ACLs, filtering messages that match target characteristics and operation types, and avoiding resource shortages.

Benefits of technology

This effectively reduces the number of access control list entries generated, avoids resource shortages, and improves the efficiency of network performance metric calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119743452B_ABST
    Figure CN119743452B_ABST
Patent Text Reader

Abstract

This application proposes a packet processing method, apparatus, switch, storage medium, and program product, applied to a driver chip. The method includes: receiving an analysis instruction, the analysis instruction including a first target feature and a first target packet operation type; generating multiple access control list entries based on the first target feature and the first target packet operation type; filtering target packets from target traffic that match the first target feature and the first target packet operation type based on the multiple access control list entries; and sending the target packets to a processor, so that the processor determines the performance indicators of the network to which the target packets belong based on the target packets. The embodiments of this application, by adding packet operation types to the analysis instruction, can generate access control list entries based on the first target feature and the packet operation type, thereby reducing the number of generated access control list entries and avoiding the problem of insufficient access control list entry resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and more specifically, to a message processing method, apparatus, switch, storage medium, and program product. Background Technology

[0002] RoCEv2 (Remote Direct Memory Access over Converged Ethernet) utilizes Remote Direct Memory Access (RDMA) technology to achieve high-bandwidth, low-latency network communication, enabling applications in high-performance computing, distributed storage, and AI. By monitoring the RoCEv2 network status, network performance can be optimized, latency reduced, and throughput increased, which is crucial for these applications.

[0003] Currently, the driver chip of a switch can typically acquire RoCEv2 traffic from multiple clients and servers connected to the switch. Furthermore, NetAnalysis technology can be enabled on the switch, whereby the switch's processor sends analysis commands to the driver chip, enabling the driver chip to generate corresponding Access Control Lists (ACLs) based on the analysis commands. The processor can then filter out the corresponding RoCEv2 packets from the RoCEv2 traffic based on the ACLs and return them to the processor for analysis.

[0004] However, the NetAnalysis technology currently requires the generation of many ACLs, and the driver chip has limited ACL resources for filtering RoCEv2 packets, which may lead to insufficient ACL resources. Summary of the Invention

[0005] Based on the aforementioned technical deficiencies, this application proposes a message processing method, device, switch, storage medium, and program product, which can solve the problem that the current NetAnalysis technology requires the generation of a large number of ACLs, and the driver chip has limited ACL resources for filtering RoCEv2 messages, which may lead to insufficient ACL resources.

[0006] The first aspect of this application provides a message processing method applied to a driver chip, the method comprising:

[0007] The system receives an analysis instruction, which includes a first target characteristic and a first target message operation type; the first target message operation type is used to indicate the operation requested by the data message.

[0008] Based on the first target feature and the first target message operation type, multiple access control list entries are generated;

[0009] Based on the multiple access control list entries, target packets that match the first target feature and the first target packet operation type are filtered from the target traffic.

[0010] The target message is sent to the processor so that the processor can determine the performance metrics of the network to which the target message belongs based on the target message.

[0011] A second aspect of this application provides a message processing method applied to a processor, the method comprising:

[0012] In response to an analysis instruction including a first target feature and a first target message operation type, the analysis instruction is sent to the driver chip so that the driver chip generates multiple access control list entries based on the first target feature and the first target message operation type, wherein the first target message operation type is used to represent the operation requested by the data packet;

[0013] The driver chip receives a target message sent by the driver chip, wherein the target message is a message selected by the driver chip from the target traffic that matches the first target feature and the message operation type;

[0014] The performance metrics of the network to which the target message belongs are determined based on the target message.

[0015] A third aspect of this application provides a message processing apparatus for use in a driver chip, the apparatus comprising:

[0016] A receiving module is configured to receive an analysis instruction, the analysis instruction including a first target feature and a first target message operation type; the first target message operation type is used to indicate the operation requested by the data message.

[0017] The generation module is used to generate multiple access control list entries based on the first target characteristics and the first target message operation type;

[0018] The filtering module is used to filter target packets from the target traffic that match the first target feature and the first target packet operation type based on the plurality of access control list entries;

[0019] The sending module is used to send the target message to the processor, so that the processor can determine the performance indicators of the network to which the target message belongs based on the target message.

[0020] A fourth aspect of this application provides a message processing apparatus for use with a processor, the apparatus comprising:

[0021] The sending module is configured to send the analysis instruction to the driver chip in response to an analysis instruction including a first target feature and a first target message operation type, so that the driver chip generates multiple access control list entries based on the first target feature and the first target message operation type, wherein the first target message operation type is used to indicate the operation requested by the data packet;

[0022] A receiving module is configured to receive a target message sent by the driver chip, wherein the target message is a message selected by the driver chip from the target traffic that matches the first target feature and the message operation type;

[0023] The determination module is used to determine the performance indicators of the network to which the target packet belongs based on the target packet.

[0024] A fifth aspect of this application provides a switch, the switch comprising:

[0025] The processor is configured to respond to an analysis instruction including a first target feature and a first target message operation type by sending the analysis instruction to a driver chip, so that the driver chip generates multiple access control list entries based on the first target feature and the first target message operation type, wherein the first target message operation type is used to represent the operation requested by the data packet; receive a target message sent by the driver chip, wherein the target message is a message selected by the driver chip from target traffic that matches the first target feature and the message operation type; and determine the performance indicators of the network to which the target message belongs based on the target message;

[0026] The driver chip is used to receive analysis instructions, the analysis instructions including a first target feature and a first target packet operation type; generate multiple access control list entries based on the first target feature and the first target packet operation type; filter target packets from the target traffic that match the first target feature and the first target packet operation type based on the multiple access control list entries; and send the target packets to the processor so that the processor can determine the performance indicators of the network to which the target packets belong based on the target packets.

[0027] The sixth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, the program being executed by a driver chip to implement the method described in the first aspect, and the program being executed by a processor to implement the method described in the second aspect.

[0028] The seventh aspect of this application provides a computer program product, including a computer program that is executed by a driver chip to implement the method described in the first aspect, and that is executed by a processor to implement the method described in the second aspect.

[0029] The beneficial effects of this application include at least the following:

[0030] This application embodiment adds message operation types to the analysis instructions, thereby generating access control list entries based on the first target feature and the message operation type. This reduces the number of generated access control list entries by adding operation types, thus avoiding the problem of insufficient access control list entry resources. Attached Figure Description

[0031] The accompanying drawings, which form part of this specification, illustrate embodiments of this application and, together with the description, serve to explain the principles of this application.

[0032] This application can be more clearly understood with reference to the accompanying drawings and the following detailed description, wherein:

[0033] Figure 1 This illustration shows a scenario diagram of a message processing method provided by an exemplary embodiment of this application;

[0034] Figure 2 This illustration shows a scenario diagram of another message processing method provided by an exemplary embodiment of this application;

[0035] Figure 3 This illustration shows a scenario diagram of another message processing method provided by an exemplary embodiment of this application;

[0036] Figure 4 This illustration shows a scenario diagram of another message processing method provided by an exemplary embodiment of this application;

[0037] Figure 5 This illustration shows a schematic diagram of the structure of a message processing apparatus provided in an exemplary embodiment of this application;

[0038] Figure 6 This invention provides a schematic diagram of the structure of another message processing apparatus according to an exemplary embodiment of the present application.

[0039] Figure 7 A schematic diagram of a storage medium provided in an exemplary embodiment of this application is shown. Detailed Implementation

[0040] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application. It will be apparent to those skilled in the art that this application can be implemented without one or more of these details. In other instances, some technical features well-known in the art have not been described to avoid confusion with this application.

[0041] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of the stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or combinations thereof.

[0042] Exemplary embodiments according to this application will now be described in more detail with reference to the accompanying drawings. However, these exemplary embodiments may be implemented in many different forms and should not be construed as being limited to the embodiments set forth herein. The drawings are not drawn to scale, and some details may be enlarged and omitted for clarity. The shapes of the various regions and layers shown in the figures, as well as their relative sizes and positional relationships, are merely exemplary and may deviate from reality due to manufacturing tolerances or technical limitations. Furthermore, those skilled in the art can design regions / layers with different shapes, sizes, and relative positions as needed.

[0043] Exemplary embodiments according to this application are described below. It should be noted that the following embodiments are shown only to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way. Rather, the embodiments of this application can be applied to any applicable scenario.

[0044] Building upon the aforementioned background technologies, intelligent traffic monitoring and analysis of RoCEv2 traffic using NetAnalysis technology can currently achieve the following:

[0045] 1. Users can enable packet statistics and packet loss statistics functions of NetAnalysis technology via command line or Netconf: netanalysis rocev2 statistics acl / global and netanalysis rocev2drop global;

[0046] 2. The platform notifies the driver chip to send protocol ACLs that match the Opera and ack / Oper / Control Message (CM) / Negative Acknowledgment (NAK) / Acknowledgment (ACK) types. Among them, the data packets of the Opera and ack type ACL are sent to the platform in full, and the data packets of the Opera type ACL are sent by sampling.

[0047] 3. Start a timer with a 10.5-second cycle. During the first 10 seconds, all Operandack type ACLs remain disabled. Packets matching Opera type ACLs are sampled and sent to the platform for throughput calculation. After 10 seconds, the timer refreshes all Operandack type ACLs to the normal state and maintains this state for 500 milliseconds. Packets matching Operandack type ACLs are sent to the platform in full for latency, throughput, and packet loss calculation.

[0048] 4. After the 500-millisecond timer expires, all normal Operandack type ACLs will be changed to disabled status, and the next timer cycle will begin.

[0049] 5. Continuously execute steps 3 to 4. The calculated latency / throughput / packet loss information can only be viewed on the device via command line.

[0050] In this method, the driver chip generates not only CM / NAK / ACK protocol ACLs, but also Opera and ACK type ACLs that match all RoCEv2 data packets. It does not distinguish the operation type of the incoming RoCEv2 packets, resulting in a large number of ACLs. However, the driver chip has limited ACL resources for filtering RoCEv2 packets, which may lead to insufficient ACL resources.

[0051] To address the aforementioned technical problems, this application proposes a message processing method, apparatus, switch, storage medium, and program product, applied to a driver chip. The method includes: receiving an analysis instruction, the analysis instruction including a first target feature and a first target message operation type; the first target message operation type representing the operation requested by the data packet; generating multiple access control list entries based on the first target feature and the first target message operation type; filtering target packets from target traffic that match the first target feature and the first target message operation type based on the multiple access control list entries; and sending the target packets to a processor, so that the processor determines the performance indicators of the network to which the target packets belong based on the target packets. This application's embodiment, by adding message operation types to the analysis instruction, can generate access control list entries based on the first target feature and the message operation type, thereby reducing the number of generated access control list entries and avoiding the problem of insufficient access control list entry resources.

[0052] First, the implementation scenarios of the above message processing methods will be explained, such as... Figure 1 As shown, the scenario includes a switch, multiple clients: client 1, client 2... client n, and multiple servers: server 1, server 2... server n.

[0053] The corresponding client and server transmit data through a switch.

[0054] A switch includes a controller, processor, driver chip, and analyzer.

[0055] The processor is used to respond to an analysis instruction including a first target characteristic and a message operation type, and send the analysis instruction to the driver chip so that the driver chip generates multiple access control list entries based on the first target characteristic and the message operation type, whereby the message operation type indicates the operation requested by the data packet; receive a target packet sent by the driver chip, whereby the target packet is a packet that the driver chip has filtered from the target traffic that matches the first target characteristic and the message operation type; and determine the performance indicators of the network to which the target packet belongs based on the target packet.

[0056] The driver chip is used to receive analysis instructions, which include a first target feature and a message operation type; generate multiple access control list entries based on the first target feature and the message operation type; filter target messages from the target traffic that match the first target feature and the first target message operation type based on the multiple access control list entries; and send the target message to the processor so that the processor can determine the performance indicators of the network to which the target message belongs based on the target message.

[0057] The driver chip can continuously acquire RoCEv2 packets transmitted from multiple clients and multiple servers to combine them into target traffic.

[0058] The processor is also used to send the calculated performance metrics to the analyzer so that the analyzer can output the performance metrics in real time.

[0059] This application first describes the packet processing method using a driver chip as the execution entity. The driver chip can be used to acquire RoCEv2 packets from multiple clients and servers, combine the RoCEv2 packets into target traffic, and generate corresponding ACLs to filter the corresponding packets.

[0060] See Figure 2 The method includes the following steps.

[0061] S201, Receive analysis command.

[0062] The analysis instructions include the first target characteristics and the first target message operation type.

[0063] The message operation type is used to indicate the operation requested by the data message.

[0064] The analysis command is used to analyze RoCEv2 packets that match the first target characteristics and packet operation type of the target traffic. RoCEv2 packets include data packets, and each data packet corresponds to a packet operation type, which includes Send, Write, and Read.

[0065] In this context, a message operation type of Read indicates that one end (usually a client) requests to read specified data from another end (usually a server). A message operation type of Write indicates a request to write data directly into the memory of the remote host. A message operation type of Send indicates that the sender is allowed to send data directly from the sender's memory to the receiver's memory.

[0066] The first target message operation type can be one or more of all message operation types corresponding to the data message, but the number of first target message operation types is less than the number of all message operation types corresponding to the data message, thereby achieving the effect of generating fewer access control list entries based on the first target characteristics and message operation types.

[0067] S202. Based on the first target characteristics and the first target message operation type, generate multiple access control entries.

[0068] The access control list entry can be an ACL.

[0069] An Access Control List (ACL) is a rule-based access control mechanism that allows network administrators to define which users or systems are allowed to access specific resources on the network. These rules are typically based on information such as IP address, port number, and protocol type. When a data packet passes through the network, the ACL checks these rules to determine whether the packet is allowed to pass.

[0070] The first target feature may include opcode, source IP, destination IP, source queue pair, destination queue pair, etc.

[0071] Each ACL includes matching conditions and actions. Matching conditions can be determined based on a first target characteristic and a first target packet operation type. For example, if the first target characteristic and the first target data type are source IP1 and destination IP1 respectively, and the first target packet operation type is Send, then the matching conditions could be to match packets with source IP1, destination IP1, and packet operation type Send. The action to be performed can be to allow or block the passage.

[0072] The opcode can be used to filter bidirectional or unidirectional data packets. The data packets include Send / Write / Read packets. The first target packet operation type can be used to filter at least one of Send / Write / Read packets.

[0073] Compared to related technologies that generate ACL entries for each message operation type, this application reduces the number of generated ACLs by determining the message operation types to be filtered in the first target message operation type, thus avoiding insufficient ACL resources.

[0074] For example, if the characteristics of the analysis instruction in the related technology are source IP1 and destination IP1, then the driver chip will generate three ACL entries: one with source IP1 and destination IP1 and message operation type Send, another with source IP1 and destination IP1 and message operation type Write, and yet another with source IP1 and destination IP1 and message operation type Read.

[0075] The first target feature in the analysis instruction of this application is source IP1, destination IP1, and the first target message operation type is Read. Then the driver chip will generate an ACL for source IP1 and destination IP1 with message operation type Read, i.e., one ACL entry, which reduces the number of ACL entries generated by the driver chip.

[0076] S203. Based on multiple access control list entries, filter target packets from the target traffic that match the first target feature and the first target packet operation type.

[0077] S204. Send the target message to the processor so that the processor can determine the performance indicators of the network to which the target message belongs based on the target message.

[0078] The target traffic consists of RoCEv2 packets sent by multiple clients and servers, acquired by the driver chip. However, the analysis instructions include a first target feature and a first target packet operation type, indicating that the user may only be concerned with the RoCEv2 packets corresponding to the first target feature and the first target packet operation type. Therefore, the driver chip needs to send the target packets corresponding to the first target feature and the first target packet operation type to the processor, and the processor determines the performance indicators of the network to which the target packets belong based on the target packets.

[0079] Performance metrics can include throughput, latency, and packet loss, among others.

[0080] This application proposes a message processing method applied to a driver chip. The method includes: receiving an analysis instruction, the analysis instruction including a first target feature and a first target message operation type; the first target message operation type representing the operation requested by the data message; generating multiple access control list entries based on the first target feature and the first target message operation type; filtering target messages from target traffic that match the first target feature and the first target message operation type based on the multiple access control list entries; and sending the target message to a processor, so that the processor determines the performance indicators of the network to which the target message belongs based on the target message. This application embodiment, by adding message operation types to the analysis instruction, can generate access control list entries based on the first target feature and the message operation type, thereby reducing the number of generated access control list entries and avoiding the problem of insufficient access control list entry resources.

[0081] In some embodiments, the multiple access control entries include a first access control entry and a second access control entry. The first access control entry is used to filter bidirectional data packets in the target packet, and the second access control entry is used to filter unidirectional data packets in the target packet.

[0082] The method of filtering target packets from target traffic based on access control list entries that match the first target characteristics and the first target packet operation type includes: matching the first target packet from the target traffic with the first access control list entry within a first preset time period; and matching the second target packet from the target traffic with the second access control list entry within a second preset time period.

[0083] Understandably, the target message includes both one-way and two-way data packets. To reduce the processing load on the processor, the driver chip can send the two-way and one-way data packets to the processor in a time-sharing manner.

[0084] Specifically, a timer function can be set in the driver chip to filter only bidirectional data packets within a first preset duration and only unidirectional data packets within a second preset duration. When the corresponding data packet is selected, it is sent to the processor in real time.

[0085] One-way data transmission: This refers to a situation where the client sends data to the server, and the server does not need to reply with an ACK packet, nor does it require reverse data transmission. Examples include broadcasting, one-way video streaming, or certain types of sensor data transmission.

[0086] Two-way data packets: This refers to the flow of data between the client and the server. The client sends data to the server, and the server replies with an ACK packet upon receiving it. This type of communication is interactive and is commonly found in telephone calls, video conferencing, instant messaging, and most network communication protocols.

[0087] The driver chip can determine whether a data packet is a bidirectional or unidirectional data packet by recognizing the basic transport header (IB protocol header) in the data packet.

[0088] To filter bidirectional and unidirectional data packets separately, the access control list entry may include a first access control list entry and a second access control list entry. The first access control list entry is used to filter bidirectional data packets in the target packet, and the second access control list entry is used to filter unidirectional data packets in the target packet.

[0089] Specifically, within a first preset time period, only the first access control entry can be applied to filter bidirectional data packets in the target message, i.e., the first target message; within a second preset time period, only the second access control entry can be applied to filter unidirectional data packets in the target message.

[0090] It is understandable that both bidirectional and unidirectional data packets can be used to determine the network's second performance metric, which can be the network's throughput. Therefore, to alleviate the processor's data processing pressure, the second performance metric can be determined using unidirectional data packets within a second preset time period. Thus, within the second preset time period, the driver chip can send the second target packet matching the second access control list entry in the target traffic to the processor.

[0091] It should be noted that during the throughput calculation process, the processor can use sampled and sent packets to calculate the throughput. In order to further reduce the data processing pressure on the processor, the driver chip can sample and send the second target packet that matches the second access control list entry in the target traffic to the processor.

[0092] Both the first and second access control list entries can include at least one ACL.

[0093] In some embodiments, the method further includes:

[0094] The receiver returns the second target feature and the second target message operation type, where the second target feature and the second target message operation type are respectively the message feature and message operation type of the first target message that the processor has completed analyzing.

[0095] Set the status of the third access control entry to the disabled state. The third access control entry is used to filter messages from the first target message that match the characteristics of the second target and the operation type of the second target message.

[0096] After receiving the first destination message, the processor will determine whether the first destination message is a paired message, since it is a bidirectional data message. The paired messages must have a matching source IP, destination IP, source queue pair, and destination queue pair, the same sequence number, and matching message operation types. For example, one message in the paired messages may have a send / write operation type and the other may have an ack operation type, or one message may have a read request operation type and the other may have a read response operation type.

[0097] Identify paired first-target packets within the first-target packet set. Based on these paired first-target packets, determine the network throughput, latency, and packet loss of the network to which the first-target packet belongs. Discard unpaired first-target packets.

[0098] Furthermore, the processor sends the message characteristics and message operation type of the first target message that has been analyzed to the driver chip.

[0099] The second target feature may include opcode, source IP, destination IP, source queue pair, destination queue pair, etc., and the second target message operation type is the message operation type of the first target message that has been analyzed.

[0100] It is understandable that the first target message corresponding to the second target feature and the second target message operation type has already been used to calculate the corresponding performance index. In order to make all the paired first target messages used to calculate the corresponding performance index, after receiving the second target feature and the second target message operation type sent by the processor, multiple target ACLs corresponding to the second target feature and the second target message operation type can be determined from the multiple ACLs of the first access control list entry, that is, the third access control list entry.

[0101] Furthermore, the status of the third access control list entry is set to disabled, that is, multiple target ACLs corresponding to the second target feature and the second target message operation type are set to disabled. At this time, the driver chip will no longer filter and match the first target message corresponding to the third access control list entry for a first preset time period, and thus will no longer send the first target message corresponding to the second target feature and the second target message operation type to the processor. During this period, the processor can use other first target messages to calculate the corresponding performance indicators, so that all pairs of first target messages can be used to calculate the corresponding performance indicators within the first time period.

[0102] This application embodiment stops filtering first target messages that have already been analyzed for the first performance index on the driver chip, so that the processor will not repeatedly analyze first target messages that have already been analyzed for the first performance index within a first preset time period, but will continue to analyze first target messages that have not been analyzed for the first performance index. This ensures that all first target messages can be used to analyze the first performance index within the first preset time period, avoiding the problem that the performance index of some first target messages cannot be calculated or the calculation result is greatly deviated.

[0103] In some embodiments, matching a first target packet from a first access control list entry in the target traffic within a first preset time period includes: setting the status of a second access control list entry to a disabled state within the first preset time period; and filtering the first target packets from the target traffic that match the first access control list entry.

[0104] It is understandable that the data packets include bidirectional data packets and unidirectional data packets. In order to send bidirectional data packets in the target traffic to the processor within the first preset time period, a disabled flag can be set for the second access control table entry used to filter unidirectional data packets within the first preset time period. In this way, during the time period when the second access control table entry is disabled, the driver chip will only filter the first target packets corresponding to the first access control table entry, thereby sending the first target packets in the target traffic that match the first access control table entry to the processor.

[0105] Since bidirectional data packets are used to calculate throughput, latency, and packet loss, and the full first target packet is required to calculate throughput, latency, and packet loss, the driver chip can send the full first target packet that matches the first access control list entry in the target traffic to the processor.

[0106] In some embodiments, matching a second target packet from the target traffic with a second access control list entry within a second preset time period includes: setting the state of a first access control list entry to a disabled state within the second preset time period; and filtering the target traffic for second target packets that match the second access control list entry.

[0107] Similarly, in order to sample and send the second target packets that match the second access control list entry in the target traffic to the processor within the second preset time period, a disable flag can be set for the first access control list entry within the second preset time period. In this way, during the time period when the first access control list entry is disabled, the driver chip will only filter the second target packets corresponding to the second access control list entry, thereby sampling and sending the second target packets that match the second access control list entry in the target traffic to the processor.

[0108] In some embodiments, after sending the second target message matching the second access control list entry in the target traffic to the processor within the second preset duration, the method further includes: continuously sending the first target message and the second target message to the processor with the sum of the durations of the first preset duration and the second preset duration as a cycle.

[0109] In some embodiments, after sampling and sending second target packets that conform to the third sub-access control list in the target traffic to the processor within a second preset time period, the method further includes:

[0110] Within the next first preset duration, the step of re-executing the full transmission of the first target packets conforming to the first access control list from the target traffic to the processor is repeated. It is understood that the processor needs to continuously analyze network performance metrics. Therefore, the sum of the first and second preset durations can be used as a cycle to continuously analyze network performance metrics. Thus, after sampling and sending the second target packets conforming to the third sub-access control list from the target traffic to the processor within the second preset duration, the process further includes: within the next first preset duration, re-executing the step of re-executing the full transmission of the first target packets conforming to the first access control list from the target traffic to the processor. That is, the process of continuously sending the first target packet to the processor within the first preset duration of each cycle and sending the second target packet to the processor within the second preset duration of each cycle is repeated.

[0111] It is understood that, in the embodiments of this application, a first target message may be sent to the processor for a first preset duration in each cycle, and a second target message may be sent to the processor for a second preset duration in each cycle, or the second target message may be sent to the processor for a second preset duration in each cycle, and the first target message may be sent to the processor for a first preset duration in each preceding cycle. That is, this application does not limit the order of the first preset duration and the second preset duration.

[0112] It is understandable that, since the first preset duration is for sending the first target message in its entirety and the second preset duration is for sending the second target message in a sampled manner, in order to alleviate the processing pressure on the processor, the length of the first preset duration can be much shorter than the length of the second preset duration, for example, the first preset duration is 500 milliseconds and the second preset duration is 10 seconds.

[0113] Further embodiments of this application describe the message processing method using an execution subject as a processor.

[0114] See Figure 3 The method includes the following steps.

[0115] S301. In response to an analysis instruction including a first target feature and a first target message operation type, the analysis instruction is sent to the driver chip so that the driver chip generates multiple access control entries based on the first target feature and the first target message operation type.

[0116] The first target message operation type is used to indicate the operation requested by the data message.

[0117] S302, Receive the target message sent by the driver chip.

[0118] The target message is the message that the driver chip selects from the target traffic that matches the first target characteristics and message operation type.

[0119] S303. Determine the performance indicators of the network to which the target message belongs based on the target message.

[0120] This application proposes a packet processing method applied to a processor. The method includes: responding to an analysis instruction including a first target feature and a first target packet operation type, sending an analysis instruction to a driver chip, so that the driver chip generates multiple access control list entries based on the first target feature and the first target packet operation type, wherein the first target packet operation type represents the operation requested by the data packet; receiving a target packet sent by the driver chip, wherein the target packet is a packet selected by the driver chip from target traffic that matches the first target feature and the packet operation type; and determining the performance indicators of the network to which the target packet belongs based on the target packet. This application embodiment, by adding the first target packet operation type as a filtering condition to the analysis instruction, significantly reduces the number of ACLs generated by the driver chip based on the analysis instruction, thereby avoiding the problem of insufficient ACL resources.

[0121] In some embodiments, multiple access control entries include a first access control entry and a second access control entry. The first access control entry is used to filter bidirectional data packets in the target packet, and the second access control entry is used to filter unidirectional data packets in the target packet. Receiving the target packet sent by the driver chip includes: receiving a first target packet sent by the driver chip within a first preset time period, wherein the first target packet is a packet in the target traffic that matches the first access control entry; and receiving a second target packet sent by the driver chip within a second preset time period, wherein the second target packet is a packet in the target traffic that matches the second access control entry.

[0122] To filter bidirectional and unidirectional data packets separately, the access control list entry may include a first access control list entry and a second access control list entry. The first access control list entry is used to filter bidirectional data packets in the target packet, and the second access control list entry is used to filter unidirectional data packets in the target packet.

[0123] Specifically, within a first preset time period, only the first access control entry can be applied to filter bidirectional data packets in the target message, i.e., the first target message; within a second preset time period, only the second access control entry can be applied to filter unidirectional data packets in the target message.

[0124] It is understandable that both bidirectional and unidirectional data packets can be used to determine the network's second performance metric, which can be the network's throughput. Therefore, to alleviate the processor's data processing pressure, the second performance metric can be determined using unidirectional data packets within a second preset time period. Thus, within the second preset time period, the driver chip can send the second target packet matching the second access control list entry in the target traffic to the processor.

[0125] It should be noted that during the throughput calculation process, the processor can use sampled and sent packets to calculate the throughput. In order to further reduce the data processing pressure on the processor, the driver chip can sample and send the second target packet that matches the second access control list entry in the target traffic to the processor.

[0126] Both the first and second access control list entries can include at least one ACL.

[0127] In some embodiments, the method further includes: returning a second target feature and a second target first target message operation type so that the driver chip sets the state of a third access control entry to a disabled state, wherein the second target feature and the second target first target message operation type are respectively the message feature and the first target message operation type of the first target message that the processor has completed analyzing, and the third access control entry is used to filter messages from the first target message that match the second target feature and the second target first target message operation type.

[0128] It is understandable that in the process of determining the first performance index of the network to which the first target message belongs based on the first target message, the second target feature of the first target message will be obtained each time the first performance index of the network to which the first target message belongs is determined through the first target message. The second target feature may include opcode, source IP, destination IP, source queue pair, destination queue pair, at least one message operation type, etc.

[0129] Furthermore, the processor returns a second target feature to the driver chip. The driver chip retrieves a second sub-access control list from the first access control list that matches the second target feature and the second target message operation type, and sets the status of the second sub-access control list to disabled.

[0130] Understandably, the data packets corresponding to the second target feature and the second target message operation type have already been used to calculate the corresponding performance metrics. In order to ensure that all paired first target messages are used to calculate the corresponding performance metrics, the state of the second sub-access control list is set to the disabled state, that is, the first target messages corresponding to the second sub-access control list are no longer filtered, and thus no more data packets corresponding to the second target feature and the second target message operation type are sent to the processor. This allows the processor to use other first target messages to calculate the corresponding performance metrics, so that within the first time period, all paired first target messages can be used to calculate the corresponding performance metrics.

[0131] In some embodiments, the method includes continuously sending a first performance metric and a second performance metric to an analyzer so that the analyzer outputs the first performance metric and the second performance metric in real time.

[0132] Understandably, when users enable the packet statistics and packet loss statistics functions of NetAnalysis technology via command line or Netconf, they can only view the analysis results via command line, not in real time or for a long period of continuous analysis. To enable users to observe long-term continuous analysis results, the first and second performance indicators can be continuously sent to the analyzer so that the analyzer can output the first and second performance indicators in real time.

[0133] In some embodiments, in order to illustrate the message processing method of this application in conjunction with the processor and driver chip, the embodiments of this application also provide a schematic flowchart of the message processing method.

[0134] like Figure 4 As shown, the method includes the following steps.

[0135] S401, In response to the analysis instruction sent by the controller, which includes the first target feature and the first target message operation type, the processor sends the analysis instruction to the driver chip.

[0136] S402, the driver chip obtains the RoCEv2 message.

[0137] S403, the driver chip generates multiple access control list entries based on the first target feature and the first target message operation type.

[0138] S404. Within a first preset time period, the driver chip sends the first target message that matches the first access control list entry in the RoCEv2 message to the processor.

[0139] S405. When the processor determines that the first target message is a paired message, it determines the first performance index of the network to which the first target message belongs based on the first target message.

[0140] S406. The processor obtains the second target characteristics and the second target message operation type of the analyzed first target message.

[0141] S407, The processor sends the second target characteristics and the second target message operation type to the driver chip.

[0142] S408: When the driver chip receives the second target feature and the second target message operation type returned by the processor, it obtains the third access control table entry that matches the second target feature and the second target message operation type, and sets the state of the third access control table entry to the disabled state.

[0143] S409, within a second preset time period, the driver chip sends the second target message of the second access control list entry in the target traffic to the processor.

[0144] S410: The processor determines the second performance index of the network to which the second target message belongs based on the second target message.

[0145] S411 The processor continuously sends the first performance metric and the second performance metric to the analyzer so that the analyzer can output the first performance metric and the second performance metric in real time.

[0146] Furthermore, the steps S404-S411 are executed repeatedly.

[0147] This application also provides a message processing apparatus for performing the above-described... Figure 2 The message processing method in the embodiment is applied to a driver chip, such as... Figure 5 As shown, the device includes:

[0148] The receiving module 501 is configured to receive an analysis instruction, the analysis instruction including a first target feature and a first target message operation type; the first target message operation type is used to indicate the operation requested by the data message;

[0149] The generation module 502 is used to generate multiple access control list entries based on the first target characteristics and the first target message operation type;

[0150] The filtering module 503 is used to filter target packets from the target traffic that match the first target feature and the first target packet operation type based on the plurality of access control list entries;

[0151] The sending module 504 is used to send the target message to the processor so that the processor can determine the performance indicators of the network to which the target message belongs based on the target message.

[0152] In some embodiments, the plurality of access control list entries include a first access control list entry and a second access control list entry. The first access control list entry is used to filter bidirectional data packets in the target packet, and the second access control list entry is used to filter unidirectional data packets in the target packet. The filtering module 503 is specifically used for:

[0153] Within a first preset time period, the first target packet matching the first access control list entry in the target traffic is sent to the processor, so that the processor determines the first performance index of the network to which the first target packet belongs based on the first target packet;

[0154] Within a second preset time period, a second target message matching the second access control list entry in the target traffic is sent to the processor, so that the processor determines a second performance indicator of the network to which the second target message belongs based on the second target message.

[0155] In some embodiments, the above-described apparatus further includes a disabling module, used for:

[0156] The processor returns a second target feature and a second target message operation type, wherein the second target feature and the second target message operation type are respectively the message feature and message operation type of the first target message that the processor has completed analyzing;

[0157] The third access control entry is set to a disabled state. The third access control entry is used to filter packets from the first target packet that match the second target characteristics and the operation type of the second target packet.

[0158] In some embodiments, the sending module 503 is specifically used for:

[0159] Within a first preset time period, the status of the second access control entry is set to disabled;

[0160] Filter the first target packets from the target traffic that match the first access control list entry.

[0161] In some embodiments, the sending module 503 is further specifically used for:

[0162] Within a second preset time period, the status of the first access control entry is set to disabled.

[0163] Filter the target traffic to select second target packets that match the second access control list entry.

[0164] In some embodiments, the sending module 503 is further configured to:

[0165] The first target message and the second target message are continuously sent to the processor in a cycle consisting of the sum of the first preset duration and the second preset duration.

[0166] In some embodiments, the first performance metric includes a first throughput, latency, and packet loss, and the second performance metric includes a second throughput.

[0167] This application also provides a message processing apparatus for performing the above-described... Figure 3 The message processing method in the embodiments is applied to a processor, such as... Figure 6 As shown, the device includes:

[0168] The sending module 601 is configured to send the analysis instruction to the driver chip in response to the analysis instruction including the first target feature and the first target message operation type, so that the driver chip generates multiple access control list entries based on the first target feature and the first target message operation type, wherein the first target message operation type is used to represent the operation requested by the data packet;

[0169] The receiving module 602 is used to receive the target message sent by the driver chip, wherein the target message is a message that the driver chip selects from the target traffic that matches the first target feature and the message operation type;

[0170] The determination module 603 is used to determine the performance indicators of the network to which the target packet belongs based on the target packet.

[0171] In some embodiments, the plurality of access control entries include a first access control entry and a second access control entry. The first access control entry is used to filter bidirectional data packets in the target packet, and the second access control entry is used to filter unidirectional data packets in the target packet. The receiving module 602 is specifically used for:

[0172] Receive a first target message sent by the driver chip within a first preset time period, wherein the first target message is a message in the target traffic that matches the first access control list entry;

[0173] The driver chip receives a second target message sent within a second preset time period. The second target message is a message in the target traffic that matches the second access control list entry.

[0174] In some embodiments, the above-described apparatus further includes a return module for:

[0175] The second target feature and the second target first target message operation type are returned so that the driver chip sets the state of the third access control list entry to the disabled state. The second target feature and the second target first target message operation type are the message feature and the first target message operation type of the first target message that the processor has completed analyzing, respectively. The third access control list entry is used to filter messages from the first target message that match the second target feature and the second target first target message operation type.

[0176] In some embodiments, the sending module 602 is further configured to:

[0177] The first performance metric and the second performance metric are continuously sent to the analyzer so that the analyzer can output the first performance metric and the second performance metric in real time.

[0178] The electronic device and the message processing method provided in this application embodiment are based on the same application concept and have the same beneficial effects as the methods they adopt, operate or implement.

[0179] This application also provides a computer-readable storage medium corresponding to the message processing method provided in the foregoing embodiments. Please refer to... Figure 1 The computer-readable storage medium shown is an optical disc 30, on which a computer program (i.e., a program product) is stored. When the processor or driver chip is running, the computer program executes the message processing method provided in any of the foregoing embodiments.

[0180] In addition, examples of the computer-readable storage medium may include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be described in detail here.

[0181] The computer-readable storage medium provided in the above embodiments of this application and the message processing method provided in the embodiments of this application are based on the same application concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.

[0182] It should be noted that the algorithms and displays provided herein are not inherently related to any particular computer, virtual device, or other equipment. Various general-purpose devices can also be used in conjunction with the teachings herein. The required structure for constructing such devices is obvious from the above description. Furthermore, this application is not directed to any particular programming language. It should be understood that the content of this application described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of this application.

[0183] Similarly, it should be understood that, in order to simplify this application and aid in understanding one or more of the various aspects of the application, in the above description of exemplary embodiments of the application, various features of the application are sometimes grouped together in a single embodiment, figure, or description thereof. However, this disclosure should not be construed as reflecting an intention that the claimed application requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, the application aspect lies in fewer than all features of the single embodiment disclosed above. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the application.

[0184] The various component embodiments of this application can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the virtual machine creation apparatus according to embodiments of this application. This application can also be implemented as a device or apparatus program for performing part or all of the methods described herein. The program implementing this application can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0185] The above description is merely a preferred embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A message processing method, characterized in that, Applied to a driver chip, the method includes: The system receives an analysis instruction, which includes a first target characteristic and a first target message operation type; the first target message operation type is used to indicate the operation requested by the data message. Based on the first target feature and the first target message operation type, multiple access control list entries are generated; Based on the multiple access control list entries, target packets that match the first target feature and the first target packet operation type are filtered from the target traffic. The target message is sent to the processor so that the processor determines the performance indicators of the network to which the target message belongs based on the target message. The plurality of access control entries includes a first access control entry and a second access control entry. The first access control entry is used to filter bidirectional data packets in the target packets, and the second access control entry is used to filter unidirectional data packets in the target packets. The step of filtering target packets from the target traffic based on the plurality of access control entries that match the first target feature and the first target packet operation type includes: Within a first preset time period, a first target packet is matched from the target traffic with the first access control list entry, so that the processor determines a first performance indicator of the network to which the first target packet belongs based on the first target packet. Within a second preset time period, a second target message is matched from the target traffic with the second access control list entry, so that the processor determines a second performance indicator of the network to which the second target message belongs based on the second target message.

2. The method according to claim 1, characterized in that, The method further includes: The processor returns a second target feature and a second target message operation type, wherein the second target feature and the second target message operation type are respectively the message feature and message operation type of the first target message that the processor has completed analyzing; The third access control entry is set to a disabled state. The third access control entry is used to filter packets from the first target packet that match the second target characteristics and the operation type of the second target packet.

3. The method according to claim 1, characterized in that, The step of matching the first target packet from the first access control list entry in the target traffic within a first preset time period includes: Within a first preset time period, the status of the second access control entry is set to disabled; Filter the first target packets from the target traffic that match the first access control list entry.

4. The method according to claim 3, characterized in that, The step of matching the second target message from the second access control list entry in the target traffic within the second preset time period includes: Within a second preset time period, the status of the first access control entry is set to disabled. Filter the target traffic to select second target packets that match the second access control list entry.

5. The method according to claim 1, characterized in that, After sending the target message to the processor, the process further includes: The first target message and the second target message are continuously sent to the processor in a cycle consisting of the sum of the first preset duration and the second preset duration.

6. The method according to claim 1, characterized in that, The first performance metric includes at least one of a first throughput, response latency, and packet loss rate, and the second performance metric includes a second throughput.

7. A message processing method, characterized in that, Applied to a processor, the method includes: In response to an analysis instruction including a first target feature and a first target message operation type, the analysis instruction is sent to the driver chip so that the driver chip generates multiple access control list entries based on the first target feature and the first target message operation type, wherein the first target message operation type is used to represent the operation requested by the data packet; The driver chip receives a target message sent by the driver chip, wherein the target message is a message selected by the driver chip from the target traffic that matches the first target feature and the first target message operation type; Determine the performance metrics of the network to which the target message belongs based on the target message; The plurality of access control list entries include a first access control list entry and a second access control list entry. The first access control list entry is used to filter bidirectional data packets in the target packet, and the second access control list entry is used to filter unidirectional data packets in the target packet. Receiving the target packet sent by the driver chip includes: The system receives a first target message sent by the driver chip within a first preset time period, and determines a first performance indicator of the network to which the first target message belongs based on the first target message, wherein the first target message is a message in the target traffic that matches the first access control list entry; The system receives a second target message sent by the driver chip within a second preset time period, and determines a second performance index of the network to which the second target message belongs based on the second target message, wherein the second target message is a message in the target traffic that matches the second access control list entry.

8. The method according to claim 7, characterized in that, The method further includes: The second target feature and the second target message operation type are returned so that the driver chip sets the state of the third access control list entry to the disabled state. The second target feature and the second target message operation type are respectively the message feature and the first target message operation type of the first target message that the processor has completed analyzing. The third access control list entry is used to filter messages from the first target message that match the second target feature and the second target message operation type.

9. The method according to claim 7, characterized in that, The method further includes: The first performance metric and the second performance metric are sent to the analyzer so that the analyzer can output the first performance metric and the second performance metric in real time.

10. A message processing apparatus, characterized in that, The device, applied to a driver chip, includes: A receiving module is configured to receive an analysis instruction, the analysis instruction including a first target feature and a first target message operation type; the first target message operation type is used to indicate the operation requested by the data message. The generation module is used to generate multiple access control list entries based on the first target characteristics and the first target message operation type; The filtering module is used to filter target packets from the target traffic that match the first target feature and the first target packet operation type based on the plurality of access control list entries; The sending module is used to send the target packet to the processor, so that the processor can determine the performance indicators of the network to which the target packet belongs based on the target packet; The plurality of access control entries include a first access control entry and a second access control entry. The first access control entry is used to filter bidirectional data packets in the target packet, and the second access control entry is used to filter unidirectional data packets in the target packet. The filtering module is specifically used for: Within a first preset time period, the first target packet matching the first access control list entry in the target traffic is sent to the processor, so that the processor determines the first performance index of the network to which the first target packet belongs based on the first target packet; Within a second preset time period, a second target message matching the second access control list entry in the target traffic is sent to the processor, so that the processor determines a second performance indicator of the network to which the second target message belongs based on the second target message.

11. A message processing apparatus, characterized in that, Applied to a processor, the device includes: The sending module is configured to send the analysis instruction to the driver chip in response to an analysis instruction including a first target feature and a first target message operation type, so that the driver chip generates multiple access control list entries based on the first target feature and the first target message operation type, wherein the first target message operation type is used to indicate the operation requested by the data packet; A receiving module is used to receive a target message sent by the driver chip, wherein the target message is a message selected by the driver chip from the target traffic that matches the first target feature and the first target message operation type; The determination module is used to determine the performance indicators of the network to which the target packet belongs based on the target packet; The plurality of access control entries include a first access control entry and a second access control entry. The first access control entry is used to filter bidirectional data packets in the target packet, and the second access control entry is used to filter unidirectional data packets in the target packet. The receiving module is specifically used for: The system receives a first target message sent by the driver chip within a first preset time period, and determines a first performance indicator of the network to which the first target message belongs based on the first target message, wherein the first target message is a message in the target traffic that matches the first access control list entry; The system receives a second target message sent by the driver chip within a second preset time period, and determines a second performance index of the network to which the second target message belongs based on the second target message, wherein the second target message is a message in the target traffic that matches the second access control list entry.

12. A switch, characterized in that, The switch includes: Processor and driver chip; The processor is configured to respond to an analysis instruction including a first target feature and a first target message operation type by sending the analysis instruction to a driver chip, so that the driver chip generates multiple access control list entries based on the first target feature and the first target message operation type, wherein the first target message operation type is used to represent the operation requested by the data packet; receive a target message sent by the driver chip, wherein the target message is a message selected by the driver chip from target traffic that matches the first target feature and the first target message operation type; and determine the performance indicators of the network to which the target message belongs based on the target message; The driver chip is used to receive analysis instructions, the analysis instructions including a first target feature and a first target packet operation type; generate multiple access control list entries based on the first target feature and the first target packet operation type; filter target packets from the target traffic that match the first target feature and the first target packet operation type based on the multiple access control list entries; and send the target packets to the processor so that the processor determines the performance indicators of the network to which the target packets belong based on the target packets. The plurality of access control entries include a first access control entry and a second access control entry. The first access control entry is used to filter bidirectional data packets in the target packet, and the second access control entry is used to filter unidirectional data packets in the target packet. The target packet sent by the driver chip is received. The step of filtering target packets from the target traffic based on the plurality of access control list entries that match the first target feature and the first target packet operation type includes: Within a first preset time period, a first target packet is matched from the target traffic with the first access control list entry, so that the processor determines a first performance indicator of the network to which the first target packet belongs based on the first target packet. Within a second preset time period, a second target message is matched from the target traffic with the second access control list entry, so that the processor determines a second performance indicator of the network to which the second target message belongs based on the second target message; The receiving of the target message sent by the driver chip includes: The system receives a first target message sent by the driver chip within a first preset time period, and determines a first performance indicator of the network to which the first target message belongs based on the first target message, wherein the first target message is a message in the target traffic that matches the first access control list entry; The system receives a second target message sent by the driver chip within a second preset time period, and determines a second performance index of the network to which the second target message belongs based on the second target message, wherein the second target message is a message in the target traffic that matches the second access control list entry.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the driver chip to implement the method as described in any one of claims 1-6, and the program is executed by the processor to implement the method as described in any one of claims 7-9.

14. A computer program product, comprising a computer program, characterized in that, The computer program is executed by the driver chip to implement the method as described in any one of claims 1-6, and the computer program is executed by the processor to implement the method as described in any one of claims 7-9.

Citation Information

Patent Citations

  • Data flow detection method and device and storage medium

    CN111106977A

  • Session information management method and device, switching equipment and medium

    CN113037859A