WO2022063126A1 - 报文传输控制、生成、传输方法及配置方法、设备、介质 - Google Patents

报文传输控制、生成、传输方法及配置方法、设备、介质 Download PDF

Info

Publication number
WO2022063126A1
WO2022063126A1 PCT/CN2021/119623 CN2021119623W WO2022063126A1 WO 2022063126 A1 WO2022063126 A1 WO 2022063126A1 CN 2021119623 W CN2021119623 W CN 2021119623W WO 2022063126 A1 WO2022063126 A1 WO 2022063126A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
packet
session
configuration information
information
Prior art date
Application number
PCT/CN2021/119623
Other languages
English (en)
French (fr)
Inventor
江越伟
谢兆平
刘衡祁
徐金林
周峰
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2022063126A1 publication Critical patent/WO2022063126A1/zh

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

Definitions

  • the present disclosure relates to the field of communication 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 storage medium.
  • Operation and maintenance management (OAM, Operation Administration and Maintenance) function is very important to ensure the service quality of the network.
  • the OAM function can detect and report link status in real time, manage link errors, and provide fast handover capabilities, helping to improve network reliability.
  • higher and higher bandwidth and lower latency requirements require more frequent and faster network operations.
  • the networking methods of telecommunication networks are becoming more and more complex and are constantly updated. It is often necessary to combine multiple OAM protocols flexibly.
  • the related art has not been able to achieve both the OAM transmission performance and flexibility.
  • Embodiments of the present disclosure provide a message transmission control method, a message generation method, a message transmission method, a configuration method, an electronic device, and a computer-readable storage medium.
  • An embodiment of the present disclosure provides a method for controlling message transmission, including: reading trigger configuration information of a current session from a trigger configuration space of a current session of an on-chip storage device, wherein the on-chip storage device includes a plurality of triggers configuration space, each trigger configuration space corresponds to a session, and the current session is one of multiple sessions; determine whether the current session needs to send a message according to the trigger configuration information of the current session; and in response to the The current session needs to send a message, and the session identifier of the current session and the message information of the message to be sent by the current session are written into the on-chip storage device.
  • An embodiment of the present disclosure also provides a method for generating a message, which includes: 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; according to the session identifier of the target session , read the grouping configuration information and message template of the target session from the grouping configuration space of the target session, wherein the on-chip storage device includes a plurality of grouping configuration spaces, and each grouping configuration space corresponds to a session, and the target session is one of the multiple sessions; the target session is generated according to the message information of the message to be sent by the target session, the packet configuration information of the target session, and the message template a message to be transmitted of the session; and writing the to-be-transmitted message into the on-chip storage device.
  • An embodiment of the present disclosure further provides a message transmission method, including: reading a target message to be transmitted from an on-chip storage device, where the target message to be transmitted is generated and written according to the message generation method of the embodiment of the present disclosure buffering the message to be transmitted; and transmitting the target message to be transmitted.
  • An embodiment of the present disclosure further provides a configuration method, including: configuring trigger configuration information of each session in the trigger configuration spaces of multiple sessions respectively, where the trigger configuration information is used to determine whether the session needs to send a message, wherein the chip's trigger configuration information
  • the on-chip storage device includes a plurality of trigger configuration spaces, each of which corresponds to a session; and the group packet configuration information and message template of each session are respectively configured in the group packet configuration spaces of the multiple sessions, and the group packet configuration space is configured.
  • the packet configuration information and the message template are used to generate the to-be-transmitted packets of the session, wherein the on-chip storage device of the chip includes multiple packet configuration spaces, and each packet configuration space corresponds to a session.
  • Embodiments of the present disclosure further provide an electronic device, including: one or more processors; and a storage device, on which one or more programs are stored, when the one or more programs are processed by the one or more programs
  • the processor executes, so that the one or more processors implement at least one of the following methods: a message transmission control method according to an embodiment of the present disclosure; a message generation method according to an embodiment of the present disclosure; a message transmission method; and a configuration method according to an embodiment of the present disclosure.
  • Embodiments of the present disclosure further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, causes the processor to implement at least one of the following methods: according to an embodiment of the present disclosure A message transmission control method according to an embodiment of the present disclosure; a message generation method according to an embodiment of the present disclosure; a message transmission method according to an embodiment of the present disclosure; and a configuration method according to an embodiment of the present disclosure.
  • FIG. 1 is a flowchart of a method for controlling message transmission according to an embodiment of the present disclosure
  • FIG. 2 is another flowchart of a message transmission control method according to an embodiment of the present disclosure
  • FIG. 3 is another flowchart of a message transmission control method according to an embodiment of the present disclosure
  • FIG. 4 is another flowchart of a message transmission control method according to an embodiment of the present disclosure.
  • FIG. 5 is a flowchart of a message generation method according to an embodiment of the present disclosure.
  • FIG. 6 is another flowchart of a method for generating a message according to an embodiment of the present disclosure
  • FIG. 7 is another flowchart of a message generation method according to an embodiment of the present disclosure.
  • FIG. 8 is another flowchart of a message generation method according to an embodiment of the present disclosure.
  • FIG. 9 is another flowchart of a message generation method according to an embodiment of the present disclosure.
  • FIG. 10 is a flowchart of a message transmission method according to an embodiment of the present disclosure.
  • FIG. 11 is another flowchart of a message transmission method according to an embodiment of the present disclosure.
  • FIG. 13 is another flowchart of a configuration method according to an embodiment of the present disclosure.
  • FIG. 14 is a block diagram of an electronic device according to an embodiment of the present disclosure.
  • FIG. 15 is a block diagram of a computer-readable storage medium according to an embodiment of the present disclosure.
  • the inventors of the embodiments of the present disclosure found that, in the related art, in order to ensure the flexibility of OAM, the processor needs to spend a lot of resources to process and store complete OAM packets, resulting in very low OAM transmission performance; in order to ensure OAM transmission performance, Then, the OAM message format needs to be solidified, resulting in poor flexibility and scalability. In the related art, neither the software nor the hardware implementation of OAM packet transmission can guarantee the OAM transmission performance and flexibility at the same time.
  • an embodiment of the present disclosure provides a message transmission control method, including steps S110 to S130.
  • step S110 the trigger configuration information of the current session is read from the trigger configuration space of the current session of the on-chip storage device, wherein the 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 multiple sessions.
  • step S120 it is determined whether the current session needs to send a message according to the trigger configuration information of the current session.
  • step S130 in response to the current session needing to send a message, the session identifier of the current session and the message information of the message to be sent by the current session are written into the on-chip storage device.
  • a trigger configuration space for storing trigger configuration information of each session is allocated to a plurality of sessions in the on-chip storage device.
  • the trigger configuration information in the trigger configuration space is configured by software running on an onboard microcontroller unit (MCU, Microcontroller Unit).
  • the protocol type of each session is configurable, and the embodiment of the present disclosure does not specifically limit the configurable protocol type.
  • the protocol types include but are not limited to: Ethernet OAM, Multi-Protocol Label Switching-Transport Profile (MPLS_TP, Multi-Protocol Label Switching Transport Profile) OAM, and Bidirectional Forwarding Detection (BFD, Bidirectional Forwarding Detection).
  • MPLS_TP Multi-Protocol Label Switching-Transport Profile
  • BFD Bidirectional Forwarding Detection
  • the embodiment of the present disclosure also supports a custom OAM protocol type, and the custom OAM protocol type can be used for protocol extension. It should be noted that, in this embodiment of the present disclosure, when a custom OAM protocol type is configured for a session, the session can send any type of message.
  • each session can send OAM packets of multiple packet types, and the embodiment of the present disclosure does not specifically limit the packet types.
  • the packet types may include Connectivity Verification (CV, Connectivity Verification), BFD, Client Signal Fail (CSF, Client Signal Fail), Automatic Protection Switching (APS, Automatic Protection Switching), Alarm Indication (AIS, Alarm Indication Signal) etc., it can also be a 2544 message, a link state packet (LSP, Link-State Packet) message, etc.
  • the embodiments of the present disclosure also support custom message types, and the custom message types can be used for expansion.
  • the hardware logic accesses the trigger configuration space in the on-chip storage device one by one to determine whether each session needs to send a message.
  • the trigger configuration information of the session is read through steps S110 to S130, and according to the trigger configuration information, it is determined whether the session needs to send a message, and when a message needs to be sent, the session identifier of the session and the session need to be sent.
  • the message information of the message is written into the on-chip storage device, so that the hardware logic further assembles and transmits the message according to the session identifier and message information of the session that needs to send the message in the on-chip storage device.
  • the "current session" in steps S110 to S130 is the session corresponding to the trigger configuration space currently accessed by the hardware logic.
  • This embodiment of the present disclosure does not specifically limit how to access the trigger configuration space in the on-chip storage device one by one.
  • the trigger configuration space in the on-chip storage device can be accessed in a polling manner, and it is determined whether the session needs to send a message.
  • the trigger configuration spaces in the on-chip storage device in the process of accessing the trigger configuration spaces in the on-chip storage device one by one, when accessing the trigger configuration spaces of two adjacent sessions and judging whether the session needs to send a message, the There is a time interval between accesses, so it can avoid burst traffic caused by multiple sessions sending packets at the same time, thus effectively smoothing burst traffic.
  • Accessing the trigger configuration space in the on-chip storage device one by one and judging whether the session needs to send messages can also achieve high-precision message sending.
  • the session identifier may be the session number of the session, and the hardware logic may read the trigger configuration space of the sessions one by one through the session numbers of the multiple sessions.
  • the session identifiers of multiple sessions may be session numbers numbered consecutively from 0, and the hardware logic first accesses the trigger configuration space corresponding to session number 0 to determine whether the session of session number 0 needs to send a message; then Add 1 to the session number, access the trigger configuration space corresponding to session number 1, and determine whether the session of session number 1 needs to send packets... and so on, until the trigger configuration space corresponding to the last session number is accessed.
  • the on-chip storage device includes a first-in, first-out (FIFO, First Input First Output) memory, and in step S130, the hardware logic can store the session identifier of the current session and the message of the message to be sent by the current session Information is written to FIFO memory in the on-chip storage device.
  • FIFO First Input First Output
  • a trigger configuration space for storing trigger configuration information of each session is allocated to a plurality of sessions in the on-chip storage device, and the hardware logic runs on the onboard MCU by reading
  • the software is configured to the trigger configuration information in the trigger configuration space to determine whether each session needs to send a message.
  • the hardware logic can further assemble the message according to the session identifier and message information of the session that needs to send the message in the on-chip storage device and transmit the message.
  • the protocol type of each session can be configured, and each session can send a variety of messages at the same time, Moreover, it supports custom protocol types and packet types to ensure flexibility and scalability; by accessing the trigger configuration space in the on-chip storage device one by one to determine whether the session needs to send packets, it can also effectively smooth burst traffic and achieve high-precision transmission of packets. Arts.
  • each session can simultaneously send packets of multiple packet types, that is, each session can support multiple packet types.
  • the packets of multiple packet types supported by the session may be all triggered, partially triggered, or not triggered at all, which is not specifically limited in this embodiment of the present disclosure.
  • the trigger configuration information configured in the trigger configuration space of the on-chip storage device includes the packet types supported by the session and trigger conditions for packets of various packet types.
  • the hardware logic can determine whether the trigger conditions of the packets of various packet types are satisfied. When the trigger conditions of the packets of various packet types are not satisfied, it is determined that the session does not need to be sent. message; otherwise, it is determined that the session needs to send a message.
  • the trigger configuration information includes at least one packet type supported by the current session.
  • step S120 may include step S121.
  • step S121 according to the triggering configuration information of the current session, it is determined whether the triggering conditions of the packets of various packet types included in the triggering configuration information are satisfied.
  • the OAM entities at both ends will periodically send an OAM protocol data unit (PDU, Protocol Data Unit) at a certain time interval to detect whether the OAM connection is normal. If the OAM entity at one end does not receive the OAM PDU sent by the OAM entity at the opposite end within the connection timeout period, it is considered that the OAM connection is interrupted.
  • the trigger configuration space of each session is configured with the sending period of packets of various packet types supported by the session. In the same session, the sending period of packets of different packet types may be the same or different, which is not specifically limited in this embodiment of the present disclosure.
  • the hardware logic accesses the trigger configuration space of the session, it may be determined whether the packets of various packet types meet the triggering conditions according to whether the current moment satisfies the transmission period of the packets of various packet types. Only when the time when the hardware logic accesses the trigger configuration space of the session meets the sending cycle of the message, the message information of the message satisfying the sending cycle is written into the on-chip storage device through step S130, and the message is further assembled and transmitted by the hardware logic. , thereby ensuring the sending period of various types of packets.
  • the trigger configuration information further includes a transmission period of the packets of various types of the packets.
  • step S121 may include step S1211 .
  • step S1211 for each of the various message types, it is determined whether the message sending period of the message type is satisfied.
  • This embodiment of the present disclosure does not make any special limitation on how to execute step S211 to determine whether the sending period of the packet is satisfied. For example, according to the reference pulse period (3.33ms) of the timer, when the reference pulse corresponding to the sending period of the message arrives, it means that the sending period of the message is satisfied.
  • This embodiment of the present disclosure also supports sending the first packet. It should be noted that, at the beginning of the process of periodically sending a message, the first time a message is sent is the first packet sending. In the embodiment of the present disclosure, when a message of a certain message type is sent as the first packet, it is determined that the trigger condition of the message of the message type is satisfied, and the message information of the message is written into the on-chip storage through step S130 device, and the message is further assembled and transmitted by the hardware logic.
  • step S121 may further include step S1212 .
  • step S1212 for each of the various message types, it is determined whether the message of the message type is sent as the first packet.
  • step S1211 is executed.
  • step S121 may further include step S1213 .
  • step S1213 for each of the various message types, it is determined whether the sending conditions of the message of the message type are satisfied.
  • step S1212 is executed; in response to the sending condition of the message of the message type being not satisfied, it is determined that the triggering condition of the message of the message type is not satisfied.
  • the embodiments of the present disclosure do not make special restrictions on how to determine whether the sending conditions of the packets are satisfied. For example, it can be judged whether the conditions for sending packets are satisfied according to the monitoring of link performance. It can also judge whether the transmission conditions of the packets are satisfied according to the detection of link failures and alarms. The test judges whether the conditions for sending packets are satisfied. When it is necessary to check whether there is a loop in the link, it is judged that the conditions for sending packets are met.
  • the trigger configuration information configured in the trigger configuration space of the session by the software running on the onboard MCU may further include sending enable information, which can define whether the sending enable of the session is enabled.
  • the hardware logic determines whether the session supports sending packets and the type of packets that the session supports by judging whether the sending enable is enabled.
  • the trigger configuration information further includes sending enable information of the current session.
  • step S121 may further include step S1214 .
  • step S1214 it is determined whether the sending enable of the current session is enabled according to the sending enable information of the current session.
  • step S1213 is performed; in response to the sending enable of the current session not being turned on, it is determined that the trigger condition is not satisfied.
  • the sending enable of the current session may include a global enable, where the global enable is turned on indicates that the current session supports sending packets; the sending enable may also include multiple session enable, each session enable corresponds to a
  • multiple session enablement may include CV/BFD enablement, CSF enablement, APS enablement, etc.
  • Session enablement is enabled indicates that the current session supports the packet type corresponding to the session enablement.
  • the hardware logic can separately determine whether the packets of various packet types satisfy the trigger condition by accessing the trigger configuration space of the session. It is determined that the session needs to send packets. In this case, the packets that satisfy the trigger conditions are the packets that need to be sent by the session. It should be noted that, the same session may have one or more types of packets to be sent at the same time.
  • the message when a message is sent, the message usually needs to carry some information, for example, the signal failure reason information sf_reason is carried in the CSF message.
  • the hardware logic in the embodiment of the present disclosure generates and transmits the packet according to the protocol type of the session, the packet type of the packet to be sent by the session, and the information to be carried in the packet.
  • the packet that satisfies the trigger condition is the packet that needs to be sent in the current session
  • the trigger configuration information further includes the protocol type of the current session, the information to be carried in the packets of various packet types, and the The information includes the protocol type of the current session, the packet type of the packet satisfying the trigger condition, and the to-be-carried information of the packet satisfying the trigger condition.
  • the hardware logic accesses the trigger configuration space in the on-chip storage device one by one to determine whether each session needs to send a message.
  • This embodiment of the present disclosure does not specifically limit how to access the trigger configuration space in the on-chip storage device one by one.
  • the trigger configuration space in the on-chip storage device may be accessed in a polling manner, and it is determined whether the session needs to send a message.
  • the packet transmission control method according to the embodiment of the present disclosure may further include step S140.
  • step S140 according to the configured number of sessions to be polled and the polling granularity, the trigger configuration information of the next session is read from the trigger configuration space of the next session of the current session, so as to realize the polling of multiple sessions,
  • the polling granularity represents the time interval between accessing the trigger configuration space of two adjacent sessions in a polling.
  • the polling of multiple sessions is performed periodically, and multiple sessions that need to be polled are polled in each polling period. It can be ensured that the time interval between the two rounds of polling of the same session is the polling period, thereby ensuring the transmission accuracy.
  • the session identifiers of multiple sessions are session numbers that are consecutively numbered from 0.
  • the hardware logic first accesses the trigger configuration space corresponding to session number 0 to determine whether the session with session number 0 needs to send messages; Then add 1 to the session number, access the trigger configuration space corresponding to session number 1, and determine whether the session of session number 1 needs to send a message... and so on, until the trigger configuration space corresponding to all session numbers is accessed; then The accessed session number is reset to 0, and when the next polling cycle comes, the polling starts from session 0 again.
  • the hardware logic polls multiple sessions according to the configured number of sessions to be polled and the polling granularity, so that the polling time of multiple sessions in one polling period can be within the polling period Evenly distributed to effectively smooth out burst traffic.
  • the hardware logic initiates polling of multiple sessions, for example, the polling period is 3.33ms.
  • the number of sessions that need to be polled and the polling granularity satisfy formula (1):
  • Baseline pulse period number of sessions to be polled ⁇ polling granularity (1)
  • the packet transmission control method according to the embodiment of the present disclosure may further include step S150.
  • step S150 in response to the reference pulse, polling of the plurality of sessions is initiated.
  • the hardware logic initiating the polling of multiple sessions in response to the reference pulse can ensure that the time interval between two polls before and after each session is the reference pulse period (for example, 3.33ms), and can Make the error reach the nanosecond level; using the reference pulse period as the polling period can also ensure that when the transmission period of any type of message in the session is satisfied, the hardware logic initiates polling for multiple sessions, so as to be able to Guarantees the sending cycle of the message.
  • the reference pulse period for example, 3.33ms
  • an embodiment of the present disclosure provides a method for generating a message, including steps S210 to S240.
  • step S210 the session identifier of the target session and the message information of the message to be sent by the target session are read from the on-chip storage device.
  • step S220 according to the session identifier of the target session, the grouping configuration information and message template of the target session are read from the grouping configuration space of the target session, wherein the on-chip storage device includes a plurality of grouping configuration spaces, each group The package configuration space corresponds to a session, and the target session is one of multiple sessions.
  • step S230 the to-be-transmitted message of the target session is generated according to the message information of the message to be sent by the target session, the packet configuration information of the target session and the message template.
  • step S240 the message to be transmitted is written into the on-chip storage device.
  • the session identifier of the target session and the message information of the message to be sent by the target session read from the on-chip storage device by the hardware logic in step S210 are the messages obtained by the hardware logic through the embodiment of the present disclosure.
  • the transfer control method is written to the on-chip storage device.
  • the hardware logic reads the session identifier of the target session and the message information of the message to be sent by the target session from the FIFO memory of the on-chip storage device.
  • the on-chip storage device may simultaneously store session identifiers of multiple sessions and packet information of packets to be sent corresponding to multiple sessions.
  • the "target session” described in the embodiments of the present disclosure refers to a session being processed by hardware logic among multiple sessions, and is not used to refer to a particular session.
  • a grouping configuration space for storing grouping configuration information and message templates of each session is allocated to a plurality of sessions in the on-chip storage device, and the grouping configuration information and report in the grouping configuration space are
  • the text template is configured by software running on the onboard MCU.
  • the hardware logic accesses the corresponding group package configuration space according to the session ID 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.
  • the session identification may be the session number of the session.
  • a message template is configured for each session.
  • packets of different packet types in the same session may share the same packet template.
  • the messages of the message type share the destination address (DA, Destination Address), source address (SA, Source Address), virtual local area network (VLAN, Virtual Local Area Network) label, ACH and other message header content and delivery header, and other users custom content.
  • DA Destination Address
  • SA Source Address
  • VLAN Virtual Local Area Network
  • the grouping configuration information in the grouping configuration space and part or all of the message template information may be shared, thereby further saving storage resources.
  • the protocol type of each session is configurable, and the embodiment of the present disclosure does not specifically limit the configurable protocol type.
  • the protocol types include but are not limited to: Ethernet OAM, MPLS_TP OAM, BFD.
  • the embodiment of the present disclosure also supports a custom OAM protocol type, and the custom OAM protocol type can be used for protocol extension. It should be noted that, in this embodiment of the present disclosure, when a user-defined OAM protocol type is configured for a session, the session can send any type of packets.
  • each session can send OAM packets of multiple packet types, and the embodiment of the present disclosure does not specifically limit the packet types.
  • the packet types may include CV, BFD, CSF, APS, AIS, etc., and may also be 2544 packets, LSP packets, and the like.
  • the embodiments of the present disclosure also support custom message types, and the custom message types can be used for expansion.
  • the protocol type of the target session corresponding to the session identifier read by the hardware logic from the on-chip storage device can be any one of multiple protocol types, for example, can be Ethernet OAM, MPLS_TP OAM, Any of BFD and custom protocol types.
  • the message type of the to-be-transmitted message generated from the read message information in the on-chip storage device according to the hardware logic may be any one of multiple message types, for example, may be CV, BFD , CSF, APS, AIS, and any one of the user-defined packet types, which is not particularly limited in this embodiment of the present disclosure.
  • the on-chip storage device includes a scheduling buffer.
  • the hardware logic writes the to-be-transmitted message into the scheduling buffer in the on-chip storage device, and further schedules the transmission of the to-be-transmitted message by the hardware logic.
  • the scheduling buffer is a FIFO memory.
  • a packet configuration space for storing packet configuration information and packet templates of each session is allocated to a plurality of sessions in an on-chip storage device.
  • the hardware logic reads the grouping configuration information and the message template in the grouping configuration space to generate the message to be transmitted.
  • the protocol type of each session can be any of multiple protocol types, and the generated message to be transmitted can be multiple. Any one of these message types ensures flexibility and scalability; only message templates are stored in the on-chip storage device, without the need to store complete messages of various message types; When transmitting a message, you only need to configure fields other than the shared content in the message template, and do not need to process the complete message, thus saving storage and computing resources.
  • the message template is configured with content shared by messages of multiple message types.
  • the hardware logic replaces the fields other than the content shared by the packets of multiple packet types in the packet template according to the packet information read from the on-chip storage device and the packet configuration information read from the packet configuration space, that is, A message to be transmitted can be generated.
  • step S230 may include steps S231 to S232.
  • step S231 the corresponding fields in the message template are replaced according to the message information.
  • step S232 the private header field in the message template is replaced according to the packet configuration information.
  • the fields in the message templates that need to be replaced may be the same or different;
  • the fields in the message templates to be replaced may be the same or different, which are not specially limited in this embodiment of the present disclosure.
  • 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.
  • a "corresponding field” refers to a field in a message template that can carry message information.
  • the message information includes the protocol type of the target session, the message type of the message to be sent by the target session, and the to-be-carried information of the message to be sent by the target session.
  • step S231 may Step S2311 is included.
  • step S2311 the corresponding fields in the message template are replaced according to the protocol type of the target session, the message type of the message to be sent by the target session, and the to-be-carried information of the message to be sent by the target session.
  • the grouping configuration information includes a packet length and a packet offset value.
  • step S232 may include step S2321.
  • step S2321 the private header field in the message template is replaced according to the message length and the message offset value.
  • the hardware logic simultaneously completes the packet routing and the replacement of the private header field in the packet template, thereby reducing the processing overhead of a central processing unit (CPU, Central Processing Unit).
  • CPU Central Processing Unit
  • step S232 may further include step S2322.
  • step S2322 packet routing is performed according to the packet configuration information.
  • the message template further includes a global configuration field, and the global configuration field is used to reduce CPU operations.
  • the hardware logic replaces the global configuration field in the message template according to the global configuration, thereby further reducing the CPU overhead.
  • step S230 may further include step S233.
  • step S233 the global configuration field in the message template is replaced according to the global configuration information.
  • the session supports a user-defined protocol type and a user-defined packet type.
  • the message type of the message to be sent is a custom message type
  • the fields in the message template do not need to be replaced, and the message template in the packet configuration space is directly read as the message to be transmitted. message, thereby ensuring the scalability of the message.
  • step S230 may include step S234.
  • step S234 in response to the message type of the message to be sent by the target session being a custom message, the message template is used as the message to be transmitted.
  • an embodiment of the present disclosure provides a message transmission method, including steps S310 to S320.
  • step S310 the target to-be-transmitted message is read from the on-chip storage device, where the target to-be-transmitted message is the to-be-transmitted message generated and written into the cache according to the message generation method of the embodiment of the present disclosure.
  • step S320 the message to be transmitted by the transmission target is transmitted.
  • the on-chip storage device may simultaneously store multiple packets to be transmitted, and the packet types of the multiple packets to be transmitted may be the same or different, which are not specifically limited in the embodiment of the disclosure.
  • the packet type may be CV, BFD, CSF, APS, AIS, 2544 packet, LSP packet, and so on.
  • the embodiments of the present disclosure also support custom message types, and the custom message types can be used for expansion.
  • multiple to-be-transmitted packets may correspond to the same session, or may correspond to multiple sessions, which are not specifically limited in this embodiment of the present disclosure.
  • the protocol types include but are not limited to: Ethernet OAM, MPLS_TP OAM, BFD.
  • the embodiment of the present disclosure also supports a custom OAM protocol type, and the custom OAM protocol type can be used for protocol extension.
  • the on-chip storage device includes a scheduling buffer.
  • the hardware logic reads the target to-be-transmitted message from the scheduling buffer in the on-chip storage device.
  • the scheduling buffer is a FIFO memory.
  • the hardware logic reads the to-be-transmitted message generated and written by the message generation method according to the embodiment of the present disclosure from the on-chip storage device, and transmits it.
  • the packet type of the to-be-transmitted packet may be any one of multiple packet types, and the protocol type of the session corresponding to the to-be-transmitted packet may be one of multiple protocol types, which ensures flexibility and extensibility.
  • the hardware logic schedules and transmits the to-be-transmitted packets in the on-chip storage device according to the priority of the to-be-transmitted packets.
  • the packet transmission method according to an embodiment of the present disclosure may further include steps S331 to S332 .
  • step S331 the message to be transmitted with the highest priority in the on-chip storage device is determined.
  • step S332 the message to be transmitted with the highest priority is determined as the target message to be transmitted.
  • the hardware logic may determine the to-be-transmitted packet with the highest priority according to the shaping signal and the back pressure signal.
  • the packet transmission method according to an embodiment of the present disclosure may further include step S340 .
  • step S340 it is determined whether there is a to-be-transmitted message in the on-chip storage device according to the pre-level buffer empty signal.
  • step S310 is performed.
  • an embodiment of the present disclosure provides a configuration method, including steps S410 to S420.
  • step S410 the trigger configuration information of each session is respectively configured in the trigger configuration spaces of the multiple sessions, and the trigger configuration information is used to determine whether the session needs to send a message.
  • the on-chip storage device of the chip includes a plurality of trigger configuration spaces, each of which is The trigger configuration space corresponds to a session.
  • step S420 the grouping configuration information and the message template of each session are respectively configured in the grouping configuration space of the multiple sessions, and the grouping configuration information and the message template are used to generate the to-be-transmitted message of the session, and the on-chip storage of the chip
  • the device includes multiple group configuration spaces, and each group configuration space corresponds to a session.
  • the configuration method provided by the embodiment of the present disclosure can be used for the on-board MCU to configure the chip.
  • the on-board MCU can configure the trigger configuration information of multiple sessions in the on-chip storage device of the chip, so that the hardware logic of the chip can judge whether each session needs to send a message according to the message transmission control method of the embodiment of the present disclosure;
  • the on-board MCU can
  • the on-chip storage device of the chip is configured with packet configuration information and message templates of multiple sessions, so that the hardware logic of the chip can generate the message to be transmitted according to the message generation method of the embodiment of the present disclosure.
  • the onboard MCU can configure different protocol types for multiple sessions.
  • This embodiment of the present disclosure does not specifically limit the protocol type.
  • the protocol types include but are not limited to: Ethernet OAM, MPLS_TP OAM, BFD.
  • the embodiment of the present disclosure also supports a custom OAM protocol type, and the custom OAM protocol type can be used for protocol extension. It should be noted that, in this embodiment of the present disclosure, when a user-defined OAM protocol type is configured for a session, the session can send any type of packets.
  • the onboard MCU can configure multiple packet types for each session, so that each session can send OAM packets of multiple packet types.
  • the embodiment of the present disclosure does not specifically limit the packet type.
  • the packet types may include CV, BFD, CSF, APS, AIS, etc., and may also be 2544 packets, LSP packets, and the like.
  • the embodiments of the present disclosure also support custom message types, and the custom message types can be used for expansion.
  • the on-board MCU can configure trigger configuration information for multiple sessions in the on-chip storage device of the chip, so that the hardware logic of the chip can read the trigger configuration information to determine whether each session needs to be sent message; the on-board MCU can configure grouping configuration information and message templates for multiple sessions in the on-chip storage device of the chip, so that the hardware logic of the chip can read the grouping configuration information and messages in the grouping configuration space by reading The template generates the message to be transmitted, and enables the hardware logic of the chip to further transmit the message to be transmitted; the onboard MCU can configure multiple protocol types for multiple sessions, and configure multiple packet types for each session, so that each session Both can send a variety of message types, thus ensuring flexibility and scalability, saving computing resources and storage resources, and can effectively smooth burst traffic and achieve high-precision message sending.
  • the trigger configuration information may include at least one of the following: the protocol type of the session, at least one packet type supported by the session, the transmission period of packets of various packet types, the transmission enable of the session information, information to be carried in packets of various packet types.
  • the grouping configuration information may include at least one of a packet length and a packet offset value.
  • the on-board 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 adjust the number of sessions to be polled and the polling granularity according to the configured number of sessions to be polled and the polling granularity.
  • Multiple sessions are polled, so that the polling moments of multiple sessions in one polling period can be evenly distributed in the polling period, thereby effectively smoothing burst traffic.
  • the configuration method according to an embodiment of the present disclosure may further include step S430 .
  • step S430 the number of sessions to be polled and the polling granularity are configured, and the polling granularity represents the time interval between accessing the trigger configuration space of two adjacent sessions in the polling.
  • the number of sessions that need to be polled and the polling granularity configured by the on-board MCU in the on-chip storage device of the chip satisfy formula (2):
  • Baseline pulse period number of sessions to be polled ⁇ polling granularity (2)
  • the chip's hardware logic initiates polling of multiple sessions each time the timer's reference pulse arrives, thereby It can not only effectively smooth out burst traffic, but also ensure the sending cycle of packets.
  • an embodiment of the present disclosure provides an electronic device, including: one or more processors 101; and a memory 102, on which one or more programs are stored, when the one or more programs are stored by one or more
  • the processor executes, so that one or more processors implement at least one of the following methods: a message transmission control method according to an embodiment of the present disclosure; a message generation method according to an embodiment of the present disclosure; a message according to an embodiment of the present disclosure A file transmission method; a configuration method according to an embodiment of the present disclosure.
  • the electronic device further includes one or more I/O interfaces 103, which are connected with the processor 101 and the memory 102 through the bus 104 to realize information exchange.
  • the processor 101 is a device with data processing capability, which includes but is not limited to a central processing unit (CPU) and the like.
  • the memory 102 is a device with data storage capability, which includes but is not limited to random access memory (RAM, more specifically such as SDRAM, DDR, etc.), read only memory (ROM), electrified erasable programmable read only memory (EEPROM), Flash memory (FLASH).
  • RAM random access memory
  • ROM read only memory
  • EEPROM electrified erasable programmable read only memory
  • FLASH Flash memory
  • the I/O interface (read and write interface) 103 can realize information exchange, which includes but is not limited to a data bus (Bus) and the like.
  • processor 101 memory 102, and I/O interface 103 are interconnected by bus 104, which in turn is connected to other components of the computing device.
  • an embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements at least one of the following methods: a message according to an embodiment of the present disclosure A transmission control method; a packet generation method according to an embodiment of the present disclosure; a packet transmission method according to an embodiment of the present disclosure; and a configuration method according to an embodiment of the present disclosure.
  • the current session can send Ethernet OAM packets, TP1731 packets, BFD packets, and packets of user-defined packet types.
  • the hardware logic writes the basic information of the message to be sent into the on-chip storage device.
  • the basic information of the message to be sent includes the session number of the current session and the message of the message to be sent. Types of.
  • the reference pulse period (3.33ms) is used as the polling period. Every time the reference pulse of the timer arrives, polling is initiated from session 0, which ensures that the interval between two polls before and after each session is 3.3ms, and the error is at the nanosecond level, thereby improving the sending accuracy.
  • Embodiment 1 for scenarios such as the sending period of 10ms, 100ms, 1s, etc., since it is an integer multiple of 3.33ms, the corresponding reference pulse and the 3.33ms pulse are pulled high at the same time, and last for the entire polling period.
  • the polling granularity and the number of polling sessions are configurable. For example, if the main frequency is 1Ghz, there are a total of 128K sessions. In a certain scenario, only 30K sessions will be used, so the polling granularity can be set to 100ns, and the number of polling can be set to 30K.
  • the reference pulse 3.33 ms
  • start polling from session 0 poll session 1 after 100ns, poll session 2 after 100ns, ... until session 30K ends polling
  • the polling time of 30K sessions is within the time range of 3ms Evenly distributed. This ensures that no matter how many sessions are sending packets and no matter how many packets are sent in each session, the burst traffic can be effectively smoothed and evenly distributed.
  • the hardware logic reads the message information of the message to be sent from the on-chip storage device, and the message information of the message to be sent includes the session number of the session that needs to send the message and the message to be sent the packet type; read the packet configuration information and the packet template according to the session number of the session that needs to send the packet; then replace the corresponding fields in the packet template according to the packet configuration information and the packet type of the packet to be sent , assemble and generate the message to be transmitted; write the message to be transmitted into the cache.
  • messages of different message types in the same session share the same message template, thereby saving the storage resources of the cache and the processing resources of the CPU while ensuring flexibility.
  • the packet template includes packet header contents such as DA, SA, VLAN, tag, and ACH, as well as other user-defined contents.
  • the message template is configured according to the CV/BFD message format by default.
  • the message to be sent is a CV message
  • the rdi, seqnum, and lm_cnt fields will be replaced; if the message to be sent is a BFD message, The diag, sta, and checksum fields will be replaced; for other packets, the version, opcode, flags, TLV and other fields will be replaced.
  • the global configuration field in the message template can also be replaced according to the protocol type and the global configuration, including the TC value, channel type value, mel value, etc. of the innermost label.
  • the message to be sent is a message of a user-defined message type
  • no operation of replacing the message template field is performed, and the message template configured by the CPU is directly read as the message to be transmitted, thereby Guarantee the scalability of the message.
  • the sending process of the OAM message can include the following eight steps.
  • the onboard MCU configures the trigger configuration information for each session in the trigger configuration space in the chip's on-chip storage device, which includes the protocol type of the session (Ethernet OAM/MPLS-TP OAM/BFD OAM/custom type) , CV/BFD enable, cc enable, lm pre-activation enable, CSF enable, CSF transmission type (los/fdi/rdi/dci/soft), CSF trigger type (port alarm trigger/working path flow point alarm trigger /Protection path flow point alarm trigger), CSF trigger alarm index, APS enable, sending cycle, sending cycle granularity, sending priority, etc.
  • the protocol type of the session Ethernet OAM/MPLS-TP OAM/BFD OAM/custom type
  • CV/BFD enable enable
  • cc enable lm pre-activation enable
  • CSF enable CSF enable
  • CSF transmission type los/fdi/rdi/dci/soft
  • CSF trigger type port alarm trigger/working path flow point
  • the onboard MCU configures the grouping configuration information for each session in the grouping configuration space in the on-chip storage device of the chip, which includes the logical port ID of the session sending trunk route selection, the message length, and the message offset value. , checksum (checksum), ttl, channel type (channeltype), gal, label, seqnum replacement enable, etc.
  • the onboard MCU configures a PDU message template for each session in the packet configuration space in the on-chip storage device of the chip.
  • the on-board MCU configures the delivery header corresponding to each session in the package configuration space in the on-chip storage device of the chip.
  • the hardware logic of the chip periodically polls all sessions. For each message type of each session, first determine whether the global enable and session enable are turned on, and then determine whether the sending conditions are met. If the sending conditions are met , then continue to judge whether it is the first packet to be sent, if it is the first packet, trigger immediately, if not, continue to judge whether the current packet configuration period matches the current period signal, in order to ensure the transmission period and transmission accuracy, only in the corresponding period The trigger operation is performed only when the signal is pulled high.
  • the hardware logic of the chip writes the message information of the message to be sent into the on-chip storage device.
  • the message information of the message to be sent includes the session number of the current session, the protocol type, and the message that needs to be carried in the message. information to be carried, such as sf_reason of CSF packets.
  • the hardware logic of the chip reads the packet configuration information and the PDU message template according to the session number read from the on-chip storage device, and according to the protocol type of the session, the message type of the message to be sent and the message to be replaced
  • the information replaces the fields in the PDU message template and the fields in the private header, and then writes the assembled message to be transmitted into the scheduling buffer in the on-chip storage device.
  • the hardware logic of the chip performs sp scheduling according to the shaping signal and the back pressure signal of the subsequent module, and sends the OAM message and the 2544 message.
  • 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).
  • computer storage media includes both volatile and nonvolatile implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules or other data flexible, removable and non-removable media.
  • Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices, or may Any other medium used to store desired information and that can be accessed by a computer.
  • 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 can include any information delivery media, as is well known to those of ordinary skill in the art .

