CN114301852A - Message transmission control, generation and transmission method, configuration method, equipment and medium - Google Patents

Message transmission control, generation and transmission method, configuration method, equipment and medium Download PDF

Info

Publication number
CN114301852A
CN114301852A CN202011008846.1A CN202011008846A CN114301852A CN 114301852 A CN114301852 A CN 114301852A CN 202011008846 A CN202011008846 A CN 202011008846A CN 114301852 A CN114301852 A CN 114301852A
Authority
CN
China
Prior art keywords
message
session
packet
configuration information
type
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
CN202011008846.1A
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.)
Sanechips Technology Co Ltd
Original Assignee
Sanechips Technology 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 Sanechips Technology Co Ltd filed Critical Sanechips Technology Co Ltd
Priority to CN202011008846.1A priority Critical patent/CN114301852A/en
Priority to PCT/CN2021/119623 priority patent/WO2022063126A1/en
Publication of CN114301852A publication Critical patent/CN114301852A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority

Abstract

The present disclosure provides a message transmission control method, including: reading trigger configuration information from a trigger configuration space of a current session; judging whether the current session needs to send a message or not according to the trigger configuration information; and writing the session identifier of the current session and the message information of the message to be sent into the on-chip storage device under the condition that the current session needs to send the message. The present disclosure also provides a message generating method, including: reading a session identifier of a target session and message information of a message to be sent from an on-chip storage device; reading package configuration information and a message template from a package configuration space of a target session; generating a message to be transmitted according to the message information, the package configuration information and the message template; and writing the message to be transmitted into the on-chip storage device. The present disclosure also provides a message transmission method, which can transmit a message to be transmitted in the on-chip storage device. The disclosure also provides a configuration method, an electronic device and a computer readable medium.

Description

