CN115883484A - Message forwarding method, device, equipment and storage medium - Google Patents

Message forwarding method, device, equipment and storage medium Download PDF

Info

Publication number
CN115883484A
CN115883484A CN202111120953.8A CN202111120953A CN115883484A CN 115883484 A CN115883484 A CN 115883484A CN 202111120953 A CN202111120953 A CN 202111120953A CN 115883484 A CN115883484 A CN 115883484A
Authority
CN
China
Prior art keywords
priority
message
message flow
type
flow
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
CN202111120953.8A
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.)
Suzhou Centec Communications Co Ltd
Original Assignee
Suzhou Centec Communications Co Ltd
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 Suzhou Centec Communications Co Ltd filed Critical Suzhou Centec Communications Co Ltd
Priority to CN202111120953.8A priority Critical patent/CN115883484A/en
Publication of CN115883484A publication Critical patent/CN115883484A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present disclosure relates to a message forwarding method, a device and a storage medium, wherein the message forwarding method is applied to a network chip, and the method comprises the following steps: dynamically determining the first type priority of the received message flow; when the first type priority of the message flow is the first priority, the message flow is mapped to a first outlet channel; when the first type priority of the message flow is a second priority, mapping the message flow to a second outlet channel; when the first egress channel is mapped with a packet stream, the packet stream mapped with the first egress channel is forwarded from the egress port preferentially over the packet stream mapped with the second egress channel. The embodiment of the disclosure can provide deterministic forwarding delay for a high-priority packet, and can ensure that a high-priority data stream is not affected even in a congested scene, thereby providing support for an ethernet environment with a high real-time requirement for data transmission.

Description

