WO2016107122A1 - Method and device for converting between rapidio packet and ethernet packet - Google Patents

Method and device for converting between rapidio packet and ethernet packet Download PDF

Info

Publication number
WO2016107122A1
WO2016107122A1 PCT/CN2015/082978 CN2015082978W WO2016107122A1 WO 2016107122 A1 WO2016107122 A1 WO 2016107122A1 CN 2015082978 W CN2015082978 W CN 2015082978W WO 2016107122 A1 WO2016107122 A1 WO 2016107122A1
Authority
WO
WIPO (PCT)
Prior art keywords
rapidio
header
packet
ethernet
information
Prior art date
Application number
PCT/CN2015/082978
Other languages
French (fr)
Chinese (zh)
Inventor
汪立林
杜超
王仰锋
赵幸
刘凯
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016107122A1 publication Critical patent/WO2016107122A1/en

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

  • This document relates to the field of communication technologies, and in particular, to a method for converting a RapidIO message and an Ethernet message in a communication system and a corresponding message conversion device.
  • RapidIO (no Chinese terminology) is a high-performance, low pin count, packet-switched interconnect architecture pioneered by companies such as Motorola and Mercury. It is designed to meet the needs of future high-performance embedded systems. An open interconnect technology standard.
  • the RapidIO interconnect architecture is a high-performance interconnect technology based on packet switching. It is mainly used for internal interconnection of systems, supporting chip-to-chip and board-to-board communication, and has achieved performance levels of 1 Gbps to 60 Gbps.
  • Ethernet is a LAN networking technology.
  • the IEEE 802.3 standard gives the technical standard for Ethernet, which passes the payload to the destination correctly with enough header control information, making it the most popular LAN technology in the current application.
  • FIG. 1 is an architectural diagram of a RapidIO device interconnected with an Ethernet device through an Ethernet interface.
  • Figure 2 is an architectural diagram of a RapidIO device interconnected with a RapidIO device through an Ethernet interface.
  • the multiple RapidIO devices of the source system or the destination system in Figure 1 and Figure 2 are directly or indirectly connected to the RapidIO switching device. Between the RapidIO switching device and the Ethernet device interface, the packet conversion device completes the RapidIO packet and Ethernet. Conversion between messages.
  • the destination system or source system in FIG. 1 is an Ethernet device, and the destination system or source system structure of FIG.
  • RapidIO device 2 also includes a plurality of RapidIO devices, a RapidIO switching device, an Ethernet device interface, and a packet conversion device.
  • a RapidIO device such as a chip or a single board
  • This requires converting the internal RapidIO message data into Ethernet message data and interconnecting through the Ethernet interface.
  • the traditional message conversion scheme is usually completed by the CPU, and packet conversion is implemented by unpacking, grouping, and the like.
  • the traditional scheme has many shortcomings, such as limited CPU architecture.
  • the CPU For high-speed and large-capacity data of interfaces such as RapidIO and 10GE, the CPU has very limited data processing capability.
  • the RapidIO switching device is interconnected with multiple single-board devices or chip devices, and large-capacity data needs to be processed, and CPU processing capability will restrict communication performance between systems; Sending and receiving messages are completed by means of interrupts, and the process of data processing waiting for interrupts makes the processing delay very large.
  • the embodiment of the invention provides a method for converting a RapidIO packet to an Ethernet packet, including:
  • the service data header of the RapidIO device number and the RapidIO packet is formed into a control information header, and the first mapping relationship between the information and the routing address information in the configured control information header is used to find the corresponding information of the control information header. Routing address information;
  • the information in the control information header includes at least one of a destination system configuration information and a source system configuration information, or includes at least one of a RapidIO device number and destination system configuration information and source system configuration information;
  • the routing address information includes a destination MAC address, or at least one of a destination MAC address and a destination IP address and a VLAN value.
  • the embodiment of the invention further provides a method for converting an Ethernet packet to a RapidIO packet, including:
  • Receiving a non-sharded Ethernet packet extracting the payload from the Ethernet packet, including RapidIO device number and control information header of the service data header;
  • RapidIO header Adding the discovered RapidIO device address space to the RapidIO header, and generating a non-fragmented RapidIO packet according to the RapidIO header, the service data header, and the RapidIO data except the control information header in the payload.
  • each service data header used by the RapidIO device identified by the RapidIO device number is mapped to the maximum address space of the RapidIO device.
  • a RapidIO device address space is divided. Different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
  • the embodiment of the invention further provides a method for converting a RapidIO packet to an Ethernet packet, including:
  • the service data header of the RapidIO device number and the RapidIO first fragment packet is formed into a control information header, and the corresponding information of the control information header is found in the first mapping relationship between the information and the routing address information in the configured control information header. Routing address information and adding it to the Ethernet header;
  • the service data header corresponding to the RapidIO device address space in the RapidIO subsequent fragmented packet is found in the second mapping relationship between the configured service data header and the RapidIO device address space.
  • the service data header and the RapidIO device number are combined into a control information header, and the routing address information corresponding to the control information header is found in the first mapping relationship;
  • each service data header used by the RapidIO device identified by the RapidIO device number is mapped to the maximum address space of the RapidIO device.
  • a RapidIO device address space is divided. Different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
  • the information in the control information header includes at least one of a destination system configuration information and a source system configuration information, or includes at least one of a RapidIO device number and destination system configuration information and source system configuration information;
  • the routing address information includes a destination MAC address, or at least one of a destination MAC address and a destination IP address and a VLAN value.
  • the method further includes:
  • the control information header is searched for from the third mapping relationship between the configured control information header and the IP packet identifier.
  • the IP packet is identified and added to the Ethernet header.
  • the third mapping relationship is configured to: determine a RapidIO device number of each RapidIO device in the communication system, and use destination system configuration information, source system configuration information, and data type information, such that the RapidIO device number, destination system configuration information,
  • the number of control information headers obtained by combining the source system configuration information and the data type is smaller than the number of optional IP identifiers in the IP packet and greater than the number of IP packets that can be transmitted by the communication system in a period in which the IP identifier cannot be repeated; Then, a one-to-one mapping relationship between the control information header and the IP identifier is established.
  • the embodiment of the invention further provides a method for converting an Ethernet packet to a RapidIO packet, including:
  • the control information header includes a RapidIO device number and a service data header;
  • the payload of the subsequent packet of the Ethernet is used as the RapidIO data, and the RapidIO subsequent fragment packet is generated together with the RapidIO header.
  • the information in the control information header includes at least one of a destination system configuration information and a source system configuration information, or includes at least one of a RapidIO device number and destination system configuration information and source system configuration information;
  • the routing address information includes a destination MAC address, or includes a destination MAC address and destination. At least one of an IP address and a VLAN value.
  • the third mapping relationship is configured to: determine a RapidIO device number of each RapidIO device in the communication system, and use destination system configuration information, source system configuration information, and data type information, such that the RapidIO device number, destination system configuration information,
  • the number of control information headers obtained by combining the source system configuration information and the data type is smaller than the number of optional IP identifiers in the IP packet and greater than the number of IP packets that can be transmitted by the communication system in a period in which the IP identifier cannot be repeated; Then, a one-to-one mapping relationship between the control information header and the IP identifier is established.
  • each service data header used by the RapidIO device identified by the RapidIO device number is mapped to the maximum address space of the RapidIO device.
  • a RapidIO device address space is divided. Different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
  • the embodiment of the invention further provides a packet conversion device for a RapidIO packet to an Ethernet packet, including:
  • the RapidIO packet parsing device is configured to receive the RapidIO device number and the non-fragmented RapidIO packet, and extract the service data header and the RapidIO data in the RapidIO packet;
  • control information header generating device configured to form the RapidIO device number and the service data header into a control information header
  • the routing address mapping device is configured to: find the routing address information corresponding to the control information header from the first mapping relationship between the information and the routing address information in the configured control information header;
  • the Ethernet packet generating device is configured to add the routing address information to an Ethernet header, and generate an Ethernet packet according to the Ethernet header, the control information header, and the RapidIO data.
  • the message conversion device is implemented by a programmable logic device.
  • the information in the control information header includes at least one of destination system configuration information and source system configuration information, or includes a RapidIO device number and destination system configuration information. And at least one of source system configuration information; the routing address information includes a destination MAC address, or includes at least one of a destination MAC address and a destination IP address and a VLAN value.
  • the embodiment of the invention further provides a packet conversion device for an Ethernet packet to a RapidIO packet, including:
  • An Ethernet packet parsing apparatus is configured to receive a non-fragmented Ethernet packet, and extract, from the payload of the Ethernet packet, a control information header and a RapidIO data including a RapidIO device number and a service data header;
  • the address space mapping device is configured to find a RapidIO device address space corresponding to the service data header from a second mapping relationship between the service data header associated with the configured RapidIO device number and the RapidIO device address space;
  • the RapidIO packet generating device is configured to add the discovered RapidIO device address space to the RapidIO header, and generate a non-fragmented RapidIO packet according to the RapidIO header, the service data header, and the RapidIO data.
  • the message conversion device is implemented by a programmable logic device.
  • each service data header used by the RapidIO device identified by the RapidIO device number is mapped to A RapidIO device address space is allocated in the maximum address space of the RapidIO device, and different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
  • the embodiment of the invention further provides a packet conversion device for a RapidIO packet to an Ethernet packet, including:
  • the RapidIO packet parsing device is configured to receive the RapidIO device number and the RapidIO first fragment packet, extract the service data header and the RapidIO data in the RapidIO first fragment packet, and notify the Ethernet packet of the received packet type.
  • Text generation device
  • control information header generating device configured to form the control information header by the RapidIO device number and the service data header extracted by the RapidIO packet parsing device;
  • the routing address mapping device is configured to: according to the control information header formed by the control information header generating device, find the corresponding routing address information from the first mapping relationship between the information and the routing address information in the configured control information header;
  • the Ethernet packet generating device is configured to add, when the received packet type is a RapidIO first fragment packet, the routing address information found by the routing address mapping device to the Ethernet header, according to the Ethernet header.
  • the control information header and the RapidIO data generate an Ethernet first fragment message.
  • the message conversion device further includes an address space mapping device, wherein:
  • the RapidIO packet parsing apparatus is further configured to receive the subsequent fragment of the RapidIO, extract the RapidIO device address space and the RapidIO data in the subsequent fragmented fragmentation message, and notify the Ethernet packet generating apparatus of the received packet type. ;
  • the address space mapping device is configured to find a service data header corresponding to the address space of the RapidIO device from a second mapping relationship between the service data header associated with the configured RapidIO device number and the RapidIO device address space;
  • the control information header generating device is further configured to form, by the RapidIO device number and the service data header searched by the address space mapping device, a control information header;
  • the Ethernet packet generating device is further configured to: when the received packet type is a RapidIO subsequent fragment packet, add the routing address information found by the routing address mapping device to the Ethernet header, according to the The Ethernet header and RapidIO data generate Ethernet subsequent fragmented packets.
  • each service data header used by the RapidIO device identified by the RapidIO device number is mapped to a RapidIO device address space that is divided in the maximum address space of the RapidIO device.
  • Different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
  • the packet conversion device further includes:
  • the IP identifier mapping device is configured to search for the IP packet corresponding to the control information header from the third mapping relationship between the configured control information header and the IP packet identifier according to the control information header formed by the control information header generating device.
  • the Ethernet packet generating device is further configured to add the IP packet identifier that is found by the IP identifier mapping device to the Ethernet when the received packet type is a RapidIO first fragment packet and a RapidIO subsequent fragment packet. In the net header.
  • the message conversion device is implemented by a programmable logic device.
  • the information in the control information header includes at least one of destination system configuration information and source system configuration information, or includes a RapidIO device number and destination system configuration information. And at least one of source system configuration information; the routing address information includes a destination MAC address, or includes at least one of a destination MAC address and a destination IP address and a VLAN value.
  • the embodiment of the invention further provides a packet conversion device for an Ethernet packet to a RapidIO packet, including:
  • the Ethernet packet parsing device is configured to: after receiving the Ethernet first fragment packet, extract the control information header and the RapidIO data from the payload, and notify the RapidIO packet generating device of the received packet type, where the control The information header includes the RapidIO device number and the service data header;
  • An address space mapping device configured to receive a control letter according to the Ethernet packet parsing device
  • the RapidIO device number and the service data header in the message header, and the RapidIO device address space corresponding to the service data header is found in the second mapping relationship between the service data header associated with the configured RapidIO device number and the RapidIO device address space.
  • the RapidIO packet generating device is configured to add, when the received packet type is an Ethernet first fragment packet, the RapidIO device address space found by the address space mapping device to the RapidIO header, according to the RapidIO header, The service data header and the RapidIO data generate non-fragmented RapidIO messages.
  • the message conversion device further includes a routing address mapping device and/or an IP identification mapping device, wherein:
  • the Ethernet packet parsing device is further configured to parse the header and the payload after receiving the subsequent fragmentation packet of the Ethernet, and extract the routing address information or the IP packet identifier from the header.
  • the routing address mapping device is configured to search for a first mapping relationship between the information in the configured control information header and the routing address information according to the routing address information extracted by the Ethernet packet parsing device to determine a corresponding control information header;
  • the IP identifier mapping device is configured to search for a corresponding control information header from a third mapping relationship between the configured control information header and the IP packet identifier according to the IP packet identifier extracted by the Ethernet packet parsing device;
  • the address space mapping device is further configured to: according to the RapidIO device number and the service data header in the control information header obtained by the routing address mapping device or the IP identifier mapping device, the service data header associated with the configured RapidIO device number In the second mapping relationship with the address space of the RapidIO device, the RapidIO device address space corresponding to the service data header is found;
  • the RapidIO packet generating device is further configured to: when the received packet type is an Ethernet subsequent fragment packet, add the RapidIO device address space found by the address space mapping device to the RapidIO header, and the The payload of the subsequent fragmented packet of the Ethernet is used as the RapidIO data, and the RapidIO subsequent fragmented packet is generated together with the RapidIO header.
  • the control informationgram in the first mapping relationship configured in the routing address mapping device includes at least one of destination system configuration information and source system configuration information, or at least one of a RapidIO device number and destination system configuration information and source system configuration information; the routing address information includes a destination MAC address, Or include at least one of a destination MAC address and a destination IP address and a VLAN value.
  • each service data header used by the RapidIO device identified by the RapidIO device number is mapped to A RapidIO device address space is allocated in the maximum address space of the RapidIO device, and different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
  • the foregoing solution provides a method for converting between a RapidIO packet and an Ethernet packet, and implements data conversion between the RapidIO packet and the Ethernet packet by means of mapping, and is therefore applicable to a programmable logic device.
  • a large number of RapidIO messages and Ethernet packets can be converted between system devices with a small delay, reducing the data delay caused by CPU processing and maximizing the use of data links. Bandwidth resources.
  • Figure 1 is an architectural diagram of a RapidIO device interconnected with an Ethernet device through an Ethernet interface.
  • Figure 2 is an architectural diagram of a RapidIO device interconnected with a RapidIO device through an Ethernet interface.
  • FIG. 3 is a schematic diagram of extracting a data service header from a RapidIO packet and forming a control information header according to Embodiment 1 of the present invention.
  • FIG. 4 is a flowchart of a message conversion method according to an embodiment of the present invention.
  • Figure 5 Figure 5, Figure 6, and Figure 7 are diagrams for mapping a RapidIO packet to a MAC packet, an IPV4 packet, and an IPV6 packet, respectively.
  • FIG. 8 is a schematic structural diagram of a message conversion device according to an embodiment of the present invention.
  • FIG. 9 is a flowchart of a packet conversion method according to Embodiment 2 of the present invention.
  • FIG. 10 is a schematic structural diagram of a message conversion device according to Embodiment 2 of the present invention.
  • FIG. 11 is a schematic diagram of a service data header obtained by the RapidIO device address space mapping according to the third embodiment of the present invention, and forming a control information message.
  • FIG. 12 and FIG. 13 are flowcharts respectively showing a method for converting a message of a first slice and a subsequent slice according to the third embodiment of the present invention.
  • FIG. 14 is a schematic structural diagram of a packet conversion device according to Embodiment 3 of the present invention.
  • FIG. 15 and FIG. 16 are flowcharts respectively showing a packet conversion method of a first slice and a subsequent slice according to an embodiment of the present invention.
  • FIG. 17 is a schematic structural diagram of a message conversion device according to Embodiment 4 of the present invention.
  • RapidIO packets usually have fragmented packets delivered during the delivery process, and different fragments are transmitted alternately.
  • This embodiment relates to the conversion of non-fragmented RapidIO messages to non-fragmented Ethernet messages.
  • the structure of the non-fragmented RapidIO packet can be seen in Figure 3, including the RapidIO header and payload.
  • the payload part contains a service data header in the position of the front field of the RapidIO data.
  • the service data header carries the destination system configuration information (including But not limited to device information, subsystem information, status information, etc. of the destination system), source system configuration information (including but not limited to device information of the destination system, subsystem information, status information, etc.) and data type information (including but not limited to Message type, message number, etc.).
  • the RapidIO device sends the RapidIO device number when sending RapidIO packets.
  • the RapidIO device can identify the RapidIO device that sends RapidIO packets.
  • the method for converting a RapidIO packet to an Ethernet packet in this embodiment is as shown in FIG. 4, and includes:
  • Step 110 Receive a RapidIO device number and a non-fragmented RapidIO packet sent by the RapidIO device.
  • the service data header and the RapidIO data in the RapidIO packet are also extracted in this step.
  • step 120 the RapidIO device number and the service data header in the RapidIO packet are combined into a control information header, and the control information is found in the first mapping relationship between the information and the routing address information in the configured control information header. Routing address information corresponding to the header;
  • the control information header consisting of the RapidIO device number and the service data header is a link between the RapidIO packet and the Ethernet packet.
  • the structure is shown in Figure 3.
  • the information in the control information header in the configured first mapping relationship may not use the RapidIO device number.
  • the destination system configuration information and/or the source system configuration information and route may be used. Mapping relationship of address information. If the RapidIO packet of the plurality of RapidIO devices needs to be converted, the information in the control information header may include at least one of a RapidIO device number, a destination system configuration information, and a source system configuration information.
  • the routing address is used to determine the destination system for packet delivery. If the Ethernet packet is a MAC (Media Access Control) packet, the routing address information includes the destination MAC address, and may include at least one of a source MAC address and a VLAN (Virtual Local Area Network), if the Ethernet packet is an IP packet.
  • the routing address information includes a destination IP address and a destination MAC address, and may further include at least one of a source IP address and a VLAN.
  • the destination system configuration information and/or the source system configuration information is used as a mapping relationship between the information in the control information header or a part of the routing information, and the routing address is strongly correlated with the system configuration information. Conducive to fast indexing, speed up the lookup time of the mapping process.
  • the first mapping relationship is pre-configured.
  • Step 130 Add the found routing address information to the Ethernet header, and generate an Ethernet packet according to the Ethernet header, the control information header, and the RapidIO data in the RapidIO packet.
  • the Ethernet header includes a MAC packet, an IPV4 packet, and an IPV6 packet.
  • FIG. 5, FIG. 6, and FIG. 7 respectively show a case where a RapidIO packet is converted into these Ethernet packets.
  • the routing control information is obtained according to the information mapping in the control information header, where at least the destination MAC address is included, and other fields in the MAC header may be filled according to the protocol.
  • the packet type can be padded to 0x0806, and the VLAN information is optional.
  • the source MAC address is configured for each RapidIO device and can be obtained directly according to the configuration.
  • the payload includes the control information header and the RapidIO data.
  • the method of converting the MAC header according to the control information header is as follows.
  • the destination IP address is obtained according to the control information header mapping, and other fields are filled according to the corresponding parameters of the configuration or the length of the data according to the relevant protocol, and no complicated operation is required, and details are not described herein again.
  • the payload of the IPV4 message includes the control information header and the RapidIO data.
  • the VLAN information is the analog LAN information value
  • V/H is the version type/header length
  • TOS is the service type
  • Len is the total length of the message
  • ID is the message identifier
  • TTL is the lifetime.
  • the MAC header and the IPV6 header are obtained, and the MAC header is obtained according to the control information header, as in the above, for the non-fragmented IP packet.
  • the destination IP address is obtained according to the control information header mapping.
  • Other fields are filled according to the corresponding parameters of the configuration or the length of the data according to the relevant protocol, and no complicated operation is required, and details are not described herein.
  • the payload of the IPV6 message includes the control information header and the RapidIO data.
  • the embodiment further provides a packet conversion device for a RapidIO packet to an Ethernet packet, and the packet conversion device is implemented by a programmable logic device. Also shown in FIG. 8 is a RapidIO interface and an Ethernet interface connected to the packet conversion device. The packet conversion device receives the RapidIO device number and the non-fragmented RapidIO packet from the RapidIO interface, and converts the packet into an Ethernet packet. , sent to the Ethernet device interface. As shown in the figure, the message conversion device includes:
  • RapidIO message parsing device 10 configured to receive RapidIO device numbers and non-fragmented a RapidIO packet, which extracts a service data header and RapidIO data in the RapidIO packet;
  • the control information header generating device 20 is configured to form the RapidIO device number and the service data header into a control information header;
  • the routing address mapping device 30 is configured to find the routing address information corresponding to the control information header from the first mapping relationship between the information and the routing address information in the configured control information header;
  • the Ethernet packet generating device 40 is configured to add the routing address information to an Ethernet header, and generate an Ethernet packet according to the Ethernet header, the control information header, and the RapidIO data.
  • the generated Ethernet packets are transmitted to the Ethernet device interface and sent to the RapidIO device or Ethernet device in the destination system through the network. Sent to the RapidIO device, which needs to convert Ethernet packets into RapidIO messages. If it is sent to an Ethernet device, there is no need to convert it.
  • the information in the control information header includes at least one of destination system configuration information and source system configuration information, or includes a RapidIO device number and destination system configuration information. At least one of source system configuration information; the routing address information includes a destination MAC address, or at least one of a destination MAC address and a destination IP address and a VLAN value.
  • the RapidIO data in the figure is first transmitted to the control information header generating means 20 and then transmitted to the Ethernet message generating means 40, it may be directly transmitted to the control information header generating means 20. This embodiment of the present invention does not limit this.
  • This embodiment relates to the conversion of non-fragmented Ethernet messages to non-fragmented RapidIO messages.
  • the structure of the non-fragmented Ethernet message of this embodiment has been shown in FIGS. 5, 6, and 7.
  • the payload of the message includes a control information header and RapidIO data, and the control information header includes a RapidIO device number and a service data header.
  • the structure of the RapidIO message to be converted is shown in Figure 3, including the RapidIO header and payload, including the RapidIO device in the RapidIO header.
  • Information about the address space (not shown), the RapidIO device address space indicates where the RapidIO header is stored in memory.
  • each RapidIO device is assigned a separate address space to store the packets of the RapidIO device.
  • the payload includes the data service header and subsequent RapidIO data.
  • the method for converting the Ethernet packet to the RapidIO packet in this embodiment is as shown in FIG. 9, and includes:
  • Step 210 Receive a non-fragmented Ethernet packet, and extract a control information header including a RapidIO device number and a service data header from the payload of the Ethernet packet.
  • step 220 the RapidIO device address space corresponding to the service data header is found in the second mapping relationship between the service data header associated with the configured RapidIO device number and the RapidIO device address space.
  • the second mapping relationship is pre-configured, and includes a mapping relationship between the service data header associated with the RapidIO device ID and the RapidIO device address space.
  • each service data header used by the RapidIO device identified by the RapidIO device number is mapped to the maximum address space of the RapidIO device and is divided.
  • a RapidIO device address space different service data headers corresponding to different RapidIO device address spaces.
  • each RapidIO device has the same address space, which is more convenient for data storage and positioning.
  • the RapidIO device address space can be time multiplexed.
  • Step 230 Add the discovered RapidIO device address space to the RapidIO header, and generate a non-fragmented RapidIO packet according to the RapidIO header, the service data header, and the RapidIO data except the control information header in the payload.
  • the RapidIO device number is parsed in step 210, and after the non-fragmented RapidIO packet is generated, the RapidIO device number and the non-fragmented RapidIO packet are transmitted to the RapidIO interface and then sent to the corresponding RapidIO device.
  • the embodiment further provides a message conversion device for transmitting Ethernet packets to RapidIO messages, and the message conversion device is implemented by a programmable logic device.
  • a RapidIO interface and an Ethernet interface connected to the message conversion device, the message conversion device from the Ethernet device The interface receives non-fragmented Ethernet packets and converts them to RapidIO packets and sends them to the RapidIO interface.
  • the message conversion device includes:
  • the Ethernet packet parsing device 50 is configured to receive a non-fragmented Ethernet packet, and extract, from the payload of the Ethernet packet, a control information header and a RapidIO data including a RapidIO device number and a service data header;
  • the address space mapping device 60 is configured to find a RapidIO device address space corresponding to the service data header from a second mapping relationship between the service data header associated with the configured RapidIO device number and the RapidIO device address space;
  • the RapidIO packet generating device 70 is configured to add the discovered RapidIO device address space to the RapidIO header, and generate a non-fragmented RapidIO packet according to the RapidIO header, the service data header, and the RapidIO data. As shown, the generated non-fragmented RapidIO message is transmitted to the RapidIO interface along with the RapidIO device number.
  • each service data header used by the RapidIO device identified by the RapidIO device number is mapped to A RapidIO device address space is allocated in the maximum address space of the RapidIO device, and different service data headers correspond to different RapidIO device address spaces, and the size of each RapidIO device address space is the same.
  • This embodiment relates to the conversion of a fragmented RapidIO packet to a fragmented Ethernet packet.
  • RapidIO Fragmented RapidIO packets including RapidIO first fragmented packets and RapidIO subsequent fragmented packets.
  • the structure of the RapidIO first fragmented packet is similar to that of the non-fragmented RapidIO packet. See Figure 3, including the RapidIO header and payload, and the payload includes the service data header.
  • the RapidIO subsequent fragmentation message includes the RapidIO header and payload, but there is usually no service data header in the payload. Both of the RapidIO headers have information about the RapidIO device address space.
  • the Ethernet packet in this embodiment also includes the Ethernet first fragment packet and the Ethernet subsequent.
  • the fragmented packet is obtained by converting the first packet of the Ethernet packet to the first fragment of the RapidIO packet
  • the subsequent fragmentation packet of the Ethernet is obtained by converting the subsequent fragmented packet of the RapidIO.
  • the structure of the Ethernet first fragment packet is similar to that of the non-fragmented Ethernet packet. See Figure 5-7.
  • the payload also includes the control information header, and the Ethernet subsequent fragmented packet. There is no control information header in the payload.
  • the first mapping can be found according to the service data header and the RapidIO device number (sent with the packet) in the RapidIO first fragment packet.
  • the relationship gets the corresponding routing address information.
  • the first mapping relationship between the RapidIO device address space and the service data header is configured for the RapidIO device.
  • the second mapping is performed after the service data header is determined. Relationship, find the RapidIO device address space corresponding to the service data header and add it to the RapidIO header.
  • the packet conversion device can find the corresponding service data header according to the RapidIO device address space in the subsequent fragmented packet of the RapidIO, and form the control data header by the service data header and the RapidIO device number, as shown in FIG. Then you can find the first mapping relationship to get the corresponding routing address information.
  • the conversion of the RapidIO first fragment packet to the Ethernet first fragment packet in this embodiment includes:
  • Step 310 Receive a RapidIO device number and a RapidIO first fragment packet sent by the RapidIO device.
  • Step 320 The service data header in the RapidIO device number and the RapidIO first fragment packet is formed into a control information header, and the control information is found in the first mapping relationship between the information and the routing address information in the configured control information header.
  • the routing address information corresponding to the header is added to the Ethernet header;
  • the information in the control information header includes at least one of a destination system configuration information and a source system configuration information, or includes at least one of a RapidIO device number and a destination system configuration information and a source system configuration information; the routing address information includes a destination MAC address, Or include the destination MAC address and destination IP address and VLAN value. At least one.
  • Step 330 Generate an Ethernet first fragmentation packet according to the Ethernet header, the control information header, and the RapidIO data in the RapidIO first fragmentation packet.
  • the conversion of the subsequent fragmented packet of the RapidIO to the subsequent fragmented packet of the Ethernet includes:
  • Step 410 Receive a RapidIO device number and a RapidIO subsequent fragment packet sent by the RapidIO device.
  • step 420 the service data header corresponding to the RapidIO device address space in the subsequent fragmented packet of the RapidIO is found in the second mapping relationship between the configured service data header and the RapidIO device address space.
  • each service data header used by the RapidIO device identified by the RapidIO device number is mapped to the maximum address space of the RapidIO device and is divided.
  • a RapidIO device address space different service data headers corresponding to different RapidIO device address spaces.
  • each RapidIO device address space is divided into the same size.
  • the second mapping relationship of the above RapidIO device may be configured in the following manner: determining the number M1 of the destination system configuration information used by the RapidIO device, the number M2 of source system configuration information, and the number M3 of data type information, and all data type occupied addresses. a maximum value M4 of the space, and M1 ⁇ M2 ⁇ M3 ⁇ M4 is smaller than a maximum address space of the RapidIO device; then, in the maximum address space of the RapidIO device, the destination system configuration information, source system configuration information, and data are Each service data header obtained by combining the type information is mapped to a RapidIO device address space of size M4, thereby completing the configuration of the second mapping relationship.
  • Step 430 the service data header and the RapidIO device number are combined into a control information header, and the routing address information corresponding to the control information header is found in the first mapping relationship.
  • the first mapping relationship here is the first mapping relationship in FIG.
  • Step 440 Add the found routing address information to the Ethernet header, and generate an Ethernet subsequent segment according to the Ethernet header and the RapidIO data in the RapidIO subsequent fragmented packet. Piece of message.
  • the control information needs to be used in the process of converting the subsequent fragments of the Ethernet packets into the subsequent fragments of the RapidIO.
  • the header obtains the address space of the RapidIO device, but the subsequent fragmentation packet of the Ethernet does not have a control information header.
  • the recovered information may be only part of the information in the control information header. (related to the configuration of the first mapping relationship), therefore, optionally, when the RapidIO first fragment packet and the RapidIO subsequent fragment packet are converted, after the control information header is formed, the configured control information header and IP are also configured.
  • the IP packet identifier corresponding to the control information header is found in the third mapping relationship of the packet identifier and added to the Ethernet header.
  • the third mapping relationship may be pre-configured in the following manner: determining the RapidIO device number of each RapidIO device in the communication system, and the destination system configuration information, source system configuration information, and data type information used, so that the RapidIO device number and destination system are obtained.
  • the number of control information headers obtained by the combination of the configuration information, the source system configuration information, and the data type is smaller than the number of optional IP identifiers in the IP packet and greater than the IP address that the communication system can transmit during the period in which the IP identifier cannot be repeated. Number of texts; then establishing a one-to-one mapping relationship between the control information header and the IP identifier.
  • the IP packet identifier (such as the ID in the IPV4 header in Figure 6) is mainly associated with different fragments of the same Ethernet packet to distinguish it from the fragments in other packets.
  • the numbering mode of this embodiment can be used. If the mapping of the IP packet identifier is not performed, other numbering methods can also be used. Or, in the process of transmitting an IP packet, if the transmission efficiency is not required, the IP packet identifier may not be set after the corresponding fragmentation packet is always present in the subsequent fragmentation packet of the Ethernet.
  • the embodiment further provides a packet conversion device for a RapidIO packet to an Ethernet packet, and the packet conversion device is implemented by a programmable logic device.
  • the packet conversion device receives the RapidIO device number and the fragmented RapidIO packet from the RapidIO interface, converts it into a fragmented Ethernet packet, and sends it to the Ethernet device interface.
  • the packet conversion device can convert the RapidIO first fragment packet into an Ethernet first fragment packet. You can also convert the subsequent fragmented fragments of RapidIO into Ethernet subsequent fragmented packets. As shown in FIG. 14, the packet conversion device includes:
  • the RapidIO packet parsing device 10' is configured to receive the RapidIO device number and the RapidIO first fragment packet, extract the service data header and the RapidIO data in the RapidIO first fragment packet, and receive the received packet type.
  • the indication is that the fragmented packet or the non-fragmented packet is used to notify the Ethernet packet generating device; and is further configured to receive the RapidIO subsequent fragment, and extract the RapidIO device address space and the RapidIO data in the RapidIO subsequent fragmented packet. And notifying the received packet type to the Ethernet packet generating device;
  • the address space mapping device 40 is configured to find a service data header corresponding to the address space of the RapidIO device from a second mapping relationship between the service data header associated with the configured RapidIO device number and the RapidIO device address space.
  • the control information header generating device 20' is configured to form the service header of the RapidIO device and the service data header extracted by the RapidIO packet parsing device into a control information header; and further configured to set the RapidIO device number and the address The service data header found by the space mapping device constitutes a control information header;
  • the routing address mapping device 30' is configured to search for the corresponding routing address information from the first mapping relationship between the information and the routing address information in the configured control information header according to the control information header formed by the control information header generating device;
  • the Ethernet packet generating device 40' is configured to add, when the received packet type is a RapidIO first fragment packet, the routing address information found by the routing address mapping device to the Ethernet header, according to the Ethernet
  • the network header, the control information header, and the RapidIO data generate an Ethernet first fragment packet; and are further configured to add the routing address information found by the routing address mapping device when the received packet type is a RapidIO subsequent fragment packet.
  • an Ethernet subsequent fragmented packet is generated according to the Ethernet header and the RapidIO data.
  • the figure also shows the flow of information when converting the RapidIO first fragment message and the RapidIO subsequent fragment message, which can be distinguished by referring to the text description.
  • the conversion of the fragmented and non-fragmented RapidIO to the fragmented and non-sharded Ethernet packets can be implemented at the same time, that is, the embodiment
  • the above device can also be used to implement the functions of the corresponding device in the first embodiment.
  • the information in the control information header includes at least one of destination system configuration information and source system configuration information, or includes a RapidIO device number and destination system configuration information. And at least one of source system configuration information; the routing address information includes a destination MAC address, or includes at least one of a destination MAC address and a destination IP address and a VLAN value.
  • each service data header used by the RapidIO device identified by the RapidIO device number is mapped to A RapidIO device address space is allocated in the maximum address space of the RapidIO device.
  • Different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
  • the packet conversion device further includes:
  • the IP identifier mapping device is configured to search for the IP packet corresponding to the control information header from the third mapping relationship between the configured control information header and the IP packet identifier according to the control information header formed by the control information header generating device.
  • the Ethernet packet generating device is further configured to add the IP packet identifier that is found by the IP identifier mapping device to the Ethernet when the received packet type is a RapidIO first fragment packet and a RapidIO subsequent fragment packet. In the net header.
  • the IP identification mapping means is connected between the control information header generating means 20' and the Ethernet message generating means 40'.
  • This embodiment relates to the conversion of a fragmented Ethernet packet to a fragmented RapidIO packet.
  • the structure of the fragmented Ethernet packet and the fragmented RapidIO packet has been described in the third embodiment and will not be repeated here.
  • the conversion of the fragmented Ethernet packet to the fragmented RapidIO packet can be converted from the Ethernet first fragment packet to the RapidIO first fragment packet, and the Ethernet subsequent fragment packet to the RapidIO subsequent fragment.
  • the description of the conversion of the message is described in two aspects.
  • the conversion of the Ethernet first fragment packet to the RapidIO first fragment packet is shown in Figure 15, including:
  • Step 510 After receiving the Ethernet first fragment packet, extracting, from the payload of the Ethernet first fragment packet, a control information header including a RapidIO device number and a service data header.
  • step 520 the RapidIO device address space corresponding to the service data header is found and added to the RapidIO header in the second mapping relationship between the configured service data header and the RapidIO device address space.
  • Step 530 Generate a RapidIO first fragment packet according to the RapidIO header, the service data header, and the RapidIO data except the control information header in the payload.
  • Step 610 After receiving the subsequent fragmentation packet of the Ethernet, extracting the routing address information or the IP packet identifier from the header of the subsequent fragmentation packet of the Ethernet;
  • Step 620 Determine a control information header corresponding to the routing address information according to a first mapping relationship between the information in the configured control information header and the routing address information, or a third mapping from the configured control information header and the IP packet identifier. In the relationship, the control information header corresponding to the IP packet identifier is found; the control information header includes a RapidIO device number and a service data header;
  • the information in the control information header includes at least one of destination system configuration information and source system configuration information, or at least one of a RapidIO device number and destination system configuration information and source system configuration information.
  • the routing address information includes a destination MAC address, or includes at least one of a destination MAC address and a destination IP address and a VLAN value.
  • the third mapping relationship is configured as follows: determining a RapidIO device number of each RapidIO device in the communication system, and using destination system configuration information, source system configuration information, and data type information, so that the RapidIO device number and the destination system configuration are configured.
  • the number of control information headers obtained by the combination of information, source system configuration information, and data type is smaller than the optional IP identifier in the IP packet.
  • the number is greater than the number of IP packets that can be transmitted by the communication system in a period in which the IP identifier cannot be repeated; and then the one-to-one mapping relationship between the control information header and the IP identifier is established.
  • Step 630 Find the RapidIO device address space corresponding to the service data header from the second mapping relationship associated with the configured RapidIO device number, and add it to the RapidIO header.
  • each service data header used by the RapidIO device identified by the RapidIO device number is mapped to the maximum address space of the RapidIO device.
  • different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
  • Step 640 The payload of the subsequent packet of the Ethernet is used as the RapidIO data, and the RapidIO subsequent fragment packet is generated together with the RapidIO header.
  • the RapidIO device number and the fragmented RapidIO packet are transmitted to the RapidIO interface and then sent to the corresponding RapidIO device.
  • the embodiment further provides a packet conversion device for an Ethernet packet to a RapidIO packet, and the packet conversion device is implemented by a programmable logic device.
  • the packet conversion device receives the fragmented Ethernet packet from the Ethernet interface, converts it into a fragmented RapidIO packet, and sends it to the Ethernet device interface.
  • the packet conversion device can convert the Ethernet first fragmented packet into a RapidIO first fragmented packet, and can also convert the Ethernet subsequent fragmented packet into a RapidIO subsequent fragmented packet. As shown in FIG. 17, the packet conversion device includes:
  • the Ethernet packet parsing device 50' is configured to extract the control information header and the RapidIO data from the payload after receiving the Ethernet first fragment packet, and the received packet type (here, the fragmentation report) And the non-fragmented message is sent to the RapidIO packet generating device; optionally, after receiving the Ethernet subsequent fragmented packet, the header and the payload are parsed, and the route is extracted from the header. Address information or IP packet identifier;
  • the routing address mapping device 80' is configured to search for a first mapping relationship between the information in the configured control information header and the routing address information according to the routing address information extracted by the Ethernet packet parsing device to determine a corresponding control information header;
  • the IP identifier mapping device 90' is configured to search for a corresponding control information header from a third mapping relationship between the configured control information header and the IP packet identifier according to the IP packet identifier extracted by the Ethernet packet parsing device;
  • the address space mapping device 60' is configured to set a service data header and a RapidIO device address associated with the configured RapidIO device number according to the RapidIO device number and the service data header in the control information header extracted by the Ethernet packet parsing device.
  • the RapidIO device address space corresponding to the service data header is found; optionally, the RapidIO device in the control information header obtained according to the routing address mapping device or the IP identifier mapping device is further configured.
  • the number of the service data headers, in the second mapping relationship between the service data header associated with the configured RapidIO device number and the RapidIO device address space, the RapidIO device address space corresponding to the service data header is found;
  • the RapidIO message generating device 70' is configured to add the RapidIO device address space found by the address space mapping device to the RapidIO header when the received message type is an Ethernet first fragment message, according to the RapidIO
  • the header, service data header, and RapidIO data generate non-fragmented RapidIO messages.
  • FIG. 17 also shows the flow of information when the RapidIO first fragment message and the RapidIO subsequent fragment message are converted, and can be distinguished by referring to the text description. It should be noted that, for the packet conversion device, the conversion of the fragmented and non-fragmented Ethernet packets to the fragmented and non-fragmented RapidIO packets can be implemented at the same time, that is, the embodiment. The above device can also be used to implement the functions of the corresponding device in the second embodiment.
  • the above routing address mapping means 80' and IP identification mapping means 90' may be selected one by one.
  • the function of the above device can also be seen in the corresponding description in the process.
  • the information in the control information header includes at least one of destination system configuration information and source system configuration information, or includes The RapidIO device number and at least one of the destination system configuration information and the source system configuration information;
  • the routing address information includes a destination MAC address, or includes at least one of a destination MAC address and a destination IP address and a VLAN value.
  • each service data header used by the RapidIO device identified by the RapidIO device number is mapped to A RapidIO device address space is allocated in the maximum address space of the RapidIO device.
  • Different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
  • the foregoing implementation provides a method for packet conversion (involving data mapping, transmission, and exchange) between a RapidIO interface and an Ethernet interface, and implements communication between the RapidIO device and the Ethernet device and the RapidIO device, and is suitable for passing through the programmable logic device.
  • PLC packet conversion
  • the high-speed parallel data processing mode of the programmable logic device makes the data processing capability no longer limited by the processing power of the CPU, and maximizes the use of link bandwidth resources.
  • the data processing speed is faster, which greatly reduces the delay of the data processing process.
  • the packet conversion can be switched between the RapidIO packet and the Ethernet MAC packet without distinguishing the fragmentation of different packets.
  • the Ethernet packet in this example is a MAC packet.
  • the control information header of the RapidIO packet only needs to be mapped to the MAC header, and then the payload of the RapidIO packet is converted into the MAC packet payload. See Figure 5 .
  • the packet conversion device implemented by the programmable logic device parses the source system configuration information and the destination system configuration information of the control information header, and obtains the RapidIO number. According to the numbering rule, the left control information in Table 1 can be obtained. The number of the information in the header, and find the corresponding MAC header information.
  • the source MAC address is fixed, and the packet type is also a fixed value (such as 0x0806).
  • the destination MAC address, the source MAC address, the VLAN information (optional), and the packet type form a MAC packet header, and then the RapidIO packet is used.
  • the payload is directly converted into a MAC packet payload, and the mapping between the RapidIO packet and the Ethernet packet is completed, and then the communication between the RapidIO device and the Ethernet device is completed through the Ethernet device interface.
  • the RapidIO first fragment packet can directly form a control information header based on the service data header and the RapidIO device number carried in the packet to find the configuration control.
  • the first mapping relationship between the information and the routing address in the information header can obtain information such as the destination IP address and the destination MAC address in the MAC header and the IPV4 header. See Figure 6.
  • the RapidIO subsequent fragmented packets For the RapidIO subsequent fragmented packets, first find the RapidIO device address space and service data configured for the corresponding RapidIO device through the RapidIO device address space in the RapidIO header.
  • the second mapping relationship of the header, the searched service data header and the RapidIO device number form a control information header, and then the first mapping relationship is obtained to obtain information such as a destination IP address and a destination MAC address.
  • the packet conversion device needs to be divided into the above two cases.
  • the routing address information is directly mapped through the control information header.
  • the control information header is obtained through the address space mapping. Then, the routing address information is obtained through the control information header mapping.
  • the maximum address space accessible to RapidIO devices in the system is deterministic.
  • the address space can be divided and mapped.
  • An exemplary method for dividing and mapping is as follows: all the destination system configuration information is numbered, from 1 to M1, for a total of M1; The source system configuration information is numbered, from 1 to M2, for a total of M2; all packet types are numbered, from 1 to M3, for a total of M3; the address space occupied by each packet type may be different, The maximum address space occupied is M4.
  • M1 to M4 can be adjusted during system planning/configuration so that M1*M2*M3*M4 is not larger than the maximum address space of the RapidIO device.
  • the routing address information in the first mapping relationship includes a next hop MAC address, a destination IP address, and VLAN information.
  • the routing address information is mapped by the RapidIO device number, source system configuration information, and destination system configuration information in the control information header.
  • One of the exemplary mapping relationships is shown in Table 2. For the numbering rule of the information in the control information header in the table, refer to the first example, which covers the routing address information used by all possible routes.
  • All RapidIO device information is numbered, from 1 to M0, for a total of M0; all destination system configuration information is numbered, from 1 to M1, for a total of M1; all source system configuration information is numbered, The number is from 1 to M2, for a total of M2; all the packet types are numbered, from 1 to M3, for a total of M3.
  • M1 to M3 can be adjusted during system planning/configuration.
  • the IP identifier only needs to distinguish different fragmented packets within a certain period of time (assuming 1ms, 10ms, depending on the system), it can be assumed that there are a total of M5 data packets exchanged in a fixed period. Therefore, if M0*M1*M2*M3 is greater than or equal to M5, it is possible to distinguish different fragmented messages within a period of time.
  • the number of bytes transmitted by the 10G Ethernet interface is up to 12500000 bytes. If the average length of the data type is 500 bytes, the number of packets to be exchanged for 10 ms is M5000. Assume that there are 16 data types in 10ms, a total of 10 RapidIO device information numbers, 16 destination system configuration information numbers, 16 source system configuration information numbers, and 16 IP address identifiers. 40,960, able to distinguish up to 25,000 packets of 10ms. In the third mapping relationship, the IP identification field is numbered from 1 to 40960 (the number is less than 65536), and the one-to-one mapping relationship between the IP packet identifier and the control information header can be established.
  • the information is added to the corresponding fields of the MAC header and the IPV4 header, and other fields are filled in to obtain the header of the IPV4 packet.
  • the payload of the IPIO4 packet is directly converted into the IPV4 packet payload, and the IPV4 first fragment packet is generated according to the header, control information header and IPV4 packet payload of the obtained IPV4 packet, according to the header of the obtained IPV4 packet.
  • the IPV4 packet payload is generated by the IPV4 packet payload.
  • IPV6 packet conversion can be performed between the fragmented RapidIO packets and the fragmented IPV6 packets for the sake of transmission efficiency.
  • the conversion of the fragmented RapidIO packet to the fragmented IPV6 packet is similar to the conversion of the fragmented IPV4 packet, and will not be described here.
  • the foregoing solution provides a method for converting between a RapidIO packet and an Ethernet packet, and implements data conversion between the RapidIO packet and the Ethernet packet by means of mapping, and is therefore applicable to a programmable logic device.
  • a large number of RapidIO messages and Ethernet packets can be converted between system devices with a small delay, reducing the data delay caused by CPU processing and maximizing the use of data links. Bandwidth resources.

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)
  • Computer And Data Communications (AREA)

