WO2016191990A1 - 一种报文转换方法及装置 - Google Patents

一种报文转换方法及装置 Download PDF

Info

Publication number
WO2016191990A1
WO2016191990A1 PCT/CN2015/080439 CN2015080439W WO2016191990A1 WO 2016191990 A1 WO2016191990 A1 WO 2016191990A1 CN 2015080439 W CN2015080439 W CN 2015080439W WO 2016191990 A1 WO2016191990 A1 WO 2016191990A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
destination
source
message
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2015/080439
Other languages
English (en)
French (fr)
Inventor
程浩
郑明恩
周民
王曰孟
于军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to PCT/CN2015/080439 priority Critical patent/WO2016191990A1/zh
Priority to CN201580056589.XA priority patent/CN107079017B/zh
Publication of WO2016191990A1 publication Critical patent/WO2016191990A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a packet conversion method and apparatus.
  • SRIO Serial Rapid Input Output
  • SRIO is a high-performance, packet-switched interconnect bus technology. SRIO is mainly used for internal interconnection of embedded systems, supporting chip-to-chip and board-to-board communication.
  • Ethernet can support a wide range of interconnections. Therefore, each SRIO network needs to be interconnected via Ethernet to achieve a wide range of interconnections. However, SRIO devices do not support Ethernet interfaces, so SRIO messages cannot be transmitted over Ethernet.
  • the SRIO protocol defines four mailboxes (mail box) numbers and four mail (letter) numbers, so it can support 16 message addresses. Therefore, in the prior art, the following method is used for message conversion.
  • the media access control (English: Media Access Control, MAC address) address in the Ethernet is associated with the mailbox number and the mail number, so a total of 16 MAC addresses can be addressed.
  • the embodiment of the invention provides a packet conversion method and device, which are used to solve the technical problem that the packet conversion method in the prior art cannot be widely deployed.
  • the first aspect provides a packet conversion method, including:
  • the first packet conforms to a serial high-speed output output SRIO protocol;
  • the data payload field of the first packet includes data;
  • the first packet includes a source device identifier ID number, and a destination a device ID number and a packet distribution information;
  • the packet distribution information includes a source transceiver thread and a destination transceiver thread;
  • the second packet includes an Ethernet packet header, a network protocol IP packet header, a transport layer protocol packet header, and a data field, where the Ethernet packet header includes a source corresponding to the source device ID number. a media access control MAC address, and a destination MAC address corresponding to the destination device ID number; the IP packet header includes a source IP address corresponding to the source device ID number, and a corresponding to the destination device ID a destination IP address; the transport layer protocol packet header includes a source port number corresponding to the source transceiver thread, and a destination port number corresponding to the destination transceiver thread; and the data field includes the data.
  • the method further includes:
  • the packet distribution information further includes identifier information, a fragment sequence number, and flag information
  • the IP packet header further includes an identifier field, a flag field, and a slice offset field, where the identifier field includes information corresponding to the identifier information, and the flag field includes information corresponding to the identifier information;
  • the slice offset field includes information corresponding to the allocation sequence number.
  • the second aspect provides a packet conversion method, including:
  • the second packet includes an Ethernet packet header, a network protocol IP packet header, a transport layer protocol packet header, and a data field; and the Ethernet packet header includes a source media access control MAC address.
  • the IP packet header includes a source IP address and a destination IP address;
  • the transport layer protocol packet header includes a source port number and a destination port number; and
  • the data field includes data;
  • the third packet conforms to a serial high-speed input/output SRIO protocol, and the third packet includes a source device identifier ID number, a destination device ID number, and a source transceiver. a thread, a destination transceiver thread, and the data; the source device ID number and the source MAC address Addressing the source IP address; the destination device ID number corresponding to the destination MAC address and the destination IP address; the source sending and receiving thread corresponding to the source port number; the destination sending and receiving thread and the destination The destination port number corresponds.
  • the method further includes:
  • the third aspect provides a packet conversion method, including:
  • the NWRITE message includes data, a source device identification ID number, a destination device ID number, and a storage address of the memory of the data on the destination device corresponding to the destination device ID number;
  • Ethernet RDMA message includes an Ethernet packet header, a network protocol IP packet header, and a data payload field;
  • the header includes a source media access control MAC address corresponding to the source device ID number and a destination MAC address corresponding to the destination device ID number;
  • the IP packet header includes a source IP corresponding to the source device ID An address and a destination IP address corresponding to the destination device ID number; the data payload field including the storage address and the data.
  • the fourth aspect provides a packet conversion method, including:
  • the Ethernet RDMA message includes an Ethernet packet header, a network protocol IP packet header, and a data payload field; wherein the Ethernet packet header includes a source media interface Entering a control MAC address and a destination MAC address, the IP packet header includes a source IP address and a destination IP address, and the data payload field includes data and a storage address on a memory of the destination device to which the data is to be written;
  • NWRITE message includes a message header and a data payload field;
  • the packet header includes the storage address, and the source IP address a source device identification ID number corresponding to the source MAC address, a destination device ID number of the destination device corresponding to the destination IP address and the destination MAC address;
  • the data payload field includes the data.
  • the fifth aspect provides a packet transmission method, including:
  • the group package distribution information includes a source transceiver thread and a destination transceiver thread;
  • the data payload field of the first packet includes the group packet distribution information.
  • the packet distribution information further includes identifier information, a fragment sequence number, and flag information, where The identifier information, the fragment sequence number, and the flag information are respectively used to fill the identifier field, the slice offset field, and the flag field in the network protocol IP packet header.
  • a sixth aspect provides a message conversion apparatus, including:
  • a receiving unit configured to receive a first packet; the first packet conforms to a serial high-speed output and output SRIO protocol; a data payload field of the first packet includes data; and the first packet includes a source device identifier An ID number, a destination device ID number, and a packet distribution information; the packet distribution information includes a source transceiver thread and a destination transceiver thread;
  • a processing unit configured to obtain a second packet according to the first packet
  • the second packet includes an Ethernet packet header, a network protocol IP packet header, a transport layer protocol packet header, and a data field, where the Ethernet packet header includes a source corresponding to the source device ID number. a media access control MAC address, and a destination MAC address corresponding to the destination device ID number; the IP packet header includes a source IP address corresponding to the source device ID number, and a corresponding to the destination device ID a destination IP address; the transport layer protocol packet header includes a source port number corresponding to the source transceiver thread, and a destination port number corresponding to the destination transceiver thread; and the data field includes the data.
  • the device is further The sending unit is configured to send the second packet according to the destination IP address and the destination MAC address, and send the response information to the sending end of the first packet.
  • the packet distribution information further includes identifier information, a fragment sequence number, and flag information
  • the IP packet header further includes an identifier field, a flag field, and a slice offset field, where the identifier field includes information corresponding to the identifier information, and the flag field includes information corresponding to the identifier information;
  • the slice offset field includes information corresponding to the allocation sequence number.
  • a seventh aspect provides a message conversion apparatus, including:
  • a receiving unit configured to receive a second packet, where the second packet includes an Ethernet packet header, a network protocol IP packet header, a transport layer protocol packet header, and a data field;
  • the Ethernet packet header includes a source The media access control MAC address and the destination MAC address;
  • the IP packet header includes a source IP address and a destination IP address;
  • the transport layer protocol packet header includes a source port number and a destination port number; and the data field includes data;
  • a processing unit configured to obtain a third packet according to the second packet, where the third packet conforms to a serial high-speed input/output SRIO protocol, and the third packet includes a source device identifier ID number, a destination device An ID number, a source transceiver thread, a destination transceiver thread, and the data; the source device ID number corresponding to the source MAC address and the source IP address; the destination device ID number and the destination MAC address and the The destination IP address corresponds to the source port; the destination transceiver thread corresponds to the destination port number.
  • the device further includes: a sending unit, configured to send the third packet according to the destination device ID number;
  • the receiving unit is further configured to: receive response information sent by the destination device corresponding to the destination device ID number.
  • the eighth aspect provides a message conversion apparatus, including:
  • a receiving unit configured to receive a non-response write operation NWRITE message;
  • the NWRITE message includes data, a source device identification ID number, a destination device ID number, and the data on the destination device corresponding to the destination device ID number
  • a processing unit configured to obtain an Ethernet remote direct memory read and write RDMA message according to the NWRITE message, where the Ethernet RDMA message includes an Ethernet packet header, a network protocol IP packet header, and a data payload field;
  • the Ethernet packet header includes a source media access control MAC address corresponding to the source device ID number and a destination MAC address corresponding to the destination device ID number;
  • the IP packet header includes the source device a source IP address corresponding to the ID and a destination IP address corresponding to the destination device ID number;
  • the data payload field includes the storage address and the data.
  • a ninth aspect provides a message conversion apparatus, including:
  • a receiving unit configured to receive an Ethernet remote direct memory read and write RDMA message;
  • the Ethernet RDMA message includes an Ethernet packet header, a network protocol IP packet header, and a data payload field; wherein the Ethernet packet The header includes a source media access control MAC address and a destination MAC address, the IP packet header includes a source IP address and a destination IP address, and the data payload field includes data and a storage address on a memory of the destination device to which the data is to be written. ;
  • a processing unit configured to obtain a non-response write operation NWRITE message according to the Ethernet RDMA message, where the NWRITE message includes a message header and a data payload field;
  • the packet header includes the storage address, and a source device identifier ID number corresponding to the source IP address and the source MAC address, a destination device ID number of the destination device corresponding to the destination IP address and the destination MAC address;
  • the data payload field includes Data.
  • a tenth aspect provides a message transmission apparatus, including:
  • a processing unit configured to obtain group package distribution information about the data; the group package distribution information includes a source transceiver thread and a destination transceiver thread; and obtain a first packet according to the data and the group package distribution information, The first message conforms to the serial high speed input and output SRIO protocol.
  • the data payload field of the first packet includes the group packet distribution information.
  • the group package distribution information further includes identifier information, a slice serial number, and flag information, where The identification information, the fragment serial number, and the flag information are respectively used to fill the network protocol IP report.
  • the identification field, slice offset field, and flag field in the header is identifier information, a slice serial number, and flag information, where the identification information, the fragment serial number, and the flag information are respectively used to fill the network protocol IP report.
  • the identification field, slice offset field, and flag field in the header are respectively used to fill the network protocol IP report.
  • the eleventh aspect provides a message conversion device, including:
  • a receiver configured to receive a first packet by using the SRIO interface; the first packet conforms to a serial high-speed output output SRIO protocol; a data payload field of the first packet includes data; and the first packet
  • the source device identification ID number, the destination device ID number, and the package distribution information are included; the package distribution information includes a source transceiver thread and a destination transceiver thread;
  • the processing circuit is configured to obtain a second packet according to the first packet, where the second packet includes an Ethernet packet header, a network protocol IP packet header, a transport layer protocol packet header, and a data field.
  • the Ethernet packet header includes a source media access control MAC address corresponding to the source device ID number, and a destination MAC address corresponding to the destination device ID number;
  • the IP packet header includes the source a source IP address corresponding to the device ID number, and a destination IP address corresponding to the destination device ID;
  • the transport layer protocol packet header includes a source port number corresponding to the source transceiver thread, and the destination sending and receiving thread Corresponding destination port number;
  • the data field includes the data;
  • a transmitter configured to send the second packet to the Ethernet through the Ethernet interface.
  • the transmitter is further configured to send the response information to the sending end of the first packet by using the SRIO interface.
  • the packet distribution information further includes identifier information, a fragment sequence number, and a flag.
  • the IP packet header further includes an identifier field, a flag field, and a slice offset field, where the identifier field includes information corresponding to the identifier information, and the flag field includes information corresponding to the identifier information.
  • the slice offset field includes information corresponding to the allocation sequence number.
  • the device It is a baseband unit BBU, a switch in Ethernet, or a gateway device.
  • a twelfth aspect provides a message conversion device, including:
  • a receiver configured to receive a second packet by using the Ethernet interface, where the second packet includes an Ethernet packet header, a network protocol IP packet header, a transport layer protocol packet header, and a data field;
  • the network packet header includes a source media access control MAC address and a destination MAC address;
  • the IP packet header includes a source IP address and a destination IP address;
  • the transport layer protocol packet header includes a source port number and a destination port number;
  • the data field includes data;
  • a processing circuit configured to obtain a third packet according to the second packet; wherein the third packet conforms to a serial high-speed input/output SRIO protocol, and the third packet includes a source device identifier ID number, a destination device An ID number, a source transceiver thread, a destination transceiver thread, and the data; the source device ID number corresponding to the source MAC address and the source IP address; the destination device ID number and the destination MAC address and the The destination IP address corresponds to the destination port number; the destination transceiver thread corresponds to the destination port number;
  • a transmitter configured to send, by using the SRIO interface, the third packet according to the destination device ID number.
  • the receiver is further configured to: receive, by using the SRIO interface, response information sent by a destination device corresponding to the destination device ID number.
  • the device is a baseband unit BBU, a switch in an Ethernet, or a gateway device .
  • a thirteenth aspect provides a message conversion device, including:
  • a receiver configured to receive a non-response write operation NWRITE message by using the SRIO interface;
  • the NWRITE message includes data, a source device identification ID number, a destination device ID number, and the data corresponding to the destination device ID number The storage address of the memory on the destination device;
  • Ethernet RDMA packet configured to obtain an Ethernet remote direct memory read/write according to the NWRITE message
  • An RDMA packet where the Ethernet RDMA packet includes an Ethernet packet header, a network protocol IP packet header, and a data payload field; and the Ethernet packet header includes a source medium corresponding to the source device ID number.
  • the IP packet header includes a source IP address corresponding to the source device ID and a destination IP address corresponding to the destination device ID number
  • the data payload field includes the storage address and the data;
  • a transmitter configured to send the Ethernet RDMA packet by using the Ethernet interface.
  • the device in conjunction with the thirteenth aspect, in a first possible implementation manner of the thirteenth aspect, is a baseband unit BBU, a switch in an Ethernet, or a gateway device.
  • a fourteenth aspect provides a message conversion device, including:
  • a receiver configured to receive an Ethernet remote direct memory read and write RDMA message through the Ethernet interface;
  • the Ethernet RDMA message includes an Ethernet packet header, a network protocol IP packet header, and a data payload field;
  • the Ethernet packet header includes a source media access control MAC address and a destination MAC address, the IP packet header includes a source IP address and a destination IP address, and the data payload field includes data and a destination device to which the data is to be written. Storage address on the memory;
  • a processing circuit configured to obtain a non-response write operation NWRITE message according to the Ethernet RDMA message; wherein the NWRITE message includes a message header and a data payload field; the packet header includes the storage address, and a source device identifier ID number corresponding to the source IP address and the source MAC address, a destination device ID number of the destination device corresponding to the destination IP address and the destination MAC address; the data payload field includes Data
  • the transmitter is configured to send the NWRITE packet by using the SRIO interface.
  • the device in conjunction with the fourteenth aspect, in a first possible implementation of the fourteenth aspect, is a baseband unit BBU, a switch in an Ethernet, or a gateway device.
  • a fifteenth aspect provides a serial high speed input and output SRIO endpoint, comprising:
  • a message transmission device for obtaining data; obtaining packet distribution information about the data;
  • the group packet distribution information includes a source transceiver thread and a destination transceiver thread; and obtaining a first packet according to the data and the group packet distribution information, the first packet conforming to a serial high-speed input/output SRIO protocol;
  • An output port configured to output the first packet.
  • the SRIO endpoint is a central processing unit CPU, a baseband chip, or a digital signal processing DSP chip in the baseband unit BBU.
  • the data payload domain of the first packet includes the packet distribution information.
  • the packet distribution information further includes identifier information, a fragment sequence number, and flag information, where the identifier information, the fragment sequence number, and the flag information are used to fill the identifier field, the slice offset field, and the flag field in the network protocol IP packet header, respectively.
  • the source destination transceiver thread maps the source destination port number, and converts the SRIO message into a second packet that can be transmitted in the Ethernet.
  • the embodiment of the present invention is a device that associates a MAC address with a mailbox number and a mail number in the prior art.
  • the embodiment of the present invention directly addresses the MAC address and the IP address by using the device ID number. Therefore, in the case of a 32-bit IP address, the embodiment of the present invention
  • the conversion method can theoretically address 4G SRIO devices, so it is much larger than the networking scope of the addressing schemes associated with mailbox numbers and mail numbers in the prior art.
  • FIG. 1a-1b are structural diagrams of a network system according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of a first packet conversion method according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a first packet conversion according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of a second packet conversion method according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of a third packet conversion method according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a second packet conversion according to an embodiment of the present invention.
  • FIG. 7 is a flowchart of a fourth packet conversion method according to an embodiment of the present invention.
  • FIG. 8 is a functional block diagram of a message converting apparatus according to an embodiment of the present invention.
  • FIG. 9 is a structural block diagram of a message conversion device according to an embodiment of the present invention.
  • FIG. 10 is a functional block diagram of a message transmission apparatus according to an embodiment of the present invention.
  • the embodiment of the invention provides a packet conversion method and device, which are used to solve the technical problem that the packet conversion method in the prior art cannot be widely deployed.
  • the technical solution in the embodiment of the present invention is to solve the above technical problem, and the general idea is as follows:
  • the SRIO packet includes a source destination sending and receiving thread, and the source destination sending and receiving thread corresponds to the source destination port number, and the device ID number and the network protocol (English: Internet Protocol, IP address) and MAC address are used.
  • the address corresponds, so the SRIO message can be converted into a second message that can be transmitted over Ethernet. Since the device ID number is directly associated with the MAC address and the IP address, a wide range of networking can be realized.
  • FIG. 1a is a structural diagram of a network system according to an embodiment of the present invention.
  • the network system includes: at least one Ethernet endpoint, at least one SRIO network, and/or at least one SRIO endpoint, Ethernet, and message conversion device.
  • the message conversion device includes an SRIO interface and an Ethernet interface.
  • the message conversion device is connected between the SRIO network or the SRIO endpoint and the Ethernet to convert the SRIO message into an Ethernet message and/or to convert the Ethernet message into an SRIO message.
  • SRIO networks and SRIO endpoints can form a wide range of networks over Ethernet.
  • the SRIO network includes a plurality of SRIO endpoints and an SRIO switch.
  • the SRIO endpoint may be a device supporting the SRIO interface or a component.
  • the SRIO endpoint is, for example, a baseband unit (BBU) or a BBU.
  • the central processing unit (English: Central Processing Unit, CPU for short), digital signal processing (English: Digital Signal Processing, referred to as: DSP) chip or baseband chip.
  • DSP Digital Signal Processing
  • the SRIO switch can be a single switch or an SRIO switch chip.
  • the SRIO switch chip can be integrated into other network elements. For example, it can be integrated in the BBU.
  • the message conversion device can be a separate device or integrated in other network elements.
  • the message conversion device can be integrated in the SRIO switch or the SRIO endpoint, or can be integrated in a switch in the Ethernet or in the gateway device.
  • FIG. 2 is a flowchart of a packet conversion method according to an embodiment of the present invention.
  • the method includes:
  • Step 101 Receive a first packet; the first packet conforms to the SRIO protocol; the data payload field of the first packet includes data; and the first packet includes a source device identifier (ID) number and a destination device ID number. And group package distribution information; the group package distribution information includes a source transceiver thread and a destination transceiver thread;
  • Step 102 Obtain a second packet according to the first packet, where the second packet includes an Ethernet packet header, a network protocol (English: Internet Protocol, IP for short) packet header, and a transport layer protocol packet header.
  • the Ethernet packet header includes a source MAC address corresponding to the source device ID number and a destination MAC address corresponding to the destination device ID number.
  • the IP packet header includes a source IP address corresponding to the source device ID number and a destination IP address corresponding to the destination device ID.
  • the transport layer protocol packet header includes a source port number corresponding to the source transceiver thread and a destination port number corresponding to the destination transceiver thread.
  • the data field includes the data.
  • the step 102 includes: Step 1021: Convert the source device ID number into a source IP address and a source MAC address according to a predetermined rule; convert the destination device ID number into a destination IP address and a destination MAC address according to the predetermined rule;
  • the source transceiver thread determines the source port number, determines the destination port number according to the destination transceiver thread; in step 1022, the data is encapsulated into a second packet; the data is filled in the data field; and in step 1023, the source MAC address and the destination MAC address are used.
  • the address is filled in the Ethernet packet header; the source IP address and the destination IP address are filled in the IP packet header; the source port number and the destination port number are filled in the transport layer protocol packet header.
  • the packets of the transport layer protocol can be encapsulated and transmitted in IP packets.
  • step 1021 may be performed after the execution of step 1022, or step 1021 may be performed first, then step 1022 may be performed, or two steps may be performed simultaneously.
  • step 1023 may be performed after the execution of step 1022, or step 1023 may be performed first, then step 1022 may be performed, or two steps may be performed simultaneously.
  • FIG. 3 is an application scenario diagram of the method in this embodiment. It is assumed that the SRIO endpoint 20 needs to send data to the SRIO endpoint 40. Because SRIO Endpoint 20 and SRIO Endpoint 40 are located in different SRIO networks, the two are connected via Ethernet. Then, the SRIO message sent by the SRIO endpoint 20, that is, the first message first passes through the SRIO switch, and then reaches the message conversion device 10. Then, correspondingly, the message conversion device 10 receives the first message.
  • the header information includes an ACKID field, an RSVD field, a PRIO field, a TT field, and an FType field.
  • the ACKID field is used to receive acknowledgement information to the message sender response message, and the RSVD is a reserved field.
  • PRIO is the priority of the message.
  • TT is the length of the device ID.
  • FType is the format type of Logi_Inf.
  • the transport layer and Dest_Addr in the Transport&Logical fields are the destination device ID numbers.
  • Src_Addr is the source device ID number.
  • Logi_Inf is the logical layer information, including the data length, data address, and mailbox number.
  • Payload is the data payload.
  • a cyclic redundancy check code (CRC) is a check code generated using a certain rule.
  • the packet payload information is filled in the data payload domain, and the other portions are the same as in the prior art.
  • the SRIO endpoint as the sender can also fill the packet distribution information as a data payload in the data payload domain.
  • the SRIO endpoint encapsulates the data, such as data generated by itself or received from other devices, and the packet distribution information associated with the data into an SRIO message, the first message. Because the frame structure of the SRIO message does not change in nature, other network elements in the SRIO network can still recognize such SRIO messages, so there is no need to change the SRIO network.
  • the first packet in step 101 includes packet distribution information.
  • the source device ID number is the device ID number of the SRIO endpoint 20.
  • the destination device ID number in the first message is the device ID number of the SRIO endpoint 40, that is, the SRIO endpoint 40 is the receiving end of the message.
  • step 1021 is executed to press the source device ID number and the destination device ID number in the first packet. According to the predetermined rules, it is converted into a source IP address and a source MAC address, and a destination IP address and a destination MAC address, respectively. And, determining the source port number according to the source sending and receiving thread, and determining the destination port number according to the destination sending and receiving thread.
  • an address conversion table may be stored on each message conversion device, and an IP address and a MAC address corresponding to the device ID number are recorded in the address conversion table. Since the SRIO endpoint itself has no IP address and MAC address, in the embodiment of the present invention, each SRIO endpoint is assigned a unique virtual IP address and MAC address. The IP address and MAC address corresponding to the SRIO endpoint can be obtained through negotiation between multiple message conversion devices, and/or the device ID number corresponding to the Ethernet endpoint is obtained through negotiation between multiple message conversion devices. After the negotiation is completed, an address translation table is maintained on each message conversion device.
  • the form of the address conversion table is, for example, the form shown in Table 2. Of course, in actual use, other storage forms are also possible, and the invention is not specifically limited.
  • IP address Device ID number IP address MAC address Device ID number 1 IP address 1 MAC address 1 Device ID number 2 IP address 2 MAC address 2 Device ID number 3 IP address 3 MAC address 3
  • the address conversion is performed according to a predetermined rule in the embodiment of the present invention, for example, performing address mapping according to a preset address mapping table.
  • each of the message conversion devices may perform address mapping by using a negotiated conversion algorithm. Therefore, the predetermined rule in the embodiment of the present invention is a predetermined algorithm.
  • the source port number is determined according to the source transceiver thread, and the destination port number is determined according to the destination transceiver thread.
  • the source transceiver thread may be directly determined as the source port number, and the destination transceiver thread may be determined as the destination port number. It can also be mapped according to a certain rule, which can be formulated according to the actual situation, as long as it can be mapped correctly.
  • the data in the data payload area in the first packet is encapsulated into a second Message.
  • the second packet includes an Ethernet packet header, an IP packet header, a transport layer protocol packet header, and a data field.
  • the encapsulation format of the second packet is shown in Table 3.
  • the frame check sequence (English: Frame Check Sequence, FCS for short) is a check sequence field, which is well known to those skilled in the art, and therefore will not be described herein.
  • the format of the Ethernet packet header can be as shown in Table 4 and Table 5.
  • Table 4 is the Ethernet II frame format
  • Table 5 is the IEEE 802.3 frame format.
  • the format of the Ethernet packet header in the embodiment of the present invention may also be another Ethernet packet header frame format, which is not specifically limited in the present invention.
  • step 1023 the converted source MAC address can be filled into the source address field, and the destination MAC address is filled into the destination address field.
  • the format of the IP packet header can be as shown in Table 6.
  • step 1023 the source IP address converted by step 1021 is filled into the 32-bit source IP address field, and the converted destination IP address is filled into the 32-bit destination IP address field.
  • the group package distribution information further includes identifier information, a fragment sequence number, and flag information used to fill the IP packet header.
  • the identifier information is used to fill the 16-bit identifier field of the IP packet header.
  • MTU maximum transmission unit
  • the flag information is used to fill the 3-bit flag field.
  • the lowest bit of the 3-bit flag field is used to indicate whether there is still a fragmented datagram.
  • the middle one is used to indicate whether the datagram can be fragmented.
  • the slice number is used to determine the value of the slice offset. After the slice offset value is determined, the slice offset value is filled in the 13-bit slice offset field.
  • the slice offset value indicates the relative position of a slice in the original packet after the slice is sliced. That is, where the shard starts from the beginning of the user data field.
  • the slice offset is in 8-byte offset units. That is to say, the length of each slice is an integer multiple of 8 bytes (64 bits).
  • the transport layer protocol may be a User Datagram Protocol (English: User Datagram Protocol, UDP for short) or a Transmission Control Protocol (TCP). Of course, in actual use, it may also be a protocol that other data messages can be encapsulated and transmitted in IP data messages. Therefore, the transport layer protocol packet header is, for example, a UDP packet header or a TCP packet header.
  • the format of the UDP packet header is shown in Table 7.
  • step 1023 the source port number and the destination port number determined in step 1021 are respectively filled in the source port number field and the destination port number field.
  • an SRIO message is encapsulated into a second message that can be transmitted over the Ethernet.
  • the method further includes: sending the second packet by using the Ethernet.
  • the receiving end must send a response message to the sending end when receiving the message sent by the sending end. If the response information spans Ethernet, the round-trip delay is large, which seriously reduces the traffic sent and received by SRIO packets. If you want to guarantee traffic, you will constrain the networking scope.
  • Ethernet is a network that allows packet loss. If the response information is lost, it will affect the stability and performance of the SRIO endpoint. Therefore, after the second packet is sent through the Ethernet, the method further includes: sending a response message to the sending end of the first packet, to notify the sending end that the first packet has been received. By transmitting the response message to the message sender by the message switching device instead of the message receiving end, the transmission of the response message in the Ethernet is avoided.
  • the destination IP address and the destination MAC address obtained in step 102 are both real addresses of the Ethernet endpoint, so the second packet is in the Ethernet. Transfer, and finally reach the Ethernet endpoint.
  • the message receiving end is an SRIO endpoint
  • the message switching device 10 transmits the second message through the Ethernet
  • the second message is transmitted in the Ethernet, and finally reaches the destination device.
  • the message conversion device 30 corresponding to the SRIO endpoint 40.
  • the message conversion device 30 then performs a message format conversion on the second message. How the message conversion apparatus 30 converts the second message into the third message conforming to the SRIO protocol will be described in detail below.
  • FIG. 4 is a flowchart of another packet conversion method according to an embodiment of the present invention.
  • the method includes:
  • Step 201 Receive a second packet, where the second packet includes an Ethernet packet header, an IP packet header, a transport layer protocol packet header, and a data field.
  • the Ethernet packet header includes a source MAC address and a destination MAC address.
  • the packet header includes a source IP address and a destination IP address;
  • the transport layer protocol packet header includes a source port number and a destination port number; and
  • the data field includes data;
  • Step 202 Obtain a third packet according to the second packet, where the third packet conforms to the SRIO protocol.
  • the step 202 may include: converting the source MAC address and the source IP address into the source device ID number; converting the destination MAC address and the destination IP address into the destination device ID number; determining the source transceiver according to the source port number and the destination port number, respectively.
  • the thread and the destination transceiver thread; the data is encapsulated into a third message; and the source device ID number, the destination device ID number, the source transceiver thread, and the destination transceiver thread are filled in the third packet.
  • the second message is transmitted, for example, from the message conversion device 10.
  • the IP address and MAC address in this embodiment are mapped to the device ID number, which is the inverse of the foregoing description of converting the device ID number into an IP address and a MAC address.
  • the message conversion device 30 also maintains an address mapping table as shown in Table 2.
  • the IP address and MAC address can be converted into device ID numbers by looking up the table.
  • the port number is determined as the sending and receiving thread, or the port number is inversely mapped to the sending and receiving thread by some rule.
  • the method further includes: in the information and the identifier field related to the fragment in the IP packet header
  • the identification content is also encapsulated in the third message.
  • the information related to the fragment includes, for example, the lowest bit and the middle bit in the flag field, and the value in the slice offset field.
  • the information related to the fragment and the identifier content are encapsulated in a data payload field of the third packet.
  • the data in the third packet may be processed according to the information related to the fragment and the content of the identifier. For example, all shards can be combined to form a complete data in sequence.
  • the method further includes: sending the third packet to the SRIO endpoint corresponding to the destination device ID number.
  • the SRIO endpoint corresponding to the destination device ID number (such as the SRIO endpoint 40 in FIG. 3) receives the message, it also sends a response message to the message conversion device, so the corresponding report
  • the text conversion device receives the response information sent by the SRIO endpoint corresponding to the destination device ID number.
  • the third message is resent. This process can be repeated until a response message is received.
  • SRIO message or data stream (Datastream) from the source device, SRIO endpoint 20, across Ethernet to the destination device, SRIO endpoint 40.
  • FIG. 5 is a flowchart of still another message conversion method according to an embodiment of the present invention.
  • the method includes:
  • Step 301 Receive a non-response write operation (NWRITE) message; the NWRITE message includes data, a source device ID number, a destination device ID number, and a memory storage of the data on the destination device corresponding to the destination device ID number. address;
  • NWRITE non-response write operation
  • Step 302 Obtain an Ethernet remote direct memory access (English: Remote Direct Memory Access, RDMA for short) message according to the NWRITE message.
  • the Ethernet RDMA packet includes an Ethernet packet header, an IP packet header, and a data payload field.
  • Ethernet packet header includes the source device ID The source MAC address corresponding to the number and the destination MAC address corresponding to the destination device ID number.
  • the IP packet header includes a source IP address corresponding to the source device ID and a destination IP address corresponding to the destination device ID number.
  • the data payload field includes the storage address and the data.
  • the step 302 may include: converting the source device ID number into a source IP address and a source MAC address; converting the destination device ID number into a destination IP address and a destination MAC address; and encapsulating the storage address and data into an Ethernet RDMA
  • the source MAC address and the destination MAC address are filled in the Ethernet packet header, and the source IP address and the destination IP address are filled in the IP packet header, and the storage address and data are filled in the data payload field.
  • the NWRITE message is a transmission format of direct IO. Is a write operation, but does not require the receiver to respond.
  • FIG. 6 is an application scenario of the method in the embodiment of the present invention.
  • SRIO endpoint 60 wants to write a data to SRIO endpoint 80.
  • the SRIO endpoint 60 can send NWRITE messages.
  • the NWRITE message includes the data to be written, the source device ID number, and the destination device ID number, such as the device ID number of the SRIO endpoint 60 and the SRIO endpoint 80. It also includes the memory address on the memory of the destination device to which the data will be written. Optionally, the storage address may be located in a header of the NWRITE packet.
  • the NWRITE message also includes other fields, which are well known to those skilled in the art, and therefore will not be described herein.
  • the NWRITE message then arrives at the message conversion device 50.
  • the message conversion device 50 maps the source device ID number to the source IP address and the source MAC address, and maps the destination device ID number to the destination IP address and the destination MAC address. Specifically, the process of address mapping is similar to that described in step 102, and therefore will not be described herein.
  • the method further includes: transmitting an Ethernet RDMA message over the Ethernet.
  • the Ethernet RDMA message then traverses the Ethernet and arrives at the message conversion device 70.
  • the message conversion device 70 converts the Ethernet RDMA message into the NWRITE message will be described.
  • FIG. 7 is a flowchart of another packet conversion method according to an embodiment of the present invention.
  • the method includes:
  • Step 401 Receive an Ethernet RDMA packet.
  • the Ethernet RDMA packet includes an Ethernet packet header, an IP packet header, and a data payload field.
  • the Ethernet packet header includes a source MAC address and a destination.
  • MAC address the IP packet header includes a source IP address and a destination IP address
  • the data payload field includes data and a storage address on a memory of the destination device to which the data is to be written;
  • Step 402 Obtain an NWRITE packet according to the Ethernet RDMA packet.
  • the NWRITE packet includes a packet header and a data payload field.
  • the packet header includes the storage address, a source device ID number corresponding to the source IP address and the source MAC address, and a destination device ID number of the destination device corresponding to the destination IP address and the destination MAC address.
  • the data payload field includes the data.
  • the step 402 may include: mapping the source IP address and the source MAC address to the source device ID number, mapping the destination IP address and the destination MAC address to the destination device ID number of the destination device; and using the storage address and data
  • the packet is encapsulated in a NWRITE packet, and the storage address, the source device ID number, and the destination device ID number are filled in the header of the NWRITE packet, and the data is filled in the data payload field of the NWRITE packet.
  • the process of mapping the IP address and the MAC address to the device ID number is the reverse process of mapping the device ID number to the IP address and the MCA address, and therefore is not described here.
  • the method further includes: sending the NWRITE message to the destination device.
  • the destination device is the SRIO endpoint 80 as shown in FIG.
  • the packet conversion method shown in FIG. 2, FIG. 4, and FIG. 5 and FIG. 7 can be implemented by using a hardware circuit, so that a large-flow SRIO message (10 G to 40 Gbps or more) can be solved. Packet conversion performance indicators with low latency (1us to 2us or less).
  • the embodiment of the present invention directly converts the NWRITE packet into a packet that can be transmitted in the Ethernet by the device ID number corresponding to the MAC address and the IP address, the prior art cannot be solved.
  • Technical problem of converting NWRITE packets into messages that can be transmitted over Ethernet can be solved.
  • the conversion method in the embodiment of the present invention can theoretically address 4G SRIO devices, so that it can satisfy a large-scale networking scenario.
  • a functional block diagram of a message conversion apparatus includes: a receiving unit 501 and a processing unit 502.
  • the message conversion device may be used to implement at least one of the message conversion methods shown in FIG. 2, FIG. 4, FIG. 5 and FIG.
  • the specific configuration can be determined according to actual needs.
  • the message conversion device can implement FIG. 2
  • the message conversion method shown is that the message of the SRIO message or the data stream type is converted into a message that can be transmitted on the Ethernet, and the message conversion method shown in FIG. 5 is implemented, and the NWRITE message is converted into a Packets transmitted by Ethernet.
  • the message conversion device can implement the message conversion method shown in FIG.
  • the method converts an Ethernet RDMA packet into an NWRITE packet.
  • the message conversion device can implement the message conversion method shown in FIG. 2, and convert the SRIO message or the data stream type message into a message that can be transmitted on the Ethernet, and can also be as shown in FIG.
  • the message conversion method converts the received Ethernet message into a SRIO message or a data stream type message.
  • the message conversion device can implement the message conversion method shown in FIG. 5, convert the NWRITE message into a message that can be transmitted on the Ethernet, or according to the message conversion method shown in FIG.
  • the received Ethernet RDMA packet is converted into an NWRITE packet.
  • the fifth the combination of the first to the fourth.
  • the receiving unit 501 can be used to implement step 101 of the method shown in FIG. 2.
  • Processing unit 502 can be used to implement step 102 of the method illustrated in FIG.
  • the receiving unit 501 is configured to implement step 201 of the method shown in FIG.
  • Processing unit 502 is for implementing step 202 of the method illustrated in FIG.
  • the receiving unit 501 is configured to implement step 301 of the method shown in FIG. 5.
  • Processing unit 502 is for implementing step 302 of the method illustrated in FIG.
  • the receiving unit 501 is configured to implement step 401 of the method shown in FIG. 7.
  • Processing unit 502 is for implementing step 402 of the method illustrated in FIG.
  • FIG. 9 is a structural block diagram of a message conversion device according to an embodiment of the present invention.
  • the message conversion device includes a processing circuit 601, a transmitter 602, a receiver 603, a memory 604, an SRIO interface 605, and an Ethernet interface 606.
  • the processor 601 may be an application specific integrated circuit (ASIC), and may be one or more integrated circuits for controlling program execution, and may be a field programmable gate array (English: Field) Programmable Gate Array, referred to as: FPGA) developed hardware circuit.
  • the number of memories 604 can be one or more.
  • the memory 604 may include a read only memory (English: Read Only Memory, ROM for short), a random access memory (English: Random Access Memory, RAM for short), and a disk storage. These memories, receivers 603 and transmitters 602 are connected to the processing circuit 601 via a bus. The receiver 603 and the transmitter 602 are configured to perform network communication with an external device, and specifically communicate with an external device through a network such as an Ethernet, a wireless access network, or a wireless local area network. Receiver 603 and transmitter 602 may be physically separate components or may be physically identical components.
  • the packet conversion device may be used to implement at least one of the packet conversion methods shown in FIG. 2, FIG. 4, FIG. 5 and FIG.
  • the specific configuration can be determined according to actual needs. It can be understood that, when the packet conversion device is used to implement at least two types of packet conversion methods shown in FIG. 2 to FIG. 7, the following may be included: First, the packet conversion device can implement the image. The packet conversion method shown in FIG. 2 converts the SRIO message or the data stream type packet into a packet that can be transmitted on the Ethernet, and can also implement the packet conversion method shown in FIG. 5, and converts the NWRITE packet to the capable Messages transmitted over Ethernet. Second, the packet conversion device can implement the packet conversion method shown in FIG.
  • the method converts an Ethernet RDMA packet into an NWRITE packet.
  • the message conversion device can implement the message conversion method shown in FIG. 2, and convert the SRIO message or the data stream type message into a message that can be transmitted on the Ethernet, and can also be according to the figure.
  • the message conversion method shown in 4 converts the received Ethernet message into a SRIO message or a data stream type message.
  • the packet conversion device can implement the packet conversion method shown in FIG. 5, and convert the NWRITE packet into a packet that can be transmitted on the Ethernet, or according to the packet conversion method shown in FIG.
  • the received Ethernet RDMA packet is converted into an NWRITE packet.
  • the fifth the combination of the first to the fourth.
  • the receiver 603 is configured to receive the first packet by using the SRIO interface 605.
  • the first packet conforms to the SRIO protocol.
  • the data payload field of a message is filled with data; the data payload field of the first packet includes data; the first packet includes a source device identification ID number, a destination device ID number, and a packet distribution information;
  • the distribution information includes a source transceiver thread and a destination transceiver thread.
  • the processing circuit 601 is configured to obtain a second packet according to the first packet, where the second packet includes an Ethernet packet header and a network protocol IP packet.
  • the Ethernet packet header including a source media access control MAC address corresponding to the source device ID number, and a destination MAC address corresponding to the destination device ID number
  • the IP packet header includes a source IP address corresponding to the source device ID number, and a destination IP address corresponding to the destination device ID
  • the transport layer protocol packet header includes a corresponding to the source transceiver thread Source port number, Transceiver thread and the object corresponding to the destination port number
  • the data field includes said transactions; transmitter 602, configured to send a second message to the Ethernet interface 606 via the Ethernet.
  • the sender 602 is further configured to send the response information to the sending end of the first packet by using the SRIO interface 605.
  • the group package distribution information further includes the identifier information, the fragment sequence number, and the flag information.
  • the IP packet header further includes an identifier field, a flag field, and a slice offset field, where the identifier field includes the identifier information.
  • the receiver 603 is configured to receive the second packet through the Ethernet interface 606;
  • the packet includes an Ethernet packet header, a network protocol IP packet header, a transport layer protocol packet header, and a data field.
  • the Ethernet packet header includes a source media access control MAC address and a destination MAC address;
  • the IP packet header includes a source IP address and a destination IP address;
  • the transport layer protocol packet header includes a source port number and a destination port.
  • the data field includes data; the processing circuit 601 is configured to obtain a third message according to the second message; wherein the third message conforms to a serial high-speed input/output SRIO protocol, and the third report
  • the receiver 603 is further configured to: receive, by using the SRIO interface 605, response information sent by the destination device corresponding to the destination device ID number.
  • the receiver 603 is configured to receive the NWRITE message by the SRIO interface 605, and the NWRITE message is received.
  • the data includes a data, a source device ID number, a destination device ID number, and a storage address of the memory on the destination device corresponding to the destination device ID number.
  • the processing circuit 601 is configured to obtain an Ethernet remote direct according to the NWRITE message.
  • the memory reads and writes an RDMA message, wherein the Ethernet RDMA message includes an Ethernet packet header, a network protocol IP packet header, and a data payload field; and the Ethernet packet header includes an identifier corresponding to the source device ID number.
  • the IP packet header includes a source IP address corresponding to the source device ID and a destination device ID number corresponding to the target device The destination IP address; the data payload field includes the storage address and the data; and the transmitter 602 is configured to send an Ethernet RDMA packet through the Ethernet interface 606.
  • the receiver 603 is configured to receive an Ethernet remote direct memory read and write RDMA report through the Ethernet interface 606.
  • the Ethernet RDMA packet includes an Ethernet packet header, a network protocol IP packet header, and a data payload field, wherein the Ethernet packet header includes a source media access control MAC address and a destination MAC address, and the IP address
  • the packet header includes a source IP address and a destination IP address, and the data carries
  • the load field includes data and a storage address on the memory of the destination device to which the data is to be written;
  • the processing circuit 601 is configured to obtain a non-response write operation NWRITE message according to the Ethernet RDMA message; wherein the NWRITE message includes a packet header and a data payload field;
  • the packet header includes the storage address, a source device identification ID number corresponding to the source IP address and the source MAC address, and the destination IP address and the destination MAC address
  • the packet conversion device may be a baseband unit BBU, a switch in the Ethernet, or a gateway device, which is not limited by the implementation requirements.
  • the message transmission apparatus includes: an obtaining unit 701, configured to obtain data; a processing unit 702, configured to obtain group package distribution information about the data; the group package distribution information includes a source sending and receiving thread and a destination sending and receiving thread; And the packet distribution information obtains the first packet, and the first packet conforms to the SRIO protocol.
  • the data payload field of the first packet includes packet distribution information.
  • the group package distribution information further includes the identifier information, the fragment sequence number, and the flag information, where the identifier information, the fragment sequence number, and the flag information are used to fill the identifier field and the fragment offset field in the network protocol IP packet header, respectively. And the flag field.
  • an embodiment of the present invention provides an SRIO endpoint, including FIG. 10 and The message transmission device and the output port described in the embodiments thereof.
  • the output port is used to output the first message.
  • the SRIO endpoint is a processing chip, such as a CPU, a DSP, and a baseband chip.
  • the SRIO endpoint may specifically be a device that supports the SRIO interface.
  • the source destination transceiver thread maps the source destination port number, and converts the first packet conforming to the SRIO protocol into the second packet that can be transmitted in the Ethernet. Text.
  • the embodiment of the present invention directly corresponds to the MAC address and the IP address through the device ID, so in the case of the 32-bit IP address, in the embodiment of the present invention,
  • the conversion method can theoretically address 4G SRIO devices, so it is much larger than the networking range of the addressing schemes associated with mailbox numbers and mail numbers in the prior art.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the computer readable memory is stored in the computer readable memory.
  • the instructions in the production result include an article of manufacture of the instruction device that implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