Abstract

本公开提供一种报文传输控制方法,包括:从片上存储设备的当前会话的触发配置空间中读取当前会话的触发配置信息;根据当前会话的触发配置信息判断当前会话是否需要发送报文;以及响应于当前会话需要发送报文,将当前会话的会话标识和当前会话需要发送的报文的报文信息写入片上存储设备。本公开还提供一种报文生成方法、报文传输方法、配置方法、电子设备和计算机可读存储介质。

Description

报文传输控制、生成、传输方法及配置方法、设备、介质 技术领域
本公开涉及通信技术领域,特别地,涉及报文传输控制方法、报文生成方法、报文传输方法、配置方法、电子设备和计算机可读存储介质。
背景技术
操作维护管理(OAM,Operation Administration and Maintenance)功能对于保障网络的服务质量至关重要。OAM功能能够实时检测并上报链路状态,并且能够进行链路的差错管理、提供快速切换的能力,有助于提高网络的可靠性。随着网络通信技术的发展,越来越高的带宽和低延迟需求要求更加频繁和快速的网络操作,同时,电信网络的组网方式也越来越复杂,并且处于不断更新的状态,网络操作经常需要结合多种OAM协议灵活使用。
相关技术还无法实现OAM发送性能和灵活性兼顾。
发明内容
本公开实施例提供一种报文传输控制方法、报文生成方法、报文传输方法、配置方法、电子设备和计算机可读存储介质。
本公开实施例提供一种报文传输控制方法,包括:从片上存储设备的当前会话的触发配置空间中读取所述当前会话的触发配置信息,其中,所述片上存储设备中包括多个触发配置空间,每一个触发配置空间对应一个会话,所述当前会话为多个会话中的一者;根据所述当前会话的触发配置信息判断所述当前会话是否需要发送报文;以及响应于所述当前会话需要发送报文,将所述当前会话的会话标识和所述当前会话需要发送的报文的报文信息写入所述片上存储设备。
本公开实施例还提供一种报文生成方法,包括:从片上存储设备中读取目标会话的会话标识和所述目标会话需要发送的报文的报文信息;根据所述目标会话的会话标识,从所述目标会话的组包配置 空间读取所述目标会话的组包配置信息和报文模板,其中,所述片上存储设备中包括多个组包配置空间,每一个组包配置空间对应一个会话,所述目标会话为所述多个会话中的一者;根据所述目标会话需要发送的报文的报文信息、所述目标会话的组包配置信息和报文模板生成所述目标会话的待传输报文;以及将所述待传输报文写入所述片上存储设备。
本公开实施例还提供一种报文传输方法,包括:从片上存储设备中读取目标待传输报文,所述目标待传输报文为根据本公开实施例的报文生成方法生成并写入缓存的待传输报文;以及传输所述目标待传输报文。
本公开实施例还提供一种配置方法,包括:在多个会话的触发配置空间中分别配置各个会话的触发配置信息,所述触发配置信息用于判断会话是否需要发送报文,其中,芯片的片上存储设备中包括多个触发配置空间,每一个触发配置空间对应一个会话;以及在所述多个会话的组包配置空间中分别配置各个会话的组包配置信息和报文模板,所述组包配置信息和所述报文模板用于生成会话的待传输报文,其中,所述芯片的片上存储设备中包括多个组包配置空间,每一个组包配置空间对应一个会话。
本公开实施例还提供一种电子设备,包括:一个或多个处理器;以及存储装置,其上存储有一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现以下方法中的至少一者:根据本公开实施例的报文传输控制方法;根据本公开实施例的报文生成方法;根据本公开实施例的报文传输方法;以及根据本公开实施例的配置方法。
本公开实施例还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器实现以下方法中的至少一者:根据本公开实施例的报文传输控制方法;根据本公开实施例的报文生成方法;根据本公开实施例的报文传输方法;以及根据本公开实施例的配置方法。
附图说明
图1是根据本公开实施例的报文传输控制方法的流程图;
图2是根据本公开实施例的报文传输控制方法的另一流程图;
图3是根据本公开实施例的报文传输控制方法的另一流程图;
图4是根据本公开实施例的报文传输控制方法的另一流程图;
图5是根据本公开实施例的报文生成方法的流程图;
图6是根据本公开实施例的报文生成方法的另一流程图;
图7是根据本公开实施例的报文生成方法的另一流程图;
图8是根据本公开实施例的报文生成方法的另一流程图;
图9是根据本公开实施例的报文生成方法的另一流程图;
图10是根据本公开实施例的报文传输方法的流程图;
图11是根据本公开实施例的报文传输方法的另一流程图;
图12是根据本公开实施例的配置方法的流程图;
图13是根据本公开实施例的配置方法的另一流程图;
图14是根据本公开实施例的电子设备的组成框图;以及
图15是根据本公开实施例的计算机可读存储介质的组成框图。
具体实施方式
为使本领域的技术人员更好地理解本公开的技术方案,下面结合附图对本公开实施例的报文传输控制方法、报文生成方法、报文传输方法、配置方法、电子设备、计算机可读存储介质进行详细描述。
在下文中将参考附图更充分地描述示例实施例,但是所述示例实施例可以以不同形式来体现且不应当被解释为限于本文阐述的实施例。提供这些实施例的目的在于使本公开透彻和完整,并将使本领域技术人员充分理解本公开的范围。
在不冲突的情况下,本公开各实施例及实施例中的各特征可相互组合。
如本文所使用的,术语“和/或”包括一个或多个相关列举条目的任何和所有组合。
本文所使用的术语仅用于描述特定实施例,且不意欲限制本公 开。如本文所使用的,单数形式“一个”和“该”也意欲包括复数形式,除非上下文另外清楚指出。还将理解的是,当本说明书中使用术语“包括”和/或“由……制成”时,指定存在所述特征、整体、步骤、操作、元件和/或组件,但不排除存在或添加一个或多个其它特征、整体、步骤、操作、元件、组件和/或其群组。
除非另外限定,否则本文所用的所有术语(包括技术和科学术语)的含义与本领域普通技术人员通常理解的含义相同。还将理解,诸如那些在常用字典中限定的那些术语应当被解释为具有与其在相关技术以及本公开的背景下的含义一致的含义,且将不解释为具有理想化或过度形式上的含义,除非本文明确如此限定。
经本公开实施例的发明人研究发现,相关技术中,为了保证OAM的灵活性,需要处理器花费大量资源处理和存储完整的OAM报文,导致OAM发送性能很低;为了保证OAM发送性能,则需要固化OAM报文格式,导致灵活性和扩展性较差。相关技术中,OAM报文发送的软件和硬件实现均无法同时保证OAM发送性能和灵活性。
有鉴于此,参照图1,本公开实施例提供一种报文传输控制方法,包括步骤S110至S130。
在步骤S110,从片上存储设备的当前会话的触发配置空间中读取当前会话的触发配置信息,其中,片上存储设备中包括多个触发配置空间,每一个触发配置空间对应一个会话,当前会话为多个会话中的一者。
在步骤S120,根据当前会话的触发配置信息判断当前会话是否需要发送报文。
在步骤S130,响应于当前会话需要发送报文,将当前会话的会话标识和当前会话需要发送的报文的报文信息写入片上存储设备。
在本公开实施例中,在片上存储设备中为多个会话分配了用于存储各个会话的触发配置信息的触发配置空间。触发配置空间中的触发配置信息由板载微控制单元(MCU,Microcontroller Unit)上运行的软件配置。
在本公开实施例中,每个会话的协议类型可配置,本公开实施 例对于可配置的协议类型不做特殊限定。例如,协议类型包括但不限于:以太网OAM、多协议标签交换-传送架构(MPLS_TP,Multi-Protocol Label Switching Transport Profile)OAM、双向转发检测(BFD,Bidirectional Forwarding Detection)。此外,本公开实施例还支持自定义的OAM协议类型,自定义的OAM协议类型可以用于协议扩展。需要说明的是,在本公开实施例中,当会话配置了自定义的OAM协议类型时,会话可以发送任意类型的报文。
在本公开实施例中,每个会话均能够发送多种报文类型的OAM报文,本公开实施例对报文类型不做特殊限定。例如,报文类型可以包括连通性检测(CV,Connectivity Verification)、BFD、客户信号失效(CSF,Client Signal Fail)、自动保护倒换(APS,Automatic Protection Switching)、告警指示(AIS,Alarm Indication Signal)等,还可以是2544报文、链路状态包(LSP,Link-State Packet)报文等。此外,本公开实施例还支持自定义报文类型,自定义报文类型可以用于扩展。
在本公开实施例中,硬件逻辑逐个访问片上存储设备中的触发配置空间,判断各个会话是否需要发送报文。对应于每一个会话,都通过步骤S110至步骤S130读取会话的触发配置信息,根据触发配置信息判断会话是否需要发送报文,并在需要发送报文时,将会话的会话标识和会话需要发送的报文的报文信息写入片上存储设备,以使硬件逻辑进一步根据片上存储设备中需要发送报文的会话的会话标识和报文信息组装报文并传输。步骤S110至步骤S130中的“当前会话”为硬件逻辑当前访问的触发配置空间所对应的会话。
本公开实施例对于如何逐个访问片上存储设备中的触发配置空间不做特殊限定,例如,可以通过轮询方式访问片上存储设备中的触发配置空间,并判断会话是否需要发送报文。需要说明的是,在本公开实施例中,在逐个访问片上存储设备中的触发配置空间的过程中,访问两个相邻会话的触发配置空间并判断会话是否需要发送报文时,在两次访问之间存在时间间隔,因此可以避免多个会话在相同时刻发送报文造成突发流量,从而有效平滑突发流量。逐个访问片上存储设 备中的触发配置空间并判断会话是否需要发送报文还能够实现高精度发送报文。
本公开实施例对于会话的会话标识的具体形式不做特殊限定。例如,会话标识可以是会话的会话号,硬件逻辑可以通过多个会话的会话号逐个读取会话的触发配置空间。作为可选的实施方式,多个会话的会话标识可以为从0开始连续编号的会话号,硬件逻辑首先访问会话号0对应的触发配置空间,判断会话号0的会话是否需要发送报文;然后将会话号加1,访问会话号1对应的触发配置空间,判断会话号1的会话是否需要发送报文……依次类推,直至访问最后一个会话号对应的触发配置空间。
作为可选的实施方式,片上存储设备中包括先进先出(FIFO,First Input First Output)存储器,在步骤S130中,硬件逻辑可以将当前会话的会话标识和当前会话需要发送的报文的报文信息写入片上存储设备中的FIFO存储器中。
在本公开实施例提供的报文传输控制方法中,在片上存储设备中为多个会话分配了用于存储各个会话的触发配置信息的触发配置空间,硬件逻辑通过读取由板载MCU上运行的软件配置到触发配置空间中的触发配置信息,判断各个会话是否需要发送报文,硬件逻辑还能够进一步根据片上存储设备中需要发送报文的会话的会话标识和报文信息组装报文并传输,从而使处理器无需花费大量资源处理和存储完整报文,保证了性能;同时,在本公开实施例中,每一个会话的协议类型可配置,每一个会话都能够同时发送多种报文,并且支持自定义协议类型和报文类型,保证了灵活性和扩展性;通过逐个访问片上存储设备中的触发配置空间判断会话是否需要发送报文还能够有效平滑突发流量,实现高精度发送报文。
在本公开实施例中,每一个会话都能同时发送多种报文类型的报文,即,每一个会话能够支持多种报文类型。硬件逻辑访问会话的触发配置空间时,会话支持的多种报文类型的报文可以被全部触发,也可以被部分触发,还可以全部不触发,本公开实施例对此不做特殊限定。在本公开实施例中,片上存储设备的触发配置空间中配置的触 发配置信息包括会话支持的报文类型、及各种报文类型的报文的触发条件。硬件逻辑通过访问会话的触发配置空间,可以分别判断各种报文类型的报文的触发条件是否满足,当多种报文类型的报文的触发条件都不满足时,则判定会话不需要发送报文;否则判定会话需要发送报文。
相应地,在一些实施例中,所述触发配置信息包括所述当前会话支持的至少一种报文类型,参照图2,步骤S 120可以包括步骤S121。
在步骤S121,根据当前会话的触发配置信息判断触发配置信息包括的各种报文类型的报文的触发条件是否满足。
响应于触发配置信息包括的至少一种报文类型的报文的触发条件满足,判定当前会话需要发送报文;响应于触发配置信息包括的各种报文类型的报文的触发条件均不满足,判定当前会话不需要发送报文。
在本公开实施例中,OAM连接建立后,两端的OAM实体会以一定的时间间隔为周期发送OAM协议数据单元(PDU,Protocol Data Unit)来检测OAM连接是否正常。如果一端OAM实体在连接超时时间内未收到对端OAM实体发来的OAM PDU,则认为OAM连接中断。在本公开实施例中,在每个会话的触发配置空间中配置有会话支持的各种报文类型的报文的发送周期。同一个会话中,不同报文类型的报文的发送周期可以相同,也可以不同,本公开实施例对此不做特殊限定。作为可选的实施方式,在硬件逻辑访问会话的触发配置空间时,可以根据当前时刻是否满足各种报文类型的报文的发送周期,判断各种报文类型的报文是否满足触发条件。只有硬件逻辑访问会话的触发配置空间的时刻满足报文的发送周期时,才通过步骤S130将满足发送周期的报文的报文信息写入片上存储设备,并由硬件逻辑进一步组装报文并传输,从而保证了各种报文类型的报文的发送周期。
相应地,在一些实施例中,所述触发配置信息还包括各种所述报文类型的报文的发送周期,参照图3,步骤S121可以包括步骤S1211。
在步骤S1211,针对各种报文类型中的每一个,判断所述报文类型的报文的发送周期是否满足。
响应于满足发送周期,判定所述报文类型的报文的触发条件满足;响应于不满足发送周期,判定所述报文类型的报文的触发条件不满足。
本公开实施例对于如何执行步骤S211以判断报文的发送周期是否满足不作特殊限定。例如,可以根据定时器的基准脉冲周期(3.33ms),当报文的发送周期对应的基准脉冲到来时,则表示满足报文的发送周期。
本公开实施例还支持首包发送。需要说明的是,在周期性发送报文的过程的起始时刻,第一次发送报文即为首包发送。在本公开实施例中,当某种报文类型的报文为首包发送时,则判定满足该报文类型的报文的触发条件,并通过步骤S130将报文的报文信息写入片上存储设备,并由硬件逻辑进一步组装报文并传输。
相应地,参照图3,在一些实施例中,在步骤S1211之前,步骤S121还可以包括步骤S1212。
在步骤S1212,针对各种报文类型中的每一个,判断所述报文类型的报文是否为首包发送。
响应于所述报文类型的报文为首包发送,判定所述报文类型的报文的触发条件满足;响应于所述报文类型的报文不是首包发送,执行步骤S1211。
在一些实施例中,参照图3,在步骤S1212之前,步骤S121还可以包括步骤S1213。
在步骤S1213,针对各种报文类型中的每一个,判断所述报文类型的报文的发送条件是否满足。
响应于所述报文类型的报文的发送条件满足,执行步骤S1212;响应于所述报文类型的报文的发送条件不满足,判定所述报文类型的报文的触发条件不满足。
本公开实施例对如何判断报文的发送条件是否满足不做特殊限定。例如,可以根据对链路性能的监测判断报文的发送条件是否满足,当需要对链路的丢包、时延和抖动等进行衡量以及对各类流量进行统计时,判定满足报文的发送条件;也可以根据对链路故障侦测和告警 判断报文的发送条件是否满足,当需要对链路故障进行侦测时,判定满足报文的发送条件;还可以根据对链路的环路测试判断报文的发送条件是否满足,当需要对链路中是否存在环路时,判定满足报文的发送条件。
在本公开实施例中,板载MCU上运行的软件在会话的触发配置空间中配置的触发配置信息还可以包括发送使能信息,发送使能信息能够定义会话的发送使能是否开启。硬件逻辑通过判断发送使能是否开启来判断会话是否支持发送报文以及会话支持发送的报文类型。
相应地,在一些实施例中,触发配置信息还包括当前会话的发送使能信息,参照图3,在步骤S1213之前,步骤S121还可以包括步骤S1214。
在步骤S1214,根据当前会话的发送使能信息判断当前会话的发送使能是否开启。
响应于当前会话的发送使能开启,执行步骤S1213;响应于当前会话的发送使能未开启,判定触发条件不满足。
在本公开实施例中,当前会话的发送使能可以包括全局使能,全局使能开启表示当前会话支持发送报文;发送使能还可以包括多个会话使能,每一个会话使能对应一种报文类型,例如,多个会话使能可以包括CV/BFD使能、CSF使能、APS使能等,会话使能开启表示当前会话支持该会话使能对应的报文类型。
在本公开实施例中,硬件逻辑可以通过访问会话的触发配置空间,分别判断各种报文类型的报文是否满足触发条件,当至少一种报文类型的报文的触发条件满足时,则判定会话需要发送报文。此时,触发条件满足的报文即为会话需要发送的报文。需要说明的是,同一会话同时可以有一种或多种报文类型的报文需要发送。
需要说明的是,在本公开实施例中,发送报文时,报文中通常需要携带某些信息,例如,在CSF报文中携带信号失效原因信息sf_reason。作为可选的实施方式,本公开实施例中的硬件逻辑根据会话的协议类型、会话需要发送的报文的报文类型、报文需要携带的信息生成报文并传输。
相应地,在一些实施例中,触发条件满足的报文为当前会话需要发送的报文,触发配置信息还包括当前会话的协议类型、各种报文类型的报文的待携带信息,报文信息包括当前会话的协议类型、触发条件满足的报文的报文类型、触发条件满足的报文的待携带信息。
在本公开实施例中,硬件逻辑逐个访问片上存储设备中的触发配置空间,判断各个会话是否需要发送报文。本公开实施例对于如何逐个访问片上存储设备中的触发配置空间不做特殊限定。作为可选的实施方式,可以通过轮询方式访问片上存储设备中的触发配置空间,并判断会话是否需要发送报文。
相应地,参照图4,根据本公开实施例的报文传输控制方法还可以包括步骤S140。
在步骤S140,根据配置的需要轮询的会话数量和轮询粒度,从当前会话的下一个会话的触发配置空间中读取下一个会话的触发配置信息,以实现对多个会话的轮询,轮询粒度表示在轮询中,访问两个相邻会话的触发配置空间之间的时间间隔。
需要说明的是,在本公开实施例中,对多个会话的轮询是周期性执行的,在每个轮询周期内对需要轮询的多个会话进行轮询。能够保证对同一个会话的前后两次轮询之间的时间间隔为轮询周期,从而保证发送精度。例如,多个会话的会话标识为从0开始连续编号的会话号,当轮询周期到来时,硬件逻辑首先访问会话号0对应的触发配置空间,判断会话号0的会话是否需要发送报文;然后将会话号加1,访问会话号1对应的触发配置空间,判断会话号1的会话是否需要发送报文……依此类推,直至对所有会话号对应的触发配置空间都进行访问;然后将要访问的会话号重置为0,当下一个轮询周期到来时,再次从会话0开始发起轮询。
在本公开实施例中,硬件逻辑根据配置的需要轮询的会话数量和轮询粒度对多个会话进行轮询,能够使一个轮询周期内对多个会话的轮询时刻在轮询周期内均匀分布,从而有效平滑突发流量。
作为可选的实施方式,每次定时器的基准脉冲到来时,硬件逻辑发起对多个会话的轮询,例如,轮询周期为3.33ms。
相应地,在一些实施例中,需要轮询的会话数量和轮询粒度满足公式(1):
基准脉冲周期=需要轮询的会话数量×轮询粒度    (1)
参照图4,根据本公开实施例的报文传输控制方法还可以包括步骤S150。
在步骤S150,响应于基准脉冲,发起对多个会话的轮询。
在本公开实施例中,硬件逻辑响应于基准脉冲发起对多个会话的轮询能够保证每个会话前后两次轮询之间的时间间隔都为基准脉冲周期(例如,3.33ms),并能够使误差达到纳秒级别;以基准脉冲周期作为轮询周期还能够保证在会话中任意一种报文类型的报文的发送周期满足时,硬件逻辑都发起对多个会话的轮询,从而能够保证报文的发送周期。
参照图5,本公开实施例提供了一种报文生成方法,包括步骤S210至S240。
在步骤S210,从片上存储设备中读取目标会话的会话标识和目标会话需要发送的报文的报文信息。
在步骤S220,根据目标会话的会话标识,从目标会话的组包配置空间读取目标会话的组包配置信息和报文模板,其中,片上存储设备中包括多个组包配置空间,每一个组包配置空间对应一个会话,目标会话为多个会话中的一者。
在步骤S230,根据目标会话需要发送的报文的报文信息、目标会话的组包配置信息和报文模板生成目标会话的待传输报文。
在步骤S240,将待传输报文写入片上存储设备。
在本公开实施例中,硬件逻辑在步骤S210中从片上存储设备中读取的目标会话的会话标识和目标会话需要发送的报文的报文信息,是硬件逻辑通过本公开实施例的报文传输控制方法写入到片上存储设备中的。
作为可选的实施方式,硬件逻辑从片上存储设备的FIFO存储器中读取目标会话的会话标识和目标会话需要发送的报文的报文信息。
需要说明的是,片上存储设备中可以同时存储有多个会话的会 话标识以及多个会话对应的需要发送的报文的报文信息。本公开实施例所述的“目标会话”是指多个会话中硬件逻辑正在处理的会话,而不用于特指某一个会话。
在本公开实施例中,在片上存储设备中为多个会话分配了用于存储各个会话的组包配置信息和报文模板的组包配置空间,组包配置空间中的组包配置信息和报文模板由板载MCU上运行的软件配置。硬件逻辑根据从片上存储设备中读取的会话标识访问对应的组包配置空间。本公开实施例对于会话的会话标识的具体形式不做特殊限定。例如,会话标识可以是会话的会话号。
在本公开实施例中,为每个会话配置了报文模板。作为可选的实施方式,同一会话的不同报文类型的报文可以共享同一个报文模板。需要说明的是,不同报文类型的报文共享同一个报文模板是指,在报文模板中预先配置了不同报文类型的报文共享的内容,例如,在报文模板中,不同报文类型的报文共享目的地址(DA,Destination Address)、源地址(SA,Source Address)、虚拟局域网(VLAN,Virtual Local Area Network)标签、ACH等报文头内容和下发头、以及其他用户自定义内容。在片上存储设备中只存储报文模板,而不需要存储各种报文类型的完整报文。在根据报文模板生成待传输报文时,只需配置报文模板中共享内容以外的字段,而不需要对完整的报文进行处理,从而节约了存储资源和计算资源。
作为可选的实施方式,在本公开实施例中,组包配置空间中的组包配置信息和报文模板的部分或全部信息可以共享,从而进一步节约存储资源。
在本公开实施例中,每个会话的协议类型可配置,本公开实施例对于可配置的协议类型不做特殊限定。例如,协议类型包括但不限于:以太网OAM、MPLS_TP OAM、BFD。此外,本公开实施例还支持自定义的OAM协议类型,自定义的OAM协议类型可以用于协议扩展。需要说明的是,在本公开实施例中,当会话配置自定义的OAM协议类型时,会话可以发送任意类型的报文。
在本公开实施例中,每个会话均能够发送多种报文类型的OAM 报文,本公开实施例对报文类型不做特殊限定。例如,报文类型可以包括CV、BFD、CSF、APS、AIS等,还可以是2544报文、LSP报文等。此外,本公开实施例还支持自定义报文类型,自定义报文类型可以用于扩展。
相应地,在步骤S210中,硬件逻辑从片上存储设备中读取的会话标识对应的目标会话的协议类型可以是多种协议类型中的任意一种,例如,可以是以太网OAM、MPLS_TP OAM、BFD、自定义协议类型中的任意一种。在步骤S230中,根据硬件逻辑从片上存储设备中的读取的报文信息生成的待传输报文的报文类型可以是多种报文类型中的任意一种,例如,可以是CV、BFD、CSF、APS、AIS、自定义报文类型中的任意一种,本公开实施例对此不做特殊限定。
作为可选的实施方式,片上存储设备中包括调度缓存,在步骤S240中,硬件逻辑将待传输报文写入片上存储设备中的调度缓存中,并进一步由硬件逻辑调度传输待传输报文。作为可选的实施方式,调度缓存为FIFO存储器。
在本公开实施例提供的报文生成方法中,在片上存储设备中为多个会话分配了用于存储各个会话的组包配置信息和报文模板的组包配置空间。硬件逻辑读取组包配置空间中的组包配置信息和报文模板生成待传输报文,各个会话的协议类型可以是多种协议类型中的任意一种,生成的待传输报文可以是多种报文类型中的任意一种,保证了灵活性和扩展性;在片上存储设备中只存储报文模板,而不需要存储各种报文类型的完整报文;在根据报文模板生成待传输报文时,只需配置报文模板中共享内容以外的字段,而不需要对完整的报文进行处理,从而节约了存储资源和计算资源。
在本公开实施例中,报文模板中配置有多种报文类型的报文共享的内容。硬件逻辑根据从片上存储设备中读取的报文信息、从组包配置空间中读取的组包配置信息,替换报文模板中多种报文类型的报文共享的内容以外的字段,即可生成待传输报文。
相应地,参照图6,在一些实施例中,步骤S230可以包括步骤S231至S232。
在步骤S231,根据报文信息替换报文模板中的相应字段。
在步骤S232,根据组包配置信息替换报文模板中的私有头字段。
需要说明的是,在本公开实施例中,对应于同一报文模板,生成不同报文类型的报文,需要替换的报文模板中的字段可以相同、也可以不同;报文模板不同,生成相同报文类型的报文,需要替换的报文模板中的字段可以相同、也可以不同,本公开实施例对此不做特殊限定。硬件逻辑根据从片上存储设备中读取的报文信息确定需要发送的报文的报文类型。
还需要说明的是,在本公开实施例中,“相应字段”是指报文模板中能够承载报文信息的字段。
相应地,在一些实施例中,报文信息包括目标会话的协议类型、目标会话需要发送的报文的报文类型、目标会话需要发送的报文的待携带信息,参照图7,步骤S231可以包括步骤S2311。
在步骤S2311,根据目标会话的协议类型、目标会话需要发送的报文的报文类型、目标会话需要发送的报文的待携带信息,替换报文模板中的相应字段。
相应地,在一些实施例中,组包配置信息包括报文长度、报文偏移值,参照图7,步骤S232可以包括步骤S2321。
在步骤S2321,根据报文长度、报文偏移值替换报文模板中的私有头字段。
在本公开实施例中,硬件逻辑同时完成报文选路及报文模板中私有头字段的替换,从而减轻中央处理器(CPU,Central Processing Unit)的处理开销。
相应地,参照图7,在一些实施例中,步骤S232还可以包括步骤S2322。
在步骤S2322,根据组包配置信息进行报文选路。
在本公开实施例中,报文模板中还包括全局配置字段,全局配置字段用于减少CPU操作。本公开实施例中,硬件逻辑根据全局配置替换报文模板中的全局配置字段,从而进一步较少CPU开销。
相应地,参照图8,在一些实施例中,步骤S230还可以包括步 骤S233。
在步骤S233,根据全局配置信息,替换报文模板中的全局配置字段。
在本公开实施例中,会话支持自定义协议类型和自定义报文类型。作为可选的实施方式,当需要发送的报文的报文类型为自定义报文类型时,无需替换报文模板中的字段,直接读取组包配置空间中的报文模板作为待传输报文,从而保证报文的可扩展性。
相应地,参照图9,在一些实施例中,步骤S230可以包括步骤S234。
在步骤S234,响应于目标会话需要发送的报文的报文类型为自定义报文,将报文模板作为待传输报文。
参照图10,本公开实施例提供一种报文传输方法,包括步骤S310至S320。
在步骤S310,从片上存储设备中读取目标待传输报文,目标待传输报文为根据本公开实施例的报文生成方法生成并写入缓存的待传输报文。
在步骤S320,传输目标待传输报文。
在本公开实施例中,片上存储设备中可以同时存储有多个待传输报文,多个待传输报文的报文类型可以相同,也可以不同,本公开实施例对此不做特殊限定。例如,报文类型可以是CV、BFD、CSF、APS、AIS、2544报文、LSP报文等。此外,本公开实施例还支持自定义报文类型,自定义报文类型可以用于扩展。
在本公开实施例中,多个待传输报文可以对应于同一个会话,也可以对应于多个会话,本公开实施例对此不做特殊限定。例如,协议类型包括但不限于:以太网OAM、MPLS_TP OAM、BFD。此外,本公开实施例还支持自定义的OAM协议类型,自定义的OAM协议类型可以用于协议扩展。
作为可选的实施方式,片上存储设备中包括调度缓存,在步骤S310中,硬件逻辑从片上存储设备中的调度缓存中读取目标待传输报文。作为可选的实施方式,调度缓存为FIFO存储器。
在本公开实施例提供的报文传输方法中,硬件逻辑从片上存储设备中读取根据本公开实施例的报文生成方法生成并写入的待传输报文并传输。待传输报文的报文类型可以是多种报文类型中的任意一种,待传输报文对应的会话的协议类型可以是多种协议类型中的一种,保证了灵活性和扩展性。
作为可选的实施方式,硬件逻辑根据待传输报文的优先级对片上存储设备中的待传输报文进行调度传输。
相应地,参照图11,在一些实施例中,在步骤S310之前,根据本公开实施例的报文传输方法还可以包括步骤S331至S332。
在步骤S331,确定片上存储设备中具有最高优先级的待传输报文。
在步骤S332,将具有最高优先级的待传输报文确定为目标待传输报文。
本公开实施例对于如何确定片上存储设备中具有最高优先级的待传输报文做特殊限定。作为可选的实施方式,硬件逻辑可以根据整形信号和反压信号确定具有最高优先级的待传输报文。
在一些实施例中,参照图11,在步骤S310之前,根据本公开实施例的报文传输方法还可以包括步骤S340。
在步骤S340,根据前级缓存空满信号判断片上存储设备中是否存在待传输报文。
响应于片上存储设备中存在待传输报文,执行步骤S310。
参照图12,本公开实施例提供一种配置方法,包括步骤S410至S420。
在步骤S410,在多个会话的触发配置空间中分别配置各个会话的触发配置信息,触发配置信息用于判断会话是否需要发送报文,芯片的片上存储设备中包括多个触发配置空间,每一个触发配置空间对应一个会话。
在步骤S420,在多个会话的组包配置空间中分别配置各个会话的组包配置信息和报文模板,组包配置信息和报文模板用于生成会话的待传输报文,芯片的片上存储设备中包括多个组包配置空间,每一 个组包配置空间对应一个会话。
本公开实施例提供的配置方法可以用于板载MCU对芯片进行配置。板载MCU可以在芯片的片上存储设备中配置多个会话的触发配置信息,使得芯片的硬件逻辑能够根据本公开实施例的报文传输控制方法判断各个会话是否需要发送报文;板载MCU可以在芯片的片上存储设备中配置多个会话的组包配置信息和报文模板,使得芯片的硬件逻辑能够根据本公开实施例的报文生成方法生成待传输报文。
在本公开实施例中,板载MCU可以为多个会话配置不同的协议类型。本公开实施例对协议类型不做特殊限定。例如,协议类型包括但不限于:以太网OAM、MPLS_TP OAM、BFD。此外,本公开实施例还支持自定义的OAM协议类型,自定义的OAM协议类型可以用于协议扩展。需要说明的是,在本公开实施例中,当会话配置自定义的OAM协议类型时,会话可以发送任意类型的报文。
在本公开实施例中,板载MCU可以为每个会话配置多种报文类型,以使得每个会话均能够发送多种报文类型的OAM报文。本公开实施例对报文类型不做特殊限定。例如,报文类型可以包括CV、BFD、CSF、APS、AIS等,还可以是2544报文、LSP报文等。此外,本公开实施例还支持自定义报文类型,自定义报文类型可以用于扩展。
在本公开实施例提供的配置方法中,板载MCU可以在芯片的片上存储设备中为多个会话配置触发配置信息,使得芯片的硬件逻辑能够通过读取触发配置信息,判断各个会话是否需要发送报文;板载MCU可以在芯片的片上存储设备中为多个会话配置组包配置信息和报文模板,使得芯片的硬件逻辑能够通过读取组包配置空间中的组包配置信息和报文模板生成待传输报文,并使得芯片的硬件逻辑进一步传输待传输报文;板载MCU可以为多个会话配置多种协议类型,并为每一个会话配置多种报文类型,使得每个会话都能够发送多种报文类型的报文,从而保证了灵活性、扩展性,节约了计算资源、存储资源,还能够有效平滑突发流量,实现高精度发送报文。
在一些实施例中,触发配置信息可以包括下列中的至少一者:会话的协议类型、会话支持的至少一种报文类型、各种报文类型的报 文的发送周期、会话的发送使能信息、各种报文类型的报文的待携带信息。
在一些实施例中,组包配置信息可以包括报文长度、报文偏移值中的至少一者。
在本公开实施例中,板载MCU在芯片的片上存储设备中配置需要轮询的会话数量和轮询粒度,以使得芯片的硬件逻辑能够根据配置的需要轮询的会话数量和轮询粒度对多个会话进行轮询,从而能够使一个轮询周期内对多个会话的轮询时刻在轮询周期内均匀分布,从而有效平滑突发流量。
相应地,参照图13,在一些实施例中,根据本公开实施例的配置方法还可以包括步骤S430。
在步骤S430,配置需要轮询的会话数量和轮询粒度,轮询粒度表示在轮询中,访问两个相邻会话的触发配置空间之间的时间间隔。
作为可选的实施方式,板载MCU在芯片的片上存储设备中配置的需要轮询的会话数量和轮询粒度满足公式(2):
基准脉冲周期=需要轮询的会话数量×轮询粒度    (2)
当芯片的片上存储设备中配置的需要轮询的会话数量和轮询粒度满足公式(2)时,芯片的硬件逻辑在每次定时器的基准脉冲到来时发起对多个会话的轮询,从而既能有效平滑突发流量,还能保证报文的发送周期。
参照图14,本公开实施例提供了一种电子设备,包括:一个或多个处理器101;以及存储器102,其上存储有一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现以下方法中的至少一者:根据本公开实施例的报文传输控制方法;根据本公开实施例的报文生成方法;根据本公开实施例的报文传输方法;根据本公开实施例的配置方法。
在一些实施例中,所述电子设备还包括一个或多个I/O接口103,其通过总线104与处理器101和存储器102连接,以实现信息交互。
处理器101为具有数据处理能力的器件,其包括但不限于中央处理器(CPU)等。存储器102为具有数据存储能力的器件,其包括 但不限于随机存取存储器(RAM,更具体如SDRAM、DDR等)、只读存储器(ROM)、带电可擦可编程只读存储器(EEPROM)、闪存(FLASH)。I/O接口(读写接口)103能实现信息交互,其包括但不限于数据总线(Bus)等。
在一些实施例中,处理器101、存储器102和I/O接口103通过总线104相互连接,进而与计算设备的其它组件连接。
参照图15,本公开实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现以下方法中的至少一者:根据本公开实施例的报文传输控制方法;根据本公开实施例的报文生成方法;根据本公开实施例的报文传输方法;根据本公开实施例的配置方法。
为了使本领域技术人员能够更清楚地理解本公开实施例提供的技术方案,下面通过具体的实施例,对本公开实施例提供的技术方案进行详细说明:
实施例一
在实施例一中,对所有会话进行轮询,根据定时器和告警状态判断当前会话是否需要发送报文。在实施例一中,当前会话能够发送以太网OAM报文、TP1731报文、BFD报文、自定义报文类型的报文。当当前会话需要发送报文时,硬件逻辑将需要发送的报文的基本信息写入片上存储设备中,需要发送的报文的基本信息包括当前会话的会话号和需要发送的报文的报文类型。
在实施例一中,以基准脉冲周期(3.33ms)为轮询周期。每次定时器的基准脉冲到来时,都从会话0开始发起轮询,这样可以保证每个会话前后两次轮询之间的间隔都为3.3ms,误差在纳秒级别,从而提高发送精度。
在实施例一中,对于发送周期为10ms、100ms、1s等场景,由于是3.33ms的整数倍,其对应的基准脉冲和3.33ms脉冲同时拉高,并持续整个轮询周期。
在实施例一中,轮询粒度和轮询的会话数量可配置。例如,主频为主频为1Ghz,总共128K个会话,在某场景下只会使用其中的30K 个会话,从而可以将轮询粒度配为100ns,轮询数量配为30K,当基准脉冲(3.33ms)到来时,从会话0开始轮询,100ns后轮询会话1,100ns后轮询会话2,...一直到会话30K结束轮询,30K个会话的轮询时刻在3ms的时间范围内均匀分布。这样可以保证无论有多少个会话在发送报文,无论每个会话配置的报文发送周期多少,都可以有效平滑突发流量,使其均匀分布。
实施例二
在实施例二中,硬件逻辑从片上存储设备中读取需要发送的报文的报文信息,需要发送的报文的报文信息包括需要发送报文的会话的会话号和需要发送的报文的报文类型;根据需要发送报文的会话的会话号读取组包配置信息和报文模板;然后根据组包配置信息和需要发送的报文的报文类型替换报文模板中的相应字段,组装生成待传输报文;将待传输报文写入缓存。
在实施例二中,同一会话的不同报文类型的报文共享同一个报文模板,从而在保证灵活性的同时节约缓存的存储资源和CPU处理资源。报文模板包括DA、SA、VLAN、标签、ACH等报文头内容,以及其他用户可自定义的内容。在实施例二中,报文模板默认按照CV/BFD报文格式配置。组装生成待传输报文时,从缓存中读取报文模板后,如果需要发送的报文是CV报文,则会替换rdi、seqnum、lm_cnt字段;如果需要发送的报文是BFD报文,则会替换diag、sta、checksum字段;如果是其他报文,则会替换version、opcode、flags、TLV等字段。
在实施例二中,还可以根据协议类型和全局配置替换报文模板中的全局配置字段,包括最内层标签的TC值、信道类型(channeltype)值、mel值等。
在实施例二中,如果需要发送的报文是自定义报文类型的报文,则不进行任何替换报文模板字段的操作,直接读取CPU配置的报文模板作为待传输报文,从而保证报文的可扩展性。
实施例三
OAM报文的发送流程可以包括一下八个步骤。
第一步,板载MCU在芯片的片上存储设备中的触发配置空间中为每个会话配置触发配置信息,其包括会话的协议类型(以太OAM/MPLS-TP OAM/BFD OAM/自定义类型),CV/BFD使能,cc使能,lm预激活使能,CSF使能,CSF发送类型(los/fdi/rdi/dci/soft),CSF触发类型(端口告警触发/工作路径流点告警触发/保护路径流点告警触发),CSF触发告警索引,APS使能,发送周期,发送周期粒度,发送优先级等。
第二步,板载MCU在芯片的片上存储设备中的组包配置空间中为每个会话配置组包配置信息,其包括会话发送trunk选路逻辑端口ID,报文长度,报文偏移值,校验和(checksum)、ttl、信道类型(channeltype)、gal、label、seqnum替换使能等。
第三步,板载MCU在芯片的片上存储设备中的组包配置空间中为每个会话配置PDU报文模板。
第四步,板载MCU在芯片的片上存储设备中的组包配置空间中中配置各个会话对应的下发头。
第五步,芯片的硬件逻辑周期性地轮询所有会话,对于每个会话的每种报文类型,首先判断全局使能和会话使能是否打开,然后判断发送条件是否满足,若满足发送条件,则继续判断是否是首包发送,若是首包,则立即触发,若不是,则继续判断当前报文配置周期是否与当前周期信号相匹配,为了保证发送周期和发送精度,只有在对应的周期信号拉高时,才进行触发操作。
第六步,芯片的硬件逻辑将需要发送的报文的报文信息写入片上存储设备,需要发送的报文的报文信息包括当前会话的会话号、协议类型、以及需要在报文中携带的待携带信息,如CSF报文的sf_reason等。
第七步,芯片的硬件逻辑根据从片上存储设备中读取的会话号读取组包配置信息、PDU报文模板,并根据会话的协议类型、需要发送的报文的报文类型及待替换信息替换PDU报文模板中的字段和私有头中的字段,然后把组装完成的待传输报文写入片上存储设备中的调度缓存。
第八步,芯片的硬件逻辑根据整形信号和后级模块的反压信号进行sp调度,把OAM报文和2544报文发送出去。
至此,一个OAM报文的发送流程完成。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其它数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其它存储器技术、CD-ROM、数字多功能盘(DVD)或其它光盘存储、磁盒、磁带、磁盘存储或其它磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其它的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其它传输机制之类的调制数据信号中的其它数据,并且可包括任何信息递送介质。
本文已经公开了示例实施例,并且虽然采用了具体术语,但它们仅用于并仅应当被解释为一般说明性含义,并且不用于限制的目的。在一些实例中,对本领域技术人员显而易见的是,除非另外明确指出,否则可单独使用与特定实施例相结合描述的特征、特性和/或元素,或可与其它实施例相结合描述的特征、特性和/或元件组合使用。因此,本领域技术人员将理解,在不脱离由所附的权利要求阐明的本公开的范围的情况下,可进行各种形式和细节上的改变。