Message transmission control, generation and transmission method, configuration method, equipment and medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a message transmission control method, a message generation method, a message transmission method, a configuration method, an electronic device, and a computer-readable medium.
Background
An Operation, Administration and Maintenance (OAM) function is important to guarantee the service quality of the network. The OAM function can detect and report the link state in real time, can manage the error of the link, provides the capability of fast switching, and is beneficial to improving the reliability of the network. With the development of network communication technology, higher and higher bandwidth and low delay requirements require more frequent and faster network operations, and meanwhile, networking modes of telecommunication networks are more and more complex and in a continuously updated state, and network operations often need to be flexibly used in combination with multiple OAM protocols.
The prior art cannot realize both OAM sending performance and flexibility.
Disclosure of Invention
The embodiment of the disclosure provides a message transmission control method, a message generation method, a message transmission method, a configuration method, an electronic device and a computer readable medium.
In a first aspect, an embodiment of the present disclosure provides a method for controlling packet transmission, including:
reading trigger configuration information of a current session from a trigger configuration space of the current session, wherein the on-chip storage device comprises a plurality of trigger configuration spaces, each trigger configuration space corresponds to one session, and the current session is one of the plurality of sessions;
judging whether the current session needs to send a message or not according to the trigger configuration information;
and under the condition that the current session needs to send the message, writing the session identifier of the current session and the message information of the message which needs to be sent by the current session into the on-chip storage device.
In some embodiments, the trigger configuration information includes at least one packet type supported by the current session, and the step of determining whether the current session needs to send a packet according to the trigger configuration information includes:
judging whether the triggering conditions of the messages of various message types are met or not according to the triggering configuration information;
and under the condition that the triggering condition of at least one message in the message types is met, judging that the current session needs to send the message.
In some embodiments, the trigger configuration information further includes transmission periods of messages of various message types, and the step of determining whether the trigger condition of the message type is satisfied according to the trigger configuration information includes:
judging whether the sending period of the message type is satisfied;
and under the condition that the sending period of the message type is met, judging that the triggering condition of the message type is met.
In some embodiments, before the step of determining whether the sending period of the packet type is satisfied, the step of determining whether the triggering condition of the packet type is satisfied according to the triggering configuration information includes:
judging whether the message of the message type is sent as a first packet or not;
judging that the triggering condition of the message type is met under the condition that the message of the message type is sent as a first packet;
and under the condition that the message of the message type is not sent in the first packet, executing the step of judging whether the sending period of the message type is met.
In some embodiments, before the step of determining whether the packet of the packet type is sent as the first packet, the step of determining whether the trigger condition of the packet type is satisfied according to the trigger configuration information further includes:
judging whether the sending condition of the message type is met;
executing the step of judging whether the message of the message type is sent as the first packet or not under the condition that the sending condition of the message type is met
And under the condition that the sending condition of the message type is not satisfied, judging that the triggering condition of the message type is not satisfied.
In some embodiments, the triggering configuration information further includes sending enabling information of the current session, and before the step of determining whether the sending condition of the packet type is satisfied, the step of determining whether the triggering condition of the packet type is satisfied according to the triggering configuration information further includes:
judging whether the sending enabling of the current session is started or not according to the sending enabling information;
executing a step of judging whether the sending condition of the message type is met or not under the condition that the sending enabling of the current session is started;
and under the condition that the sending enabling of the current session is not started, judging that the triggering condition of the message type is not met.
In some embodiments, the packet that meets the trigger condition is a packet that needs to be sent by the current session, the trigger configuration information further includes a protocol type of the current session and information to be carried of packets of various packet types, and the packet information includes the protocol type of the current session, the packet type of the packet that meets the trigger condition, and the information to be carried of the packet that meets the trigger condition.
In some embodiments, the packet transmission control method further includes:
and reading the trigger configuration information of the next session from the trigger configuration space of the next session of the current session according to the configured number of the sessions needing to be polled and the polling granularity so as to realize polling of a plurality of the sessions, wherein the polling granularity represents the time interval of two sessions before and after polling.
In some embodiments, the number of sessions that need to be polled and the granularity of polling satisfy the following formula:
the reference pulse period is the number of the sessions needing polling x the polling granularity;
the message transmission control method further comprises the following steps:
polling of a plurality of the sessions is initiated in response to a reference pulse.
In a second aspect, an embodiment of the present disclosure provides a method for generating a packet, including:
reading a session identifier of a target session and message information of a message to be sent by the target session from an on-chip storage device;
reading group package configuration information and a message template of the target session from a group package configuration space of the target session according to a session identifier of the target session, wherein the on-chip storage device comprises a plurality of group package configuration spaces, each group package configuration space corresponds to one session, and the target session is one of the sessions;
generating a message to be transmitted of the target session according to the message information, the group package configuration information and the message template;
and writing the message to be transmitted into the on-chip storage device.
In some embodiments, the step of generating the packet to be transmitted of the target session according to the packet information, the group packet configuration information, and the packet template includes:
replacing the corresponding field in the message template according to the message information;
and replacing the private header field in the message template according to the group package configuration information.
In some embodiments, the packet information includes a protocol type of the target session, a packet type of a packet that needs to be sent by the target session, and information to be carried of the packet that needs to be sent by the target session, and the step of replacing a corresponding field in the packet template according to the packet information includes:
and replacing corresponding fields in the message template according to the protocol type of the target session, the message type required to be sent by the target session and the information to be carried by the message required to be sent by the target session.
In some embodiments, the packet configuration information includes a packet length and a packet offset value, and the step of replacing the private header field in the packet template according to the packet configuration information includes:
and replacing a private header field in the message template according to the message length and the message offset value.
In some embodiments, the step of replacing the private header field in the packet template according to the set of packet configuration information further comprises:
and selecting the route of the message according to the group packet configuration information.
In some embodiments, the step of generating the packet to be transmitted of the target session according to the packet information, the group packet configuration information, and the packet template further includes:
and replacing the corresponding global configuration field in the initial message according to the global configuration information.
In some embodiments, the packet information includes a packet type of a packet that needs to be sent by the target session, and the step of generating the packet to be transmitted by the target session according to the packet information, the group packet configuration information, and the packet template includes:
and under the condition that the message type of the message needing to be sent by the target session is a self-defined message, taking the message template as the message to be transmitted.
In a third aspect, an embodiment of the present disclosure provides a packet transmission method, including:
reading a target message to be transmitted from on-chip storage equipment, wherein the target message to be transmitted is a message to be transmitted which is generated according to the message generation method of the second aspect of the embodiment of the disclosure and is written into a cache;
and transmitting the message to be transmitted by the target.
In some embodiments, before the step of reading the target message to be transmitted from the on-chip storage device, the message transmission method further includes:
determining a message to be transmitted with the highest priority in the on-chip storage device;
and determining the message to be transmitted with the highest priority as the target message to be transmitted.
In some embodiments, the step of determining the message to be transmitted with the highest priority in the on-chip storage device includes:
and determining the message to be transmitted with the highest priority according to the shaping signal and the backpressure signal.
In some embodiments, before the step of reading the target message to be transmitted from the on-chip storage device, the message transmission method further includes:
judging whether a message to be transmitted exists in the on-chip storage equipment or not according to a preceding-stage cache empty-full signal;
and under the condition that the message to be transmitted exists in the on-chip storage equipment, executing a step of reading a target message to be transmitted from the on-chip storage equipment.
In a fourth aspect, an embodiment of the present disclosure provides a configuration method, including:
respectively configuring trigger configuration information of each session in trigger configuration spaces of a plurality of sessions, wherein the trigger configuration information is used for judging whether each session needs to send a message or not, an on-chip storage device of a chip comprises a plurality of trigger configuration spaces, and each trigger configuration space corresponds to one session;
respectively configuring group package configuration information and a message template of each session in a plurality of group package configuration spaces of the sessions, wherein the group package configuration information and the message template are used for generating messages to be transmitted of the sessions when the sessions need to send the messages, an on-chip storage device of the chip comprises a plurality of group package configuration spaces, and each group package configuration space corresponds to one session.
In some embodiments, the trigger configuration information includes at least one of a protocol type of the session, at least one packet type supported by the session, a transmission cycle of a packet of each of the packet types, transmission enabling information of the session, and information to be carried of a packet of each of the packet types.
In some embodiments, the set of packet configuration information includes at least one of a packet length, a packet offset value.
In some embodiments, the configuration method further comprises:
configuring the number of the sessions needing polling and a polling granularity, wherein the polling granularity represents the time interval between the two sessions before and after polling.
In some embodiments, the number of sessions that need to be polled and the granularity of polling satisfy the following formula:
the base pulse period is the number of sessions that need to be polled x the polling granularity.
In a fifth aspect, an embodiment of the present disclosure provides an electronic device, including:
one or more processors;
a storage device having one or more programs stored thereon that, when executed by the one or more processors, cause the one or more processors to implement at least one of the following methods:
according to the message transmission control method of the first aspect of the embodiment of the present disclosure;
a message generation method according to a second aspect of the embodiment of the present disclosure;
according to the message transmission method of the third aspect of the embodiment of the present disclosure;
the configuration method according to the fourth aspect of the embodiment of the present disclosure.
In a sixth aspect, the disclosed embodiments provide a computer readable medium, on which a computer program is stored, which when executed by a processor, implements at least one of the following methods:
according to the message transmission control method of the first aspect of the embodiment of the present disclosure;
a message generation method according to a second aspect of the embodiment of the present disclosure;
according to the message transmission method of the third aspect of the embodiment of the present disclosure;
the configuration method according to the fourth aspect of the embodiment of the present disclosure.
In the message transmission control method provided by the embodiment of the disclosure, a trigger configuration space for storing trigger configuration information of each session is allocated to a plurality of sessions in an on-chip storage device, a hardware logic judges whether each session needs to send a message by reading the trigger configuration information configured to the trigger configuration space by software running on an on-board micro control unit, and the hardware logic can further assemble and transmit the message according to a session identifier of the session needing to send the message and message information in the on-chip storage device, so that a processor does not need to spend a large amount of resources to process and store a complete message, and the performance is ensured; meanwhile, in the embodiment of the disclosure, the protocol type of each session is configurable, each session can simultaneously send a plurality of messages, and the self-defined protocol type and message type are supported, so that the flexibility and the expansibility are ensured; and judging whether the message needs to be sent or not by accessing the trigger configuration space in the on-chip storage device one by one, and effectively smoothing burst flow to realize high-precision message sending.
In the message generation method provided by the embodiment of the present disclosure, a package configuration space for storing package configuration information and a message template of each session is allocated to a plurality of sessions in an on-chip storage device, and a hardware logic reads the package configuration information and the message template in the package configuration space to generate a message to be transmitted, wherein a protocol type of each session may be any one of a plurality of protocol types, and the generated message to be transmitted may be any one of the plurality of message types, thereby ensuring flexibility and extensibility; only storing a message template in the on-chip storage device without storing complete messages of various message types; when the message to be transmitted is generated according to the message template, only fields except for the shared content in the message template are needed to be configured, and the complete message is not needed to be processed, so that storage resources and calculation resources are saved.
In the message transmission method provided in the embodiment of the present disclosure, the hardware logic reads the message to be transmitted according to the second aspect of the embodiment of the present disclosure from the on-chip storage device and transmits the message. The message type of the message to be transmitted can be any one of various message types, and the protocol type of the session corresponding to the message to be transmitted can be one of various protocol types, so that the flexibility and the expansibility are ensured.
In the configuration method provided by the embodiment of the disclosure, an onboard micro-control unit configures trigger configuration information for a plurality of sessions in an on-chip storage device of a chip, so that hardware logic of the chip can judge whether each session needs to send a message by reading the trigger configuration information; an onboard micro-control unit configures package configuration information and message templates for a plurality of sessions in an on-chip storage device of a chip, so that a hardware logic of the chip can generate a message to be transmitted by reading the package configuration information and the message templates in a package configuration space, and the hardware logic of the chip further transmits the message to be transmitted; the onboard micro-control unit configures a plurality of protocol types for a plurality of sessions and configures a plurality of message types for each session, so that each session can send messages of the plurality of message types, thereby ensuring the flexibility and the expansibility, saving the computing resources and the storage resources, effectively smoothing burst flow and realizing the high-precision message sending.
Drawings
Fig. 1 is a flow chart of a message transmission control method in an implementation of the present disclosure;
fig. 2 is a flowchart of some steps in another method for controlling packet transmission according to the embodiment of the present disclosure;
fig. 3 is a flowchart of a part of steps in another message transmission control method according to an embodiment of the present disclosure;
fig. 4 is a flowchart of some steps in a message transmission control method according to another embodiment of the present disclosure;
FIG. 5 is a flow chart of a method for message generation in the practice of the present disclosure;
fig. 6 is a flowchart of a part of steps in another message generation method in the embodiment of the present disclosure;
FIG. 7 is a flowchart of some steps in another message generation method according to an embodiment of the present disclosure;
FIG. 8 is a flowchart illustrating some steps in a message generation method according to yet another embodiment of the present disclosure;
fig. 9 is a flowchart of a part of steps in a message generation method according to another embodiment of the present disclosure;
fig. 10 is a flow chart of a message transmission method in an embodiment of the present disclosure;
FIG. 11 is a flow chart of some steps in another method of message transmission according to an embodiment of the present disclosure;
FIG. 12 is a flow chart of a method of configuration in an embodiment of the disclosure;
FIG. 13 is a flow chart of some of the steps in another method of configuration in an embodiment of the present disclosure;
FIG. 14 is a block diagram of an electronic device in an embodiment of the disclosure;
FIG. 15 is a block diagram of a computer-readable medium in an embodiment of the disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present disclosure, the following describes in detail a message transmission control method, a message generation method, a message transmission method, a configuration method, an electronic device, and a computer readable medium provided in the embodiments of the present disclosure with reference to the 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.
Embodiments of the present disclosure and features of embodiments may be combined with each other without conflict.
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 disclosure. 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.
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 disclosure, and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The inventor of the embodiment of the present disclosure finds that, in the prior art, in order to ensure the flexibility of OAM, a processor needs to spend a large amount of resources to process and store a complete OAM message, resulting in very low OAM sending performance; in order to ensure the sending performance of OAM, the OAM message format needs to be solidified, resulting in poor flexibility and extensibility. The existing software and hardware implementation of OAM message transmission can not ensure the OAM transmission performance and flexibility at the same time.
In view of the above, in a first aspect, with reference to fig. 1, an embodiment of the present disclosure provides a method for controlling packet transmission, including:
in step S110, reading trigger configuration information of a current session from a trigger configuration space of the current session, where an on-chip storage device includes a plurality of trigger configuration spaces, each trigger configuration space corresponds to a session, and the current session is one of the plurality of sessions;
in step S120, determining whether the current session needs to send a message according to the trigger configuration information;
in step S130, under the condition that the current session needs to send a packet, the session identifier of the current session and the packet information of the packet that the current session needs to send are written into the on-chip storage device.
In the embodiment of the present disclosure, a trigger configuration space for storing trigger configuration information of each session is allocated to a plurality of sessions in an on-chip storage device, and the trigger configuration information of the sessions in the trigger configuration space is configured by software running on an onboard Micro Control Unit (MCU).
In the embodiment of the present disclosure, the protocol type of each session is configurable, and the embodiment of the present disclosure does not make any special limitation on the configurable protocol type. For example, protocol types include, but are not limited to: ethernet OAM, Multi-Protocol Label Switching Transport Profile (MPLS _ TP), OAM, Bidirectional Forwarding Detection (BFD). In addition, the embodiment of the disclosure also supports a customized OAM protocol type, and the customized OAM protocol type can be used for protocol extension. It should be noted that, in the embodiment of the present disclosure, when a session configures a customized OAM protocol type, the session may send any type of message.
In the embodiment of the present disclosure, each session can send an OAM message of multiple message types, and the embodiment of the present disclosure does not specially limit the message types. For example, the Packet type may include Connectivity detection (CV), BFD, Client Signal Failure (CSF), Automatic Protection Switching (APS), Alarm Indication (AIS), etc., and may also be 2544 Packet, Link-State Packet (LSP) Packet, etc. In addition, the embodiment of the disclosure also supports a user-defined message type, and the user-defined message type can be used for extension.
In the embodiment of the present disclosure, the hardware logic accesses the trigger configuration space in the on-chip storage device one by one, and determines whether each session needs to send a packet. Corresponding to each session, the triggering configuration information of the session is read through steps S110 to S130, whether the session needs to send a message is determined according to the triggering configuration information, and when the message needs to be sent, the session identifier of the session and the message information of the message that the session needs to send are written into the on-chip storage device, so that the hardware logic further assembles and transmits the message according to the session identifier of the session that needs to send the message and the message information in the on-chip storage device. The current session described in steps S110 to S130 is a session corresponding to the trigger configuration space currently accessed by the hardware logic.
The embodiment of the present disclosure does not make any special limitation on how to access the trigger configuration space in the on-chip storage device one by one, for example, the trigger configuration space in the on-chip storage device may be accessed in a polling manner, and it is determined whether a session needs to send a message. It should be noted that, in the embodiment of the present disclosure, in the process of accessing the trigger configuration spaces in the on-chip storage device one by one, two trigger configuration spaces before and after accessing are accessed, and whether a time interval exists when a message needs to be sent is determined, so that burst traffic caused by sending a message at the same time by multiple sessions can be avoided, and thus the burst traffic is effectively smoothed; and the trigger configuration space in the on-chip storage equipment is accessed one by one to judge whether the message needs to be sent or not, and the message can be sent with high precision.
The embodiment of the present disclosure does not specifically limit the specific form of the session identifier of the session. For example, the session identifier may be a session number of the session, and the hardware logic reads the trigger configuration space of the session one by one through the session numbers of the plurality of sessions. As an optional implementation manner, the session identifiers of the multiple sessions are session numbers which are numbered continuously from 0, the hardware logic first accesses a trigger configuration space corresponding to the session number 0, and determines whether the session of the session number 0 needs to send a message; and then adding 1 to the session number, accessing the trigger configuration space corresponding to the session number 1, and judging whether the session of the session number 1 needs to send messages … … in sequence until accessing the trigger configuration space corresponding to the last session number.
As an optional implementation manner, the on-chip storage device includes a First-in First-out (FIFO) memory, and in step S130, the hardware logic writes the session identifier of the current session and the message information of the message that needs to be sent by the current session into the FIFO memory in the on-chip storage device.
In the message transmission control method provided by the embodiment of the disclosure, a trigger configuration space for storing trigger configuration information of each session is allocated to a plurality of sessions in an on-chip storage device, a hardware logic judges whether each session needs to send a message by reading the trigger configuration information configured to the trigger configuration space by software running on an on-board micro control unit, and the hardware logic can further assemble and transmit the message according to a session identifier of the session needing to send the message and message information in the on-chip storage device, so that a processor does not need to spend a large amount of resources to process and store a complete message, and the performance is ensured; meanwhile, in the embodiment of the disclosure, the protocol type of each session is configurable, each session can simultaneously send a plurality of messages, and the self-defined protocol type and message type are supported, so that the flexibility and the expansibility are ensured; and judging whether the message needs to be sent or not by accessing the trigger configuration space in the on-chip storage device one by one, and effectively smoothing burst flow to realize high-precision message sending.
In the embodiment of the present disclosure, each session can simultaneously send messages of multiple message types, that is, each session can support multiple message types. When the hardware logic accesses the trigger configuration space of the session, messages of multiple message types supported by the session can be triggered completely, can be triggered partially, and can not be triggered completely. The embodiment of the present disclosure is not particularly limited in this regard. In the embodiment of the present disclosure, the trigger configuration information configured in the trigger configuration space of the on-chip storage device includes a message type supported by a session and trigger conditions of messages of various message types. And the hardware logic respectively judges whether the triggering conditions of the messages of various message types are met by accessing the triggering configuration space of the session, judges that the session does not need to send the messages when the triggering conditions of the messages of various message types are not met, and judges that the session needs to send the messages otherwise.
Accordingly, in some embodiments, the trigger configuration information includes at least one packet type supported by the current session, and referring to fig. 2, step S120 includes:
in step S121, whether the trigger condition of the message of each message type is satisfied is determined according to the trigger configuration information;
under the condition that the triggering condition of at least one message in the message types is met, judging that the current session needs to send the message;
and under the condition that the triggering conditions of the messages of the multiple message types are not satisfied, judging that the current session does not need to send the messages.
In the embodiment of the present disclosure, after an OAM connection is established, OAM entities at two ends may send OAM Protocol Data Units (PDUs) at certain time intervals as a period to detect whether the OAM connection is normal. In the embodiment of the present disclosure, a sending period of messages of various message types supported by a session is configured in a trigger configuration space of each session. In the same session, the sending periods of the messages of different message types may be the same or different, and this is not particularly limited in this embodiment of the present disclosure. As an optional implementation manner, when the hardware logic accesses the trigger configuration space of the session, whether the messages of various message types meet the trigger condition is determined according to whether the current time meets the sending cycle of the messages of various message types. Only when the time of the triggering configuration space of the hardware logic access session meets the sending period of the message, the message information of the message with the sending period meeting is written into the on-chip storage device through the step S130, and the message is further assembled and transmitted by the hardware logic, so that the sending periods of the messages of various message types are ensured.
Correspondingly, in some embodiments, the trigger configuration information further includes transmission periods of messages of various message types, and referring to fig. 3, step S121 includes:
in step S1211, it is determined whether a transmission period of the message type is satisfied;
under the condition that the sending period of the message type is met, judging that the triggering condition of the message type is met;
and under the condition that the sending period of the message type is not satisfied, judging that the triggering condition of the message type is not satisfied.
The embodiment of the present disclosure does not have to be specially limited to how to execute step S211 to determine whether the transmission period of the message satisfies. For example, when a reference pulse (3.33ms) corresponding to the transmission cycle of the message arrives according to the reference pulse of the timer, it indicates that the transmission cycle of the message is satisfied.
The embodiment of the disclosure also supports the sending of the first packet. It should be noted that, at the initial time of the process of periodically sending the message, the first time sending the message is the first packet sending. In the embodiment of the present disclosure, when a message of a certain message type is sent as a first packet, it is determined that the trigger condition of the message type is satisfied, and the message information of the message whose sending cycle is satisfied is written into the on-chip storage device through step S130, and the message is further assembled and transmitted by the hardware logic.
Accordingly, referring to fig. 3, in some embodiments, before step S1211, step S121 further includes:
in step S1212, it is determined whether the packet of the packet type is sent as the first packet;
judging that the triggering condition of the message type is met under the condition that the message of the message type is sent as a first packet;
if the message of the message type is not the first packet, step S1211 is executed.
In some embodiments, referring to fig. 3, before step S1212, step S121 further includes:
in step S1213, it is determined whether the transmission condition of the message type is satisfied;
executing step S1212 if the sending condition of the packet type is satisfied;
and under the condition that the sending condition of the message type is not satisfied, judging that the triggering condition of the message type is not satisfied.
The embodiment of the present disclosure does not make any special limitation on how to determine whether the sending condition of the message is satisfied. For example, whether the sending condition of the message is satisfied can be judged according to monitoring of the link performance, and when packet loss, time delay, jitter and the like of the link need to be measured and various flows need to be counted, the sending condition of the message is judged to be satisfied; whether the sending condition of the message is met or not can be judged according to the link fault detection and alarm, and the sending condition of the message is judged to be met when the link fault needs to be detected; whether the sending condition of the message is met can be judged according to the loop test of the link, and when the loop exists in the link, the sending condition of the message is judged to be met.
In the embodiment of the present disclosure, the software running on the onboard MCU further includes sending enable information in the trigger configuration information configured in the trigger configuration space of the session, where the sending enable information can define whether the sending enable of the session is enabled, and the hardware logic determines whether the session supports sending a message and whether the session supports sending a message type by determining whether the sending enable is enabled.
Accordingly, in some embodiments, the trigger configuration information further includes transmission enabling information of the current session, and referring to fig. 3, before step S1213, step S121 further includes:
in step S1214, determining whether the transmission enable of the current session is turned on according to the transmission enable information;
in a case where the transmission of the current session is enabled to be turned on, performing step S1213;
and under the condition that the sending enabling of the current session is not started, judging that the triggering condition of the message type is not met.
In the embodiment of the disclosure, the sending enable of the current session comprises global enable, and the global enable is started to indicate that the current session supports sending a message; the sending enable further comprises a plurality of session enables, each session enable corresponds to one message type, for example, the session enable comprises CV/BFD enable, CSF enable, APS enable, etc., and the session enable opens the message type corresponding to the current session support.
In the embodiment of the present disclosure, the hardware logic respectively determines whether the messages of various message types satisfy the trigger condition by accessing the trigger configuration space of the session, and determines that the session needs to send the message when the trigger condition of at least one message type of the message is satisfied. At this time, the message meeting the trigger condition is the message that the session needs to send. It should be noted that, there may be one or more message types of messages to be sent in the same session.
It should be noted that, in the embodiment of the present disclosure, when a message is sent, some information generally needs to be carried in the message, for example, the CSF message carries the signal failure reason information sf _ replay. As an optional implementation manner, the hardware logic in the embodiment of the present disclosure generates and transmits a message according to a protocol type of a session, a message type of a message that needs to be sent by the session, and information that the message needs to carry.
Correspondingly, in some embodiments, the packet that the trigger condition satisfies is the packet that the current session needs to send, the trigger configuration information further includes the protocol type of the current session and information to be carried of the packets of various packet types, and the packet information includes the protocol type of the current session, the packet type of the packet that the trigger condition satisfies, and the information to be carried of the packet that the trigger condition satisfies.
In the embodiment of the present disclosure, the hardware logic accesses the trigger configuration space in the on-chip storage device one by one, and determines whether each session needs to send a packet. The embodiment of the present disclosure does not make any special limitation on how to access the trigger configuration space in the on-chip storage device one by one. As an optional implementation manner, the trigger configuration space in the on-chip storage device may be accessed in a polling manner, and whether the session needs to send a message is determined.
Accordingly, referring to fig. 4, in some embodiments, the message transmission control method further includes:
in step S140, according to the configured number of sessions that need to be polled and the polling granularity, reading the trigger configuration information of the next session from the trigger configuration space of the next session of the current session to implement polling on a plurality of sessions, where the polling granularity represents a time interval between two sessions before and after polling.
It should be noted that, in the embodiment of the present disclosure, polling on multiple sessions is performed periodically, and multiple sessions that need to be polled are polled in each polling period. The time interval between two polling operations in the same session can be ensured to be a polling period, so that the sending precision is ensured. For example, the session identifiers of the multiple sessions are session numbers which are numbered continuously from 0, when a polling cycle arrives, the hardware logic first accesses a trigger configuration space corresponding to the session number 0, and judges whether the session of the session number 0 needs to send a message; then adding 1 to the session number, accessing the trigger configuration space corresponding to the session number 1, judging whether the session of the session number 1 needs to send a message … …, and so on until all the trigger configuration spaces corresponding to the session numbers are accessed; the session number to be accessed is then reset to 0 and when the next polling period comes, polling is initiated again starting from session 0.
In the embodiment of the present disclosure, the hardware logic polls a plurality of sessions according to the configured number of sessions that need to be polled and the polling granularity, so that polling moments of the plurality of sessions in one polling period can be uniformly distributed in the polling period, thereby effectively smoothing burst traffic.
As an alternative embodiment, the hardware logic initiates polling for multiple sessions each time a reference pulse of the timer arrives, i.e. the polling period is 3.33 ms.
Accordingly, in some embodiments, the number of sessions requiring polling and the polling granularity satisfy equation (1):
reference pulse period (1) number of sessions requiring polling x polling granularity
Referring to fig. 4, the packet transmission control method further includes:
in step S150, polling of a plurality of said sessions is initiated in response to a reference pulse.
In the embodiment of the disclosure, the hardware logic initiates polling on a plurality of sessions in response to the reference pulse, which can ensure that the time interval of two polling operations before and after each session is 3.33ms, and can make the error reach nanosecond level; the reference pulse is used as a polling period, so that when the sending period of any message type in a session is met, hardware logic initiates polling on a plurality of sessions, and the sending period of the message can be ensured.
In a second aspect, referring to fig. 5, an embodiment of the present disclosure provides a message generating method, including:
in step S210, a session identifier of a target session and message information of a message that needs to be sent by the target session are read from an on-chip storage device;
in step S220, reading, according to a session identifier of the target session, package configuration information and a packet template of the target session from a package configuration space of the target session, where the on-chip storage device includes a plurality of package configuration spaces, each package configuration space corresponds to a session, and the target session is one of the sessions;
in step S230, a to-be-transmitted packet of the target session is generated according to the packet information, the group packet configuration information, and the packet template;
in step S240, the message to be transmitted is written into the on-chip storage device.
In this embodiment of the present disclosure, the session identifier of the target session and the message information of the message that needs to be sent by the target session, which are read from the on-chip storage device by the hardware logic in step S210, are written into the on-chip storage device by the hardware logic through the message transmission control method according to the first aspect of the embodiment of the present disclosure.
As an alternative implementation, the hardware logic reads the session identifier of the target session and the message information of the message that needs to be sent by the target session from the FIFO memory in the on-chip storage device.
It should be noted that the on-chip storage device may store session identifiers of multiple sessions and corresponding message information of messages that the multiple sessions need to send. The target session in the embodiments of the present disclosure refers to a session being processed by hardware logic in the above multiple sessions, and is not specifically referred to a certain session.
In the embodiment of the disclosure, a group package configuration space for storing group package configuration information and message templates of each session is allocated to a plurality of sessions in the on-chip storage device, and the group package configuration information and the message templates of the sessions in the group package configuration space are configured by software running on the on-board MCU. And the hardware logic accesses the corresponding group package configuration space according to the session identification read from the on-chip storage device. The embodiment of the present disclosure does not specifically limit the specific form of the session identifier of the session. For example, the session identification may be a session number of the session.
In the embodiment of the present disclosure, a message template is configured for each session. As an optional implementation, messages of different message types of the same session share the same message template. It should be noted that the sharing of the same message template by the messages of different message types means that the message template is pre-configured with content shared by the messages of different message types, for example, in the message template, the message of different message types shares header content and next header content such as Destination Address (DA), Source Address (SA), Virtual Local Area Network (VLAN), ACH, and other user-defined content. Only storing a message template in the on-chip storage device without storing complete messages of various message types; when the message to be transmitted is generated according to the message template, only fields except for the shared content in the message template are needed to be configured, and the complete message is not needed to be processed, so that storage resources and calculation resources are saved.
As an optional implementation manner, in the embodiment of the present disclosure, part or all of the package configuration information and the message template in the package configuration space may be shared, so as to further save storage resources.
In the embodiment of the present disclosure, the protocol type of each session is configurable, and the embodiment of the present disclosure does not make any special limitation on the configurable protocol type. For example, protocol types include, but are not limited to: ethernet OAM, MPLS _ TP OAM, BFD. In addition, the embodiment of the disclosure also supports a customized OAM protocol type, and the customized OAM protocol type can be used for protocol extension. It should be noted that, in the embodiment of the present disclosure, when a session configures a customized OAM protocol type, the session may send any type of message.
In the embodiment of the present disclosure, each session can send an OAM message of multiple message types, and the embodiment of the present disclosure does not specially limit the message types. For example, the packet types may include CV, BFD, CSF, APS, AIS, etc., and may also be 2544 packets, LSP packets, etc. In addition, the embodiment of the disclosure also supports a user-defined message type, and the user-defined message type can be used for extension.
Accordingly, in step S210, the protocol type of the target session corresponding to the session identifier read by the hardware logic from the on-chip storage device may be any one of a plurality of protocol types, for example, any one of ethernet OAM, MPLS _ TP OAM, BFD, and a custom protocol type. In step S230, the packet type of the packet to be transmitted, which is generated according to the packet information read from the on-chip storage device by the hardware logic, may be any one of a plurality of packet types, for example, one of CV, BFD, CSF, APS, AIS, and custom packet types. The embodiment of the present disclosure is not particularly limited in this regard.
As an optional implementation manner, the on-chip storage device includes a scheduling cache, and in step S240, the hardware logic writes the message to be transmitted into the scheduling cache in the on-chip storage device, and further the hardware logic schedules the transmission of the message to be transmitted. As an alternative embodiment, the dispatch buffer is a FIFO memory.
In the message generation method provided by the embodiment of the present disclosure, a package configuration space for storing package configuration information and a message template of each session is allocated to a plurality of sessions in an on-chip storage device, and a hardware logic reads the package configuration information and the message template in the package configuration space to generate a message to be transmitted, wherein a protocol type of each session may be any one of a plurality of protocol types, and the generated message to be transmitted may be any one of the plurality of message types, thereby ensuring flexibility and extensibility; only storing a message template in the on-chip storage device without storing complete messages of various message types; when the message to be transmitted is generated according to the message template, only fields except for the shared content in the message template are needed to be configured, and the complete message is not needed to be processed, so that storage resources and calculation resources are saved.
In the embodiment of the present disclosure, the message template is configured with the content shared by messages of multiple message types. And the hardware logic replaces fields except the content shared by the messages of various message types in the message template according to the message information read from the on-chip storage device and the package configuration information read from the package configuration space, so that the message to be transmitted can be generated.
Accordingly, referring to fig. 6, in some embodiments, step S230 includes:
in step S231, replacing the corresponding field in the message template according to the message information;
in step S232, the private header field in the packet template is replaced according to the group packet configuration information.
It should be noted that, in the embodiment of the present disclosure, messages of different message types are generated corresponding to the same message template, and fields in the message template to be replaced may be the same or different; the message templates are different, messages of the same message type are generated, and fields in the message templates needing to be replaced can be the same or different. The embodiment of the present disclosure is not particularly limited in this regard. And the hardware logic determines the message type of the message to be sent according to the message information read from the on-chip storage device.
It should be further noted that, in the embodiment of the present disclosure, the corresponding field refers to a field capable of carrying message information in the message template.
Correspondingly, in some embodiments, the message information includes a protocol type of the target session, a message type of a message that needs to be sent by the target session, and information to be carried of the message that needs to be sent by the target session, referring to fig. 7, step S231 includes:
in step S2311, a corresponding field in the message template is replaced according to the protocol type of the target session, the type of the message that needs to be sent by the target session, and the information to be carried of the message that needs to be sent by the target session.
Accordingly, in some embodiments, the group package configuration information includes a packet length and a packet offset value, and referring to fig. 7, step S232 includes:
in step S2321, the private header field in the packet template is replaced according to the packet length and the packet offset value.
In the embodiment of the present disclosure, the hardware logic completes the routing of the packet and the replacement of the private header field in the packet template at the same time, thereby reducing the Processing overhead of a Central Processing Unit (CPU).
Accordingly, referring to fig. 7, in some embodiments, step S232 further comprises:
in step S232, routing the packet according to the group packet configuration information.
In the embodiment of the present disclosure, the packet template further includes a global configuration field, and the global configuration field is used to reduce CPU operations. In the embodiment of the disclosure, the hardware logic replaces the global configuration field in the message template according to the global configuration, thereby further reducing the CPU overhead.
Accordingly, referring to fig. 8, in some embodiments, step S230 further comprises:
in step S233, the global configuration field corresponding to the initial message is replaced according to the global configuration information.
In the embodiment of the disclosure, the session supports a custom protocol type and a custom message type. As an optional implementation manner, when the message type of the message to be sent is the user-defined message type, the field in the message template does not need to be replaced, and the message template in the package configuration space is directly read as the message to be transmitted, so that the expandability of the message is ensured.
Accordingly, referring to fig. 9, in some embodiments, step S230 further comprises:
in step S234, when the message type of the message that needs to be sent by the target session is a custom message, the message template is used as the message to be transmitted.
In a third aspect, referring to fig. 10, an embodiment of the present disclosure provides a message transmission method, including:
in step S310, a target to-be-transmitted message is read from the on-chip storage device, where the target to-be-transmitted message is a to-be-transmitted message that is generated according to the message generation method of the second aspect of the embodiment of the present disclosure and is written into the cache;
in step S320, the target message to be transmitted is transmitted.
In the embodiment of the present disclosure, multiple messages to be transmitted may be stored in the on-chip storage device at the same time, and the message types of the multiple messages to be transmitted may be the same or different. The embodiment of the present disclosure is not particularly limited in this regard. For example, the packet type may be a CV, BFD, CSF, APS, AIS, 2544 packet, LSP packet, or the like. In addition, the embodiment of the disclosure also supports a user-defined message type, and the user-defined message type can be used for extension.
In the embodiment of the present disclosure, a plurality of messages to be transmitted may correspond to the same session, or may correspond to a plurality of sessions. The embodiment of the present disclosure is not particularly limited in this regard. For example, protocol types include, but are not limited to: ethernet OAM, MPLS _ TP OAM, BFD. In addition, the embodiment of the disclosure also supports a customized OAM protocol type, and the customized OAM protocol type can be used for protocol extension.
As an optional implementation manner, the on-chip storage device includes a scheduling cache, and in step S310, the hardware logic reads the target message to be transmitted from the scheduling cache in the on-chip storage device. As an alternative embodiment, the dispatch buffer is a FIFO memory.
In the message transmission method provided in the embodiment of the present disclosure, the hardware logic reads the message to be transmitted according to the second aspect of the embodiment of the present disclosure from the on-chip storage device and transmits the message. The message type of the message to be transmitted can be any one of various message types, and the protocol type of the session corresponding to the message to be transmitted can be one of various protocol types, so that the flexibility and the expansibility are ensured.
As an optional implementation manner, the hardware logic performs scheduling transmission on the to-be-transmitted message in the on-chip storage device according to the priority of the to-be-transmitted message.
Accordingly, referring to fig. 11, in some embodiments, before step S310, the message transmission method further includes:
in step S331, determining a message to be transmitted with the highest priority in the on-chip storage device;
in step S332, the message to be transmitted with the highest priority is determined as the target message to be transmitted.
The embodiment of the disclosure makes special restrictions on how to determine the message to be transmitted with the highest priority in the on-chip storage device. As an alternative, the hardware logic determines the message to be transmitted with the highest priority according to the shaping signal and the backpressure signal.
In some embodiments, referring to fig. 11, before step S310, the message transmission method further includes
In step S340, determining whether there is a message to be transmitted in the on-chip storage device according to the pre-level cache empty/full signal;
and executing the step S310 when the message to be transmitted exists in the on-chip storage device.
In a fourth aspect, referring to fig. 12, an embodiment of the present disclosure provides a configuration method, including:
in step S410, trigger configuration information of each session is configured in trigger configuration spaces of a plurality of sessions, where the trigger configuration information is used to determine whether each session needs to send a packet, where an on-chip storage device of a chip includes a plurality of trigger configuration spaces, and each trigger configuration space corresponds to one session;
in step S420, respectively configuring group package configuration information and a message template of each session in a plurality of group package configuration spaces of the sessions, where the group package configuration information and the message template are used to generate a message to be transmitted of the session when the session needs to send a message, where an on-chip storage device of the chip includes a plurality of group package configuration spaces, and each group package configuration space corresponds to one session.
The configuration method provided by the embodiment of the disclosure is used for configuring the chip by the onboard MCU. The onboard MCU configures trigger configuration information of a plurality of sessions in an on-chip storage device of a chip, so that hardware logic of the chip can judge whether each session needs to send a message according to the message transmission control method of the first aspect of the embodiment of the disclosure; the onboard MCU configures the group package configuration information and the message template of a plurality of sessions in the on-chip storage device of the chip, so that the hardware logic of the chip can generate a message to be transmitted according to the message generation method of the second aspect of the embodiment of the disclosure.
In embodiments of the present disclosure, the onboard MCU may configure different protocol types for multiple sessions. The embodiment of the present disclosure does not specifically limit the protocol type. For example, protocol types include, but are not limited to: ethernet OAM, MPLS _ TP OAM, BFD. In addition, the embodiment of the disclosure also supports a customized OAM protocol type, and the customized OAM protocol type can be used for protocol extension. It should be noted that, in the embodiment of the present disclosure, when a session configures a customized OAM protocol type, the session may send any type of message.
In this embodiment of the present disclosure, the onboard MCU may configure multiple message types for each session, so that each session can send OAM messages of multiple message types. The message type is not particularly limited in the embodiment of the present disclosure. For example, the packet types may include CV, BFD, CSF, APS, AIS, etc., and may also be 2544 packets, LSP packets, etc. In addition, the embodiment of the disclosure also supports a user-defined message type, and the user-defined message type can be used for extension.
In the configuration method provided by the embodiment of the disclosure, an onboard MCU configures trigger configuration information for a plurality of sessions in an on-chip storage device of a chip, so that a hardware logic of the chip can judge whether each session needs to send a message by reading the trigger configuration information; an onboard MCU configures package configuration information and message templates for a plurality of sessions in an on-chip storage device of a chip, so that a hardware logic of the chip can generate a message to be transmitted by reading the package configuration information and the message templates in a package configuration space, and the hardware logic of the chip further transmits the message to be transmitted; the onboard MCU configures a plurality of protocol types for a plurality of sessions and configures a plurality of message types for each session, so that each session can send messages of a plurality of message types, thereby ensuring the flexibility and expansibility, saving computing resources and storage resources, effectively smoothing burst flow and realizing high-precision message sending.
In some embodiments, the trigger configuration information includes at least one of a protocol type of the session, at least one packet type supported by the session, a transmission cycle of a packet of each of the packet types, transmission enabling information of the session, and information to be carried of a packet of each of the packet types.
In some embodiments, the set of packet configuration information includes at least one of a packet length, a packet offset value.
In the embodiment of the disclosure, the onboard MCU configures the number of sessions to be polled and the polling granularity in the on-chip storage device of the chip, so that the hardware logic of the chip can poll multiple sessions according to the configured number of sessions to be polled and the polling granularity, and thus the polling moments of the multiple sessions in one polling cycle can be uniformly distributed in the polling cycle, thereby effectively smoothing the burst traffic.
Accordingly, referring to fig. 13, in some embodiments, the configuration method further comprises:
in step S430, the number of sessions requiring polling and the polling granularity are configured, and the polling granularity represents the time interval between two sessions before and after polling.
As an alternative embodiment, the number of sessions requiring polling and the polling granularity configured by the onboard MCU in the on-chip storage of the chip satisfy equation (2):
reference pulse period (2) number of sessions requiring polling x polling granularity
When the number of sessions to be polled and the polling granularity which are configured in the on-chip storage device of the chip meet the formula (2), the hardware logic of the chip initiates polling on a plurality of sessions each time when the reference pulse of the timer arrives, so that the burst flow can be effectively smoothed, and the sending period of the message can be ensured.
In a fifth aspect, referring to fig. 14, an embodiment of the present disclosure provides an electronic device, including:
one or more processors 101;
a memory 102 having one or more programs stored thereon that, when executed by the one or more processors, cause the one or more processors to implement at least one of the following methods:
according to the message transmission control method of the first aspect of the embodiment of the present disclosure;
a message generation method according to a second aspect of the embodiment of the present disclosure;
according to the message transmission method of the third aspect of the embodiment of the present disclosure;
the configuration method according to the fourth aspect of the embodiment of the present disclosure.
In some embodiments, the electronic device further comprises: one or more I/O interfaces 103 coupled between the processor and the memory and configured to enable information interaction between the processor and the memory.
The processor 101 is a device with data processing capability, and includes but is not limited to a Central Processing Unit (CPU) and the like; memory 102 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) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, which includes but is not limited to a data Bus (Bus) and the like.
In some embodiments, the processor 101, memory 102, and I/O interface 103 are interconnected via a bus 104, which in turn connects with other components of the computing device.
In a sixth aspect, referring to fig. 15, an embodiment of the present disclosure provides a computer readable medium, on which a computer program is stored, which when executed by a processor, implements at least one of the following methods:
according to the message transmission control method of the first aspect of the embodiment of the present disclosure;
a message generation method according to a second aspect of the embodiment of the present disclosure;
according to the message transmission method of the third aspect of the embodiment of the present disclosure;
the configuration method according to the fourth aspect of the embodiment of the present disclosure.
In order to make the technical solutions provided by the embodiments of the present disclosure more clearly understood by those skilled in the art, the technical solutions provided by the embodiments of the present disclosure are described in detail below by specific examples:
example one
In the first embodiment, all sessions are polled, and whether the current session needs to send a message is determined according to the timer and the alarm state. In this embodiment, the current session can send an ethernet OAM message, a TP1731 message, an bfd message, and a message with a custom message type. When the current conversation needs to send the message, the hardware logic writes the basic information of the message needing to be sent into the on-chip storage device, and the basic information of the message needing to be sent comprises the conversation number of the current conversation and the message type of the message needing to be sent.
In the first embodiment, the reference pulse (3.3ms) is used as the polling period. When the reference pulse of the timer comes each time, polling is initiated from the session 0, so that the interval between two polling times before and after each session is ensured to be 3.3ms, the error is in a nanosecond level, and the sending precision is improved.
In the first embodiment, for a scenario with a transmission period of 10ms, 100ms, 1s, etc., since the transmission period is an integer multiple of 3.33ms, the corresponding reference pulse and 3.33ms pulse are pulled high at the same time and last for the whole polling period.
In this embodiment one, the polling granularity and the number of polling sessions are configurable. For example, if the primary frequency is 1Ghz, 128K sessions are used totally, and only 30K sessions in a scene are used, the polling granularity is configured as 100ns, the number of polls is configured as 30K, when a reference pulse (3.3ms) arrives, polling starts from session 0, polls session 1 after 100ns, polls session 2 after 100ns, until the session 30K finishes polling, and the polling time instants of the 30K sessions are uniformly distributed in a time range of 3 ms. Therefore, the burst flow can be effectively smoothed and uniformly distributed no matter how many sessions transmit messages and no matter how many message transmission periods configured by each session transmit messages.
Example two
In the second embodiment, the hardware logic reads message information of a message to be sent from the on-chip storage device, where the message information of the message to be sent includes a session number of a session where the message is to be sent and a message type of the message to be sent; reading package configuration information and a message template according to a session number of a session needing to send a message; then replacing corresponding fields in the message template according to the package configuration information and the message type of the message to be sent, and assembling to generate a message to be transmitted; and writing the message to be transmitted into a cache.
In the second embodiment, messages of different message types in the same session share the same message template, so that the flexibility is ensured, and the cached storage resources and the CPU processing resources are saved. The message template comprises message header contents such as DA, SA, VLAN, tag, ACH and the like, and other user-definable contents. In the second embodiment, the message template is configured according to the cv/bfd message format by default. When a message to be transmitted is generated by assembling, after a message template is read from a cache, if the message to be transmitted is a cv message, the fields of rdi, seqnum and lm _ cnt are replaced; if the message to be sent is bfd message, replacing the fields of diag, sta and checksum; if the message is other messages, fields such as version, opcode, flags, TLV and the like are replaced.
In the second embodiment, the global configuration field in the message template is replaced according to the protocol type and the global configuration, and includes a TC value, a channeltype value, a mel value, and the like of the innermost label.
In the second embodiment, if the message to be sent is a message of a self-defined message type, the message template field is not replaced, and the message template configured by the CPU is directly read as the message to be transmitted, so that the expandability of the message is ensured.
EXAMPLE III
The OAM message sending process comprises the following steps:
the first step is as follows: the trigger configuration information of each session is configured in a trigger configuration space in an on-chip storage device of a chip by an on-board MCU (microprogrammed control Unit), and comprises a protocol type (an Ethernet oam/MPLS-TP oam/bfd oam/custom type) of the session, cv/bfd enabling, cc enabling, lm pre-activation enabling, csf sending type (los/fdi/rdi/dci/soft), csf triggering type (port alarm triggering/working path flow point alarm triggering/protection path flow point alarm triggering), csf triggering alarm index, aps enabling, sending period granularity, sending priority and the like;
the second step is that: the method comprises the steps that an onboard MCU configures packet configuration information of each session in a packet configuration space in an on-chip storage device of a chip, wherein the packet configuration information comprises a session sending trunk routing logic port id, a message length, a message deviation value, a checksum, a ttl, a channel type, a gal, a label, a seqnum replacement enable and the like;
the third step: an onboard MCU configures a PDU message template of each session in a group package configuration space in an on-chip storage device of a chip;
the fourth step: the on-board MCU configures a lower header corresponding to each session in a group package configuration space in an on-chip storage device of the chip;
the fifth step: the hardware logic of the chip periodically polls all sessions, and for each message type of each session, firstly, whether the global enable and the session enable are opened or not is judged, then, whether the sending condition is met or not is judged, if the sending condition is met, whether the message is sent by a first packet or not is judged, if the message is sent by the first packet, the triggering is immediately carried out, if the message is not sent by the first packet, whether the current message configuration period is matched with a current period signal or not is judged, and in order to guarantee the sending period and the sending precision, the triggering operation is carried out only when the corresponding period signal is pulled high;
and a sixth step: the hardware logic of the chip writes the message information of the message to be sent into the on-chip storage device, wherein the message information of the message to be sent includes the session number and the protocol type of the current session, and information to be carried in the message, such as sf _ replay of the csf message.
The seventh step: the hardware logic of the chip reads the package configuration information and the PDU message template according to the session number read from the on-chip storage equipment, replaces the field in the PDU message template and the field in the private header according to the protocol type of the session, the message type of the message to be sent and the information to be replaced, and then writes the assembled message to be transmitted into the scheduling cache in the on-chip storage equipment;
eighth step: and performing sp scheduling by the hardware logic of the chip according to the shaping signal and the back pressure signal of the rear-stage module, and sending out the OAM message and the 2544 message.
So far, a sending process of an OAM message is completed.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed 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 disclosed 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 disclosure as set forth in the appended claims.