本发明提供一种报文转换方法及装置。该方法包括:接收第一报文;第一报文符合SRIO协议;第一报文的数据载荷域包括数据;第一报文中包含源器件ID号、目的器件ID号以及组包分发信息;组包分发信息包括源收发线程和目的收发线程;根据第一报文获得第二报文;第二报文包括以太网报文头、IP报文头、传输层协议报文头以及数据字段,以太网报文头包括与源器件ID号对应的源MAC地址,以及与目的器件ID号对应的目的MAC地址;IP报文头包括与源器件ID号对应的源IP地址,以及与目的器件ID对应的目的IP地址;传输层协议报文头包括与源收发线程对应的源端口号,以及与目的收发线程对应的目的端口号;数据字段包括所述数据。

Description

一种报文转换方法及装置 技术领域
本发明涉及通信技术领域,尤其涉及一种报文转换方法及装置。
背景技术
串行高速输入输出(英文:Serial Rapid Input Output,简称SRIO)是一种高性能、基于数据包交换的互联总线技术。SRIO主要应用于嵌入式系统内部互联,支持芯片到芯片、板到板间的通信。
由于SRIO针对的目标是嵌入式系统,所以通过SRIO组建的互联网的范围较小。而以太网(Ethernet)可以支持大范围的互联。因此,需要将各个SRIO网络通过以太网进行互联,进而实现大范围的互联。然而,SRIO器件不支持以太网接口,所以SRIO报文无法在以太网中进行传输。
SRIO协议里定义了4个邮箱(mail box)号和4个邮件(letter)号,所以可以支持16条消息地址。因此,在现有技术中采用如下方法进行报文转换。将以太网中的媒体接入控制(英文:Media Access Control,简称:MAC)地址跟邮箱号和邮件号相关联,所以总共能寻址到16个MAC地址。
然而,由于SRIO消息(message)的邮箱号和邮件号的总数只有16个,所以可以转换的SRIO器件最多只有16个,所以约束了SRIO网络的互联范围,无法实现大范围组网。
发明内容
本发明实施例提供一种报文转换方法及装置,用以解决现有技术中的报文转换方法导致的无法大范围组网的技术问题。
第一方面提供了一种报文转换方法,包括:
接收第一报文;所述第一报文符合串行高速输出输出SRIO协议;所述第一报文的数据载荷域包括数据;所述第一报文中包含源器件标识ID号、目的 器件ID号以及组包分发信息;所述组包分发信息包括源收发线程和目的收发线程;
根据所述第一报文获得第二报文;
其中,所述第二报文包括以太网报文头、网络协议IP报文头、传输层协议报文头以及数据字段,所述以太网报文头包括与所述源器件ID号对应的源媒体接入控制MAC地址,以及与所述目的器件ID号对应的目的MAC地址;所述IP报文头包括与所述源器件ID号对应的源IP地址,以及与所述目的器件ID对应的目的IP地址;所述传输层协议报文头包括与所述源收发线程对应的源端口号,以及与所述目的收发线程对应的目的端口号;所述数据字段包括所述数据。
结合第一方面,在第一方面的第一种可能的实现方式中,在根据所述第一报文获得第二报文之后,所述方法还包括:
根据所述目的IP地址以及所述目的MAC地址发送所述第二报文;
向所述第一报文的发送端发送应答信息。
结合第一方面或第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述组包分发信息还包括标识信息、分片序号以及标志信息;所述IP报文头还包括标识字段、标志字段和片偏移字段,所述标识字段中包括与所述标识信息对应的信息;所述标志字段中包括与所述标志信息对应的信息;所述片偏移字段中包括与所述分配序号对应的信息。
第二方面提供一种报文转换方法,包括:
接收第二报文;所述第二报文包括以太网报文头、网络协议IP报文头、传输层协议报文头以及数据字段;所述以太网报文头包括源媒体接入控制MAC地址和目的MAC地址;所述IP报文头包括源IP地址和目的IP地址;所述传输层协议报文头包括源端口号和目的端口号;所述数据字段包括数据;
根据所述第二报文获得第三报文;其中,所述第三报文符合串行高速输入输出SRIO协议,所述第三报文包括源器件标识ID号、目的器件ID号、源收发线程、目的收发线程以及所述数据;所述源器件ID号与所述源MAC地 址和所述源IP地址对应;所述目的器件ID号与所述目的MAC地址和所述目的IP地址对应;所述源收发线程与所述源端口号对应;所述目的收发线程与所述目的端口号对应。
结合第二方面,在第二方面的第一种可能的实现方式中,在根据所述第二报文获得第三报文之后,所述方法还包括:
根据所述目的器件ID号发送所述第三报文;
接收所述目的器件ID号对应的目的器件发送的应答信息。
第三方面提供一种报文转换方法,包括:
接收无应答写操作NWRITE报文;所述NWRITE报文中包含数据、源器件标识ID号、目的器件ID号以及所述数据在所述目的器件ID号对应的目的器件上的存储器的存储地址;
根据所述NWRITE报文获得以太网远程直接内存读写RDMA报文;其中,所述以太网RDMA报文包括以太网报文头、网络协议IP报文头和数据载荷字段;所述以太网报文头包括与所述源器件ID号对应的源媒体接入控制MAC地址和与所述目的器件ID号对应的目的MAC地址;所述IP报文头包括与所述源器件ID对应的源IP地址和与所述目的器件ID号对应的目的IP地址;所述数据载荷字段包括所述存储地址和所述数据。
第四方面提供一种报文转换方法,包括:
接收以太网远程直接内存读写RDMA报文;所述以太网RDMA报文包括以太网报文头、网络协议IP报文头和数据载荷字段;其中,所述以太网报文头包括源媒体接入控制MAC地址和目的MAC地址,所述IP报文头包括源IP地址和目的IP地址,所述数据载荷字段包括数据以及数据将要写入的目的器件的存储器上的存储地址;
根据所述以太网RDMA报文获得无应答写操作NWRITE报文;其中,所述NWRITE报文包括报文头以及数据载荷字段;所述报文头包括所述存储地址,与所述源IP地址和所述源MAC地址对应的源器件标识ID号,与所述目的IP地址和所述目的MAC地址对应的所述目的器件的目的器件ID号;所述 数据载荷字段包括所述数据。
第五方面提供一种报文传输方法,包括:
获得数据;
获得关于所述数据的组包分发信息;所述组包分发信息包括源收发线程和目的收发线程;
根据所述数据和所述组包分发信息获得第一报文,所述第一报文符合串行高速输入输出SRIO协议。
结合第五方面,在第五方面的第一种可能的实现方式中,所述第一报文的数据载荷域包括所述组包分发信息。
结合第五方面或第五方面的第一种可能的实现方式,在第五方面的第二种可能的实现方式中,所述组包分发信息还包括标识信息、分片序号以及标志信息,所述标识信息、分片序号以及标志信息分别用于填充网络协议IP报文头中的标识字段、片偏移字段以及标志字段。
第六方面提供了一种报文转换装置,包括:
接收单元,用于接收第一报文;所述第一报文符合串行高速输出输出SRIO协议;所述第一报文的数据载荷域包括数据;所述第一报文中包含源器件标识ID号、目的器件ID号以及组包分发信息;所述组包分发信息包括源收发线程和目的收发线程;
处理单元,用于根据所述第一报文获得第二报文;
其中,所述第二报文包括以太网报文头、网络协议IP报文头、传输层协议报文头以及数据字段,所述以太网报文头包括与所述源器件ID号对应的源媒体接入控制MAC地址,以及与所述目的器件ID号对应的目的MAC地址;所述IP报文头包括与所述源器件ID号对应的源IP地址,以及与所述目的器件ID对应的目的IP地址;所述传输层协议报文头包括与所述源收发线程对应的源端口号,以及与所述目的收发线程对应的目的端口号;所述数据字段包括所述数据。
结合第六方面,在第六方面的第一种可能的实现方式中,所述装置还包 括发送单元,用于根据所述目的IP地址以及所述目的MAC地址发送所述第二报文;向所述第一报文的发送端发送应答信息。
结合第六方面或第六方面的第一种可能的实现方式,在第六方面的第二种可能的实现方式中,所述组包分发信息还包括标识信息、分片序号以及标志信息;所述IP报文头还包括标识字段、标志字段和片偏移字段,所述标识字段中包括与所述标识信息对应的信息;所述标志字段中包括与所述标志信息对应的信息;所述片偏移字段中包括与所述分配序号对应的信息。
第七方面提供一种报文转换装置,包括:
接收单元,用于接收第二报文;所述第二报文包括以太网报文头、网络协议IP报文头、传输层协议报文头以及数据字段;所述以太网报文头包括源媒体接入控制MAC地址和目的MAC地址;所述IP报文头包括源IP地址和目的IP地址;所述传输层协议报文头包括源端口号和目的端口号;所述数据字段包括数据;
处理单元,用于根据所述第二报文获得第三报文;其中,所述第三报文符合串行高速输入输出SRIO协议,所述第三报文包括源器件标识ID号、目的器件ID号、源收发线程、目的收发线程以及所述数据;所述源器件ID号与所述源MAC地址和所述源IP地址对应;所述目的器件ID号与所述目的MAC地址和所述目的IP地址对应;所述源收发线程与所述源端口号对应;所述目的收发线程与所述目的端口号对应。
结合第七方面,在第七方面的第一种可能的实现方式中,所述装置还包括发送单元,用于根据所述目的器件ID号发送所述第三报文;
所述接收单元还用于:接收所述目的器件ID号对应的目的器件发送的应答信息。
第八方面提供一种报文转换装置,包括:
接收单元,用于接收无应答写操作NWRITE报文;所述NWRITE报文中包含数据、源器件标识ID号、目的器件ID号以及所述数据在所述目的器件ID号对应的目的器件上的存储器的存储地址;
处理单元,用于根据所述NWRITE报文获得以太网远程直接内存读写RDMA报文;其中,所述以太网RDMA报文包括以太网报文头、网络协议IP报文头和数据载荷字段;所述以太网报文头包括与所述源器件ID号对应的源媒体接入控制MAC地址和与所述目的器件ID号对应的目的MAC地址;所述IP报文头包括与所述源器件ID对应的源IP地址和与所述目的器件ID号对应的目的IP地址;所述数据载荷字段包括所述存储地址和所述数据。
第九方面提供一种报文转换装置,包括:
接收单元,用于接收以太网远程直接内存读写RDMA报文;所述以太网RDMA报文包括以太网报文头、网络协议IP报文头和数据载荷字段;其中,所述以太网报文头包括源媒体接入控制MAC地址和目的MAC地址,所述IP报文头包括源IP地址和目的IP地址,所述数据载荷字段包括数据以及数据将要写入的目的器件的存储器上的存储地址;
处理单元,用于根据所述以太网RDMA报文获得无应答写操作NWRITE报文;其中,所述NWRITE报文包括报文头以及数据载荷字段;所述报文头包括所述存储地址,与所述源IP地址和所述源MAC地址对应的源器件标识ID号,与所述目的IP地址和所述目的MAC地址对应的所述目的器件的目的器件ID号;所述数据载荷字段包括所述数据。
第十方面提供一种报文传输装置,包括:
获得单元,用于获得数据;
处理单元,用于获得关于所述数据的组包分发信息;所述组包分发信息包括源收发线程和目的收发线程;根据所述数据和所述组包分发信息获得第一报文,所述第一报文符合串行高速输入输出SRIO协议。
结合第十方面,在第十方面的第一种可能的实现方式中,所述第一报文的数据载荷域包括所述组包分发信息。
结合第十方面或第十方面的第一种可能的实现方式,在第十方面的第二种可能的实现方式中,所述组包分发信息还包括标识信息、分片序号以及标志信息,所述标识信息、分片序号以及标志信息分别用于填充网络协议IP报 文头中的标识字段、片偏移字段以及标志字段。
第十一方面提供一种报文转换设备,包括:
串行高速输入输出SRIO接口;
接收器,用于通过所述SRIO接口接收第一报文;所述第一报文符合串行高速输出输出SRIO协议;所述第一报文的数据载荷域包括数据;所述第一报文中包含源器件标识ID号、目的器件ID号以及组包分发信息;所述组包分发信息包括源收发线程和目的收发线程;
处理电路,用于根据所述第一报文获得第二报文;其中,所述第二报文包括以太网报文头、网络协议IP报文头、传输层协议报文头以及数据字段,所述以太网报文头包括与所述源器件ID号对应的源媒体接入控制MAC地址,以及与所述目的器件ID号对应的目的MAC地址;所述IP报文头包括与所述源器件ID号对应的源IP地址,以及与所述目的器件ID对应的目的IP地址;所述传输层协议报文头包括与所述源收发线程对应的源端口号,以及与所述目的收发线程对应的目的端口号;所述数据字段包括所述数据;
以太网接口;
发送器,用于通过所述以太网接口将所述第二报文发送至以太网。
结合第十一方面,在第十一方面的第一种可能的实现方式中,所述发送器还用于通过所述SRIO接口向所述第一报文的发送端发送应答信息。
结合第十一方面或第十一方面的第一种可能的实现方式,在第十一方面的第二种可能的实现方式中,所述组包分发信息还包括标识信息、分片序号以及标志信息;所述IP报文头还包括标识字段、标志字段和片偏移字段,所述标识字段中包括与所述标识信息对应的信息;所述标志字段中包括与所述标志信息对应的信息;所述片偏移字段中包括与所述分配序号对应的信息。
结合第十一方面或第十一方面的第一种可能的实现方式或第十一方面的第二种可能的实现方式,在第十一方面的第三种可能的实现方式中,所述设备为基带单元BBU、以太网中的交换机或者网关设备。
第十二方面提供一种报文转换设备,包括:
以太网接口;
接收器,用于通过所述以太网接口接收第二报文;所述第二报文包括以太网报文头、网络协议IP报文头、传输层协议报文头以及数据字段;所述以太网报文头包括源媒体接入控制MAC地址和目的MAC地址;所述IP报文头包括源IP地址和目的IP地址;所述传输层协议报文头包括源端口号和目的端口号;所述数据字段包括数据;
处理电路,用于根据所述第二报文获得第三报文;其中,所述第三报文符合串行高速输入输出SRIO协议,所述第三报文包括源器件标识ID号、目的器件ID号、源收发线程、目的收发线程以及所述数据;所述源器件ID号与所述源MAC地址和所述源IP地址对应;所述目的器件ID号与所述目的MAC地址和所述目的IP地址对应;所述源收发线程与所述源端口号对应;所述目的收发线程与所述目的端口号对应;
串行高速输入输出SRIO接口;
发送器,用于通过所述SRIO接口根据所述目的器件ID号发送所述第三报文。
结合第十二方面,在第十二方面的第一种可能的实现方式中,所述接收器还用于:通过所述SRIO接口接收所述目的器件ID号对应的目的器件发送的应答信息。
结合第十二方面或第十二方面的第一种可能的实现方式,在第十二方面的第二种可能的实现方式中,所述设备为基带单元BBU、以太网中的交换机或者网关设备。
第十三方面提供一种报文转换设备,包括:
串行高速输入输出SRIO接口;
接收器,用于通过所述SRIO接口接收无应答写操作NWRITE报文;所述NWRITE报文中包含数据、源器件标识ID号、目的器件ID号以及所述数据在所述目的器件ID号对应的目的器件上的存储器的存储地址;
处理电路,用于根据所述NWRITE报文获得以太网远程直接内存读写 RDMA报文;其中,所述以太网RDMA报文包括以太网报文头、网络协议IP报文头和数据载荷字段;所述以太网报文头包括与所述源器件ID号对应的源媒体接入控制MAC地址和与所述目的器件ID号对应的目的MAC地址;所述IP报文头包括与所述源器件ID对应的源IP地址和与所述目的器件ID号对应的目的IP地址;所述数据载荷字段包括所述存储地址和所述数据;
以太网接口;
发送器,用于通过所述以太网接口发送所述以太网RDMA报文。
结合第十三方面,在第十三方面的第一种可能的实现方式中,所述设备为基带单元BBU、以太网中的交换机或者网关设备。
第十四方面提供一种报文转换设备,包括:
以太网接口;
接收器,用于通过所述以太网接口接收以太网远程直接内存读写RDMA报文;所述以太网RDMA报文包括以太网报文头、网络协议IP报文头和数据载荷字段;其中,所述以太网报文头包括源媒体接入控制MAC地址和目的MAC地址,所述IP报文头包括源IP地址和目的IP地址,所述数据载荷字段包括数据以及数据将要写入的目的器件的存储器上的存储地址;
处理电路,用于根据所述以太网RDMA报文获得无应答写操作NWRITE报文;其中,所述NWRITE报文包括报文头以及数据载荷字段;所述报文头包括所述存储地址,与所述源IP地址和所述源MAC地址对应的源器件标识ID号,与所述目的IP地址和所述目的MAC地址对应的所述目的器件的目的器件ID号;所述数据载荷字段包括所述数据;
串行高速输入输出SRIO接口;
发送器,用于通过所述SRIO接口发送所述NWRITE报文。
结合第十四方面,在第十四方面的第一种可能的实现方式中,所述设备为基带单元BBU、以太网中的交换机或者网关设备。
第十五方面提供一种串行高速输入输出SRIO端点,包括:
报文传输装置,用于获得数据;获得关于所述数据的组包分发信息;所 述组包分发信息包括源收发线程和目的收发线程;根据所述数据和所述组包分发信息获得第一报文,所述第一报文符合串行高速输入输出SRIO协议;
输出端口,用于输出所述第一报文。
结合第十五方面,在第十五方面的第一种可能的实现方式中,所述SRIO端点为基带单元BBU中的中央处理器CPU、基带芯片或者数字信号处理DSP芯片。
结合第十五方面或第十五方面的第一种可能的实现方式,在第十五方面的第二种可能的实现方式中,所述第一报文的数据载荷域包括所述组包分发信息。
结合第十五方面或第十五方面的第一种可能的实现方式或第十五方面的第二种可能的实现方式,在第十五方面的第三种可能的实现方式中,所述组包分发信息还包括标识信息、分片序号以及标志信息,所述标识信息、分片序号以及标志信息分别用于填充网络协议IP报文头中的标识字段、片偏移字段以及标志字段。
本发明实施例中提供的一个或多个技术方案,至少具有如下技术效果或优点:
本发明实施例中,通过将器件ID号映射为IP地址和MAC地址,源目的收发线程映射源目的端口号,将SRIO报文转换为能够在以太网中传输的第二报文。相比现有技术中将MAC地址和邮箱号和邮件号相关联的方案,本发明实施例是直接通过器件ID号对应MAC地址和IP地址,所以对于32位IP地址的情况,本发明实施例中的转换方法理论上可以寻址4G个SRIO器件,所以远远大于现有技术中关联邮箱号和邮件号的寻址方案的组网范围。
附图说明
图1a-图1b为本发明实施例提供的一种网络系统结构图;
图2为本发明实施例提供的第一种报文转换方法的流程图;
图3为本发明实施例提供的第一种报文转换的示意图;
图4为本发明实施例提供的第二种报文转换方法的流程图;
图5为本发明实施例提供的第三种报文转换方法的流程图;
图6为本发明实施例提供的第二种报文转换的示意图;
图7为本发明实施例提供的第四种报文转换方法的流程图
图8为本发明实施例提供的一种报文转换装置的功能框图;
图9为本发明实施例提供的一种报文转换设备的结构框图;
图10为本发明实施例提供的一种报文传输装置的功能框图。
具体实施方式
本发明实施例提供一种报文转换方法及装置,用以解决现有技术中的报文转换方法导致的无法大范围组网的技术问题。
本发明实施例中的技术方案为解决上述技术问题,总体思路如下:
在本发明实施例中,SRIO报文中包括源目的收发线程,并且将源目的收发线程和源目的端口号对应,将器件ID号与网络协议(英文:Internet Protocol,简称:IP)地址和MAC地址对应,所以能够将SRIO报文转换为能够在以太网中传输的第二报文。因为直接将器件ID号和MAC地址和IP地址关联,所以可以实现大范围的组网。
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
需要说明的是,在本发明实施例中,“字段”和“域”可以互换使用。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是 一种“或”的关系。
请参考图1a所示,为本发明实施例提供的一种网络系统结构图。该网络系统包括:至少一个以太网端点、至少一个SRIO网络和/或至少一个SRIO端点,以太网以及报文转换装置。报文转换装置包括SRIO接口以及以太网接口。报文转换装置连接在SRIO网络或SRIO端点与以太网之间,用于将SRIO报文转换为以太网报文,和/或,将以太网报文转换为SRIO报文。SRIO网络以及SRIO端点可以通过以太网组成一个大范围的网络。
进一步,请再参考图1b所示,SRIO网络包括多个SRIO端点以及SRIO交换机。
其中,SRIO端点具体可以是一个支持SRIO接口的设备,也可以是一个元器件。
举例来说,在云-无线接入网络(英文:Cloud-Radio Access Network,简称:C-RAN)场景中,SRIO端点例如是基带单元(英文:Baseband Unit,简称:BBU),或是BBU中的中央处理器(英文:Central Processing Unit,简称:CPU)、数字信号处理(英文:Digital Signal Processing,简称:DSP)芯片或基带芯片。
SRIO交换机可以是一个单独的交换机,也可以是一个SRIO交换芯片。SRIO交换芯片可以集成在其它网元中。举例来说,可以集成在BBU中。
报文转换装置可以是单独的设备,也可以是集成在其它网元中。举例来说,报文转换装置可以集成在SRIO交换机或者是SRIO端点中,也可以集成在以太网中的交换机中或者网关设备中。
以下将具体描述报文转换装置如何进行报文转换。首先,将描述SRIO报文转换为以太网报文的过程。
请参考图2,为本发明实施例提供的一种报文转换方法的流程图。该方法包括:
步骤101:接收第一报文;所述第一报文符合SRIO协议;第一报文的数据载荷域包括数据;第一报文中包含源器件标识(ID)号、目的器件ID号以 及组包分发信息;所述组包分发信息包括源收发线程和目的收发线程;
步骤102:根据第一报文获得第二报文;其中,第二报文包括以太网报文头、网络协议(英文:Internet Protocol,简称:IP)报文头、传输层协议报文头以及数据字段。以太网报文头包括与源器件ID号对应的源MAC地址,以及与目的器件ID号对应的目的MAC地址。IP报文头包括与源器件ID号对应的源IP地址,以及与目的器件ID对应的目的IP地址。传输层协议报文头包括与源收发线程对应的源端口号,以及与目的收发线程对应的目的端口号。数据字段包括所述数据。
具体来说,步骤102包括:步骤1021,将源器件ID号按照预定规则转换为源IP地址、源MAC地址;将目的器件ID号按照所述预定规则转换为目的IP地址、目的MAC地址;根据源收发线程确定源端口号,根据目的收发线程确定目的端口号;步骤1022,将所述数据封装为第二报文;将所述数据填充在数据字段;步骤1023,将源MAC地址和目的MAC地址填充在以太网报文头;将源IP地址和目的IP地址填充在IP报文头;将源端口号和目的端口号填充在传输层协议报文头。
其中,传输层协议的报文能够被封装在IP报文中传输。
可以理解的是,步骤1021和步骤1022之间并不限定其先后顺序,步骤1021和步骤1023之间也不限定其先后顺序。换言之,可以是在步骤1022执行完之后再执行步骤1021,也可以是先执行步骤1021,再执行步骤1022,或者是两个步骤同时执行。此外,可以是在步骤1022执行完之后再执行步骤1023,也可以是先执行步骤1023,再执行步骤1022,或者是两个步骤同时执行。
同时请参考图3所示,为本实施例方法的一个应用场景图。假设SRIO端点20需要将数据发送给SRIO端点40。因为SRIO端点20和SRIO端点40位于不同的SRIO网络中,两者中间通过以太网连接。那么SRIO端点20发送的SRIO报文,即第一报文首先通过SRIO交换机,然后到达报文转换装置10。那么对应的,报文转换装置10接收第一报文。
现有技术中的SRIO报文的帧结构请参考表一所示。
Figure PCTCN2015080439-appb-000001
表一
其中,头信息(Hearder)包括ACKID字段、RSVD字段、PRIO字段、TT字段以及FType字段。ACKID字段用于向报文发送端响应报文接收确认信息,RSVD为保留域。PRIO为报文优先级。TT为器件ID的长度。FType为Logi_Inf的格式类型。传输层以及逻辑层域(Transport&Logical fields)中的Dest_Addr为目的器件ID号。Src_Addr为源器件ID号。Logi_Inf为逻辑层信息,包括数据长度、数据地址以及邮箱号等。Payload为数据载荷。循环冗余校验码(CRC)为采用某种规则生成的校验码。
在本发明实施例中,SRIO报文的帧格式有一些变化。具体来说,例如是在数据载荷域中填充有组包分发信息,其它部分与现有技术中相同。如此,作为发送端的SRIO端点就可以将组包分发信息也作为数据载荷填充在数据载荷域中。换言之,SRIO端点将获得的数据,例如自身生成的或者是从其它器件上接收的数据,以及与该数据相关的组包分发信息封装成SRIO报文,即第一报文。因为SRIO报文的帧结构在本质上没有发生改变,所以SRIO网络中的其它网元依然可以识别这样的SRIO报文,所以不需要对SRIO网络进行改动。当然,在实际运用中,也可以是在其它域补充定义组包分发信息,也可以是增加新的字段来填充组包分发信息。
因此,不管是上述哪种承载方式,步骤101中的第一报文中包含组包分发信息。
以图3为例,因为第一报文是由SRIO端点20发送的,所以源器件ID号即为SRIO端点20的器件ID号。假设第一报文中的目的器件ID号为SRIO端点40的器件ID号,即表示SRIO端点40为报文的接收端。
接下来执行步骤1021,将第一报文中的源器件ID号和目的器件ID号按 照预定规则分别转换为源IP地址和源MAC地址,以及目的IP地址和目的MAC地址。并且,根据源收发线程确定源端口号,以及根据目的收发线程确定目的端口号。
具体来说,可以在每个报文转换装置上都保存有一张地址转换表,地址转换表中记录了器件ID号对应的IP地址和MAC地址。因为SRIO端点本身是没有IP地址和MAC地址的,所以在本发明实施例中,为每个SRIO端点分配一个唯一的虚拟的IP地址和MAC地址。SRIO端点对应的IP地址和MAC地址可以通过多个报文转换装置之间进行协商获得,和/或,以太网端点对应的器件ID号通过多个报文转换装置之间进行协商获得。协商完成之后,每个报文转换装置上就会维护一张地址转换表。地址转换表的形式例如为表二所示的形式。当然,在实际运用中,也可以是其它的存储形式,本发明不作具体限定。
器件ID号 IP地址 MAC地址
器件ID号1 IP地址1 MAC地址1
器件ID号2 IP地址2 MAC地址2
器件ID号3 IP地址3 MAC地址3
表二
因此,本发明实施例中的按照预定规则进行地址转换,例如为按照预设的地址映射表进行地址映射。
当然,在实际运用中,也可以是每个报文转换装置利用协商好的转换算法进行地址映射,所以本发明实施例中的预定规则即为预定算法。
关于根据源收发线程确定源端口号,以及根据目的收发线程确定目的端口号,具体来说,可以是直接将源收发线程确定为源端口号,将目的收发线程确定为目的端口号。也可以是按照某种规则进行映射,该规则可以根据实际情况进行制定,只要能够正确映射即可。
接下来执行步骤1022,将第一报文中的数据载荷区域的数据封装为第二 报文。第二报文包括以太网报文头、IP报文头、传输层协议报文头以及数据字段。
第二报文的封装格式如表三所示。
Figure PCTCN2015080439-appb-000002
表三
其中,帧校验序列(英文:Frame Check Sequence,简称:FCS)为校验序列字段,为本领域技术人员所熟知的内容,所以在此不再赘述。
具体来说,以太网报文头的格式可以如表四和表五所示,表四为EthernetII帧格式,表五为IEEE802.3的帧格式。当然,在实际运用中,本发明实施例中的以太网报文头格式也可以是其它以太网报文头帧格式,本发明不作具体限定。
前序 目的地址 源地址 类型 数据 FCS
8byte 6byte 6byte 2byte 46~1500byte 4byte
表四
Figure PCTCN2015080439-appb-000003
表五
在步骤1023中,就可以将转换后的源MAC地址填充到源地址字段中,将目的MAC地址填充到目的地址字段中。
其它字段为本领域技术人员所熟知的内容,所以在此不再赘述。
IP报文头的格式可以如表六所示。
Figure PCTCN2015080439-appb-000004
Figure PCTCN2015080439-appb-000005
表六
其中,在步骤1023中,将通过步骤1021所转换得到的源IP地址填充到32位源IP地址字段,将转换得到的目的IP地址填充到32位目的IP地址字段。
可选的,组包分发信息还包括用于填充IP报文头的标识信息、分片序号、标志信息。
其中,标识信息用来填充IP报文头的16位标识字段,当数据报文由于长度超过网络的最大传输单元(MTU)而必须分片时,这个标识字段的值就被复制到所有的数据报的标识字段中。相同的标识字段的值使分片后的各数据报片最后能正确地重装成为原来的数据报。
标志信息用来填充3位标志字段。其中3位标志字段中的最低位用来表示后面是否还有分片的数据报。中间一位用来表示该数据报是否可以分片。
分片序号用来确定片偏移的值。在片偏移值确定之后,将片偏移值填充在13位片偏移字段中。片偏移值表示较长的分组在分片后,某分片在原分组中的相对位置。也就是说,相对用户数据字段的起点,该分片从何处开始。片偏移以8个字节为偏移单位。这就是说,每个分片的长度是8字节(64位)的整数倍。
其它字段的含义为本领域技术人员所熟知的内容,所以在此不再赘述。
传输层协议具体可以是用户数据报协议(英文:User Datagram Protocol,简称:UDP),还可以是传输控制协议(英文:Transmission Control Protocol,简称:TCP)。当然,在实际运用中,还可以是其它数据报文能够被封装在IP数据报文中传输的协议。因此,传输层协议报文头例如是UDP报文头或者是TCP报文头。
以下以UDP报文头为例进行说明。UDP报文头的格式如表七所示。
Figure PCTCN2015080439-appb-000006
表七
因此,在步骤1023中,将步骤1021中确定出的源端口号和目的端口号分别填充在源端口号字段和目的端口号字段中。
表七中的各个字段的含义为本领域技术人员所熟知的内容,所以在此不再赘述。
经过上述描述的过程,就将一个SRIO报文封装为能够在以太网传输的第二报文。
当获得第二报文后,该方法还包括:通过以太网发送第二报文。
进一步,在SRIO协议中规定了接收端必须在接收到发送端发送的报文时给发送端发送应答信息。如果应答信息跨越以太网,往返时延大,严重降低SRIO报文收发的流量。如果要保证流量,则会约束组网范围。另外,由于SRIO message的应答信息要求不丢失,而以太网是一个允许丢包的网络。如果应答信息丢失,会影响SRIO端点的稳定性和性能。因此,在通过以太网发送第二报文之后,该方法还包括:向第一报文的发送端发送应答信息,以通知该发送端第一报文已接收到。通过由报文转换装置代替报文接收端向报文发送端发送应答信息,避免了应答信息在以太网中的传递。
当报文接收端为例如图1中所示的以太网端点时,在步骤102中转换得到的目的IP地址和目的MAC地址均为以太网端点的真实地址,所以第二报文在以太网中传输,最终到达以太网端点。
当报文接收端为SRIO端点时,请继续参考图3所示,当报文转换装置10将第二报文通过以太网进行发送之后,第二报文在以太网中传递,最终到达目的器件,SRIO端点40所对应的报文转换装置30。然后报文转换装置30要对第二报文进行报文格式转换。以下将详细描述报文转换装置30如何将第二报文转换为符合SRIO协议的第三报文。
请参考图4所示,为本发明实施例提供的另一种报文转换方法的流程图。该方法包括:
步骤201:接收第二报文;第二报文包括以太网报文头、IP报文头、传输层协议报文头以及数据字段;以太网报文头包括源MAC地址和目的MAC地址;IP报文头包括源IP地址和目的IP地址;传输层协议报文头包括源端口号和目的端口号;数据字段包括数据;
步骤202:根据第二报文获得第三报文;其中,第三报文符合SRIO协议。
具体的,步骤202可以包括:将源MAC地址、源IP地址转换为源器件ID号;将目的MAC地址、目的IP地址转换为目的器件ID号;根据源端口号和目的端口号分别确定源收发线程和目的收发线程;将所述数据封装为第三报文;将源器件ID号、目的器件ID号、源收发线程和目的收发线程填充在第三报文中。
具体来说,第二报文例如是从报文转换装置10发送过来的。
本实施例中的IP地址和MAC地址映射为器件ID号,为前述描述的将器件ID号转换为IP地址和MAC地址的逆过程。报文转换装置30也维护有一张如表二所示的地址映射表,只要通过查表即可将IP地址、MAC地址转换为器件ID号。对应的,将端口号确定为收发线程,或者是通过某种规则将端口号再逆映射为收发线程。
可选的,该方法还包括:将IP报文头中与分片相关的信息和标识字段中 的标识内容也封装在第三报文中。其中,与分片相关的信息例如包括标志字段中的最低位和中间一位、片偏移字段中的值。
可选的,与分片相关的信息和标识内容被封装在第三报文的数据载荷域中。
当接收端的SRIO端点接收到第三报文时,可以根据分片相关的信息和标识内容对第三报文中的数据进行处理。举例来说,可以将所有分片按照顺序组成一个完整的数据。
可选的,在步骤202之后,该方法还包括:将第三报文发送给目的器件ID号对应的SRIO端点。
进一步,在发送第三报文之后,如果目的器件ID号对应的SRIO端点(如图3中的SRIO端点40)接收到报文之后,还向报文转换装置发送应答信息,所以对应的,报文转换装置接收目的器件ID号对应的SRIO端点发送的应答信息。
进一步,如果报文转换装置在预定时长内未接收到应答信息,就重新发送第三报文。可以重复该过程,直至收到应答信息为止。
以上描述了一个SRIO message或者是数据流(Datastream)从源器件,SRIO端点20跨越以太网发送至目的器件,SRIO端点40的完整过程。
在现有技术中,直接内存读写(英文:Direct IO,简称:DIO)数据类型并没有邮箱号和邮件号,所以无法用现有技术中方法进行报文转换。以下将描述本发明实施例中,SRIO协议中DIO数据类型的报文转换过程。请参考图5所示,为本发明实施例中再一报文转换方法的流程图。该方法包括:
步骤301:接收无应答写操作(NWRITE)报文;所述NWRITE报文中包含数据、源器件ID号、目的器件ID号以及所述数据在目的器件ID号对应的目的器件上的存储器的存储地址;
步骤302:根据NWRITE报文获得以太网远程直接内存读写(英文:Remote Direct Memory Access,简称:RDMA)报文。其中,以太网RDMA报文包括以太网报文头、IP报文头和数据载荷字段。以太网报文头包括与源器件ID 号对应的源MAC地址和与目的器件ID号对应的目的MAC地址。IP报文头包括与源器件ID对应的源IP地址和与目的器件ID号对应的目的IP地址。数据载荷字段包括所述存储地址和所述数据。
具体的,步骤302可以包括:将源器件ID号转换为源IP地址、源MAC地址;将目的器件ID号转换为目的IP地址、目的MAC地址;将所述存储地址和数据封装为以太网RDMA)文;将源MAC地址和目的MAC地址填充在以太网报文头中,将源IP地址和目的IP地址填充在IP报文头中,将所述存储地址和数据填充在数据载荷字段。
具体来说,NWRITE报文为直接IO的一种传输格式。是一个写操作,但不要求接收端响应。请参考图6所示,为本发明实施例中的方法的一个应用场景。假设SRIO端点60想要将一个数据写入SRIO端点80。SRIO端点60就可以发送NWRITE报文。NWRITE报文包括所要写入的数据、源器件ID号、目的器件ID号,例如SRIO端点60和SRIO端点80的器件ID号。还包括数据将要写入的目的器件的存储器上的存储地址。可选的,该存储地址可以位于NWRITE报文的包头中。在实际运用中,NWRITE报文还包括其它字段,为本领域技术人员所熟知的内容,所以在此不再赘述。
然后NWRITE报文到达报文转换装置50。报文转换装置50将源器件ID号映射为源IP地址和源MAC地址,将目的器件ID号映射为目的IP地址和目的MAC地址。具体来说,地址映射的过程与步骤102中所描述的类似,所以在此不再赘述。
进一步,在步骤302之后,该方法还包括:通过以太网发送以太网RDMA报文。然后以太网RDMA报文跨越以太网,到达报文转换装置70。接下来将描述报文转换装置70如何将以太网RDMA报文转换为NWRITE报文。
请参考图7所示,为本发明实施例提供的另一种报文转换方法的流程图。该方法包括:
步骤401:接收以太网RDMA报文;以太网RDMA报文包括以太网报文头、IP报文头和数据载荷字段;其中,以太网报文头包括源MAC地址和目 的MAC地址,IP报文头包括源IP地址和目的IP地址,数据载荷字段包括数据以及数据将要写入的目的器件的存储器上的存储地址;
步骤402:根据以太网RDMA报文获得NWRITE报文。其中,NWRITE报文包括报文头以及数据载荷字段。所述报文头包括所述存储地址,与源IP地址和源MAC地址对应的源器件ID号,与目的IP地址和目的MAC地址对应的目的器件的目的器件ID号。数据载荷字段包括所述数据。
具体的,步骤402可以包括:将源IP地址和源MAC地址映射为源器件ID号,将目的IP地址和目的MAC地址映射为所述目的器件的目的器件ID号;将所述存储地址和数据封装为NWRITE报文,其中,将所述存储地址、源器件ID号和目的器件ID号填充在NWRITE报文的报文头中,将所述数据填充在NWRITE报文的数据载荷字段。
具体来说,将IP地址和MAC地址映射为器件ID号的过程为前述将器件ID号映射为IP地址和MCA地址的逆过程,所以在此不再赘述。
进一步,在步骤402之后,该方法还包括:将NWRITE报文发送给所述目的器件。目的器件如图6中所示的SRIO端点80。
可选的,在实际运用中,图2、图4、如5和图7中所示的报文转换方法可以通过硬件电路实现,如此可以解决大流量的SRIO报文(10G~40Gbps以上)以及低时延(1us~2us以下)的报文转换性能指标。
由以上描述可以看出,因为本发明实施例是直接通过器件ID号与MAC地址和IP地址对应,进而将NWRITE报文转换为能够在以太网中传输的报文,解决了现有技术中无法将NWRITE报文转换为能够在以太网传输的报文的技术问题。进一步,本发明实施例中的转换方法理论上可以寻址4G个SRIO器件,所以能够满足大范围组网的场景。
基于同一发明构思,参考图8所示,为本发明实施例提供的一种报文转换装置的功能框图,该报文转换装置包括:接收单元501和处理单元502。
可选的,该报文转换装置可以用于实现本发明图2,图4,图5和图7所示的报文转换方法中的至少一种。具体的配置可以依据实际需要确定。可以 理解的是,当该报文转换装置用于实现图2至图7所示的报文转换方法的至少两种时,可以包括如下情况:第一种,该报文转换装置既可以实现图2所示的报文转换方法,将SRIO message或数据流类型的报文转换为能够在以太网传输的报文,又可以实现图5所示的报文转换方法,将NWRITE报文转换为能够在以太网传输的报文。第二种,该报文转换装置既可以实现图4所示的报文转换方法,将以太网报文转换为SRIO message或数据流类型的报文,又可以实现图7所示的报文转换方法,将以太网RDMA报文转换为NWRITE报文。第三种,该报文转换装置既可以实现图2所示的报文转换方法,将SRIO message或数据流类型的报文转换为能够在以太网传输的报文,又可以按照图4所示的报文转换方法将接收到的以太网报文转换为SRIO message或数据流类型的报文。第四种,该报文转换装置既可以实现图5所示的报文转换方法,将NWRITE报文转换为能够在以太网传输的报文,也可以按照图7所示的报文转换方法将接收到的以太网RDMA报文转换为NWRITE报文。第五种,第一种至第四种的结合。
具体的,该报文转换装置用于实现本发明图2所示的报文转换方法时,接收单元501可以用于实施图2所示方法的步骤101。处理单元502可以用于实施图2所示方法的步骤102。
具体的,该报文转换装置用于实现本发明图4所示的报文转换方法时,接收单元501用于实施图4所示方法的步骤201。处理单元502用于实施图4所示方法的步骤202。
具体的,该报文转换装置用于实现本发明图5所示的报文转换方法时,接收单元501用于实施图5所示方法的步骤301。处理单元502用于实施图5所示方法的步骤302。
具体的,该报文装置用于实现本发明图7所示的报文转换方法时,接收单元501用于实施图7所示方法的步骤401。处理单元502用于实施图7所示方法的步骤402。
前述图2,图4,图5或图7所示的实施例中的报文转换方法中的各种变 化方式和具体实例同样适用于本实施例的报文转换装置,通过前述对报文转换方法的详细描述,本领域技术人员可以清楚的知道本实施例中报文转换装置的实施方法,所以为了说明书的简洁,在此不再详述。
基于同一发明构思,参考图9所示,为本发明实施例提供的一种报文转换设备的结构框图。该报文转换设备包括:处理电路601、发送器602、接收器603、存储器604、SRIO接口605和以太网接口606。处理器601具体可以是特定应用集成电路(英文:Application Specific Integrated Circuit,简称:ASIC),可以是一个或多个用于控制程序执行的集成电路,可以是使用现场可编程门阵列(英文:Field Programmable Gate Array,简称:FPGA)开发的硬件电路。存储器604的数量可以是一个或多个。存储器604可以包括只读存储器(英文:Read Only Memory,简称:ROM)、随机存取存储器(英文:Random Access Memory,简称:RAM)和磁盘存储器。这些存储器、接收器603和发送器602通过总线与处理电路601相连接。接收器603和发送器602用于与外部设备进行网络通信,具体可以通过以太网、无线接入网、无线局域网等网络与外部设备进行通信。接收器603和发送器602可以是物理上相互独立的两个元件,也可以是物理上的同一个元件。
可选的,该报文转换设备可以用于实现本发明图2,图4,图5和图7所示的报文转换方法中的至少一种。具体的配置可以依据实际需要确定。可以理解的是,当该报文转换设备用于实现图2至图7所示的报文转换方法的至少两种时,可以包括如下情况:第一种,该报文转换设备既可以实现图2所示的报文转换方法,将SRIO message或数据流类型的报文转换为能够在以太网传输的报文,又可以实现图5所示的报文转换方法,将NWRITE报文转换为能够在以太网传输的报文。第二种,该报文转换设备既可以实现图4所示的报文转换方法,将以太网报文转换为SRIO message或数据流类型的报文,又可以实现图7所示的报文转换方法,将以太网RDMA报文转换为NWRITE报文。第三种,该报文转换设备既可以实现图2所示的报文转换方法,将SRIO message或数据流类型的报文转换为能够在以太网传输的报文,又可以按照图 4所示的报文转换方法将接收到的以太网报文转换为SRIO message或数据流类型的报文。第四种,该报文转换设备既可以实现图5所示的报文转换方法,将NWRITE报文转换为能够在以太网传输的报文,也可以按照图7所示的报文转换方法将接收到的以太网RDMA报文转换为NWRITE报文。第五种,第一种至第四种的结合。
具体的,当该报文转换设备用于实现本发明图2所示的报文转换方法时,接收器603,用于通过SRIO接口605接收第一报文;第一报文符合SRIO协议;第一报文的数据载荷域填充有数据;第一报文的数据载荷域包括数据;所述第一报文中包含源器件标识ID号、目的器件ID号以及组包分发信息;所述组包分发信息包括源收发线程和目的收发线程;处理电路601,用于根据所述第一报文获得第二报文;其中,所述第二报文包括以太网报文头、网络协议IP报文头、传输层协议报文头以及数据字段,所述以太网报文头包括与所述源器件ID号对应的源媒体接入控制MAC地址,以及与所述目的器件ID号对应的目的MAC地址;所述IP报文头包括与所述源器件ID号对应的源IP地址,以及与所述目的器件ID对应的目的IP地址;所述传输层协议报文头包括与所述源收发线程对应的源端口号,以及与所述目的收发线程对应的目的端口号;所述数据字段包括所述数据;发送器602,用于通过以太网接口606将第二报文发送至以太网。
可选的,发送器602还用于通过SRIO接口605向第一报文的发送端发送应答信息。
可选的,组包分发信息还包括标识信息、分片序号以及标志信息;所述IP报文头还包括标识字段、标志字段和片偏移字段,所述标识字段中包括与所述标识信息对应的信息;所述标志字段中包括与所述标志信息对应的信息;所述片偏移字段中包括与所述分配序号对应的信息。
具体的,当该报文转换设备用于实现本发明图4所示的报文转换方法时,具体来说,接收器603,用于通过以太网接口606接收第二报文;所述第二报文包括以太网报文头、网络协议IP报文头、传输层协议报文头以及数据字段; 所述以太网报文头包括源媒体接入控制MAC地址和目的MAC地址;所述IP报文头包括源IP地址和目的IP地址;所述传输层协议报文头包括源端口号和目的端口号;所述数据字段包括数据;处理电路601,用于根据所述第二报文获得第三报文;其中,所述第三报文符合串行高速输入输出SRIO协议,所述第三报文包括源器件标识ID号、目的器件ID号、源收发线程、目的收发线程以及所述数据;所述源器件ID号与所述源MAC地址和所述源IP地址对应;所述目的器件ID号与所述目的MAC地址和所述目的IP地址对应;所述源收发线程与所述源端口号对应;所述目的收发线程与所述目的端口号对应;发送器602,用于通过SRIO接口605根据目的器件ID号发送第三报文。
可选的,接收器603还用于:通过SRIO接口605接收目的器件ID号对应的目的器件发送的应答信息。
具体的,当该报文转换设备用于实现本发明图5所示的报文转换方法时,具体来说,接收器603用于通过SRIO接口605接收无应答写操作NWRITE报文;NWRITE报文中包含数据、源器件ID号、目的器件ID号以及所述数据在目的器件ID号对应的目的器件上的存储器的存储地址;处理电路601,用于根据所述NWRITE报文获得以太网远程直接内存读写RDMA报文;其中,所述以太网RDMA报文包括以太网报文头、网络协议IP报文头和数据载荷字段;所述以太网报文头包括与所述源器件ID号对应的源媒体接入控制MAC地址和与所述目的器件ID号对应的目的MAC地址;所述IP报文头包括与所述源器件ID对应的源IP地址和与所述目的器件ID号对应的目的IP地址;所述数据载荷字段包括所述存储地址和所述数据;发送器602,用于通过以太网接口606发送以太网RDMA报文。
具体的,当该报文转换装置用于实现本发明图7所示的报文转换方法时,具体来说,接收器603,用于通过以太网接口606接收以太网远程直接内存读写RDMA报文;以太网RDMA报文包括以太网报文头、网络协议IP报文头和数据载荷字段;其中,所述以太网报文头包括源媒体接入控制MAC地址和目的MAC地址,所述IP报文头包括源IP地址和目的IP地址,所述数据载 荷字段包括数据以及数据将要写入的目的器件的存储器上的存储地址;处理电路601,用于根据所述以太网RDMA报文获得无应答写操作NWRITE报文;其中,所述NWRITE报文包括报文头以及数据载荷字段;所述报文头包括所述存储地址,与所述源IP地址和所述源MAC地址对应的源器件标识ID号,与所述目的IP地址和所述目的MAC地址对应的所述目的器件的目的器件ID号;所述数据载荷字段包括所述数据;发送器602,用于通过SRIO接口605发送NWRITE报文。
前述图2,图4,图5或图7所示的实施例中的报文转换方法中的各种变化方式和具体实例同样适用于本实施例的报文转换设备,通过前述对报文转换方法的详细描述,本领域技术人员可以清楚的知道本实施例中报文转换设备的实施方法,所以为了说明书的简洁,在此不再详述。
在以上各实施例中,该报文转换设备可以为基带单元BBU、以太网中的交换机或者网关设备,具体视实现需要而定,在此不予限定。
基于同一发明构思,参考图10所示,为本发明实施例提供的一种报文传输装置的功能框图,本实施例中所涉及的术语的含义请参考前述实施例中所描述的内容。该报文传输装置包括:获得单元701,用于获得数据;处理单元702,用于获得关于所述数据的组包分发信息;组包分发信息包括源收发线程和目的收发线程;根据所述数据和组包分发信息获得第一报文,第一报文符合SRIO协议。
可选的,第一报文的数据载荷域包括组包分发信息。
可选的,组包分发信息还包括标识信息、分片序号以及标志信息,所述标识信息、分片序号以及标志信息分别用于填充网络协议IP报文头中的标识字段、片偏移字段以及标志字段。
前述实施例中的各种变化方式和具体实例同样适用于本实施例的报文传输装置,通过前述实施例中的详细描述,本领域技术人员可以清楚的知道本实施例中报文传输装置的实施方法,所以为了说明书的简洁,在此不再详述。
基于同一发明构思,本发明实施例提供一种SRIO端点,包括如图10及 其实施例所描述的报文传输装置以及输出端口。输出端口用于输出第一报文。
可选的,SRIO端点为处理芯片,例如CPU、DSP、基带芯片。
可选的,SRIO端点具体可以是一个支持SRIO接口的设备。
申请实施例中提供的一个或多个技术方案,至少具有如下技术效果或优点:
本发明实施例中,通过将器件ID号映射为IP地址和MAC地址,源目的收发线程映射源目的端口号,将符合SRIO协议的第一报文转换为能够在以太网中传输的第二报文。相比现有技术中将MAC地址和邮箱号和邮件号相关联的方案,本发明实施例是直接通过器件ID对应MAC地址和IP地址,所以对于32位IP地址的情况,本发明实施例中的转换方法理论上可以寻址4G个SRIO器件,所以远远大于现有技术中关联邮箱号和邮件号的寻址方案的组网范围。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器 中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (25)

  1. 一种报文转换方法,其特征在于,包括:
    接收第一报文;所述第一报文符合串行高速输出输出SRIO协议;所述第一报文的数据载荷域包括数据;所述第一报文中包含源器件标识ID号、目的器件ID号以及组包分发信息;所述组包分发信息包括源收发线程和目的收发线程;
    根据所述第一报文获得第二报文;
    其中,所述第二报文包括以太网报文头、网络协议IP报文头、传输层协议报文头以及数据字段,所述以太网报文头包括与所述源器件ID号对应的源媒体接入控制MAC地址,以及与所述目的器件ID号对应的目的MAC地址;所述IP报文头包括与所述源器件ID号对应的源IP地址,以及与所述目的器件ID对应的目的IP地址;所述传输层协议报文头包括与所述源收发线程对应的源端口号,以及与所述目的收发线程对应的目的端口号;所述数据字段包括所述数据。
  2. 如权利要求1所述的方法,其特征在于,在根据所述第一报文获得第二报文之后,所述方法还包括:
    根据所述目的IP地址以及所述目的MAC地址发送所述第二报文;
    向所述第一报文的发送端发送应答信息。
  3. 如权利要求1或2所述的方法,其特征在于,所述组包分发信息还包括标识信息、分片序号以及标志信息;所述IP报文头还包括标识字段、标志字段和片偏移字段,所述标识字段中包括与所述标识信息对应的信息;所述标志字段中包括与所述标志信息对应的信息;所述片偏移字段中包括与所述分配序号对应的信息。
  4. 一种报文转换方法,其特征在于,包括:
    接收第二报文;所述第二报文包括以太网报文头、网络协议IP报文头、传输层协议报文头以及数据字段;所述以太网报文头包括源媒体接入控制 MAC地址和目的MAC地址;所述IP报文头包括源IP地址和目的IP地址;所述传输层协议报文头包括源端口号和目的端口号;所述数据字段包括数据;
    根据所述第二报文获得第三报文;其中,所述第三报文符合串行高速输入输出SRIO协议,所述第三报文包括源器件标识ID号、目的器件ID号、源收发线程、目的收发线程以及所述数据;所述源器件ID号与所述源MAC地址和所述源IP地址对应;所述目的器件ID号与所述目的MAC地址和所述目的IP地址对应;所述源收发线程与所述源端口号对应;所述目的收发线程与所述目的端口号对应。
  5. 如权利要求4所述的方法,其特征在于,在根据所述第二报文获得第三报文之后,所述方法还包括:
    根据所述目的器件ID号发送所述第三报文;
    接收所述目的器件ID号对应的目的器件发送的应答信息。
  6. 一种报文转换方法,其特征在于,包括:
    接收无应答写操作NWRITE报文;所述NWRITE报文中包含数据、源器件标识ID号、目的器件ID号以及所述数据在所述目的器件ID号对应的目的器件上的存储器的存储地址;
    根据所述NWRITE报文获得以太网远程直接内存读写RDMA报文;其中,所述以太网RDMA报文包括以太网报文头、网络协议IP报文头和数据载荷字段;所述以太网报文头包括与所述源器件ID号对应的源媒体接入控制MAC地址和与所述目的器件ID号对应的目的MAC地址;所述IP报文头包括与所述源器件ID对应的源IP地址和与所述目的器件ID号对应的目的IP地址;所述数据载荷字段包括所述存储地址和所述数据。
  7. 一种报文转换方法,其特征在于,包括:
    接收以太网远程直接内存读写RDMA报文;所述以太网RDMA报文包括以太网报文头、网络协议IP报文头和数据载荷字段;其中,所述以太网报文头包括源媒体接入控制MAC地址和目的MAC地址,所述IP报文头包括源IP地址和目的IP地址,所述数据载荷字段包括数据以及数据将要写入的目 的器件的存储器上的存储地址;
    根据所述以太网RDMA报文获得无应答写操作NWRITE报文;其中,所述NWRITE报文包括报文头以及数据载荷字段;所述报文头包括所述存储地址,与所述源IP地址和所述源MAC地址对应的源器件标识ID号,与所述目的IP地址和所述目的MAC地址对应的所述目的器件的目的器件ID号;所述数据载荷字段包括所述数据。
  8. 一种报文传输方法,其特征在于,包括:
    获得数据;
    获得关于所述数据的组包分发信息;所述组包分发信息包括源收发线程和目的收发线程;
    根据所述数据和所述组包分发信息获得第一报文,所述第一报文符合串行高速输入输出SRIO协议。
  9. 如权利要求8所述的方法,其特征在于,所述第一报文的数据载荷域包括所述组包分发信息。
  10. 如权利要求8或9所述的方法,其特征在于,所述组包分发信息还包括标识信息、分片序号以及标志信息,所述标识信息、分片序号以及标志信息分别用于填充网络协议IP报文头中的标识字段、片偏移字段以及标志字段。
  11. 一种报文转换设备,其特征在于,包括:
    串行高速输入输出SRIO接口;
    接收器,用于通过所述SRIO接口接收第一报文;所述第一报文符合串行高速输出输出SRIO协议;所述第一报文的数据载荷域包括数据;所述第一报文中包含源器件标识ID号、目的器件ID号以及组包分发信息;所述组包分发信息包括源收发线程和目的收发线程;
    处理电路,用于根据所述第一报文获得第二报文;其中,所述第二报文包括以太网报文头、网络协议IP报文头、传输层协议报文头以及数据字段,所述以太网报文头包括与所述源器件ID号对应的源媒体接入控制MAC地址, 以及与所述目的器件ID号对应的目的MAC地址;所述IP报文头包括与所述源器件ID号对应的源IP地址,以及与所述目的器件ID对应的目的IP地址;所述传输层协议报文头包括与所述源收发线程对应的源端口号,以及与所述目的收发线程对应的目的端口号;所述数据字段包括所述数据;
    以太网接口;
    发送器,用于通过所述以太网接口将所述第二报文发送至以太网。
  12. 如权利要求11所述的设备,其特征在于,所述发送器还用于通过所述SRIO接口向所述第一报文的发送端发送应答信息。
  13. 如权利要求11或12所述的设备,其特征在于,所述组包分发信息还包括标识信息、分片序号以及标志信息;所述IP报文头还包括标识字段、标志字段和片偏移字段,所述标识字段中包括与所述标识信息对应的信息;所述标志字段中包括与所述标志信息对应的信息;所述片偏移字段中包括与所述分配序号对应的信息。
  14. 如权利要求11-13任一项所述的设备,其特征在于,所述设备为基带单元BBU、以太网中的交换机或者网关设备。
  15. 一种报文转换设备,其特征在于,包括:
    以太网接口;
    接收器,用于通过所述以太网接口接收第二报文;所述第二报文包括以太网报文头、网络协议IP报文头、传输层协议报文头以及数据字段;所述以太网报文头包括源媒体接入控制MAC地址和目的MAC地址;所述IP报文头包括源IP地址和目的IP地址;所述传输层协议报文头包括源端口号和目的端口号;所述数据字段包括数据;
    处理电路,用于根据所述第二报文获得第三报文;其中,所述第三报文符合串行高速输入输出SRIO协议,所述第三报文包括源器件标识ID号、目的器件ID号、源收发线程、目的收发线程以及所述数据;所述源器件ID号与所述源MAC地址和所述源IP地址对应;所述目的器件ID号与所述目的MAC地址和所述目的IP地址对应;所述源收发线程与所述源端口号对应; 所述目的收发线程与所述目的端口号对应;
    串行高速输入输出SRIO接口;
    发送器,用于通过所述SRIO接口根据所述目的器件ID号发送所述第三报文。
  16. 如权利要求15所述的设备,其特征在于,所述接收器还用于:通过所述SRIO接口接收所述目的器件ID号对应的目的器件发送的应答信息。
  17. 如权利要求15或16所述的设备,其特征在于,所述设备为基带单元BBU、以太网中的交换机或者网关设备。
  18. 一种报文转换设备,其特征在于,包括:
    串行高速输入输出SRIO接口;
    接收器,用于通过所述SRIO接口接收无应答写操作NWRITE报文;所述NWRITE报文中包含数据、源器件标识ID号、目的器件ID号以及所述数据在所述目的器件ID号对应的目的器件上的存储器的存储地址;
    处理电路,用于根据所述NWRITE报文获得以太网远程直接内存读写RDMA报文;其中,所述以太网RDMA报文包括以太网报文头、网络协议IP报文头和数据载荷字段;所述以太网报文头包括与所述源器件ID号对应的源媒体接入控制MAC地址和与所述目的器件ID号对应的目的MAC地址;所述IP报文头包括与所述源器件ID对应的源IP地址和与所述目的器件ID号对应的目的IP地址;所述数据载荷字段包括所述存储地址和所述数据;
    以太网接口;
    发送器,用于通过所述以太网接口发送所述以太网RDMA报文。
  19. 如权利要求18所述的设备,其特征在于,所述设备为基带单元BBU、以太网中的交换机或者网关设备。
  20. 一种报文转换设备,其特征在于,包括:
    以太网接口;
    接收器,用于通过所述以太网接口接收以太网远程直接内存读写RDMA报文;所述以太网RDMA报文包括以太网报文头、网络协议IP报文头和数据 载荷字段;其中,所述以太网报文头包括源媒体接入控制MAC地址和目的MAC地址,所述IP报文头包括源IP地址和目的IP地址,所述数据载荷字段包括数据以及数据将要写入的目的器件的存储器上的存储地址;
    处理电路,用于根据所述以太网RDMA报文获得无应答写操作NWRITE报文;其中,所述NWRITE报文包括报文头以及数据载荷字段;所述报文头包括所述存储地址,与所述源IP地址和所述源MAC地址对应的源器件标识ID号,与所述目的IP地址和所述目的MAC地址对应的所述目的器件的目的器件ID号;所述数据载荷字段包括所述数据;
    串行高速输入输出SRIO接口;
    发送器,用于通过所述SRIO接口发送所述NWRITE报文。
  21. 如权利要求20所述的设备,其特征在于,所述设备为基带单元BBU、以太网中的交换机或者网关设备。
  22. 一种串行高速输入输出SRIO端点,其特征在于,包括:
    报文传输装置,用于获得数据;获得关于所述数据的组包分发信息;所述组包分发信息包括源收发线程和目的收发线程;根据所述数据和所述组包分发信息获得第一报文,所述第一报文符合串行高速输入输出SRIO协议;
    输出端口,用于输出所述第一报文。
  23. 如权利要求22所述的SRIO端点,其特征在于,所述SRIO端点为基带单元BBU中的中央处理器CPU、基带芯片或者数字信号处理DSP芯片。
  24. 如权利要求22或23所述的SRIO端点,其特征在于,所述第一报文的数据载荷域包括所述组包分发信息。
  25. 如权利要求22-24任一项所述的SRIO端点,其特征在于,所述组包分发信息还包括标识信息、分片序号以及标志信息,所述标识信息、分片序号以及标志信息分别用于填充网络协议IP报文头中的标识字段、片偏移字段以及标志字段。
