RapidIO network enumeration method and device
By adaptively adjusting the switching port rate during the RapidIO network enumeration process to match it with the connected device rate, the problem that equipment in the prior art cannot access the network normally due to inconsistent rates is solved, the degree of automation and accuracy of enumeration is improved, and the consumption of manual resource is reduced.
Patent Information
- Application Number
- CN202510024580.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-04-11
AI Technical Summary
The existing RapidIO network enumeration method has low degree of automation, poor flexibility, low accuracy, and requires a large amount of manual resources, resulting in the equipment being unable to access the network normally due to inconsistent speeds.
During the RapidIO network enumeration process, the switching port rate is adaptively adjusted to match the connected device rate, thereby achieving normal network access to the device. The method includes enumerating the switching devices with the master control device as a reference, detecting the switching port connection status, and adapting the rate to the linkage until the link is built in the non-chain state.
It improves the automation, flexibility and accuracy of RapidIO network enumeration, reduces the consumption of manual resources, and realizes normal access to the network of devices at different speeds.
Smart Images

Figure CN119814694A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a RapidIO network enumeration method and device. Background Art
[0002] With the rapid development of Internet of Things technology, computing clusters and high-performance embedded systems, the requirements for reliability, latency and cost of interconnection between chips and boards are constantly increasing. RapidIO is a high-performance, high-reliability, low-latency interconnection standard designed to provide high-speed, low-latency data transmission capabilities that can meet the requirements for reliability, latency and cost of interconnection between chips and boards. RapidIO is suitable for a variety of applications, such as telecommunications infrastructure, aerospace and industrial automation.
[0003] In actual applications, the structure of RapidIO networks is often complex. Specifically, in most application environments, the number of devices in a RapidIO network is large, the topology is diverse, and it may contain devices with different speeds. For the RapidIO network structure, if the speed of the switch port of the switching device is different from the speed of the endpoint device it is connected to, it is impossible to directly establish a link, resulting in these endpoint devices being unable to access the network normally.
[0004] In response to the situation where devices in a RapidIO network cannot access the network normally due to inconsistent rates, a common enumeration method in current technology is: manually configure the rates of all switch ports in the RapidIO network in advance so that the rates of the switch ports are the same as the rates of the endpoint devices connected to them, and then start the enumeration of the RapidIO network to achieve the purpose of link building; or manually configure the configuration files corresponding to all switch ports in the RapidIO network in advance, and then start the enumeration of the RapidIO network, and adjust the rates of the corresponding switch ports by reading the corresponding configuration files so that the rates of the switch ports are the same as the rates of the endpoint devices connected to them, so as to achieve the purpose of link building.
[0005] It can be seen from this that the common enumeration methods in current technologies have low automation, poor flexibility, low accuracy, and a large waste of manual resources. Summary of the invention
[0006] Based on the above problems, the present application provides a RapidIO network enumeration method and device. During the RapidIO network enumeration process, the rate of the switch port is adaptively adjusted, so that endpoint devices with different rates can be normally connected to the RapidIO network, which improves the degree of automation, flexibility and accuracy, and at the same time reduces the consumption of manual resources.
[0007] The embodiments of the present application disclose the following technical solutions:
[0008] In a first aspect, the present application provides a RapidIO network enumeration method, comprising:
[0009] Taking the master control device in the RapidIO network as a reference, enumerate the first switching device; wherein the first switching device is a switching device connected to the master control device;
[0010] In the process of enumerating all the switch ports of the first switch device in sequence, detecting the connection state of the currently enumerated switch port; wherein the connection state includes: link establishment state and non-link establishment state;
[0011] When the connection state of the currently enumerated switch port is a non-link state, adaptively adjust the rate of the currently enumerated switch port, and detect the connection state of the currently enumerated switch port until the connection state of the currently enumerated switch port is a link state;
[0012] When the connection state of the currently enumerated switch port is a link establishment state, the device connected to the currently enumerated switch port is enumerated.
[0013] Optionally, the detecting the connection status of the currently enumerated switch port includes:
[0014] Reading a register corresponding to the currently enumerated switch port in the first switching device to obtain a connection identifier of the currently enumerated switch port;
[0015] Based on the connection identifier of the currently enumerated switch port, a connection state of the currently enumerated switch port is determined.
[0016] Optionally, when the connection state of the currently enumerated switch port is a non-link state, adaptively adjusting the rate of the currently enumerated switch port, and detecting the connection state of the currently enumerated switch port until the connection state of the currently enumerated switch port is a link state, includes:
[0017] When the connection state of the currently enumerated switch port is a non-link state, the rate of the currently enumerated switch port is adjusted to multiple preset rates in sequence, and after each adjustment of the rate of the currently enumerated switch port, the connection state of the currently enumerated switch port is detected until the connection state of the currently enumerated switch port is a link state; wherein the multiple preset rates cover all rates supported by the currently enumerated switch port.
[0018] Optionally, the adjusting the rate of the currently enumerated switch port to a plurality of preset rates in sequence includes:
[0019] The rate of the currently enumerated switch port is adjusted to a plurality of preset rates in sequence from high to low.
[0020] Optionally, the method further includes:
[0021] When the rate of the currently enumerated switch port has been adjusted to the multiple preset rates in sequence, and the connection state detected each time is a non-link state, the currently enumerated switch port is skipped and the next switch port of the first switching device is continuously enumerated.
[0022] Optionally, when the connection state of the currently enumerated switch port is a link establishment state, after enumerating the device connected to the currently enumerated switch port, the method further includes:
[0023] Identify the device type of the enumerated device;
[0024] When the device type of the enumerated device is a switching device, all switching ports of the second switching device are enumerated in sequence; wherein the second switching device is a switching device connected to the switching port of the first switching device;
[0025] When the device type of the enumerated device is an endpoint device, enumeration locking is performed.
[0026] Optionally, when the device type of the enumerated device is a switching device, all switching ports of the second switching device are enumerated in sequence, including:
[0027] When the device type of the enumerated device is a switching device, the device information of the second switching device is pushed into the stack, so as to enumerate all the switching ports of the second switching device based on the second switching device.
[0028] Optionally, before enumerating the first switching device based on the master device in the RapidIO network, the method further includes:
[0029] In response to an enumeration trigger event for a RapidIO network, enumerate master devices in the RapidIO network;
[0030] The enumerating the first switching device based on the master device in the RapidIO network includes:
[0031] Taking the master control device in the RapidIO network as a reference, a first switching device is enumerated in a depth-first traversal manner.
[0032] In a second aspect, the present application provides a RapidIO network enumeration device, comprising:
[0033] A first enumeration module is used to enumerate a first switching device based on a master control device in a RapidIO network; wherein the first switching device is a switching device connected to the master control device;
[0034] A connection detection module, used to detect the connection status of the currently enumerated switch port in the process of enumerating all the switch ports of the first switch device in sequence; wherein the connection status includes: link establishment status and non-link establishment status;
[0035] A rate adjustment module, used for adaptively adjusting the rate of the currently enumerated switch port when the connection state of the currently enumerated switch port is a non-link state, and detecting the connection state of the currently enumerated switch port until the connection state of the currently enumerated switch port is a link state;
[0036] The second enumeration module is used to enumerate the devices connected to the currently enumerated switch port when the connection state of the currently enumerated switch port is a link establishment state.
[0037] Optionally, the connection detection module is specifically used to: read the register corresponding to the currently enumerated switching port in the first switching device to obtain the connection identifier of the currently enumerated switching port; and determine the connection status of the currently enumerated switching port based on the connection identifier of the currently enumerated switching port.
[0038] Optionally, a rate adjustment module is specifically used to adjust the rate of the currently enumerated switch port to multiple preset rates in sequence when the connection state of the currently enumerated switch port is a non-link state, and after each adjustment of the rate of the currently enumerated switch port, detect the connection state of the currently enumerated switch port until the connection state of the currently enumerated switch port is a link state; wherein the multiple preset rates cover all rates supported by the currently enumerated switch port.
[0039] Optionally, the rate adjustment module is specifically used to adjust the rate of the currently enumerated switch port to multiple preset rates in sequence from high to low.
[0040] Optionally, the device further comprises: a type identification module, a third enumeration module and an enumeration locking module. The type identification module is used to identify the device type of the enumerated device; the third enumeration module is used to enumerate all switch ports of the second switch device in sequence when the device type of the enumerated device is a switch device; the enumeration locking module is used to perform enumeration locking when the device type of the enumerated device is an endpoint device.
[0041] Optionally, the third enumeration module is specifically used to push the device information of the second switching device into the stack when the device type of the enumerated device is a switching device, so as to enumerate all switching ports of the second switching device based on the second switching device.
[0042] Optionally, the enumeration trigger module is used to enumerate the master devices in the RapidIO network in response to an enumeration trigger event for the RapidIO network; the first enumeration module is specifically used to enumerate the first switching device based on the master devices in the RapidIO network in a depth-first traversal manner.
[0043] Compared with the prior art, the present application has the following beneficial effects: in the present application, during the enumeration process of the RapidIO network, when the connection state of the switch port is in an unlinked state, that is, when the speed of the switch port and the device connected to it are different, the speed of the switch port is adaptively adjusted so that the speed of the switch port is the same as the speed of the device connected to it, so as to complete the link establishment, thereby enabling endpoint devices of different speeds to be normally connected to the RapidIO network, and the normal enumeration of the RapidIO network can be achieved without the user participating in the configuration of the speed of the switch port, thereby improving the degree of automation, flexibility and accuracy, and at the same time reducing the consumption of manual resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0045] Figure 1 A schematic diagram of the basic structure of a RapidIO network provided in an embodiment of the present application;
[0046] Figure 2 A flowchart of a RapidIO network enumeration method provided in an embodiment of the present application;
[0047] Figure 3 A diagram showing an example of a RapidIO network topology provided in an embodiment of the present application;
[0048] Figure 4 A schematic diagram of the structure of a RapidIO network enumeration device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] As described above, a switch port with inconsistent speeds and the endpoint device connected to it cannot establish a link. If the speeds of the endpoint device and the port corresponding to the switch device are inconsistent, the endpoint device cannot establish a link with the switch device during the RapidIO network enumeration process, making it impossible for the endpoint device to access the network normally due to the inability to establish a link. Furthermore, when the endpoint device cannot access the network normally, if data service interaction transmission is started directly at this time, the data from the endpoint device that is not connected to the network cannot be received; at this time, if data is continued to be sent to these endpoint devices that have not established a connection, back pressure will be generated because the switch port is not linked, which will lead to network congestion or even network collapse.
[0050] In the current technology, for the situation that the device in the RapidIO network cannot access the network normally due to inconsistent speed, one of the common enumeration methods is to manually configure the speed of all switch ports in the RapidIO network in advance, so that the speed of the switch port is the same as the speed of the endpoint device connected to it, and then start the enumeration of the RapidIO network to achieve the purpose of link building. This enumeration method requires manual configuration of the speed of the switch port, and has a strong correlation with the topology of the RapidIO network, that is, when the topology of the RapidIO network changes, the speed of the corresponding switch port also needs to change accordingly to a large extent. Another method is to manually configure the configuration files corresponding to all switch ports in the RapidIO network in advance, and then start the enumeration of the RapidIO network, and adjust the speed of the corresponding switch port by reading the corresponding configuration file, so that the speed of the switch port is the same as the speed of the endpoint device connected to it, so as to achieve the purpose of link building. This enumeration method also requires manual participation in the configuration of the configuration file, and has a strong correlation with the topology of the RapidIO network, that is, when the topology of the RapidIO network changes, the configuration file of the corresponding switch port also needs to be reconfigured to a large extent, and has high requirements for operators.
[0051] As can be seen from the above description, the common enumeration method in the current technology requires manual participation and is strongly related to the topology of the RapidIO network, resulting in low automation, poor flexibility and low accuracy, and a large waste of manual resources.
[0052] Furthermore, there is also an enumeration method in the current technology, which is to introduce a specific hardware device. Before starting the enumeration of the RapidIO network, the hardware device is responsible for sending a configuration data packet, so that the rate of the configured switch port is the same as the rate of the endpoint device connected to it. However, this enumeration method introduces additional hardware devices, resulting in unnecessary hardware overhead.
[0053] The present application provides a method for enumerating a RapidIO network, comprising: enumerating a first switching device based on a master control device in the RapidIO network; in the process of sequentially enumerating all switching ports of the first switching device, detecting the connection status of the currently enumerated switching port; when the connection status of the currently enumerated switching port is a non-link-building state, adaptively adjusting the rate of the currently enumerated switching port, and detecting the connection status of the currently enumerated switching port until the connection status of the currently enumerated switching port is a link-building state; when the connection status of the currently enumerated switching port is a link-building state, enumerating a device connected to the currently enumerated switching port. In an embodiment of the present application, during the enumeration process of the RapidIO network, when the connection state of the switch port is in an unlinked state, that is, the speed of the switch port and the device connected to it are different, the speed of the switch port is adaptively adjusted so that the speed of the switch port is the same as the speed of the device connected to it, so as to complete the link establishment, so that endpoint devices with different speeds can be normally connected to the RapidIO network, and the normal enumeration of the RapidIO network can be achieved without the user participating in the configuration of the speed of the switch port, thereby improving the degree of automation, flexibility and accuracy, and at the same time reducing the consumption of manual resources.
[0054] Furthermore, the adaptive adjustment of the switch port can be realized without introducing additional hardware devices, thus avoiding unnecessary hardware overhead.
[0055] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only 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.
[0056] Embodiment 1:
[0057] Combine the following Figure 1-Figure 3 , a RapidIO network enumeration method provided in an embodiment of the present application is introduced in detail.
[0058] First combine Figure 1 , give an example to introduce the basic structure of RapidIO network.
[0059] like Figure 1 As shown in Figure 1, RapidIO network includes: master device, switch device and endpoint device. RapidIO network can build a complex network topology by using the combination of master device, switch device and endpoint device to support high bandwidth and low latency application requirements.
[0060] Among them, the master device refers to the device that can initiate transactions, such as the central processing unit (CPU). The active device can actively send read or write requests to other devices and can control the direction of data transmission.
[0061] Switch devices are responsible for routing data from one node to another. Switch devices not only extend the network, but also optimize performance and bandwidth usage through intelligent routing. Switch devices can connect multiple master devices and / or endpoint devices and pass data between them.
[0062] Among them, endpoint devices refer to the target devices to be accessed, such as storage, I / O devices, etc. That is, endpoint devices are data sending / receiving devices in the RapidIO network.
[0063] The following Figure 2 As shown, a RapidIO network enumeration method provided in an embodiment of the present application includes the following steps:
[0064] S201: Enumerate a first switching device based on a master control device in a RapidIO network.
[0065] The first switching device is a switching device connected to the main control device.
[0066] The master device is responsible for enumerating and detecting all devices in the entire RapidIO network. In the initial stage of the RapidIO network, device enumeration is performed based on the master device, thereby completing the enumeration of devices in the entire RapidIO network.
[0067] Specifically, in response to an enumeration trigger event for a RapidIO network, master control devices in the RapidIO network are enumerated; then, based on the master control devices in the RapidIO network, a depth-first traversal method is adopted to enumerate the first switching device.
[0068] Among them, Depth-First Search (DFS) is a common graph traversal algorithm, which is often used in the enumeration process of RapidIO networks. In the depth-first traversal, starting from the root node, the subtree branches are explored as deep as possible until it is impossible to continue, and then backtracking to the previous node to continue exploring other subtree branches that have not been visited.
[0069] In different enumeration scenarios, the enumeration triggering events are different. For example, the enumeration period can be pre-set, and a timer or counter can be started to time the enumeration period, and when the enumeration period arrives, the RapidIO network is enumerated, and the corresponding device enumeration time is the arrival of the enumeration period.
[0070] S202: In the process of enumerating all switch ports of the first switch device in sequence, detecting the connection status of the currently enumerated switch port.
[0071] The connection status includes: link establishment status and non-link establishment status.
[0072] If the connection status of the currently enumerated switch port is the link-building status, it indicates that the speed of the currently enumerated switch port is the same as the speed of the device connected to it, and the link is directly established. If the connection status of the currently enumerated switch port is the non-link-building status, it indicates that the speed of the currently enumerated switch port is different from the speed of the device connected to it, and the link cannot be directly established.
[0073] In a possible implementation, a register corresponding to the currently enumerated switch port in the first switch device is read to obtain a connection identifier of the currently enumerated switch port; based on the connection state of the currently enumerated switch port. Exemplarily, if the switch port currently enumerated to the first switch device is switch port A, the register corresponding to switch port A in the first switch device is read, and if the connection identifier of switch port A is 1, the connection state of switch port A is determined to be a link state; if the connection identifier of switch port A is 0, the connection state of switch port A is determined to be a non-link state.
[0074] When it is detected that the connection state of the currently enumerated switch port is a non-link state, S203 is performed first, and then S204 is performed.
[0075] When it is detected that the connection state of the currently enumerated switch port is in the link establishment state, directly proceed to S204.
[0076] S203: Adaptively adjust the rate of the currently enumerated switch port, and detect the connection state of the currently enumerated switch port, until the connection state of the currently enumerated switch port is a link establishment state.
[0077] Specifically, the rate of the currently enumerated switch port is adaptively adjusted, and the connection state of the currently enumerated switch port is detected each time the rate is adjusted, until the connection state of the currently enumerated switch port is a link establishment state.
[0078] In a possible implementation, the rate of the currently enumerated switch port is adjusted to multiple preset rates in sequence, and after each adjustment of the rate of the currently enumerated switch port, the connection state of the currently enumerated switch port is detected until the connection state of the currently enumerated switch port is a link establishment state. The multiple preset rates cover all rates supported by the currently enumerated switch port.
[0079] It should be noted that in the embodiments of the present application, multiple preset rates are set according to the common rates of devices in the RapidIO network, for example: 6.25Gbps, 5Gbps, 3.125Gpbs, etc. In addition, they can also be set according to specific scenarios, and this application does not make specific limitations.
[0080] Further, in a possible implementation, the rate of the currently enumerated switch port is adjusted to multiple preset rates in order from high to low. For example, assuming that the multiple preset rates are 6.25Gbps, 5Gbps, and 3.125Gpbs, the rate of the currently enumerated switch port is first adjusted to 6.25Gpbs in order from high to low, and the connection status of the currently enumerated switch port is detected; when the connection status is the unlinked state, the rate of the currently enumerated switch port is adjusted to 5Gpbs, and the connection status of the currently enumerated switch port is detected; if the connection status is the linked state, the rate of the currently enumerated switch port is no longer adjusted.
[0081] In a possible implementation, when the rate of the currently enumerated switch port has been adjusted to multiple preset rates in sequence, and the connection status detected each time is a non-link state, the currently enumerated switch port is skipped and the next switch port of the first switch device is enumerated. The reasons for the above situation include but are not limited to: the currently enumerated switch port is not connected to any device, the currently enumerated switch port fails and the link cannot be established, the device connected to the currently enumerated switch port fails and the link cannot be established, etc.
[0082] S204: Enumerate the devices connected to the currently enumerated switch port.
[0083] Furthermore, after enumerating the devices connected to the currently enumerated switching port, the device type of the enumerated device is identified; when the device type of the enumerated device is a switching device, all switching ports of the second switching device are enumerated in sequence, and the second switching device is a switching device connected to the switching port of the first switching device; when the device type of the enumerated device is an endpoint device, enumeration locking is performed.
[0084] Among them, Enumeration Locking is a mechanism used to ensure the stability and consistency of the system during the enumeration process. When the device type of the enumerated device is an endpoint device, enumeration locking is performed to ensure that all devices in the RapidIO network can be correctly identified and the network configuration will not change during the enumeration process.
[0085] Specifically, when the device type of the enumerated device is a switching device, the device information of the second switching device is pushed into the stack, so that all the switching ports of the second switching device are enumerated based on the second switching device. The enumeration of the switching ports of the second switching device is similar to the enumeration of the switching ports of the first switching device. For example, for switching port B (i.e., the switching port of the second switching device currently enumerated), the connection status of switching port B is detected; when the connection status of switching port B is a non-linking state, the rate of switching port B is adaptively adjusted, and the connection status of switching port B is adjusted until the connection status of switching port B is a linking state; when the connection status of switching port B is a linking state, the device connected to switching port B is enumerated.
[0086] In a possible implementation, a data packet is sent to the enumerated device so that the enumerated device returns a device type identifier; based on the device type identifier returned by the enumerated device, the device type of the enumerated device is identified.
[0087] Furthermore, after the RapidIO network enumeration is completed, a corresponding RapidIO network topology diagram is generated, and the operator can subsequently determine whether there is a problem with the connection of the unlinked switch port in the RapidIO network topology. Exemplarily, the RapidIO network topology indicates that the switch port C of the first switch device is not linked, and the operator determines again whether there is a connected device to the switch port C. If there is a connected device, the rate of the switch port C is manually adjusted so that the device connected to the switch port C can correctly access the network.
[0088] In a possible implementation, in the process of the RapidIO network enumeration method, there are switch ports that are skipped, which are marked in the topology diagram of the RapidIO network, which can simplify the complexity of subsequent manual operation / detection.
[0089] In order to facilitate understanding of a RapidIO network enumeration method provided in an embodiment of the present application, Figure 3 , an example is given to introduce a RapidIO network enumeration method provided in an embodiment of the present application. Among them, Figure 3The default / initial rates of the switch ports of all the switch devices are 5 Gpbs, the rate of the endpoint device 11 is 3.125 Gpbs, the rate of the endpoint device 13 is 2.5 Gpbs, and the rates of the remaining endpoint devices are all 5 Gpbs.
[0090] like Figure 3 As shown, the main control device is first enumerated, and based on the main control device, the switching device SW0 (i.e., the first switching device) connected to the main control device is enumerated, wherein the switching device SW0 is connected to the main control device through its switching port a1; then, the remaining switching ports of the switching device SW0 are enumerated, and when the switching port a2 is enumerated, the rate of the switching port a2 is 5Gpbs and the rate of the endpoint device 10 connected to it is also 5Gpbs, then the connection state of the switching port a2 is the link establishment state, and the device connected to the switching port a2, i.e., the endpoint device 10, is directly enumerated, and the enumeration is locked.
[0091] Continue to enumerate the switch port a3 of the switching device SW0. At this time, the rate of the switch port a3 is 5Gpbs and the rate of the endpoint device 11 connected to it is 3.125Gpbs, then the connection status of the switch port a3 is an unlinked state; therefore, the rate of the switch port a3 is adaptively adjusted, and the rate of the switch port a3 is adjusted sequentially from 6.25Gpbs. When the rate of the switch port a3 is adjusted to 3.125Gpbs, it is detected that the connection status of the switch port a3 is an established state, then continue to enumerate the device connected to the switch port a3, that is, the endpoint device 11, and perform enumeration locking.
[0092] Continue to enumerate the switch port a4 of the switch device SW0. At this time, the connection state of the switch port a4 is the link establishment state, then enumerate the device connected to the switch port 4, that is, the switch device SW1 (that is, the second switch device), wherein the switch device SW1 is connected to the switch device SW0 through its switch port b1.
[0093] When the switch device SW1 is enumerated, the remaining switch ports of the switch device SW1 are continued to be enumerated. First, the switch port b2 of the switch device SW1 is enumerated. At this time, the rate of the switch port b2 is 5Gpbs and the rate of the endpoint device 12 connected to it is 5Gpbs, so the connection state of the switch port b2 is the link state; then the endpoint device 12 connected to the switch port b2 is continued to be enumerated, and the enumeration is locked. Subsequently, the switch port b3 of the switch device SW1 is continued to be enumerated. At this time, the rate of the switch port b3 is 5Gpbs and the rate of the endpoint device 13 connected to it is 2.5Gpbs, so the connection state of the switch port b3 is the unlinked state; therefore, the rate of the switch port b3 is adaptively adjusted, and the rate of the switch port b3 is adjusted sequentially from 6.25Gpbs. When the rate of the switch port b3 is adjusted to 2.5Gpbs, it is detected that the connection state of the switch port b3 is the link state, and the device connected to the switch port b3, that is, the endpoint device 13, is continued to be enumerated, and the enumeration is locked.
[0094] After the switch port enumeration of the switch device SW1 is completed, the switch port a5 of the switch device SW0 is enumerated; at this time, the rate of the switch port a5 is 5Gpbs, and the rate of the endpoint device 14 connected to it is also 5Gpbs, so the connection state of the switch port a5 is the link state, and the device connected to the switch port a5, that is, the endpoint device 14, is directly enumerated and enumerated and locked. The enumeration of the RapidIO network is completed.
[0095] An enumeration method for a RapidIO network provided by an embodiment of the present application includes: enumerating a first switching device based on a master control device in the RapidIO network; in the process of sequentially enumerating all switching ports of the first switching device, detecting the connection status of the currently enumerated switching port; when the connection status of the currently enumerated switching port is a non-link-building state, adaptively adjusting the rate of the currently enumerated switching port, and detecting the connection status of the currently enumerated switching port until the connection status of the currently enumerated switching port is a link-building state; when the connection status of the currently enumerated switching port is a link-building state, enumerating a device connected to the currently enumerated switching port. In an embodiment of the present application, during the enumeration process of the RapidIO network, when the connection state of the switch port is in an unlinked state, that is, the speed of the switch port and the device connected to it are different, the speed of the switch port is adaptively adjusted so that the speed of the switch port is the same as the speed of the device connected to it, so as to complete the link establishment, so that endpoint devices with different speeds can be normally connected to the RapidIO network, and the normal enumeration of the RapidIO network can be achieved without the user participating in the configuration of the speed of the switch port, thereby improving the degree of automation, flexibility and accuracy, and at the same time reducing the consumption of manual resources.
[0096] Furthermore, adaptive adjustment of the switch port can be achieved without introducing additional hardware devices, thus avoiding unnecessary hardware overhead.
[0097] Embodiment 2:
[0098] Combine the following Figure 4 , a RapidIO network enumeration device provided in an embodiment of the present application is introduced in detail.
[0099] like Figure 4 As shown, a RapidIO network enumeration device provided in an embodiment of the present application includes the following modules:
[0100] The first enumeration module 401 is used to enumerate the first switching device based on the master device in the RapidIO network; wherein the first switching device is a switching device connected to the master device;
[0101] The connection detection module 402 is used to detect the connection status of the currently enumerated switch port in the process of enumerating all switch ports of the first switch device in sequence; wherein the connection status includes: link establishment status and non-link establishment status;
[0102] The rate adjustment module 403 is used to adaptively adjust the rate of the currently enumerated switch port when the connection state of the currently enumerated switch port is a non-link state, and detect the connection state of the currently enumerated switch port until the connection state of the currently enumerated switch port is a link state;
[0103] The second enumeration module 404 is configured to enumerate the devices connected to the currently enumerated switch port when the connection state of the currently enumerated switch port is a link establishment state.
[0104] In one possible implementation, the connection detection module 402 is specifically used to read the register corresponding to the currently enumerated switching port in the first switching device to obtain the connection identifier of the currently enumerated switching port; based on the connection identifier of the currently enumerated switching port, determine the connection status of the currently enumerated switching port.
[0105] In one possible implementation, the rate adjustment module 403 is specifically used to adjust the rate of the currently enumerated switching port to multiple preset rates in sequence when the connection state of the currently enumerated switching port is a non-link state, and after each adjustment of the rate of the currently enumerated switching port, detect the connection state of the currently enumerated switching port until the connection state of the currently enumerated switching port is a link state; wherein the multiple preset rates cover all rates supported by the currently enumerated switching port.
[0106] In a possible implementation, the rate adjustment module 403 is specifically configured to adjust the rate of the currently enumerated switch port to a plurality of preset rates in sequence from high to low.
[0107] In a possible implementation, the enumeration device of the RapidIO network further includes: a type identification module, a third enumeration module and an enumeration locking module. The type identification module is used to identify the device type of the enumerated device; the third enumeration module is used to sequentially enumerate all switch ports of the second switch device when the device type of the enumerated device is a switch device; wherein the second switch device is a switch device connected to the switch port of the first switch device; and the enumeration locking module is used to perform enumeration locking when the device type of the enumerated device is an endpoint device.
[0108] In a possible implementation, the third enumeration module is specifically configured to push device information of the second switching device into a stack when the device type of the enumerated device is a switching device, so as to enumerate all switching ports of the second switching device based on the second switching device.
[0109] In a possible implementation, the enumeration trigger module is used to enumerate the master devices in the RapidIO network in response to an enumeration trigger event for the RapidIO network; the first enumeration module 401 is specifically used to enumerate the first switching device based on the master devices in the RapidIO network in a depth-first traversal manner.
[0110] An enumeration device for a RapidIO network provided in an embodiment of the present application includes: a first enumeration module 401, which is used to enumerate a first switching device based on a master control device in the RapidIO network; a connection detection module 402, which is used to detect the connection status of a currently enumerated switching port in the process of sequentially enumerating all switching ports of the first switching device; a rate adjustment module 403, which is used to adaptively adjust the rate of the currently enumerated switching port when the connection status of the currently enumerated switching port is a non-link-building state, and detect the connection status of the currently enumerated switching port until the connection status of the currently enumerated switching port is a link-building state; and a second enumeration module 404, which is used to enumerate the device connected to the currently enumerated switching port when the connection status of the currently enumerated switching port is a link-building state. In an embodiment of the present application, during the enumeration process of the RapidIO network, when the connection state of the switch port is in an unlinked state, that is, the speed of the switch port and the device connected to it are different, the speed of the switch port is adaptively adjusted so that the speed of the switch port is the same as the speed of the device connected to it, so as to complete the link establishment, so that endpoint devices with different speeds can be normally connected to the RapidIO network, and the normal enumeration of the RapidIO network can be achieved without the user participating in the configuration of the speed of the switch port, thereby improving the degree of automation, flexibility and accuracy, and at the same time reducing the consumption of manual resources.
[0111] Furthermore, adaptive adjustment of the switch port can be achieved without introducing additional hardware devices, thus avoiding unnecessary hardware overhead.
[0112] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the method and device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The method and device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0113] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A RapidIO network enumeration method, characterized in that: include: Taking the master control device in the RapidIO network as a reference, enumerate the first switching device; wherein the first switching device is a switching device connected to the master control device; In the process of enumerating all the switch ports of the first switch device in sequence, detecting the connection state of the currently enumerated switch port; wherein the connection state includes: link establishment state and non-link establishment state; When the connection state of the currently enumerated switch port is a non-link state, adaptively adjust the rate of the currently enumerated switch port, and detect the connection state of the currently enumerated switch port until the connection state of the currently enumerated switch port is a link state; When the connection state of the currently enumerated switch port is a link establishment state, the device connected to the currently enumerated switch port is enumerated.
2. The method according to claim 1, characterized in that The detecting the connection status of the currently enumerated switch port includes: Reading a register corresponding to the currently enumerated switch port in the first switch device to obtain a connection identifier of the currently enumerated switch port; Based on the connection identifier of the currently enumerated switch port, a connection state of the currently enumerated switch port is determined.
3. The method according to claim 1, characterized in that When the connection state of the currently enumerated switch port is a non-link state, adaptively adjusting the rate of the currently enumerated switch port, and detecting the connection state of the currently enumerated switch port until the connection state of the currently enumerated switch port is a link state, includes: When the connection state of the currently enumerated switch port is a non-link state, the rate of the currently enumerated switch port is adjusted to multiple preset rates in sequence, and after each adjustment of the rate of the currently enumerated switch port, the connection state of the currently enumerated switch port is detected until the connection state of the currently enumerated switch port is a link state; wherein the multiple preset rates cover all rates supported by the currently enumerated switch port.
4. The method according to claim 3, characterized in that The step of sequentially adjusting the rate of the currently enumerated switch port to a plurality of preset rates includes: The rate of the currently enumerated switch port is adjusted to a plurality of preset rates in sequence from high to low.
5. The method according to claim 3, characterized in that: The method further comprises: When the rate of the currently enumerated switch port has been adjusted to the multiple preset rates in sequence, and the connection state detected each time is a non-link state, the currently enumerated switch port is skipped and the next switch port of the first switching device is continuously enumerated.
6. The method according to claim 1, characterized in that When the connection state of the currently enumerated switch port is a link establishment state, after enumerating the device connected to the currently enumerated switch port, the method further includes: Identify the device type of the enumerated device; When the device type of the enumerated device is a switching device, all switching ports of the second switching device are enumerated in sequence; wherein the second switching device is a switching device connected to the switching port of the first switching device; When the device type of the enumerated device is an endpoint device, enumeration locking is performed.
7. The method according to claim 6, characterized in that When the device type of the enumerated device is a switching device, all switching ports of the second switching device are enumerated in sequence, including: When the device type of the enumerated device is a switching device, the device information of the second switching device is pushed into the stack, so as to enumerate all the switching ports of the second switching device based on the second switching device.
8. The method according to any one of claims 1 to 7, characterized in that: Before enumerating the first switching device based on the master device in the RapidIO network, the method further includes: In response to an enumeration trigger event for a RapidIO network, enumerate master devices in the RapidIO network; The enumerating the first switching device based on the master device in the RapidIO network includes: Taking the master control device in the RapidIO network as a reference, a first switching device is enumerated in a depth-first traversal manner.
9. A RapidIO network enumeration device, characterized in that: include: A first enumeration module is used to enumerate a first switching device based on a master control device in a RapidIO network; wherein the first switching device is a switching device connected to the master control device; A connection detection module, used to detect the connection status of the currently enumerated switch port in the process of enumerating all the switch ports of the first switch device in sequence; wherein the connection status includes: link establishment status and non-link establishment status; A rate adjustment module, used for adaptively adjusting the rate of the currently enumerated switch port when the connection state of the currently enumerated switch port is a non-link state, and detecting the connection state of the currently enumerated switch port until the connection state of the currently enumerated switch port is a link state; The second enumeration module is used to enumerate the devices connected to the currently enumerated switch port when the connection state of the currently enumerated switch port is a link establishment state.
10. The device according to claim 9, characterized in that The connection detection module is specifically used for: Reading a register corresponding to the currently enumerated switch port in the first switch device to obtain a connection identifier of the currently enumerated switch port; Based on the connection identifier of the currently enumerated switch port, a connection state of the currently enumerated switch port is determined.