CN115550264A - Message processing method and device, electronic equipment and computer readable medium - Google Patents

Message processing method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN115550264A
CN115550264A CN202110733721.3A CN202110733721A CN115550264A CN 115550264 A CN115550264 A CN 115550264A CN 202110733721 A CN202110733721 A CN 202110733721A CN 115550264 A CN115550264 A CN 115550264A
Authority
CN
China
Prior art keywords
message
state
communication device
source information
queue
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110733721.3A
Other languages
Chinese (zh)
Inventor
王领强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN202110733721.3A priority Critical patent/CN115550264A/en
Priority to PCT/CN2022/101435 priority patent/WO2023274122A1/en
Publication of CN115550264A publication Critical patent/CN115550264A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/50Circuit switching systems, i.e. systems in which the path is physically permanent during the communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling

Abstract

The application discloses a message processing method, a message processing device, electronic equipment and a computer readable medium, wherein the method comprises the following steps: acquiring a message to be processed from an incoming port of first communication equipment; determining a first state of a first packet queue associated with source information of the packet in an ingress buffer of the first communication device and a second state of a second packet queue associated with the source information in an egress buffer of the first communication device, wherein the first state is idle or congested and the second state is idle or congested; and processing the message according to the first state and the second state. According to the technical scheme, the congestion states of the inlet buffer area and the outlet buffer area are fully considered during message processing, and the message processing efficiency can be improved.

Description