PCT/CN2015/080439 2015-05-30 2015-05-30 一种报文转换方法及装置 Ceased WO2016191990A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2015/080439 WO2016191990A1 (zh) 2015-05-30 2015-05-30 一种报文转换方法及装置
CN201580056589.XA CN107079017B (zh) 2015-05-30 2015-05-30 一种报文转换方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/080439 WO2016191990A1 (zh) 2015-05-30 2015-05-30 一种报文转换方法及装置

Publications (1)

Publication Number Publication Date
WO2016191990A1 true WO2016191990A1 (zh) 2016-12-08

Family

ID=57440157

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/080439 Ceased WO2016191990A1 (zh) 2015-05-30 2015-05-30 一种报文转换方法及装置

Country Status (2)

Country Link
CN (1) CN107079017B (zh)
WO (1) WO2016191990A1 (zh)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108055290A (zh) * 2018-02-07 2018-05-18 天津芯海创科技有限公司 异构协议网络系统及其数据交换方法
CN108733598A (zh) * 2018-05-07 2018-11-02 济南浪潮高新科技投资发展有限公司 一种数据传输方法和数据传输装置
CN110377022A (zh) * 2018-11-21 2019-10-25 天津京东深拓机器人科技有限公司 自动导引运输车的控制方法和装置
CN111367844A (zh) * 2019-03-13 2020-07-03 苏州库瀚信息科技有限公司 有多个异构网络接口端口的存储控制器的系统、方法和装置
CN111800371A (zh) * 2019-07-05 2020-10-20 维沃移动通信有限公司 数据处理方法、发送端和接收端
CN113794616A (zh) * 2021-08-31 2021-12-14 新华三信息安全技术有限公司 一种报文转发方法及设备
CN114844842A (zh) * 2022-05-07 2022-08-02 湖南戎腾网络科技有限公司 数据传输方法、装置、电子设备及可读存储介质
CN114978966A (zh) * 2022-07-04 2022-08-30 华东师范大学 一种网络报文发包装置
CN115086445A (zh) * 2022-06-10 2022-09-20 重庆邮电大学 一种POWERLINK与IPv6网络的协议转换方法
CN115086808A (zh) * 2022-05-30 2022-09-20 上海赛治信息技术有限公司 一种大规模srio高速信息交换系统及其信息交换方法
CN115842870A (zh) * 2022-11-24 2023-03-24 井芯微电子技术(天津)有限公司 Srio报文转换方法、处理器和设备
CN116170404A (zh) * 2023-02-17 2023-05-26 通明智云(北京)科技有限公司 一种基于dpdk的数据转发方法及装置
WO2024234858A1 (zh) * 2023-05-16 2024-11-21 中兴通讯股份有限公司 数据传输方法和装置及存储介质

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108600097B (zh) * 2018-04-20 2020-09-22 闫晓峰 可多路径传输数据的通讯设备、数据通讯网络系统及数据通讯方法
CN114138337B (zh) * 2021-11-23 2025-08-19 中国建设银行股份有限公司 一种指令转换方法、装置及设备
CN115988103B (zh) * 2022-11-25 2024-09-03 乾讯信息技术(无锡)有限公司 重新构造网络ip报文实现ip非分片化方法
CN117395327B (zh) * 2023-12-12 2024-03-12 浙江国利信安科技有限公司 以太网接入epa网络的方法、设备和计算机可读存储介质
CN119697281B (zh) * 2024-11-18 2026-01-27 天翼云科技有限公司 源端信息透传方法、报文处理方法、装置、设备及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101562559A (zh) * 2008-04-15 2009-10-21 大唐移动通信设备有限公司 一种串行Rapid IO链路数据传输的方法及装置
CN102035751A (zh) * 2011-01-20 2011-04-27 大唐移动通信设备有限公司 一种数据的传输方法和设备
CN102880573A (zh) * 2012-09-04 2013-01-16 武汉邮电科学研究院 一种基于Linux系统的串行RapidIo数据传输方法
CN103401775A (zh) * 2013-07-18 2013-11-20 杭州华为数字技术有限公司 源报文转换装置及其报文转换方法、目标报文转换装置及其报文转换方法
US8949501B1 (en) * 2010-10-31 2015-02-03 Integrated Device Technology, Inc. Method and apparatus for a configurable packet routing, buffering and scheduling scheme to optimize throughput with deadlock prevention in SRIO-to-PCIe bridges

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090086750A1 (en) * 2007-09-27 2009-04-02 Integrated Device Technology, Inc. Non-Random Access Rapid I/O Endpoint In A Multi-Processor System
CN102438121A (zh) * 2011-11-22 2012-05-02 中兴通讯股份有限公司 数据传输方法、系统及串行高速输入输出口网关设备
CN203590259U (zh) * 2013-11-22 2014-05-07 中国电子科技集团公司第三十二研究所 万兆以太网与RapidIO网络转换控制器

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101562559A (zh) * 2008-04-15 2009-10-21 大唐移动通信设备有限公司 一种串行Rapid IO链路数据传输的方法及装置
US8949501B1 (en) * 2010-10-31 2015-02-03 Integrated Device Technology, Inc. Method and apparatus for a configurable packet routing, buffering and scheduling scheme to optimize throughput with deadlock prevention in SRIO-to-PCIe bridges
CN102035751A (zh) * 2011-01-20 2011-04-27 大唐移动通信设备有限公司 一种数据的传输方法和设备
CN102880573A (zh) * 2012-09-04 2013-01-16 武汉邮电科学研究院 一种基于Linux系统的串行RapidIo数据传输方法
CN103401775A (zh) * 2013-07-18 2013-11-20 杭州华为数字技术有限公司 源报文转换装置及其报文转换方法、目标报文转换装置及其报文转换方法

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108055290B (zh) * 2018-02-07 2020-08-18 天津芯海创科技有限公司 异构协议网络系统及其数据交换方法
CN108055290A (zh) * 2018-02-07 2018-05-18 天津芯海创科技有限公司 异构协议网络系统及其数据交换方法
CN108733598A (zh) * 2018-05-07 2018-11-02 济南浪潮高新科技投资发展有限公司 一种数据传输方法和数据传输装置
CN110377022B (zh) * 2018-11-21 2023-08-04 北京京东乾石科技有限公司 自动导引运输车的控制方法和装置
CN110377022A (zh) * 2018-11-21 2019-10-25 天津京东深拓机器人科技有限公司 自动导引运输车的控制方法和装置
CN111367844A (zh) * 2019-03-13 2020-07-03 苏州库瀚信息科技有限公司 有多个异构网络接口端口的存储控制器的系统、方法和装置
CN111367844B (zh) * 2019-03-13 2020-12-15 苏州库瀚信息科技有限公司 有多个异构网络接口端口的存储控制器的系统、方法和装置
CN111800371A (zh) * 2019-07-05 2020-10-20 维沃移动通信有限公司 数据处理方法、发送端和接收端
CN113794616A (zh) * 2021-08-31 2021-12-14 新华三信息安全技术有限公司 一种报文转发方法及设备
CN114844842A (zh) * 2022-05-07 2022-08-02 湖南戎腾网络科技有限公司 数据传输方法、装置、电子设备及可读存储介质
CN115086808A (zh) * 2022-05-30 2022-09-20 上海赛治信息技术有限公司 一种大规模srio高速信息交换系统及其信息交换方法
CN115086445A (zh) * 2022-06-10 2022-09-20 重庆邮电大学 一种POWERLINK与IPv6网络的协议转换方法
CN115086445B (zh) * 2022-06-10 2023-12-26 重庆邮电大学 一种POWERLINK与IPv6网络的协议转换方法
CN114978966A (zh) * 2022-07-04 2022-08-30 华东师范大学 一种网络报文发包装置
CN114978966B (zh) * 2022-07-04 2024-01-09 华东师范大学 一种网络报文发包装置
CN115842870A (zh) * 2022-11-24 2023-03-24 井芯微电子技术(天津)有限公司 Srio报文转换方法、处理器和设备
CN116170404A (zh) * 2023-02-17 2023-05-26 通明智云(北京)科技有限公司 一种基于dpdk的数据转发方法及装置
CN116170404B (zh) * 2023-02-17 2023-09-29 通明智云(北京)科技有限公司 一种基于dpdk的数据转发方法及装置
WO2024234858A1 (zh) * 2023-05-16 2024-11-21 中兴通讯股份有限公司 数据传输方法和装置及存储介质

