Message transmission method and device, switch, electronic equipment and readable storage medium
By modifying the routing method of MCTP protocol messages in the PCIe server to root complex broadcast or identifier-based transmission, the problem of limited processor selection was solved, message interaction between the baseboard management controller and peripheral devices was realized, and the freedom of processor selection for the server was improved.
Patent Information
- Application Number
- CN202411117809.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-11-29
AI Technical Summary
When using the MCTP protocol in a PCIe server to implement message interaction between the baseboard management controller and peripheral devices, a processor that supports the bus owner agent function of the MCTP protocol needs to be configured, which limits the selection of processors.
By modifying the message routing method, messages of the management component transport protocol are routed in the PCIe server as root complex broadcasts or identity-based transmissions, thus avoiding dependence on processors that support the bus owner agent function of the MCTP protocol.
It enables message interaction between the baseboard management controller and peripheral devices, eliminating the need to configure a processor that supports the bus owner agent function of the MCTP protocol, thus increasing the freedom of server processor selection.
Smart Images

Figure CN119052013A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of message transmission, and specifically relates to a message transmission method, a switch, a device, an electronic device and a readable storage medium. Background Art
[0002] Management Component Transport Protocol (MCTP) is a transmission protocol used for device management and control. In the server field using the high-speed serial computer expansion bus standard (PCIe, Peripheral Component Interconnect Express), the MCTP protocol can be used to monitor, configure and troubleshoot the server.
[0003] In order to use the MCTP protocol in a PCIe server to implement message interaction between a baseboard management controller (BMC) and peripheral devices (such as a hard disk, keyboard, etc.), it is necessary to configure a processor (CPU, Central Processing Unit) with a bus owner proxy function that supports the MCTP protocol for the PCIe server, which limits the selection of the processor.
[0004] It should be noted that when the BMC (bus owner of the MCTP protocol) needs to send a broadcast message, the broadcast message is first sent to the processor that supports the bus owner proxy function of the MCTP protocol, and the broadcast message of the BMC is forwarded by the processor that supports the bus owner proxy function of the MCTP protocol. When the peripheral device needs to send a message to the BMC, the message of the peripheral device is forwarded to the BMC by the processor that supports the bus owner proxy function of the MCTP protocol. Summary of the invention
[0005] The present application aims to provide a message transmission method, a switch, a device, an electronic device and a readable storage medium, which at least solves the problem in the prior art that in order to use the management component transmission protocol in a server of the high-speed serial computer expansion bus standard to realize message interaction between the baseboard management controller and the peripheral devices, it is necessary to configure the server with a processor with the bus owner proxy function that supports the management component transmission protocol, resulting in limited selection of the processor.
[0006] In order to solve the above technical problems, this application is implemented as follows:
[0007] In a first aspect, an embodiment of the present application provides a message transmission method, the method comprising:
[0008] When a first message of a first device is obtained and the first message is a preset broadcast message, a routing mode of the first message is modified to be broadcast from a root complex of a high-speed serial computer expansion bus standard, a new first message is obtained, and the new first message is sent to each second device corresponding to the first device;
[0009] When a second message of the second device is obtained and the second message is a message sent to the first device, modify the routing mode of the second message to send based on the identifier, modify the destination address of the second message to the identifier of the first device in the high-speed serial computer expansion bus standard, obtain a new second message, and send the new second message to the first device;
[0010] The first device is a bus owner of a management component transmission protocol, and the second device is an endpoint device or a switch of the management component transmission protocol.
[0011] In a second aspect, an embodiment of the present application further provides a switch, including a first forwarder, a first downstream port, a plurality of second forwarders, and a plurality of second downstream ports, wherein the second downstream ports have corresponding second forwarders;
[0012] The first downstream port is used to connect to a first device, the first device being a bus owner of a management component transmission protocol;
[0013] The second downstream port is used to connect to a second device, the second device being an endpoint device or other switch of the management component transmission protocol;
[0014] The first repeater is connected to the first downstream port and each of the second downstream ports respectively, and is used for, when a first message from the first device is obtained and the first message is a preset broadcast message, modifying the routing mode of the first message to broadcast from the root complex of the high-speed serial computer expansion bus standard, obtaining a new first message, and sending the new first message to each second device corresponding to the first device;
[0015] The second repeater is connected to the second downstream port and the first downstream port corresponding to the second repeater respectively, and is used to modify the routing mode of the second message to identifier-based sending when a second message of the second device is obtained and the second message is a message sent to the first device, and modify the destination address of the second message to the identifier of the first device in the high-speed serial computer expansion bus standard, obtain a new second message, and send the new second message to the first device.
[0016] In a third aspect, an embodiment of the present application further provides a message transmission device, the device comprising:
[0017] A first processing module is used for, when a first message of a first device is acquired and the first message is a preset broadcast message, modifying the routing mode of the first message to broadcast from a root complex of a high-speed serial computer expansion bus standard, acquiring a new first message, and sending the new first message to each second device corresponding to the first device;
[0018] A second processing module is used for, when a second message from the second device is acquired and the second message is a message sent to the first device, modifying the routing mode of the second message to send based on the identifier, and modifying the destination address of the second message to the identifier of the first device in the high-speed serial computer expansion bus standard, obtaining a new second message, and sending the new second message to the first device;
[0019] The first device is a bus owner of a management component transmission protocol, and the second device is an endpoint device or a switch of the management component transmission protocol.
[0020] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0021] In a fifth aspect, an embodiment of the present application further provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0022] In an embodiment of the present application, the first device is a bus owner of the management component transmission protocol, and the second device is an endpoint device or switch of the management component transmission protocol. When a first message of the first device is obtained and the first message is a preset broadcast message, the routing mode of the first message is modified to broadcast from the root complex of the high-speed serial computer expansion bus standard to obtain a new first message, and the new first message is sent to each second device corresponding to the first device. When a second message of the second device is obtained and the second message is a message sent to the first device, the routing mode of the second message is modified to send based on an identifier, and the destination address of the second message is modified to the identifier of the first device in the high-speed serial computer expansion bus standard to obtain a new second message, and the new second message is sent to the first device, so as to realize the use of the management component transmission protocol in a server of the high-speed serial computer expansion bus standard to perform message interaction between the baseboard management controller (first device) and the peripheral device (second device), and there is no need to configure a processor with a bus owner agent function that supports the management component transmission protocol, thereby improving the freedom of processor selection for the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a flow chart of the steps of a message transmission method provided by an embodiment of the present application;
[0024] Figure 2 It is a flowchart of the specific steps of a message transmission method provided by an embodiment of the present application;
[0025] Figure 3 It is a structural diagram of a switch provided in an embodiment of the present application;
[0026] Figure 4 is a transmission diagram of a first message provided in an embodiment of the present application;
[0027] Figure 5 is a transmission schematic diagram of the second message provided in an embodiment of the present application;
[0028] Figure 6 This is a schematic diagram of a process of sending a first message of a first device provided in an embodiment of the present application;
[0029] Figure 7 It is a schematic diagram of the sending process of the second message of the second device provided in an embodiment of the present application;
[0030] Figure 8 is a block diagram of a message transmission device provided in an embodiment of the present application;
[0031] Fig. 9 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0033] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0034] The message transmission method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0035] Figure 1 is a flow chart of the steps of a message transmission method provided by an embodiment of the present application, such as Figure 1 As shown, the method may include:
[0036] Step 101. When a first message of a first device is obtained and the first message is a preset broadcast message, the routing method of the first message is modified to broadcast from the root complex of the high-speed serial computer expansion bus standard, a new first message is obtained, and the new first message is sent to each second device corresponding to the first device.
[0037] The first device is a bus owner of a management component transmission protocol, and the second device is an endpoint device or a switch of the management component transmission protocol.
[0038] It should be noted that the first message is a message using the management component transmission protocol; the first device and the second device are both devices using the high-speed serial computer expansion bus standard.
[0039] The topological structure of the management component transmission protocol includes a bus owner, a bridge, and an endpoint device. The bus owner has multiple corresponding endpoint devices. In the management component transmission protocol, the bus owner is connected to the endpoint device or the bus owner is connected to the endpoint device through a bridge. The bus owner is responsible for managing the endpoint devices of the management component transmission protocol. The bridge is responsible for network switching and is also responsible for managing the endpoint devices mounted under the bridge; the endpoint device is an end device managed by the bus owner.
[0040] The topological structure of the high-speed serial computer expansion bus standard includes a root complex (RC) and an endpoint device (EP).
[0041] Specifically, in some embodiments, the first device is a BMC in a PCIe server using the MCTP protocol, and the second device is a peripheral device in the PCIe server using the MCTP protocol, and the number of the peripheral devices is one or more.
[0042] The message header format of the management component transmission protocol is as follows (Table 1):
[0043]
[0044] Table 1
[0045] Among them, "byte0" represents the start from the 0th byte, "byte4" represents the start from the 4th byte, and "byte8" represents the start from the 8th byte; the "type" field is used to represent the routing method of the message, and the "type" field is located from the 0th to the 4th bit of the 0th byte; the "PCI requester ID" field is used to identify the code (ID, Identity document) of the device that initiates the transaction on the virtual peripheral component interconnect (PCI, PeripheralComponent Interconnect) bus; the "PCIrequester ID" field is located from the 4th to the 5th bytes; the "PCI target ID" field is used to identify the ID of the target device on the PCI bus, that is, the destination address of the message, and the "PCI target ID" field is located from the 8th to the 9th bytes; the "MCTP VDMcode" field is used to identify the type of the vendor-defined message (VDM, VendorDefined Message), and the "MCTP VDMcode" field is located from the 0th to the 3rd bit of the sixth byte; the "Message Code Vendor Defined" field is used to represent the message code defined by the vendor, and the "Message Code Vendor Defined" field is located from the 0th to the 3rd bit of the sixth byte. The "Defined" field is located at the seventh byte; the "VendorID" field is used to identify the unique identifier of the vendor, and the "Vendor ID" field is located from the 10th byte to the 11th byte.
[0046] The comparison table between the content of the lower 3 bits (bits 0 to 2) of the "type" field and the routing method of the message represented by the "type" field is as follows (Table 2)
[0047] The contents of the lower 3 bits of the "type" field Message routing 000 Route to RC 010 Route by ID 011 Broadcast from RC
[0048] Table 2
[0049] Among them, "000" is used to represent the transmission to the root complex (Route to RC), "010" is used to represent the transmission based on the identification (Route by ID), and "011" is used to represent the broadcast from the root complex of the high-speed serial computer expansion bus standard (Broadcast from RC).
[0050] Specifically, in some embodiments, the routing method of the first message is modified to broadcast from the root complex of the high-speed serial computer expansion bus standard by modifying the lower three bits of the "type" field in the message header of the first message to "011", that is, modifying the 0th bit of the "type" field to "0", modifying the 1st bit of the "type" field to "1", and modifying the 2nd bit of the "type" field to "1".
[0051] In an embodiment of the present application, when a first message of a first device is obtained and the first message is a preset broadcast message, the routing method of the first message is modified to broadcast from the root complex of the high-speed serial computer expansion bus standard, a new first message is obtained, and the new first message is sent to each second device corresponding to the first device, so as to enable the first device to send a broadcast message to each second device.
[0052] Step 102: When a second message of the second device is obtained and the second message is a message sent to the first device, the routing mode of the second message is modified to be sent based on the identifier, and the destination address of the second message is modified to the identifier of the first device in the high-speed serial computer expansion bus standard, a new second message is obtained, and the new second message is sent to the first device.
[0053] It should be noted that the second message is a message using the MCTP protocol; the identifier (BDF, Bus number, Device number, Function number) of the first device in the high-speed serial computer expansion bus standard includes a bus number (Bus number), a device number (Device number), and a function number (Function number).
[0054] Specifically, in some embodiments, by modifying the lower three bits of the "type" field in the message header of the second message to "010", that is, modifying the 0th bit of the "type" field to "0", modifying the 1st bit of the "type" field to "1", and modifying the 2nd bit of the "type" field to "0", the routing method of the second message is modified to be sent based on the identifier; by modifying the content of the "PCI target ID" field to the identifier of the first device in the high-speed serial computer expansion bus standard, the destination address of the second message is modified to the identifier of the first device in the high-speed serial computer expansion bus standard.
[0055] In an embodiment of the present application, when a second message from a second device is obtained and the second message is a message sent to a first device, the routing method of the second message is modified to be sent based on an identifier, and the destination address of the second message is modified to be an identifier of the first device in the high-speed serial computer expansion bus standard, a new second message is obtained, and the new second message is sent to the first device, so as to enable the second device to send a message to the first device.
[0056] In summary, in an embodiment of the present application, the first device is a bus owner of the management component transmission protocol, and the second device is an endpoint device or switch of the management component transmission protocol. When a first message of the first device is obtained and the first message is a preset broadcast message, the routing mode of the first message is modified to broadcast from the root complex of the high-speed serial computer expansion bus standard to obtain a new first message, and the new first message is sent to each second device corresponding to the first device. When a second message of the second device is obtained and the second message is a message sent to the first device, the routing mode of the second message is modified to send based on the identifier, and the destination address of the second message is modified to the identifier of the first device in the high-speed serial computer expansion bus standard to obtain a new second message, and the new second message is sent to the first device, so as to realize the use of the management component transmission protocol in a server of the high-speed serial computer expansion bus standard to perform message interaction between the baseboard management controller (first device) and the peripheral device (second device), and there is no need to configure a processor with a bus owner agent function that supports the management component transmission protocol, thereby improving the freedom of processor selection for the server.
[0057] Figure 2 is a specific step flow chart of the message transmission method provided in the embodiment of the present application, such as Figure 2 As shown, the method may include:
[0058] Step 201: When a first message of a first device is obtained and the first message is a preset broadcast message, the routing method of the first message is modified to broadcast from the root complex of the high-speed serial computer expansion bus standard, a new first message is obtained, and the new first message is sent to each second device corresponding to the first device using a fair arbitration method.
[0059] The first device is a bus owner of a management component transmission protocol, and the second device is an endpoint device or a switch of the management component transmission protocol.
[0060] In this step, when the first message of the first device is obtained and the first message is a preset broadcast message, the routing method of the first message is modified to broadcast from the root complex of the high-speed serial computer expansion bus standard. The implementation method of obtaining the new first message is similar to the implementation process of the above-mentioned step 101, which will not be repeated here.
[0061] It should be noted that fair arbitration ensures that all messages receive reasonable service time and prevents messages from being ignored or delayed due to priority or other reasons.
[0062] Specifically, a fair arbitration method is adopted to send a new first message to each second device corresponding to the first device, that is, when there are multiple messages to be sent, each message is sent in a preset order, and when it is the turn to send a new first message, the new first message is sent to each second device corresponding to the first device. For example, there are three messages to be sent, which are arranged in a preset order as message A, message B, and message C, where message C is the new first message. Then message A is sent first, then message B, and then message C, that is, message C is sent to each second device corresponding to the first device.
[0063] Step 202: When a second message of the second device is obtained and the second message is a message sent to the first device, the routing method of the second message is modified to be sent based on the identifier, and the destination address of the second message is modified to the identifier of the first device in the high-speed serial computer expansion bus standard, a new second message is obtained, and the new second message is sent to the first device using the fair arbitration method.
[0064] In this step, when the second message of the second device is obtained and the second message is a message sent to the first device, the routing method of the second message is modified to be sent based on the identifier, and the destination address of the second message is modified to the identifier of the first device in the high-speed serial computer expansion bus standard. The implementation method of obtaining the new second message is similar to the implementation process of the above-mentioned step 102, and will not be repeated here.
[0065] Specifically, a new second message is sent to the first device by a fair arbitration method, that is, when there are multiple messages to be sent, each message is sent in a preset order, and when it is the turn to send a new second message, the new second message is sent to the first device.
[0066] Optionally, in some embodiments, the method further comprises the following steps:
[0067] Step 203: When the first message is a vendor-defined message of the management component transmission protocol, obtain a message type of the first message.
[0068] Specifically, in some embodiments, when the "Vendor ID" field in the message header of the first message is "1AB4h" and the "MCTP VDM code" field is "0000b", it is determined that the first message is a vendor-defined message of the management component transport protocol.
[0069] In an embodiment of the present application, by obtaining the message type of the first message when the first message is a vendor-defined message of the management component transmission protocol, and then determining that the first message is a preset broadcast message when the message type of the first message is a preset message type.
[0070] Step 204: When the message type of the first message is a preset message type, determine that the first message is the preset broadcast message.
[0071] In an embodiment of the present application, by determining that the first message is a preset broadcast message when the message type of the first message is a preset message type, and then modifying the routing method of the first message to broadcast from the root complex of the high-speed serial computer expansion bus standard, a new first message is obtained, and the new first message is sent to each second device corresponding to the first device.
[0072] Optionally, in some embodiments, the preset message types include prepare for endpoint discovery message and endpoint discovery message.
[0073] It should be noted that the Prepare for Endpoint Discovery message and the Endpoint Discovery message are both message types for PCIe devices using the MCTP protocol.
[0074] Specifically, in some embodiments, in a PCIe server using the MCTP protocol, during the device discovery phase, the BMC needs to send a broadcast message to the peripheral device, and the BMC's broadcast message includes a preparation for endpoint discovery message, an endpoint discovery message, and the like.
[0075] In an embodiment of the present application, by determining that the first message is a preset broadcast message when the message type of the first message is a preparation for endpoint discovery message or an endpoint discovery message, and then modifying the routing method of the first message to broadcast from the root complex of the high-speed serial computer expansion bus standard, a new first message is obtained, and the new first message is sent to each second device corresponding to the first device.
[0076] By executing step 203 to step 204, it can be achieved that the first message is determined to be a preset broadcast message.
[0077] Optionally, in some embodiments, the method further comprises the following steps:
[0078] Step 205: When the second message is a vendor-defined message of the management component transport protocol and the routing mode of the second message is to be sent to the root complex, determine that the second message is a message sent to the first device.
[0079] It should be noted that, when the lower three bits of the "type" field in the message header of the second message are "000", it is determined that the routing mode of the second message is to be sent to the root complex.
[0080] In the embodiment of the present application, when the second message is a vendor-defined message of the management component transport protocol and the routing mode of the second message is to be sent to the root complex, it is determined that the second message is a message sent to the first device.
[0081] Optionally, in some embodiments, the method further comprises the following steps:
[0082] Step 206: When the first message is obtained and the first message is a message other than the preset broadcast message, the first message is sent to a device corresponding to the destination address of the first message.
[0083] In an embodiment of the present application, when a first message is obtained and the first message is a message other than a preset broadcast message, the first message is sent to a device corresponding to the destination address of the first message, so that the first device can send a message other than the preset broadcast message.
[0084] Step 207: When the second message is obtained and the second message is a message sent to a device other than the first device, the second message is sent to a device corresponding to the destination address of the second message.
[0085] In an embodiment of the present application, when a second message is obtained and the second message is a message sent to a device other than the first device, the second message is sent to a device corresponding to the destination address of the second message, so as to enable the second device to send a message to a device other than the first device.
[0086] By executing steps 206 to 207, it can be achieved that the first device sends messages other than the preset broadcast message and the second device sends messages to devices other than the first device.
[0087] In summary, in an embodiment of the present application, the first device is a bus owner of the management component transmission protocol, and the second device is an endpoint device or switch of the management component transmission protocol. When a first message of the first device is obtained and the first message is a preset broadcast message, the routing mode of the first message is modified to broadcast from the root complex of the high-speed serial computer expansion bus standard to obtain a new first message, and the new first message is sent to each second device corresponding to the first device. When a second message of the second device is obtained and the second message is a message sent to the first device, the routing mode of the second message is modified to send based on the identifier, and the destination address of the second message is modified to the identifier of the first device in the high-speed serial computer expansion bus standard to obtain a new second message, and the new second message is sent to the first device, so as to realize the use of the management component transmission protocol in a server of the high-speed serial computer expansion bus standard to perform message interaction between the baseboard management controller (first device) and the peripheral device (second device), and there is no need to configure a processor with a bus owner agent function that supports the management component transmission protocol, thereby improving the freedom of processor selection for the server.
[0088] Reference Figure 3 , an embodiment of the present application also provides a switch, including a first repeater 10, a first downstream port 20, a plurality of second repeaters 30 and a plurality of second downstream ports 40, wherein the second downstream port 40 has a corresponding second repeater 30; the first downstream port 20 is used to connect to a first device 70, the first device 70 is a bus owner of a management component transmission protocol; the second downstream port 40 is used to connect to a second device 80, the second device 80 is an endpoint device or other switch of the management component transmission protocol; the first repeater 10 is respectively connected to the first downstream port 20 and each of the second downstream ports 40, and is used to, when a first message from the first device 70 is obtained and the first message is a preset broadcast message, transmit the first message The routing mode is modified to broadcast from the root complex of the high-speed serial computer expansion bus standard, obtain a new first message, and send the new first message to each second device 80 corresponding to the first device 70; the second repeater 30 is respectively connected to the second downstream port 40 and the first downstream port 20 corresponding to the second repeater 30, and is used to, when the second message of the second device 80 is obtained and the second message is a message sent to the first device 70, modify the routing mode of the second message to be sent based on the identifier, and modify the destination address of the second message to the identifier of the first device 70 in the high-speed serial computer expansion bus standard, obtain a new second message, and send the new second message to the first device 70.
[0089] Specifically, in some embodiments, the switch is a PCIe switching device (PCIe Switch), which provides expansion or aggregation capabilities and allows more devices to be connected to a PCle port. It acts as a data router and identifies the transmission path of given data based on the address or other routing information. The switch has an upstream port 91 (USP, Up stream port) and multiple downstream ports (DSP, Down stream port). The upstream port 91 is connected to the RC or the downstream port of the upstream switch, and the downstream port can be connected to the upstream port 91 of the EP, bridge device or downstream switch.
[0090] Each upstream port 91 and downstream port of the switch corresponds to a virtual peripheral component interconnect bridge, and there is also a virtual PCI bus inside the switch for connecting various virtual PCI bridges.
[0091] The working mode of the switch is divided into a normal mode and an MCTP proxy mode, and the working mode of the switch is configured to the normal mode or the MCTP proxy mode through a configurable mode register. The switch in the MCTP proxy mode can specify a DSP port to connect to the bus owner of the MCTP, support the establishment of a proxy relationship between the bus owner of the MCTP and the switch, can identify data packets in the supplier-defined message format of the MCTP, and can implement the aforementioned message transmission method; the switch in the normal mode supports PCIe port expansion and data packet routing functions, does not use the aforementioned message transmission method, and forwards all data packets (data packets of messages) to the routing control module 90 of the switch, and the routing control module 90 sends the data packet to the device pointed to by the destination address of the data packet.
[0092] In the embodiment of the present application, the first device 70 is a bus owner of the management component transmission protocol, and the second device 80 is an endpoint device or a switch of the management component transmission protocol. When the first message of the first device 70 is obtained through the first repeater 10, and the first message is a preset broadcast message, the routing mode of the first message is modified to broadcast from the root complex of the high-speed serial computer expansion bus standard, a new first message is obtained, and the new first message is sent to each second device 80 corresponding to the first device 70, and the second message of the second device 80 is obtained through the second repeater 30, and the second message is sent to the first device 70. In the case of a message, the routing mode of the second message is modified to be sent based on the identifier, and the destination address of the second message is modified to the identifier of the first device 70 in the high-speed serial computer expansion bus standard, a new second message is obtained, and the new second message is sent to the first device 70, so as to implement the use of the management component transmission protocol in the server of the high-speed serial computer expansion bus standard to perform message interaction between the baseboard management controller (first device 70) and the peripheral device (second device 80), and there is no need to configure a processor with a bus owner agent function that supports the management component transmission protocol, thereby improving the freedom of processor selection for the server.
[0093] Optionally, in some embodiments, the switch further includes a first arbitrator 50 and a plurality of first arbitrators 60, the second downstream port 40 has a corresponding first arbitrator 60; the first arbitrator 50 is respectively connected to the first downstream port 20 and the second repeater 30, so that the second repeater 30 is connected to the first downstream port 20 through the first arbitrator 50, and the first arbitrator 50 is used to adopt a fair arbitration method to forward the new second message sent by the second repeater 30 to the first downstream port 20, so that the first device 70 connected to the first downstream port 20 obtains the new second message; the first arbitrator 60 is respectively connected to the first downstream port 20 and the second repeater 30 corresponding to the first arbitrator 60. The second downstream port 40 and the first repeater 10 are connected, so that the first repeater 10 is connected to the second downstream port 40 corresponding to the first arbitrator 60 through the first arbitrator 60, and the first arbitrator 60 is used to adopt a fair arbitration method to forward the new first message sent by the first repeater 10 to the second downstream port 40 corresponding to the first arbitrator 60, so that the second device 80 connected to the second downstream port 40 corresponding to the first arbitrator 60 can obtain the new first message; the first repeater 10 is specifically used to send the new first message to each of the first arbitrators 60; the second repeater 30 is specifically used to send the new second message to the first arbitrator 50.
[0094] In some embodiments, the first arbitrator 50 and the first arbitrator 60 receive the data packets output by the routing control module 90 and the forwarder, and use fair arbitration to send the data packets to the DSP. If there are N (N is a positive integer) DSPs in the switch, the first arbitrator 50 adopts N-channel arbitration, in which 1 channel receives the data packets output by the routing control module 90, and the other N-1 channels receive the data packets forwarded by the second forwarder 30; the first arbitrator 60 adopts 2-channel arbitration, in which one channel receives the data packets output by the routing control module 90, and the other channel receives the data packets forwarded by the first forwarder 10; when the first arbitrator 50 has multiple data packets that need to be sent through the DSP, the first arbitrator 50 selects the data packets to be sent; when the first arbitrator 60 has multiple data packets that need to be sent through the DSP, the first arbitrator 60 selects the data packets to be sent.
[0095] In the embodiment of the present application, a new second message is sent to the first arbitrator 50 through the second repeater 30, and then the first arbitrator 50 adopts a fair arbitration method to forward the new second message sent by the second repeater 30 to the first downstream port 20, so that the first device 70 connected to the first downstream port 20 can obtain the new second message, thereby realizing that the second device 80 sends a message to the first device 70; a new first message is sent to each first arbitrator 60 through the first repeater 10, and then the first arbitrator 60 adopts a fair arbitration method to forward the new first message sent by the first repeater 10 to the second downstream port 40 corresponding to the first arbitrator 60, so that the second device 80 connected to the second downstream port 40 corresponding to the first arbitrator 60 can obtain the new first message, thereby realizing that the first device 70 sends a broadcast message to each second device 80.
[0096] Optionally, in some embodiments, the switch also includes a routing control module 90; the routing control module 90 is respectively connected to the first repeater 10 and each of the second repeaters 30, and the routing control module 90 is used to forward the first message sent by the first repeater 10 to the first destination device corresponding to the destination address of the first message; and forward the second message sent by the second repeater 30 to the second destination device corresponding to the destination address of the second message; the first destination device and the second destination device are both devices connected to the port of the switch; the first repeater 10 is also used to send the first message to the routing control module 90 when the first message of the first device 70 is obtained and the first message is other than the preset broadcast message; the second repeater 30 is also used to send the second message to the routing control module 90 when the second message is obtained and the second message is a message sent to other devices other than the first device 70.
[0097] It should be noted that the routing control module 90 is used to implement the data packet routing function specified by the PCIe protocol and respond to the access to the internal bridge device configuration space. The main functions of the routing control module 90 include: (1) responding to the enumeration process. Each USP and DSP corresponds to a PCI bridge device. The topology structure and configuration space information of the PCI bridge device are included in the routing control module 90. During the PCIe enumeration process, it responds to the read and write access to the configuration space; (2) supporting the routing methods specified by the PCIe protocol, including address routing, ID routing, fuzzy routing, etc.; (3) outputting data packets according to the routing results. For data packets that need to be routed to the USP, the data packets are sent directly to the USP. For data packets that need to be sent through the DSP, the data packets are sent directly to the arbitrator corresponding to the DSP.
[0098] In an embodiment of the present application, when the first message of the first device 70 is obtained and the first message is a message other than the preset broadcast message, the first message is sent to the routing control module 90 by the first forwarder 10, and then the first message sent by the first forwarder 10 is forwarded to the first destination device corresponding to the destination address of the first message by the routing control module 90, thereby realizing the sending of the first message of the first device 70 when the first message is a message other than the preset broadcast message; when the second message is obtained and the second message is a message sent to a device other than the first device 70 by the second forwarder 30, the second message is sent to the routing control module 90, and then the second message sent by the second forwarder 30 is forwarded to the second destination device corresponding to the destination address of the second message by the routing control module 90, thereby realizing the sending of the second message of the second device 80 when the second message is a message sent to a device other than the first device 70.
[0099] Reference Figure 4, the transmission direction line a1 represents that the first device 70 sends a first message to the first repeater 10 through the first downstream port 20. When the first repeater 10 obtains the first message of the first device 70 and the first message is a preset broadcast message, the routing method of the first message is modified to broadcast from the root complex of the high-speed serial computer expansion bus standard, a new first message is obtained, and the new first message is sent to a first arbitrator 60. Then, the first arbitrator 60 adopts a fair arbitration method to forward the new first message sent by the first repeater 10 to the second downstream port 40 corresponding to the first arbitrator 60, so that the second device 80 connected to the second downstream port 40 corresponding to the first arbitrator 60 can obtain the new first message; transmission The transmission direction line a2 represents that the first device 70 sends a first message to the first repeater 10 through the first downstream port 20. When the first repeater 10 obtains the first message of the first device 70 and the first message is a preset broadcast message, the routing method of the first message is modified to broadcast from the root complex of the high-speed serial computer expansion bus standard, a new first message is obtained, and the new first message is sent to another first arbitrator 60. Then, the other first arbitrator 60 adopts a fair arbitration method to forward the new first message sent by the first repeater 10 to the second downstream port 40 corresponding to the other first arbitrator 60, so that the second device 80 connected to the second downstream port 40 corresponding to the other first arbitrator 60 can obtain the new first message.
[0100] Reference Figure 5, the transmission direction line b1 represents that a second device 80 sends a second message to a second repeater 30 corresponding to the second device 80 through a second downstream port 40 corresponding to the second device 80, and when the second repeater 30 obtains the second message of the second device 80, and the second message is a message sent to the first device 70, the routing mode of the second message is modified to be sent based on the identifier, and the destination address of the second message is modified to the identifier of the first device 70 in the high-speed serial computer expansion bus standard, a new second message is obtained, and the new second message is sent to the first arbitrator 50, and then the first arbitrator 50 adopts a fair arbitration method to forward the new second message sent by the second repeater 30 to the first downstream port 20, so that the first device 70 connected to the first downstream port 20 can obtain the new second message; transmission The transmission direction line b2 represents that another second device 80 sends a second message to the second repeater 30 corresponding to the other second device 80 through the second downstream port 40 corresponding to the other second device 80. When the second repeater 30 obtains the second message of the second device 80 and the second message is a message sent to the first device 70, the routing method of the second message is modified to be sent based on the identifier, and the destination address of the second message is modified to the identifier of the first device 70 in the high-speed serial computer expansion bus standard, a new second message is obtained, and the new second message is sent to the first arbitrator 50. Then, the first arbitrator 50 adopts a fair arbitration method to forward the new second message sent by the second repeater 30 to the first downstream port 20, so that the first device 70 connected to the first downstream port 20 can obtain the new second message.
[0101] Optional, see Figure 6In some embodiments, the first message sending process of the first device 70 includes: X1, obtaining the first message, that is, obtaining the first message through the first repeater 10; X2, whether to use the proxy mode, that is, whether the working mode of the switch is the MCTP proxy mode; X3, whether it is a manufacturer-defined message, that is, when the working mode of the switch is the MCTP proxy mode, the first repeater 10 is used to determine whether the first message is a vendor-defined message of the management component transmission protocol; X4, whether it is a preset message type, that is, when the first message is a vendor-defined message of the management component transmission protocol, the first repeater 10 is used to determine whether the message type of the first message is a preset message type; X5, forwarding to the router Control module 90, that is, forwarding the first message to routing control module 90 through the first repeater 10, and sending the first message to the device pointed to by the destination address of the first message through the routing control module 90; X6, modified to broadcast from the root complex of the high-speed serial computer expansion bus standard, that is, through the first repeater 10 when the message type of the first message is a preset message type, modify the routing method of the first message to broadcast from the root complex of the high-speed serial computer expansion bus standard to obtain a new first message; X7, sending the new first message to each first arbitrator 60, that is, sending the new first message to each first arbitrator 60 through the first repeater 10. The specific implementation process is similar to the above and will not be repeated here.
[0102] Optional, see Figure 7 In some embodiments, the sending process of the second message of the second device 80 includes: Y1, obtaining the second message, that is, obtaining the second message through the second forwarder 30; Y2, whether to use the proxy mode, that is, whether the working mode of the switch is the MCTP proxy mode; Y3, whether it is a message sent to the first device 70, that is, when the working mode of the switch is the MCTP proxy mode, judging whether the second message is a message sent to the first device 70 through the second forwarder 30; Y4, forwarding to the routing control module 90, that is, forwarding the second message to the routing control module 90, and sending the second message to the device pointed to by the destination address of the second message through the routing control module 90; Y 5. Modify the routing mode of the second message to be sent based on the identifier, and modify the destination address of the second message to the identifier of the first device 70 in the high-speed serial computer expansion bus standard, that is, through the second repeater 30, when the second message is a message sent to the first device 70, modify the routing mode of the second message to be sent based on the identifier, and modify the destination address of the second message to the identifier of the first device 70 in the high-speed serial computer expansion bus standard, to obtain a new second message; Y6. Send the new second message to the first arbitrator 50, that is, send the new second message to the first arbitrator 50 through the second repeater 30. The specific implementation process is similar to the above and will not be repeated here.
[0103] Compared with the prior art, through the embodiment of the present application, the function of the PCIe endpoint device becoming the bus owner of the MCTP can be realized without the RC forwarding the MCTP message, which expands the selection range of the host platform. Compared with the RC, the structure of the switch in the embodiment of the present application is simpler, and it can have at least 1 USP and 2 DSPs; in addition, the switch can be flexibly connected to the PCIe topology structure, which can make the topology design of the MCTP more flexible.
[0104] In summary, in the embodiment of the present application, the first device 70 is the bus owner of the management component transmission protocol, and the second device 80 is the endpoint device or switch of the management component transmission protocol. When the first message of the first device 70 is obtained through the first repeater 10, and the first message is a preset broadcast message, the routing mode of the first message is modified to broadcast from the root complex of the high-speed serial computer expansion bus standard, a new first message is obtained, and the new first message is sent to each second device 80 corresponding to the first device 70, and the second message of the second device 80 is obtained through the second repeater 30, and the second message is sent to the first device 70. In the case of a message to be sent, the routing mode of the second message is modified to be sent based on the identifier, and the destination address of the second message is modified to the identifier of the first device 70 in the high-speed serial computer expansion bus standard, a new second message is obtained, and the new second message is sent to the first device 70, so as to implement the use of the management component transmission protocol in the server of the high-speed serial computer expansion bus standard, and perform message interaction between the baseboard management controller (first device 70) and the peripheral device (second device 80), and there is no need to configure a processor with a bus owner agent function that supports the management component transmission protocol, thereby improving the freedom of processor selection for the server.
[0105] Figure 8 is a block diagram of a message transmission device provided in an embodiment of the present application, such as Figure 8 As shown, the device 300 includes:
[0106] The first processing module 301 is used for, when a first message of a first device is obtained and the first message is a preset broadcast message, modifying the routing mode of the first message to broadcast from the root complex of the high-speed serial computer expansion bus standard, obtaining a new first message, and sending the new first message to each second device corresponding to the first device;
[0107] A second processing module 302 is used for, when a second message from the second device is obtained and the second message is a message sent to the first device, modifying the routing mode of the second message to send based on the identifier, and modifying the destination address of the second message to the identifier of the first device in the high-speed serial computer expansion bus standard, obtaining a new second message, and sending the new second message to the first device;
[0108] The first device is a bus owner of a management component transmission protocol, and the second device is an endpoint device or a switch of the management component transmission protocol.
[0109] Optionally, the device 300 further includes:
[0110] an acquisition module, configured to acquire a message type of the first message when the first message is a vendor-defined message of the management component transmission protocol;
[0111] The first determining module is used to determine that the first message is the preset broadcast message when the message type of the first message is a preset message type.
[0112] Optionally, the preset message types include preparing for endpoint discovery message and endpoint discovery message.
[0113] Optionally, the device 300 further includes:
[0114] The second determination module is used to determine that the second message is a message sent to the first device when the second message is a vendor-defined message of the management component transmission protocol and the routing mode of the second message is to be sent to the root complex.
[0115] Optionally, the first processing module 301 specifically includes:
[0116] A first sending submodule, configured to send the new first message to each second device corresponding to the first device in a fair arbitration manner;
[0117] The second processing module 302 includes:
[0118] The second sending submodule is configured to send the new second message to the first device by adopting the fair arbitration method.
[0119] Optionally, the device 300 further includes:
[0120] A first sending module is used to send the first message to a device corresponding to a destination address of the first message when the first message is acquired and the first message is a message other than the preset broadcast message;
[0121] The second sending module is used to send the second message to the device corresponding to the destination address of the second message when the second message is acquired and the second message is a message sent to other devices other than the first device.
[0122] The message transmission device in the embodiment of the present application can be a device, or a component or integrated circuit in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0123] The message transmission device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0124] The message transmission device provided in the embodiment of the present application can achieve Figure 1 In order to avoid repetition, the various processes implemented by the message transmission device in the method embodiment are not described here.
[0125] In an embodiment of the present application, the first device is a bus owner of the management component transmission protocol, and the second device is an endpoint device or switch of the management component transmission protocol. When a first message of the first device is obtained and the first message is a preset broadcast message, the routing mode of the first message is modified to broadcast from the root complex of the high-speed serial computer expansion bus standard to obtain a new first message, and the new first message is sent to each second device corresponding to the first device. When a second message of the second device is obtained and the second message is a message sent to the first device, the routing mode of the second message is modified to send based on an identifier, and the destination address of the second message is modified to the identifier of the first device in the high-speed serial computer expansion bus standard to obtain a new second message, and the new second message is sent to the first device, so as to realize the use of the management component transmission protocol in a server of the high-speed serial computer expansion bus standard to perform message interaction between the baseboard management controller (first device) and the peripheral device (second device), and there is no need to configure a processor with a bus owner agent function that supports the management component transmission protocol, thereby improving the freedom of processor selection for the server.
[0126] Optionally, an embodiment of the present application also provides an electronic device, including a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the various processes of the above-mentioned message transmission method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0127] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0128] Fig. 9 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0129] The electronic device 400 includes but is not limited to components such as a radio frequency unit 401 , a network module 402 , an audio output unit 403 , an input unit 404 , a sensor 405 , a display unit 406 , a user input unit 407 , an interface unit 408 , a memory 409 , and a processor 410 .
[0130] Those skilled in the art will appreciate that the electronic device 400 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 410 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig. 9 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0131] The processor 410 is configured to, when a first message from a first device is obtained and the first message is a preset broadcast message, modify the routing mode of the first message to broadcast from a root complex of a high-speed serial computer expansion bus standard, obtain a new first message, and send the new first message to each second device corresponding to the first device;
[0132] When a second message of the second device is obtained and the second message is a message sent to the first device, modify the routing mode of the second message to send based on the identifier, modify the destination address of the second message to the identifier of the first device in the high-speed serial computer expansion bus standard, obtain a new second message, and send the new second message to the first device;
[0133] The first device is a bus owner of a management component transmission protocol, and the second device is an endpoint device or a switch of the management component transmission protocol.
[0134] In an embodiment of the present application, the first device is a bus owner of the management component transmission protocol, and the second device is an endpoint device or switch of the management component transmission protocol. When a first message of the first device is obtained and the first message is a preset broadcast message, the routing mode of the first message is modified to broadcast from the root complex of the high-speed serial computer expansion bus standard to obtain a new first message, and the new first message is sent to each second device corresponding to the first device. When a second message of the second device is obtained and the second message is a message sent to the first device, the routing mode of the second message is modified to send based on an identifier, and the destination address of the second message is modified to the identifier of the first device in the high-speed serial computer expansion bus standard to obtain a new second message, and the new second message is sent to the first device, so as to realize the use of the management component transmission protocol in a server of the high-speed serial computer expansion bus standard to perform message interaction between the baseboard management controller (first device) and the peripheral device (second device), and there is no need to configure a processor with a bus owner agent function that supports the management component transmission protocol, thereby improving the freedom of processor selection for the server.
[0135] Optionally, the processor 410 is further used to obtain the message type of the first message when the first message is a vendor-defined message of the management component transmission protocol; and determine that the first message is the preset broadcast message when the message type of the first message is a preset message type.
[0136] Optionally, the preset message types include preparing for endpoint discovery message and endpoint discovery message.
[0137] Optionally, the processor 410 is further configured to determine that the second message is a message sent to the first device when the second message is a vendor-defined message of the management component transmission protocol and a routing mode of the second message is to be sent to the root complex.
[0138] Optionally, the processor 410 is further used to send the new first message to each second device corresponding to the first device by adopting a fair arbitration method; the processor 410 is further used to send the new second message to the first device by adopting the fair arbitration method.
[0139] Optionally, the processor 410 is also used to, when the first message is obtained and the first message is a message other than the preset broadcast message, send the first message to a device corresponding to the destination address of the first message; and when the second message is obtained and the second message is a message sent to a device other than the first device, send the second message to a device corresponding to the destination address of the second message.
[0140] In an embodiment of the present application, the first device is a bus owner of the management component transmission protocol, and the second device is an endpoint device or switch of the management component transmission protocol. When a first message of the first device is obtained and the first message is a preset broadcast message, the routing mode of the first message is modified to broadcast from the root complex of the high-speed serial computer expansion bus standard to obtain a new first message, and the new first message is sent to each second device corresponding to the first device. When a second message of the second device is obtained and the second message is a message sent to the first device, the routing mode of the second message is modified to send based on an identifier, and the destination address of the second message is modified to the identifier of the first device in the high-speed serial computer expansion bus standard to obtain a new second message, and the new second message is sent to the first device, so as to realize the use of the management component transmission protocol in a server of the high-speed serial computer expansion bus standard to perform message interaction between the baseboard management controller (first device) and the peripheral device (second device), and there is no need to configure a processor with a bus owner agent function that supports the management component transmission protocol, thereby improving the freedom of processor selection for the server.
[0141] It should be understood that in the embodiment of the present application, the input unit 404 may include a graphics processor (Graphics Processing Unit, GPU) 4041 and a microphone 4042, and the graphics processor 4041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 407 includes a touch panel 4071 and at least one of other input devices 4072. The touch panel 4071 is also called a touch screen. The touch panel 4071 may include two parts: a touch detection device and a touch controller. Other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0142] The memory 409 can be used to store software programs and various data. The memory 409 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 409 may include a volatile memory or a non-volatile memory, or the memory 409 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 409 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0143] The processor 410 may include one or more processing units; optionally, the processor 410 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 410.
[0144] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned message transmission method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0145] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0146] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0147] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0148] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A message transmission method, It is characterized in that The method comprises: When a first message of a first device is obtained and the first message is a preset broadcast message, a routing mode of the first message is modified to be broadcast from a root complex of a high-speed serial computer expansion bus standard, a new first message is obtained, and the new first message is sent to each second device corresponding to the first device; When a second message of the second device is obtained and the second message is a message sent to the first device, modify the routing mode of the second message to send based on the identifier, modify the destination address of the second message to the identifier of the first device in the high-speed serial computer expansion bus standard, obtain a new second message, and send the new second message to the first device; The first device is a bus owner of a management component transmission protocol, and the second device is an endpoint device or a switch of the management component transmission protocol.
2. The method according to claim 1, It is characterized in that The method further comprises: In the case where the first message is a vendor-defined message of the management component transmission protocol, obtaining a message type of the first message; In a case where the message type of the first message is a preset message type, the first message is determined to be the preset broadcast message.
3. The method according to claim 2, It is characterized in that The preset message types include prepare-for-endpoint-discovery message and endpoint-discovery message.
4. The method according to claim 1, It is characterized in that The method further comprises: When the second message is a vendor-defined message of the management component transport protocol and the routing mode of the second message is to be sent to the root complex, it is determined that the second message is a message sent to the first device.
5. The method according to claim 1, It is characterized in that The sending the new first message to each second device corresponding to the first device includes: Using a fair arbitration method, sending the new first message to each second device corresponding to the first device; The sending the new second message to the first device includes: The new second message is sent to the first device by using the fair arbitration method.
6. The method according to claim 1, It is characterized in that The method further comprises: When the first message is acquired and the first message is a message other than the preset broadcast message, sending the first message to a device corresponding to a destination address of the first message; When the second message is acquired and the second message is a message sent to a device other than the first device, the second message is sent to a device corresponding to the destination address of the second message.
7. A switch, It is characterized in that comprising a first repeater, a first downstream port, a plurality of second repeaters and a plurality of second downstream ports, wherein the second downstream ports have corresponding second repeaters; The first downstream port is used to connect to a first device, the first device being a bus owner of a management component transmission protocol; The second downstream port is used to connect to a second device, the second device being an endpoint device or other switch of the management component transmission protocol; The first repeater is connected to the first downstream port and each of the second downstream ports respectively, and is used for, when a first message from the first device is obtained and the first message is a preset broadcast message, modifying the routing mode of the first message to broadcast from the root complex of the high-speed serial computer expansion bus standard, obtaining a new first message, and sending the new first message to each second device corresponding to the first device; The second repeater is connected to the second downstream port and the first downstream port corresponding to the second repeater respectively, and is used to modify the routing mode of the second message to identifier-based sending when a second message of the second device is obtained and the second message is a message sent to the first device, and modify the destination address of the second message to the identifier of the first device in the high-speed serial computer expansion bus standard, obtain a new second message, and send the new second message to the first device.
8. The switch according to claim 7, It is characterized in that The switch further includes a first arbitrator, a plurality of second arbitrators, and the second downstream port has a corresponding second arbitrator; The first arbitrator is connected to the first downstream port and the second forwarder respectively, so that the second forwarder is connected to the first downstream port through the first arbitrator, and the first arbitrator is used to forward the new second message sent by the second forwarder to the first downstream port in a fair arbitration manner, so that the first device connected to the first downstream port obtains the new second message; The second arbitrator is connected to the second downstream port corresponding to the second arbitrator and the first forwarder respectively, so that the first forwarder is connected to the second downstream port corresponding to the second arbitrator through the second arbitrator, and the second arbitrator is used to forward the new first message sent by the first forwarder to the second downstream port corresponding to the second arbitrator in a fair arbitration manner, so that the second device connected to the second downstream port corresponding to the second arbitrator obtains the new first message; The first forwarder is specifically configured to send the new first message to each of the second arbitrators; The second forwarder is specifically configured to send the new second message to the first arbitrator.
9. The switch according to claim 7, It is characterized in that The switch also includes a routing control module; The routing control module is connected to the first forwarder and each of the second forwarders respectively, and the routing control module is used to forward the first message sent by the first forwarder to the first destination device corresponding to the destination address of the first message; and forwarding the second message sent by the second forwarder to a second destination device corresponding to the destination address of the second message; the first destination device and the second destination device are both devices connected to the port of the switch; The first forwarder is further configured to, upon acquiring a first message from the first device, send the first message to the routing control module if the first message is other than the preset broadcast message; The second forwarder is further configured to send the second message to the routing control module when the second message is acquired and the second message is a message sent to a device other than the first device.
10. A message transmission device, It is characterized in that The device comprises: A first processing module is used for, when a first message of a first device is acquired and the first message is a preset broadcast message, modifying the routing mode of the first message to broadcast from a root complex of a high-speed serial computer expansion bus standard, acquiring a new first message, and sending the new first message to each second device corresponding to the first device; A second processing module is used for, when a second message from the second device is acquired and the second message is a message sent to the first device, modifying the routing mode of the second message to send based on the identifier, and modifying the destination address of the second message to the identifier of the first device in the high-speed serial computer expansion bus standard, obtaining a new second message, and sending the new second message to the first device; The first device is a bus owner of a management component transmission protocol, and the second device is an endpoint device or a switch of the management component transmission protocol.
11. An electronic device, It is characterized in that The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the message transmission method as claimed in any one of claims 1 to 6.
12. A readable storage medium, It is characterized in that The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by the processor, the steps of the message transmission method according to any one of claims 1 to 6 are implemented.