Message processing method and device, electronic equipment and computer readable medium
Technical Field
The present application relates to communications technologies, and in particular, to a method and an apparatus for processing a packet, an electronic device, and a computer-readable medium.
Background
When a communication device forwards a message, the communication device generally enters a related queue according to the priority of the message to perform scheduling forwarding. When the sending rate of a message with a certain priority exceeds the receiving rate, the available data buffer space of the receiving equipment is insufficient, and the message is congested.
At present, the message processing efficiency is low when congestion occurs.
Disclosure of Invention
The embodiment of the present application mainly aims to provide a message processing method, a message processing apparatus, an electronic device, and a computer readable medium, which aim to improve message processing efficiency.
In a first aspect, an embodiment of the present application provides a message processing method, including:
acquiring a message to be processed from an incoming port of first communication equipment;
determining a first state of a first message queue associated with source information of the message in an ingress buffer of the first communication device and a second state of a second message queue associated with the source information in an egress buffer of the first communication device, wherein the first state is idle or congested and the second state is idle or congested;
and processing the message according to the first state and the second state.
In some embodiments, the performing packet processing according to the first state and the second state includes:
and when the first state is idle, searching a first message queue associated with the source information in the entry buffer area according to the source information, and storing the message into the first message queue.
In some embodiments, the performing packet processing according to the first state and the second state includes:
and when the second state is idle, searching a second message queue associated with the source information in the outlet buffer area according to the source information, and moving the message from the first message queue to the second message queue.
In some embodiments, the performing packet processing according to the first state and the second state includes:
and when the second state is congestion, forbidding to move the message from the first message queue to the second buffer area.
In some embodiments, the performing packet processing according to the first state and the second state includes:
and when the first state is congestion, searching a second communication device sending the message according to the source information, and sending a first flow control message to the second communication device, wherein the first flow control message is used for indicating the second communication device to stop sending the message to the first communication device.
In some embodiments, the performing packet processing according to the first state and the second state includes:
and when the first state is idle, searching a second communication device sending the message according to the source information, and sending a second flow control message to the second communication device, wherein the second flow control message is used for indicating the second communication device to send the message to the first communication device.
In some embodiments, the method further comprises:
when the state of the first message queue is detected to be changed, updating the first state; and/or updating the second state when detecting that the state of the second message queue changes.
In a second aspect, an embodiment of the present application provides a packet processing apparatus, including:
the message acquisition module is used for acquiring a message to be processed from an incoming port of the first communication equipment;
a state determining module, configured to determine a first state of a first packet queue associated with source information of the packet in an ingress buffer of the first communication device and a second state of a second packet queue associated with the source information in an egress buffer of the first communication device, where the first state is idle or congested and the second state is idle or congested;
and the message processing module is used for processing the message according to the first state and the second state.
In some embodiments, the packet processing module is specifically configured to: and when the first state is idle, searching a first message queue associated with the source information in the entry buffer area according to the source information, and storing the message in the first message queue.
In some embodiments, the message processing module is further configured to: and when the second state is idle, searching a second message queue associated with the source information in the outlet buffer area according to the source information, and moving the message from the first message queue to the second message queue.
In some embodiments, the message processing module is further configured to: and when the second state is congestion, forbidding to move the message from the first message queue to the second buffer area.
In some embodiments, the message processing module is specifically configured to: and when the first state is congestion, searching a second communication device sending the message according to the source information, and sending a first flow control message to the second communication device, wherein the first flow control message is used for indicating the second communication device to stop sending the message to the first communication device.
In some embodiments, the message processing module is specifically configured to: and when the first state is idle, searching a second communication device sending the message according to the source information, and sending a second flow control message to the second communication device, wherein the second flow control message is used for indicating the second communication device to send the message to the first communication device.
In some embodiments, the apparatus further comprises:
the state updating module is used for updating the first state when detecting that the state of the first message queue changes; and/or updating the second state when detecting that the state of the second message queue changes.
In a third aspect, an embodiment of the present application provides an electronic device, including:
one or more processors;
a storage device, on which one or more programs are stored, which, when executed by the one or more processors, cause the one or more processors to implement the message processing method of the first aspect;
one or more I/O interfaces connected between the processor and the memory and configured to enable information interaction between the processor and the memory.
In a fourth aspect, an embodiment of the present application provides a storage medium, where a computer program is stored, and when the program is executed by a processor, the message processing method according to the first aspect is implemented.
In the embodiment, when the message is processed, the congestion or idle states of the ingress buffer area and the egress buffer area are fully considered, and different message processing modes are adopted in different states, so that the message processing efficiency can be improved.
Drawings
Fig. 1 is a flowchart of a message processing method according to an embodiment of the present application;
fig. 2 is a flowchart of another message processing method according to an embodiment of the present application;
fig. 3 is a flowchart of another message processing method according to an embodiment of the present application;
fig. 4 is a structural diagram of another message processing apparatus according to an embodiment of the present application;
fig. 5 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present application, the server provided in the present application is described in detail below with reference to the accompanying drawings.
Example embodiments will be described more fully hereinafter with reference to the accompanying drawings, but which may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, … … specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The embodiments described herein may be described with reference to plan and/or cross-sectional views in idealized schematic representations of the present application. Accordingly, the example illustrations can be modified in accordance with manufacturing techniques and/or tolerances. Accordingly, the embodiments are not limited to the embodiments shown in the drawings, but include modifications of configurations formed based on a manufacturing process. Thus, the regions illustrated in the figures have schematic properties, and the shapes of the regions shown in the figures illustrate specific shapes of regions of elements, but are not intended to be limiting.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present application and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Example one
Fig. 1 shows a flowchart of a message processing method according to an embodiment of the present invention, where an execution main body of this embodiment is a message processing apparatus according to an embodiment of the present invention, or a first communication device configured with the message processing apparatus, or another communication device configured with the message processing apparatus. As shown in fig. 1, the method comprises the steps of:
step S101: and acquiring the message to be processed from the incoming port of the first communication equipment.
To distinguish between different communication devices herein, a first appearing communication device is defined herein as a first communication device, and a subsequent appearing communication device is defined herein as a second communication device. The first communication device has a message forwarding function, and may specifically be a switch or a router.
The ingress port may be a virtual port or a physical port, and the first communication device may include a plurality of ingress ports. Specifically, the message may enter the first communication device from an ingress port of the first communication device, the message may be intercepted after the message enters the ingress port of the first communication device, and the message may be analyzed to obtain source information of the message. The source information includes ingress port information and ingress priority of the packet, where the ingress port information may include at least one of ingress port number, port type, communication protocol, and the like.
Step S102: a first state of a first message queue associated with source information of a message in an ingress buffer of a first communication device and a second state of a second message queue associated with the source information in an egress buffer of the first communication device are determined, wherein the first state is idle or congested and the second state is idle or congested.
In this embodiment, the first communication device has two buffers, i.e. an ingress buffer and an egress buffer, and these two buffers are logical concepts, and may be physically the same buffer when implemented. When a message is processed, the message first enters an ingress buffer, then is moved from the ingress buffer to an egress buffer, and finally is sent from the egress buffer to another communication device (e.g., a switch or a router).
When the first communication device comprises a plurality of ingress ports, a plurality of message queues are respectively arranged in an ingress buffer area and an egress buffer area, wherein one message queue correspondingly stores a message of one ingress port. The two buffer areas can be used for storing the messages with the same attribute, and storing the messages with the same attribute into the same message queue, and each buffer area can correspond to a plurality of message queues with different attributes. The message attribute comprises source information and outlet information of the message, wherein the source information comprises an ingress port and/or an ingress message priority, and the outlet information comprises an egress port and/or an egress message priority.
Moreover, the two message buffers can complete information statistics on a group of messages with the same attribute, such as the number of the messages and the length of the messages.
Specifically, because the ingress buffer and the egress buffer both include a plurality of message queues with different attributes, when a message is to be processed, the relevant message queue is indexed according to the source information of the message, and whether the state of the message queue is idle or congested is determined, so that the next processing is performed. For example, a buffer area into which a message first enters is an entry buffer area, so that a related message queue, i.e., a first message queue, in the entry buffer area is indexed according to source information of the message, and a state, i.e., a first state, of the message queue is determined, where the first state may be idle or congested, and may be distinguished by different marks when specifically implemented. The meaning of the first state representation is different, and the message processing mode is also different, as described in the following alternative embodiment. Similarly, after the first state is determined, a second state, that is, a state of a second packet queue associated with the source information of the packet in the egress buffer is determined, where the second state is also idle or congested, and may be distinguished by different marks when specifically implemented. The meaning of the second state representation is different, and the message processing mode is also different, as described in the following alternative embodiment.
Step S103: and processing the message according to the first state and the second state.
Specifically, the message in this step may be the same message as the messages in steps 101 and 102, or may be different messages, and whether the messages are the same depends on the first state and the second state. Specifically, when the first state is congestion, a first flow control packet is sent to the second communication device, where the first flow control packet is used to instruct the second communication device to stop sending packets to the first communication device. And when the first state is idle, sending a second flow control message to the second communication equipment, wherein the second flow control message is used for indicating the second communication equipment to send a message to the first communication equipment. And when the first state is idle and the second state is idle, storing the message to be processed into a first message queue, and moving the message to be processed from the first message queue to a second message queue. And when the first state is idle and the second state is congestion, storing the message to be processed into a first message queue, and forbidding to move the message to be processed from the first message queue to a second message queue.
In the related art, the communication device usually processes the packet according to the congestion condition of the packet queue of the egress buffer, and the ingress buffer is not fully utilized, which results in low packet processing efficiency. In the embodiment, when the message is processed, the congestion or idle states of the ingress buffer area and the egress buffer area are fully considered, and different message processing modes are adopted in different states, so that the message processing efficiency can be improved.
In an optional embodiment, step S103 specifically includes: and when the first state is idle, searching a first message queue associated with the source information in the entry buffer area according to the source information, and storing the message into the first message queue.
When the first state is idle, the second state, namely the state of the second message queue corresponding to the exit buffer area, does not need to be considered at this time, and the message to be processed is stored in the first message queue.
In an optional embodiment, step S103 specifically includes: and when the second state is idle, searching a second message queue associated with the source information in the outlet buffer area according to the source information, and moving the message from the first message queue to the second message queue.
When the second state is idle, the first state, namely the state of the first message queue corresponding to the exit buffer area, does not need to be considered at this time, and as long as the first message queue has messages, the messages are moved to the second message queue. The specific moving process is as follows: and copying the message from the first message queue to the second message queue, and deleting the message from the first message queue.
In an optional embodiment, step S103 specifically includes:
and when the second state is congestion, forbidding the message to be moved from the first message queue to the second buffer area.
When the second state is congestion, in order to prevent the second buffer from being more congested, the message is prohibited from being moved from the first message queue to the second buffer.
In an optional embodiment, step S103 specifically includes: and when the first state is congestion, searching the second communication equipment for sending the message according to the source information, and sending a first flow control message to the second communication equipment, wherein the first flow control message is used for indicating the second communication equipment to stop sending the message to the first communication equipment.
When the first state is congestion, in order to prevent the ingress buffer from being more congested, whether the egress buffer is congested or not, a flow control message that stops sending messages, that is, a first flow control message, is sent to the second communication device, where the second communication device is an upstream communication device that sends messages to the first communication device, and after receiving the first flow control message, the second communication device does not send messages to the first communication device any more. The first Flow Control packet may be a Priority-based Flow Control (PFC) XOFF packet.
In an optional embodiment, step S103 specifically includes:
and when the first state is idle, searching the second communication equipment for sending the message according to the source information, and sending a second flow control message to the second communication equipment, wherein the second flow control message is used for indicating the second communication equipment to send the message to the first communication equipment.
When the first state is idle or is changed from congestion to idle, whether the exit buffer zone is congested or not, a notification message for re-sending or continuing sending the message is sent to the second communication device, wherein the second communication device is an upstream communication device sending the message to the first communication device, and the second communication device sends the message to the first communication device after receiving the second flow control message. The second flow control message may be a PFC XON message, so that the cache of the entry buffer may be fully utilized.
In an optional embodiment, the method further comprises:
when the state of the first message queue is detected to be changed, updating the first state; and/or updating the second state when detecting that the state of the second message queue changes.
Specifically, the following two conditions are mainly used when the state of the first packet queue or the second packet queue changes: with message addition or message removal. When a message is added, determining whether the message queue changes according to the state of the message queue before the message is added and the number of the messages in the message queue after the message is added. Specifically, the state of the message queue before adding the message and the number of the messages in the message queue plus 1 are obtained to obtain the number of the messages in the message queue after adding the message, when the state of the message queue before adding the message is idle and the number of the messages in the message queue after adding exceeds a preset threshold value, the state of the message queue is changed from idle to congestion, namely, the state changes, otherwise, the state does not change. And when a message is removed, determining whether the message queue changes according to the state of the message queue before the message is removed and the number of the messages in the message queue after the message is removed. Specifically, the state of the message queue before message removal and the number of the messages in the message queue minus 1 are obtained to obtain the number of the messages in the message queue after message removal, when the state of the message queue before message removal is congestion and the number of the messages in the message queue after message removal is smaller than a preset threshold value, the state of the message queue is changed from congestion to idle, namely changed, or not changed. The preset threshold may be set as the maximum number of messages that can be accommodated by the message queue or set by a user.
The present invention does not specifically limit the execution order of the steps in the above embodiments.
Example two
In this embodiment, the first communication device includes a first detection module and a second detection module, where the first detection module may detect a status change of a packet queue (source information is the same) in the ingress buffer, that is, a first packet queue. For example, detecting a state change of a first packet queue in an ingress packet buffer according to source information of a packet, and updating a state of the first packet queue when the state change of the first packet queue occurs, that is, a first state is: congested or idle.
Similarly, the second detection module may detect a status change of a packet queue (source information is the same) in the egress buffer, that is, the second packet queue. For example, detecting a state change of a second packet queue in the egress packet buffer according to the source information of the packet, and updating the state of the second packet queue when the state of the second packet queue changes, that is, the second state is: congested or idle. For how the first detection module and the second detection module detect that the status of the packet queue changes, refer to the above alternative embodiments specifically.
In an optional embodiment, the first detection module may receive a state change message sent by the second detection module, where the state change message may include source information of the packet and state change information of the second packet queue, and the first detection module processes the packet according to the second state.
For example, when the second state is congestion and the first state is idle, a first packet queue associated with the source information in the ingress buffer is found according to the source information, the packet is stored in the first packet queue, and the packet is prohibited from being moved from the first packet queue to the second buffer. And the first detection module can detect whether the state of the first message queue added with the message changes, and when the state of the first message queue changes, the state of the first message queue is updated as follows: and (4) congestion.
For another example, when the second state is idle, the second packet queue associated with the source information in the egress buffer is found according to the source information, and the packet is moved from the first packet queue to the second packet queue. Moreover, the first detection module may detect whether the state of the first packet queue after the packet is removed changes, and when the state of the first packet queue changes, update the state of the first packet queue as follows: and (4) idling. Meanwhile, the second detection module may detect whether the state of the second packet queue after adding the packet changes, and when the state of the second packet queue changes, update the state of the second packet queue as follows: congestion.
In an optional embodiment, the first communication device further includes a global detection module, and the global detection module may receive a status change message of the packet queue sent by the ingress packet buffer and/or the egress packet buffer, and decide whether to send a notification message to the second communication device, where the communication message is used to instruct the second communication device to stop sending packets or resend packets.
In an optional embodiment, when the first state of the first packet queue of the ingress packet buffer changes from idle to congested, the second communication device that sends the packet is found according to the source information, and the first flow control packet is sent to the second communication device, where the first flow control packet is used to instruct the second communication device to stop sending the packet to the first communication device.
In an optional embodiment, when the first state of the first packet queue of the ingress packet buffer changes from congestion to idle, the second communication device that sends the packet is found according to the source information, and a second flow control packet is sent to the second communication device, where the second flow control packet is used to instruct the second communication device to send the packet to the first communication device.
The first detection module, the second detection module and the global detection module are all logic concepts. In a specific implementation, the first detection module, the second detection module, and the global detection module may be implemented independently by different software or hardware modules, or implemented by one software or hardware module.
EXAMPLE III
In this embodiment, the first communication device includes a first detection module, a second detection module, and a global detection module, as shown in fig. 2, and specifically includes:
step S201: the first detection module detects the state change of a first message queue in the inlet buffer area based on the source information of the message, and sends a first state change message to the global detection module.
Step S202: the second detection module detects the state change of a second message queue in the exit buffer area based on the source information of the message, and sends a second state change message to the global detection module or the first detection module.
Wherein, step S201 and step S202 may be performed simultaneously.
Step S203: and the global detection module receives the first state change message and/or the second state change message and decides to send the first flow control message or the second flow control message to upstream communication equipment.
Specifically, when the state in the first state change message and/or the second state change message is congestion, the upstream communication device is determined to send the PFC XOFF message, and is notified to suspend sending the message to the first communication device. And when the state in the first state change message and/or the second state change message is idle, deciding to send the PFC XON message to the upstream communication equipment, and informing the upstream communication equipment to send the message to the first communication equipment again.
Step S204: the first detection module receives the second state change message, indexes a second message queue of the exit buffer area based on the source information of the message, and updates the state of the second message queue based on the second state change message.
Specifically, when the queue status in the second status change message is congestion, the status of the second message queue is updated to be congestion. And when the queue state in the second state change message is idle, updating the state of the second message queue to be idle.
Wherein, step S203 and step S204 may be performed simultaneously.
Example four
In this embodiment, the first communication device includes a first detection module, a second detection module, and a global detection module, as shown in fig. 3, and specifically includes:
step S301: the message enters the ingress buffer from the ingress port of the first communication device.
Step S302: the first detection module performs message statistics with the same source information in the first message queue according to the source information of the messages: the number of messages is +1. And if the statistics exceed a set threshold and the state of the message before the message is added is idle, judging that the first message queue is congested, and sending a first state change message to the global detection module by the first detection module.
Step S303: and indexing to the first message queue according to the source information of the message and storing the message to the first message queue.
Step S304: the first detection module obtains the state of the second packet queue in the egress buffer according to the source information of the packet, and if the state is idle, step S305 is executed, otherwise step S306 is executed.
Step S305: the ingress buffer is allowed to move messages to the egress buffer.
Step S306: when the ingress buffer moves the message to the egress buffer, the first detection module performs message statistics according to the message source information: the number of messages is-1. And if the statistic value is lower than the set threshold value and the queue state before the moving is congestion, sending a first state change message to a global detection module. The second detection module performs message statistics with the same source information in the second message queue according to the message source information: the number of messages is +1. And if the statistic value exceeds a set threshold value and the queue state before the message is added is idle, the second detection module sends a second state change message to the global detection module and/or the first detection module.
Step S307: the message is sent from the egress buffer to the external communication device.
Step S308: the second detection module performs message statistics according to the message source information: the number of messages is-1. And if the statistics are lower than the set threshold value and the queue state before the message is sent is congestion, sending a second state change message to the global detection module and/or the first detection module.
Step S309: forbidding the ingress buffer area to move the message to the egress buffer area.
EXAMPLE five
Fig. 4 is a structural diagram of a message processing apparatus according to a second embodiment of the present invention, where the apparatus may be configured in a first communication device. As shown in fig. 4, the apparatus includes a message acquisition module 401, a state determination module 402, and a message processing module 403; wherein the content of the first and second substances,
the message obtaining module 401 is configured to obtain a message to be processed from an ingress port of the first communication device;
the state determining module 402 is configured to determine a first state of a first packet queue associated with source information of a packet in an ingress buffer of a first communication device and a second state of a second packet queue associated with the source information in an egress buffer of the first communication device, where the first state is idle or congested and the second state is idle or congested;
the message processing module 403 is configured to perform message processing according to the first state and the second state.
In some embodiments, the message processing module 403 is specifically configured to, when the first state is idle, find a first message queue associated with the source information in the ingress buffer according to the source information, and store the message in the first message queue.
In some embodiments, the message processing module 403 is further configured to, when the second status is idle, find a second message queue associated with the source information in the egress buffer according to the source information, and move the message from the first message queue to the second message queue.
In some embodiments, the message processing module 403 is further configured to prohibit the message from being moved from the first message queue to the second buffer when the second status is congestion.
In some embodiments, the message processing module 403 is specifically configured to, when the first state is congestion, find the second communication device that sends the message according to the source information, and send the first flow control message to the second communication device, where the first flow control message is used to instruct the second communication device to stop sending the message to the first communication device.
In some embodiments, the message processing module 403 is specifically configured to, when the first state is idle, find a second communication device that sends a message according to the source information, and send a second flow control message to the second communication device, where the second flow control message is used to instruct the second communication device to send the message to the first communication device.
In some embodiments, the apparatus further comprises a status update module 404; wherein the content of the first and second substances,
the state updating module 404 is configured to update the first state when detecting that the state of the first packet queue changes; and/or updating the second state when the state of the second message queue is detected to be changed.
The specific structure and the working principle of each module may refer to the corresponding description in the method embodiment, and are not described herein again.
EXAMPLE six
An embodiment of the present application provides an electronic device, with reference to fig. 5, which includes:
one or more processors 501;
a memory 502 on which one or more programs are stored, which when executed by the one or more processors, cause the one or more processors to implement the message processing method of any one of the above;
one or more I/O interfaces 503 coupled between the processor and the memory and configured to enable information interaction between the processor and the memory.
The processor 501 is a device with data processing capability, and includes but is not limited to a Central Processing Unit (CPU) and the like; memory 502 is a device having data storage capabilities including, but not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), FLASH memory (FLASH); an I/O interface (read/write interface) 503 is connected between the processor 501 and the memory 502, and can realize information interaction between the processor 501 and the memory 502, which includes but is not limited to a data Bus (Bus) and the like.
In some embodiments, the processor 501, memory 502, and I/O interface 503 are connected to each other and to other components of the computing device by a bus.
EXAMPLE seven
An embodiment of the present application provides a computer-readable medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements any one of the message processing methods described above.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, and functional modules/units in the devices, as claimed above, may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
Example embodiments have been applied herein, and although specific terms are employed, they are used and should be interpreted in a generic and descriptive sense only and not for purposes of limitation. In some instances, features, characteristics and/or elements described in connection with a particular embodiment may be used alone or in combination with features, characteristics and/or elements described in connection with other embodiments, unless expressly stated otherwise, as would be apparent to one skilled in the art. Accordingly, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the application as set forth in the appended claims.

