WO2015117502A1 - 报文收发方法及装置、通道单元及通信设备 - Google Patents

报文收发方法及装置、通道单元及通信设备 Download PDF

Info

Publication number
WO2015117502A1
WO2015117502A1 PCT/CN2014/093745 CN2014093745W WO2015117502A1 WO 2015117502 A1 WO2015117502 A1 WO 2015117502A1 CN 2014093745 W CN2014093745 W CN 2014093745W WO 2015117502 A1 WO2015117502 A1 WO 2015117502A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
packet
sub
channel unit
module
Prior art date
Application number
PCT/CN2014/093745
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 中兴通讯股份有限公司
Priority to US15/328,285 priority Critical patent/US20170222915A1/en
Priority to EP14881839.6A priority patent/EP3174254A4/en
Priority to JP2017503939A priority patent/JP2017531845A/ja
Publication of WO2015117502A1 publication Critical patent/WO2015117502A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/125Shortest path evaluation based on throughput or bandwidth
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/64Hybrid switching systems
    • H04L12/6418Hybrid transport
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/20Support for services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/324Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the data link layer [OSI layer 2], e.g. HDLC

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a packet receiving and transmitting method and apparatus, a channel unit, and a communication device.
  • a processing device such as a CPU or an ARM.
  • CPU or ARM processing devices require a software interrupt to drive completion when receiving and transmitting messages.
  • the line bandwidth can usually reach more than 1G, and the line bandwidth of XAUI, 10GE, SRIO can reach more than 10G.
  • the CPU or ARM relies on the interrupt-driven processing of the message, and cannot handle such high-bandwidth service data, resulting in a large amount of link bandwidth idle.
  • the main technical problem to be solved by the embodiments of the present invention is to provide a method and device for transmitting and receiving a message, a channel unit, and a communication device, so as to solve at least the problem of low bandwidth utilization of link data caused by insufficient CPU processing capability.
  • an embodiment of the present invention provides a packet sending and receiving method, including the following steps:
  • the channel unit receives the packet sent by the device carried by the device network interface
  • the channel unit sends the packet to the processor, receives the response packet returned by the processor, and forwards the response packet to the device directly;
  • the channel unit If not, the channel unit generates a corresponding response message and sends the response message to the device.
  • the step of the channel unit generating a corresponding response message sent to the device includes:
  • the channel unit parses the received message to extract basic information of the packet, and stores basic information of the packet;
  • the channel unit generates a response packet corresponding to the received packet, and performs framing on the response packet according to the stored basic information, and sends the response packet after the framing to the device.
  • the method further includes: the channel unit actively generating a message and sending the message to a device carried by the device network interface.
  • the method further includes: receiving basic information of each device carried by the device network interface sent by the processor;
  • the step of the channel unit actively sending a message to the device carried by the device network interface includes:
  • the channel unit actively generates a packet to be sent, extracts basic information of the device, and performs framing on the to-be-sent packet according to the basic information, and sends the to-be-sent packet to be sent to the device network interface. device.
  • the method further includes:
  • the time slot segment is divided into a plurality of sub-interval segments according to the type of the message that is required to be generated, and one of the sub-interval segments corresponds to one message type;
  • the sub-interval segment is divided into a plurality of sub-slot segments, and the sub-slot segment corresponds to a device carried by the device network interface, according to the maximum number of devices carried by the device network interface;
  • the step of the channel unit actively sending a message to the device carried by the device network interface includes:
  • the channel unit When the sub-slot segment in the sub-interval segment arrives, the channel unit generates a to-be-sent packet corresponding to the sub-segment segment, and extracts basic information of the target device corresponding to the sub-slot segment, according to The basic information is used to framing the to-be-sent message, and the framing message is sent to the target device.
  • the method further includes:
  • the time slot segment is divided into a plurality of sub-interval segments according to the type of the message that is required to be generated, and one of the sub-interval segments corresponds to one message type;
  • the channel unit generates a response packet corresponding to the received packet, and performs framing the response packet according to the stored basic information, and the step of sending the response packet after the framing to the device includes: :
  • a response packet of a type corresponding to the sub-interval segment is generated, and the response packet is framing according to the stored basic information, and the response packet after the framing is sent to The device.
  • the embodiment of the present invention further provides a channel unit, including: a receiving message processing module, a sending message processing module, and a message generating module;
  • the receiving packet processing module is configured to receive a packet sent by the device carried by the device network interface, and determine whether the received packet is a packet that needs to be processed by the processor, and if yes, send the packet to the processor;
  • the message generating module is configured to generate a corresponding response message when the received message processing module determines to be no;
  • the sending message processing module is configured to receive a response message returned by the processor, and forward the response message to the device directly, and send the response message in the message generating module to the Said equipment.
  • the packet generating module includes a sending message group frame module and a receiving message cache module;
  • the receiving packet processing module is further configured to parse the received packet to extract basic information of the packet;
  • the receiving message buffering module is configured to store basic information of the extracted received message
  • the sending message framing module is configured to generate a response message corresponding to the received message, and framing the response message according to the basic information stored in the received message buffering module;
  • the sending message processing module is configured to send the response message after the framing in the sending message framing module to the device.
  • the packet generating module is further configured to actively generate a packet; the sending packet processing module is further configured to send the packet actively generated by the packet generating module to the device carried by the device network interface.
  • the packet generating module further includes: a basic information acquiring module;
  • the basic information acquiring module is configured to receive basic information of each device carried by the device network interface sent by the processor;
  • the sending message framing module is configured to actively generate a to-be-sent packet, and extract basic information of the target device from the basic information acquiring module, and perform framing on the to-be-sent packet according to the basic information;
  • the sending packet processing module is configured to send the to-be-sent packet to be sent to the device carried by the device network interface.
  • the packet generation module further includes: a slot division module; the slot division module is configured to:
  • the time slot segment is divided into a plurality of sub-interval segments according to the type of the message that is required to be generated, and one of the sub-interval segments corresponds to one message type;
  • the sub-interval segment is divided into a plurality of sub-slot segments, and the sub-slot segment corresponds to a device carried by the device network interface, according to the maximum number of devices carried by the device network interface;
  • the sending message framing module is configured to generate a to-be-sent packet corresponding to the sub-interval segment when the sub-slot segment in the sub-interval segment arrives, and extract a target corresponding to the sub-slot segment Basic information of the device, and framing the to-be-sent packet according to the basic information.
  • the packet generation module further includes: a slot division module; the slot division module is configured to:
  • the time slot segment is divided into a plurality of sub-interval segments according to the type of the message that is required to be generated, and one of the sub-interval segments corresponds to one message type;
  • the sending message framing module is configured to generate a response message of a type corresponding to the sub-interval segment when the sub-interval segment arrives, and framing the response packet according to the stored basic information, and grouping The response message after the frame is sent to the device.
  • the embodiment of the present invention further provides a message receiving and receiving apparatus, including at least two channel units as described above, wherein one of the channel units corresponds to one device network interface, and each of the channel units Receiving packets transmitted by each device network interface in parallel;
  • the channel unit further includes an aggregation module; the aggregation module is configured to aggregate the packets sent by the channel unit to the processor, send the packets to the processor, and send the response packet returned by the processor to the corresponding The channel unit.
  • an embodiment of the present invention further provides a communication device, including a processor, at least two device network interfaces, and a message receiving and receiving device as described above.
  • the embodiment of the invention provides a packet sending and receiving method and device, a channel unit and a communication device, which can fully utilize the link bandwidth resource to complete the receiving and sending of the packet, and solve the link data bandwidth caused by insufficient CPU processing capability.
  • the method of receiving and receiving a message includes: the channel unit receives a message sent by the device carried by the device network interface; and the channel unit determines whether the received message is a report that needs to be processed by the processor. If yes, the channel unit sends the message to the processor, receives the response message returned by the processor, and forwards the response message directly to the device; if not, the channel The unit generates a corresponding response message and sends the response message to the device.
  • the present invention uses the channel unit and the CPU to co-process the receiving and sending of the message, and transfers the packet receiving and transmitting process in the original CPU to the channel unit for processing, and the CPU only processes a small amount.
  • the communication packet solves the problem that the bandwidth utilization of the link data is low due to insufficient CPU processing capability; no longer depends on the performance of the CPU.
  • Full link bandwidth is determined by the communication system and transmission capacity of message reception, maximum use of network bandwidth resources; compared to the related art, embodiments of the present invention to improve the method of packet reception and transmission link utilization efficiency.
  • FIG. 1 is a schematic flowchart of a method for sending and receiving a message according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic flowchart of a time slot division according to Embodiment 1 of the present invention.
  • FIG. 3 is a schematic flowchart of another method for sending and receiving a message according to Embodiment 1 of the present invention.
  • FIG. 5 is a schematic structural diagram of a first channel unit according to Embodiment 2 of the present invention.
  • FIG. 6 is a schematic structural diagram of a second channel unit according to Embodiment 2 of the present invention.
  • FIG. 7 is a schematic structural diagram of a third channel unit according to Embodiment 2 of the present invention.
  • FIG. 8 is a schematic structural diagram of a fourth type of channel unit according to Embodiment 2 of the present invention.
  • FIG. 9 is a schematic structural diagram of a fifth channel unit according to Embodiment 2 of the present invention.
  • FIG. 10 is a schematic structural diagram of a packet sending and receiving apparatus according to Embodiment 3 of the present invention.
  • FIG. 11 is a schematic structural diagram of a communication device according to Embodiment 3 of the present invention.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • the present embodiment proposes a packet sending and receiving method, and sets a unit to execute the traditional CPU. Packets are sent and received to avoid the problem of low bandwidth utilization of link data caused by insufficient CPU performance.
  • the executing entity is a channel unit, and includes the following steps:
  • Step 101 The channel unit receives the packet sent by the device carried by the device network interface.
  • the communication device includes a plurality of device network interfaces, each device network interface carrying a plurality of devices, and the channel unit can receive a message sent by the device under the device network interface.
  • the channel unit in this embodiment can be implemented in a programmable logic module.
  • Step 102 The channel unit determines whether the received message is a message that needs to be processed by the processor. If yes, step 103 is performed, and if no, step 104 is performed.
  • the channel unit has a packet transceiving and processing function.
  • the received packet (hereinafter referred to as the received packet) does not need to be processed by the processor of the device, it only needs to be processed in the channel unit, when receiving the packet.
  • the processor needs processor processing, the channel unit forwards the message to the processor for processing.
  • the packets that need to be processed by the processor include: link-building packets, and the rest of the service packets can be processed in the channel unit.
  • Step 103 The channel unit sends the packet to the processor, receives the response packet returned by the processor, and forwards the response packet to the device directly.
  • the processor After the processor processes the received message, it will return the corresponding packet data packet (the message after the framing), and the channel unit only needs to forward it to the corresponding device under the network interface, and does not need to do any processing.
  • Step 104 The channel unit generates a corresponding response message and sends the response message to the device.
  • the channel unit may generate a response packet according to the preset time slot rule, and then framing the response message to the device under the network interface.
  • the channel unit and the CPU cooperate to process the receiving and sending of the message, and the packet receiving and sending process in the original CPU is transferred to the channel unit for processing.
  • the CPU only processes a small number of communication messages, thereby solving the problem that the CPU service processing capability is insufficient.
  • the problem of low bandwidth utilization of the link data is no longer dependent on the performance of the CPU.
  • the bandwidth of the communication system is determined by the link bandwidth of the communication system, and the bandwidth resources of the network are utilized to the greatest extent.
  • the packet sending and receiving method in the embodiment of the present invention improves the link utilization efficiency.
  • the method step 104 in this embodiment may specifically include:
  • the channel unit parses the received message to extract basic information of the packet, and stores basic information of the packet;
  • the channel unit generates a response packet corresponding to the received packet, and performs framing on the response packet according to the stored basic information, and sends the response packet after the framing to the device.
  • the basic information in this embodiment is the identification information, including the MAC address, IP address, and packet identifier of the device.
  • the received packet carries the basic information of the sending device, such as a MAC address.
  • the basic information of the sending device can be extracted from the received packet, and then the generated response packet is grouped according to the basic information. frame.
  • the method in this embodiment can also perform time slot division, and provide a suitable timing transmission manner to send the packet.
  • the method of the embodiment may include a process of dividing a time slot:
  • the time slot segment is divided into a plurality of sub-interval segments according to the type of the message that is required to be generated, and one of the sub-interval segments corresponds to one message type;
  • the process of sending the response packet by the method in this embodiment includes:
  • a response packet of a type corresponding to the sub-interval segment is generated, and the response packet is framing according to the stored basic information, and the response packet after the framing is sent to
  • the device continues to communicate with all of the types of response messages of the device under the device network interface.
  • the specific timing division methods include:
  • Step 201 Divide the time slot segment: determine the maximum packet frequency, and divide the time slot segments according to the maximum packet frequency in one basic time unit (for example, 1 second, 10 milliseconds, etc.).
  • Step 202 Divide the sub-interval segment: if only a plurality of types of packets are to be generated, each time slot segment is divided into a plurality of sub-interval segments; if only one type of packet needs to be generated, the sub-interval segment is The slot segment.
  • This type of packet is generated for all devices on the network interface in each sub-interval segment, and communication of all types of packets between the device and the channel unit is completed.
  • the method of the present embodiment can be adapted to the channel unit to actively send a message after the channel unit is in the process of receiving the packet.
  • the method in this embodiment may further include: The channel unit actively generates a packet and sends the packet to the device carried by the device network interface.
  • Step 301 The channel unit receives basic information about each device carried by the device network interface sent by the processor.
  • the processor can complete communication and chain building through the network and the devices in the network. After the link is successfully established, the device CPU can learn the MAC address, IP address, and packet identifier of each device in the network. Basic Information.
  • the acquisition process can be as follows:
  • the master device CPU and all the devices in the networking complete the link establishment through the ARP message, the signaling message, and the CPU message to be replied to the CPU message cache in the channel unit.
  • the master device CPU obtains the basic information of the number of all the sub-devices in the current network and the sub-devices through the link-building process; (including all devices carried by each network interface)
  • the master device CPU completes the extraction of the basic information of the child device.
  • Step 302 The channel unit actively generates a to-be-sent packet, and extracts basic information of the device, and performs framing on the to-be-sent packet according to the basic information, and sends the to-be-sent packet to be sent to the device network.
  • the device carried by the interface.
  • the method in this embodiment can establish a configuration information table for each device on the network interface according to the obtained basic information, and mark the number.
  • the maximum number of the bearer devices corresponds to the maximum table number, and each numbered table stores the basic packet information of the device: MAC Address, IP address, message ID, etc.
  • the number can be used to extract basic information of the device.
  • the packet to be sent is grouped according to the basic information, and the packet after the packet is sent to the device carried by the network interface.
  • the method in this embodiment can also perform timing division, and then send the packet according to the divided timing transmission manner.
  • the method in this embodiment may further include:
  • the time slot segment is divided into a plurality of sub-interval segments according to the type of the message that is required to be generated, and one of the sub-interval segments corresponds to one message type;
  • the sub-interval segment is divided into a plurality of sub-slot segments, and the sub-slot segment corresponds to a device carried by the device network interface, according to the maximum number of devices carried by the device network interface;
  • the step of the channel unit actively sending a message to the device carried by the device network interface includes:
  • the channel unit When the sub-slot segment in the sub-interval segment arrives, the channel unit generates a to-be-sent packet corresponding to the sub-segment segment, and extracts basic information of the target device corresponding to the sub-slot segment, according to The basic information is used to framing the to-be-sent message, and the framing message is sent to the target device.
  • the method of this embodiment can complete all types of communication in one sub-interval segment, and then enter the next type of message transmission until all messages are completed.
  • dividing the time slot segment determining the maximum packet frequency, according to the maximum packet frequency, dividing a plurality of slot segments in one basic time unit (such as 1 second, 10 milliseconds, etc.), as shown in the slot segment and number in FIG. 4;
  • each time slot segment is divided into a plurality of sub-interval segments, and each sub-interval segment generates a packet of the type of all devices;
  • a type of packet, the sub-interval segment is the slot segment, as shown in Figure 4, the packet type segment and number;
  • Dividing sub-slot segments In each sub-interval segment, sub-slot segments are divided according to the current maximum number of devices in the system. The number of sub-slot segments corresponds to the maximum number of devices, and the number of each sub-slot corresponds to the device configuration information table. The T segment and number shown in Figure 4.
  • the sub-slot is divided according to the maximum packet frequency and the maximum number of devices. For devices with a low rate of packet transmission, the sub-timeslots can be masked; for devices that do not need to send packets, the sub-timeslots and sub-slots can be masked. Thereby a valid sub-timeslot and a valid sub-slot number are generated.
  • the process of actively sending a message and passively transmitting a response message in this embodiment may use the same time slot division manner to send a message.
  • the time mechanism generated by the 401-403 division mode is used to actively send a message or passively send a response message.
  • the packet sending and receiving method of this embodiment is described by the device network interface of 10GE and SRIO.
  • the unit time of 1 second can be divided into 770 time slots (1-770), each time slot is divided into 2 sub-intervals (1-2), and each sub-interval is divided into 1000 sub-time slots (1-1000). . That is, 1000 device 64 Byte message communication is completed in sub-slot 1 to sub-slot 1000 of sub-segment 1 of time slot 1, and 1000 time is completed in sub-slot 1 to sub-slot 1000 of sub-segment 2 of time slot 1 The communication of the 1536 Byte message of the device is completed until the message transmission of all sub-time slots of the time slot 770 is completed. At the same time, the sub-timeslot can be enabled according to the actual frequency of each actual device and device.
  • the unit time of 1 second can be divided into 2332 time slots (1-2332), each sub-interval is the time slot, and each sub-interval is further divided into 1000 sub-time slots (1-1000). That is, 1000 devices 256 Bytes of message communication are completed in sub-slot 1 to sub-slot 1000 of time slot 1, respectively, until the message transmission of all sub-time slots of time slot 2232 is completed.
  • the sub-timeslot can be enabled according to the actual frequency of each actual device and device.
  • the method in this embodiment reads the basic information of all the packets of the number from the device configuration information table according to the number of the sub-slot, and completes the packet according to the basic information of the packet.
  • the method of transmitting and receiving packets of the embodiment has a high-frequency and precise timing mode of the programmable logic, so that the interval of sending packets is more accurate and the amount of packets is larger. It solves the problem of low bandwidth utilization of link data caused by insufficient CPU processing capability, and thus no longer depends on the system performance of the CPU, and completely determines the packet receiving and transmitting capability by the link bandwidth of the system.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • the embodiment provides a channel unit, including: a packet processing module, a packet processing module, and a packet generation module.
  • the receiving packet processing module is configured to receive a packet sent by the device carried by the device network interface, and determine whether the received packet is a packet that needs to be processed by the processor, and if yes, send the packet to the processor;
  • the message generating module is configured to generate a corresponding response message when the received message processing module determines to be no;
  • the sending message processing module is configured to receive a response message returned by the processor, and forward the response message to the device directly, and send the response message in the message generating module to the Said equipment.
  • the channel unit can cooperate with the processor to complete the packet transmission and reception processing, thereby avoiding the problem that the link bandwidth utilization is low due to insufficient CPU performance.
  • the packet generating module in this embodiment includes a sending message group frame module and a receiving message cache module;
  • the receiving packet processing module is further configured to parse the received packet to extract basic information of the packet;
  • the receiving message buffering module is configured to store basic information of the extracted received message
  • the sending message framing module is configured to generate a response message corresponding to the received message, and framing the response message according to the basic information stored in the received message buffering module;
  • the sending message processing module is configured to send the response message after the framing in the sending message framing module to the device.
  • the packet generating module in the embodiment is further configured to actively generate a packet; the sending packet processing module is further configured to send the packet actively generated by the packet generating module to The device carried by the device network interface.
  • the message generating module in this embodiment further includes: a basic information acquiring module;
  • the basic information acquiring module is configured to receive basic information of each device carried by the device network interface sent by the processor;
  • the sending message framing module is configured to actively generate a to-be-sent packet, and extract basic information of the target device from the basic information acquiring module, and perform framing on the to-be-sent packet according to the basic information;
  • the sending packet processing module is configured to send the to-be-sent packet to be sent to the device carried by the device network interface.
  • the basic information obtaining module may be a device configuration information table module, and configured to generate a device configuration information table of each device carried by the network interface according to the basic information.
  • the embodiment of the present invention further includes: a slot division module; the slot division module is configured to:
  • the time slot segment is divided into a plurality of sub-interval segments according to the type of the message that is required to be generated, and one of the sub-interval segments corresponds to one message type;
  • the sub-interval segment is divided into a plurality of sub-slot segments, and the sub-slot segment corresponds to a device carried by the device network interface, according to the maximum number of devices carried by the device network interface;
  • the sending message framing module is configured to generate a to-be-sent packet corresponding to the sub-interval segment when the sub-slot segment in the sub-interval segment arrives, and extract a target corresponding to the sub-slot segment Basic information of the device, and framing the to-be-sent packet according to the basic information.
  • the message generating module in this embodiment further includes: a time slot dividing module; and the time slot dividing module is configured to:
  • the time slot segment is divided into a plurality of sub-interval segments according to the type of the message that is required to be generated, and one of the sub-interval segments corresponds to one message type;
  • the sending message framing module is configured to generate a response message of a type corresponding to the sub-interval segment when the sub-interval segment arrives, and framing the response packet according to the stored basic information, and grouping The response message after the frame is sent to the device.
  • the device processor message buffering unit is configured to cache the response message sent by the processor.
  • the channel unit has a high frequency and precise timing mode, so that the packet sending interval is more accurate and the amount of packets is larger. It solves the problem of low bandwidth utilization of link data caused by insufficient CPU processing capability, and thus no longer depends on the system performance of the CPU, and completely determines the packet receiving and transmitting capability by the link bandwidth of the system.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • this embodiment provides a packet sending and receiving apparatus, which includes at least two channel units according to Embodiment 2, wherein one of the channel units corresponds to one device network interface, and each of the channel units receives in parallel. Packets transmitted by each device network interface;
  • the channel unit further includes an aggregation module; the aggregation module is configured to aggregate the packets sent by the channel unit to the processor, send the packets to the processor, and send the response packet returned by the processor to the corresponding The channel unit.
  • the message receiving and receiving device can be implemented by a programmable logic module.
  • the embodiment further provides a communication device, including a processor, at least two device network interfaces, and a message receiving and receiving device as described in FIG.
  • the communication device of the present embodiment utilizes the parallel processing mode of the packet transceiver device (for example, programmable logic) by using the division of labor of the CPU and the packet transceiver device (for example, programmable logic), and fully utilizes the bandwidth resource of the link to complete the message. Transceiver processing. The link idleness caused by insufficient processing power of the CPU system is avoided, and the link utilization efficiency is further improved.
  • the packet transceiver device for example, programmable logic
  • the method and device for transmitting and receiving a message, the channel unit, and the communication device provided by the embodiments of the present invention have the following beneficial effects: the channel unit and the CPU cooperate to process the receiving and sending of the message, and the message in the original CPU is used.
  • the receiving and transmitting process is transferred to the channel unit for processing.
  • the CPU only processes a small number of communication messages, which solves the problem of low bandwidth utilization of link data caused by insufficient CPU processing capability; no longer depends on the performance of the CPU, completely by communication.
  • the link bandwidth of the system determines the packet receiving and sending capability, and the bandwidth resource of the network is utilized to the utmost.
  • the packet sending and receiving method in the embodiment of the present invention improves the link utilization efficiency.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Time-Division Multiplex Systems (AREA)
  • Bus Control (AREA)