Abstract

A method and device for converting between a RapidIO packet and an Ethernet packet. The converting method comprises: a packet converting device receives a RapidIO device serial number and a non-fragment RapidIO packet sent by a RapidIO device; and form a control information header by using the RapidIO device serial number and a service data header in the RapidIO packet, find corresponding routing address information from a first mapping between information in the control information header and the routing address information, and add the found information into an Ethernet header to generate an Ethernet packet. Correspondingly, after a non-fragment Ethernet packet is received, a control information header can be extracted from a payload, and a corresponding RapidIO device address space is found according to a second mapping to generate a non-fragment RapidIO packet.

Description

RapidIO报文和以太网报文之间的转换方法和设备Method and device for converting between RapidIO messages and Ethernet messages 技术领域Technical field
本文涉及通信技术领域,特别涉及一种在通信系统中,实现RapidIO报文和以太网报文之间的转换方法和相应的报文转换设备。This document relates to the field of communication technologies, and in particular, to a method for converting a RapidIO message and an Ethernet message in a communication system and a corresponding message conversion device.
背景技术Background technique
RapidIO(无中文术语)是由Motorola和Mercury等公司率先倡导的一种高性能、低引脚数、基于数据包交换的互连体系结构,是为满足未来高性能嵌入式系统需求而设计的一种开放式互连技术标准。RapidIO互联架构是基于数据包交换的高性能互连技术,主要应用于系统内部互连,支持芯片到芯片和板到板通信,目前已实现1Gbps到60Gbps的性能水平。RapidIO (no Chinese terminology) is a high-performance, low pin count, packet-switched interconnect architecture pioneered by companies such as Motorola and Mercury. It is designed to meet the needs of future high-performance embedded systems. An open interconnect technology standard. The RapidIO interconnect architecture is a high-performance interconnect technology based on packet switching. It is mainly used for internal interconnection of systems, supporting chip-to-chip and board-to-board communication, and has achieved performance levels of 1 Gbps to 60 Gbps.
以太网(Ethernet)是一种局域网组网技术。IEEE 802.3标准给出了以太网的技术标准,该标准通过足够多的报头控制信息将有效载荷正确传送到目的地,是当前应用最普遍的局域网技术。Ethernet (Ethernet) is a LAN networking technology. The IEEE 802.3 standard gives the technical standard for Ethernet, which passes the payload to the destination correctly with enough header control information, making it the most popular LAN technology in the current application.
在通信系统中,系统内部芯片到芯片、单板到单板间的数据通信,往往通过RapidIO互联架构,以RapidIO报文的形式互相传递;系统之间往往通过以太网,在网络设备间互联通信。图1是系统中RapidIO设备通过以太网接口与以太网设备互联应用的架构图,图2是系统中RapidIO设备通过以太网接口与RapidIO设备互联应用的架构图。图1和图2中的源系统或目的系统的多个RapidIO设备直接或间接连接到RapidIO交换设备,在RapidIO交换设备和以太网设备接口之间,由报文转换设备完成RapidIO报文和以太网报文之间的转换。图1中的目的系统或源系统是以太网设备,而图2的目的系统或源系统结构也包括多个RapidIO设备、RapidIO交换设备、以太网设备接口及用于报文转换设备。在图1和图2所示的示例性的系统架构中,存在着系统内的RapidIO设备(如芯片或者单板)与其它系统的RapidIO设备(如芯片或者单板)或者以太网设备通信的需求,这就需要将系统内部的RapidIO报文数据转换成以太网报文数据,通过以太网接口互联通信。 In the communication system, the internal chip-to-chip, single-board-to-board data communication between the system is often transmitted through the RapidIO interconnect architecture in the form of RapidIO packets; the systems often communicate with each other through Ethernet. . Figure 1 is an architectural diagram of a RapidIO device interconnected with an Ethernet device through an Ethernet interface. Figure 2 is an architectural diagram of a RapidIO device interconnected with a RapidIO device through an Ethernet interface. The multiple RapidIO devices of the source system or the destination system in Figure 1 and Figure 2 are directly or indirectly connected to the RapidIO switching device. Between the RapidIO switching device and the Ethernet device interface, the packet conversion device completes the RapidIO packet and Ethernet. Conversion between messages. The destination system or source system in FIG. 1 is an Ethernet device, and the destination system or source system structure of FIG. 2 also includes a plurality of RapidIO devices, a RapidIO switching device, an Ethernet device interface, and a packet conversion device. In the exemplary system architecture shown in Figures 1 and 2, there is a need for a RapidIO device (such as a chip or a single board) in the system to communicate with other system RapidIO devices (such as chips or boards) or Ethernet devices. This requires converting the internal RapidIO message data into Ethernet message data and interconnecting through the Ethernet interface.
传统的报文转换方案通常由CPU完成,通过拆包、组包等实现报文转换。传统的方案存在诸多不足,如受限于CPU架构,对于RapidIO、10GE等接口的高速大容量数据,CPU的数据处理能力非常有限。尤其在图1和图2所示的系统架构中,RapidIO交换设备与多个单板设备或芯片设备互联,存在着大容量的数据需要处理,CPU处理能力将制约着系统间通信性能;同时CPU收发报文依靠中断方式完成,数据处理等待中断的过程,使得处理延时非常大。The traditional message conversion scheme is usually completed by the CPU, and packet conversion is implemented by unpacking, grouping, and the like. The traditional scheme has many shortcomings, such as limited CPU architecture. For high-speed and large-capacity data of interfaces such as RapidIO and 10GE, the CPU has very limited data processing capability. In particular, in the system architecture shown in FIG. 1 and FIG. 2, the RapidIO switching device is interconnected with multiple single-board devices or chip devices, and large-capacity data needs to be processed, and CPU processing capability will restrict communication performance between systems; Sending and receiving messages are completed by means of interrupts, and the process of data processing waiting for interrupts makes the processing delay very large.
如何设计一种适用于可编程逻辑设备实现的RapidIO报文和以太网报文之间的转换方法及相应设备,以规避CPU处理能力制约系统间通信性能,减少CPU处理带来的数据时延,是急待解决的问题。How to design a conversion method and corresponding equipment between RapidIO packets and Ethernet packets for implementing programmable logic devices, to avoid CPU processing capability and to control communication performance between systems, and to reduce data delay caused by CPU processing. It is an urgent problem to be solved.
发明内容Summary of the invention
本发明实施例提供了一种RapidIO报文到以太网报文的转换方法,包括:The embodiment of the invention provides a method for converting a RapidIO packet to an Ethernet packet, including:
接收RapidIO设备发送的RapidIO设备编号和非分片的RapidIO报文;Receiving the RapidIO device number and the non-fragmented RapidIO packet sent by the RapidIO device;
将所述RapidIO设备编号和所述RapidIO报文中的业务数据报头组成控制信息报头,从配置的控制信息报头中信息与路由地址信息的第一映射关系中,查找到所述控制信息报头对应的路由地址信息;And the service data header of the RapidIO device number and the RapidIO packet is formed into a control information header, and the first mapping relationship between the information and the routing address information in the configured control information header is used to find the corresponding information of the control information header. Routing address information;
将查找到的路由地址信息添加到以太网报头中,根据所述以太网报头、控制信息报头和所述RapidIO报文中的RapidIO数据生成以太网报文。Adding the found routing address information to the Ethernet header, and generating an Ethernet packet according to the Ethernet header, the control information header, and the RapidIO data in the RapidIO packet.
可选地,Optionally,
所述控制信息报头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括RapidIO设备编号及目的系统配置信息和源系统配置信息中的至少一种;The information in the control information header includes at least one of a destination system configuration information and a source system configuration information, or includes at least one of a RapidIO device number and destination system configuration information and source system configuration information;
所述路由地址信息包括目的MAC地址,或者包括目的MAC地址及目的IP地址和VLAN值中的至少一种。The routing address information includes a destination MAC address, or at least one of a destination MAC address and a destination IP address and a VLAN value.
本发明实施例还提供了一种以太网报文到RapidIO报文的转换方法,包括:The embodiment of the invention further provides a method for converting an Ethernet packet to a RapidIO packet, including:
接收到非分片的以太网报文,从所述以太网报文的净荷中提取出包括 RapidIO设备编号和业务数据报头的控制信息报头;Receiving a non-sharded Ethernet packet, extracting the payload from the Ethernet packet, including RapidIO device number and control information header of the service data header;
从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述业务数据报头对应的RapidIO设备地址空间;Searching for the RapidIO device address space corresponding to the service data header from the second mapping relationship between the configured service data header and the RapidIO device address space;
将查找到的RapidIO设备地址空间添加到RapidIO报头中,根据所述RapidIO报头、业务数据报头和所述净荷中除控制信息报头外的RapidIO数据生成非分片的RapidIO报文。Adding the discovered RapidIO device address space to the RapidIO header, and generating a non-fragmented RapidIO packet according to the RapidIO header, the service data header, and the RapidIO data except the control information header in the payload.
可选地,Optionally,
所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间,被划分出的每个RapidIO设备地址空间大小相同。In the second mapping relationship between the service data header associated with the RapidIO device ID and the RapidIO device address space, each service data header used by the RapidIO device identified by the RapidIO device number is mapped to the maximum address space of the RapidIO device. A RapidIO device address space is divided. Different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
本发明实施例还提供了一种RapidIO报文到以太网报文的转换方法,包括:The embodiment of the invention further provides a method for converting a RapidIO packet to an Ethernet packet, including:
接收RapidIO设备发送的RapidIO设备编号和RapidIO首分片报文;Receiving the RapidIO device number and the RapidIO first fragment packet sent by the RapidIO device;
将所述RapidIO设备编号和RapidIO首分片报文中的业务数据报头组成控制信息报头,从配置的控制信息报头中信息与路由地址信息的第一映射关系中查找到所述控制信息报头对应的路由地址信息并添加到以太网报头中;And the service data header of the RapidIO device number and the RapidIO first fragment packet is formed into a control information header, and the corresponding information of the control information header is found in the first mapping relationship between the information and the routing address information in the configured control information header. Routing address information and adding it to the Ethernet header;
根据所述以太网报头、控制信息报头和所述RapidIO首分片报文中的RapidIO数据生成以太网首分片报文。Generating an Ethernet first fragmented packet according to the Ethernet header, the control information header, and the RapidIO data in the RapidIO first fragmented packet.
可选地,Optionally,
接收RapidIO设备发送的RapidIO设备编号和RapidIO后续分片报文;Receiving the RapidIO device number and the RapidIO subsequent fragment packet sent by the RapidIO device;
从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述RapidIO后续分片报文中RapidIO设备地址空间对应的业务数据报头; The service data header corresponding to the RapidIO device address space in the RapidIO subsequent fragmented packet is found in the second mapping relationship between the configured service data header and the RapidIO device address space.
将所述业务数据报头与所述RapidIO设备编号组成控制信息报头,从所述第一映射关系中查找到所述控制信息报头对应的路由地址信息;The service data header and the RapidIO device number are combined into a control information header, and the routing address information corresponding to the control information header is found in the first mapping relationship;
将查找到的路由地址信息添加到以太网报头中,根据所述以太网报头和所述RapidIO后续分片报文中的RapidIO数据生成以太网后续分片报文。Adding the found routing address information to the Ethernet header, and generating an Ethernet subsequent fragmentation packet according to the Ethernet header and the RapidIO data in the RapidIO subsequent fragmented packet.
可选地,Optionally,
所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间,被划分出的每个RapidIO设备地址空间大小相同。In the second mapping relationship between the service data header associated with the RapidIO device ID and the RapidIO device address space, each service data header used by the RapidIO device identified by the RapidIO device number is mapped to the maximum address space of the RapidIO device. A RapidIO device address space is divided. Different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
可选地,Optionally,
所述控制信息报头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括RapidIO设备编号及目的系统配置信息和源系统配置信息中的至少一种;The information in the control information header includes at least one of a destination system configuration information and a source system configuration information, or includes at least one of a RapidIO device number and destination system configuration information and source system configuration information;
所述路由地址信息包括目的MAC地址,或者包括目的MAC地址及目的IP地址和VLAN值中的至少一种。The routing address information includes a destination MAC address, or at least one of a destination MAC address and a destination IP address and a VLAN value.
可选地,Optionally,
所述以太网报文为IP报文时,所述方法还包括:When the Ethernet packet is an IP packet, the method further includes:
对RapidIO首分片报文和RapidIO后续分片报文转换时,在组成控制信息报头之后,还从配置的控制信息报头与IP报文标识的第三映射关系中查找到所述控制信息报头对应的IP报文标识并添加到以太网报头中。After the first packet of the RapidIO first packet and the subsequent fragment of the RapidIO packet are converted, the control information header is searched for from the third mapping relationship between the configured control information header and the IP packet identifier. The IP packet is identified and added to the Ethernet header.
可选地,Optionally,
所述第三映射关系按照以下方式配置:确定通信系统中每个RapidIO设备的RapidIO设备编号及使用的目的系统配置信息、源系统配置信息和数据类型信息,使得RapidIO设备编号、目的系统配置信息、源系统配置信息和数据类型的组合得到的控制信息报头的数目小于IP报文中可选的IP标识数目且大于所述通信系统在IP标识不能重复的时间段内可传输的IP报文数目;然后建立所述控制信息报头与IP标识的一一映射关系。 The third mapping relationship is configured to: determine a RapidIO device number of each RapidIO device in the communication system, and use destination system configuration information, source system configuration information, and data type information, such that the RapidIO device number, destination system configuration information, The number of control information headers obtained by combining the source system configuration information and the data type is smaller than the number of optional IP identifiers in the IP packet and greater than the number of IP packets that can be transmitted by the communication system in a period in which the IP identifier cannot be repeated; Then, a one-to-one mapping relationship between the control information header and the IP identifier is established.
本发明实施例还提供了一种以太网报文到RapidIO报文的转换方法,包括:The embodiment of the invention further provides a method for converting an Ethernet packet to a RapidIO packet, including:
接收到以太网首分片报文后,做以下转换处理:After receiving the Ethernet first fragment packet, perform the following conversion processing:
从所述以太网首分片报文的净荷中提取出包括RapidIO设备编号和业务数据报头的控制信息报头;Extracting, from the payload of the Ethernet first fragment packet, a control information header including a RapidIO device number and a service data header;
从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述业务数据报头对应的RapidIO设备地址空间并添加到RapidIO报头中;Searching for the RapidIO device address space corresponding to the service data header and adding it to the RapidIO header in the second mapping relationship between the configured service data header and the RapidIO device address space.
根据所述RapidIO报头、业务数据报头和所述净荷中除控制信息报头外的RapidIO数据生成RapidIO首分片报文。And generating a RapidIO first fragment packet according to the RapidIO header, the service data header, and the RapidIO data except the control information header in the payload.
可选地,Optionally,
接收到以太网后续分片报文后,做以下转换处理:After receiving the subsequent fragments of the Ethernet packet, perform the following conversion processing:
从所述以太网后续分片报文的报头中提取路由地址信息或IP报文标识;Extracting routing address information or an IP packet identifier from a header of the subsequent fragmentation packet of the Ethernet;
根据配置的控制信息报头中信息与路由地址信息的第一映射关系,确定所述路由地址信息对应的控制信息报头;或者,从配置的控制信息报头与IP报文标识的第三映射关系中,查找到所述IP报文标识对应的控制信息报头;所述控制信息报头包括RapidIO设备编号和业务数据报头;Determining, according to the first mapping relationship between the information in the control information header and the routing address information, the control information header corresponding to the routing address information; or, in the third mapping relationship between the configured control information header and the IP packet identifier, Finding a control information header corresponding to the IP packet identifier; the control information header includes a RapidIO device number and a service data header;
从配置的所述RapidIO设备编号关联的所述第二映射关系中查找到所述业务数据报头对应的RapidIO设备地址空间并添加到RapidIO报头中;Searching for the RapidIO device address space corresponding to the service data header from the second mapping relationship associated with the configured RapidIO device number, and adding the address to the RapidIO header;
将所述以太网后续分片报文的净荷作为RapidIO数据,和所述RapidIO报头一起生成RapidIO后续分片报文。The payload of the subsequent packet of the Ethernet is used as the RapidIO data, and the RapidIO subsequent fragment packet is generated together with the RapidIO header.
可选地,Optionally,
所述控制信息报头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括RapidIO设备编号及目的系统配置信息和源系统配置信息中的至少一种;The information in the control information header includes at least one of a destination system configuration information and a source system configuration information, or includes at least one of a RapidIO device number and destination system configuration information and source system configuration information;
所述路由地址信息包括目的MAC地址,或者包括目的MAC地址及目的 IP地址和VLAN值中的至少一种。The routing address information includes a destination MAC address, or includes a destination MAC address and destination. At least one of an IP address and a VLAN value.
可选地,Optionally,
所述第三映射关系按照以下方式配置:确定通信系统中每个RapidIO设备的RapidIO设备编号及使用的目的系统配置信息、源系统配置信息和数据类型信息,使得RapidIO设备编号、目的系统配置信息、源系统配置信息和数据类型的组合得到的控制信息报头的数目小于IP报文中可选的IP标识数目且大于所述通信系统在IP标识不能重复的时间段内可传输的IP报文数目;然后建立所述控制信息报头与IP标识的一一映射关系。The third mapping relationship is configured to: determine a RapidIO device number of each RapidIO device in the communication system, and use destination system configuration information, source system configuration information, and data type information, such that the RapidIO device number, destination system configuration information, The number of control information headers obtained by combining the source system configuration information and the data type is smaller than the number of optional IP identifiers in the IP packet and greater than the number of IP packets that can be transmitted by the communication system in a period in which the IP identifier cannot be repeated; Then, a one-to-one mapping relationship between the control information header and the IP identifier is established.
可选地,Optionally,
所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间,被划分出的每个RapidIO设备地址空间大小相同。In the second mapping relationship between the service data header associated with the RapidIO device ID and the RapidIO device address space, each service data header used by the RapidIO device identified by the RapidIO device number is mapped to the maximum address space of the RapidIO device. A RapidIO device address space is divided. Different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
本发明实施例还提供了一种RapidIO报文到以太网报文的报文转换设备,包括:The embodiment of the invention further provides a packet conversion device for a RapidIO packet to an Ethernet packet, including:
RapidIO报文解析装置,设置为接收RapidIO设备编号和非分片的RapidIO报文,提取所述RapidIO报文中的业务数据报头和RapidIO数据;The RapidIO packet parsing device is configured to receive the RapidIO device number and the non-fragmented RapidIO packet, and extract the service data header and the RapidIO data in the RapidIO packet;
控制信息报头生成装置,设置为将所述RapidIO设备编号和所述业务数据报头组成控制信息报头;a control information header generating device, configured to form the RapidIO device number and the service data header into a control information header;
路由地址映射装置,设置为从配置的控制信息报头中信息与路由地址信息的第一映射关系中,查找到所述控制信息报头对应的路由地址信息;以及The routing address mapping device is configured to: find the routing address information corresponding to the control information header from the first mapping relationship between the information and the routing address information in the configured control information header;
以太网报文生成装置,设置为将所述路由地址信息添加到以太网报头中,根据所述以太网报头、控制信息报头和RapidIO数据生成以太网报文。The Ethernet packet generating device is configured to add the routing address information to an Ethernet header, and generate an Ethernet packet according to the Ethernet header, the control information header, and the RapidIO data.
可选地,Optionally,
所述报文转换设备用可编程逻辑器件实现。 The message conversion device is implemented by a programmable logic device.
可选地,Optionally,
所述路由地址映射装置中配置的所述第一映射关系中,所述控制信息报头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括RapidIO设备编号及目的系统配置信息和源系统配置信息中的至少一种;所述路由地址信息包括目的MAC地址,或者包括目的MAC地址及目的IP地址和VLAN值中的至少一种。In the first mapping relationship configured in the routing address mapping device, the information in the control information header includes at least one of destination system configuration information and source system configuration information, or includes a RapidIO device number and destination system configuration information. And at least one of source system configuration information; the routing address information includes a destination MAC address, or includes at least one of a destination MAC address and a destination IP address and a VLAN value.
本发明实施例还提供了一种以太网报文到RapidIO报文的报文转换设备,包括:The embodiment of the invention further provides a packet conversion device for an Ethernet packet to a RapidIO packet, including:
以太网报文解析装置,设置为接收非分片的以太网报文,从所述以太网报文的净荷中提取包括RapidIO设备编号和业务数据报头的控制信息报头及RapidIO数据;An Ethernet packet parsing apparatus is configured to receive a non-fragmented Ethernet packet, and extract, from the payload of the Ethernet packet, a control information header and a RapidIO data including a RapidIO device number and a service data header;
地址空间映射装置,设置为从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述业务数据报头对应的RapidIO设备地址空间;以及The address space mapping device is configured to find a RapidIO device address space corresponding to the service data header from a second mapping relationship between the service data header associated with the configured RapidIO device number and the RapidIO device address space;
RapidIO报文生成装置,设置为将查找到的RapidIO设备地址空间添加到RapidIO报头中,根据所述RapidIO报头、业务数据报头和RapidIO数据生成非分片的RapidIO报文。The RapidIO packet generating device is configured to add the discovered RapidIO device address space to the RapidIO header, and generate a non-fragmented RapidIO packet according to the RapidIO header, the service data header, and the RapidIO data.
可选地,Optionally,
所述报文转换设备用可编程逻辑器件实现。The message conversion device is implemented by a programmable logic device.
可选地,Optionally,
所述地址空间映射装置中配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间,被划分出的每个RapidIO设备地址空间大小相同。 In the second mapping relationship between the service data header associated with the RapidIO device number and the RapidIO device address space configured in the address space mapping device, each service data header used by the RapidIO device identified by the RapidIO device number is mapped to A RapidIO device address space is allocated in the maximum address space of the RapidIO device, and different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
本发明实施例还提供了一种RapidIO报文到以太网报文的报文转换设备,包括:The embodiment of the invention further provides a packet conversion device for a RapidIO packet to an Ethernet packet, including:
RapidIO报文解析装置,设置为接收RapidIO设备编号和RapidIO首分片报文,提取出所述RapidIO首分片报文中的业务数据报头和RapidIO数据,并将接收的报文类型通知以太网报文生成装置;The RapidIO packet parsing device is configured to receive the RapidIO device number and the RapidIO first fragment packet, extract the service data header and the RapidIO data in the RapidIO first fragment packet, and notify the Ethernet packet of the received packet type. Text generation device;
控制信息报头生成装置,设置为将所述RapidIO设备编号和所述RapidIO报文解析装置提取出的所述业务数据报头组成控制信息报头;a control information header generating device, configured to form the control information header by the RapidIO device number and the service data header extracted by the RapidIO packet parsing device;
路由地址映射装置,设置为根据所述控制信息报头生成装置组成的控制信息报头,从配置的控制信息报头中信息与路由地址信息的第一映射关系中查找到对应的路由地址信息;以及The routing address mapping device is configured to: according to the control information header formed by the control information header generating device, find the corresponding routing address information from the first mapping relationship between the information and the routing address information in the configured control information header;
以太网报文生成装置,设置为在接收的报文类型为RapidIO首分片报文时,将所述路由地址映射装置查找到的路由地址信息添加到以太网报头中,根据所述以太网报头、控制信息报头和RapidIO数据生成以太网首分片报文。The Ethernet packet generating device is configured to add, when the received packet type is a RapidIO first fragment packet, the routing address information found by the routing address mapping device to the Ethernet header, according to the Ethernet header. The control information header and the RapidIO data generate an Ethernet first fragment message.
可选地,Optionally,
所述报文转换设备还包括地址空间映射装置,其中:The message conversion device further includes an address space mapping device, wherein:
所述RapidIO报文解析装置还设置为接收RapidIO后续分片,提取出所述RapidIO后续分片报文中的RapidIO设备地址空间和RapidIO数据,并将接收的报文类型通知以太网报文生成装置;The RapidIO packet parsing apparatus is further configured to receive the subsequent fragment of the RapidIO, extract the RapidIO device address space and the RapidIO data in the subsequent fragmented fragmentation message, and notify the Ethernet packet generating apparatus of the received packet type. ;
所述地址空间映射装置,设置为从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述RapidIO设备地址空间对应的业务数据报头;The address space mapping device is configured to find a service data header corresponding to the address space of the RapidIO device from a second mapping relationship between the service data header associated with the configured RapidIO device number and the RapidIO device address space;
所述控制信息报头生成装置,还设置为将所述RapidIO设备编号和所述地址空间映射装置查找到的所述业务数据报头组成控制信息报头;The control information header generating device is further configured to form, by the RapidIO device number and the service data header searched by the address space mapping device, a control information header;
所述以太网报文生成装置,还设置为在接收的报文类型为RapidIO后续分片报文时,将所述路由地址映射装置查找到的路由地址信息添加到以太网报头中,根据所述以太网报头和RapidIO数据生成以太网后续分片报文。The Ethernet packet generating device is further configured to: when the received packet type is a RapidIO subsequent fragment packet, add the routing address information found by the routing address mapping device to the Ethernet header, according to the The Ethernet header and RapidIO data generate Ethernet subsequent fragmented packets.
可选地,Optionally,
所述地址空间映射装置中配置的所述RapidIO设备编号关联的业务数据 报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间,被划分出的每个RapidIO设备地址空间大小相同。Service data associated with the RapidIO device number configured in the address space mapping device In the second mapping relationship between the header and the RapidIO device address space, each service data header used by the RapidIO device identified by the RapidIO device number is mapped to a RapidIO device address space that is divided in the maximum address space of the RapidIO device. Different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
可选地,Optionally,
所述报文转换设备还包括:The packet conversion device further includes:
IP标识映射装置,设置为根据所述控制信息报头生成装置组成的控制信息报头,从配置的控制信息报头与IP报文标识的第三映射关系中查找到所述控制信息报头对应的IP报文标识;The IP identifier mapping device is configured to search for the IP packet corresponding to the control information header from the third mapping relationship between the configured control information header and the IP packet identifier according to the control information header formed by the control information header generating device. Identification
所述以太网报文生成装置,还设置为在接收的报文类型为RapidIO首分片报文和RapidIO后续分片报文,将IP标识映射装置查找到的所述IP报文标识添加到以太网报头中。The Ethernet packet generating device is further configured to add the IP packet identifier that is found by the IP identifier mapping device to the Ethernet when the received packet type is a RapidIO first fragment packet and a RapidIO subsequent fragment packet. In the net header.
可选地,Optionally,
所述报文转换设备用可编程逻辑器件实现。The message conversion device is implemented by a programmable logic device.
可选地,Optionally,
所述路由地址映射装置中配置的所述第一映射关系中,所述控制信息报头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括RapidIO设备编号及目的系统配置信息和源系统配置信息中的至少一种;所述路由地址信息包括目的MAC地址,或者包括目的MAC地址及目的IP地址和VLAN值中的至少一种。In the first mapping relationship configured in the routing address mapping device, the information in the control information header includes at least one of destination system configuration information and source system configuration information, or includes a RapidIO device number and destination system configuration information. And at least one of source system configuration information; the routing address information includes a destination MAC address, or includes at least one of a destination MAC address and a destination IP address and a VLAN value.
本发明实施例还提供了一种以太网报文到RapidIO报文的报文转换设备,包括:The embodiment of the invention further provides a packet conversion device for an Ethernet packet to a RapidIO packet, including:
以太网报文解析装置,设置为接收到以太网首分片报文后,从其净荷中提取控制信息报头及RapidIO数据,并将接收的报文类型通知RapidIO报文生成装置,所述控制信息报头包括RapidIO设备编号和业务数据报头;The Ethernet packet parsing device is configured to: after receiving the Ethernet first fragment packet, extract the control information header and the RapidIO data from the payload, and notify the RapidIO packet generating device of the received packet type, where the control The information header includes the RapidIO device number and the service data header;
地址空间映射装置,设置为根据所述以太网报文解析装置提取的控制信 息报头中的RapidIO设备编号和业务数据报头,从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述业务数据报头对应的RapidIO设备地址空间;以及An address space mapping device configured to receive a control letter according to the Ethernet packet parsing device The RapidIO device number and the service data header in the message header, and the RapidIO device address space corresponding to the service data header is found in the second mapping relationship between the service data header associated with the configured RapidIO device number and the RapidIO device address space. ;as well as
RapidIO报文生成装置,设置为在接收的报文类型为以太网首分片报文时,将所述地址空间映射装置查找到的RapidIO设备地址空间添加到RapidIO报头中,根据所述RapidIO报头、业务数据报头和RapidIO数据生成非分片的RapidIO报文。The RapidIO packet generating device is configured to add, when the received packet type is an Ethernet first fragment packet, the RapidIO device address space found by the address space mapping device to the RapidIO header, according to the RapidIO header, The service data header and the RapidIO data generate non-fragmented RapidIO messages.
可选地,Optionally,
所述报文转换设备还包括路由地址映射装置和/或IP标识映射装置,其中:The message conversion device further includes a routing address mapping device and/or an IP identification mapping device, wherein:
所述以太网报文解析装置,还设置为接收到以太网后续分片报文后,解析出其报头和净荷,并从所述报头中提取出路由地址信息或IP报文标识;The Ethernet packet parsing device is further configured to parse the header and the payload after receiving the subsequent fragmentation packet of the Ethernet, and extract the routing address information or the IP packet identifier from the header.
所述路由地址映射装置,设置为根据所述以太网报文解析装置提取的路由地址信息,查找配置的控制信息报头中信息与路由地址信息的第一映射关系以确定对应的控制信息报头;The routing address mapping device is configured to search for a first mapping relationship between the information in the configured control information header and the routing address information according to the routing address information extracted by the Ethernet packet parsing device to determine a corresponding control information header;
所述IP标识映射装置,设置为根据所述以太网报文解析装置提取的IP报文标识,从配置的控制信息报头与IP报文标识的第三映射关系中查找到对应的控制信息报头;The IP identifier mapping device is configured to search for a corresponding control information header from a third mapping relationship between the configured control information header and the IP packet identifier according to the IP packet identifier extracted by the Ethernet packet parsing device;
所述地址空间映射装置,还设置为根据所述路由地址映射装置或IP标识映射装置得到的控制信息报头中的RapidIO设备编号和业务数据报头,从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述业务数据报头对应的RapidIO设备地址空间;The address space mapping device is further configured to: according to the RapidIO device number and the service data header in the control information header obtained by the routing address mapping device or the IP identifier mapping device, the service data header associated with the configured RapidIO device number In the second mapping relationship with the address space of the RapidIO device, the RapidIO device address space corresponding to the service data header is found;
所述RapidIO报文生成装置,还设置为在接收的报文类型为以太网后续分片报文时,将所述地址空间映射装置查找到的RapidIO设备地址空间添加到RapidIO报头中,将所述以太网后续分片报文的净荷作为RapidIO数据,和所述RapidIO报头一起生成RapidIO后续分片报文。And the RapidIO packet generating device is further configured to: when the received packet type is an Ethernet subsequent fragment packet, add the RapidIO device address space found by the address space mapping device to the RapidIO header, and the The payload of the subsequent fragmented packet of the Ethernet is used as the RapidIO data, and the RapidIO subsequent fragmented packet is generated together with the RapidIO header.
可选地,Optionally,
所述路由地址映射装置中配置的所述第一映射关系中,所述控制信息报 头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括RapidIO设备编号及目的系统配置信息和源系统配置信息中的至少一种;所述路由地址信息包括目的MAC地址,或者包括目的MAC地址及目的IP地址和VLAN值中的至少一种。The control informationgram in the first mapping relationship configured in the routing address mapping device The header information includes at least one of destination system configuration information and source system configuration information, or at least one of a RapidIO device number and destination system configuration information and source system configuration information; the routing address information includes a destination MAC address, Or include at least one of a destination MAC address and a destination IP address and a VLAN value.
可选地,Optionally,
所述地址空间映射装置中配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间,被划分出的每个RapidIO设备地址空间大小相同。In the second mapping relationship between the service data header associated with the RapidIO device number and the RapidIO device address space configured in the address space mapping device, each service data header used by the RapidIO device identified by the RapidIO device number is mapped to A RapidIO device address space is allocated in the maximum address space of the RapidIO device, and different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
上述方案提供一种RapidIO报文和以太网报文之间的转换方法,通过映射的方式来实现RapidIO报文和以太网报文之间的数据转换,因此适用于可编程逻辑设备来实现。利用可编程逻辑设备的高速处理能力,可以很小的时延代价实现系统设备间大量RapidIO报文与以太网报文的互相转换,减少CPU处理带来的数据时延,最大程度利用数据链路的带宽资源。The foregoing solution provides a method for converting between a RapidIO packet and an Ethernet packet, and implements data conversion between the RapidIO packet and the Ethernet packet by means of mapping, and is therefore applicable to a programmable logic device. Utilizing the high-speed processing capability of the programmable logic device, a large number of RapidIO messages and Ethernet packets can be converted between system devices with a small delay, reducing the data delay caused by CPU processing and maximizing the use of data links. Bandwidth resources.
附图概述BRIEF abstract
图1是系统中RapidIO设备通过以太网接口与以太网设备互联应用的架构图。Figure 1 is an architectural diagram of a RapidIO device interconnected with an Ethernet device through an Ethernet interface.
图2是系统中RapidIO设备通过以太网接口与RapidIO设备互联应用的架构图。Figure 2 is an architectural diagram of a RapidIO device interconnected with a RapidIO device through an Ethernet interface.
图3是本发明实施例一从RapidIO报文提取数据业务报头并组成控制信息报头的示意图。FIG. 3 is a schematic diagram of extracting a data service header from a RapidIO packet and forming a control information header according to Embodiment 1 of the present invention.
图4是本发明实施例一报文转换方法的流程图。FIG. 4 is a flowchart of a message conversion method according to an embodiment of the present invention.
图5、图6和图7分别是将RapidIO报文映射为MAC报文、IPV4报文和IPV6报文的示意图。 Figure 5, Figure 6, and Figure 7 are diagrams for mapping a RapidIO packet to a MAC packet, an IPV4 packet, and an IPV6 packet, respectively.
图8是本发明实施例一报文转换设备的结构示意图。FIG. 8 is a schematic structural diagram of a message conversion device according to an embodiment of the present invention.
图9是本发明实施例二报文转换方法的流程图。FIG. 9 is a flowchart of a packet conversion method according to Embodiment 2 of the present invention.
图10是本发明实施例二报文转换设备的结构示意图。FIG. 10 is a schematic structural diagram of a message conversion device according to Embodiment 2 of the present invention.
图11是本发明实施例三根据RapidIO设备地址空间映射得到业务数据报头,并组成控制信息报文的示意图。FIG. 11 is a schematic diagram of a service data header obtained by the RapidIO device address space mapping according to the third embodiment of the present invention, and forming a control information message.
图12和图13分别是本发明实施例三对首分片和后续分片的报文转换方法的流程图。FIG. 12 and FIG. 13 are flowcharts respectively showing a method for converting a message of a first slice and a subsequent slice according to the third embodiment of the present invention.
图14是本发明实施例三报文转换设备的结构示意图。FIG. 14 is a schematic structural diagram of a packet conversion device according to Embodiment 3 of the present invention.
图15和图16分别是本发明实施例四对首分片和后续分片的报文转换方法的流程图。FIG. 15 and FIG. 16 are flowcharts respectively showing a packet conversion method of a first slice and a subsequent slice according to an embodiment of the present invention.
图17是本发明实施例四报文转换设备的结构示意图。FIG. 17 is a schematic structural diagram of a message conversion device according to Embodiment 4 of the present invention.
本发明的实施方式Embodiments of the invention
下文中将结合附图对本发明实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。The embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
实施例一Embodiment 1
基于传递效率的考虑,RapidIO报文通常在传递过程中出现分片报文进行传递,以及不同分片报文交替传递的情况。Based on the consideration of transfer efficiency, RapidIO packets usually have fragmented packets delivered during the delivery process, and different fragments are transmitted alternately.
本实施例涉及非分片的RapidIO报文到非分片的以太网报文的转换。This embodiment relates to the conversion of non-fragmented RapidIO messages to non-fragmented Ethernet messages.
非分片的RapidIO报文的结构可以参见图3,包括RapidIO报头和净荷,其中净荷部分在RapidIO数据前字段位置包含一个业务数据报头,该业务数据报头中携带有目的系统配置信息(包括但不限于目的系统的设备信息、子系统信息、状态信息等)、源系统配置信息(包括但不限于目的系统的设备信息、子系统信息、状态信息等)和数据类型信息(包括但不限于消息类型、消息号等)。RapidIO设备在发送RapidIO报文时会同时发送RapidIO设备编号,根据该RapidIO设备编号可以识别发送RapidIO报文的RapidIO设备。 The structure of the non-fragmented RapidIO packet can be seen in Figure 3, including the RapidIO header and payload. The payload part contains a service data header in the position of the front field of the RapidIO data. The service data header carries the destination system configuration information (including But not limited to device information, subsystem information, status information, etc. of the destination system), source system configuration information (including but not limited to device information of the destination system, subsystem information, status information, etc.) and data type information (including but not limited to Message type, message number, etc.). The RapidIO device sends the RapidIO device number when sending RapidIO packets. The RapidIO device can identify the RapidIO device that sends RapidIO packets.
本实施例RapidIO报文到以太网报文的转换方法如图4所示,包括:The method for converting a RapidIO packet to an Ethernet packet in this embodiment is as shown in FIG. 4, and includes:
步骤110,接收RapidIO设备发送的RapidIO设备编号和非分片的RapidIO报文;Step 110: Receive a RapidIO device number and a non-fragmented RapidIO packet sent by the RapidIO device.
可选地,本步骤中还提取所述RapidIO报文中的业务数据报头和RapidIO数据。Optionally, the service data header and the RapidIO data in the RapidIO packet are also extracted in this step.
步骤120,将所述RapidIO设备编号和所述RapidIO报文中的业务数据报头组成控制信息报头,从配置的控制信息报头中信息与路由地址信息的第一映射关系中,查找到所述控制信息报头对应的路由地址信息;In step 120, the RapidIO device number and the service data header in the RapidIO packet are combined into a control information header, and the control information is found in the first mapping relationship between the information and the routing address information in the configured control information header. Routing address information corresponding to the header;
RapidIO设备编号和业务数据报头组成的控制信息报头是RapidIO报文和以太网报文互相映射的纽带,其结构如图3所示。The control information header consisting of the RapidIO device number and the service data header is a link between the RapidIO packet and the Ethernet packet. The structure is shown in Figure 3.
如果只需要对一个RapidIO设备的RapidIO报文进行转换,配置的第一映射关系中的控制信息报头中信息可以不使用RapidIO设备编号,如可以使用目的系统配置信息和/或源系统配置信息与路由地址信息的映射关系。如果需要对多个RapidIO设备的RapidIO报文进行转换,上述控制信息报头中信息可以包括RapidIO设备编号,及目的系统配置信息和源系统配置信息中的至少一种。If only the RapidIO packet of a RapidIO device needs to be translated, the information in the control information header in the configured first mapping relationship may not use the RapidIO device number. For example, the destination system configuration information and/or the source system configuration information and route may be used. Mapping relationship of address information. If the RapidIO packet of the plurality of RapidIO devices needs to be converted, the information in the control information header may include at least one of a RapidIO device number, a destination system configuration information, and a source system configuration information.
路由地址用来确定数据包发送的目的系统。如果以太网报文是MAC(媒体访问控制)报文,路由地址信息包括目的MAC地址,还可以包括源MAC地址和VLAN(虚拟局域网)中的至少一种,如果以太网报文是IP报文,路由地址信息包括目的IP地址和目的MAC地址,还可以包括源IP地址和VLAN中的至少一种。The routing address is used to determine the destination system for packet delivery. If the Ethernet packet is a MAC (Media Access Control) packet, the routing address information includes the destination MAC address, and may include at least one of a source MAC address and a VLAN (Virtual Local Area Network), if the Ethernet packet is an IP packet. The routing address information includes a destination IP address and a destination MAC address, and may further include at least one of a source IP address and a VLAN.
可选地,在第一映射关系中,将目的系统配置信息和/或源系统配置信息作为控制信息报头中信息或其中的一部分建立与路由地址的映射关系,路由地址与系统配置信息强相关,有利于快速索引,加快映射过程的查表时间。Optionally, in the first mapping relationship, the destination system configuration information and/or the source system configuration information is used as a mapping relationship between the information in the control information header or a part of the routing information, and the routing address is strongly correlated with the system configuration information. Conducive to fast indexing, speed up the lookup time of the mapping process.
所述第一映射关系为预配置的。The first mapping relationship is pre-configured.
步骤130,将查找到的路由地址信息添加到以太网报头中,根据所述以太网报头、控制信息报头和所述RapidIO报文中的RapidIO数据生成以太网报文。 Step 130: Add the found routing address information to the Ethernet header, and generate an Ethernet packet according to the Ethernet header, the control information header, and the RapidIO data in the RapidIO packet.
以太网报头包括MAC报文、IPV4报文和IPV6报文,图5、图6和图7分别示出了将RapidIO报文转换为这些以太网报文的情况。The Ethernet header includes a MAC packet, an IPV4 packet, and an IPV6 packet. FIG. 5, FIG. 6, and FIG. 7 respectively show a case where a RapidIO packet is converted into these Ethernet packets.
如图5所示,将RapidIO报文转换为MAC报文时,根据控制信息报头中信息映射得到路由控制信息,其中至少包括目的MAC地址,对于MAC报头中的其他字段,可以根据协议规定填充即可。如报文类型可以填充为0x0806,VLAN信息可选,源MAC地址对于每一RapidIO设备都有配置,可以直接根据配置得到。对于非分片的MAC报文,其净荷中包括了控制信息报头和RapidIO数据。As shown in FIG. 5, when the RapidIO packet is converted into a MAC packet, the routing control information is obtained according to the information mapping in the control information header, where at least the destination MAC address is included, and other fields in the MAC header may be filled according to the protocol. can. For example, the packet type can be padded to 0x0806, and the VLAN information is optional. The source MAC address is configured for each RapidIO device and can be obtained directly according to the configuration. For non-sharded MAC packets, the payload includes the control information header and the RapidIO data.
如图6所示,将RapidIO报文转换为IPV4报文时,需要得到MAC报头和IPV4报头,根据控制信息报头转换得到其中的MAC报头的方式如上,对于非分片的IP报文中的IPV4报头,目的IP地址根据控制信息报头映射得到,其他字段依照相关协议规定,根据配置的相应参数或者数据的长度等填充即可,无需复杂运算,这里不再一一赘述。IPV4报文的净荷中包括控制信息报头和RapidIO数据。图中,VLAN信息为模拟局域网信息值;V/H为版本类型/报头长度;TOS为服务类型;Len为报文总长度;ID为报文标识符;TTL为生存时间。As shown in Figure 6, when converting a RapidIO packet to an IPV4 packet, you need to obtain the MAC header and the IPV4 header. The method of converting the MAC header according to the control information header is as follows. For the IPV4 in the non-fragmented IP packet. In the header, the destination IP address is obtained according to the control information header mapping, and other fields are filled according to the corresponding parameters of the configuration or the length of the data according to the relevant protocol, and no complicated operation is required, and details are not described herein again. The payload of the IPV4 message includes the control information header and the RapidIO data. In the figure, the VLAN information is the analog LAN information value; V/H is the version type/header length; TOS is the service type; Len is the total length of the message; ID is the message identifier; TTL is the lifetime.
如图7所示,将RapidIO报文转换为IPV4报文时,需要得到包括MAC报头和IPV6报头,根据控制信息报头转换得到其中的MAC报头的方式如上,对于非分片的IP报文中的IPV6报头,目的IP地址根据控制信息报头映射得到,其他字段依照相关协议规定,根据配置的相应参数或者数据的长度等填充即可,无需复杂运算,这里不再一一赘述。IPV6报文的净荷中包括控制信息报头和RapidIO数据。As shown in Figure 7, when converting a RapidIO packet to an IPV4 packet, the MAC header and the IPV6 header are obtained, and the MAC header is obtained according to the control information header, as in the above, for the non-fragmented IP packet. In the IPV6 header, the destination IP address is obtained according to the control information header mapping. Other fields are filled according to the corresponding parameters of the configuration or the length of the data according to the relevant protocol, and no complicated operation is required, and details are not described herein. The payload of the IPV6 message includes the control information header and the RapidIO data.
相应地,本实施例还提供了一种RapidIO报文到以太网报文的报文转换设备,该报文转换设备用可编程逻辑器件实现。图8中同时示出了与该报文转换设备连接的RapidIO接口和以太网接口,该报文转换设备从RapidIO接口接收RapidIO设备编号和非分片的RapidIO报文,转换为以太网报文后,发送到以太网设备接口。如图所示,该报文转换设备包括:Correspondingly, the embodiment further provides a packet conversion device for a RapidIO packet to an Ethernet packet, and the packet conversion device is implemented by a programmable logic device. Also shown in FIG. 8 is a RapidIO interface and an Ethernet interface connected to the packet conversion device. The packet conversion device receives the RapidIO device number and the non-fragmented RapidIO packet from the RapidIO interface, and converts the packet into an Ethernet packet. , sent to the Ethernet device interface. As shown in the figure, the message conversion device includes:
RapidIO报文解析装置10,设置为接收RapidIO设备编号和非分片的 RapidIO报文,提取所述RapidIO报文中的业务数据报头和RapidIO数据;RapidIO message parsing device 10, configured to receive RapidIO device numbers and non-fragmented a RapidIO packet, which extracts a service data header and RapidIO data in the RapidIO packet;
控制信息报头生成装置20,设置为将所述RapidIO设备编号和所述业务数据报头组成控制信息报头;The control information header generating device 20 is configured to form the RapidIO device number and the service data header into a control information header;
路由地址映射装置30,设置为从配置的控制信息报头中信息与路由地址信息的第一映射关系中,查找到所述控制信息报头对应的路由地址信息;以及The routing address mapping device 30 is configured to find the routing address information corresponding to the control information header from the first mapping relationship between the information and the routing address information in the configured control information header;
以太网报文生成装置40,设置为将所述路由地址信息添加到以太网报头中,根据所述以太网报头、控制信息报头和RapidIO数据生成以太网报文。生成3种类型的以太网报文的方式可参照本实施例流程中的说明,生成的以太网报文传送到以太网设备接口,经网络发送到目的系统中的RapidIO设备或以太网设备,如果发送到RapidIO设备,该RapidIO设备需要将以太网报文转换成RapidIO报文,如果发送到以太网设备则无需再转换。The Ethernet packet generating device 40 is configured to add the routing address information to an Ethernet header, and generate an Ethernet packet according to the Ethernet header, the control information header, and the RapidIO data. For the method of generating three types of Ethernet packets, refer to the description in the process of this embodiment. The generated Ethernet packets are transmitted to the Ethernet device interface and sent to the RapidIO device or Ethernet device in the destination system through the network. Sent to the RapidIO device, which needs to convert Ethernet packets into RapidIO messages. If it is sent to an Ethernet device, there is no need to convert it.
可选地,Optionally,
路由地址映射装置30中配置的所述第一映射关系中,所述控制信息报头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括RapidIO设备编号及目的系统配置信息和源系统配置信息中的至少一种;所述路由地址信息包括目的MAC地址,或者包括目的MAC地址及目的IP地址和VLAN值中的至少一种。In the first mapping relationship configured in the routing address mapping device 30, the information in the control information header includes at least one of destination system configuration information and source system configuration information, or includes a RapidIO device number and destination system configuration information. At least one of source system configuration information; the routing address information includes a destination MAC address, or at least one of a destination MAC address and a destination IP address and a VLAN value.
虽然图中的RapidIO数据先传送到控制信息报头生成装置20再传送到以太网报文生成装置40,但也可以直接传送到控制信息报头生成装置20。本发明实施例对此并不加以限制。Although the RapidIO data in the figure is first transmitted to the control information header generating means 20 and then transmitted to the Ethernet message generating means 40, it may be directly transmitted to the control information header generating means 20. This embodiment of the present invention does not limit this.
实施例二Embodiment 2
本实施例涉及非分片的以太网报文到非分片的RapidIO报文的转换。This embodiment relates to the conversion of non-fragmented Ethernet messages to non-fragmented RapidIO messages.
本实施例非分片的以太网报文的结构已在图5、图6和图7中示出。报文的净荷中包括控制信息报头和RapidIO数据,而控制信息报头又包括RapidIO设备编号和业务数据报头。要转换成的RapidIO报文的结构在图3中示出,包括RapidIO报头和净荷,在RapidIO报头中包括RapidIO设备地 址空间的信息(未示出),RapidIO设备地址空间指示了所在RapidIO报头在内存中的存储位置。RapidIO互联架构中,每一RapidIO设备分配有一独立的地址空间以存储该RapidIO设备的报文。净荷中包括数据业务报头和随后的RapidIO数据。The structure of the non-fragmented Ethernet message of this embodiment has been shown in FIGS. 5, 6, and 7. The payload of the message includes a control information header and RapidIO data, and the control information header includes a RapidIO device number and a service data header. The structure of the RapidIO message to be converted is shown in Figure 3, including the RapidIO header and payload, including the RapidIO device in the RapidIO header. Information about the address space (not shown), the RapidIO device address space indicates where the RapidIO header is stored in memory. In the RapidIO interconnect architecture, each RapidIO device is assigned a separate address space to store the packets of the RapidIO device. The payload includes the data service header and subsequent RapidIO data.
本实施例以太网报文到RapidIO报文的转换方法如图9所示,包括:The method for converting the Ethernet packet to the RapidIO packet in this embodiment is as shown in FIG. 9, and includes:
步骤210,接收到非分片的以太网报文,从所述以太网报文的净荷中提取出包括RapidIO设备编号和业务数据报头的控制信息报头;Step 210: Receive a non-fragmented Ethernet packet, and extract a control information header including a RapidIO device number and a service data header from the payload of the Ethernet packet.
步骤220,从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述业务数据报头对应的RapidIO设备地址空间;In step 220, the RapidIO device address space corresponding to the service data header is found in the second mapping relationship between the service data header associated with the configured RapidIO device number and the RapidIO device address space.
所述第二映射关系为预配置的,其中包括所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的映射关系。The second mapping relationship is pre-configured, and includes a mapping relationship between the service data header associated with the RapidIO device ID and the RapidIO device address space.
RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间。可选地,划分出的每个RapidIO设备地址空间大小相同,这样更方便数据的存储定位。RapidIO设备地址空间可以时分复用。In the second mapping relationship between the service data header associated with the RapidIO device number and the address space of the RapidIO device, each service data header used by the RapidIO device identified by the RapidIO device number is mapped to the maximum address space of the RapidIO device and is divided. A RapidIO device address space, different service data headers corresponding to different RapidIO device address spaces. Optionally, each RapidIO device has the same address space, which is more convenient for data storage and positioning. The RapidIO device address space can be time multiplexed.
步骤230,将查找到的RapidIO设备地址空间添加到RapidIO报头中,根据所述RapidIO报头、业务数据报头和所述净荷中除控制信息报头外的RapidIO数据生成非分片的RapidIO报文。Step 230: Add the discovered RapidIO device address space to the RapidIO header, and generate a non-fragmented RapidIO packet according to the RapidIO header, the service data header, and the RapidIO data except the control information header in the payload.
在数据传输来看,在步骤210中已经解析出RapidIO设备编号,生成非分片的RapidIO报文后,将所述RapidIO设备编号和非分片的RapidIO报文传送到RapidIO接口再发送给相应的RapidIO设备。In the data transmission, the RapidIO device number is parsed in step 210, and after the non-fragmented RapidIO packet is generated, the RapidIO device number and the non-fragmented RapidIO packet are transmitted to the RapidIO interface and then sent to the corresponding RapidIO device.
相应地,本实施例还提供了一种以太网报文到RapidIO报文的报文转换设备,该报文转换设备用可编程逻辑器件实现。图10中同时示出了与该报文转换设备连接的RapidIO接口和以太网接口,该报文转换设备从以太网设备 接口接收非分片的以太网报文,转换为RapidIO报文后发送到RapidIO接口。如图所示,该报文转换设备包括:Correspondingly, the embodiment further provides a message conversion device for transmitting Ethernet packets to RapidIO messages, and the message conversion device is implemented by a programmable logic device. Also shown in FIG. 10 is a RapidIO interface and an Ethernet interface connected to the message conversion device, the message conversion device from the Ethernet device The interface receives non-fragmented Ethernet packets and converts them to RapidIO packets and sends them to the RapidIO interface. As shown in the figure, the message conversion device includes:
以太网报文解析装置50,设置为接收非分片的以太网报文,从所述以太网报文的净荷中提取包括RapidIO设备编号和业务数据报头的控制信息报头及RapidIO数据;The Ethernet packet parsing device 50 is configured to receive a non-fragmented Ethernet packet, and extract, from the payload of the Ethernet packet, a control information header and a RapidIO data including a RapidIO device number and a service data header;
地址空间映射装置60,设置为从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述业务数据报头对应的RapidIO设备地址空间;以及The address space mapping device 60 is configured to find a RapidIO device address space corresponding to the service data header from a second mapping relationship between the service data header associated with the configured RapidIO device number and the RapidIO device address space;
RapidIO报文生成装置70,设置为将查找到的RapidIO设备地址空间添加到RapidIO报头中,根据所述RapidIO报头、业务数据报头和RapidIO数据生成非分片的RapidIO报文。如图所示,生成的非分片的RapidIO报文和RapidIO设备编号一起传送到RapidIO接口。The RapidIO packet generating device 70 is configured to add the discovered RapidIO device address space to the RapidIO header, and generate a non-fragmented RapidIO packet according to the RapidIO header, the service data header, and the RapidIO data. As shown, the generated non-fragmented RapidIO message is transmitted to the RapidIO interface along with the RapidIO device number.
可选地,Optionally,
所述地址空间映射装置中配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间,且划分出的每个RapidIO设备地址空间大小相同。In the second mapping relationship between the service data header associated with the RapidIO device number and the RapidIO device address space configured in the address space mapping device, each service data header used by the RapidIO device identified by the RapidIO device number is mapped to A RapidIO device address space is allocated in the maximum address space of the RapidIO device, and different service data headers correspond to different RapidIO device address spaces, and the size of each RapidIO device address space is the same.
实施例三Embodiment 3
本实施例涉及分片的RapidIO报文到分片的以太网报文的转换。This embodiment relates to the conversion of a fragmented RapidIO packet to a fragmented Ethernet packet.
分片的RapidIO报文,包括RapidIO首分片报文和RapidIO后续分片报文。RapidIO首分片报文的结构与非分片的RapidIO报文类似,请参见图3,包括RapidIO报头和净荷且净荷中包括业务数据报头。RapidIO后续分片报文包括RapidIO报头和净荷,但净荷中通常没有业务数据报头。两者的RapidIO报头中均有RapidIO设备地址空间的信息。Fragmented RapidIO packets, including RapidIO first fragmented packets and RapidIO subsequent fragmented packets. The structure of the RapidIO first fragmented packet is similar to that of the non-fragmented RapidIO packet. See Figure 3, including the RapidIO header and payload, and the payload includes the service data header. The RapidIO subsequent fragmentation message includes the RapidIO header and payload, but there is usually no service data header in the payload. Both of the RapidIO headers have information about the RapidIO device address space.
相应地,本实施例的以太网报文也包括以太网首分片报文和以太网后续 分片报文,其中,以太网首分片报文是RapidIO首分片报文转换得到的,以太网后续分片报文是RapidIO后续分片报文转换得到的。以太网首分片报文的结构与非分片的以太网报文类似,请参见图5-7,除了报头外,其净荷中还包括控制信息报头,而以太网后续分片报文的净荷中没有控制信息报头。通过分片之间的直接转换,无需通常的分片组装过程,可以适应高速大容量数据处理的要求。Correspondingly, the Ethernet packet in this embodiment also includes the Ethernet first fragment packet and the Ethernet subsequent. The fragmented packet is obtained by converting the first packet of the Ethernet packet to the first fragment of the RapidIO packet, and the subsequent fragmentation packet of the Ethernet is obtained by converting the subsequent fragmented packet of the RapidIO. The structure of the Ethernet first fragment packet is similar to that of the non-fragmented Ethernet packet. See Figure 5-7. In addition to the header, the payload also includes the control information header, and the Ethernet subsequent fragmented packet. There is no control information header in the payload. Through the direct conversion between the slices, the normal segmentation assembly process is not required, and the requirements for high-speed and large-capacity data processing can be adapted.
因此,将RapidIO首分片报文转换为以太网首分片报文时,根据RapidIO首分片报文中的业务数据报头和RapidIO设备编号(随报文一起发送),即可查找第一映射关系得到相应的路由地址信息。但对于RapidIO后续分片报文,其中没有业务数据报头,就不能这样直接转换。为此,本实施例还为RapidIO设备配置了RapidIO设备地址空间和业务数据报头的第二映射关系,RapidIO设备在发送分片的RapidIO报文时,在确定了业务数据报头后,查找第二映射关系,找到该业务数据报头对应的RapidIO设备地址空间并添加到RapidIO报头中。这样,报文转换设备就可以根据RapidIO后续分片报文中的RapidIO设备地址空间查找到对应的业务数据报头,将业务数据报头和RapidIO设备编号组成得到控制信息报头,如图11所示意的,然后就可以查找第一映射关系得到相应的路由地址信息。Therefore, when the RapidIO first fragment packet is converted into the Ethernet first fragment packet, the first mapping can be found according to the service data header and the RapidIO device number (sent with the packet) in the RapidIO first fragment packet. The relationship gets the corresponding routing address information. However, for RapidIO subsequent fragmented packets, which do not have a service data header, this cannot be directly converted. To this end, the first mapping relationship between the RapidIO device address space and the service data header is configured for the RapidIO device. When the RapidIO device sends the fragmented RapidIO packet, the second mapping is performed after the service data header is determined. Relationship, find the RapidIO device address space corresponding to the service data header and add it to the RapidIO header. In this way, the packet conversion device can find the corresponding service data header according to the RapidIO device address space in the subsequent fragmented packet of the RapidIO, and form the control data header by the service data header and the RapidIO device number, as shown in FIG. Then you can find the first mapping relationship to get the corresponding routing address information.
如图12所示,本实施例RapidIO首分片报文到以太网首分片报文的转换包括:As shown in FIG. 12, the conversion of the RapidIO first fragment packet to the Ethernet first fragment packet in this embodiment includes:
步骤310,接收RapidIO设备发送的RapidIO设备编号和RapidIO首分片报文;Step 310: Receive a RapidIO device number and a RapidIO first fragment packet sent by the RapidIO device.
步骤320,将所述RapidIO设备编号和RapidIO首分片报文中的业务数据报头组成控制信息报头,从配置的控制信息报头中信息与路由地址信息的第一映射关系中查找到所述控制信息报头对应的路由地址信息并添加到以太网报头中;Step 320: The service data header in the RapidIO device number and the RapidIO first fragment packet is formed into a control information header, and the control information is found in the first mapping relationship between the information and the routing address information in the configured control information header. The routing address information corresponding to the header is added to the Ethernet header;
上述第一映射关系的配置可以参照实施例一。控制信息报头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括RapidIO设备编号及目的系统配置信息和源系统配置信息中的至少一种;路由地址信息包括目的MAC地址,或者包括目的MAC地址及目的IP地址和VLAN值中的 至少一种。For the configuration of the first mapping relationship, refer to the first embodiment. The information in the control information header includes at least one of a destination system configuration information and a source system configuration information, or includes at least one of a RapidIO device number and a destination system configuration information and a source system configuration information; the routing address information includes a destination MAC address, Or include the destination MAC address and destination IP address and VLAN value. At least one.
步骤330,根据所述以太网报头、控制信息报头和所述RapidIO首分片报文中的RapidIO数据生成以太网首分片报文。Step 330: Generate an Ethernet first fragmentation packet according to the Ethernet header, the control information header, and the RapidIO data in the RapidIO first fragmentation packet.
如图13所示,本实施例RapidIO后续分片报文到以太网后续分片报文的转换包括:As shown in FIG. 13, the conversion of the subsequent fragmented packet of the RapidIO to the subsequent fragmented packet of the Ethernet includes:
步骤410,接收RapidIO设备发送的RapidIO设备编号和RapidIO后续分片报文;Step 410: Receive a RapidIO device number and a RapidIO subsequent fragment packet sent by the RapidIO device.
步骤420,从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述RapidIO后续分片报文中RapidIO设备地址空间对应的业务数据报头;In step 420, the service data header corresponding to the RapidIO device address space in the subsequent fragmented packet of the RapidIO is found in the second mapping relationship between the configured service data header and the RapidIO device address space.
RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间。可选地,被划分出的每个RapidIO设备地址空间大小相同。In the second mapping relationship between the service data header associated with the RapidIO device number and the address space of the RapidIO device, each service data header used by the RapidIO device identified by the RapidIO device number is mapped to the maximum address space of the RapidIO device and is divided. A RapidIO device address space, different service data headers corresponding to different RapidIO device address spaces. Optionally, each RapidIO device address space is divided into the same size.
上述RapidIO设备的第二映射关系可以按照以下方式配置:确定所述RapidIO设备使用的目的系统配置信息的数目M1、源系统配置信息的数目M2及数据类型信息的数目M3,以及所有数据类型占用地址空间的最大值M4,且M1·M2·M3·M4小于所述RapidIO设备的最大地址空间;然后在所述RapidIO设备的最大地址空间中,将所述目的系统配置信息、源系统配置信息和数据类型信息组合得到的每一种业务数据报头映射到大小为M4的一RapidIO设备地址空间,从而完成所述第二映射关系的配置。The second mapping relationship of the above RapidIO device may be configured in the following manner: determining the number M1 of the destination system configuration information used by the RapidIO device, the number M2 of source system configuration information, and the number M3 of data type information, and all data type occupied addresses. a maximum value M4 of the space, and M1·M2·M3·M4 is smaller than a maximum address space of the RapidIO device; then, in the maximum address space of the RapidIO device, the destination system configuration information, source system configuration information, and data are Each service data header obtained by combining the type information is mapped to a RapidIO device address space of size M4, thereby completing the configuration of the second mapping relationship.
步骤430,将所述业务数据报头与所述RapidIO设备编号组成控制信息报头,从所述第一映射关系中查找到所述控制信息报头对应的路由地址信息; Step 430, the service data header and the RapidIO device number are combined into a control information header, and the routing address information corresponding to the control information header is found in the first mapping relationship.
此处的第一映射关系即图12中的第一映射关系。The first mapping relationship here is the first mapping relationship in FIG.
步骤440,将查找到的路由地址信息添加到以太网报头中,根据所述以太网报头和所述RapidIO后续分片报文中的RapidIO数据生成以太网后续分 片报文。Step 440: Add the found routing address information to the Ethernet header, and generate an Ethernet subsequent segment according to the Ethernet header and the RapidIO data in the RapidIO subsequent fragmented packet. Piece of message.
将RapidIO后续分片报文转换为以太网后续分片报文之后,如果接收方是RapidIO设备,在将以太网后续分片报文转换为RapidIO后续分片报文的过程中,需要使用控制信息报头得到RapidIO设备地址空间,但以太网后续分片报文并没有控制信息报头,而根据路由地址信息和控制信息报头中信息的第一映射关系,恢复出的可能只是控制信息报头中的部分信息(与第一映射关系的配置有关),因此,可选地,对RapidIO首分片报文和RapidIO后续分片报文转换时,在组成控制信息报头之后,还从配置的控制信息报头与IP报文标识的第三映射关系中查找到所述控制信息报头对应的IP报文标识并添加到以太网报头中。After the subsequent fragmented packets of the RapidIO are converted to the subsequent fragments of the Ethernet, if the receiver is a RapidIO device, the control information needs to be used in the process of converting the subsequent fragments of the Ethernet packets into the subsequent fragments of the RapidIO. The header obtains the address space of the RapidIO device, but the subsequent fragmentation packet of the Ethernet does not have a control information header. However, according to the first mapping relationship between the routing address information and the information in the control information header, the recovered information may be only part of the information in the control information header. (related to the configuration of the first mapping relationship), therefore, optionally, when the RapidIO first fragment packet and the RapidIO subsequent fragment packet are converted, after the control information header is formed, the configured control information header and IP are also configured. The IP packet identifier corresponding to the control information header is found in the third mapping relationship of the packet identifier and added to the Ethernet header.
其中,第三映射关系可以按照以下方式进行预配置:确定通信系统中每个RapidIO设备的RapidIO设备编号及使用的目的系统配置信息、源系统配置信息和数据类型信息,使得RapidIO设备编号、目的系统配置信息、源系统配置信息和数据类型的组合得到的控制信息报头的数目小于IP报文中可选的IP标识数目且大于所述通信系统在IP标识不能重复的时间段内可传输的IP报文数目;然后建立所述控制信息报头与IP标识的一一映射关系。The third mapping relationship may be pre-configured in the following manner: determining the RapidIO device number of each RapidIO device in the communication system, and the destination system configuration information, source system configuration information, and data type information used, so that the RapidIO device number and destination system are obtained. The number of control information headers obtained by the combination of the configuration information, the source system configuration information, and the data type is smaller than the number of optional IP identifiers in the IP packet and greater than the IP address that the communication system can transmit during the period in which the IP identifier cannot be repeated. Number of texts; then establishing a one-to-one mapping relationship between the control information header and the IP identifier.
需要说明的是,IP报文标识(如图6中IPV4报头中的ID)主要关联同一个以太网报文的不同分片,以与其他报文中的分片区分开。可以采用本实施例的编号方式,如果不做IP报文标识的映射,也可以采用其他的编号方式。或者,在IP报文的传递过程中,如果不需要考虑传递效率,以太网后续分片报文总是出现相应的首分片报文后,也可以不设置IP报文标识。It should be noted that the IP packet identifier (such as the ID in the IPV4 header in Figure 6) is mainly associated with different fragments of the same Ethernet packet to distinguish it from the fragments in other packets. The numbering mode of this embodiment can be used. If the mapping of the IP packet identifier is not performed, other numbering methods can also be used. Or, in the process of transmitting an IP packet, if the transmission efficiency is not required, the IP packet identifier may not be set after the corresponding fragmentation packet is always present in the subsequent fragmentation packet of the Ethernet.
相应地,本实施例还提供了一种RapidIO报文到以太网报文的报文转换设备,该报文转换设备用可编程逻辑器件实现。该报文转换设备从RapidIO接口接收RapidIO设备编号和分片的RapidIO报文,转换为分片的以太网报文后发送到以太网设备接口。Correspondingly, the embodiment further provides a packet conversion device for a RapidIO packet to an Ethernet packet, and the packet conversion device is implemented by a programmable logic device. The packet conversion device receives the RapidIO device number and the fragmented RapidIO packet from the RapidIO interface, converts it into a fragmented Ethernet packet, and sends it to the Ethernet device interface.
该报文转换设备可以将RapidIO首分片报文转换为以太网首分片报文, 也可以将RapidIO后续分片报文转换为以太网后续分片报文。如图14所示,该报文转换设备包括:The packet conversion device can convert the RapidIO first fragment packet into an Ethernet first fragment packet. You can also convert the subsequent fragmented fragments of RapidIO into Ethernet subsequent fragmented packets. As shown in FIG. 14, the packet conversion device includes:
RapidIO报文解析装置10’,设置为接收RapidIO设备编号和RapidIO首分片报文,提取出所述RapidIO首分片报文中的业务数据报头和RapidIO数据,并将接收的报文类型(此处指是分片报文或非分片报文)通知以太网报文生成装置;还设置为接收RapidIO后续分片,提取出所述RapidIO后续分片报文中的RapidIO设备地址空间和RapidIO数据,并将接收的报文类型通知以太网报文生成装置;The RapidIO packet parsing device 10' is configured to receive the RapidIO device number and the RapidIO first fragment packet, extract the service data header and the RapidIO data in the RapidIO first fragment packet, and receive the received packet type. The indication is that the fragmented packet or the non-fragmented packet is used to notify the Ethernet packet generating device; and is further configured to receive the RapidIO subsequent fragment, and extract the RapidIO device address space and the RapidIO data in the RapidIO subsequent fragmented packet. And notifying the received packet type to the Ethernet packet generating device;
地址空间映射装置40’,设置为从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述RapidIO设备地址空间对应的业务数据报头;The address space mapping device 40 is configured to find a service data header corresponding to the address space of the RapidIO device from a second mapping relationship between the service data header associated with the configured RapidIO device number and the RapidIO device address space.
控制信息报头生成装置20’,设置为将所述RapidIO设备编号和所述RapidIO报文解析装置提取出的所述业务数据报头组成控制信息报头;还设置为将所述RapidIO设备编号和所述地址空间映射装置查找到的所述业务数据报头组成控制信息报头;The control information header generating device 20' is configured to form the service header of the RapidIO device and the service data header extracted by the RapidIO packet parsing device into a control information header; and further configured to set the RapidIO device number and the address The service data header found by the space mapping device constitutes a control information header;
路由地址映射装置30’,设置为根据所述控制信息报头生成装置组成的控制信息报头,从配置的控制信息报头中信息与路由地址信息的第一映射关系中查找到对应的路由地址信息;以及The routing address mapping device 30' is configured to search for the corresponding routing address information from the first mapping relationship between the information and the routing address information in the configured control information header according to the control information header formed by the control information header generating device;
以太网报文生成装置40’,设置为在接收的报文类型为RapidIO首分片报文时,将所述路由地址映射装置查找到的路由地址信息添加到以太网报头中,根据所述以太网报头、控制信息报头和RapidIO数据生成以太网首分片报文;还设置为在接收的报文类型为RapidIO后续分片报文时,将所述路由地址映射装置查找到的路由地址信息添加到以太网报头中,根据所述以太网报头和RapidIO数据生成以太网后续分片报文。The Ethernet packet generating device 40' is configured to add, when the received packet type is a RapidIO first fragment packet, the routing address information found by the routing address mapping device to the Ethernet header, according to the Ethernet The network header, the control information header, and the RapidIO data generate an Ethernet first fragment packet; and are further configured to add the routing address information found by the routing address mapping device when the received packet type is a RapidIO subsequent fragment packet. In the Ethernet header, an Ethernet subsequent fragmented packet is generated according to the Ethernet header and the RapidIO data.
图中同时示出了对RapidIO首分片报文和RapidIO后续分片报文转换时的信息流向,可参照文字说明来加以区分。The figure also shows the flow of information when converting the RapidIO first fragment message and the RapidIO subsequent fragment message, which can be distinguished by referring to the text description.
需要说明的是,对于报文转换设备来说,完全可以同时实现分片和非分片的RapidIO到分片和非分片的以太网报文的转换,也就是说,本实施例的 上述装置同样可以用于实现实施例一中相应装置的功能。It should be noted that, for the packet conversion device, the conversion of the fragmented and non-fragmented RapidIO to the fragmented and non-sharded Ethernet packets can be implemented at the same time, that is, the embodiment The above device can also be used to implement the functions of the corresponding device in the first embodiment.
可选地,Optionally,
路由地址映射装置30’中配置的所述第一映射关系中,所述控制信息报头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括RapidIO设备编号及目的系统配置信息和源系统配置信息中的至少一种;所述路由地址信息包括目的MAC地址,或者包括目的MAC地址及目的IP地址和VLAN值中的至少一种。In the first mapping relationship configured in the routing address mapping device 30', the information in the control information header includes at least one of destination system configuration information and source system configuration information, or includes a RapidIO device number and destination system configuration information. And at least one of source system configuration information; the routing address information includes a destination MAC address, or includes at least one of a destination MAC address and a destination IP address and a VLAN value.
可选地,Optionally,
地址空间映射装置40’中配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间,且被划分出的每个RapidIO设备地址空间大小相同。In the second mapping relationship between the service data header associated with the RapidIO device number and the RapidIO device address space configured in the address space mapping device 40', each service data header used by the RapidIO device identified by the RapidIO device number is mapped to A RapidIO device address space is allocated in the maximum address space of the RapidIO device. Different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
可选地,Optionally,
所述报文转换设备还包括:The packet conversion device further includes:
IP标识映射装置,设置为根据所述控制信息报头生成装置组成的控制信息报头,从配置的控制信息报头与IP报文标识的第三映射关系中查找到所述控制信息报头对应的IP报文标识;The IP identifier mapping device is configured to search for the IP packet corresponding to the control information header from the third mapping relationship between the configured control information header and the IP packet identifier according to the control information header formed by the control information header generating device. Identification
所述以太网报文生成装置,还设置为在接收的报文类型为RapidIO首分片报文和RapidIO后续分片报文,将IP标识映射装置查找到的所述IP报文标识添加到以太网报头中。The Ethernet packet generating device is further configured to add the IP packet identifier that is found by the IP identifier mapping device to the Ethernet when the received packet type is a RapidIO first fragment packet and a RapidIO subsequent fragment packet. In the net header.
根据上述功能描述,可以确定IP标识映射装置连接在控制信息报头生成装置20’和以太网报文生成装置40’之间。According to the above functional description, it can be determined that the IP identification mapping means is connected between the control information header generating means 20' and the Ethernet message generating means 40'.
实施例四Embodiment 4
本实施例涉及分片的以太网报文到分片的RapidIO报文的转换。 This embodiment relates to the conversion of a fragmented Ethernet packet to a fragmented RapidIO packet.
关于分片的以太网报文和分片的RapidIO报文的结构,在实施例三中已有描述,这里不再重复。本实施例分片的以太网报文到分片的RapidIO报文的转换可以从以太网首分片报文到RapidIO首分片报文的转换,以太网后续分片报文到RapidIO后续分片报文的转换两个方面描述。The structure of the fragmented Ethernet packet and the fragmented RapidIO packet has been described in the third embodiment and will not be repeated here. In this embodiment, the conversion of the fragmented Ethernet packet to the fragmented RapidIO packet can be converted from the Ethernet first fragment packet to the RapidIO first fragment packet, and the Ethernet subsequent fragment packet to the RapidIO subsequent fragment. The description of the conversion of the message is described in two aspects.
以太网首分片报文到RapidIO首分片报文的转换如图15所示,包括:The conversion of the Ethernet first fragment packet to the RapidIO first fragment packet is shown in Figure 15, including:
步骤510,接收到以太网首分片报文后,从所述以太网首分片报文的净荷中提取出包括RapidIO设备编号和业务数据报头的控制信息报头;Step 510: After receiving the Ethernet first fragment packet, extracting, from the payload of the Ethernet first fragment packet, a control information header including a RapidIO device number and a service data header.
步骤520,从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述业务数据报头对应的RapidIO设备地址空间并添加到RapidIO报头中;In step 520, the RapidIO device address space corresponding to the service data header is found and added to the RapidIO header in the second mapping relationship between the configured service data header and the RapidIO device address space.
步骤530,根据所述RapidIO报头、业务数据报头和所述净荷中除控制信息报头外的RapidIO数据生成RapidIO首分片报文。Step 530: Generate a RapidIO first fragment packet according to the RapidIO header, the service data header, and the RapidIO data except the control information header in the payload.
以太网后续分片报文到RapidIO后续分片报文的转换如图16所示,包括:The subsequent packet fragmentation of the Ethernet to the subsequent fragmentation of the RapidIO packet is shown in Figure 16, including:
步骤610,接收到以太网后续分片报文后,从所述以太网后续分片报文的报头中提取路由地址信息或IP报文标识;Step 610: After receiving the subsequent fragmentation packet of the Ethernet, extracting the routing address information or the IP packet identifier from the header of the subsequent fragmentation packet of the Ethernet;
步骤620,根据配置的控制信息报头中信息与路由地址信息的第一映射关系,确定所述路由地址信息对应的控制信息报头;或者,从配置的控制信息报头与IP报文标识的第三映射关系中,查找到所述IP报文标识对应的控制信息报头;所述控制信息报头包括RapidIO设备编号和业务数据报头;Step 620: Determine a control information header corresponding to the routing address information according to a first mapping relationship between the information in the configured control information header and the routing address information, or a third mapping from the configured control information header and the IP packet identifier. In the relationship, the control information header corresponding to the IP packet identifier is found; the control information header includes a RapidIO device number and a service data header;
可选地,第一映射关系中,控制信息报头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括RapidIO设备编号及目的系统配置信息和源系统配置信息中的至少一种;路由地址信息包括目的MAC地址,或者包括目的MAC地址及目的IP地址和VLAN值中的至少一种。Optionally, in the first mapping relationship, the information in the control information header includes at least one of destination system configuration information and source system configuration information, or at least one of a RapidIO device number and destination system configuration information and source system configuration information. The routing address information includes a destination MAC address, or includes at least one of a destination MAC address and a destination IP address and a VLAN value.
可选地,第三映射关系按照以下方式配置:确定通信系统中每个RapidIO设备的RapidIO设备编号及使用的目的系统配置信息、源系统配置信息和数据类型信息,使得RapidIO设备编号、目的系统配置信息、源系统配置信息和数据类型的组合得到的控制信息报头的数目小于IP报文中可选的IP标识 数目且大于所述通信系统在IP标识不能重复的时间段内可传输的IP报文数目;然后建立所述控制信息报头与IP标识的一一映射关系。Optionally, the third mapping relationship is configured as follows: determining a RapidIO device number of each RapidIO device in the communication system, and using destination system configuration information, source system configuration information, and data type information, so that the RapidIO device number and the destination system configuration are configured. The number of control information headers obtained by the combination of information, source system configuration information, and data type is smaller than the optional IP identifier in the IP packet. The number is greater than the number of IP packets that can be transmitted by the communication system in a period in which the IP identifier cannot be repeated; and then the one-to-one mapping relationship between the control information header and the IP identifier is established.
步骤630,从配置的所述RapidIO设备编号关联的所述第二映射关系中查找到所述业务数据报头对应的RapidIO设备地址空间并添加到RapidIO报头中;Step 630: Find the RapidIO device address space corresponding to the service data header from the second mapping relationship associated with the configured RapidIO device number, and add it to the RapidIO header.
可选地,RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间,且被划分出的每个RapidIO设备地址空间大小相同。Optionally, in the second mapping relationship between the service data header associated with the RapidIO device ID and the RapidIO device address space, each service data header used by the RapidIO device identified by the RapidIO device number is mapped to the maximum address space of the RapidIO device. In a RapidIO device address space, different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
步骤640,将所述以太网后续分片报文的净荷作为RapidIO数据,和所述RapidIO报头一起生成RapidIO后续分片报文。Step 640: The payload of the subsequent packet of the Ethernet is used as the RapidIO data, and the RapidIO subsequent fragment packet is generated together with the RapidIO header.
在数据传输来看,生成分片的RapidIO报文后,将解析出的RapidIO设备编号和分片的RapidIO报文传送到RapidIO接口再发送给相应的RapidIO设备。In the data transmission, after the fragmented RapidIO packet is generated, the RapidIO device number and the fragmented RapidIO packet are transmitted to the RapidIO interface and then sent to the corresponding RapidIO device.
相应的,本实施例还提供了一种以太网报文到RapidIO报文的报文转换设备,该报文转换设备用可编程逻辑器件实现。该报文转换设备从以太网接口接收分片的以太网报文,转换为分片的RapidIO报文后发送到以太网设备接口。Correspondingly, the embodiment further provides a packet conversion device for an Ethernet packet to a RapidIO packet, and the packet conversion device is implemented by a programmable logic device. The packet conversion device receives the fragmented Ethernet packet from the Ethernet interface, converts it into a fragmented RapidIO packet, and sends it to the Ethernet device interface.
该报文转换设备可以将以太网首分片报文转换为RapidIO首分片报文,也可以将以太网后续分片报文转换为RapidIO后续分片报文。如图17所示,该报文转换设备包括:The packet conversion device can convert the Ethernet first fragmented packet into a RapidIO first fragmented packet, and can also convert the Ethernet subsequent fragmented packet into a RapidIO subsequent fragmented packet. As shown in FIG. 17, the packet conversion device includes:
以太网报文解析装置50’,设置为接收到以太网首分片报文后,从其净荷中提取控制信息报头及RapidIO数据,并将接收的报文类型(此处指是分片报文或非分片报文)通知RapidIO报文生成装置;可选地,还设置为接收到以太网后续分片报文后,解析出其报头和净荷,并从所述报头中提取出路由地址信息或IP报文标识; The Ethernet packet parsing device 50' is configured to extract the control information header and the RapidIO data from the payload after receiving the Ethernet first fragment packet, and the received packet type (here, the fragmentation report) And the non-fragmented message is sent to the RapidIO packet generating device; optionally, after receiving the Ethernet subsequent fragmented packet, the header and the payload are parsed, and the route is extracted from the header. Address information or IP packet identifier;
路由地址映射装置80’,设置为根据所述以太网报文解析装置提取的路由地址信息,查找配置的控制信息报头中信息与路由地址信息的第一映射关系以确定对应的控制信息报头;The routing address mapping device 80' is configured to search for a first mapping relationship between the information in the configured control information header and the routing address information according to the routing address information extracted by the Ethernet packet parsing device to determine a corresponding control information header;
IP标识映射装置90’,设置为根据所述以太网报文解析装置提取的IP报文标识,从配置的控制信息报头与IP报文标识的第三映射关系中查找到对应的控制信息报头;The IP identifier mapping device 90' is configured to search for a corresponding control information header from a third mapping relationship between the configured control information header and the IP packet identifier according to the IP packet identifier extracted by the Ethernet packet parsing device;
地址空间映射装置60’,设置为根据所述以太网报文解析装置提取的控制信息报头中的RapidIO设备编号和业务数据报头,从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述业务数据报头对应的RapidIO设备地址空间;可选的,还设置为根据所述路由地址映射装置或IP标识映射装置得到的控制信息报头中的RapidIO设备编号和业务数据报头,从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述业务数据报头对应的RapidIO设备地址空间;The address space mapping device 60' is configured to set a service data header and a RapidIO device address associated with the configured RapidIO device number according to the RapidIO device number and the service data header in the control information header extracted by the Ethernet packet parsing device. In the second mapping relationship of the space, the RapidIO device address space corresponding to the service data header is found; optionally, the RapidIO device in the control information header obtained according to the routing address mapping device or the IP identifier mapping device is further configured. And the number of the service data headers, in the second mapping relationship between the service data header associated with the configured RapidIO device number and the RapidIO device address space, the RapidIO device address space corresponding to the service data header is found;
RapidIO报文生成装置70’,设置为在接收的报文类型为以太网首分片报文时,将所述地址空间映射装置查找到的RapidIO设备地址空间添加到RapidIO报头中,根据所述RapidIO报头、业务数据报头和RapidIO数据生成非分片的RapidIO报文。The RapidIO message generating device 70' is configured to add the RapidIO device address space found by the address space mapping device to the RapidIO header when the received message type is an Ethernet first fragment message, according to the RapidIO The header, service data header, and RapidIO data generate non-fragmented RapidIO messages.
图17中同时示出了对RapidIO首分片报文和RapidIO后续分片报文转换时的信息流向,可参照文字说明来加以区分。另需要说明的是,对于报文转换设备来说,完全可以同时实现分片和非分片的以太网报文到分片和非分片的RapidIO报文的转换,也就是说,本实施例的上述装置同样可以用于实现实施例二中相应装置的功能。FIG. 17 also shows the flow of information when the RapidIO first fragment message and the RapidIO subsequent fragment message are converted, and can be distinguished by referring to the text description. It should be noted that, for the packet conversion device, the conversion of the fragmented and non-fragmented Ethernet packets to the fragmented and non-fragmented RapidIO packets can be implemented at the same time, that is, the embodiment. The above device can also be used to implement the functions of the corresponding device in the second embodiment.
上述路由地址映射装置80’和IP标识映射装置90’可以两选一。上述装置的功能还可参见流程中的相应描述。The above routing address mapping means 80' and IP identification mapping means 90' may be selected one by one. The function of the above device can also be seen in the corresponding description in the process.
可选地,Optionally,
路由地址映射装置80’中配置的所述第一映射关系中,所述控制信息报头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括 RapidIO设备编号及目的系统配置信息和源系统配置信息中的至少一种;所述路由地址信息包括目的MAC地址,或者包括目的MAC地址及目的IP地址和VLAN值中的至少一种。In the first mapping relationship configured in the routing address mapping device 80', the information in the control information header includes at least one of destination system configuration information and source system configuration information, or includes The RapidIO device number and at least one of the destination system configuration information and the source system configuration information; the routing address information includes a destination MAC address, or includes at least one of a destination MAC address and a destination IP address and a VLAN value.
可选地,Optionally,
地址空间映射装置60’中配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间,且被划分出的每个RapidIO设备地址空间大小相同。In the second mapping relationship between the service data header associated with the RapidIO device number and the RapidIO device address space configured in the address space mapping device 60', each service data header used by the RapidIO device identified by the RapidIO device number is mapped to A RapidIO device address space is allocated in the maximum address space of the RapidIO device. Different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
上述实施方案提供一种RapidIO接口与以太网接口之间报文转换(涉及数据映射、传递、交换)的方法,实现了RapidIO设备与以太网设备及RapidIO设备互联通信且适于通过可编程逻辑设备如PLC实现,相比较于传统的CPU的报文转换方式,可编程逻辑设备高速并行的数据处理方式使得数据处理能力不再受限于CPU的处理系能,最大程度地利用链路带宽资源。同时数据处理速度更快,大大减小了数据处理过程的延时。The foregoing implementation provides a method for packet conversion (involving data mapping, transmission, and exchange) between a RapidIO interface and an Ethernet interface, and implements communication between the RapidIO device and the Ethernet device and the RapidIO device, and is suitable for passing through the programmable logic device. As implemented by PLC, compared with the traditional CPU message conversion mode, the high-speed parallel data processing mode of the programmable logic device makes the data processing capability no longer limited by the processing power of the CPU, and maximizes the use of link bandwidth resources. At the same time, the data processing speed is faster, which greatly reduces the delay of the data processing process.
下面再基于几个应用中的示例对本发明实施例方案加以说明。The embodiment of the present invention will be described below based on examples in several applications.
示例一Example one
出于传递便捷性的考虑,报文转换可以在RapidIO报文和以太网的MAC报文之间转换,无需区分不同报文的分片。且本示例中的以太网报文为MAC报文,RapidIO报文的控制信息报头只需要映射出MAC报头即可,然后将RapidIO报文的净荷转化为MAC报文净荷,可参见图5。For the convenience of the transmission, the packet conversion can be switched between the RapidIO packet and the Ethernet MAC packet without distinguishing the fragmentation of different packets. The Ethernet packet in this example is a MAC packet. The control information header of the RapidIO packet only needs to be mapped to the MAC header, and then the payload of the RapidIO packet is converted into the MAC packet payload. See Figure 5 .
其中一种RapidIO报文的控制信息报头与MAC报头的映射方法如下表格1所示:将所有RapidIO设备信息进行编号,号码从1到M0,共计M0个;将所有的目的系统配置信息进行编号,号码从1到M1,同时对所有的源系统配置信息进行编号,号码从1到M2,共计M2个,使得N=M0*M1*M2。从 号码1到号码N,每个号码对应一组路由地址(可以覆盖所有可能的路由),分别为VLAN值(可选)和目的MAC地址,即可完成所有源RapidIO设备到目的系统VLAN值和MAC地址的映射。The mapping method of the control information header and the MAC header of one of the RapidIO packets is as shown in Table 1: All the RapidIO device information is numbered, from 1 to M0, for a total of M0; all the destination system configuration information is numbered. The number is from 1 to M1, and all source system configuration information is numbered, from 1 to M2, for a total of M2, so that N=M0*M1*M2. From Number 1 to number N, each number corresponding to a set of routing addresses (can cover all possible routes), respectively VLAN value (optional) and destination MAC address, can complete all source RapidIO device to destination system VLAN value and MAC The mapping of addresses.
表格1Table 1
Figure PCTCN2015082978-appb-000001
Figure PCTCN2015082978-appb-000001
可编程逻辑设备实现的报文转换设备接收到RapidIO报文后,解析出控制信息报头的源系统配置信息和目的系统配置信息,并获取RapidIO编号,按照编号规则可以得到表格1中左侧控制信息报头中信息的编号,并找到对应的MAC报头信息。由于源MAC地址固定,报文类型也为固定值(如0x0806等),将目的MAC地址、源MAC地址、VLAN信息(可选的)以及报文类型组成MAC报文头,再将RapidIO报文净荷直接转化为MAC报文净荷,即可完成RapidIO报文到以太网报文的映射,然后再通过以太网设备接口完成RapidIO设备到以太网设备的通信。After receiving the RapidIO packet, the packet conversion device implemented by the programmable logic device parses the source system configuration information and the destination system configuration information of the control information header, and obtains the RapidIO number. According to the numbering rule, the left control information in Table 1 can be obtained. The number of the information in the header, and find the corresponding MAC header information. The source MAC address is fixed, and the packet type is also a fixed value (such as 0x0806). The destination MAC address, the source MAC address, the VLAN information (optional), and the packet type form a MAC packet header, and then the RapidIO packet is used. The payload is directly converted into a MAC packet payload, and the mapping between the RapidIO packet and the Ethernet packet is completed, and then the communication between the RapidIO device and the Ethernet device is completed through the Ethernet device interface.
示例二Example two
在IPV4报文的传递过程中,出于传递效率的考虑,报文转换可以在分片的RapidIO报文和分片的IPV4报文之间转换。RapidIO报文的业务数据报头只在RapidIO首分片报文内才有,因此对于RapidIO首分片报文可直接根据报文携带的业务数据报头和RapidIO设备编号组成控制信息报头,查找配置的控制信息报头中信息与路由地址的第一映射关系,可得到MAC报头和IPV4报头中目的IP地址和目的MAC地址等信息,可参见图6。During the transmission of IPV4 packets, packet conversion can be switched between fragmented RapidIO packets and fragmented IPV4 packets for transmission efficiency. The service data header of the RapidIO packet is only available in the RapidIO first fragment packet. Therefore, the RapidIO first fragment packet can directly form a control information header based on the service data header and the RapidIO device number carried in the packet to find the configuration control. The first mapping relationship between the information and the routing address in the information header can obtain information such as the destination IP address and the destination MAC address in the MAC header and the IPV4 header. See Figure 6.
对于RapidIO后续分片报文,先通过RapidIO报头中的RapidIO设备地址空间,查找为相应RapidIO设备配置的RapidIO设备地址空间和业务数据 报头的第二映射关系,查找到的业务数据报头和RapidIO设备编号组成控制信息报头,再查找第一映射关系得到目的IP地址和目的MAC地址等信息。For the RapidIO subsequent fragmented packets, first find the RapidIO device address space and service data configured for the corresponding RapidIO device through the RapidIO device address space in the RapidIO header. The second mapping relationship of the header, the searched service data header and the RapidIO device number form a control information header, and then the first mapping relationship is obtained to obtain information such as a destination IP address and a destination MAC address.
因此报文转换设备需要分为上述两种情况考虑,对于RapidIO首分片报文,直接通过控制信息报头映射出路由地址信息;对于RapidIO后续分片报文,先通过地址空间映射得到控制信息报头、然后通过控制信息报头映射得到路由地址信息。Therefore, the packet conversion device needs to be divided into the above two cases. For the RapidIO first fragmented packet, the routing address information is directly mapped through the control information header. For the RapidIO subsequent fragmented packet, the control information header is obtained through the address space mapping. Then, the routing address information is obtained through the control information header mapping.
在RapidIO互联架构中,系统中RapidIO设备可访问的最大地址空间是确定的。在配置第二映射关系中,可以将地址空间进行划分和映射,一种示例性的划分和映射方法如下:将所有的目的系统配置信息进行编号,号码从1到M1,共计M1个;将所有的源系统配置信息进行编号,号码从1到M2,共计M2个;将所有的数据包类型进行编号,号码从1到M3,共计M3个;每种数据包类型占用的地址空间可能不同,取其中占用的最大地址空间为M4。在系统规划/配置时可以对M1~M4进行调整,使得M1*M2*M3*M4不大于RapidIO设备的最大地址空间。In the RapidIO interconnect architecture, the maximum address space accessible to RapidIO devices in the system is deterministic. In the configuration of the second mapping relationship, the address space can be divided and mapped. An exemplary method for dividing and mapping is as follows: all the destination system configuration information is numbered, from 1 to M1, for a total of M1; The source system configuration information is numbered, from 1 to M2, for a total of M2; all packet types are numbered, from 1 to M3, for a total of M3; the address space occupied by each packet type may be different, The maximum address space occupied is M4. M1 to M4 can be adjusted during system planning/configuration so that M1*M2*M3*M4 is not larger than the maximum address space of the RapidIO device.
本示例中,第一映射关系中的路由地址信息包括下一跳MAC地址,目的IP和VLAN信息。路由地址信息通过控制信息报头中的RapidIO设备编号、源系统配置信息和目的系统配置信息完成映射。其中一种示例性的映射关系如表格2所示。表中的控制信息报头中信息的编号规则可参见示例一,该表格覆盖所有可能的路由使用的路由地址信息。In this example, the routing address information in the first mapping relationship includes a next hop MAC address, a destination IP address, and VLAN information. The routing address information is mapped by the RapidIO device number, source system configuration information, and destination system configuration information in the control information header. One of the exemplary mapping relationships is shown in Table 2. For the numbering rule of the information in the control information header in the table, refer to the first example, which covers the routing address information used by all possible routes.
表格2Form 2
Figure PCTCN2015082978-appb-000002
Figure PCTCN2015082978-appb-000002
配置IP报文标识和控制信息报头的第三映射关系时,其中示例性的方式 如下:将所有RapidIO设备信息进行编号,号码从1到M0,共计M0个;将所有的目的系统配置信息进行编号,号码从1到M1,共计M1个;将所有的源系统配置信息进行编号,号码从1到M2,共计M2个;将所有的数据包类型进行编号,号码从1到M3,共计M3个。M1~M3可以在系统规划/配置时调整。考虑到IP标识只需要将一段时间(假设1ms、10ms,根据系统而定)内的不同分片报文区别开来即可,可以假设一固定时段交互的数据包共计有M5个。因此,M0*M1*M2*M3大于等于M5即可实现在一段时间内区分不同的分片报文。IP标识在IPV4报头中共计16位,因而M0*M1*M2*M3应小于等于65536,即在固定时段内M5<=M0*M1*M2*M3<=65536。例如,在10ms时间,10G以太网接口传递字节数目最多为12500000byte,假设数据类型的平均长度为500byte,则10ms需要交互的数据包数M5值为25000。假设10ms内交互的数据类型共计16个,RapidIO设备信息编号共计10个,目的系统配置信息编号共计16个,源系统配置信息编号共计16个,IP报文标识共计16*10*16*16=40960个,能够区分10ms的最多25000个数据包。在第三映射关系中,IP标识字段从1到40960编号(编号小于65536),即可建立IP报文标识和控制信息报头的一一映射关系。When configuring the third mapping relationship between the IP packet identifier and the control information header, an exemplary method is used. As follows: All RapidIO device information is numbered, from 1 to M0, for a total of M0; all destination system configuration information is numbered, from 1 to M1, for a total of M1; all source system configuration information is numbered, The number is from 1 to M2, for a total of M2; all the packet types are numbered, from 1 to M3, for a total of M3. M1 to M3 can be adjusted during system planning/configuration. Considering that the IP identifier only needs to distinguish different fragmented packets within a certain period of time (assuming 1ms, 10ms, depending on the system), it can be assumed that there are a total of M5 data packets exchanged in a fixed period. Therefore, if M0*M1*M2*M3 is greater than or equal to M5, it is possible to distinguish different fragmented messages within a period of time. The IP identifier is 16 bits in the IPV4 header, so M0*M1*M2*M3 should be less than or equal to 65536, that is, M5<=M0*M1*M2*M3<=65536 in a fixed period of time. For example, in 10 ms, the number of bytes transmitted by the 10G Ethernet interface is up to 12500000 bytes. If the average length of the data type is 500 bytes, the number of packets to be exchanged for 10 ms is M5000. Assume that there are 16 data types in 10ms, a total of 10 RapidIO device information numbers, 16 destination system configuration information numbers, 16 source system configuration information numbers, and 16 IP address identifiers. 40,960, able to distinguish up to 25,000 packets of 10ms. In the third mapping relationship, the IP identification field is numbered from 1 to 40960 (the number is less than 65536), and the one-to-one mapping relationship between the IP packet identifier and the control information header can be established.
通过映射得到路由地址信息和IP报文标识后,将其添加到MAC报头和IPV4报头的相应字段,并填充其他字段,得到IPV4报文的报头。再将RapidIO报文净荷直接转化为IPV4报文净荷,根据得到的IPV4报文的报头、控制信息报头和IPV4报文净荷生成IPV4首分片报文,根据得到的IPV4报文的报头和IPV4报文净荷生成IPV4后续分片报文。After the routing address information and the IP packet identifier are obtained through the mapping, the information is added to the corresponding fields of the MAC header and the IPV4 header, and other fields are filled in to obtain the header of the IPV4 packet. The payload of the IPIO4 packet is directly converted into the IPV4 packet payload, and the IPV4 first fragment packet is generated according to the header, control information header and IPV4 packet payload of the obtained IPV4 packet, according to the header of the obtained IPV4 packet. The IPV4 packet payload is generated by the IPV4 packet payload.
在IPV6报文的传递过程中,出于传递效率的考虑,报文转换可以在分片的RapidIO报文和分片的IPV6报文之间进行。分片的RapidIO报文到分片的IPV6报文的转换与到分片的IPV4报文的转换是相似的,这里不再赘述。During the transmission of IPV6 packets, packet conversion can be performed between the fragmented RapidIO packets and the fragmented IPV6 packets for the sake of transmission efficiency. The conversion of the fragmented RapidIO packet to the fragmented IPV6 packet is similar to the conversion of the fragmented IPV4 packet, and will not be described here.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现,相应地,上述实施例中的各模块/单元可以采用 硬件的形式实现,也可以采用软件功能模块的形式实现。本发明不限制于任何特定形式的硬件和软件的结合。One of ordinary skill in the art will appreciate that all or a portion of the steps described above can be accomplished by a program that instructs the associated hardware, such as a read-only memory, a magnetic or optical disk, and the like. Optionally, all or part of the steps of the foregoing embodiments may also be implemented by using one or more integrated circuits. Accordingly, each module/unit in the foregoing embodiment may be adopted. The form of hardware implementation can also be implemented in the form of software function modules. The invention is not limited to any specific form of combination of hardware and software.
工业实用性Industrial applicability
上述方案提供一种RapidIO报文和以太网报文之间的转换方法,通过映射的方式来实现RapidIO报文和以太网报文之间的数据转换,因此适用于可编程逻辑设备来实现。利用可编程逻辑设备的高速处理能力,可以很小的时延代价实现系统设备间大量RapidIO报文与以太网报文的互相转换,减少CPU处理带来的数据时延,最大程度利用数据链路的带宽资源。 The foregoing solution provides a method for converting between a RapidIO packet and an Ethernet packet, and implements data conversion between the RapidIO packet and the Ethernet packet by means of mapping, and is therefore applicable to a programmable logic device. Utilizing the high-speed processing capability of the programmable logic device, a large number of RapidIO messages and Ethernet packets can be converted between system devices with a small delay, reducing the data delay caused by CPU processing and maximizing the use of data links. Bandwidth resources.