Claims (10)

1. A message processing method is characterized by comprising the following steps:
acquiring a message to be processed from an incoming port of first communication equipment;
determining a first state of a first packet queue associated with source information of the packet in an ingress buffer of the first communication device and a second state of a second packet queue associated with the source information in an egress buffer of the first communication device, wherein the first state is idle or congested and the second state is idle or congested;
and processing the message according to the first state and the second state.
2. The method of claim 1, wherein the performing packet processing according to the first state and the second state comprises:
and when the first state is congestion, searching a second communication device sending the message according to the source information, and sending a first flow control message to the second communication device, wherein the first flow control message is used for indicating the second communication device to stop sending the message to the first communication device.
3. The method of claim 1, wherein the performing packet processing according to the first state and the second state comprises:
and when the first state is idle, searching a second communication device sending the message according to the source information, and sending a second flow control message to the second communication device, wherein the second flow control message is used for indicating the second communication device to send the message to the first communication device.
4. The method of claim 1, wherein the performing packet processing according to the first state and the second state comprises:
and when the first state is idle, searching a first message queue associated with the source information in the entry buffer area according to the source information, and storing the message in the first message queue.
5. The method of claim 2, wherein the performing packet processing according to the first state and the second state comprises:
and when the second state is idle, searching a second message queue associated with the source information in the outlet buffer area according to the source information, and moving the message from the first message queue to the second message queue.
6. The method of claim 2, wherein the performing packet processing according to the first state and the second state comprises:
and when the second state is congestion, forbidding to move the message from the first message queue to the second buffer area.
7. The method according to any one of claims 1-6, further comprising:
when the state of the first message queue is detected to be changed, updating the first state; and/or updating the second state when detecting that the state of the second message queue changes.
8. A message processing apparatus, comprising:
the message acquisition module is used for acquiring a message to be processed from an incoming port of the first communication equipment;
a state determining module, configured to determine a first state of a first packet queue associated with source information of the packet in an ingress buffer of the first communication device and a second state of a second packet queue associated with the source information in an egress buffer of the first communication device, where the first state is idle or congested and the second state is idle or congested;
and the message processing module is used for processing the message according to the first state and the second state.
9. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement the message processing method according to any one of claims 1-7;
one or more I/O interfaces connected between the processor and the memory and configured to enable information interaction between the processor and the memory.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out a message handling method according to any one of claims 1-7.
CN202110733721.3A 2021-06-30 2021-06-30 Message processing method and device, electronic equipment and computer readable medium Pending CN115550264A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110733721.3A CN115550264A (en) 2021-06-30 2021-06-30 Message processing method and device, electronic equipment and computer readable medium
PCT/CN2022/101435 WO2023274122A1 (en) 2021-06-30 2022-06-27 Packet processing method and apparatus, electronic device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110733721.3A CN115550264A (en) 2021-06-30 2021-06-30 Message processing method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN115550264A true CN115550264A (en) 2022-12-30