Abstract

本发明公开了一种报文收发方法及装置、通道单元及通信设备。本发明的报文收发方法具体包括:通道单元接收设备网络接口承载的设备发送的报文;所述通道单元判断接收到的报文是否为需要处理器处理的报文;若是,则所述通道单元将该报文发送给处理器,接收所述处理器返回的响应报文,并将所述响应报文直接转发给所述设备;若否,则所述通道单元生成对应的响应报文发送给所述设备;本发明报文收发方法,可以充分利用链路带宽资源完成报文的接收和发送处理,解决了CPU业务处理能力不足带来的链路数据带宽利用率低的问题。

Description

报文收发方法及装置、通道单元及通信设备 技术领域
本发明涉及通信技术领域,尤其涉及一种报文收发方法及装置、通道单元及通信设备。
背景技术
在现有的通信设备中,报文收发处理通常是在CPU或者ARM等处理器件中完成。CPU或者ARM处理器件在接收和发送报文时,需要软件中断来驱动完成。随着高速总线技术的发展,线路带宽通常能够达到1G以上,XAUI,10GE,SRIO等线路带宽甚至能够达到10G以上。CPU或者ARM依靠中断驱动处理报文的方式,无法处理这种高带宽的业务数据量,导致链路带宽大量空闲。
上述问题在大规模组网应用上显得尤为突出,尤其是设备同时存在多个网络接口的环境,多个网络接口意味着物理层接口带宽的加倍。CPU性能的限制会导致链路带宽利用率低下,组网环境工作效率低,无法实现组网成本最小化。
发明内容
本发明实施例要解决的主要技术问题是,提供一种报文收发方法及装置、通道单元及通信设备,以至少能够解决CPU处理能力不足带来的链路数据带宽利用率低的问题。
为解决上述技术问题,本发明实施例提供一种报文收发方法,包括如下步骤:
通道单元接收设备网络接口承载的设备发送的报文;
所述通道单元判断接收到的报文是否为需要处理器处理的报文;
若是,则所述通道单元将该报文发送给处理器,接收所述处理器返回的响应报文,并将所述响应报文直接转发给所述设备;
若否,则所述通道单元生成对应的响应报文发送给所述设备。
所述通道单元生成对应的响应报文发送给所述设备步骤包括:
所述通道单元对接收报文进行解析提取出该报文的基本信息,并存储该报文的基本信息;
所述通道单元生成与所述接收报文对应的响应报文,根据存储的基本信息对所述响应报文进行组帧,将组帧后的所述响应报文发送给所述设备。
所述方法还包括:所述通道单元主动生成报文发送给所述设备网络接口承载的设备。
所述方法还包括:接收所述处理器发送的所述设备网络接口承载的各设备的基本信息;
所述通道单元主动发送报文给所述设备网络接口承载的设备的步骤包括:
所述通道单元主动生成待发送报文,提取设备的基本信息,根据该基本信息对所述待发送报文进行组帧,将组帧后的待发送报文发送给所述设备网络接口承载的设备。
所述方法还包括:
根据报文最大发包频率将一个基本时间单元划分为若干时隙段;
根据当前需要生成报文的种类将所述时隙段划分为若干子区间段,一个所述子区间段对应一个报文种类;
根据所述设备网络接口承载的最大设备数,将所述子区间段划分为若干子时隙段,一个所述子时隙段对应所述设备网络接口承载的一个设备;
所述通道单元主动发送报文给所述设备网络接口承载的设备的步骤包括:
当所述子区间段中子时隙段到来时,所述通道单元生成与所述子区间段对应类型的待发送报文,提取与所述子时隙段对应的目标设备的基本信息,根据该基本信息对该待发送报文进行组帧,将组帧后的报文发送给所述目标设备。
所述方法还包括:
根据报文最大发包频率将一个基本时间单元划分为若干时隙段;
根据当前需要生成报文的种类将所述时隙段划分为若干子区间段,一个所述子区间段对应一个报文种类;
所述通道单元生成与所述接收报文对应的响应报文,根据存储的基本信息对所述响应报文进行组帧,将组帧后的所述响应报文发送给所述设备的步骤包括:
当所述子区间段到来时,生成与所述子区间段对应类型的响应报文,根据存储的基本信息对所述响应报文进行组帧,将组帧后的所述响应报文发送给所述设备。
同样为了解决上述的技术问题,本发明实施例还提供了一种通道单元,包括:接收报文处理模块、发送报文处理模块和报文生成模块;
所述接收报文处理模块设置为接收设备网络接口承载的设备发送的报文,判断接收到的报文是否为需要处理器处理的报文,若是,则将该报文发送给处理器;
所述报文生成模块设置为当所述接收报文处理模块判断为否的情况下,生成对应的响应报文;
所述发送报文处理模块设置为接收所述处理器返回的响应报文,并将所述响应报文直接转发给所述设备;以及将所述报文生成模块中的响应报文发送给所述设备。
所述报文生成模块包括发送报文组帧模块和接收报文缓存模块;
所述接收报文处理模块还设置为对接收报文进行解析提取出该报文的基本信息;
所述接收报文缓存模块设置为存储提取出的接收报文的基本信息;
所述发送报文组帧模块设置为生成与所述接收报文对应的响应报文,根据所接收报文缓存模块中存储的基本信息对所述响应报文进行组帧;
所述发送报文处理模块设置为将所述发送报文组帧模块中组帧后的所述响应报文发送给所述设备。
所述报文生成模块还设置为主动生成报文;所述发送报文处理模块还设置为将所述报文生成模块主动生成的报文发送给所述设备网络接口承载的设备。
所述报文生成模块还包括:基本信息获取模块;
所述基本信息获取模块设置为接收所述处理器发送的所述设备网络接口承载的各设备的基本信息;
所述发送报文组帧模块设置为主动生成待发送报文,从所述基本信息获取模块中提取目标设备的基本信息,根据该基本信息对所述待发送报文进行组帧;
所述发送报文处理模块设置为将组帧后的待发送报文发送给所述设备网络接口承载的设备。
所述报文生成模块还包括:时隙划分模块;所述时隙划分模块设置为:
根据报文最大发包频率将一个基本时间单元划分为若干时隙段;
根据当前需要生成报文的种类将所述时隙段划分为若干子区间段,一个所述子区间段对应一个报文种类;
根据所述设备网络接口承载的最大设备数,将所述子区间段划分为若干子时隙段,一个所述子时隙段对应所述设备网络接口承载的一个设备;
所述发送报文组帧模块设置为当所述子区间段中子时隙段到来时,生成与所述子区间段对应类型的待发送报文,提取与所述子时隙段对应的目标设备的基本信息,根据该基本信息对该待发送报文进行组帧。
所述报文生成模块还包括:时隙划分模块;所述时隙划分模块设置为:
根据报文最大发包频率将一个基本时间单元划分为若干时隙段;
根据当前需要生成报文的种类将所述时隙段划分为若干子区间段,一个所述子区间段对应一个报文种类;
所述发送报文组帧模块设置为当所述子区间段到来时,生成与所述子区间段对应类型的响应报文,根据存储的基本信息对所述响应报文进行组帧,将组帧后的所述响应报文发送给所述设备。
同样为了解决上述的技术问题,本发明实施例还提供了一种报文收发装置,包括至少两个如上所述的通道单元,其中一个所述通道单元对应一个设备网络接口,各个所述通道单元并行接收各个设备网络接口传输的报文;
所述通道单元还包括汇聚模块;所述汇聚模块设置为将各个通道单元发送给处理器的报文进行汇聚后发送给所述处理器,以及将所述处理器返回的响应报文发送给对应的所述通道单元。
同样为了解决上述的技术问题,本发明实施例还提供了一种通信设备,包括处理器、至少两个设备网络接口和如上所述的报文收发装置。
本发明实施例的有益效果是:
本发明实施例提供了一种报文收发方法及装置、通道单元及通信设备,可以充分利用链路带宽资源完成报文的接收和发送处理,解决了CPU处理能力不足带来的链路数据带宽利用率低的问题;本发明实施例的报文收发方法具体包括:通道单元接收设备网络接口承载的设备发送的报文;所述通道单元判断接收到的报文是否为需要处理器处理的报文;若是,则所述通道单元将该报文发送给处理器,接收所述处理器返回的响应报文,并将所述响应报文直接转发给所述设备;若否,则所述通道单元生成对应的响应报文发送给所述设备;本发明利用通道单元与CPU协同处理报文的接收和发送,将原先CPU中报文接收和发送处理转移到通道单元中处理,CPU仅仅处理少量通信报文,解决了CPU业务处理能力不足带来的链路数据带宽利用率低的问题;不再依赖于CPU的性能,完全由通信系统的链路带宽来决定报文接收和发送能力,最大程度利用网络的带宽资源;与相关技术先比,本发明实施例报文收发方法提高了链路利用效率。
附图说明
图1为本发明实施例一提供的一种报文收发方法的流程示意图;
图2为本发明实施例一提供的一种时隙划分的流程示意图;
图3为本发明实施例一提供的另一种报文收发方法的流程示意图;
图4为本发明实施例一提供的一种时隙划分的示意图;
图5为本发明实施例二提供的第一种通道单元的结构示意图;
图6为本发明实施例二提供的第二种通道单元的结构示意图;
图7为本发明实施例二提供的第三种通道单元的结构示意图;
图8为本发明实施例二提供的第四种通道单元的结构示意图;
图9为本发明实施例二提供的第五种通道单元的结构示意图;
图10为本发明实施例三提供的一种报文收发装置的结构示意图;
图11为本发明实施例三提供的一种通信设备的结构示意图。
具体实施方式
下面通过具体实施方式结合附图对本发明作进一步详细说明。
实施例一:
考虑到相关技术中CPU架构限制带来的业务数据处理能力不足,进而导致的链路数据带宽利用率低的问题;本实施例提出了一种报文收发方法,设置一单元来执行传统CPU的报文收发处理,避免了CPU性能不足导致的链路数据带宽利用率低的问题。
如图1所示,本实施例的报文收发方法,执行主体为通道单元,包括如下步骤:
步骤101:通道单元接收设备网络接口承载的设备发送的报文。
在通信设备包括可以包括多个设备网络接口,每个设备网络接口承载多个设备,通道单元可以接收一个设备网络接口下的设备发送的报文。
本实施例中通道单元可以在可编程逻辑模块中实现。
步骤102:所述通道单元判断接收到的报文是否为需要处理器处理的报文,若是,则执行步骤103,若否,则执行步骤104。
在本实施例中,通道单元具有报文收发处理功能,当接收到的报文(以下简称接收报文)不需要设备的处理器处理时,只需在通道单元中处理即可,当接收报文需要处理器处理时,通道单元将报文转发给处理器处理。通过这样的机制,可以避免CPU性能不足导致的问题。
一般地,需要处理器处理的报文包括:建链报文等,其余的业务报文均可在通道单元中处理。
步骤103:所述通道单元将该报文发送给处理器,接收所述处理器返回的响应报文,并将所述响应报文直接转发给所述设备。
在处理器处理接收报文后会返回相应的报文数据包(组帧后的报文),通道单元只需转发给网络接口下相应的设备即可,不需要做任何处理。
步骤104:所述通道单元生成对应的响应报文发送给所述设备。
具体,通道单元可以按照预设时隙规则生成响应报文,然后对响应报文进行组帧后发送给网络接口下的设备。
本实施例方法利用通道单元与CPU协同处理报文的接收和发送,将原先CPU中报文接收和发送处理转移到通道单元中处理,CPU仅仅处理少量通信报文,解决了CPU业务处理能力不足带来的链路数据带宽利用率低的问题;不再依赖于CPU的性能,完全由通信系统的链路带宽来决定报文接收和发送能力,最大程度利用网络的带宽资源;与相关技术先比,本发明实施例报文收发方法提高了链路利用效率。
本实施例方法步骤104可以具体包括:
所述通道单元对接收报文进行解析提取出该报文的基本信息,并存储该报文的基本信息;
所述通道单元生成与所述接收报文对应的响应报文,根据存储的基本信息对所述响应报文进行组帧,将组帧后的所述响应报文发送给所述设备。
本实施例中基本信息为标识信息,包括:设备的MAC地址、IP地址、报文标识等。
一般接收报文均会携带发送端设备的基本信息,例如MAC地址等,本实施例方法可以从接到报文中提取发送端设备的基本信息,然后根据基本信息对生成的响应报文进行组帧。
在通道单元处理报文收发的情况下,为了使得发包间隔更精确,发包量更大,本实施例方法还可以进行时隙划分,提供一种合适的定时发送方式来发送报文。
优先地,本实施例方法可以包括对时隙划分的过程:
根据报文最大发包频率将一个基本时间单元划分为若干时隙段;
根据当前需要生成报文的种类将所述时隙段划分为若干子区间段,一个所述子区间段对应一个报文种类;
在按照上述划分方式划分后,本实施例方法发送响应报文的过程包括:
当所述子区间段到来时,生成与所述子区间段对应类型的响应报文,根据存储的基本信息对所述响应报文进行组帧,将组帧后的所述响应报文发送给所述设备,直至完成与所述设备网络接口下设备的所有该类型响应报文的通信。
具体的时序划分方式包括:
步骤201:划分时隙段:确定最大发包频率,根据最大发包频率,在1个基本时间单元(如1秒,10毫秒等),划分若干时隙段。
步骤202:划分子区间段:如果当前只需要生成若干种类型的报文,则每个时隙段划分为若干个子区间段;如果只需要生成一种类型报文,则该子区间段即为该时隙段。
在每个子区间段内生成网络接口下所有设备的该类型的报文,并完成所有设备与通道单元的该类型报文的通信。
上述介绍的通道单元在接收到报文之后的处理过程,本实施例方法也可以适应于通道单元主动发送报文,具体地,在上述方法的基础上,本实施例方法还可以包括:所述通道单元主动生成报文发送给所述设备网络接口承载的设备。
下面介绍本实施例中主动发送报文的过程:
步骤301:通道单元接收所述处理器发送的所述设备网络接口承载的各设备的基本信息。
在本实施例中处理器可以通过网络与组网下的各个设备完成通信和建链,建链成功后,设备CPU能够获知到组网下的各个设备的MAC地址、IP地址、报文标识等基本信息。
具体地,获取过程可以如下:
主设备CPU与组网的所有设备通过ARP消息、信令消息等完成建链,并将待回复的CPU报文存入通道单元中的CPU报文缓存;
主设备CPU对通过建链过程获取当前网络中所有子设备的个数及子设备的基本信息;(包括各网络接口承载的所有设备)
主设备CPU完成对子设备基本信息的提取。
步骤302:所述通道单元主动生成待发送报文,提取设备的基本信息,根据该基本信息对所述待发送报文进行组帧,将组帧后的待发送报文发送给所述设备网络接口承载的设备。
本实施例方法可以根据获取的基本信息为网络接口下的各设备建立配置信息表,并标记编号,最大承载设备数对应最大表编号,每个编号的表存储该设备的基本报文信息:MAC地址、IP地址、报文标识等。
在提取基本信息的过程中,可以利用编号来提取设备的基本信息。在提取基本信息后,根据基本信息对待发送报文进行组包,将组包后的报文发送给网络接口承载的设备。
为了使得发包间隔更精确,发包量更大,本实施例方法还可以进行时序划分,然后按照划分的定时发送方式来发送报文。此时,本实施例方法还可以包括:
根据报文最大发包频率将一个基本时间单元划分为若干时隙段;
根据当前需要生成报文的种类将所述时隙段划分为若干子区间段,一个所述子区间段对应一个报文种类;
根据所述设备网络接口承载的最大设备数,将所述子区间段划分为若干子时隙段,一个所述子时隙段对应所述设备网络接口承载的一个设备;
所述通道单元主动发送报文给所述设备网络接口承载的设备的步骤包括:
当所述子区间段中子时隙段到来时,所述通道单元生成与所述子区间段对应类型的待发送报文,提取与所述子时隙段对应的目标设备的基本信息,根据该基本信息对该待发送报文进行组帧,将组帧后的报文发送给所述目标设备。
本实施例方法可以在一个子区间段内将完成所有该类型的通信,然后进入下一个类型的报文发送直至完成所有报文的通信。
本实施例主动发送报文过程中时隙划分方式包括:
401)划分时隙段:确定最大发包频率,根据最大发包频率,在1个基本时间单元(如1秒,10毫秒等),划分若干时隙段,如图4所示的slot段及编号;
402)划分子区间段:如果当前只需要生成若干种类型的报文,则每个时隙段划分为若干个子区间段,每个子区间段生成所有设备的该类型的报文;如果只需要生成一种类型报文,则该子区间段即为该时隙段,如图4所示的报文类型段及编号;
403)划分子时隙段:在每个子区间段,根据系统当前最大设备数,划分子时隙段。子时隙段个数对应最大设备数,每个子时隙的编号与设备配置信息表对应。如图4所示的T段及编号。
匹配发包设备和发包量:本实施例中子时隙的划分是按照最大发包频率和最大设备数划分。对于发包速率频率低的设备,可以对子时隙进行屏蔽;对于不需要发包的设备,可以对子时隙和子时隙编号进行屏蔽。从而产生有效的子时隙和有效子时隙编号。
优先地,本实施例中主动发送报文过程和被动发送响应报文过程可以利用同一个时隙划分方式来发送报文。例如利用401-403划分方式产生的时间机制来主动发送报文或被动发送响应报文。
下面以10GE和SRIO的设备网络接口描述本实施例的报文收发方法:
1.若系统设备间的接口为10G以太网接口:单通道链路的接收和发送带宽分别为10Gbps,即1.25GBps。若系统每个设备网络接口最大承载的设备数为1000,即图4的max值为1000。共需发送两种类型的报文,报文包长分别为64Byte和1534Byte,即图4的m值为2。考虑到报文间隔12Byte的要求,则1秒的单位时间内,最快的发包频率为1.25G/1000*(1534+12+64+12)=770,即图4的n值为770。因此可以将1秒的单位时间划分为770个时隙(1-770),每个时隙划分2个子区间(1-2),在每个子区间再分别划分1000个子时隙(1-1000)。即分别在时隙1的子区间1的子时隙1到子时隙1000完成1000个设备64Byte报文的通信,在时隙1的子区间2的子时隙1到子时隙1000完成1000个设备1536Byte报文的通信,直到完成时隙770的所有子时隙的报文发送。同时可以根据每个实际设备和设备的实际频率,对子时隙进行使能。
2.若系统设备间的接口为2X3.125G的SRIO接口:单通道链路的接收和发送带宽分别为5Gbps,即625MBps。若系统每个设备网络接口最大承载的设备数为1000,即图4的max值为1000。共需发送一种类型的报文,即图4的m值为1。报文包长为256Byte。考虑到报文间隔12Byte的要求,则1秒的单位时间内,最快的发包频率为625M/1000*(256+12)=2332,即图4的n值为2332。因此可以将1秒的单位时间划分为2332个时隙(1-2332),每个子区间即为该时隙,在每个子区间再分别划分1000个子时隙(1-1000)。即分别在时隙1的子时隙1到子时隙1000完成1000个设备256Byte报文的通信,直到完成时隙2232的所有子时隙的报文发送。同时可以根据每个实际设备和设备的实际频率,对子时隙进行使能。
在上述划分的情况下,本实施例方法在每个子时隙段,根据子时隙的编号从设备配置信息表读取该编号的所有报文基本信息,并根据报文基本信息完成该报文的组帧,在每个基本时间单元的该报文子区间段的子时隙,完成报文发送。
本实施例报文收发方法相较传统的依靠CPU接收发送报文方式,可编程逻辑高频率精准的定时方式使得发包间隔更精确,发包量更大。解决了CPU处理能力不足带来的链路数据带宽利用率低的问题,从而不再依赖于CPU的系统性能,完全由系统的链路带宽来决定报文接收和发送能力。
实施例二:
如图5所示,本实施例提供了一种通道单元,包括:接收报文处理模块、发送报文处理模块和报文生成模块;
所述接收报文处理模块设置为接收设备网络接口承载的设备发送的报文,判断接收到的报文是否为需要处理器处理的报文,若是,则将该报文发送给处理器;
所述报文生成模块设置为当所述接收报文处理模块判断为否的情况下,生成对应的响应报文;
所述发送报文处理模块设置为接收所述处理器返回的响应报文,并将所述响应报文直接转发给所述设备;以及将所述报文生成模块中的响应报文发送给所述设备。
本实施例通道单元可以与处理器协同完成报文的收发处理,避免了由于CPU性能不足导致的链路带宽利用率低下的问题。
如图6所示,本实施例中所述报文生成模块包括发送报文组帧模块和接收报文缓存模块;
所述接收报文处理模块还设置为对接收报文进行解析提取出该报文的基本信息;
所述接收报文缓存模块设置为存储提取出的接收报文的基本信息;
所述发送报文组帧模块设置为生成与所述接收报文对应的响应报文,根据所接收报文缓存模块中存储的基本信息对所述响应报文进行组帧;
所述发送报文处理模块设置为将所述发送报文组帧模块中组帧后的所述响应报文发送给所述设备。
在上述通道单元的基础上,本实施例中所述报文生成模块还设置为主动生成报文;所述发送报文处理模块还设置为将所述报文生成模块主动生成的报文发送给所述设备网络接口承载的设备。
在上述通道单元的基础上,如图7所示,本实施例中所述报文生成模块还包括:基本信息获取模块;
所述基本信息获取模块设置为接收所述处理器发送的所述设备网络接口承载的各设备的基本信息;
所述发送报文组帧模块设置为主动生成待发送报文,从所述基本信息获取模块中提取目标设备的基本信息,根据该基本信息对所述待发送报文进行组帧;
所述发送报文处理模块设置为将组帧后的待发送报文发送给所述设备网络接口承载的设备。
本实施例中基本信息获取模块可以为设备配置信息表模块,设置为获取基本信息后,根据基本信息生成网络接口承载的各个设备的设备配置信息表。
优先地,如图8所示,本实施例文生成模块还包括:时隙划分模块;所述时隙划分模块设置为:
根据报文最大发包频率将一个基本时间单元划分为若干时隙段;
根据当前需要生成报文的种类将所述时隙段划分为若干子区间段,一个所述子区间段对应一个报文种类;
根据所述设备网络接口承载的最大设备数,将所述子区间段划分为若干子时隙段,一个所述子时隙段对应所述设备网络接口承载的一个设备;
所述发送报文组帧模块设置为当所述子区间段中子时隙段到来时,生成与所述子区间段对应类型的待发送报文,提取与所述子时隙段对应的目标设备的基本信息,根据该基本信息对该待发送报文进行组帧。
优先地,如图9所示,在图6所示的通道单元基础上,本实施例中所述报文生成模块还包括:时隙划分模块;所述时隙划分模块设置为:
根据报文最大发包频率将一个基本时间单元划分为若干时隙段;
根据当前需要生成报文的种类将所述时隙段划分为若干子区间段,一个所述子区间段对应一个报文种类;
所述发送报文组帧模块设置为当所述子区间段到来时,生成与所述子区间段对应类型的响应报文,根据存储的基本信息对所述响应报文进行组帧,将组帧后的所述响应报文发送给所述设备。
优先地,为了更好地发送报文,在本实施例中还可以在通道单元中设备处理器报文缓存单元,设置为来缓存处理器发送的响应报文。
本实施例通道单元高频率精准的定时方式使得发包间隔更精确,发包量更大。解决了CPU处理能力不足带来的链路数据带宽利用率低的问题,从而不再依赖于CPU的系统性能,完全由系统的链路带宽来决定报文接收和发送能力。
实施例三:
如图10所示,本实施例提供了一种报文收发装置,包括至少两个实施例二所述的通道单元,其中一个所述通道单元对应一个设备网络接口,各个所述通道单元并行接收各个设备网络接口传输的报文;
所述通道单元还包括汇聚模块;所述汇聚模块设置为将各个通道单元发送给处理器的报文进行汇聚后发送给所述处理器,以及将所述处理器返回的响应报文发送给对应的所述通道单元。
本实施例中报文收发装置可以由可编程逻辑模块来实现。
如图11所示,本实施例还提供了一种通信设备,包括处理器、至少两个设备网络接口和如图10所述的报文收发装置。
本实施例的通信设备通过CPU和报文收发装置(例如可编程逻辑)的分工协作,充分利用报文收发装置(例如可编程逻辑)的并行处理方式,充分利用链路的带宽资源完成报文的收发处理。避免了CPU系统处理能力不足带来的链路空闲,进一步提高了链路利用效率。
以上内容是结合具体的实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。
工业实用性
如上所述,本发明实施例提供的一种报文收发方法及装置、通道单元及通信设备,具有以下有益效果:利用通道单元与CPU协同处理报文的接收和发送,将原先CPU中报文接收和发送处理转移到通道单元中处理,CPU仅仅处理少量通信报文,解决了CPU业务处理能力不足带来的链路数据带宽利用率低的问题;不再依赖于CPU的性能,完全由通信系统的链路带宽来决定报文接收和发送能力,最大程度利用网络的带宽资源;与相关技术先比,本发明实施例报文收发方法提高了链路利用效率。