Claims (27)

1. A message transmission control method comprises the following steps:
reading trigger configuration information of a current session from a trigger configuration space of the current session, wherein the on-chip storage device comprises a plurality of trigger configuration spaces, each trigger configuration space corresponds to one session, and the current session is one of the plurality of sessions;
judging whether the current session needs to send a message or not according to the trigger configuration information;
and under the condition that the current session needs to send the message, writing the session identifier of the current session and the message information of the message which needs to be sent by the current session into the on-chip storage device.
2. The packet transmission control method according to claim 1, wherein the trigger configuration information includes at least one packet type supported by the current session, and the step of determining whether the current session needs to send a packet according to the trigger configuration information includes:
judging whether the triggering conditions of the messages of various message types are met or not according to the triggering configuration information;
and under the condition that the triggering condition of at least one message in the message types is met, judging that the current session needs to send the message.
3. The message transmission control method according to claim 2, wherein the trigger configuration information further includes transmission periods of messages of various message types, and the step of determining whether the trigger condition of the message type is satisfied according to the trigger configuration information includes:
judging whether the sending period of the message type is satisfied;
and under the condition that the sending period of the message type is met, judging that the triggering condition of the message type is met.
4. The message transmission control method according to claim 3, wherein the step of determining whether the trigger condition of the message type is satisfied according to the trigger configuration information includes, before the step of determining whether the transmission cycle of the message type is satisfied:
judging whether the message of the message type is sent as a first packet or not;
judging that the triggering condition of the message type is met under the condition that the message of the message type is sent as a first packet;
and under the condition that the message of the message type is not sent in the first packet, executing the step of judging whether the sending period of the message type is met.
5. The message transmission control method according to claim 4, wherein the step of determining whether the trigger condition of the message type is satisfied according to the trigger configuration information before the step of determining whether the message of the message type is sent as the first packet further comprises:
judging whether the sending condition of the message type is met;
executing the step of judging whether the message of the message type is sent as the first packet or not under the condition that the sending condition of the message type is met
And under the condition that the sending condition of the message type is not satisfied, judging that the triggering condition of the message type is not satisfied.
6. The message transmission control method according to claim 5, wherein the trigger configuration information further includes transmission enabling information of the current session, and the step of determining whether the trigger condition of the message type is satisfied according to the trigger configuration information further includes, before the step of determining whether the transmission condition of the message type is satisfied:
judging whether the sending enabling of the current session is started or not according to the sending enabling information;
executing a step of judging whether the sending condition of the message type is met or not under the condition that the sending enabling of the current session is started;
and under the condition that the sending enabling of the current session is not started, judging that the triggering condition of the message type is not met.
7. The message transmission control method according to any one of claims 2 to 6, wherein the message whose trigger condition is satisfied is a message that needs to be sent by the current session, the trigger configuration information further includes a protocol type of the current session and information to be carried of messages of various message types, and the message information includes the protocol type of the current session, the message type of the message whose trigger condition is satisfied, and the information to be carried of the message whose trigger condition is satisfied.
8. The message transmission control method according to any of claims 1 to 6, wherein the message transmission control method further comprises:
and reading the trigger configuration information of the next session from the trigger configuration space of the next session of the current session according to the configured number of the sessions needing to be polled and the polling granularity so as to realize polling of a plurality of the sessions, wherein the polling granularity represents the time interval of two sessions before and after polling.
9. The message transmission control method according to claim 8, wherein the number of sessions to be polled and the polling granularity satisfy the following formula:
the reference pulse period is the number of the sessions needing polling x the polling granularity;
the message transmission control method further comprises the following steps:
polling of a plurality of the sessions is initiated in response to a reference pulse.
10. A message generation method comprises the following steps:
reading a session identifier of a target session and message information of a message to be sent by the target session from an on-chip storage device;
reading group package configuration information and a message template of the target session from a group package configuration space of the target session according to a session identifier of the target session, wherein the on-chip storage device comprises a plurality of group package configuration spaces, each group package configuration space corresponds to one session, and the target session is one of the sessions;
generating a message to be transmitted of the target session according to the message information, the group package configuration information and the message template;
and writing the message to be transmitted into the on-chip storage device.
11. The message generation method according to claim 10, wherein the step of generating the message to be transmitted of the target session according to the message information, the group packet configuration information, and the message template includes:
replacing the corresponding field in the message template according to the message information;
and replacing the private header field in the message template according to the group package configuration information.
12. The message generating method according to claim 11, wherein the message information includes a protocol type of the target session, a message type of a message that needs to be sent by the target session, and information to be carried of the message that needs to be sent by the target session, and the step of replacing a corresponding field in the message template according to the message information includes:
and replacing corresponding fields in the message template according to the protocol type of the target session, the message type required to be sent by the target session and the information to be carried by the message required to be sent by the target session.
13. The packet generation method of claim 11, wherein the packet configuration information includes a packet length and a packet offset value, and the step of replacing the private header field in the packet template according to the packet configuration information includes:
and replacing a private header field in the message template according to the message length and the message offset value.
14. The message generation method of claim 13, wherein replacing the private header field in the message template according to the set of packet configuration information comprises further comprising:
and selecting the route of the message according to the group packet configuration information.
15. The packet generation method according to any one of claims 11 to 14, wherein the step of generating the packet to be transmitted of the target session according to the packet information, the group packet configuration information, and the packet template further includes:
and replacing the corresponding global configuration field in the initial message according to the global configuration information.
16. The message generation method according to claim 10, wherein the message information includes a message type of a message that needs to be sent by the target session, and the step of generating the message to be transmitted by the target session according to the message information, the group packet configuration information, and the message template includes:
and under the condition that the message type of the message needing to be sent by the target session is a self-defined message, taking the message template as the message to be transmitted.
17. A message transmission method comprises the following steps:
reading a target message to be transmitted from an on-chip storage device, wherein the target message to be transmitted is a message to be transmitted which is generated according to the message generation method of any one of claims 10 to 16 and is written into a cache;
and transmitting the message to be transmitted by the target.
18. The message transmission method according to claim 17, wherein before the step of reading the target message to be transmitted from the on-chip storage device, the message transmission method further comprises:
determining a message to be transmitted with the highest priority in the on-chip storage device;
and determining the message to be transmitted with the highest priority as the target message to be transmitted.
19. The message transmission method according to claim 18, wherein the step of determining the message to be transmitted with the highest priority in the on-chip storage device comprises:
and determining the message to be transmitted with the highest priority according to the shaping signal and the backpressure signal.
20. The message transmission method according to any of claims 17 to 19, wherein, prior to the step of reading the message to be transmitted from the on-chip storage device, the message transmission method further comprises:
judging whether a message to be transmitted exists in the on-chip storage equipment or not according to a preceding-stage cache empty-full signal;
and under the condition that the message to be transmitted exists in the on-chip storage equipment, executing a step of reading a target message to be transmitted from the on-chip storage equipment.
21. A method of configuration, comprising:
respectively configuring trigger configuration information of each session in trigger configuration spaces of a plurality of sessions, wherein the trigger configuration information is used for judging whether each session needs to send a message or not, an on-chip storage device of a chip comprises a plurality of trigger configuration spaces, and each trigger configuration space corresponds to one session;
respectively configuring group package configuration information and a message template of each session in a plurality of group package configuration spaces of the sessions, wherein the group package configuration information and the message template are used for generating messages to be transmitted of the sessions when the sessions need to send the messages, an on-chip storage device of the chip comprises a plurality of group package configuration spaces, and each group package configuration space corresponds to one session.
22. The configuration method according to claim 21, wherein the trigger configuration information includes at least one of a protocol type of the session, at least one packet type supported by the session, a transmission cycle of packets of each of the packet types, transmission enabling information of the session, and information to be carried by packets of each of the packet types.
23. The configuration method of claim 21, wherein the set of packet configuration information comprises at least one of a packet length, a packet offset value.
24. The configuration method according to any one of claims 20 to 22, wherein the configuration method further comprises:
configuring the number of the sessions needing polling and a polling granularity, wherein the polling granularity represents the time interval between the two sessions before and after polling.
25. The configuration method of claim 24, wherein the number of sessions requiring polling and the polling granularity satisfy the following formula:
the base pulse period is the number of sessions that need to be polled x the polling granularity.
26. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon that, when executed by the one or more processors, cause the one or more processors to implement at least one of the following methods:
the message transmission control method according to any one of claims 1 to 9;
the message generation method according to any one of claims 10 to 16;
the message transmission method according to any one of claims 17 to 20;
the configuration method according to any one of claims 21 to 25.
27. A computer-readable medium, on which a computer program is stored which, when executed by a processor, implements at least one of the following methods:
the message transmission control method according to any one of claims 1 to 9;
the message generation method according to any one of claims 10 to 16;
the message transmission method according to any one of claims 17 to 20;
the configuration method according to any one of claims 21 to 25.
CN202011008846.1A 2020-09-23 2020-09-23 Message transmission control, generation and transmission method, configuration method, equipment and medium Pending CN114301852A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011008846.1A CN114301852A (en) 2020-09-23 2020-09-23 Message transmission control, generation and transmission method, configuration method, equipment and medium
PCT/CN2021/119623 WO2022063126A1 (en) 2020-09-23 2021-09-22 Packet transmission control method, packet generation method, packet transmission method, configuration method, device, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011008846.1A CN114301852A (en) 2020-09-23 2020-09-23 Message transmission control, generation and transmission method, configuration method, equipment and medium