Claims (31)

  1. 一种RapidIO报文到以太网报文的转换方法,包括:A method for converting a RapidIO packet to an Ethernet packet includes:
    接收RapidIO设备发送的RapidIO设备编号和非分片的RapidIO报文;Receiving the RapidIO device number and the non-fragmented RapidIO packet sent by the RapidIO device;
    将所述RapidIO设备编号和所述RapidIO报文中的业务数据报头组成控制信息报头,从配置的控制信息报头中信息与路由地址信息的第一映射关系中,查找到所述控制信息报头对应的路由地址信息;And the service data header of the RapidIO device number and the RapidIO packet is formed into a control information header, and the first mapping relationship between the information and the routing address information in the configured control information header is used to find the corresponding information of the control information header. Routing address information;
    将查找到的路由地址信息添加到以太网报头中,根据所述以太网报头、控制信息报头和所述RapidIO报文中的RapidIO数据生成以太网报文。Adding the found routing address information to the Ethernet header, and generating an Ethernet packet according to the Ethernet header, the control information header, and the RapidIO data in the RapidIO packet.
  2. 如权利要求1所述的方法,其中:The method of claim 1 wherein:
    所述控制信息报头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括RapidIO设备编号及目的系统配置信息和源系统配置信息中的至少一种;The information in the control information header includes at least one of a destination system configuration information and a source system configuration information, or includes at least one of a RapidIO device number and destination system configuration information and source system configuration information;
    所述路由地址信息包括目的媒体访问控制MAC地址,或者包括目的MAC地址及目的IP地址和虚拟局域网VLAN值中的至少一种。The routing address information includes a destination media access control MAC address, or at least one of a destination MAC address and a destination IP address and a virtual local area network (VLAN) VLAN value.
  3. 一种以太网报文到RapidIO报文的转换方法,包括:A method for converting an Ethernet packet to a RapidIO packet includes:
    接收到非分片的以太网报文,从所述以太网报文的净荷中提取出包括RapidIO设备编号和业务数据报头的控制信息报头;Receiving a non-fragmented Ethernet packet, and extracting, from the payload of the Ethernet packet, a control information header including a RapidIO device number and a service data header;
    从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述业务数据报头对应的RapidIO设备地址空间;Searching for the RapidIO device address space corresponding to the service data header from the second mapping relationship between the configured service data header and the RapidIO device address space;
    将查找到的RapidIO设备地址空间添加到RapidIO报头中,根据所述RapidIO报头、业务数据报头和所述净荷中除控制信息报头外的RapidIO数据生成非分片的RapidIO报文。Adding the discovered RapidIO device address space to the RapidIO header, and generating a non-fragmented RapidIO packet according to the RapidIO header, the service data header, and the RapidIO data except the control information header in the payload.
  4. 如权利要求3所述的方法,其中:The method of claim 3 wherein:
    所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一 RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间,被划分出的每个RapidIO设备地址空间大小相同。In the second mapping relationship between the service data header associated with the RapidIO device ID and the RapidIO device address space, each service data header used by the RapidIO device identified by the RapidIO device number is mapped to the maximum address space of the RapidIO device. One of the divisions In the RapidIO device address space, different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
  5. 一种RapidIO报文到以太网报文的转换方法,包括:A method for converting a RapidIO packet to an Ethernet packet includes:
    接收RapidIO设备发送的RapidIO设备编号和RapidIO首分片报文;Receiving the RapidIO device number and the RapidIO first fragment packet sent by the RapidIO device;
    将所述RapidIO设备编号和RapidIO首分片报文中的业务数据报头组成控制信息报头,从配置的控制信息报头中信息与路由地址信息的第一映射关系中查找到所述控制信息报头对应的路由地址信息并添加到以太网报头中;And the service data header of the RapidIO device number and the RapidIO first fragment packet is formed into a control information header, and the corresponding information of the control information header is found in the first mapping relationship between the information and the routing address information in the configured control information header. Routing address information and adding it to the Ethernet header;
    根据所述以太网报头、控制信息报头和所述RapidIO首分片报文中的RapidIO数据生成以太网首分片报文。Generating an Ethernet first fragmented packet according to the Ethernet header, the control information header, and the RapidIO data in the RapidIO first fragmented packet.
  6. 如权利要求5所述的方法,所述方法还包括:The method of claim 5, the method further comprising:
    接收RapidIO设备发送的RapidIO设备编号和RapidIO后续分片报文;Receiving the RapidIO device number and the RapidIO subsequent fragment packet sent by the RapidIO device;
    从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述RapidIO后续分片报文中RapidIO设备地址空间对应的业务数据报头;The service data header corresponding to the RapidIO device address space in the RapidIO subsequent fragmented packet is found in the second mapping relationship between the configured service data header and the RapidIO device address space.
    将所述业务数据报头与所述RapidIO设备编号组成控制信息报头,从所述第一映射关系中查找到所述控制信息报头对应的路由地址信息;The service data header and the RapidIO device number are combined into a control information header, and the routing address information corresponding to the control information header is found in the first mapping relationship;
    将查找到的路由地址信息添加到以太网报头中,根据所述以太网报头和所述RapidIO后续分片报文中的RapidIO数据生成以太网后续分片报文。Adding the found routing address information to the Ethernet header, and generating an Ethernet subsequent fragmentation packet according to the Ethernet header and the RapidIO data in the RapidIO subsequent fragmented packet.
  7. 如权利要求6所述的方法,其中:The method of claim 6 wherein:
    所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间,被划分出的每个RapidIO设备地址空间大小相同。In the second mapping relationship between the service data header associated with the RapidIO device ID and the RapidIO device address space, each service data header used by the RapidIO device identified by the RapidIO device number is mapped to the maximum address space of the RapidIO device. A RapidIO device address space is divided. Different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
  8. 如权利要求5或6或7所述的方法,其中:The method of claim 5 or 6 or 7, wherein:
    所述控制信息报头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括RapidIO设备编号及目的系统配置信息和源系统配置信 息中的至少一种;The information in the control information header includes at least one of a destination system configuration information and a source system configuration information, or includes a RapidIO device number and destination system configuration information, and a source system configuration letter. At least one of the interest;
    所述路由地址信息包括目的MAC地址,或者包括目的MAC地址及目的IP地址和VLAN值中的至少一种。The routing address information includes a destination MAC address, or at least one of a destination MAC address and a destination IP address and a VLAN value.
  9. 如权利要求5或6或7所述的方法,所述以太网报文为IP报文时,所述方法还包括:The method of claim 5 or 6 or 7, wherein the method further comprises:
    对RapidIO首分片报文和RapidIO后续分片报文转换时,在组成控制信息报头之后,还从配置的控制信息报头与IP报文标识的第三映射关系中查找到所述控制信息报头对应的IP报文标识并添加到以太网报头中。After the first packet of the RapidIO first packet and the subsequent fragment of the RapidIO packet are converted, the control information header is searched for from the third mapping relationship between the configured control information header and the IP packet identifier. The IP packet is identified and added to the Ethernet header.
  10. 如权利要求9所述的方法,其中:The method of claim 9 wherein:
    所述第三映射关系按照以下方式配置:确定通信系统中每个RapidIO设备的RapidIO设备编号及使用的目的系统配置信息、源系统配置信息和数据类型信息,使得RapidIO设备编号、目的系统配置信息、源系统配置信息和数据类型的组合得到的控制信息报头的数目小于IP报文中可选的IP标识数目且大于所述通信系统在IP标识不能重复的时间段内可传输的IP报文数目;然后建立所述控制信息报头与IP标识的一一映射关系。The third mapping relationship is configured to: determine a RapidIO device number of each RapidIO device in the communication system, and use destination system configuration information, source system configuration information, and data type information, such that the RapidIO device number, destination system configuration information, The number of control information headers obtained by combining the source system configuration information and the data type is smaller than the number of optional IP identifiers in the IP packet and greater than the number of IP packets that can be transmitted by the communication system in a period in which the IP identifier cannot be repeated; Then, a one-to-one mapping relationship between the control information header and the IP identifier is established.
  11. 一种以太网报文到RapidIO报文的转换方法,包括:A method for converting an Ethernet packet to a RapidIO packet includes:
    接收到以太网首分片报文后,做以下转换处理:After receiving the Ethernet first fragment packet, perform the following conversion processing:
    从所述以太网首分片报文的净荷中提取出包括RapidIO设备编号和业务数据报头的控制信息报头;Extracting, from the payload of the Ethernet first fragment packet, a control information header including a RapidIO device number and a service data header;
    从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述业务数据报头对应的RapidIO设备地址空间并添加到RapidIO报头中;Searching for the RapidIO device address space corresponding to the service data header and adding it to the RapidIO header in the second mapping relationship between the configured service data header and the RapidIO device address space.
    根据所述RapidIO报头、业务数据报头和所述净荷中除控制信息报头外的RapidIO数据生成RapidIO首分片报文。And generating a RapidIO first fragment packet according to the RapidIO header, the service data header, and the RapidIO data except the control information header in the payload.
  12. 如权利要求11所述的方法,所述方法还包括:The method of claim 11 further comprising:
    接收到以太网后续分片报文后,做以下转换处理:After receiving the subsequent fragments of the Ethernet packet, perform the following conversion processing:
    从所述以太网后续分片报文的报头中提取路由地址信息或IP报文标识; Extracting routing address information or an IP packet identifier from a header of the subsequent fragmentation packet of the Ethernet;
    根据配置的控制信息报头中信息与路由地址信息的第一映射关系,确定所述路由地址信息对应的控制信息报头;或者,从配置的控制信息报头与IP报文标识的第三映射关系中,查找到所述IP报文标识对应的控制信息报头;所述控制信息报头包括RapidIO设备编号和业务数据报头;Determining, according to the first mapping relationship between the information in the control information header and the routing address information, the control information header corresponding to the routing address information; or, in the third mapping relationship between the configured control information header and the IP packet identifier, Finding a control information header corresponding to the IP packet identifier; the control information header includes a RapidIO device number and a service data header;
    从配置的所述RapidIO设备编号关联的所述第二映射关系中查找到所述业务数据报头对应的RapidIO设备地址空间并添加到RapidIO报头中;Searching for the RapidIO device address space corresponding to the service data header from the second mapping relationship associated with the configured RapidIO device number, and adding the address to the RapidIO header;
    将所述以太网后续分片报文的净荷作为RapidIO数据,和所述RapidIO报头一起生成RapidIO后续分片报文。The payload of the subsequent packet of the Ethernet is used as the RapidIO data, and the RapidIO subsequent fragment packet is generated together with the RapidIO header.
  13. 如权利要求12所述的方法,其中:The method of claim 12 wherein:
    所述控制信息报头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括RapidIO设备编号及目的系统配置信息和源系统配置信息中的至少一种;The information in the control information header includes at least one of a destination system configuration information and a source system configuration information, or includes at least one of a RapidIO device number and destination system configuration information and source system configuration information;
    所述路由地址信息包括目的MAC地址,或者包括目的MAC地址及目的IP地址和VLAN值中的至少一种。The routing address information includes a destination MAC address, or at least one of a destination MAC address and a destination IP address and a VLAN value.
  14. 如权利要求12或13所述的方法,其中:A method as claimed in claim 12 or claim 13 wherein:
    所述第三映射关系按照以下方式配置:确定通信系统中每个RapidIO设备的RapidIO设备编号及使用的目的系统配置信息、源系统配置信息和数据类型信息,使得RapidIO设备编号、目的系统配置信息、源系统配置信息和数据类型的组合得到的控制信息报头的数目小于IP报文中可选的IP标识数目且大于所述通信系统在IP标识不能重复的时间段内可传输的IP报文数目;然后建立所述控制信息报头与IP标识的一一映射关系。The third mapping relationship is configured to: determine a RapidIO device number of each RapidIO device in the communication system, and use destination system configuration information, source system configuration information, and data type information, such that the RapidIO device number, destination system configuration information, The number of control information headers obtained by combining the source system configuration information and the data type is smaller than the number of optional IP identifiers in the IP packet and greater than the number of IP packets that can be transmitted by the communication system in a period in which the IP identifier cannot be repeated; Then, a one-to-one mapping relationship between the control information header and the IP identifier is established.
  15. 如权利要求11或12或13所述的方法,其中:The method of claim 11 or 12 or 13 wherein:
    所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间,被划分出的每个RapidIO设备地址空间大小相同。In the second mapping relationship between the service data header associated with the RapidIO device ID and the RapidIO device address space, each service data header used by the RapidIO device identified by the RapidIO device number is mapped to the maximum address space of the RapidIO device. A RapidIO device address space is divided. Different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
  16. 一种RapidIO报文到以太网报文的报文转换设备,包括: A packet conversion device for a packet from a RapidIO packet to an Ethernet packet, including:
    RapidIO报文解析装置,设置为接收RapidIO设备编号和非分片的RapidIO报文,提取所述RapidIO报文中的业务数据报头和RapidIO数据;The RapidIO packet parsing device is configured to receive the RapidIO device number and the non-fragmented RapidIO packet, and extract the service data header and the RapidIO data in the RapidIO packet;
    控制信息报头生成装置,设置为将所述RapidIO设备编号和所述业务数据报头组成控制信息报头;a control information header generating device, configured to form the RapidIO device number and the service data header into a control information header;
    路由地址映射装置,设置为从配置的控制信息报头中信息与路由地址信息的第一映射关系中,查找到所述控制信息报头对应的路由地址信息;以及The routing address mapping device is configured to: find the routing address information corresponding to the control information header from the first mapping relationship between the information and the routing address information in the configured control information header;
    以太网报文生成装置,设置为将所述路由地址信息添加到以太网报头中,根据所述以太网报头、控制信息报头和RapidIO数据生成以太网报文。The Ethernet packet generating device is configured to add the routing address information to an Ethernet header, and generate an Ethernet packet according to the Ethernet header, the control information header, and the RapidIO data.
  17. 如权利要求16所述的报文转换设备,A message conversion device according to claim 16,
    所述报文转换设备用可编程逻辑器件实现。The message conversion device is implemented by a programmable logic device.
  18. 如权利要求16或17所述的报文转换设备,其中:A message conversion device according to claim 16 or 17, wherein:
    所述路由地址映射装置中配置的所述第一映射关系中,所述控制信息报头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括RapidIO设备编号及目的系统配置信息和源系统配置信息中的至少一种;所述路由地址信息包括目的MAC地址,或者包括目的MAC地址及目的IP地址和VLAN值中的至少一种。In the first mapping relationship configured in the routing address mapping device, the information in the control information header includes at least one of destination system configuration information and source system configuration information, or includes a RapidIO device number and destination system configuration information. And at least one of source system configuration information; the routing address information includes a destination MAC address, or includes at least one of a destination MAC address and a destination IP address and a VLAN value.
  19. 一种以太网报文到RapidIO报文的报文转换设备,包括:A packet conversion device for transmitting Ethernet packets to RapidIO packets, including:
    以太网报文解析装置,设置为接收非分片的以太网报文,从所述以太网报文的净荷中提取包括RapidIO设备编号和业务数据报头的控制信息报头及RapidIO数据;An Ethernet packet parsing apparatus is configured to receive a non-fragmented Ethernet packet, and extract, from the payload of the Ethernet packet, a control information header and a RapidIO data including a RapidIO device number and a service data header;
    地址空间映射装置,设置为从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述业务数据报头对应的RapidIO设备地址空间;以及The address space mapping device is configured to find a RapidIO device address space corresponding to the service data header from a second mapping relationship between the service data header associated with the configured RapidIO device number and the RapidIO device address space;
    RapidIO报文生成装置,设置为将查找到的RapidIO设备地址空间添加到RapidIO报头中,根据所述RapidIO报头、业务数据报头和RapidIO数据生成非分片的RapidIO报文。The RapidIO packet generating device is configured to add the discovered RapidIO device address space to the RapidIO header, and generate a non-fragmented RapidIO packet according to the RapidIO header, the service data header, and the RapidIO data.
  20. 如权利要求19所述的报文转换设备, A message conversion device according to claim 19,
    所述报文转换设备用可编程逻辑器件实现。The message conversion device is implemented by a programmable logic device.
  21. 如权利要求19或20所述的报文转换设备,其中:A message conversion device according to claim 19 or 20, wherein:
    所述地址空间映射装置中配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间,被划分出的每个RapidIO设备地址空间大小相同。In the second mapping relationship between the service data header associated with the RapidIO device number and the RapidIO device address space configured in the address space mapping device, each service data header used by the RapidIO device identified by the RapidIO device number is mapped to A RapidIO device address space is allocated in the maximum address space of the RapidIO device, and different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
  22. 一种RapidIO报文到以太网报文的报文转换设备,包括:A packet conversion device for a packet from a RapidIO packet to an Ethernet packet, including:
    RapidIO报文解析装置,设置为接收RapidIO设备编号和RapidIO首分片报文,提取出所述RapidIO首分片报文中的业务数据报头和RapidIO数据,并将接收的报文类型通知以太网报文生成装置;The RapidIO packet parsing device is configured to receive the RapidIO device number and the RapidIO first fragment packet, extract the service data header and the RapidIO data in the RapidIO first fragment packet, and notify the Ethernet packet of the received packet type. Text generation device;
    控制信息报头生成装置,设置为将所述RapidIO设备编号和所述RapidIO报文解析装置提取出的所述业务数据报头组成控制信息报头;a control information header generating device, configured to form the control information header by the RapidIO device number and the service data header extracted by the RapidIO packet parsing device;
    路由地址映射装置,设置为根据所述控制信息报头生成装置组成的控制信息报头,从配置的控制信息报头中信息与路由地址信息的第一映射关系中查找到对应的路由地址信息;以及The routing address mapping device is configured to: according to the control information header formed by the control information header generating device, find the corresponding routing address information from the first mapping relationship between the information and the routing address information in the configured control information header;
    以太网报文生成装置,设置为在接收的报文类型为RapidIO首分片报文时,将所述路由地址映射装置查找到的路由地址信息添加到以太网报头中,根据所述以太网报头、控制信息报头和RapidIO数据生成以太网首分片报文。The Ethernet packet generating device is configured to add, when the received packet type is a RapidIO first fragment packet, the routing address information found by the routing address mapping device to the Ethernet header, according to the Ethernet header. The control information header and the RapidIO data generate an Ethernet first fragment message.
  23. 如权利要求22所述的报文转换设备,所述报文转换设备还包括地址空间映射装置,其中:The message conversion device according to claim 22, wherein said message conversion device further comprises address space mapping means, wherein:
    所述RapidIO报文解析装置还设置为接收RapidIO后续分片,提取出所述RapidIO后续分片报文中的RapidIO设备地址空间和RapidIO数据,并将接收的报文类型通知以太网报文生成装置;The RapidIO packet parsing apparatus is further configured to receive the subsequent fragment of the RapidIO, extract the RapidIO device address space and the RapidIO data in the subsequent fragmented fragmentation message, and notify the Ethernet packet generating apparatus of the received packet type. ;
    所述地址空间映射装置,设置为从配置的所述RapidIO设备编号关联的业务数据报头与所述RapidIO设备地址空间的第二映射关系中,查找到所述RapidIO设备地址空间对应的业务数据报头; The address space mapping device is configured to find a service data header corresponding to the address space of the RapidIO device from a second mapping relationship between the service data header associated with the configured RapidIO device number and the RapidIO device address space;
    所述控制信息报头生成装置,还设置为将所述RapidIO设备编号和所述地址空间映射装置查找到的所述业务数据报头组成控制信息报头;The control information header generating device is further configured to form, by the RapidIO device number and the service data header searched by the address space mapping device, a control information header;
    所述以太网报文生成装置,还设置为在接收的报文类型为RapidIO后续分片报文时,将所述路由地址映射装置查找到的路由地址信息添加到以太网报头中,根据所述以太网报头和RapidIO数据生成以太网后续分片报文。The Ethernet packet generating device is further configured to: when the received packet type is a RapidIO subsequent fragment packet, add the routing address information found by the routing address mapping device to the Ethernet header, according to the The Ethernet header and RapidIO data generate Ethernet subsequent fragmented packets.
  24. 如权利要求23所述的报文转换设备,其中:A message conversion device as claimed in claim 23, wherein:
    所述地址空间映射装置中配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间,被划分出的每个RapidIO设备地址空间大小相同。In the second mapping relationship between the service data header associated with the RapidIO device number and the RapidIO device address space configured in the address space mapping device, each service data header used by the RapidIO device identified by the RapidIO device number is mapped to A RapidIO device address space is allocated in the maximum address space of the RapidIO device, and different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
  25. 如权利要求22或23或24所述的报文转换设备,所述报文转换设备还包括:The message conversion device according to claim 22 or 23 or 24, wherein the message conversion device further comprises:
    IP标识映射装置,设置为根据所述控制信息报头生成装置组成的控制信息报头,从配置的控制信息报头与IP报文标识的第三映射关系中查找到所述控制信息报头对应的IP报文标识;The IP identifier mapping device is configured to search for the IP packet corresponding to the control information header from the third mapping relationship between the configured control information header and the IP packet identifier according to the control information header formed by the control information header generating device. Identification
    所述以太网报文生成装置,还设置为在接收的报文类型为RapidIO首分片报文和RapidIO后续分片报文,将IP标识映射装置查找到的所述IP报文标识添加到以太网报头中。The Ethernet packet generating device is further configured to add the IP packet identifier that is found by the IP identifier mapping device to the Ethernet when the received packet type is a RapidIO first fragment packet and a RapidIO subsequent fragment packet. In the net header.
  26. 如权利要求22或23或24所述的报文转换设备,A message conversion device according to claim 22 or 23 or 24,
    所述报文转换设备用可编程逻辑器件实现。The message conversion device is implemented by a programmable logic device.
  27. 如权利要求22或23或24所述的报文转换设备,其中:A message conversion device according to claim 22 or 23 or 24, wherein:
    所述路由地址映射装置中配置的所述第一映射关系中,所述控制信息报头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括RapidIO设备编号及目的系统配置信息和源系统配置信息中的至少一种;所述路由地址信息包括目的MAC地址,或者包括目的MAC地址及目的IP地址和VLAN值中的至少一种。 In the first mapping relationship configured in the routing address mapping device, the information in the control information header includes at least one of destination system configuration information and source system configuration information, or includes a RapidIO device number and destination system configuration information. And at least one of source system configuration information; the routing address information includes a destination MAC address, or includes at least one of a destination MAC address and a destination IP address and a VLAN value.
  28. 一种以太网报文到RapidIO报文的报文转换设备,包括:A packet conversion device for transmitting Ethernet packets to RapidIO packets, including:
    以太网报文解析装置,设置为接收到以太网首分片报文后,从其净荷中提取控制信息报头及RapidIO数据,并将接收的报文类型通知RapidIO报文生成装置,所述控制信息报头包括RapidIO设备编号和业务数据报头;The Ethernet packet parsing device is configured to: after receiving the Ethernet first fragment packet, extract the control information header and the RapidIO data from the payload, and notify the RapidIO packet generating device of the received packet type, where the control The information header includes the RapidIO device number and the service data header;
    地址空间映射装置,设置为根据所述以太网报文解析装置提取的控制信息报头中的RapidIO设备编号和业务数据报头,从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述业务数据报头对应的RapidIO设备地址空间;以及The address space mapping device is configured to: according to the RapidIO device number and the service data header in the control information header extracted by the Ethernet packet parsing device, the service data header associated with the configured RapidIO device number and the RapidIO device address space In the second mapping relationship, the RapidIO device address space corresponding to the service data header is found;
    RapidIO报文生成装置,设置为在接收的报文类型为以太网首分片报文时,将所述地址空间映射装置查找到的RapidIO设备地址空间添加到RapidIO报头中,根据所述RapidIO报头、业务数据报头和RapidIO数据生成非分片的RapidIO报文。The RapidIO packet generating device is configured to add, when the received packet type is an Ethernet first fragment packet, the RapidIO device address space found by the address space mapping device to the RapidIO header, according to the RapidIO header, The service data header and the RapidIO data generate non-fragmented RapidIO messages.
  29. 如权利要求28所述的报文转换设备,A message conversion device as claimed in claim 28,
    所述报文转换设备还包括路由地址映射装置和/或IP标识映射装置,其中:The message conversion device further includes a routing address mapping device and/or an IP identification mapping device, wherein:
    所述以太网报文解析装置,还设置为接收到以太网后续分片报文后,解析出其报头和净荷,并从所述报头中提取出路由地址信息或IP报文标识;The Ethernet packet parsing device is further configured to parse the header and the payload after receiving the subsequent fragmentation packet of the Ethernet, and extract the routing address information or the IP packet identifier from the header.
    所述路由地址映射装置,设置为根据所述以太网报文解析装置提取的路由地址信息,查找配置的控制信息报头中信息与路由地址信息的第一映射关系以确定对应的控制信息报头;The routing address mapping device is configured to search for a first mapping relationship between the information in the configured control information header and the routing address information according to the routing address information extracted by the Ethernet packet parsing device to determine a corresponding control information header;
    所述IP标识映射装置,设置为根据所述以太网报文解析装置提取的IP报文标识,从配置的控制信息报头与IP报文标识的第三映射关系中查找到对应的控制信息报头;The IP identifier mapping device is configured to search for a corresponding control information header from a third mapping relationship between the configured control information header and the IP packet identifier according to the IP packet identifier extracted by the Ethernet packet parsing device;
    所述地址空间映射装置,还设置为根据所述路由地址映射装置或IP标识映射装置得到的控制信息报头中的RapidIO设备编号和业务数据报头,从配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,查找到所述业务数据报头对应的RapidIO设备地址空间;The address space mapping device is further configured to: according to the RapidIO device number and the service data header in the control information header obtained by the routing address mapping device or the IP identifier mapping device, the service data header associated with the configured RapidIO device number In the second mapping relationship with the address space of the RapidIO device, the RapidIO device address space corresponding to the service data header is found;
    所述RapidIO报文生成装置,还设置为在接收的报文类型为以太网后续 分片报文时,将所述地址空间映射装置查找到的RapidIO设备地址空间添加到RapidIO报头中,将所述以太网后续分片报文的净荷作为RapidIO数据,和所述RapidIO报头一起生成RapidIO后续分片报文。The RapidIO packet generating device is further configured to receive the received packet type as an Ethernet follow-up Adding a RapidIO device address space that is found by the address space mapping device to the RapidIO header, and using the payload of the subsequent Ethernet fragmentation packet as RapidIO data, and generating the same with the RapidIO header. RapidIO subsequent fragmentation message.
  30. 如权利要求29所述的报文转换设备,其中:A message conversion device as claimed in claim 29, wherein:
    所述路由地址映射装置中配置的所述第一映射关系中,所述控制信息报头中信息包括目的系统配置信息和源系统配置信息中的至少一种,或者包括RapidIO设备编号及目的系统配置信息和源系统配置信息中的至少一种;所述路由地址信息包括目的MAC地址,或者包括目的MAC地址及目的IP地址和VLAN值中的至少一种。In the first mapping relationship configured in the routing address mapping device, the information in the control information header includes at least one of destination system configuration information and source system configuration information, or includes a RapidIO device number and destination system configuration information. And at least one of source system configuration information; the routing address information includes a destination MAC address, or includes at least one of a destination MAC address and a destination IP address and a VLAN value.
  31. 如权利要求28或29或30所述的报文转换设备,其中:A message conversion device as claimed in claim 28 or 29 or 30, wherein:
    所述地址空间映射装置中配置的所述RapidIO设备编号关联的业务数据报头与RapidIO设备地址空间的第二映射关系中,所述RapidIO设备编号所标识的RapidIO设备使用的每一业务数据报头映射到所述RapidIO设备最大地址空间中被划分出的一RapidIO设备地址空间,不同业务数据报头对应不同的RapidIO设备地址空间,被划分出的每个RapidIO设备地址空间大小相同。 In the second mapping relationship between the service data header associated with the RapidIO device number and the RapidIO device address space configured in the address space mapping device, each service data header used by the RapidIO device identified by the RapidIO device number is mapped to A RapidIO device address space is allocated in the maximum address space of the RapidIO device, and different service data headers correspond to different RapidIO device address spaces, and each RapidIO device address space is divided into the same size.