Claims (27)

  1. 一种报文传输控制方法,包括:
    从片上存储设备的当前会话的触发配置空间中读取所述当前会话的触发配置信息,其中,所述片上存储设备中包括多个触发配置空间,每一个触发配置空间对应一个会话,所述当前会话为多个会话中的一者;
    根据所述当前会话的触发配置信息判断所述当前会话是否需要发送报文;以及
    响应于所述当前会话需要发送报文,将所述当前会话的会话标识和所述当前会话需要发送的报文的报文信息写入所述片上存储设备。
  2. 根据权利要求1所述的报文传输控制方法,其中,所述当前会话的触发配置信息包括所述当前会话支持的至少一种报文类型,并且根据所述当前会话的触发配置信息判断所述当前会话是否需要发送报文的步骤包括:
    根据所述当前会话的触发配置信息判断所述触发配置信息包括的各种报文类型的报文的触发条件是否满足;以及
    响应于所述触发配置信息包括的至少一种报文类型的报文的触发条件满足,判定所述当前会话需要发送报文。
  3. 根据权利要求2所述的报文传输控制方法,其中,所述当前会话的触发配置信息还包括各种报文类型的报文的发送周期,并且根据所述当前会话的触发配置信息判断所述触发配置信息包括的各种报文类型的报文的触发条件是否满足的步骤包括:
    针对各种报文类型中的每一个,判断所述报文类型的报文的发送周期是否满足;以及
    响应于满足所述发送周期,判定所述报文类型的报文的触发条件满足。
  4. 根据权利要求3所述的报文传输控制方法,其中,在判断所述报文类型的报文的发送周期是否满足的步骤之前,根据所述当前会话的触发配置信息判断所述触发配置信息包括的各种报文类型的报文的触发条件是否满足的步骤还包括:
    针对各种报文类型中的每一个,判断所述报文类型的报文是否为首包发送;
    响应于所述报文类型的报文为首包发送,判定所述报文类型的报文的触发条件满足;
    响应于所述报文类型的报文不是首包发送,执行判断所述报文类型的报文的发送周期是否满足的步骤。
  5. 根据权利要求4所述的报文传输控制方法,其中,在判断所述报文类型的报文是否为首包发送的步骤之前,根据所述当前会话的触发配置信息判断所述触发配置信息包括的各种报文类型的报文的触发条件是否满足的步骤还包括:
    针对各种报文类型中的每一个,判断所述报文类型的报文的发送条件是否满足;
    响应于所述报文类型的报文的发送条件满足,执行判断所述报文类型的报文是否为首包发送的步骤;
    响应于所述报文类型的报文的发送条件不满足,判定所述报文类型的报文的触发条件不满足。
  6. 根据权利要求5所述的报文传输控制方法,其中,所述当前会话的触发配置信息还包括所述当前会话的发送使能信息,并且在判断所述报文类型的报文的发送条件是否满足的步骤之前,根据所述当前会话的触发配置信息判断所述触发配置信息包括的各种报文类型的报文的触发条件是否满足的步骤还包括:
    根据所述发送使能信息判断所述当前会话的发送使能是否开启;
    响应于所述当前会话的发送使能开启,执行判断所述报文类型 的报文的发送条件是否满足的步骤;
    响应于所述当前会话的发送使能未开启,判定所述触发配置信息包括的各种报文类型的报文的触发条件均不满足。
  7. 根据权利要求2至6中任意一项所述的报文传输控制方法,其中,
    所述当前会话的触发配置信息还包括所述当前会话的协议类型、各种报文类型的报文的待携带信息,并且
    所述报文信息包括所述当前会话的协议类型、触发条件满足的报文的报文类型、触发条件满足的报文的待携带信息。
  8. 根据权利要求1至6中任意一项所述的报文传输控制方法,还包括:
    根据配置的需要轮询的会话数量和轮询粒度,从所述当前会话的下一个会话的触发配置空间中读取所述下一个会话的触发配置信息,以实现对所述多个会话的轮询,其中,所述轮询粒度表示在轮询中,访问两个相邻会话的触发配置空间之间的时间间隔。
  9. 根据权利要求8所述的报文传输控制方法,其中,需要轮询的会话数量和轮询粒度满足以下公式:
    基准脉冲周期=需要轮询的会话数量×轮询粒度,
    并且所述报文传输控制方法还包括:
    响应于基准脉冲,发起对所述多个会话的轮询。
  10. 一种报文生成方法,包括:
    从片上存储设备中读取目标会话的会话标识和所述目标会话需要发送的报文的报文信息;
    根据所述目标会话的会话标识,从所述目标会话的组包配置空间读取所述目标会话的组包配置信息和报文模板,其中,所述片上存储设备中包括多个组包配置空间,每一个组包配置空间对应一个会话, 所述目标会话为所述多个会话中的一者;
    根据所述目标会话需要发送的报文的报文信息、所述目标会话的组包配置信息和报文模板生成所述目标会话的待传输报文;以及
    将所述待传输报文写入所述片上存储设备。
  11. 根据权利要求10所述的报文生成方法,其中,根据所述目标会话需要发送的报文的报文信息、所述目标会话的组包配置信息和报文模板生成所述目标会话的待传输报文的步骤包括:
    根据所述报文信息替换所述报文模板中的相应字段;以及
    根据所述组包配置信息替换所述报文模板中的私有头字段。
  12. 根据权利要求11所述的报文生成方法,其中,所述目标会话需要发送的报文的报文信息包括所述目标会话的协议类型、所述目标会话需要发送的报文的报文类型、所述目标会话需要发送的报文的待携带信息,并且根据所述报文信息替换所述报文模板中的相应字段的步骤包括:
    根据所述目标会话的协议类型、所述目标会话需要发送的报文的报文类型、所述目标会话需要发送的报文的待携带信息,替换所述报文模板中的相应字段。
  13. 根据权利要求11所述的报文生成方法,其中,所述目标会话的组包配置信息包括报文长度、报文偏移值,并且根据所述组包配置信息替换所述报文模板中的私有头字段的步骤包括:
    根据所述报文长度、所述报文偏移值替换所述报文模板中的私有头字段。
  14. 根据权利要求13所述的报文生成方法,其中,根据所述组包配置信息替换所述报文模板中的私有头字段的步骤包括还包括:
    根据所述组包配置信息进行报文选路。
  15. 根据权利要求11至14中任意一项所述的报文生成方法,其中,根据所述目标会话需要发送的报文的报文信息、所述目标会话的组包配置信息和报文模板生成所述目标会话的待传输报文的步骤还包括:
    根据全局配置信息,替换所述报文模板中的全局配置字段。
  16. 根据权利要求10所述的报文生成方法,其中,所述目标会话需要发送的报文的报文信息包括所述目标会话需要发送的报文的报文类型,并且根据所述目标会话需要发送的报文的报文信息、所述目标会话的组包配置信息和报文模板生成所述目标会话的待传输报文的步骤包括:
    响应于所述目标会话需要发送的报文的报文类型为自定义报文,将所述报文模板作为所述待传输报文。
  17. 一种报文传输方法,包括:
    从片上存储设备中读取目标待传输报文,所述目标待传输报文为根据权利要求10至16中任意一项所述的报文生成方法生成并写入缓存的待传输报文;
    传输所述目标待传输报文。
  18. 根据权利要求17所述的报文传输方法,其中,在从片上存储设备中读取目标待传输报文的步骤之前,所述报文传输方法还包括:
    确定所述片上存储设备中具有最高优先级的待传输报文;以及
    将具有最高优先级的待传输报文确定为所述目标待传输报文。
  19. 根据权利要求18所述的报文传输方法,其中,确定所述片上存储设备中具有最高优先级的待传输报文的步骤包括:
    根据整形信号和反压信号确定所述具有最高优先级的待传输报文。
  20. 根据权利要求17至19中任意一项所述的报文传输方法,其中,在从片上存储设备中读取目标待传输报文的步骤之前,所述报文传输方法还包括:
    根据前级缓存空满信号判断所述片上存储设备中是否存在待传输报文;以及
    响应于所述片上存储设备中存在待传输报文,执行从片上存储设备中读取目标待传输报文的步骤。
  21. 一种配置方法,包括:
    在多个会话的触发配置空间中分别配置各个会话的触发配置信息,所述触发配置信息用于判断会话是否需要发送报文,其中,芯片的片上存储设备中包括多个触发配置空间,每一个触发配置空间对应一个会话;以及
    在所述多个会话的组包配置空间中分别配置各个会话的组包配置信息和报文模板,所述组包配置信息和所述报文模板用于生成会话的待传输报文,其中,所述芯片的片上存储设备中包括多个组包配置空间,每一个组包配置空间对应一个会话。
  22. 根据权利要求21所述的配置方法,其中,所述触发配置信息包括下列中的至少一者:
    会话的协议类型、会话支持的至少一种报文类型、所述至少一种报文类型中的每一种报文类型的报文的发送周期、会话的发送使能信息、所述至少一种报文类型中的每一种报文类型的报文的待携带信息。
  23. 根据权利要求21所述的配置方法,其中,所述组包配置信息包括报文长度、报文偏移值中的至少一者。
  24. 根据权利要求20至22中任意一项所述的配置方法,还包括:
    配置需要轮询的会话数量和轮询粒度,所述轮询粒度表示在轮询中,访问两个相邻会话的触发配置空间之间的时间间隔。
  25. 根据权利要求24所述的配置方法,其中,需要轮询的会话数量和轮询粒度满足以下公式:
    基准脉冲周期=需要轮询的会话数量×轮询粒度。
  26. 一种电子设备,包括:
    一个或多个处理器;以及
    存储装置,其上存储有一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现以下方法中的至少一者:
    根据权利要求1至9中任意一项所述的报文传输控制方法;
    根据权利要求10至16中任意一项所述的报文生成方法;
    根据权利要求17至20中任意一项所述的报文传输方法;
    根据权利要求21至25中任意一项所述的配置方法。
  27. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器实现以下方法中的至少一者:
    根据权利要求1至9中任意一项所述的报文传输控制方法;
    根据权利要求10至16中任意一项所述的报文生成方法;
    根据权利要求17至20中任意一项所述的报文传输方法;
    根据权利要求21至25中任意一项所述的配置方法。