Claims (14)

  1. 一种报文收发方法,包括如下步骤:
    通道单元接收设备网络接口承载的设备发送的报文;
    所述通道单元判断接收到的报文是否为需要处理器处理的报文;
    若是,则所述通道单元将该报文发送给处理器,接收所述处理器返回的响应报文,并将所述响应报文直接转发给所述设备;
    若否,则所述通道单元生成对应的响应报文发送给所述设备。
  2. 如权利要求1所述的方法,其中,所述通道单元生成对应的响应报文发送给所述设备步骤包括:
    所述通道单元对接收报文进行解析提取出该报文的基本信息,并存储该报文的基本信息;
    所述通道单元生成与所述接收报文对应的响应报文,根据存储的基本信息对所述响应报文进行组帧,将组帧后的所述响应报文发送给所述设备。
  3. 如权利要求1或2所述的方法,其中,还包括:所述通道单元主动生成报文发送给所述设备网络接口承载的设备。
  4. 如权利要求3所述的方法,其中,还包括:接收所述处理器发送的所述设备网络接口承载的各设备的基本信息;
    所述通道单元主动发送报文给所述设备网络接口承载的设备的步骤包括:
    所述通道单元主动生成待发送报文,提取设备的基本信息,根据该基本信息对所述待发送报文进行组帧,将组帧后的待发送报文发送给所述设备网络接口承载的设备。
  5. 如权利要求4所述的方法,其中,还包括:
    根据报文最大发包频率将一个基本时间单元划分为若干时隙段;
    根据当前需要生成报文的种类将所述时隙段划分为若干子区间段,一个所述子区间段对应一个报文种类;
    根据所述设备网络接口承载的最大设备数,将所述子区间段划分为若干子时隙段,一个所述子时隙段对应所述设备网络接口承载的一个设备;
    所述通道单元主动发送报文给所述设备网络接口承载的设备的步骤包括:
    当所述子区间段中子时隙段到来时,所述通道单元生成与所述子区间段对应类型的待发送报文,提取与所述子时隙段对应的目标设备的基本信息,根据该基本信息对该待发送报文进行组帧,将组帧后的报文发送给所述目标设备。
  6. 如权利要求2所述的方法,其中,还包括:
    根据报文最大发包频率将一个基本时间单元划分为若干时隙段;
    根据当前需要生成报文的种类将所述时隙段划分为若干子区间段,一个所述子区间段对应一个报文种类;
    所述通道单元生成与所述接收报文对应的响应报文,根据存储的基本信息对所述响应报文进行组帧,将组帧后的所述响应报文发送给所述设备的步骤包括:
    当所述子区间段到来时,生成与所述子区间段对应类型的响应报文,根据存储的基本信息对所述响应报文进行组帧,将组帧后的所述响应报文发送给所述设备。
  7. 一种通道单元,包括:接收报文处理模块、发送报文处理模块和报文生成模块;
    所述接收报文处理模块设置为接收设备网络接口承载的设备发送的报文,判断接收到的报文是否为需要处理器处理的报文,若是,则将该报文发送给处理器;
    所述报文生成模块设置为当所述接收报文处理模块判断为否的情况下,生成对应的响应报文;
    所述发送报文处理模块设置为接收所述处理器返回的响应报文,并将所述响应报文直接转发给所述设备;以及将所述报文生成模块中的响应报文发送给所述设备。
  8. 如权利要求7所述的通道单元,其中,所述报文生成模块包括发送报文组帧模块和接收报文缓存模块;
    所述接收报文处理模块还设置为对接收报文进行解析提取出该报文的基本信息;
    所述接收报文缓存模块设置为存储提取出的接收报文的基本信息;
    所述发送报文组帧模块设置为生成与所述接收报文对应的响应报文,根据所接收报文缓存模块中存储的基本信息对所述响应报文进行组帧;
    所述发送报文处理模块设置为将所述发送报文组帧模块中组帧后的所述响应报文发送给所述设备。
  9. 如权利要求7或8所述的通道单元,其中,所述报文生成模块还设置为主动生成报文;所述发送报文处理模块还设置为将所述报文生成模块主动生成的报文发送给所述设备网络接口承载的设备。
  10. 如权利要求9所述的通道单元,其中,所述报文生成模块还包括:基本信息获取模块;
    所述基本信息获取模块设置为接收所述处理器发送的所述设备网络接口承载的各设备的基本信息;
    所述发送报文组帧模块设置为主动生成待发送报文,从所述基本信息获取模块中提取目标设备的基本信息,根据该基本信息对所述待发送报文进行组帧;
    所述发送报文处理模块设置为将组帧后的待发送报文发送给所述设备网络接口承载的设备。
  11. 如权利要求10所述的通道单元,其中,所述报文生成模块还包括:时隙划分模块;所述时隙划分模块设置为:
    根据报文最大发包频率将一个基本时间单元划分为若干时隙段;
    根据当前需要生成报文的种类将所述时隙段划分为若干子区间段,一个所述子区间段对应一个报文种类;
    根据所述设备网络接口承载的最大设备数,将所述子区间段划分为若干子时隙段,一个所述子时隙段对应所述设备网络接口承载的一个设备;
    所述发送报文组帧模块设置为当所述子区间段中子时隙段到来时,生成与所述子区间段对应类型的待发送报文,提取与所述子时隙段对应的目标设备的基本信息,根据该基本信息对该待发送报文进行组帧。
  12. 如权利要求8所述的通道单元,其中,所述报文生成模块还包括:时隙划分模块;所述时隙划分模块设置为:
    根据报文最大发包频率将一个基本时间单元划分为若干时隙段;
    根据当前需要生成报文的种类将所述时隙段划分为若干子区间段,一个所述子区间段对应一个报文种类;
    所述发送报文组帧模块设置为当所述子区间段到来时,生成与所述子区间段对应类型的响应报文,根据存储的基本信息对所述响应报文进行组帧,将组帧后的所述响应报文发送给所述设备。
  13. 一种报文收发装置,包括至少两个如权利要求7-12任一项所述的通道单元,其中一个所述通道单元对应一个设备网络接口,各个所述通道单元并行接收各个设备网络接口传输的报文;
    所述通道单元还包括汇聚模块;所述汇聚模块设置为将各个通道单元发送给处理器的报文进行汇聚后发送给所述处理器,以及将所述处理器返回的响应报文发送给对应的所述通道单元。
  14. 一种通信设备,包括:处理器、至少两个设备网络接口和如权利要求13所述的报文收发装置。