Family

ID=84691395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110733721.3A Pending CN115550264A (en) 2021-06-30 2021-06-30 Message processing method and device, electronic equipment and computer readable medium

Country Status (2)

Country Link
CN (1) CN115550264A (en)
WO (1) WO2023274122A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7719982B2 (en) * 2005-08-31 2010-05-18 Intel Corporation Switching device utilizing flow-control management
CN102404213B (en) * 2011-11-18 2014-09-10 盛科网络(苏州)有限公司 Method and system for cache management of message
CN108989235B (en) * 2018-08-28 2022-11-01 新华三技术有限公司 Message forwarding control method and device
CN112437017A (en) * 2020-11-17 2021-03-02 锐捷网络股份有限公司 Data flow control system, method, device, equipment and medium

Also Published As

Publication number Publication date
WO2023274122A1 (en) 2023-01-05

Similar Documents

Publication Publication Date Title
US8893146B2 (en) Method and system of an I/O stack for controlling flows of workload specific I/O requests
US9325637B2 (en) System for performing distributed data cut-through
US7836195B2 (en) Preserving packet order when migrating network flows between cores
EP2013759B1 (en) Detection of potential forwarding loops in bridged networks
US20170214630A1 (en) Socket management with reduced latency packet processing
EP4175232A1 (en) Congestion control method and device
US7987307B2 (en) Interrupt coalescing control scheme
CN101304389B (en) Method, apparatus and system for processing packet
CN109688063B (en) Method and device for setting large receiving and unloading function
CN110784415B (en) ECN quick response method and device
KR20160048132A (en) Filter method for adapting a computing load
CN101789908A (en) Fragmental message receiving and processing method and device
CN108566344B (en) Message processing method and device
US8509228B2 (en) Method and apparatus for prioritizing source MAC address miss processing
US7191258B2 (en) Packet forwarding system having a control packet processor which allocates the bandwidth for a control packet adaptively and processing method thereof
CN116032861A (en) Message processing method and device
CN113157465B (en) Message sending method and device based on pointer linked list
EP1351439A1 (en) Embedded system for broadcast traffic congestion control in communication network
US20230283578A1 (en) Method for forwarding data packet, electronic device, and storage medium for the same
CN115550264A (en) Message processing method and device, electronic equipment and computer readable medium
CN114885018B (en) Message pushing method, device, equipment and storage medium based on double queues
CN115967687A (en) Method for fast forwarding message, network device, storage medium and computer program product
CN114567566A (en) Message processing method, device, terminal equipment and storage medium
CN110336759B (en) RDMA (remote direct memory Access) -based protocol message forwarding method and device
US7313093B1 (en) Methods and apparatus for selectively discarding packets during overload conditions

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination