CN103763129B - A kind of PCIe equipment management method and device - Google Patents
A kind of PCIe equipment management method and device Download PDFInfo
- Publication number
- CN103763129B CN103763129B CN201310751994.6A CN201310751994A CN103763129B CN 103763129 B CN103763129 B CN 103763129B CN 201310751994 A CN201310751994 A CN 201310751994A CN 103763129 B CN103763129 B CN 103763129B
- Authority
- CN
- China
- Prior art keywords
- pcie
- slot
- slots
- location information
- devices
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Information Transfer Systems (AREA)
Abstract
本发明实施例公开了一种PCIe设备管理方法及装置,包括:获取PCIe插槽的标识信息;根据PCIe插槽的标识信息生成PCIe插槽的位置信息;获取PCIe设备标识,并将PCIe设备标识与PCIe插槽的位置信息建立映射关系;根据PCIe设备标识与PCIe插槽的位置信息的映射关系为PCIe设备配置PCIe业务。通过本发明实施例,可将PCIe设备标识与PCIe插槽的位置信息建立映射关系,从而可根据PCIe设备标识与PCIe插槽的位置信息的映射关系为PCIe设备配置PCIe业务,可通过PCIe设备标识与PCIe插槽的位置信息的映射关系查找到PCIe设备具体在哪个PCIe插槽,提高了业务配置的精确性,增加了故障定位精准度。
The embodiment of the present invention discloses a PCIe device management method and device, including: obtaining the identification information of the PCIe slot; generating the position information of the PCIe slot according to the identification information of the PCIe slot; obtaining the PCIe device identification, and identifying the PCIe device Establish a mapping relationship with the location information of the PCIe slot; configure the PCIe service for the PCIe device according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot. Through the embodiment of the present invention, a mapping relationship can be established between the PCIe device identifier and the location information of the PCIe slot, so that the PCIe service can be configured for the PCIe device according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot, and the PCIe device identifier can be used to configure the PCIe service. The mapping relationship with the location information of the PCIe slot can find out which PCIe slot the PCIe device is in, which improves the accuracy of service configuration and fault location.
Description
技术领域technical field
本发明涉及计算机领域,尤其涉及一种PCIe设备管理方法及装置。The present invention relates to the field of computers, in particular to a PCIe device management method and device.
背景技术Background technique
PCIe(PCI-Express,Peripheral Component Interconnect Express,高速外围组件互连)是一种总线和接口标准,PCIe系统中可以包括多个PCIe插槽,PCIe插槽可以插入PCIe卡,若PCIe卡提供多个端口,每个端口接一个PCIe设备。现有技术中,启动基本输入输出系统(BIOS)后,扫描PCIe系统中所有PCIe设备,识别PCIe设备并添加到设备列表中,当驱动PCIe卡时,根据扫描到的PCIe设备遍历设备列表,匹配与驱动对应的PCIe设备,并为扫描到的PCIe设备命名。现有技术中根据PCIe设备添加到设备列表中的顺序为各个PCIe设备命名,例如,参见图1,为现有技术中一种PCIe设备管理方法的示意图,如图1(a)所示,当将PCIe卡插入PCIe插槽2时,系统为PCIe插槽2的2个网络设备分别命名为:设备0和设备1,如图1(b)所示,若再插入一张PCIe卡到PCIe插槽1,则系统为PCIe插槽1的2个网络设备分别命名为:设备0和设备1,系统为PCIe插槽2的2个网络设备分别命名为:设备2和设备3。对于多插槽多个网络设备的情况,尤其是相同类型的PCIe卡的添加、删除、更换时,会导致PCIe设备名称的变化,系统无法通过PCIe设备名称确定PCIe卡在具体哪个插槽,PCIe设备名称与PCIe插槽前后不对应引起网络不通和增加维护难度的问题。PCIe (PCI-Express, Peripheral Component Interconnect Express, high-speed peripheral component interconnection) is a bus and interface standard. The PCIe system can include multiple PCIe slots, and the PCIe slots can be inserted into PCIe cards. If the PCIe card provides multiple Each port is connected to a PCIe device. In the prior art, after starting the basic input and output system (BIOS), scan all PCIe devices in the PCIe system, identify the PCIe devices and add them to the device list, when driving the PCIe card, traverse the device list according to the scanned PCIe devices, and match PCIe device corresponding to the driver, and name the scanned PCIe device. In the prior art, each PCIe device is named according to the order in which the PCIe devices are added to the device list. For example, see FIG. 1 , which is a schematic diagram of a PCIe device management method in the prior art. As shown in FIG. 1(a), when When inserting a PCIe card into PCIe slot 2, the system names the two network devices in PCIe slot 2 as: device 0 and device 1, as shown in Figure 1(b). If another PCIe card is inserted into the PCIe slot slot 1, the two network devices of PCIe slot 1 in the system are named: device 0 and device 1, and the two network devices of PCIe slot 2 in the system are named: device 2 and device 3 respectively. For multiple network devices with multiple slots, especially when adding, deleting, or replacing PCIe cards of the same type, the name of the PCIe device will change. The system cannot determine which slot the PCIe card is in through the name of the PCIe device. The inconsistency between the device name and the PCIe slot causes network failure and increases maintenance difficulty.
发明内容Contents of the invention
本发明实施例提供一种PCIe设备管理方法及装置,用于解决现有技术中PCIe设备名称与PCIe插槽前后不对应引起网络不通和增加维护难度的技术问题。Embodiments of the present invention provide a PCIe device management method and device, which are used to solve the technical problems in the prior art that the name of the PCIe device does not correspond to the front and back of the PCIe slot, which causes network failure and increases maintenance difficulty.
本发明实施例第一方面提供了一种PCIe设备管理方法,包括:The first aspect of the embodiment of the present invention provides a PCIe device management method, including:
获取PCIe插槽的标识信息;Obtain the identification information of the PCIe slot;
根据所述获取到的PCIe插槽的标识信息生成所述PCIe插槽的位置信息;Generate the position information of the PCIe slot according to the obtained identification information of the PCIe slot;
获取PCIe设备标识,并将所述PCIe设备标识与所述PCIe插槽的位置信息建立映射关系;Obtain a PCIe device identifier, and establish a mapping relationship between the PCIe device identifier and the position information of the PCIe slot;
根据所述PCIe设备标识与所述PCIe插槽的位置信息的映射关系为所述PCIe设备配置PCIe业务。Configuring PCIe services for the PCIe device according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot.
在第一方面的第一种可能的实现方式中,所述PCIe插槽的标识信息包括:所述PCIe插槽的根节点的总线号、设备号和功能号。In a first possible implementation manner of the first aspect, the identification information of the PCIe slot includes: a bus number, a device number, and a function number of a root node of the PCIe slot.
结合第一方面的第一种可能实现方式,在第一方面的第二种可能的实现方式中,所述根据所述获取到的PCIe插槽的标识信息生成所述PCIe插槽的位置信息包括:With reference to the first possible implementation of the first aspect, in the second possible implementation of the first aspect, the generating the location information of the PCIe slot according to the obtained identification information of the PCIe slot includes :
将所述PCIe插槽的根节点的总线号、设备号和功能号确定为所述PCIe插槽的位置信息。Determining the bus number, device number and function number of the root node of the PCIe slot as the location information of the PCIe slot.
在第一方面的第三种可能的实现方式中,所述获取PCIe设备标识,并将所述PCIe设备标识与所述PCIe插槽的位置信息建立映射关系包括:In a third possible implementation manner of the first aspect, the acquiring the PCIe device identifier and establishing a mapping relationship between the PCIe device identifier and the location information of the PCIe slot includes:
从预设的设备列表查找所述PCIe插槽连接的所有PCIe设备;Find all PCIe devices connected to the PCIe slot from the preset device list;
获取所述查找到的所有PCIe设备的PCIe设备标识;Obtain the PCIe device identifiers of all the found PCIe devices;
确定所述PCIe设备标识与所述PCIe插槽的位置信息的映射关系。Determine the mapping relationship between the PCIe device identifier and the location information of the PCIe slot.
在第一方面、第一方面的第一种~第三种可能的实现方式中,所述根据所述PCIe设备标识与所述PCIe插槽的位置信息的映射关系为所述PCIe设备配置PCIe业务包括:In the first aspect and the first to third possible implementations of the first aspect, the PCIe service is configured for the PCIe device according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot include:
根据所述PCIe设备标识与所述PCIe插槽的位置信息的映射关系确定所述PCIe业务配置所在的PCIe插槽的位置,所述PCIe业务包括:删除/更改所述PCIe插槽上连接的PCIe设备。Determine the position of the PCIe slot where the PCIe service is configured according to the mapping relationship between the PCIe device identifier and the position information of the PCIe slot, and the PCIe service includes: deleting/changing the PCIe connected on the PCIe slot equipment.
本发明实施例第二方面提供了一种PCIe设备管理装置,包括:The second aspect of the embodiment of the present invention provides a PCIe device management device, including:
获取模块,用于获取PCIe插槽的标识信息;An acquisition module, configured to acquire identification information of the PCIe slot;
生成模块,用于根据所述获取到的PCIe插槽的标识信息生成所述PCIe插槽的位置信息;A generating module, configured to generate the position information of the PCIe slot according to the obtained identification information of the PCIe slot;
所述获取模块,还用于获取PCIe设备标识;The obtaining module is also used to obtain the PCIe device identification;
映射模块,用于将所述PCIe设备标识与所述PCIe插槽的位置信息建立映射关系;A mapping module, configured to establish a mapping relationship between the PCIe device identifier and the location information of the PCIe slot;
业务处理模块,用于根据所述PCIe设备标识与所述PCIe插槽的位置信息的映射关系为所述PCIe设备配置PCIe业务。A service processing module configured to configure PCIe services for the PCIe device according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot.
在第二方面的第一种可能的实现方式中,所述PCIe插槽的标识信息包括:所述PCIe插槽的根节点的总线号、设备号和功能号。In a first possible implementation manner of the second aspect, the identification information of the PCIe slot includes: a bus number, a device number, and a function number of a root node of the PCIe slot.
结合第二方面的第一种可能实现方式,在第二方面的第二种可能的实现方式中,所述生成模块具体用于:With reference to the first possible implementation of the second aspect, in the second possible implementation of the second aspect, the generating module is specifically configured to:
将所述PCIe插槽的根节点的总线号、设备号和功能号确定为所述PCIe插槽的位置信息。Determining the bus number, device number and function number of the root node of the PCIe slot as the location information of the PCIe slot.
在第二方面的第三种可能的实现方式中,所述获取模块包括:In a third possible implementation manner of the second aspect, the obtaining module includes:
查找单元,用于从预设的设备列表查找所述PCIe插槽连接的所有PCIe设备;A search unit, configured to search for all PCIe devices connected to the PCIe slot from a preset device list;
获取单元,用于获取所述查找到的所有PCIe设备的PCIe设备标识;An obtaining unit, configured to obtain the PCIe device identifications of all the found PCIe devices;
所述映射模块具体用于:The mapping module is specifically used for:
确定所述PCIe设备标识与所述PCIe插槽的位置信息的映射关系。Determine the mapping relationship between the PCIe device identifier and the location information of the PCIe slot.
在第二方面、第二方面的第一种~第三种可能的实现方式中,所述业务处理模块具体用于:根据所述PCIe设备标识与所述PCIe插槽的位置信息的映射关系确定所述PCIe业务配置所在的PCIe插槽的位置,所述PCIe业务包括:删除/更改所述PCIe插槽上连接的PCIe设备。In the second aspect and the first to third possible implementation manners of the second aspect, the service processing module is specifically configured to: determine according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot The position of the PCIe slot where the PCIe service is configured, the PCIe service includes: deleting/changing the PCIe device connected to the PCIe slot.
本发明实施例第三方面提供了一种PCIe控制终端,包括:接收机、发射机、存储器和分别与接收机、发射机、存储器连接的处理器,其中,存储器中存储一组程序代码,且处理器用于调用存储器中存储的程序代码,执行以下操作:The third aspect of the embodiment of the present invention provides a PCIe control terminal, including: a receiver, a transmitter, a memory, and a processor connected to the receiver, the transmitter, and the memory respectively, wherein a set of program codes is stored in the memory, and The processor is used to call program code stored in memory to perform the following operations:
获取PCIe插槽的标识信息;Obtain the identification information of the PCIe slot;
根据所述获取到的PCIe插槽的标识信息生成所述PCIe插槽的位置信息;Generate the position information of the PCIe slot according to the obtained identification information of the PCIe slot;
获取PCIe设备标识,并将所述PCIe设备标识与所述PCIe插槽的位置信息建立映射关系;Obtain a PCIe device identifier, and establish a mapping relationship between the PCIe device identifier and the position information of the PCIe slot;
根据所述PCIe设备标识与所述PCIe插槽的位置信息的映射关系为所述PCIe设备配置PCIe业务。Configuring PCIe services for the PCIe device according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot.
实施本发明实施例,可将PCIe设备标识与PCIe插槽的位置信息建立映射关系,从而可根据PCIe设备标识与PCIe插槽的位置信息的映射关系为PCIe设备配置PCIe业务,可通过PCIe设备标识与PCIe插槽的位置信息的映射关系查找到PCIe设备具体在哪个PCIe插槽,提高了业务配置的精确性,增加了故障定位精准度。Implement the embodiment of the present invention, can establish the mapping relationship between the PCIe device identification and the location information of the PCIe slot, thereby can configure the PCIe service for the PCIe device according to the mapping relationship between the PCIe device identification and the location information of the PCIe slot, and can pass the PCIe device identification The mapping relationship with the location information of the PCIe slot can find out which PCIe slot the PCIe device is in, which improves the accuracy of service configuration and fault location.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为现有技术中一种PCIe设备管理方法的示意图;Fig. 1 is a schematic diagram of a PCIe device management method in the prior art;
图2为本发明实施例提供的一种PCIe设备管理方法的流程图;Fig. 2 is a flowchart of a PCIe device management method provided by an embodiment of the present invention;
图3为本发明实施例提供的PCIe设备管理方法的示意图;3 is a schematic diagram of a PCIe device management method provided by an embodiment of the present invention;
图4为本发明实施例提供的一种PCIe设备管理装置的结构示意图;4 is a schematic structural diagram of a PCIe device management device provided by an embodiment of the present invention;
图5为本发明实施例提供的一种PCIe控制终端的结构示意图。FIG. 5 is a schematic structural diagram of a PCIe control terminal provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
本发明实施例提供一种PCIe设备管理方法及装置。本发明实施中的装置可以包括:PCIe控制终端或者PCIe控制终端中的客户端模块,例如:设备管理客户端等。PCIe系统可以包括多个PCIe插槽,PCIe插槽可以插入PCIe卡,若PCIe卡提供多个端口,每个端口对应一个PCIe设备。PCIe卡例如网卡等。PCIe系统中通过基本输入输出系统(BIOS,Basic InputOutput System)给PCIe设备命名,PCIe设备标识包括但不局限于:PCIe设备的名称。具体的,PCIe设备的名称的命名的步骤如下:Embodiments of the present invention provide a PCIe device management method and device. The device in the implementation of the present invention may include: a PCIe control terminal or a client module in the PCIe control terminal, for example: a device management client and the like. A PCIe system may include multiple PCIe slots, and a PCIe card may be inserted into the PCIe slot. If the PCIe card provides multiple ports, each port corresponds to a PCIe device. PCIe cards such as network cards, etc. In the PCIe system, the PCIe device is named through the Basic Input Output System (BIOS, Basic InputOutput System). The PCIe device identifier includes but is not limited to: the name of the PCIe device. Specifically, the naming steps of the name of the PCIe device are as follows:
启动基本输入输出系统(BIOS),扫描PCIe系统中所有PCIe设备,为每个PCIe设备分配总线号、设备号和功能号;Start the basic input and output system (BIOS), scan all PCIe devices in the PCIe system, and assign bus number, device number and function number to each PCIe device;
将识别到的PCIe设备添加到预设的设备列表中;Add the recognized PCIe device to the preset device list;
当驱动PCIe卡时,根据扫描到的PCIe设备的顺序,遍历预设的设备列表,匹配与驱动对应的PCIe设备,并为扫描到的PCIe设备命名。When driving a PCIe card, traverse the preset device list according to the sequence of scanned PCIe devices, match the PCIe device corresponding to the driver, and name the scanned PCIe device.
现有技术中,执行上述PCIe设备的名称的命名的步骤,得到PCIe设备的名称,即根据PCIe设备添加到设备列表中的顺序为各个PCIe设备命名,对于多插槽多个网络设备的情况,尤其是相同类型的PCIe卡的添加、删除、更换时,会导致PCIe设备名称的变化,系统无法通过PCIe设备名称确定PCIe卡在具体哪个插槽,PCIe设备名称与PCIe插槽前后不对应引起网络不通和增加维护难度的问题,例如,如图1(a)所示,主板包括四个插槽,若PCIe设备名称发生变化,即插槽1对应的两个PCIe设备名称取代原来插槽2对应的两个PCIe设备名称为:设备0、设备1,而插槽2对应的两个设备名称变更为:设备2、设备3,则原来配置在插槽2端口0中的设备0的IP,此时配置在插槽1端口0中的设备0上,而插槽1端口0并不一定在插槽2端口0所在的网络,导致网络不通。另外,若原来图1(a)中的设备0出现故障,而维护人员通过设备名称查找到插槽1端口0中连接的设备0,即图1(b)中的设备0,导致不能准备定位到故障位置,从而增加了维护的难度。In the prior art, perform the naming step of the name of the above-mentioned PCIe device to obtain the name of the PCIe device, that is, to name each PCIe device according to the order in which the PCIe device is added to the device list, for the situation of multiple network devices with multiple slots, Especially when the same type of PCIe card is added, deleted, or replaced, the name of the PCIe device will change. The system cannot determine which slot the PCIe card is in through the name of the PCIe device. The problem of unreasonable and increased maintenance difficulty. For example, as shown in Figure 1(a), the motherboard includes four slots. If the name of the PCIe device changes, that is, the two PCIe device names corresponding to slot 1 replace the original one corresponding to slot 2. The names of the two PCIe devices are: device 0, device 1, and the names of the two devices corresponding to slot 2 are changed to: device 2, device 3, then the IP of device 0 originally configured in port 0 of slot 2, this It is configured on device 0 in port 0 of slot 1, but port 0 of slot 1 is not necessarily on the network where port 0 of slot 2 is located, resulting in network failure. In addition, if the original device 0 in Figure 1(a) fails, and the maintenance personnel find out the device 0 connected to port 0 of slot 1 through the device name, that is, the device 0 in Figure 1(b), it is impossible to prepare for positioning to the fault location, thus increasing the difficulty of maintenance.
本发明实施例中,在执行上述PCIe设备的名称的命名的步骤之后,获取PCIe插槽的标识信息;根据获取到的PCIe插槽的标识信息生成所述PCIe插槽的位置信息;获取PCIe设备标识,并将PCIe设备标识与PCIe插槽的位置信息建立映射关系;根据PCIe设备标识与PCIe插槽的位置信息的映射关系为PCIe设备配置PCIe业务。从而可将PCIe设备标识与PCIe插槽的位置信息建立映射关系,可根据PCIe设备标识与PCIe插槽的位置信息的映射关系为PCIe设备配置PCIe业务,可通过PCIe设备标识与PCIe插槽的位置信息的映射关系查找到PCIe设备具体在哪个PCIe插槽,提高了业务配置的精确性,增加了故障定位精准度。下面通过具体实施例进行说明。In the embodiment of the present invention, after performing the naming step of the title of the above-mentioned PCIe device, obtain the identification information of the PCIe slot; generate the position information of the PCIe slot according to the identification information of the obtained PCIe slot; obtain the PCIe device ID, and establish a mapping relationship between the PCIe device ID and the location information of the PCIe slot; configure the PCIe service for the PCIe device according to the mapping relationship between the PCIe device ID and the location information of the PCIe slot. Therefore, the mapping relationship between the PCIe device ID and the location information of the PCIe slot can be established, and the PCIe service can be configured for the PCIe device according to the mapping relationship between the PCIe device ID and the location information of the PCIe slot, and the PCIe device ID and the location of the PCIe slot can be used. The mapping relationship of information finds out which PCIe slot the PCIe device is in, which improves the accuracy of service configuration and fault location. The following will be described through specific examples.
图2为本发明实施例提供的一种PCIe设备管理方法的流程图,如图所示本实施例中的流程包括步骤S201~S204。FIG. 2 is a flow chart of a PCIe device management method provided by an embodiment of the present invention. As shown in the figure, the flow in this embodiment includes steps S201-S204.
S201,获取PCIe插槽的标识信息。S201. Obtain identification information of a PCIe slot.
S202,根据获取到的PCIe插槽的标识信息生成PCIe插槽的位置信息。S202. Generate location information of the PCIe slot according to the acquired identification information of the PCIe slot.
S203,获取PCIe设备标识,并将PCIe设备标识与PCIe插槽的位置信息建立映射关系。S203. Acquire the PCIe device identifier, and establish a mapping relationship between the PCIe device identifier and the location information of the PCIe slot.
S204,根据PCIe设备标识与PCIe插槽的位置信息的映射关系为PCIe设备配置PCIe业务。S204. Configure the PCIe service for the PCIe device according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot.
作为一种可选的实施方式,步骤S201中,获取PCIe插槽的标识信息,其中,PCIe插槽的标识信息可以包括:PCIe插槽的根节点的总线号、设备号和功能号。具体的,在PCIe系统中,每个PCIe插槽可通过bus/dev/fun(总线号、设备号、功能号)唯一确认,每个PCIe插槽的根节点的的总线号、设备号和功能号在PCIe系统配置后是固定不变的。本发明实施例中,获取到PCIe插槽的标识信息,即获取到:PCIe插槽的根节点的总线号、设备号和功能号。As an optional implementation manner, in step S201, the identification information of the PCIe slot is acquired, wherein the identification information of the PCIe slot may include: a bus number, a device number, and a function number of a root node of the PCIe slot. Specifically, in the PCIe system, each PCIe slot can be uniquely identified through bus/dev/fun (bus number, device number, function number), and the bus number, device number, and function of the root node of each PCIe slot The number is fixed after PCIe system configuration. In the embodiment of the present invention, the identification information of the PCIe slot is obtained, that is, the bus number, the device number and the function number of the root node of the PCIe slot are obtained.
作为一种可选的实施方式,步骤S202中,根据获取到的PCIe插槽的标识信息生成PCIe插槽的位置信息。具体的,将PCIe插槽的根节点的总线号、设备号和功能号确定为PCIe插槽的位置信息,即PCIe插槽的位置信息由PCIe插槽的标识信息表示。As an optional implementation manner, in step S202, the position information of the PCIe slot is generated according to the acquired identification information of the PCIe slot. Specifically, the bus number, device number and function number of the root node of the PCIe slot are determined as the location information of the PCIe slot, that is, the location information of the PCIe slot is represented by the identification information of the PCIe slot.
作为一种可选的实施方式,步骤S203中,获取PCIe设备标识,并将PCIe设备标识与PCIe插槽的位置信息建立映射关系。具体的,从预设的设备列表查找PCIe插槽连接的所有PCIe设备;获取查找到的所有PCIe设备的PCIe设备标识;确定PCIe设备标识与PCIe插槽的位置信息的映射关系。As an optional implementation manner, in step S203, the PCIe device identifier is acquired, and a mapping relationship is established between the PCIe device identifier and the location information of the PCIe slot. Specifically, search for all PCIe devices connected to the PCIe slots from the preset device list; obtain the PCIe device identifiers of all the found PCIe devices; determine the mapping relationship between the PCIe device identifiers and the location information of the PCIe slots.
作为一种可选的实施方式,参见图3,为本发明实施例提供的PCIe设备管理方法的示意图,如图3(a)所示,主板包括四个插槽,每个根节点对应一个PCIe插槽,则可确定根节点(root)与PCIe插槽的对应关系,例如root1~插槽1、root2~插槽2、root3~插槽3等,进一步可选的,还可以维护一张位置表,记录所有PCIe插槽与根节点的对应关系,便于查找与维护。从预设的设备列表查找PCIe插槽的连接的所有PCIe设备,如root1~插槽1,插槽1连接两个PCIe设备(设备0、设备1),再获取查找到的所有PCIe设备的PCIe设备标识,确定PCIe设备标识与PCIe插槽的位置信息的映射关系。将该PCIe插槽连接的所有PCIe设备的PCIe设备标识与PCIe插槽的位置信息进行映射,则PCIe设备标识和PCIe插槽的位置信息可以为多对一或者一对一的映射关系。As an optional implementation, see Figure 3, which is a schematic diagram of the PCIe device management method provided by the embodiment of the present invention. As shown in Figure 3(a), the motherboard includes four slots, and each root node corresponds to a PCIe slot, you can determine the corresponding relationship between the root node (root) and the PCIe slot, such as root1~slot 1, root2~slot 2, root3~slot 3, etc. Further optional, you can also maintain a position The table records the correspondence between all PCIe slots and the root node, which is convenient for search and maintenance. Find all PCIe devices connected to PCIe slots from the preset device list, such as root1~slot 1, slot 1 is connected to two PCIe devices (device 0, device 1), and then obtain the PCIe information of all found PCIe devices The device identifier determines the mapping relationship between the PCIe device identifier and the location information of the PCIe slot. The PCIe device identifiers of all PCIe devices connected to the PCIe slot are mapped with the location information of the PCIe slots, and the PCIe device identifiers and the location information of the PCIe slots may be in a many-to-one or one-to-one mapping relationship.
作为一种可选的实施方式,如图3(b)所示,主板包括四个插槽,四个插槽与一个PCIe转换器连接,该PCIe转换器包括多个下游接口(down),每个下游接口对应一个PCIe插槽,每个下游接口可由根节点进行唯一标识,则可确定下游接口(down)与PCIe插槽(插槽)的对应关系,例如down1~插槽1、down2~插槽2、down3~插槽3等,进一步可选的,还可以维护一张位置表,记录所有PCIe插槽与下游节点的对应关系,便于查找与维护。从预设的设备列表查找PCIe插槽的连接的所有PCIe设备,如down2~插槽2,插槽2连接两个PCIe设备(设备3、eth4),再获取查找到的所有PCIe设备的PCIe设备标识,确定PCIe设备标识与PCIe插槽的位置信息的映射关系。将该PCIe插槽连接的所有PCIe设备的PCIe设备标识与PCIe插槽的位置信息进行映射,则PCIe设备标识和PCIe插槽的位置信息可以为多对一或者一对一的映射关系。As an optional implementation, as shown in FIG. 3(b), the motherboard includes four slots, and the four slots are connected to a PCIe converter. The PCIe converter includes multiple downstream interfaces (down), each Each downstream interface corresponds to a PCIe slot, and each downstream interface can be uniquely identified by the root node, then the corresponding relationship between the downstream interface (down) and the PCIe slot (slot) can be determined, for example, down1~slot 1, down2~slot Slot 2, down3 to slot 3, etc. are further optional. A location table can also be maintained to record the corresponding relationship between all PCIe slots and downstream nodes, which is convenient for search and maintenance. Find all PCIe devices connected to the PCIe slots from the preset device list, such as down2 to slot 2, and slot 2 is connected to two PCIe devices (device 3, eth4), and then obtain the PCIe devices of all the found PCIe devices ID, to determine the mapping relationship between the PCIe device ID and the location information of the PCIe slot. The PCIe device identifiers of all PCIe devices connected to the PCIe slot are mapped with the location information of the PCIe slots, and the PCIe device identifiers and the location information of the PCIe slots may be in a many-to-one or one-to-one mapping relationship.
作为一种可选的实施方式,步骤S204中,根据PCIe设备标识与PCIe插槽的位置信息的映射关系为PCIe设备配置PCIe业务。具体实现中,根据PCIe设备标识与PCIe插槽的位置信息的映射关系确定PCIe业务配置所在的PCIe插槽的位置,PCIe业务包括但不局限于:删除/更改PCIe插槽上连接的PCIe设备,还包括故障排查等。例如,若维护人员需要对PCIe设备进行故障排查,可以查找PCIe设备标识与PCIe插槽的位置信息的映射关系,从而具体查找到出现故障的PCIe设备具体在哪个PCIe插槽上,准确定位到PCIe插槽的位置,避免出现现有技术中根据PCIe设备添加到设备列表中的顺序为各个PCIe设备命名,只能通过PCIe名称查找,以致不能准备定位到故障位置,维护难度增加的技术问题。As an optional implementation manner, in step S204, the PCIe service is configured for the PCIe device according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot. In the specific implementation, the position of the PCIe slot where the PCIe service is configured is determined according to the mapping relationship between the PCIe device identifier and the position information of the PCIe slot. The PCIe service includes but is not limited to: deleting/changing the PCIe device connected to the PCIe slot, Also includes troubleshooting and more. For example, if maintenance personnel need to troubleshoot PCIe devices, they can search for the mapping relationship between the PCIe device ID and the location information of the PCIe slot, so as to specifically find out which PCIe slot the faulty PCIe device is on, and accurately locate the PCIe device. The position of the slot avoids the technical problem that in the prior art, each PCIe device is named according to the order in which the PCIe device is added to the device list, and can only be searched by the PCIe name, so that the location of the fault cannot be prepared, and the maintenance difficulty increases.
本发明实施例提供一种PCIe设备管理方法,可获取PCIe插槽的标识信息和PCIe设备标识,根据PCIe插槽的标识信息生成PCIe插槽的位置信息,并将PCIe设备标识与PCIe插槽的位置信息建立映射关系,根据PCIe设备标识与PCIe插槽的位置信息的映射关系为PCIe设备配置PCIe业务。实现可将PCIe设备标识与PCIe插槽的位置信息建立映射关系,从而可根据PCIe设备标识与PCIe插槽的位置信息的映射关系为PCIe设备配置PCIe业务,可通过PCIe设备标识与PCIe插槽的位置信息的映射关系查找到PCIe设备具体在哪个PCIe插槽,提高了业务配置的精确性,增加了故障定位精准度。The embodiment of the present invention provides a PCIe device management method, which can obtain the identification information of the PCIe slot and the PCIe device identification, generate the position information of the PCIe slot according to the identification information of the PCIe slot, and combine the PCIe device identification with the PCIe slot The location information establishes a mapping relationship, and configures the PCIe service for the PCIe device according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot. Realize the establishment of a mapping relationship between the PCIe device identifier and the location information of the PCIe slot, so that the PCIe service can be configured for the PCIe device according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot, and the PCIe device identifier and the PCIe slot can be used. The mapping relationship of location information finds out which PCIe slot the PCIe device is in, which improves the accuracy of service configuration and fault location.
下面将结合附图4,分别对本发明实施例提供的PCIe设备管理装置进行详细介绍。The PCIe device management apparatus provided by the embodiment of the present invention will be described in detail below with reference to FIG. 4 .
需要说明的是,附图4所示的PCIe设备管理装置,用于执行本发明图2所示实施例的方法,为基于图2所述的PCIe设备管理方法的执行主体。为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明图2所示的实施例。It should be noted that the PCIe device management apparatus shown in FIG. 4 is used to execute the method of the embodiment shown in FIG. 2 of the present invention, and is an execution subject based on the PCIe device management method described in FIG. 2 . For ease of description, only parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the embodiment shown in FIG. 2 of the present invention.
如图4所示,为本发明实施例提供的一种PCIe设备管理装置的结构示意图,本发明实施例提供的PCIe设备管理装置可以包括:获取模块401、生成模块402、映射模块403和业务处理模块404。As shown in FIG. 4 , it is a schematic structural diagram of a PCIe device management device provided by an embodiment of the present invention. The PCIe device management device provided by the embodiment of the present invention may include: an acquisition module 401, a generation module 402, a mapping module 403, and a service processing Module 404.
获取模块401,用于获取PCIe插槽的标识信息。The obtaining module 401 is configured to obtain identification information of a PCIe slot.
生成模块402,用于根据获取到的PCIe插槽的标识信息生成PCIe插槽的位置信息。The generation module 402 is configured to generate the location information of the PCIe slot according to the obtained identification information of the PCIe slot.
所述获取模块401,还用于获取PCIe设备标识。The acquiring module 401 is further configured to acquire the PCIe device identifier.
映射模块403,用于将PCIe设备标识与PCIe插槽的位置信息建立映射关系。The mapping module 403 is configured to establish a mapping relationship between the PCIe device identifier and the location information of the PCIe slot.
业务处理模块404,用于根据PCIe设备标识与PCIe插槽的位置信息的映射关系为PCIe设备配置PCIe业务。The service processing module 404 is configured to configure a PCIe service for the PCIe device according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot.
作为一种可选的实施方式,获取模块401获取PCIe插槽的标识信息,其中,PCIe插槽的标识信息可以包括:PCIe插槽的根节点的总线号、设备号和功能号。具体的,在PCIe系统中,每个PCIe插槽可通过bus/dev/fun(总线号、设备号、功能号)唯一确认,每个PCIe插槽的根节点的的总线号、设备号和功能号在PCIe系统配置后是固定不变的。本发明实施例中,获取到PCIe插槽的标识信息,即获取到:PCIe插槽的根节点的总线号、设备号和功能号。As an optional implementation manner, the obtaining module 401 obtains identification information of the PCIe slot, where the identification information of the PCIe slot may include: a bus number, a device number, and a function number of a root node of the PCIe slot. Specifically, in the PCIe system, each PCIe slot can be uniquely identified through bus/dev/fun (bus number, device number, function number), and the bus number, device number, and function of the root node of each PCIe slot The number is fixed after PCIe system configuration. In the embodiment of the present invention, the identification information of the PCIe slot is obtained, that is, the bus number, the device number and the function number of the root node of the PCIe slot are obtained.
作为一种可选的实施方式,生成模块402根据获取到的PCIe插槽的标识信息生成PCIe插槽的位置信息。具体的,将PCIe插槽的根节点的总线号、设备号和功能号确定为PCIe插槽的位置信息,即PCIe插槽的位置信息由PCIe插槽的标识信息表示。As an optional implementation manner, the generation module 402 generates the location information of the PCIe slot according to the acquired identification information of the PCIe slot. Specifically, the bus number, device number and function number of the root node of the PCIe slot are determined as the location information of the PCIe slot, that is, the location information of the PCIe slot is represented by the identification information of the PCIe slot.
作为一种可选的实施方式,获取模块401还用于获取PCIe设备标识,映射模块403将PCIe设备标识与PCIe插槽的位置信息建立映射关系。具体的,从预设的设备列表查找PCIe插槽连接的所有PCIe设备;获取查找到的所有PCIe设备的PCIe设备标识;确定PCIe设备标识与PCIe插槽的位置信息的映射关系。As an optional implementation manner, the acquiring module 401 is further configured to acquire the PCIe device identifier, and the mapping module 403 establishes a mapping relationship between the PCIe device identifier and the location information of the PCIe slot. Specifically, search for all PCIe devices connected to the PCIe slots from the preset device list; obtain the PCIe device identifiers of all the found PCIe devices; determine the mapping relationship between the PCIe device identifiers and the location information of the PCIe slots.
作为一种可选的实施方式,如图3(a)所示,每个根节点对应一个PCIe插槽,则可确定根节点(root)与PCIe插槽(插槽)的对应关系,例如root1~插槽1、root2~插槽2、root3~插槽3等,进一步可选的,还可以维护一张位置表,记录所有PCIe插槽与根节点的对应关系,便于查找与维护。从预设的设备列表查找PCIe插槽的连接的所有PCIe设备,如root1~插槽1,插槽1连接两个PCIe设备(设备0、设备1),再获取查找到的所有PCIe设备的PCIe设备标识,确定PCIe设备标识与PCIe插槽的位置信息的映射关系。将该PCIe插槽连接的所有PCIe设备的PCIe设备标识与PCIe插槽的位置信息进行映射,则PCIe设备标识和PCIe插槽的位置信息可以为多对一或者一对一的映射关系。As an optional implementation, as shown in Figure 3(a), each root node corresponds to a PCIe slot, and the corresponding relationship between the root node (root) and the PCIe slot (slot) can be determined, such as root1 ~slot 1, root2~slot 2, root3~slot 3, etc. Optionally, a location table can be maintained to record the correspondence between all PCIe slots and the root node, which is convenient for search and maintenance. Find all PCIe devices connected to PCIe slots from the preset device list, such as root1~slot 1, slot 1 is connected to two PCIe devices (device 0, device 1), and then obtain the PCIe information of all found PCIe devices The device identifier determines the mapping relationship between the PCIe device identifier and the location information of the PCIe slot. The PCIe device identifiers of all PCIe devices connected to the PCIe slot are mapped with the location information of the PCIe slots, and the PCIe device identifiers and the location information of the PCIe slots may be in a many-to-one or one-to-one mapping relationship.
作为一种可选的实施方式,如图3(b)所示,主板包括四个插槽,四个插槽与一个PCIe转换器连接,该PCIe转换器包括多个下游接口(down),每个下游接口对应一个PCIe插槽,每个下游接口可由根节点进行唯一标识,则可确定下游接口(down)与PCIe插槽(插槽)的对应关系,例如down1~插槽1、down2~插槽2、down3~插槽3等,进一步可选的,还可以维护一张位置表,记录所有PCIe插槽与下游节点的对应关系,便于查找与维护。从预设的设备列表查找PCIe插槽的连接的所有PCIe设备,如down2~插槽2,插槽2连接两个PCIe设备(设备3、eth4),再获取查找到的所有PCIe设备的PCIe设备标识,确定PCIe设备标识与PCIe插槽的位置信息的映射关系。将该PCIe插槽连接的所有PCIe设备的PCIe设备标识与PCIe插槽的位置信息进行映射,则PCIe设备标识和PCIe插槽的位置信息可以为多对一或者一对一的映射关系。As an optional implementation, as shown in FIG. 3(b), the motherboard includes four slots, and the four slots are connected to a PCIe converter. The PCIe converter includes multiple downstream interfaces (down), each Each downstream interface corresponds to a PCIe slot, and each downstream interface can be uniquely identified by the root node, then the corresponding relationship between the downstream interface (down) and the PCIe slot (slot) can be determined, for example, down1~slot 1, down2~slot Slot 2, down3 to slot 3, etc. are further optional. A location table can also be maintained to record the corresponding relationship between all PCIe slots and downstream nodes, which is convenient for search and maintenance. Find all PCIe devices connected to the PCIe slots from the preset device list, such as down2 to slot 2, and slot 2 is connected to two PCIe devices (device 3, eth4), and then obtain the PCIe devices of all the found PCIe devices ID, to determine the mapping relationship between the PCIe device ID and the location information of the PCIe slot. The PCIe device identifiers of all PCIe devices connected to the PCIe slot are mapped with the location information of the PCIe slots, and the PCIe device identifiers and the location information of the PCIe slots may be in a many-to-one or one-to-one mapping relationship.
作为一种可选的实施方式,业务处理模块404根据PCIe设备标识与PCIe插槽的位置信息的映射关系为PCIe设备配置PCIe业务。具体实现中,根据PCIe设备标识与PCIe插槽的位置信息的映射关系确定PCIe业务配置所在的PCIe插槽的位置,PCIe业务包括但不局限于:删除/更改PCIe插槽上连接的PCIe设备,还包括故障排查等。例如,若维护人员需要对PCIe设备进行故障排查,可以查找PCIe设备标识与PCIe插槽的位置信息的映射关系,从而具体查找到出现故障的PCIe设备具体在哪个PCIe插槽上,准备定位到PCIe插槽的位置,避免出现现有技术中根据PCIe设备添加到设备列表中的顺序为各个PCIe设备命名,只能通过PCIe名称查找,以致不能准备定位到故障位置,维护难度增加的技术问题。As an optional implementation manner, the service processing module 404 configures the PCIe service for the PCIe device according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot. In the specific implementation, the position of the PCIe slot where the PCIe service is configured is determined according to the mapping relationship between the PCIe device identifier and the position information of the PCIe slot. The PCIe service includes but is not limited to: deleting/changing the PCIe device connected to the PCIe slot, Also includes troubleshooting and more. For example, if maintenance personnel need to troubleshoot PCIe devices, they can search for the mapping relationship between the PCIe device ID and the location information of the PCIe slot, so as to find out which PCIe slot the faulty PCIe device is on, and prepare to locate the PCIe device. The position of the slot avoids the technical problem that in the prior art, each PCIe device is named according to the order in which the PCIe device is added to the device list, and can only be searched by the PCIe name, so that the location of the fault cannot be prepared, and the maintenance difficulty increases.
本发明实施例提供一种PCIe设备管理装置,获取模块可获取PCIe插槽的标识信息和PCIe设备标识,生成模块可根据获取到的PCIe插槽的标识信息生成PCIe插槽的位置信息,映射模块可将PCIe设备标识与PCIe插槽的位置信息建立映射关系,从而业务处理模块可根据PCIe设备标识与PCIe插槽的位置信息的映射关系为PCIe设备配置PCIe业务,可通过PCIe设备标识与PCIe插槽的位置信息的映射关系查找到PCIe设备具体在哪个PCIe插槽,提高了业务配置的精确性,增加了故障定位精准度。The embodiment of the present invention provides a PCIe device management device, the acquisition module can obtain the identification information of the PCIe slot and the PCIe device identification, the generation module can generate the position information of the PCIe slot according to the identification information of the obtained PCIe slot, and the mapping module A mapping relationship can be established between the PCIe device identifier and the location information of the PCIe slot, so that the service processing module can configure PCIe services for the PCIe device according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot. The mapping relationship of slot location information finds out which PCIe slot the PCIe device is in, which improves the accuracy of service configuration and fault location.
需要说明的是,本实施例中的获取模块、生成模块、映射模块和业务处理模块可以为单独设立的处理器,也可以集成在PCIe控制终端的某一个处理器中实现,此外,也可以以程序代码的形式存储于PCIe控制终端的存储器中,由PCIe控制终端的某一个处理器调用并执行以上模块的功能。这里所述的处理器可以是一个中央处理器(Central ProcessingUnit,CPU),或者是特定集成电路(Application Specific Integrated Circuit,ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。It should be noted that the acquiring module, generating module, mapping module and business processing module in this embodiment may be independently established processors, or may be integrated in a certain processor of the PCIe control terminal for implementation. In addition, they may also be implemented as The form of the program code is stored in the memory of the PCIe control terminal, and is called by a certain processor of the PCIe control terminal to execute the functions of the above modules. The processor described here may be a central processing unit (Central Processing Unit, CPU), or a specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention .
请参见图5,为本发明实施例提供的一种PCIe控制终端的结构示意图,其中,本实施例提供的PCIe控制终端与图1所示的方法相对应,为基于图1所示的PCIe设备管理方法的执行主体。具体的实现形式如图3所示,本发明实施例的PCIe控制终端包括:接收机501、发射机502、存储器503和处理器504,其中,接收机501、发射机502、存储器503均和处理器504连接,例如,可以通过总线连接。当然,网元设备还可以包括天线、基带处理部件、中射频处理部件、输入输出装置等通用部件,具体不受本发明实施例的限制。Please refer to FIG. 5 , which is a schematic structural diagram of a PCIe control terminal provided in an embodiment of the present invention, wherein the PCIe control terminal provided in this embodiment corresponds to the method shown in FIG. 1 and is based on the PCIe device shown in FIG. 1 The executive body of the management method. The specific implementation form is shown in Figure 3. The PCIe control terminal in the embodiment of the present invention includes: a receiver 501, a transmitter 502, a memory 503, and a processor 504, wherein the receiver 501, the transmitter 502, and the memory 503 all sum and process The device 504 is connected, for example, may be connected by a bus. Of course, the network element equipment may also include common components such as antennas, baseband processing components, intermediate radio frequency processing components, and input and output devices, which are not specifically limited by the embodiments of the present invention.
接收机501和发射机502可以集成在一起,构成收发机。The receiver 501 and the transmitter 502 can be integrated together to form a transceiver.
存储器503用于存储可执行程序代码,该程序代码包括计算机操作指令。存储器503可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 503 is used for storing executable program codes, and the program codes include computer operation instructions. The memory 503 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
处理器504可以是一个中央处理器,或者是特定集成电路,或者是被配置成实施本发明实施例的一个或多个集成电路。Processor 504 may be a central processing unit, or a specific integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention.
其中,存储器503中存储一组程序代码,且处理器504用于调用存储器503中存储的程序代码,执行以下操作:Wherein, a set of program codes are stored in the memory 503, and the processor 504 is used to call the program codes stored in the memory 503 to perform the following operations:
获取PCIe插槽的标识信息;Obtain the identification information of the PCIe slot;
根据所述获取到的PCIe插槽的标识信息生成所述PCIe插槽的位置信息;Generate the position information of the PCIe slot according to the obtained identification information of the PCIe slot;
获取PCIe设备标识,并将所述PCIe设备标识与所述PCIe插槽的位置信息建立映射关系;Obtain a PCIe device identifier, and establish a mapping relationship between the PCIe device identifier and the position information of the PCIe slot;
根据所述PCIe设备标识与所述PCIe插槽的位置信息的映射关系为所述PCIe设备配置PCIe业务。Configuring PCIe services for the PCIe device according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot.
作为一种可选的实施方式,PCIe插槽的标识信息包括:所述PCIe插槽的根节点的总线号、设备号和功能号。As an optional implementation manner, the identification information of the PCIe slot includes: a bus number, a device number, and a function number of the root node of the PCIe slot.
作为一种可选的实施方式,处理器504根据所述获取到的PCIe插槽的标识信息生成所述PCIe插槽的位置信息包括:As an optional implementation manner, the processor 504 generating the location information of the PCIe slot according to the obtained identification information of the PCIe slot includes:
将所述PCIe插槽的根节点的总线号、设备号和功能号确定为所述PCIe插槽的位置信息。Determining the bus number, device number and function number of the root node of the PCIe slot as the location information of the PCIe slot.
作为一种可选的实施方式,处理器504获取PCIe设备标识,并将所述PCIe设备标识与所述PCIe插槽的位置信息建立映射关系包括:As an optional implementation manner, the processor 504 obtaining the PCIe device identifier, and establishing a mapping relationship between the PCIe device identifier and the location information of the PCIe slot includes:
从预设的设备列表查找所述PCIe插槽连接的所有PCIe设备;Find all PCIe devices connected to the PCIe slot from the preset device list;
获取所述查找到的所有PCIe设备的PCIe设备标识;Obtain the PCIe device identifiers of all the found PCIe devices;
确定所述PCIe设备标识与所述PCIe插槽的位置信息的映射关系。Determine the mapping relationship between the PCIe device identifier and the location information of the PCIe slot.
作为一种可选的实施方式,所述PCIe业务包括:删除/更改所述PCIe插槽上连接的PCIe设备。As an optional implementation manner, the PCIe service includes: deleting/changing a PCIe device connected to the PCIe slot.
上述技术方案中,提供一种PCIe控制终端,包括接收机、发射机、存储器和处理器,处理器可获取PCIe插槽的标识信息和PCIe设备标识,根据PCIe插槽的标识信息生成PCIe插槽的位置信息,并将PCIe设备标识与PCIe插槽的位置信息建立映射关系,根据PCIe设备标识与PCIe插槽的位置信息的映射关系为PCIe设备配置PCIe业务。实现可将PCIe设备标识与PCIe插槽的位置信息建立映射关系,从而可根据PCIe设备标识与PCIe插槽的位置信息的映射关系为PCIe设备配置PCIe业务,可通过PCIe设备标识与PCIe插槽的位置信息的映射关系查找到PCIe设备具体在哪个PCIe插槽,提高了业务配置的精确性,增加了故障定位精准度。In the above-mentioned technical scheme, provide a kind of PCIe control terminal, comprise receiver, transmitter, memory and processor, processor can obtain the identification information of PCIe slot and PCIe device identification, generate PCIe slot according to the identification information of PCIe slot The location information of the PCIe device, and establish a mapping relationship between the PCIe device identifier and the location information of the PCIe slot, and configure the PCIe service for the PCIe device according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot. Realize the establishment of a mapping relationship between the PCIe device identifier and the location information of the PCIe slot, so that the PCIe service can be configured for the PCIe device according to the mapping relationship between the PCIe device identifier and the location information of the PCIe slot, and the PCIe device identifier and the PCIe slot can be used. The mapping relationship of location information finds out which PCIe slot the PCIe device is in, which improves the accuracy of service configuration and fault location.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或模块可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置、模块或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or modules can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, modules or units, and may also be electrical, mechanical or other forms of connection.
作为分离部件说明的模块或单元可以是或者也可以不是物理上分开的,作为模块或单元显示的部件可以是或者也可以不是物理模块或单元,即可以位于一个地方,或者也可以分布到多个网络模块或单元上。可以根据实际的需要选择其中的部分或者全部模块或单元来实现本申请实施例方案的目的。Modules or units described as separate components may or may not be physically separate, and components shown as modules or units may or may not be physical modules or units, that is, they may be located in one place, or may be distributed to multiple on the network module or unit. Part or all of the modules or units can be selected according to actual requirements to achieve the purpose of the solutions of the embodiments of the present application.
另外,在本申请各个实施例中的各功能模块或单元可以集成在一个处理模块或单元中,也可以是各个模块或单元单独物理存在,也可以是两个或两个以上模块或单元集成在一个模块或单元中。上述集成的模块或单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional module or unit in each embodiment of the present application may be integrated into one processing module or unit, each module or unit may exist separately physically, or two or more modules or units may be integrated in one processing module or unit. in a module or unit. The above-mentioned integrated modules or units can be implemented in the form of hardware or in the form of software functional units.
集成的模块或单元如果以软件功能模块或单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If an integrated module or unit is realized in the form of a software function module or unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application is essentially or part of the contribution to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and other media capable of storing program codes.
以上,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above is only the specific implementation of the application, but the protection scope of the application is not limited thereto. Any person familiar with the technical field can easily think of various equivalent modifications or modifications within the technical scope disclosed in the application. Replacement, these modifications or replacements should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310751994.6A CN103763129B (en) | 2013-12-31 | 2013-12-31 | A kind of PCIe equipment management method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310751994.6A CN103763129B (en) | 2013-12-31 | 2013-12-31 | A kind of PCIe equipment management method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN103763129A CN103763129A (en) | 2014-04-30 |
| CN103763129B true CN103763129B (en) | 2018-05-25 |
Family
ID=50530292
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201310751994.6A Active CN103763129B (en) | 2013-12-31 | 2013-12-31 | A kind of PCIe equipment management method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN103763129B (en) |
Families Citing this family (31)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104202194B (en) * | 2014-09-10 | 2018-05-29 | 华为技术有限公司 | The collocation method and device of PCIe topologys |
| CN104407994B (en) * | 2014-10-31 | 2017-12-01 | 厦门市美亚柏科信息股份有限公司 | The method and device for the storage device inserted on identification computer slot |
| CN106033399B (en) * | 2015-03-20 | 2020-05-15 | 中兴通讯股份有限公司 | PCIe device and PCIe bus management method and device |
| CN106100953B (en) * | 2016-05-20 | 2019-10-18 | 北京百度网讯科技有限公司 | Method, device and system for generating PCIe device sharing network |
| CN106021503A (en) * | 2016-05-23 | 2016-10-12 | 浪潮电子信息产业股份有限公司 | An easy-to-apply server PCIE information acquisition method |
| CN106294222A (en) * | 2016-08-03 | 2017-01-04 | 浪潮电子信息产业股份有限公司 | A kind of method and device determining PCIE device and slot corresponding relation |
| CN106407148A (en) * | 2016-10-24 | 2017-02-15 | 郑州云海信息技术有限公司 | PCIE device hot-plug design method |
| CN106649154B (en) * | 2016-12-13 | 2019-12-06 | 曙光信息产业(北京)有限公司 | Method and system for controlling external plug-in equipment in BIOS |
| CN108733500A (en) * | 2017-04-13 | 2018-11-02 | 阿里巴巴集团控股有限公司 | Fault Locating Method and device, the generation method of correspondence and device |
| CN107193599B (en) * | 2017-05-23 | 2020-11-27 | 苏州浪潮智能科技有限公司 | A method for dynamically updating system slot information in SMBIOS |
| CN109656755A (en) * | 2017-10-11 | 2019-04-19 | 阿里巴巴集团控股有限公司 | The method and system of detection device state |
| CN107992438A (en) * | 2017-11-24 | 2018-05-04 | 郑州云海信息技术有限公司 | A kind of server and in server flexible configuration PCIe topologys method |
| CN110633177A (en) * | 2018-06-25 | 2019-12-31 | 中兴通讯股份有限公司 | A device information acquisition method and device, server, storage medium |
| CN109240751B (en) * | 2018-09-04 | 2021-12-21 | 广东小天才科技有限公司 | Peripheral module compatible method of electronic equipment and electronic equipment |
| CN109189602A (en) * | 2018-09-21 | 2019-01-11 | 郑州云海信息技术有限公司 | A kind of PCIE Slot Fault Locating Method, device and equipment |
| CN109547233A (en) * | 2018-10-10 | 2019-03-29 | 华为技术有限公司 | A kind of method, apparatus and server of the configuration of server network interface |
| CN109631280B (en) * | 2018-10-30 | 2020-08-14 | 珠海格力电器股份有限公司 | Device management system and method |
| CN109558282B (en) * | 2018-12-03 | 2021-10-29 | 郑州云海信息技术有限公司 | A PCIE link detection method, system, electronic device and storage medium |
| CN111273755A (en) * | 2018-12-04 | 2020-06-12 | 沃尔缇夫能源系统公司 | Slot setting method and device |
| CN110134446B (en) * | 2019-04-18 | 2022-04-15 | 深圳市广和通无线股份有限公司 | Method for starting PCIE equipment scanning |
| CN111078609B (en) * | 2019-11-13 | 2023-04-25 | 南京航空航天大学 | PCIe-to-three bus interface and method based on FPGA |
| CN111651397B (en) * | 2020-05-09 | 2022-11-15 | 山东浪潮科学研究院有限公司 | Method and equipment for accessing peripheral module of PXIe |
| CN113886312A (en) * | 2020-07-02 | 2022-01-04 | 许继集团有限公司 | PCIE bus addressing method and device |
| CN111831466A (en) * | 2020-07-17 | 2020-10-27 | 深圳市同泰怡信息技术有限公司 | A method, device, storage medium and computer equipment for reporting errors of system equipment |
| CN112732348B (en) * | 2020-12-30 | 2023-06-13 | 浙江大华技术股份有限公司 | A business processing method and device for a multi-node all-in-one machine |
| CN112817894A (en) * | 2021-01-25 | 2021-05-18 | 浙江大华技术股份有限公司 | Signal switching method and device, storage medium and electronic equipment |
| CN113448785B (en) * | 2021-05-28 | 2023-03-28 | 山东英信计算机技术有限公司 | Method, device and equipment for processing bandwidth state exception and readable medium |
| CN114077452B (en) * | 2022-01-18 | 2022-04-22 | 苏州浪潮智能科技有限公司 | PCIE equipment positioning method, device and related equipment |
| CN115599728B (en) * | 2022-11-30 | 2023-03-14 | 苏州浪潮智能科技有限公司 | Method, device, device and readable storage medium for determining slot position of FRU equipment |
| CN116303148B (en) * | 2023-05-17 | 2023-08-22 | 北京中科网威信息技术有限公司 | Multi-slot device network card detection method and device, electronic device and storage medium |
| CN117499214B (en) * | 2023-12-19 | 2024-03-29 | 苏州元脑智能科技有限公司 | Method and device for determining fault equipment, storage medium and electronic equipment |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1851663A (en) * | 2005-04-22 | 2006-10-25 | 鸿富锦精密工业(深圳)有限公司 | Peripheral component interconnecting device assembling rightness verifying device and method |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8214541B2 (en) * | 2006-06-07 | 2012-07-03 | Dell Products L.P. | Method and system for uniquely identifying peripheral component devices |
| CN103123528A (en) * | 2011-11-18 | 2013-05-29 | 环旭电子股份有限公司 | Plug-in module, electronic system and corresponding judging method and query method |
-
2013
- 2013-12-31 CN CN201310751994.6A patent/CN103763129B/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1851663A (en) * | 2005-04-22 | 2006-10-25 | 鸿富锦精密工业(深圳)有限公司 | Peripheral component interconnecting device assembling rightness verifying device and method |
Also Published As
| Publication number | Publication date |
|---|---|
| CN103763129A (en) | 2014-04-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103763129B (en) | A kind of PCIe equipment management method and device | |
| US11546228B2 (en) | Zero-touch configuration of network devices using hardware metadata | |
| EP3664372A1 (en) | Network management method and related device | |
| US20170070582A1 (en) | Network entity discovery and service stitching | |
| CN104301141B (en) | A kind of method, apparatus and system for preserving configuration information | |
| CN103595825B (en) | Domain name mapping detection method and device, server | |
| CN111064786B (en) | Account identifier management method and device | |
| CN107911249A (en) | Order line sending method, device and the equipment of a kind of network equipment | |
| WO2020073908A1 (en) | Method and device for sending routing information | |
| CN104639348A (en) | Network device and configuration method thereof | |
| CN104022896B (en) | A kind of configuring management method, device and the network equipment | |
| CN104506405B (en) | The method and device of cross-domain access | |
| CN111008220A (en) | Method and device for dynamic identification of data source, storage medium and electronic device | |
| CN103581020B (en) | The method of a kind of message forwarding, Apparatus and system | |
| CN105656643B (en) | A method and device for compatible management based on network configuration protocol | |
| CN102938711B (en) | Network interface information configuring methods and the network equipment | |
| CN112738019A (en) | Method and device for displaying device information, storage medium and electronic device | |
| CN105812221A (en) | Data transmission device and method in virtual extensible local area network | |
| CN101958900A (en) | Service processing method and device for server | |
| CN109842482B (en) | Information synchronization method, system and terminal equipment | |
| EP2993825A2 (en) | Network entity discovery and service stitching | |
| CN115776439A (en) | Method and system for configuring Underlay network of bare metal server | |
| CN103412830B (en) | A kind of method, apparatus and system of centralized management | |
| US20150195366A1 (en) | Switching device, non-transitory computer readable medium and zoning setting method | |
| US20150142960A1 (en) | Information processing apparatus, information processing method and information processing system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20211224 Address after: 450046 Floor 9, building 1, Zhengshang Boya Plaza, Longzihu wisdom Island, Zhengdong New Area, Zhengzhou City, Henan Province Patentee after: xFusion Digital Technologies Co., Ltd. Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd. |
|
| TR01 | Transfer of patent right | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20250310 Address after: 450046, 10th Floor, North Chuangzhi Tiandi Building, Dongshigeng Street, Longzihu Wisdom Island Middle Road East, Zhengdong New District, Zhengzhou City, Henan Province Patentee after: Henan Kunlun Technology Co.,Ltd. Country or region after: China Patentee after: xFusion Digital Technologies Co., Ltd. Address before: 450046 Floor 9, building 1, Zhengshang Boya Plaza, Longzihu wisdom Island, Zhengdong New Area, Zhengzhou City, Henan Province Patentee before: xFusion Digital Technologies Co., Ltd. Country or region before: China |
|
| TR01 | Transfer of patent right | ||
| CP03 | Change of name, title or address |
Address after: 450046, 10th Floor, North Chuangzhi Tiandi Building, Dongshigeng Street, Longzihu Wisdom Island Middle Road East, Zhengdong New District, Zhengzhou City, Henan Province Patentee after: Henan Kunlun Technology Co.,Ltd. Country or region after: China Patentee after: Super Fusion Digital Technology Co.,Ltd. Address before: 450046, 10th Floor, North Chuangzhi Tiandi Building, Dongshigeng Street, Longzihu Wisdom Island Middle Road East, Zhengdong New District, Zhengzhou City, Henan Province Patentee before: Henan Kunlun Technology Co.,Ltd. Country or region before: China Patentee before: xFusion Digital Technologies Co., Ltd. |
|
| CP03 | Change of name, title or address |