PCT/CN2021/119623 2020-09-23 2021-09-22 报文传输控制、生成、传输方法及配置方法、设备、介质 WO2022063126A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011008846.1A CN114301852A (zh) 2020-09-23 2020-09-23 报文传输控制、生成、传输方法及配置方法、设备、介质
CN202011008846.1 2020-09-23

Publications (1)

Publication Number Publication Date
WO2022063126A1 true WO2022063126A1 (zh) 2022-03-31

Family

ID=80846223

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/119623 WO2022063126A1 (zh) 2020-09-23 2021-09-22 报文传输控制、生成、传输方法及配置方法、设备、介质

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116155731A (zh) * 2023-04-14 2023-05-23 中国人民解放军国防科技大学 一种支持rmt的控制通路的通信控制方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102255786A (zh) * 2010-05-20 2011-11-23 中国移动通信集团广西有限公司 业务报文处理方法及装置
CN104980293A (zh) * 2014-04-02 2015-10-14 深圳市中兴微电子技术有限公司 一种oam报文快速发送和检测处理的方法及装置
WO2016177121A1 (zh) * 2015-08-18 2016-11-10 中兴通讯股份有限公司 一种文件传输方法、装置及应用服务器

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102255786A (zh) * 2010-05-20 2011-11-23 中国移动通信集团广西有限公司 业务报文处理方法及装置
CN104980293A (zh) * 2014-04-02 2015-10-14 深圳市中兴微电子技术有限公司 一种oam报文快速发送和检测处理的方法及装置
WO2016177121A1 (zh) * 2015-08-18 2016-11-10 中兴通讯股份有限公司 一种文件传输方法、装置及应用服务器

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116155731A (zh) * 2023-04-14 2023-05-23 中国人民解放军国防科技大学 一种支持rmt的控制通路的通信控制方法及装置
CN116155731B (zh) * 2023-04-14 2023-06-20 中国人民解放军国防科技大学 一种支持rmt的控制通路的通信控制方法及装置