Message forwarding method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of network communication technologies, and in particular, to a method, an apparatus, a device, and a storage medium for forwarding a packet.
Background
Since ethernet is by nature a non-deterministic network, in some fields such as industrial automation, automatic driving, and other related fields, the requirement for determinism is high, i.e., even if network traffic is congested, it is necessary to ensure that the delay of high priority traffic is certain.
When network traffic is congested, the bandwidth received by the egress end of the device exceeds the maximum bandwidth that can be borne by the port itself, so that packet loss occurs to the data stream, and thus traffic with high priority is lost and delay is uncertain.
In the related art, a device supporting QoS (Quality of Service) can be divided into a plurality of queues at an egress end, and the egress queues are scheduled in absolute priority, and enter different queues through a priority field in a message, thereby ensuring that a high-priority message enters the egress end first. However, the priority policy depends on the priority field of the packet to perform rough classification, which easily causes packet loss of the packet stream due to unreasonable absolute priority scheduling for the high-priority packet stream, and thus it is difficult to ensure that the delay of the high-priority traffic is determined in an actual application scenario, and the priority policy cannot be applied to an ethernet environment with a high requirement on real-time data transmission.
Disclosure of Invention
The embodiment of the disclosure provides a message forwarding method, a message forwarding device, message forwarding equipment and a storage medium.
The technical scheme of the disclosure is realized as follows:
in a first aspect, a method for forwarding a packet is provided, where the method is applied to a network chip, and the method includes:
dynamically determining the first type priority of the received message flow;
when the first type priority of the message flow is a first priority, mapping the message flow to a first outlet channel;
when the first type priority of the message flow is a second priority, mapping the message flow to a second outlet channel;
when the first outlet channel is mapped with the message flow, the message flow mapped with the first outlet channel is preferentially forwarded from an outlet end compared with the message flow mapped with the second outlet channel.
In the above technical solution, the dynamically determining the first class priority of the received packet stream includes:
acquiring preset information corresponding to the message flow according to preset configuration information;
and mapping the preset information in a priority mapping table to obtain the first type of priority of the message flow.
In the above technical solution, the obtaining the preset information corresponding to the packet flow according to the preset configuration information includes:
extracting message characteristics of the message flow;
and matching preset information corresponding to the message characteristics from a pre-configured message matching rule list.
In the above technical solution, the message characteristics include: at least one of a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
In the above technical solution, before the step of dynamically determining the first type priority of the received packet stream, the method further includes:
and generating the preset configuration information according to the configuration operation information of the preset information corresponding to the message flow.
In the above technical solution, the preset information includes: transmission priority and/or drop priority.
In the above technical solution, the method further includes:
determining a priority field carried by the message flow;
the dynamically determining the first type of priority of the received message stream includes:
and mapping the combination of the priority field and the preset information in the priority mapping table to obtain the first class priority of the message flow.
In a second aspect, a packet forwarding apparatus is provided, which is applied to a network chip, and includes:
the determining module is used for dynamically determining the first type priority of the received message flow;
the mapping module is used for mapping the message flow to a first outlet channel when the first type priority of the message flow is a first priority;
the mapping module is further configured to map the packet stream to a second egress channel when the first type priority of the packet stream is a second priority;
and the forwarding module is used for preferentially forwarding the message flow mapped with the first outlet channel from an outlet end compared with the message flow mapped with the second outlet channel when the first outlet channel is mapped with the message flow.
In the above technical solution, the determining module includes:
an obtaining unit, configured to obtain preset information corresponding to the packet stream according to preset configuration information;
and the mapping unit is used for mapping the preset information in a priority mapping table to obtain the first type of priority of the message flow.
In the above technical solution, the obtaining unit is specifically configured to:
extracting message characteristics of the message flow;
and matching preset information corresponding to the message characteristics from a pre-configured message matching rule list.
In the above technical solution, the message characteristics include: at least one of a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
In the above technical solution, the apparatus further includes a configuration module, where the configuration module is configured to:
and generating the preset configuration information according to the configuration operation information of the preset information corresponding to the message flow.
In the above technical solution, the preset information includes: transmission priority and/or drop priority.
In the above technical solution, the determining module further includes a determining unit;
the determining unit is configured to determine a priority field carried by the packet stream;
the mapping unit is further configured to map the combination of the priority field and the preset information in the priority mapping table to obtain the first type of priority of the packet stream.
In a third aspect, a computer device is provided, which includes a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program to perform the message forwarding method in any one of the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, in which a computer program is stored, where the computer program is configured to execute the packet forwarding method in any one of the first aspect when running.
According to the message forwarding method, the message forwarding device, the message forwarding equipment and the message forwarding storage medium, the first type of priority of the received message flow is dynamically determined, and when the first type of priority of the message flow is the first priority, the message flow is mapped to the first outlet channel; when the first type priority of the message flow is the second priority, the message flow is mapped to a second outlet channel; when the first egress channel is mapped with a packet stream, the packet stream mapped with the first egress channel is forwarded from the egress port preferentially over the packet stream mapped with the second egress channel. Because the first class priority of the message flow is dynamically determined, the priority scheduling of the message flow between the outlet channels is not absolute priority scheduling but dynamic scheduling, so that the rationality of the priority scheduling of the message flow can be realized, and the situation of message packet loss caused by unreasonable scheduling priority is reduced to a certain extent. Therefore, deterministic forwarding delay can be provided for high-priority messages from a network chip forwarding Pipeline (Pipeline), and high-priority data streams can be guaranteed not to be influenced even in a congestion scene, so that support is provided for an Ethernet environment with high real-time requirement on data transmission.
Drawings
Fig. 1 is a schematic view of a scenario provided by an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a message forwarding method according to an embodiment of the present disclosure;
fig. 3 is another schematic flow chart of a message forwarding method according to an embodiment of the present disclosure;
fig. 4 is a further flowchart illustrating a message forwarding method according to an embodiment of the present disclosure;
fig. 5 is a schematic flowchart of another packet forwarding method according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a packet forwarding apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more clearly and completely apparent, the technical solutions in the embodiments of the present disclosure will be described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure. The embodiments and features of the embodiments in the present disclosure may be arbitrarily combined with each other without conflict. The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
It is to be understood that the description of the embodiments of the present disclosure emphasizes the differences between the embodiments, and the same or similar parts may be referred to each other, so that the descriptions thereof are omitted for brevity.
For example, in a scenario where burst traffic causes congestion, referring to fig. 1, it is assumed that a port a and a port B of a certain network device are respectively an ingress port, a port C is an egress port, broadband rates of the three ports are all 10G, and traffic on the port B is high-priority traffic. When a port a and a port B send data packets to a port C at the same time at the rate of 10G in a certain time period, at this time, the port C loses packets because the received bandwidth exceeds the maximum bandwidth that the port itself can bear, and how to ensure that traffic on the port B is not lost and the time delay is determined in this scenario.
A plurality of queues are distributed on an outlet end of the equipment through QoS, the outlet queues are scheduled in absolute priority, and different queues are arranged through priority fields in messages, so that the high-priority messages are guaranteed to enter the outlet end first. However, the priority policy depends on the priority field of the packet, which easily causes packet loss of the packet stream due to unreasonable absolute priority scheduling for the high-priority packet stream, so that it is difficult to ensure that the time delay of the high-priority traffic is determined in an actual application scenario, and the method cannot be applied to an ethernet environment with a high real-time requirement on data transmission.
Therefore, the embodiment of the present disclosure provides a message forwarding method, which may be applied to a network chip, where the network chip may be an Application Specific Integrated Circuit (ASIC) chip or other chips, and may specifically be adjusted accordingly according to actual situations.
Referring to fig. 2, a method for forwarding a packet according to an embodiment of the present disclosure may include:
a first type of priority of a received message stream is dynamically determined 201.
Wherein the message flow is composed of at least one message with the same message characteristics.
The message characteristics may be determined from at least one field in the message header. For example, a plurality of messages having the same source IP address constitute a message flow.
The message characteristics may also be determined according to an ingress port of the network chip for receiving the message, for example, a message flow is formed by a plurality of messages received by the same ingress port.
The message flow may be an ethernet frame flow, or a message flow composed of other messages, for example, an IP message.
Here, the first type of priority of the message flow is used for representing the priority order of forwarding the message flow by the network chip.
It can be understood that different message flows may have different priorities, for example, for a message flow with a higher importance level, the corresponding priority is higher, and if the importance level is lower, the corresponding priority of the message flow is lower.
In particular, the first type of priority of the received message stream may be dynamically determined, where the first type of priority of the message stream is temporarily determined by the network chip after receiving the message stream, rather than being predetermined before the message stream is sent to the network chip.
The first type of priority of the dynamically determined message flow may be different from the second type of priority indicated by the priority field carried by the message flow itself.
202, when the first type priority of the message flow is the first priority, mapping the message flow to the first outlet channel.
Here, the first type of priority of the packet flow may be divided into a first priority and a second priority, and the first priority is higher than the second priority.
Accordingly, the egress port of the network chip may be divided into a first egress channel and a second egress channel.
The first outlet channel corresponds to the first priority and is used for transmitting the message flow with the first priority.
The second outlet channel corresponds to the second priority and is used for transmitting the message flow with the second priority.
In practical applications, the first priority packet stream may be marked as an EMAC (Express Media Access Control) packet stream, and the second priority packet stream may be marked as a PMAC (preemptible Media Access Control) packet stream.
Specifically, when the first type priority of the packet flow is the first priority, the packet flow is associated with the identifier of the first egress channel, and the packet flow is transmitted to the first egress channel.
And 203, when the first type priority of the message flow is the second priority, mapping the message flow to a second outlet channel.
Specifically, when the first type priority of the message flow is the second priority, the identifier of the second egress channel is associated with the message flow, and the message flow is transmitted to the second egress channel.
204, when the first egress channel is mapped with the packet stream, forwarding the packet stream mapped with the first egress channel from the egress port preferentially over the packet stream mapped with the second egress channel.
Specifically, when a message flow is mapped to the first egress channel, the message flow mapped to the first egress channel is transmitted to the first egress channel, and is preferentially forwarded from the egress port to the outside compared with the message flow mapped to the second egress channel.
In practical applications, when a first egress channel is mapped with a packet stream, the second egress channel may be closed or disabled to stop transmission of the packet stream mapped with the second egress channel, and forward the packet stream mapped with the first egress channel to the outside from the egress port preferentially through the first egress channel.
And after the first outlet channel finishes the transmission of the message flow, starting the transmission of the message flow mapped with the second outlet channel.
In the message forwarding method, the first type priority of the received message flow is dynamically determined, and when the first type priority of the message flow is the first priority, the message flow is mapped to a first outlet channel; when the first type priority of the message flow is the second priority, the message flow is mapped to a second outlet channel; when the first egress channel is mapped with a packet stream, the packet stream mapped with the first egress channel is forwarded from the egress port preferentially over the packet stream mapped with the second egress channel.
Because the first class priority of the message flow is dynamically determined, the priority scheduling of the message flow between the outlet channels is not absolute priority scheduling but dynamic scheduling, so that the rationality of the priority scheduling of the message flow can be realized, and the situation of message packet loss caused by unreasonable scheduling priority is reduced to a certain extent.
Therefore, deterministic forwarding time delay can be provided for the high-priority message from a network chip forwarding pipeline, and the high-priority data stream can be guaranteed not to be influenced even in a congested scene, so that support is provided for an Ethernet environment with high real-time data transmission requirements.
In an embodiment, as shown in fig. 3, the dynamically determining the first type of priority of the received packet stream in step 201 may include:
301, obtaining preset information corresponding to the message flow according to the preset configuration information.
The preset configuration information is stored in the network chip, and the preset configuration information includes different preset information set for different message flows.
Here, different message flows can be distinguished according to message characteristics. The message characteristics may be determined from fields other than the priority field carried by the message stream.
For example, the message characteristics may be one or more of a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
And 302, mapping the preset information in a priority mapping table to obtain the first type of priority of the message flow.
Specifically, after the preset information corresponding to the packet flow is obtained, the priority mapping table may be queried according to the preset information, and the first type priority of the packet flow is determined according to the priority mapping result.
The priority mapping table is preset with a mapping relation between preset information and the first type of priority. The mapping relationship between the preset information and the first-type priority may be a many-to-one relationship.
In the embodiment of the present disclosure, preset information corresponding to a message stream is obtained through preset configuration information, and priority mapping is performed on the preset information, so as to obtain a first type of priority of the message stream. In this way, it can be specified which packet has a higher priority based on the preset configuration information, so that the priority scheduling of the packet flow between the egress channels is not absolute priority scheduling, but dynamic scheduling. Therefore, the rationality of the priority scheduling of the message flow is realized, the situation of message packet loss caused by unreasonable scheduling priority is reduced to a certain extent, and the certainty of the time delay of a high-priority message is ensured.
In an embodiment, as shown in fig. 4, in the step 301, acquiring preset information corresponding to a packet stream according to preset configuration information may include:
401, the message characteristics of the message stream are extracted.
Specifically, the header of the packet flow is analyzed to obtain at least one field in the header, and the packet characteristic of the packet flow is determined according to the at least one field in the header.
Here, at least one field for determining the message characteristics of the message flow may be set according to the actual application requirement, and is not limited specifically here.
In one example, to make deterministic low-latency traffic forwarding unrestricted by the priority field content in the message, at least one field used to determine the message characteristics of the message flow may be different from the priority field in the message flow.
In one example, the message characteristics include: at least one of a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
And 402, matching preset information corresponding to the message characteristics from a pre-configured message matching rule list.
The message matching rule list comprises a plurality of pre-configured table items. And different table entries are used for matching different message characteristics to obtain corresponding preset information.
The message matching rule List may specifically be an Access Control List (ACL). The ACL comprises a plurality of ACL entries, and each ACL entry stores a value of a message characteristic and preset information corresponding to the value of the message characteristic.
Specifically, after the message features in the message stream are extracted, the value of the message feature may be used as a search key, a table entry corresponding to the value of the message feature is searched in a preconfigured message matching rule list, and preset information corresponding to the value of the message feature is matched from the table entry.
For example, taking a source IP address as a message feature, the message matching rule list may be searched according to a value of the source IP address, and when the value of the source IP address belongs to a source IP address range specified by a certain entry, preset information corresponding to the source IP address range in the entry may be determined as preset information corresponding to the value of the source IP address.
It can be understood that, corresponding preset information may also be matched from the message matching rule list by combining a plurality of message features, which is not specifically limited in this disclosure.
In one embodiment, before step 201 is performed, the method may further comprise:
and generating preset configuration information according to the configuration operation information of the preset information corresponding to the message flow.
Specifically, a configuration interface is provided for a user to receive configuration operation information, wherein the configuration interface includes message characteristics of a message flow and preset information options, and the configuration operation information includes a corresponding relationship established on the configuration interface for the message characteristics of the message flow and the preset information options.
In the embodiment of the present disclosure, the preset information corresponding to different message flows is set according to the message characteristics, so that the preset information corresponding to the message flow can be determined subsequently according to the source IP address, the source port, the destination IP address, the destination port, or the transport layer protocol of the message flow, and then the first class priority of the message flow is determined.
In addition, through the setting of the configuration interface, a user can configure the preset information corresponding to different message flows through the configuration interface, so that the configuration requirements of the user on the preset information corresponding to different message flows can be met.
In one embodiment, the preset information includes: transmission priority and/or drop priority.
The preset information corresponding to the packet flow may be a transmission priority.
In practical applications, the higher the transmission priority corresponding to a message flow, the easier the message flow is to be transmitted.
The preset information may be marked using marking information, which may be a text mark, for example, the transmission priority is "first level" indicating that the transmission priority is higher, and the transmission priority is "second level" indicating that the transmission priority is lower. Further, the label information may also be a numeric label or an alphabetical label, or the like.
The preset information corresponding to the packet flow may be a discarding priority. The discarding priority is used for indicating the discarding sequence of the messages when the network is congested.
In practical applications, the drop priority may be expressed using the color of the message. The color of the message has three values, and the discarding priority is Green, yellow and Red from low to high in sequence.
In an example, when the preset information includes a transmission priority and a drop priority, in the step 302, mapping the preset information in a priority mapping table to obtain a first type of priority of the packet flow may include:
and mapping the combination of the transmission priority and the discarding priority in a priority mapping table to obtain the first type of priority of the message flow.
In the embodiment of the present disclosure, the determination of the first class priority of the packet flow does not depend on single preset information, but is determined by mapping in the priority mapping table based on the combination of the transmission priority and the drop priority, so that the first class priority of the packet flow is determined by two kinds of preset information, the priority of the packet flow can be finely divided, and thus, a complex application scenario can be effectively dealt with.
In one embodiment, the method may further comprise:
determining a priority field carried by a message flow; wherein the priority field indicates a second type of priority.
Here, the first type of priority may be higher than the second type of priority.
In step 201, dynamically determining the first type of priority of the received packet stream may include:
and mapping the combination of the priority field and the preset information in a priority mapping table to obtain the first type of priority of the message flow.
Here, the priority field may include: a cos (Code of service) field or a dscp (Differentiated Services Code Point) field.
In the embodiment of the present disclosure, by combining the priority field in the message stream and the preset information corresponding to the message stream acquired according to the preset configuration information, the dynamic priority of the message stream is dynamically determined by combining multiple information, and the reasonability of priority scheduling of the message stream can be further ensured.
Next, referring to fig. 5, an ASIC chip is taken as an example to illustrate a message forwarding method provided in the embodiment of the present disclosure. And the single port of the ASIC chip can simultaneously output PMAC and EMAC, and the ASIC chip preferentially schedules the message flow redirected to the channel corresponding to the EMAC.
As shown in fig. 5, the specific flow of the packet forwarding method is as follows:
1, the message flow performs message matching in an Internet Protocol (IPE) of the ASIC chip through a preconfigured Access Control List (ACL) to obtain a corresponding preset priority and color.
And 2, carrying out flow mapping on the priority and the color matched by the ACL in a priority mapping table, and determining whether the message flow is high-priority flow.
The priority mapping table is preconfigured with first priorities mapped by different preset priority and color combinations.
And 3, when the message flow is determined to be the high-priority flow, redirecting the message flow to a channel corresponding to the EMAC.
And 4, when the message flow is determined not to be the high-priority flow, redirecting the message flow to a channel corresponding to the PMAC.
And 5, the ASIC chip preferentially schedules and redirects the message flow of the channel corresponding to the EMAC.
In the message forwarding method provided by the embodiment of the disclosure, with the aid of an ASIC chip, a single port can simultaneously output 2 MACs (PMAC and EMAC, respectively), and each of the 2 MACs has a corresponding egress channel (channel).
The ASIC chip may match priorities and coloring to the packet flows based on configured ACLs of the user, and may designate a combination of one or more priorities and colors as a high priority channel (i.e., a channel corresponding to the EMAC) according to the priority mapping table.
Therefore, which message goes through the channel with high priority and which message goes through the channel with low priority can be designated based on specific flow, deterministic forwarding delay is provided for the high-priority message from the chip forwarding pipeline, and EMAC data flow with high priority can be guaranteed not to be influenced even in a congestion scene, so that support is provided for an Ethernet environment with high real-time requirement of data transmission.
Referring to fig. 6, an embodiment of the present disclosure provides a packet forwarding apparatus, which is applied to a network chip, and the apparatus includes:
a determining module 601, configured to dynamically determine a first type of priority of a received packet stream;
a mapping module 602, configured to map the packet flow to a first egress channel when the first type priority of the packet flow is a first priority;
the mapping module 602 is further configured to map the packet flow to a second egress channel when the first type priority of the packet flow is the second priority;
a forwarding module 603, configured to, when a packet stream is mapped to the first egress channel, preferentially forward the packet stream mapped to the first egress channel from the egress port compared with the packet stream mapped to the second egress channel.
In one embodiment, the determining module 601 includes:
the acquisition unit is used for acquiring preset information corresponding to the message flow according to the preset configuration information;
and the mapping unit is used for mapping the preset information in the priority mapping table to obtain the first class priority of the message flow.
In an embodiment, the obtaining unit is specifically configured to:
extracting message characteristics of a message stream;
and matching preset information corresponding to the message characteristics from a pre-configured message matching rule list.
In one embodiment, the message characteristics include: at least one of a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
In one embodiment, the apparatus further comprises a configuration module to:
and generating preset configuration information according to the configuration operation information of the preset information corresponding to the message flow.
In one embodiment, the preset information includes: transmission priority and/or drop priority.
In one embodiment, the determining module further comprises a determining unit;
a determining unit, configured to determine a priority field carried by a packet flow; wherein the priority field indicates a second type of priority;
and the mapping unit is also used for mapping the combination of the priority field and the preset information in a priority mapping table to obtain the first class priority of the message flow.
It should be noted that: in the message forwarding apparatus provided in the foregoing embodiment, when executing the message forwarding method, only the division of each program module is taken as an example, and in practical applications, the processing distribution may be completed by different program modules according to needs, that is, the internal structure of the apparatus is divided into different program modules, so as to complete all or part of the processing described above. In addition, the message forwarding apparatus and the message forwarding method provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are described in detail in the method embodiments, and are not described herein again.
Fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure; as shown in fig. 7, the computer device 700 includes: a memory 701 and a processor 702, the memory 701 having a computer program stored therein, the processor 702 being configured to execute the computer program to perform the following operations:
dynamically determining the first type priority of the received message flow;
when the first type priority of the message flow is the first priority, mapping the message flow to a first outlet channel;
when the first type priority of the message flow is the second priority, the message flow is mapped to a second outlet channel;
when the first outlet channel is mapped with the message flow, the message flow mapped with the first outlet channel is forwarded from the outlet end of the network chip preferentially compared with the message flow mapped with the second outlet channel.
In practice, the computer device 700 may further include: at least one network interface 703. The various components in the computer device 700 are coupled together by a bus system 704. It is understood that the bus system 704 is used to enable communications among the components. The bus system 704 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are designated as bus system 704 in FIG. 7. The number of the processors 701 may be at least one. The network interface 703 is used for wired or wireless communication between the computer device 700 and other devices.
The memory 702 in the disclosed embodiments is used to store various types of data to support the operation of the computer device 700.
The method disclosed by the embodiment of the present disclosure may be applied to the processor 701, or implemented by the processor 701. The processor 701 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 701. The Processor 701 may be a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The processor 701 may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present disclosure. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present disclosure may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 702, and the processor 701 may read the information in the memory 702 and perform the steps of the aforementioned methods in conjunction with its hardware.
In an exemplary embodiment, the computer Device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, programmable Logic Devices (PLDs), complex Programmable Logic Devices (CPLDs), field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro Controllers (MCUs), microprocessors (microprocessors), or other electronic components for performing the aforementioned methods.
An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the following operations when running:
dynamically determining the first type priority of the received message flow;
when the first type priority of the message flow is the first priority, the message flow is mapped to a first outlet channel;
when the first type priority of the message flow is the second priority, the message flow is mapped to a second outlet channel;
when the first outlet channel is mapped with the message flow, the message flow mapped with the first outlet channel is forwarded from the outlet end of the network chip preferentially compared with the message flow mapped with the second outlet channel.
In the several embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of a unit is only one logical function division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or in other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various media capable of storing program codes.
Alternatively, the integrated unit of the present disclosure may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods of the embodiments of the present disclosure. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media capable of storing program code.
It should be noted that: "first," "second," and the like are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
In addition, the technical solutions described in the embodiments of the present disclosure can be arbitrarily combined without conflict.
The above description is only for the specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present disclosure, and shall cover the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (10)