Publications (1)

Publication Number Publication Date
CN114301852A true CN114301852A (en) 2022-04-08

Family

ID=80846223

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011008846.1A Pending CN114301852A (en) 2020-09-23 2020-09-23 Message transmission control, generation and transmission method, configuration method, equipment and medium

Country Status (2)

Country Link
CN (1) CN114301852A (en)
WO (1) WO2022063126A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116155731B (en) * 2023-04-14 2023-06-20 中国人民解放军国防科技大学 Communication control method and device supporting control path of RMT (remote management T)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102255786A (en) * 2010-05-20 2011-11-23 中国移动通信集团广西有限公司 Service message processing method and device
CN104980293B (en) * 2014-04-02 2019-05-31 深圳市中兴微电子技术有限公司 A kind of OAM message is quickly sent and the method and device of detection processing
CN106470222A (en) * 2015-08-18 2017-03-01 中兴通讯股份有限公司 A kind of document transmission method, device and application server

Also Published As

Publication number Publication date
WO2022063126A1 (en) 2022-03-31

Similar Documents

Publication Publication Date Title
US11228515B2 (en) Data packet detection method, device, and system
US7668107B2 (en) Hardware implementation of network testing and performance monitoring in a network device
CN108964943B (en) Method and device for realizing IOAM packaging
US8989019B2 (en) Transmission system, managing computer, and logical path construction method
WO2021098807A1 (en) Method and device for updating mapping
WO2021185208A1 (en) Packet processing method and apparatus, device, and storage medium
CN113711572A (en) Message transmission method and device
CA3178575A1 (en) Method, device, and system for determining required bandwidth for data stream transmission
CN113328902A (en) Network performance detection method and device and network equipment
CN109691031B (en) Service message transmission method and node equipment
JP4861293B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM
US20200344152A1 (en) Network Operations Reactive to Operations Data included in Seamless Bidirectional Forwarding Detection (S-BFD) Packets
Amari et al. AeroRing: Avionics full duplex ethernet ring with high availability and QoS management
WO2022063126A1 (en) Packet transmission control method, packet generation method, packet transmission method, configuration method, device, and medium
JP5352502B2 (en) Packet communication system and packet communication apparatus control method
US20230318970A1 (en) Packet Processing Method and Apparatus
EP3242443A1 (en) Path continuity determination in an aggregate flow environment
CN112787953B (en) Deterministic traffic flow transmission method and device, electronic equipment and storage medium
CN114500163A (en) Communication scheduling method, device and storage medium
CN114124753B (en) Message sending method and device
WO2022222693A1 (en) Message processing method and apparatus, electronic device, and computer-readable storage medium
KR102053120B1 (en) Method for managing and sharing symmetric flow and asymmetric flow in duplexed network
CN112995068A (en) Data transmission method, device and system
CN113709049A (en) Method for creating intermediate point of maintenance entity group, node and readable storage medium
CN117278646A (en) Message processing method, device, system and storage medium

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