PCT/CN2014/093745 2014-07-23 2014-12-12 报文收发方法及装置、通道单元及通信设备 WO2015117502A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US15/328,285 US20170222915A1 (en) 2014-07-23 2014-12-12 Method and Device for Receiving and Sending Message, Channel Unit and Communication Equipment
EP14881839.6A EP3174254A4 (en) 2014-07-23 2014-12-12 Message transceiving method and device, channel unit and communication device
JP2017503939A JP2017531845A (ja) 2014-07-23 2014-12-12 メッセージ送受信方法及び装置、チャネルユニット並びに通信機器

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410354371.X 2014-07-23
CN201410354371.XA CN105323160B (zh) 2014-07-23 2014-07-23 报文收发方法及装置、通道单元及通信设备

Publications (1)

Publication Number Publication Date
WO2015117502A1 true WO2015117502A1 (zh) 2015-08-13

Family

ID=53777308

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/093745 WO2015117502A1 (zh) 2014-07-23 2014-12-12 报文收发方法及装置、通道单元及通信设备

Country Status (5)

Country Link
US (1) US20170222915A1 (zh)
EP (1) EP3174254A4 (zh)
JP (1) JP2017531845A (zh)
CN (1) CN105323160B (zh)
WO (1) WO2015117502A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4109836A4 (en) * 2020-03-17 2023-07-19 Huawei Technologies Co., Ltd. DATA TRANSMISSION METHOD AND DEVICE

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001007847A (ja) * 1999-06-18 2001-01-12 Nec Corp マルチプロトコル処理装置、回線インターフェース及びそれらを有するマルチプロトコルスイッチシステム
CN101106532A (zh) * 2007-07-10 2008-01-16 中兴通讯股份有限公司 实现交换芯片与网络处理器混合转发的方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6226291B1 (en) * 1996-11-01 2001-05-01 Texas Instruments Incorporated Transport stream packet parser system
US6487606B1 (en) * 1998-11-18 2002-11-26 Nortel Networks Limited System and method for delivering messages through a totem communications system
US8155011B2 (en) * 2007-01-11 2012-04-10 Foundry Networks, Llc Techniques for using dual memory structures for processing failure detection protocol packets
US10678744B2 (en) * 2010-05-03 2020-06-09 Wind River Systems, Inc. Method and system for lockless interprocessor communication
JP5572848B2 (ja) * 2010-09-09 2014-08-20 株式会社東芝 通信装置および通信方法
JP5822470B2 (ja) * 2011-01-24 2015-11-24 キヤノン株式会社 情報処理装置、その制御方法、および記憶媒体
CN104137083B (zh) * 2012-12-28 2018-08-28 松下知识产权经营株式会社 接口装置及存储器总线系统

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001007847A (ja) * 1999-06-18 2001-01-12 Nec Corp マルチプロトコル処理装置、回線インターフェース及びそれらを有するマルチプロトコルスイッチシステム
CN101106532A (zh) * 2007-07-10 2008-01-16 中兴通讯股份有限公司 实现交换芯片与网络处理器混合转发的方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3174254A4 *