PCT/CN2015/082978 2014-12-18 2015-06-30 Method and device for converting between rapidio packet and ethernet packet WO2016107122A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410797612.8A CN105791214B (en) 2014-12-18 2014-12-18 Method and equipment for converting RapidIO message and Ethernet message
CN201410797612.8 2014-12-28

Publications (1)

Publication Number Publication Date
WO2016107122A1 true WO2016107122A1 (en) 2016-07-07

Family

ID=56284089

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/082978 WO2016107122A1 (en) 2014-12-18 2015-06-30 Method and device for converting between rapidio packet and ethernet packet

Country Status (2)

Country Link
CN (1) CN105791214B (en)
WO (1) WO2016107122A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650100A (en) * 2018-04-26 2018-10-12 济南浪潮高新科技投资发展有限公司 A kind of converter design method of SRIO and network interface
CN112083958A (en) * 2020-08-14 2020-12-15 陕西千山航空电子有限责任公司 RapidIO-based flight parameter data storage structure and storage method
CN114827290A (en) * 2021-01-22 2022-07-29 北京汽车股份有限公司 Message forwarding method and device, vehicle-mounted network system and readable storage medium
CN116112554A (en) * 2022-12-07 2023-05-12 上海通联金融服务有限公司 Message conversion method

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107181702B (en) * 2017-06-15 2020-05-19 浪潮集团有限公司 Device for realizing RapidIO and Ethernet fusion exchange
CN107426246B (en) * 2017-08-31 2020-09-08 北京计算机技术及应用研究所 FPGA-based high-speed data exchange system between gigabit Ethernet and RapidIO protocol
CN107426103B (en) * 2017-09-13 2020-07-31 北京翼辉信息技术有限公司 Data transmission method between RapidIO network and Ethernet
CN108055290B (en) * 2018-02-07 2020-08-18 天津芯海创科技有限公司 Heterogeneous protocol network system and data exchange method thereof
CN112532756B (en) * 2019-09-17 2023-10-24 华为技术有限公司 Interface expansion method, device and system
CN111131535B (en) * 2019-12-05 2022-05-06 天津芯海创科技有限公司 RapidIO dynamic address mapping system
CN111131213B (en) * 2019-12-18 2021-12-21 华南理工大学 Method for realizing R-GOOSE electric power message
CN112199211B (en) * 2020-09-28 2023-02-28 西南电子技术研究所(中国电子科技集团公司第十研究所) Communication method between CORBA middleware ORBs based on RapidIO
CN116095197B (en) * 2022-07-04 2023-12-12 荣耀终端有限公司 Data transmission method and related device
CN117395327B (en) * 2023-12-12 2024-03-12 浙江国利信安科技有限公司 Method, apparatus and computer readable storage medium for Ethernet access EPA network

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1376375A2 (en) * 2002-06-28 2004-01-02 Motorola, Inc. Computer system and method of communicating
CN101335667A (en) * 2007-06-26 2008-12-31 中兴通讯股份有限公司 Data transmission method
CN103401728A (en) * 2013-07-29 2013-11-20 华为技术有限公司 Method and device used for detecting inter-equipment interface connection
CN203590259U (en) * 2013-11-22 2014-05-07 中国电子科技集团公司第三十二研究所 10-gigabit Ethernet and Rapid IO network switch controller

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103401846B (en) * 2013-07-15 2016-08-24 杭州华为数字技术有限公司 Data processing method, protocol conversion device and internet

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1376375A2 (en) * 2002-06-28 2004-01-02 Motorola, Inc. Computer system and method of communicating
CN101335667A (en) * 2007-06-26 2008-12-31 中兴通讯股份有限公司 Data transmission method
CN103401728A (en) * 2013-07-29 2013-11-20 华为技术有限公司 Method and device used for detecting inter-equipment interface connection
CN203590259U (en) * 2013-11-22 2014-05-07 中国电子科技集团公司第三十二研究所 10-gigabit Ethernet and Rapid IO network switch controller

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650100A (en) * 2018-04-26 2018-10-12 济南浪潮高新科技投资发展有限公司 A kind of converter design method of SRIO and network interface
CN108650100B (en) * 2018-04-26 2020-12-11 浪潮集团有限公司 Method for designing converter of SRIO and network interface
CN112083958A (en) * 2020-08-14 2020-12-15 陕西千山航空电子有限责任公司 RapidIO-based flight parameter data storage structure and storage method
CN112083958B (en) * 2020-08-14 2023-01-17 陕西千山航空电子有限责任公司 RapidIO-based flight parameter data storage structure and storage method
CN114827290A (en) * 2021-01-22 2022-07-29 北京汽车股份有限公司 Message forwarding method and device, vehicle-mounted network system and readable storage medium
CN116112554A (en) * 2022-12-07 2023-05-12 上海通联金融服务有限公司 Message conversion method