1. A message forwarding method is applied to a network chip, and is characterized by comprising the following steps:
dynamically determining the first type priority of the received message flow;
when the first type priority of the message flow is a first priority, mapping the message flow to a first outlet channel;
when the first type priority of the message flow is a second priority, mapping the message flow to a second outlet channel;
when the first outlet channel is mapped with the message flow, the message flow mapped with the first outlet channel is preferentially forwarded from an outlet end compared with the message flow mapped with the second outlet channel.
2. The method of claim 1, wherein dynamically determining the first type of priority for the received packet stream comprises:
acquiring preset information corresponding to the message flow according to preset configuration information;
and mapping the preset information in a priority mapping table to obtain the first type of priority of the message flow.
3. The method according to claim 2, wherein the obtaining preset information corresponding to the packet flow according to preset configuration information includes:
extracting message characteristics of the message flow;
and matching preset information corresponding to the message characteristics from a pre-configured message matching rule list.
4. The method of claim 3, wherein the message characteristics comprise: at least one of a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol.
5. The method of claim 2, wherein prior to the step of dynamically determining the first type of priority of the received packet stream, the method further comprises:
and generating the preset configuration information according to the configuration operation information of the preset information corresponding to the message flow.
6. The method of claim 2, wherein the preset information comprises: transmission priority and/or drop priority.
7. The method of claim 6, further comprising:
determining a priority field carried by the message flow; wherein the priority field indicates a second type of priority;
the dynamically determining the first type of priority of the received message stream includes:
and mapping the combination of the priority field and the preset information in the priority mapping table to obtain the first type of priority of the message flow.
8. A message forwarding device is applied to a network chip, and the device comprises:
the determining module is used for dynamically determining the first class priority of the received message flow;
the mapping module is used for mapping the message flow to a first outlet channel when the first type priority of the message flow is a first priority;
the mapping module is further configured to map the packet stream to a second egress channel when the first type priority of the packet stream is a second priority;
and the forwarding module is used for preferentially forwarding the message flow mapped with the first outlet channel from an outlet end compared with the message flow mapped with the second outlet channel when the first outlet channel is mapped with the message flow.
9. A computer device comprising a memory and a processor, wherein the memory has stored therein a computer program, and the processor is configured to execute the computer program to perform the message forwarding method according to any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is arranged to execute the message forwarding method according to any one of claims 1 to 7 when the computer program runs.
CN202111120953.8A 2021-09-24 2021-09-24 Message forwarding method, device, equipment and storage medium Pending CN115883484A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111120953.8A CN115883484A (en) 2021-09-24 2021-09-24 Message forwarding method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111120953.8A CN115883484A (en) 2021-09-24 2021-09-24 Message forwarding method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115883484A true CN115883484A (en) 2023-03-31