Also Published As

Publication number Publication date
CN107079017A (zh) 2017-08-18
CN107079017B (zh) 2020-01-17

Similar Documents

Publication Publication Date Title
CN107079017B (zh) 一种报文转换方法及装置
US11296807B2 (en) Techniques to operate a time division multiplexing(TDM) media access control (MAC)
US8649387B2 (en) Method and system for fibre channel and ethernet interworking
CN105791214B (zh) 一种RapidIO报文和以太网报文之间的转换方法和设备
CN110022264B (zh) 控制网络拥塞的方法、接入设备和计算机可读存储介质
CN112243046B (zh) 通信方法和网卡
WO2019019906A1 (zh) 一种通信方法、设备及存储介质
CN115701063B (zh) 一种报文传输方法以及通信装置
CN107493238A (zh) 一种网络拥塞控制方法、设备及系统
CN117221225A (zh) 一种网络拥塞通知方法、装置及存储介质
CN105577566A (zh) 报文汇聚传输的方法、装置和系统
AU2016202660B2 (en) Techniques for forwarding or receiving data segments associated with a large data packet
CN114066707A (zh) 通用图形处理系统、计算装置和分布式系统
CN101425960B (zh) 实现负载均分的方法和设备
CN108809549A (zh) 一种传输数据的方法及设备
CN113938443B (zh) 一种无线物联网协议交换机
WO2018045521A1 (zh) 无线网络中传输信令的方法和装置
WO2022042351A1 (zh) 接口数据的处理方法、发送端设备和接收端设备
WO2022042396A1 (zh) 数据传输方法和系统、芯片
US20230412501A1 (en) Data processing method and apparatus, and chip
US8583822B2 (en) Method and system for minimum frame size support for a communication protocol encapsulated over Ethernet
WO2023083175A1 (zh) 报文传输方法及通信装置
CN110830153A (zh) 接收码块流的方法、发送码块流的方法和通信装置
CN109379342B (zh) 基于udp网络协议的上位机与dsp数据传输方法
WO2021213382A1 (zh) 数据传输的方法和装置

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: 15893653

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15893653

Country of ref document: EP

Kind code of ref document: A1