Also Published As

Publication number Publication date
CN105323160A (zh) 2016-02-10
EP3174254A4 (en) 2017-09-20
US20170222915A1 (en) 2017-08-03
EP3174254A1 (en) 2017-05-31
CN105323160B (zh) 2021-01-26
JP2017531845A (ja) 2017-10-26

Similar Documents

Publication Publication Date Title
US11736978B2 (en) Method and apparatus for receiving CPRI data stream, method and apparatus for receiving ethernet frame, and system
US9462088B2 (en) Offload operations for overlay networks
CN108521343B (zh) 一种oam报文的处理方法及装置
WO2015117501A1 (zh) 一种时间同步方法、可编程逻辑器件、单板及网元
CN110300081A (zh) 一种数据传输的方法和设备
TW201729632A (zh) 用於無線電波源排程的方法
CN107404446A (zh) 一种处理分片报文的方法及装置
CN105577566A (zh) 报文汇聚传输的方法、装置和系统
CN110381071A (zh) 一种报文传输方法、装置及发送方设备
CN105281885A (zh) 用于网络设备的时间同步方法、装置及时间同步服务器
CN107948217B (zh) 交换机系统和通信方法
US10244524B2 (en) Data transmission method, apparatus, and network system that supports CPRI data corresponding to multiple service flows to be exchanged
EP2852115B1 (en) Information processing method, apparatus and system in trill networks
CN107659456A (zh) 一种基于rs485通信的数据冲突传输方法
CN108234397A (zh) 一种基于通道的异构网络数据发送方法和接收方法
WO2015117502A1 (zh) 报文收发方法及装置、通道单元及通信设备
CN110417687B (zh) 一种报文发送与接收方法及装置
CN104243319A (zh) 一种邻居发现的方法及装置
CN104253811A (zh) 一种网络包通信方法和系统
CN112087678A (zh) 带宽的分配、带宽的检查方法及装置
CN104320411A (zh) 基于半双工信道的虚拟载波侦听组网通信方法
US10298725B2 (en) Synchronous digital signal encapsulation
CN111245577B (zh) 数据传输方法、系统和相关设备
CN107508660B (zh) 一种利用北斗短报文实现第三方数据双向传输的方法
CN105162634A (zh) 在同一线程中收发oam协议包的处理方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14881839

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017503939

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 15328285

Country of ref document: US

REEP Request for entry into the european phase

Ref document number: 2014881839

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014881839

Country of ref document: EP