Family

ID=85762386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111120953.8A Pending CN115883484A (en) 2021-09-24 2021-09-24 Message forwarding method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115883484A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116668376A (en) * 2023-07-19 2023-08-29 井芯微电子技术(天津)有限公司 Ethernet controller

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116668376A (en) * 2023-07-19 2023-08-29 井芯微电子技术(天津)有限公司 Ethernet controller
CN116668376B (en) * 2023-07-19 2024-02-13 井芯微电子技术(天津)有限公司 Ethernet controller

Similar Documents

Publication Publication Date Title
CN110535782B (en) Message processing method, device and system for realizing QoS guarantee
EP3866414A1 (en) Message processing method, apparatus, device and system
CN103428094B (en) Message forwarding method in open flows OpenFlow system and device
WO2021180073A1 (en) Packet transmission method and device, network node, and storage medium
CN112994961B (en) Transmission quality detection method, device, system and storage medium
CN102132511B (en) Method, device and system for providing virtual switch quality of service for virtual machines
US8964537B2 (en) Method and system for egress policy indications
US8284789B2 (en) Methods and apparatus for providing dynamic data flow queues
CN109510780B (en) Flow control method, switching chip and network equipment
US10999222B2 (en) Network device and method for selecting transmission of network device
CN106453138B (en) Message processing method and device
US8527674B2 (en) Data packet switching
US7751319B2 (en) Method and processor for classifying data packet units
US10079805B2 (en) Bypassing a firewall for authorized flows using software defined networking
CN113302885A (en) Ethernet and controller area network protocol conversion for vehicular networks
CN112600684B (en) Bandwidth management and configuration method of cloud service and related device
CN115883484A (en) Message forwarding method, device, equipment and storage medium
WO2016150020A1 (en) Scheduling flow identifier-based packet scheduling method and device
CN111385220B (en) Method and device for transmitting message
CN106921534A (en) Data traffic monitoring and managing method and device
CN105791237B (en) Protocol conversion method and device
CN109286566A (en) Qos module classification realization method and system in Hybrid interchanger
US10291517B1 (en) Generating a dummy VLAN tag for indicating quality of service classification information in a distributed routing system
US8953449B2 (en) Virtual subport data traffic management
US11658911B2 (en) System and method for low latency network switching

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