Also Published As

Publication number Publication date
CN114301852A (zh) 2022-04-08

Similar Documents

Publication Publication Date Title
WO2019033857A1 (zh) 报文控制方法及网络装置
US11233720B2 (en) Hierarchical time stamping
WO2021098807A1 (zh) 一种更新映射关系的方法以及装置
US9071529B2 (en) Method and apparatus for accelerating forwarding in software-defined networks
WO2018113425A1 (zh) 一种检测时延的方法、装置及系统
US20070223388A1 (en) Hardware implementation of network testing and performance monitoring in a network device
US10326613B2 (en) Method and system for processing spanning tree protocol (STP) state in a multichassis link aggregation (MLAG) domain
CN115152193A (zh) 针对ip路由数据中心网络使用自适应路由和基于拥塞提示的节流改进端到端拥塞反应
WO2017036180A1 (zh) 报文的处理方法及装置
WO2021169256A1 (zh) 网络性能检测方法、装置及网络设备
US20220191140A1 (en) Data transmission control method, apparatus, and storage medium
CN113711572A (zh) 一种报文传输方法及装置
WO2018036173A1 (zh) 一种网络负载均衡方法、设备及系统
WO2021128927A1 (zh) 报文的处理方法及装置、存储介质和电子装置
US20220224653A1 (en) Packet Forwarding Method, Device, and System
US20220124023A1 (en) Path Switching Method, Device, and System
WO2022063126A1 (zh) 报文传输控制、生成、传输方法及配置方法、设备、介质
WO2021244262A1 (zh) 一种报文处理方法、设备及系统
JP5352502B2 (ja) パケット通信システム及びパケット通信装置制御方法
US20230318970A1 (en) Packet Processing Method and Apparatus
CN117354253A (zh) 一种网络拥塞通知方法、装置及存储介质
CN107231316B (zh) 报文的传输方法及装置
WO2022048466A1 (zh) 一种操作管理维护oam报文处理方法及设备
US9621487B2 (en) Method and apparatus for protection switching based on memory control in packet transport system
CN114500163A (zh) 一种通信调度方法、装置和存储介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 18.08.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21871496

Country of ref document: EP

Kind code of ref document: A1