Also Published As

Publication number Publication date
CN105791214A (en) 2016-07-20
CN105791214B (en) 2019-12-13

Similar Documents

Publication Publication Date Title
WO2016107122A1 (en) Method and device for converting between rapidio packet and ethernet packet
US20210051045A1 (en) Communication switching apparatus for switching data in multiple protocol data frame formats
JP6500304B2 (en) Method for acquiring accurate flow entry by SDN switch, and SDN switch, controller and system
CN106664261B (en) A kind of methods, devices and systems configuring flow entry
CN101573913B (en) Method and apparatus for improved multicast routing
US8369347B2 (en) Fiber channel over Ethernet and fiber channel switching based on Ethernet switch fabrics
US20160337146A1 (en) Method of data delivery across a network fabric in a router or ethernet bridge
EP3573297A1 (en) Packet processing method and apparatus
CN107181663A (en) A kind of message processing method, relevant device and computer-readable recording medium
US20210160350A1 (en) Generating programmatically defined fields of metadata for network packets
WO2016191990A1 (en) Packet conversion method and device
CN102970227A (en) Method and device for achieving virtual extensible local area network (VXLAN) message transmitting in application specific integrated circuit (ASIC)
US8824468B2 (en) System and method for parsing frames
US20230370899A1 (en) Packet forwarding method, packet processing method, and device
WO2016123975A1 (en) Data transmission method and apparatus
US8743907B1 (en) Apparatus for reassembling a fragmented data unit and transmitting the reassembled data unit
JP6222505B2 (en) Method and apparatus for generating input parameters
CN107196798A (en) Network apparatus management system and its method in telecommunication management network
WO2022227484A1 (en) Data communication method and apparatus, computer device, and storage medium
WO2014117474A1 (en) Routing method, system, and related device
WO2016197933A2 (en) Packet forwarding
WO2018196833A1 (en) Message sending method and message receiving method and apparatus
US11190447B2 (en) Routing protocol and distributed router
CN111835736B (en) Message transmission method and system
US20230412501A1 (en) Data processing method and apparatus, and chip

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

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

Country of ref document: EP

Kind code of ref document: A1