CN116303148A - Multi-slot device network card detection method and device, electronic device and storage medium - Google Patents

Multi-slot device network card detection method and device, electronic device and storage medium Download PDF

Info

Publication number
CN116303148A
CN116303148A CN202310553010.7A CN202310553010A CN116303148A CN 116303148 A CN116303148 A CN 116303148A CN 202310553010 A CN202310553010 A CN 202310553010A CN 116303148 A CN116303148 A CN 116303148A
Authority
CN
China
Prior art keywords
bus
network card
target
card
slot
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.)
Granted
Application number
CN202310553010.7A
Other languages
Chinese (zh)
Other versions
CN116303148B (en
Inventor
高福亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING ZHONGKE WANGWEI INFORMATION TECHNOLOGY CO LTD
Original Assignee
BEIJING ZHONGKE WANGWEI INFORMATION TECHNOLOGY CO LTD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING ZHONGKE WANGWEI INFORMATION TECHNOLOGY CO LTD filed Critical BEIJING ZHONGKE WANGWEI INFORMATION TECHNOLOGY CO LTD
Priority to CN202310553010.7A priority Critical patent/CN116303148B/en
Publication of CN116303148A publication Critical patent/CN116303148A/en
Application granted granted Critical
Publication of CN116303148B publication Critical patent/CN116303148B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0024Peripheral component interconnect [PCI]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a multi-slot equipment network card detection method, a multi-slot equipment network card detection device, electronic equipment and a storage medium, and belongs to the technical field of computers, wherein the method comprises the following steps: acquiring root bus numbers corresponding to the expansion slots respectively; for each expansion slot, determining the number of a lower-level bus step by step recursively based on the number of a root bus corresponding to the expansion slot until a final-level bus is detected, and acquiring a target hierarchical relationship, a manufacturer number of a target network card and a device number of the target network card, wherein the target network card is an insertion card occupying one or more final-level buses; and determining the card inserting type, the interface number and the affiliated expansion slot of the target network card based on the target hierarchical relationship, the manufacturer number of the target network card and the equipment number of the target network card. The network interface registration method has the advantages that the hierarchical relation from the root bus to the final bus and the manufacturer numbers and the equipment numbers of the network cards are obtained, and further based on the hierarchical relation, the manufacturer numbers and the equipment numbers, the card inserting types, the interface numbers and the extension slots of the network cards can be accurately determined, so that accurate network interface registration is realized.

Description

Multi-slot device network card detection method and device, electronic device and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for detecting a network card of a multi-slot device, an electronic device, and a storage medium.
Background
Currently, multi-slot network devices can freely combine cards plugged into different types of interfaces. According to the type of network interface, the network card can be divided into 4 electricity, 4 light, 8 electricity, 8 light or 4 electricity, 4 light, etc., according to the transmission rate, the network card can be divided into gigabit card and 2 Ten thousand megacard or 4 Ten thousand megacard, etc., according to different network card manufacturers, the network card can be divided into various brands, the cards with different network port types of different manufacturers can be independently inserted into a certain slot, or can be combined by a plurality of same cards or freely combined with other types of cards to be inserted into different slots, such a plurality of changes lead to the increase of the adapting difficulty of registering the network interface serial number according to the slot position number (for example, the intermediate numbers of Ge0/1/1, ge0/2/2 and Ten-Ge0/3/1 represent the slot position number), and the peripheral component interface interconnection (Peripheral Component interconnect, PCI) bus occupied by the different types of cards of different manufacturers inserted into different slots is changed.
In the related art, a network card device is detected through network card type code filtering (performing lspcb i-n|grep 0200 to acquire network card information), and then a case enumeration mode registration interface is performed according to the pci bus information occupied by each network card. However, the card type and the slot to which the card belongs cannot be distinguished due to incomplete case enumeration, conflict or variation of the PCi bus, coincidence with the type of the on-board network card and the like, so that the registration slot is wrong or the interface is disordered, the real hardware slot bit and the serial number cannot be in one-to-one correspondence, and the registration failure is caused when the registered network interface is renamed. How to accurately register a network interface is a problem to be solved in the industry.
Disclosure of Invention
Aiming at the problems existing in the prior art, the embodiment of the invention provides a multi-slot equipment network card detection method, a multi-slot equipment network card detection device, electronic equipment and a storage medium.
In a first aspect, the present invention provides a method for detecting a network card of a multi-slot device, including:
acquiring root bus numbers respectively corresponding to a plurality of expansion slots, wherein the expansion slots are slots based on Peripheral Component Interface (PCI) interconnection on a device main board;
for each expansion slot, determining a lower-level bus number in a step-by-step recursion mode based on a root bus number corresponding to the expansion slot until a final-level bus is detected, and acquiring a target hierarchy relationship, a manufacturer number of a target network card and a device number of the target network card, wherein the target hierarchy relationship is used for representing the hierarchy relationship from the root bus to the final-level bus, and the target network card is a card which occupies one or more final-level buses;
and determining the type of the plug-in card of the target network card, the number of interfaces of the target network card and the expansion slot of the target network card based on the target hierarchical relationship, the manufacturer number of the target network card and the equipment number of the target network card.
Optionally, according to the method for detecting a network card of a multi-slot device provided by the present invention, the step-by-step recursion determination of a subordinate bus number until a final bus is detected includes:
Under the condition that the last-level bus is not recursively transmitted, determining a first PCI device path based on a first bus number of a recursion target bus, wherein the first PCI device path is used for inquiring PCI device configuration space of devices occupying the first bus number;
and determining a lower-level bus number based on the first PCI device path and a first base address offset, wherein the first base address offset is used for indicating a storage address corresponding to the lower-level bus number in the PCI device configuration space.
Optionally, according to the method for detecting a multi-slot device network card provided by the present invention, the determining a first PCI device path based on a first bus number of a recursively transmitted target bus includes:
determining a first domain number of a PCI domain to which the target bus belongs, a first device number of a device occupying the target bus and a first function number of a device occupying the target bus;
the first PCI device path is determined based on the first domain number, the first bus number, the first device number, and the first function number.
Optionally, according to the method for detecting a network card of a multi-slot device provided by the present invention, the step-by-step recursion determination of a subordinate bus number until a final bus is detected includes:
Determining a second PCI device path based on a second bus number of the last level bus under the condition of recursion to the last level bus, wherein the second PCI device path is used for inquiring PCI device configuration space of devices occupying the second bus number;
and determining the equipment number and the manufacturer number of the plug-in card occupying the final bus based on the second PCI equipment path and a second base address offset, wherein the second base address offset is used for indicating a storage address corresponding to the equipment number in the PCI equipment configuration space.
Optionally, according to the method for detecting a network card of a multi-slot device provided by the present invention, the determining a second PCI device path based on a second bus number of the last-level bus includes:
determining a second domain number of a PCI domain to which the final bus belongs, a second equipment number of equipment occupying the final bus and a second function number of equipment occupying the final bus;
and determining the second PCI device path based on the second domain number, the second bus number, the second device number and the second function number.
Optionally, according to the method for detecting a network card of a multi-slot device provided by the present invention, the obtaining root bus numbers corresponding to the expansion slots respectively includes:
Under the condition that the root bus numbers corresponding to the expansion slots are fixed, determining the root bus numbers corresponding to the expansion slots based on a first preset configuration, wherein the first preset configuration is used for representing the corresponding relation between the expansion slots and the root bus numbers.
Optionally, according to the method for detecting a network card of a multi-slot device provided by the present invention, the obtaining root bus numbers corresponding to the expansion slots respectively includes:
under the condition that the root bus numbers corresponding to the expansion slots are not fixed, the root bus numbers corresponding to the expansion slots are determined based on the target card inserting combination and a second preset configuration, wherein the second preset configuration is used for representing the corresponding relation between the root bus numbers of the expansion slots and the various card inserting combinations.
In a second aspect, the present invention further provides a multi-slot device network card detection apparatus, including:
the first acquisition module is used for acquiring root bus numbers corresponding to a plurality of expansion slots respectively, wherein the expansion slots are slots based on Peripheral Component Interface (PCI) interconnection on a device main board;
the second acquisition module is used for recursively determining lower-level bus numbers step by step until a final-level bus is detected based on the root bus numbers corresponding to the expansion slots for each expansion slot, and acquiring a target hierarchical relationship, a manufacturer number of a target network card and a device number of the target network card, wherein the target hierarchical relationship is used for representing the hierarchical relationship from the root bus to the final-level bus, and the target network card is a card plug-in card occupying one or more final-level buses;
The determining module is used for determining the card type of the target network card, the interface number of the target network card and the expansion slot to which the target network card belongs based on the target hierarchical relationship, the manufacturer number of the target network card and the equipment number of the target network card.
In a third aspect, the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements any one of the multi-slot device network card detection methods described above when executing the program.
In a fourth aspect, the present invention further provides a non-transitory computer readable storage medium, on which is stored a computer program, which when executed by a processor implements a multi-slot device network card detection method as described in any one of the above.
According to the multi-slot equipment network card detection method, the device, the electronic equipment and the storage medium, by acquiring the root bus numbers corresponding to the expansion slots, the lower-level bus numbers can be determined recursively step by step for each expansion slot based on the root bus numbers corresponding to the expansion slots until the final-level bus is detected, the hierarchical relation from the root bus to the final-level bus and the manufacturer numbers and equipment numbers of the network cards can be acquired, the card type, the interface number and the expansion slots of the network cards can be determined based on the hierarchical relation, the manufacturer numbers and the equipment numbers, and the network card type, the interface number and the expansion slots of the network cards are further based on the card type, the interface number and the expansion slots of the expansion slots, the network card type and the slot self-adaptive detection under different card combination of the multi-slot equipment are realized, the influence of the PCI bus change occupied on network interface registration is eliminated, and the network interfaces can be accurately registered.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a method for detecting a network card of a multi-slot device according to the present invention;
FIG. 2 is a schematic diagram of a PCI device configuration space layout provided by the present invention;
FIG. 3 is a second flowchart of a method for detecting a network card of a multi-slot device according to the present invention;
FIG. 4 is a schematic diagram of a PCI bus tree structure provided by the present invention;
FIG. 5 is a third flowchart of a method for detecting a network card of a multi-slot device according to the present invention;
FIG. 6 is a diagram of a query result of PCI information of a network card according to the present invention;
FIG. 7 is a schematic diagram of a recursive PCI device information query result provided by the present invention;
FIG. 8 is a schematic diagram of the results of a progressive recursion operation provided by the present invention;
FIG. 9 is a second schematic diagram of the result of the progressive recursion operation provided by the present invention;
FIG. 10 is a third exemplary diagram of the result of the progressive recursion operation provided by the present invention;
FIG. 11 is a diagram of a fourth exemplary stepwise recursive operation processing result provided by the present invention;
FIG. 12 is a fifth schematic diagram of the results of a progressive recursion operation provided by the present invention;
FIG. 13 is a diagram showing the results of a progressive recursion operation provided by the present invention;
fig. 14 is a schematic structural diagram of a network card detection device of a multi-slot device according to the present invention;
fig. 15 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a schematic flow chart of a multi-slot device network card detection method according to the present invention, and as shown in fig. 1, an execution body of the multi-slot device network card detection method may be an electronic device, for example, a network device. The method comprises the following steps:
Step 101, obtaining root bus numbers corresponding to a plurality of expansion slots respectively, wherein the expansion slots are slots based on peripheral component interface interconnection PCI on a device main board.
Specifically, in order to accurately register the network interface, the root bus number corresponding to each PCI slot may be obtained for each expansion slot (i.e., PCI slot) on the device motherboard, so that the root bus number may be used as the starting bus number of the step-by-step recursion operation, and the subordinate bus number may be determined by step-by-step recursion, so as to detect the network card plugged into each expansion slot.
Step 102, for each expansion slot, determining a lower-level bus number in a step-by-step recursion manner based on a root bus number corresponding to the expansion slot until a final-level bus is detected, and acquiring a target hierarchical relationship, a manufacturer number of a target network card and a device number of the target network card, wherein the target hierarchical relationship is used for representing a hierarchical relationship from the root bus to the final-level bus, and the target network card is a card occupying one or more final-level buses.
Specifically, after the root bus numbers corresponding to the respective PCI slots are acquired, a probe operation that recursively performs stepwise for the respective expansion slots may be performed. The step-by-step recursion detection operation may be performed on any expansion slot, where the step-by-step recursion determination of the lower bus number is performed until the last bus is detected, based on the root bus number corresponding to the expansion slot. The target network card is an inserting card occupying one or more final buses, under the condition that the final buses are detected, equipment information (including manufacturer numbers and equipment numbers) of the inserting card occupying the final buses can be obtained, and if the inserting card occupying the final buses is the target network card, manufacturer numbers and equipment numbers of the target network card can be obtained. After the progressive recursion of the probe operation is performed on each expansion slot, the target hierarchical relationship, and the manufacturer number and the device number of the target network card may be acquired.
And step 103, determining the card type of the target network card, the interface number of the target network card and the expansion slot to which the target network card belongs based on the target hierarchical relationship, the manufacturer number of the target network card and the equipment number of the target network card.
Specifically, after the target hierarchical relationship is obtained, and the manufacturer number and the device number of the target network card are obtained, the expansion slot to which the target network card belongs may be determined based on the target hierarchical relationship, the card type of the target network card may be determined based on the manufacturer number and the device number of the target network card, and the interface number of the target network card may be determined based on the target hierarchical relationship, the card type of the target network card, and the last-level bus occupied by the target network card. For the target network card, network interface registration may be performed based on the card type, the number of interfaces, and the expansion slot to which the target network card belongs.
For example, if the card type of the target network card is determined to be a gigabit type network card based on the card type of the target network card, whether the target network card occupies two adjacent last-level buses can be judged based on the target hierarchical relationship and the last-level buses occupied by the target network card, if yes, the interface number of the target network card can be determined to be 8 ports, and if not, the interface number of the target network card can be determined to be 4 ports.
Optionally, the card type, the number of interfaces and the extension slots of the target network card may be saved in a global variable array of a card type structure body with the index of the corresponding slot bit as a subscript for standby, where the member of the card type structure body includes: card type, interface number and slot number; the enumeration structure of card type is stated, the common manufacturer and the card insertion names of different types are enumerated, and the enumeration structure can be expanded and increased.
The multi-slot equipment network card detection method provided by the invention can be used for determining the lower bus number step by step recursively until the final bus is detected based on the root bus number corresponding to each expansion slot by acquiring the root bus number corresponding to each expansion slot, acquiring the hierarchical relation from the root bus to the final bus and the manufacturer number and equipment number of the network card, further determining the card type, the interface number and the affiliated expansion slot of the network card based on the hierarchical relation, the manufacturer number and the equipment number, further realizing the self-adaptive detection of the card type and the affiliated expansion slot under different card combinations of the multi-slot equipment based on the card type, the interface number and the affiliated expansion slot, eliminating the influence of the PCI bus change occupied on network interface registration, and accurately registering the network interface.
Optionally, according to the method for detecting a network card of a multi-slot device provided by the present invention, the step-by-step recursion determination of a subordinate bus number until a final bus is detected includes:
under the condition that the last-level bus is not recursively transmitted, determining a first PCI device path based on a first bus number of a recursion target bus, wherein the first PCI device path is used for inquiring PCI device configuration space of devices occupying the first bus number;
and determining a lower-level bus number based on the first PCI device path and a first base address offset, wherein the first base address offset is used for indicating a storage address corresponding to the lower-level bus number in the PCI device configuration space.
Specifically, in the process of performing the detection operation of stepwise recursion for a certain expansion slot, the recursion to the target bus may be determined under the condition that the recursion to the last-level bus is not performed, the bus number (i.e., the first bus number) of the target bus is obtained, and then the first PCI device path may be generated based on the first bus number, and further based on the first PCI device path and the first base address offset, the PCI device configuration space of the device occupying the first bus number may be queried, and the number of the next-level bus, i.e., the next-level bus number, may be obtained.
Optionally, fig. 2 is a schematic diagram of a PCI device configuration space layout provided in the present invention, and as shown in fig. 2, the PCI device configuration space includes the following information: (1), device number (Device ID); (2), vendor number (Vendor ID); (3), PCI device Status (Status); (4), PCI device commands (Command); (5) device classification information (Class Code); (6), device version number (Revision ID); (7), selectable (BIST); (8), PCI device Header Type (Header Type); (9), a master delay timer (Primary Latency Timer); (10), cache Size (Cache Line Size); (11), a base register 0 (Base Address Register 0); (12), a base register1 (Base Address Register 1); (13) An auxiliary delay timer (Secondary Latency Timer); (14), lower level bus number (Subordinate Bus Number); (15), auxiliary bus number (Secondary Bus Number); (16), a master bus number (Primary Bus Number); (17) Status of PCI downstream buses and devices (second Status); (18), upper Limit of IO addressing (I/O Limit); (19), IO addressed Base address (I/O Base); (20) upper Limit of Memory addressing; and (21) a Memory-addressed Base address (Memory Base), the Byte Offset (Byte Offset) is shown on the right in fig. 2. The first base address offset may be fixed to 0x19, the first base address offset may indicate a storage address corresponding to a lower bus number (Subordinate Bus Number) in the PCI device configuration space, and the lower bus number may be obtained in combination with the first PCI device path and the first base address offset.
It can be appreciated that by recursively acquiring the lower bus number step by step, the corresponding network card information can be traversed, and the card type can be accurately determined based on the Device number (Device ID) and Vendor number (Vendor ID) of the target network card. Based on the target hierarchical relationship, the expansion slot to which the target network card belongs can be accurately determined. Based on the target hierarchical relationship, the card type of the target network card and the last-stage bus occupied by the target network card, the interface number of the target network card can be accurately determined. For the target network card, the network interface can be accurately registered based on the card type, the interface number and the extension slot of the target network card.
Optionally, according to the method for detecting a multi-slot device network card provided by the present invention, the determining a first PCI device path based on a first bus number of a recursively transmitted target bus includes:
determining a first domain number of a PCI domain to which the target bus belongs, a first device number of a device occupying the target bus and a first function number of a device occupying the target bus;
the first PCI device path is determined based on the first domain number, the first bus number, the first device number, and the first function number.
In particular, a first interface function for acquiring a lower bus ID may be packaged. The referencing of the first interface function includes: domain number (domain ID), bus number (Bus ID), device number (Device ID), function number (Func ID), and first base address offset (this offset can be held by a base address register, fixed to 0x 19). Through the first interface function, a corresponding PCI device path "/sys/bus/pcb/devices/000 a: b: c.d/config" may be assembled according to the ingress, where a in "000a: b: c.d" represents a domain number, b in "000a: b: c.d" represents a bus number, c in "000a: b: c.d" represents a device number, and d in "000a: b: c.d" represents a function number.
The first domain number, the first bus number, the first device number, and the first function number are input to the first interface function, a PCI device path can be generated through the first interface function, and a lower bus number of a configuration space is read and returned according to the PCI device path and the first base address offset (Subordinate Bus Number). After the bus number is acquired, the bus number can be further used as a first interface function to enter into the parameters and acquire the lower-level bus number. Under the condition that the root bus (root bus) number corresponding to each PCI slot is known, the root bus number can be taken as a first interface function to enter into the reference step by step for recursion to obtain the lower-level bus number for each expansion slot. By performing the detection operation of stepwise recursion for each expansion slot, the corresponding network card information can be traversed, and the expansion slot to which the target network card belongs and the card insertion type of the target network card can be accurately determined.
Optionally, according to the method for detecting a network card of a multi-slot device provided by the present invention, the step-by-step recursion determination of a subordinate bus number until a final bus is detected includes:
determining a second PCI device path based on a second bus number of the last level bus under the condition of recursion to the last level bus, wherein the second PCI device path is used for inquiring PCI device configuration space of devices occupying the second bus number;
and determining the equipment number and the manufacturer number of the plug-in card occupying the final bus based on the second PCI equipment path and a second base address offset, wherein the second base address offset is used for indicating a storage address corresponding to the equipment number in the PCI equipment configuration space.
Specifically, in the process of performing the probe operation of stepwise recursion for a certain expansion slot, the bus number (i.e., the second bus number) of the last-stage bus may be obtained under the condition of recursion to the last-stage bus, and further, a second PCI device path may be generated based on the second bus number, and further, based on the second PCI device path and the second base address offset, the device number and vendor number of the card occupying the last-stage bus may be obtained.
Optionally, as shown in fig. 2, the second base address offset may be fixed to 0x0, where the second base address offset may indicate a storage address corresponding to a Device number (Device ID) in the PCI Device configuration space, and in combination with the second PCI Device path and the second base address offset, the PCI Device configuration space of the card occupying the last-level bus may be queried to obtain the Device number and vendor number of the card.
It can be understood that the lower bus number can be obtained by recursion step by step, so that the corresponding network card information can be traversed, the card type, the interface number and the corresponding expansion slot of the target network card can be accurately determined, and the accurate registration of the network interface is realized.
Optionally, according to the method for detecting a network card of a multi-slot device provided by the present invention, the determining a second PCI device path based on a second bus number of the last-level bus includes:
determining a second domain number of a PCI domain to which the final bus belongs, a second equipment number of equipment occupying the final bus and a second function number of equipment occupying the final bus;
and determining the second PCI device path based on the second domain number, the second bus number, the second device number and the second function number.
Specifically, the second interface function for acquiring the Device number (Device ID) may be packaged. The second interface function includes: domain number (domain ID), bus number (Bus ID), device number (Device ID), function number (Func ID), and second base address offset (this offset can be saved by a base address register, fixed to 0x 0). Through the second interface function, a corresponding PCI device path "/sys/bus/pcb/devices/000 a: b: c.d/config" may be assembled according to the ingress, where a in "000a: b: c.d" represents a domain number, b in "000a: b: c.d" represents a bus number, c in "000a: b: c.d" represents a device number, and d in "000a: b: c.d" represents a function number.
The second domain number, the second bus number, the second Device number, and the second function number are input to the second interface function, a PCI Device path can be generated through the second interface function, and a Device number (Device ID) and a Vendor number (Vendor ID) of a configuration space are read and returned from four bytes according to the PCI Device path and the second base address offset.
It can be understood that by performing the detection operation of stepwise recursion for each expansion slot, the corresponding network card information can be traversed finally, and the expansion slot to which the target network card belongs and the card type of the target network card can be accurately determined.
Optionally, according to the method for detecting a network card of a multi-slot device provided by the present invention, the obtaining root bus numbers corresponding to the expansion slots respectively includes:
under the condition that the root bus numbers corresponding to the expansion slots are fixed, determining the root bus numbers corresponding to the expansion slots based on a first preset configuration, wherein the first preset configuration is used for representing the corresponding relation between the expansion slots and the root bus numbers.
Specifically, fig. 3 is a second flowchart of the method for detecting a multi-slot device network card according to the present invention, as shown in fig. 3, the method for detecting a multi-slot device network card includes steps 301 to 303.
Step 301, determining, based on a first preset configuration, a root bus number corresponding to each of the plurality of expansion slots when the root bus number corresponding to each of the plurality of expansion slots is fixed.
It can be understood that, according to the PCI bus layout design of the hardware motherboard slot, if the root bus (root bus) number of each slot is fixed during the PCI wiring of the hardware motherboard slot, the root bus information corresponding to each slot can be obtained by filtering the lspcb-t tree structure, the correspondence between the expansion slots and the root bus number can be determined, the correspondence can be stored as a first preset configuration, and then the root bus numbers corresponding to the expansion slots respectively can be determined based on the first preset configuration.
Optionally, fig. 4 is a schematic diagram of the PCI bus tree structure provided in the present invention, as shown in fig. 4, if the root bus number of each slot is fixed during PCI routing of the hardware motherboard slot, filtering and obtaining may be performed according to the special character string feature of the PCI bus tree structure, for example, the PCI bus layout corresponding to 4 slots of a device is rows 2, 3, 5 and 6 of the lspc i-t tree structure (as shown in fig. 4), and then the "lspc i-t|grep |sed-n-e 2p3p5p6p >/cfcard/pci_slot_root_bus" command statement is executed through the system (system) to filter and save the root bus (root bus) information of each slot to the storage directory root bus information file, and then the file may be opened, and the root bus number of each slot is filtered according to the special character string tag or fixed byte offset.
Step 302, for each expansion slot, determining a lower bus number step by step in a recursion manner based on the root bus number corresponding to the expansion slot until a final bus is detected, and obtaining a target hierarchical relationship, a manufacturer number of the target network card and a device number of the target network card.
Step 303, determining the card type of the target network card, the number of interfaces of the target network card and the expansion slot to which the target network card belongs based on the target hierarchical relationship, the manufacturer number of the target network card and the device number of the target network card.
Therefore, under the condition that the root bus numbers corresponding to the expansion slots are fixed, the lower-level bus numbers can be recursively determined step by step for each expansion slot based on the root bus numbers corresponding to the expansion slots until the final-level bus is detected by acquiring the root bus numbers corresponding to the expansion slots, the card type, the interface number and the expansion slots of the network card are accurately determined, and the self-adaptive detection of the network card type and the slot of the multi-slot device under different card combination is realized.
Optionally, according to the method for detecting a network card of a multi-slot device provided by the present invention, the obtaining root bus numbers corresponding to the expansion slots respectively includes:
under the condition that the root bus numbers corresponding to the expansion slots are not fixed, the root bus numbers corresponding to the expansion slots are determined based on the target card inserting combination and a second preset configuration, wherein the second preset configuration is used for representing the corresponding relation between the root bus numbers of the expansion slots and the various card inserting combinations.
Specifically, fig. 5 is a third flowchart of the method for detecting a multi-slot device network card according to the present invention, as shown in fig. 5, the method for detecting a multi-slot device network card includes steps 501 to 503.
Step 501, determining the root bus numbers corresponding to the expansion slots based on the target card combination and the second preset configuration under the condition that the root bus numbers corresponding to the expansion slots are not fixed.
It can be understood that, under the condition that the root bus numbers corresponding to the expansion slots are not fixed, the root bus change rule of different slots, that is, the correspondence between the root bus numbers of the expansion slots and the various card combinations, can be found by testing the various card combinations of each slot, and the correspondence can be stored as a second preset configuration, so that the root bus numbers corresponding to the expansion slots can be determined based on the target card combination (that is, the card combination adopted by the main board of the current device) and the second preset configuration.
Step 502, for each expansion slot, recursively determining a lower bus number step by step based on a root bus number corresponding to the expansion slot until a final bus is detected, and acquiring a target hierarchical relationship, a manufacturer number of a target network card and a device number of the target network card.
Step 503, determining the card type of the target network card, the number of interfaces of the target network card and the expansion slot to which the target network card belongs based on the target hierarchical relationship, the manufacturer number of the target network card and the device number of the target network card.
Therefore, under the condition that the root bus numbers corresponding to the expansion slots are not fixed, the lower-level bus numbers can be recursively determined step by step for each expansion slot based on the root bus numbers corresponding to the expansion slots until the final-level bus is detected by acquiring the root bus numbers corresponding to the expansion slots, the card type, the interface number and the expansion slots of the network card are accurately determined, and the self-adaptive detection of the network card type and the slot of the multi-slot device under different card combination is realized.
The following is an alternative example of the present invention, but is not limiting of the invention.
For example one, the following is 8 gigabit optical interface card PCI bus information (0 x0200 is a network card category code, device ID is 0x 1522), the root bus when inserted in 3 slot bits is 21, then the lower buses are sequentially recursively acquired according to the interface function of acquiring the lower bus number by encapsulation, respectively 22 and 23, then the buses 24 and 25 of the 8 gigabit optical interface card are acquired respectively, finally the corresponding network card Device ID is acquired according to the interface function of the encapsulation acquisition Device ID, so as to judge the card type.
In an example one, fig. 6 is a schematic diagram of a network card PCI information query result provided by the present invention, fig. 7 is a schematic diagram of a recursive PCI device information query result provided by the present invention, wherein the network card PCI information may be displayed by executing a "lspci-n" instruction as shown in fig. 6, and the recursive PCI device information may be displayed by executing a "ls-l/sys/bus/PCI/devices/" instruction as shown in fig. 7.
In an example one, fig. 8 is a schematic diagram of a result of the progressive recursion operation provided by the present invention, as shown in fig. 8, a root Bus at the time of inserting 3 slots is 21, and according to the entry, a domain number (domain ID is 1), a Bus number (Bus ID is 21), a Device number (Device ID is 01), a function number (Func ID is 0), and a first base address offset (fixed to 0x19, that is, a 25 th byte position), a first interface function is called to read a PCI configuration space thereof, and then a lower Bus is obtained, which is Bus 22, respectively.
In an example one, fig. 9 is a schematic diagram of a second step-by-step recursive operation processing result provided by the present invention, as shown in fig. 9, a lower Bus 22 acquired according to a root Bus is respectively a domain number (domain ID is 1), a Bus number (Bus ID is 22), a Device number (Device ID is 00), a function number (Func ID is 0) and a first base address offset (the offset can be saved by a base address register and fixed to 0x 19), a first interface function is called to read a PCI configuration space thereof, and then the lower Bus is respectively a Bus 23.
In an example one, fig. 10 is a schematic diagram of a third step-by-step recursive operation processing result provided in the present invention, as shown in fig. 10, a lower Bus 23 obtained according to a root Bus is called to read its PCI configuration space according to an entry number (domain ID is 1), a Bus number (Bus ID is 23), a Device number (Device ID is 01), a function number (Func ID is 0) and a first base offset (the offset can be saved by a base register and fixed to 0x 19), and then the lower Bus 24 is obtained.
In an example one, fig. 11 is a schematic diagram of a result of the progressive recursion operation processing provided by the present invention, as shown in fig. 11, a lower Bus 24 obtained according to a root Bus is called to read its PCI configuration space according to a domain number (domain ID is 1), a Bus number (Bus ID is 24), a Device number (Device ID is 00), a function number (Func ID is 0) and a second base address offset (fixed 0x0 base address register, 0 byte position, byte order in fig. 11 is opposite to network order), and then a network card Device ID corresponding to the Bus is obtained to be 0x1522.
In an example one, fig. 12 is a schematic diagram of a result of the stepwise recursive operation processing provided by the present invention, as shown in fig. 12, a lower Bus 23 acquired according to a root Bus is called to read its PCI configuration space according to an entry number (domain ID is 1), a Bus number (Bus ID is 23), a Device number (Device ID is 03), a function number (Func ID is 0) and a first base address offset (fixed 0x19 base address register, 25 th byte position), and then the lower Bus is acquired as Bus 25, respectively.
In an example one, fig. 13 is a schematic diagram of a result of the progressive recursion operation processing provided in the present invention, as shown in fig. 13, a lower Bus 25 acquired according to a root Bus is respectively a domain number (domain ID is 1), a Bus number (Bus ID is 25), a Device number (Device ID is 00), a function number (Func ID is 0) and a second base address offset (fixed 0x0 base address register, a 0 th byte position, a byte order in fig. 13 is opposite to a network order), an interface function of a Device ID for encapsulation acquisition is called to read a PCI configuration space thereof, and then a Device ID of a network card corresponding to the Bus is acquired to be 0x1522.
The lower buses are sequentially acquired step by step according to the known root bus information of each slot position, the Device numbers are finally acquired, the plug-in card type is judged to be an 8 gigabit optical port plug-in card according to the fact that the Device ID of the common Device numbers 24 and 25 is the same 0x1522, the defined card type enumeration value, the corresponding interface number and the slot position number information are stored in the global structure body array, the detection process of each slot position plug-in card type is completed, and then the network ports corresponding to the slot positions can be registered according to the stored card types, the stored interface number and the slot position numbers during network interface registration, for example: the middle numbers of Ge0/1/1, ge0/2/2 and Ten-Ge0/3/1 represent slot positions, the card types distinguish giga and tera, and the interface numbers define accumulated interface serial numbers.
The multi-slot equipment network card detection method provided by the invention can be used for determining the lower bus number step by step recursively until the final bus is detected based on the root bus number corresponding to each expansion slot by acquiring the root bus number corresponding to each expansion slot, acquiring the hierarchical relation from the root bus to the final bus and the manufacturer number and equipment number of the network card, further determining the card type, the interface number and the affiliated expansion slot of the network card based on the hierarchical relation, the manufacturer number and the equipment number, further realizing the self-adaptive detection of the card type and the affiliated expansion slot under different card combinations of the multi-slot equipment based on the card type, the interface number and the affiliated expansion slot, eliminating the influence of the PCI bus change occupied on network interface registration, and accurately registering the network interface.
The multi-slot device network card detection device provided by the invention is described below, and the multi-slot device network card detection device described below and the multi-slot device network card detection method described above can be referred to correspondingly.
Fig. 14 is a schematic structural diagram of a network card detection device for a multi-slot device according to the present invention, as shown in fig. 14, where the device includes: a first acquisition module 1401, a second acquisition module 1402, and a determination module 1403, wherein:
A first obtaining module 1401, configured to obtain root bus numbers corresponding to a plurality of expansion slots, where the expansion slots are slots on a device motherboard based on peripheral component interface interconnection PCI;
a second obtaining module 1402, configured to recursively determine, step by step, a lower bus number for each expansion slot based on a root bus number corresponding to the expansion slot until a last-stage bus is detected, and obtain a target hierarchical relationship, a manufacturer number of a target network card, and a device number of the target network card, where the target hierarchical relationship is used to represent a hierarchical relationship from the root bus to the last-stage bus, and the target network card is a card that occupies one or more last-stage buses;
a determining module 1403, configured to determine, based on the target hierarchical relationship, the manufacturer number of the target network card, and the device number of the target network card, the card type of the target network card, the number of interfaces of the target network card, and the expansion slot to which the target network card belongs.
The multi-slot equipment network card detection device provided by the invention can be used for determining the lower bus number step by step recursively until the final bus is detected based on the root bus number corresponding to each expansion slot by acquiring the root bus number corresponding to each expansion slot, acquiring the hierarchical relation from the root bus to the final bus and the manufacturer number and equipment number of the network card, further determining the card type, the interface number and the affiliated expansion slot of the network card based on the hierarchical relation, the manufacturer number and the equipment number, further realizing the self-adaptive detection of the card type, the interface number and the affiliated expansion slot under different card combinations of the multi-slot equipment, eliminating the influence of the PCI bus change occupied on network interface registration, and accurately registering the network interface.
Fig. 15 is a schematic structural diagram of an electronic device according to the present invention, and as shown in fig. 15, the electronic device may include: a processor 1510, a communication interface (Communications Interface) 1520, a memory 1530, and a communication bus 1540, wherein the processor 1510, the communication interface 1520, and the memory 1530 communicate with each other via the communication bus 1540. The processor 1510 may invoke logic instructions in the memory 1530 to perform a multi-slot device network card probing method comprising:
acquiring root bus numbers respectively corresponding to a plurality of expansion slots, wherein the expansion slots are slots based on Peripheral Component Interface (PCI) interconnection on a device main board;
for each expansion slot, determining a lower-level bus number in a step-by-step recursion mode based on a root bus number corresponding to the expansion slot until a final-level bus is detected, and acquiring a target hierarchy relationship, a manufacturer number of a target network card and a device number of the target network card, wherein the target hierarchy relationship is used for representing the hierarchy relationship from the root bus to the final-level bus, and the target network card is a card which occupies one or more final-level buses;
and determining the type of the plug-in card of the target network card, the number of interfaces of the target network card and the expansion slot of the target network card based on the target hierarchical relationship, the manufacturer number of the target network card and the equipment number of the target network card.
Further, the logic instructions in the memory 1530 described above may be implemented in the form of software functional units and may be stored on a computer readable storage medium when sold or used as a stand alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In still another aspect, the present invention further provides a non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, is implemented to perform the method for detecting a network card of a multi-slot device provided by the above methods, the method comprising:
Acquiring root bus numbers respectively corresponding to a plurality of expansion slots, wherein the expansion slots are slots based on Peripheral Component Interface (PCI) interconnection on a device main board;
for each expansion slot, determining a lower-level bus number in a step-by-step recursion mode based on a root bus number corresponding to the expansion slot until a final-level bus is detected, and acquiring a target hierarchy relationship, a manufacturer number of a target network card and a device number of the target network card, wherein the target hierarchy relationship is used for representing the hierarchy relationship from the root bus to the final-level bus, and the target network card is a card which occupies one or more final-level buses;
and determining the type of the plug-in card of the target network card, the number of interfaces of the target network card and the expansion slot of the target network card based on the target hierarchical relationship, the manufacturer number of the target network card and the equipment number of the target network card.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. The method for detecting the network card of the multi-slot device is characterized by comprising the following steps of:
acquiring root bus numbers respectively corresponding to a plurality of expansion slots, wherein the expansion slots are slots based on Peripheral Component Interface (PCI) interconnection on a device main board;
for each expansion slot, determining a lower-level bus number in a step-by-step recursion mode based on a root bus number corresponding to the expansion slot until a final-level bus is detected, and acquiring a target hierarchy relationship, a manufacturer number of a target network card and a device number of the target network card, wherein the target hierarchy relationship is used for representing the hierarchy relationship from the root bus to the final-level bus, and the target network card is a card which occupies one or more final-level buses;
and determining the type of the plug-in card of the target network card, the number of interfaces of the target network card and the expansion slot of the target network card based on the target hierarchical relationship, the manufacturer number of the target network card and the equipment number of the target network card.
2. The method for detecting a network card of a multi-slot device according to claim 1, wherein determining the number of the lower bus step by step recursively until the last bus is detected comprises:
under the condition that the last-level bus is not recursively transmitted, determining a first PCI device path based on a first bus number of a recursion target bus, wherein the first PCI device path is used for inquiring PCI device configuration space of devices occupying the first bus number;
And determining a lower-level bus number based on the first PCI device path and a first base address offset, wherein the first base address offset is used for indicating a storage address corresponding to the lower-level bus number in the PCI device configuration space.
3. The method of claim 2, wherein determining the first PCI device path based on the first bus number of the recursively transferred target bus comprises:
determining a first domain number of a PCI domain to which the target bus belongs, a first device number of a device occupying the target bus and a first function number of a device occupying the target bus;
the first PCI device path is determined based on the first domain number, the first bus number, the first device number, and the first function number.
4. A method for detecting a network card of a multi-slot device according to any one of claims 1 to 3, wherein the step-wise recursively determining the number of the lower bus until the last bus is detected comprises:
determining a second PCI device path based on a second bus number of the last level bus under the condition of recursion to the last level bus, wherein the second PCI device path is used for inquiring PCI device configuration space of devices occupying the second bus number;
And determining the equipment number and the manufacturer number of the plug-in card occupying the final bus based on the second PCI equipment path and a second base address offset, wherein the second base address offset is used for indicating a storage address corresponding to the equipment number in the PCI equipment configuration space.
5. The method of claim 4, wherein determining a second PCI device path based on a second bus number of the last level bus comprises:
determining a second domain number of a PCI domain to which the final bus belongs, a second equipment number of equipment occupying the final bus and a second function number of equipment occupying the final bus;
and determining the second PCI device path based on the second domain number, the second bus number, the second device number and the second function number.
6. The method for detecting a network card of a multi-slot device according to claim 1, wherein the obtaining root bus numbers corresponding to the expansion slots respectively includes:
under the condition that the root bus numbers corresponding to the expansion slots are fixed, determining the root bus numbers corresponding to the expansion slots based on a first preset configuration, wherein the first preset configuration is used for representing the corresponding relation between the expansion slots and the root bus numbers.
7. The method for detecting a network card of a multi-slot device according to claim 1, wherein the obtaining root bus numbers corresponding to the expansion slots respectively includes:
under the condition that the root bus numbers corresponding to the expansion slots are not fixed, the root bus numbers corresponding to the expansion slots are determined based on the target card inserting combination and a second preset configuration, wherein the second preset configuration is used for representing the corresponding relation between the root bus numbers of the expansion slots and the various card inserting combinations.
8. The utility model provides a many slot device network card detection device which characterized in that includes:
the first acquisition module is used for acquiring root bus numbers corresponding to a plurality of expansion slots respectively, wherein the expansion slots are slots based on Peripheral Component Interface (PCI) interconnection on a device main board;
the second acquisition module is used for recursively determining lower-level bus numbers step by step until a final-level bus is detected based on the root bus numbers corresponding to the expansion slots for each expansion slot, and acquiring a target hierarchical relationship, a manufacturer number of a target network card and a device number of the target network card, wherein the target hierarchical relationship is used for representing the hierarchical relationship from the root bus to the final-level bus, and the target network card is a card plug-in card occupying one or more final-level buses;
The determining module is used for determining the card type of the target network card, the interface number of the target network card and the expansion slot to which the target network card belongs based on the target hierarchical relationship, the manufacturer number of the target network card and the equipment number of the target network card.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the multi-slot device network card probing method of any one of claims 1 to 7 when the program is executed by the processor.
10. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the multi-slot device network card probing method of any one of claims 1 to 7.
CN202310553010.7A 2023-05-17 2023-05-17 Multi-slot device network card detection method and device, electronic device and storage medium Active CN116303148B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310553010.7A CN116303148B (en) 2023-05-17 2023-05-17 Multi-slot device network card detection method and device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310553010.7A CN116303148B (en) 2023-05-17 2023-05-17 Multi-slot device network card detection method and device, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN116303148A true CN116303148A (en) 2023-06-23
CN116303148B CN116303148B (en) 2023-08-22

Family

ID=86794494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310553010.7A Active CN116303148B (en) 2023-05-17 2023-05-17 Multi-slot device network card detection method and device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN116303148B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040225772A1 (en) * 2001-01-31 2004-11-11 Efficient Networks, Inc. System and method for identifying open peripheral component interconnect (PCI) slots
CN103763129A (en) * 2013-12-31 2014-04-30 华为技术有限公司 PCIe equipment management method and device
CN104285218A (en) * 2013-12-31 2015-01-14 华为技术有限公司 Method and device for expanding PCIe bus region
CN105653481A (en) * 2014-11-14 2016-06-08 华为技术有限公司 PCIe bus-based data transmission method and device
CN106294222A (en) * 2016-08-03 2017-01-04 浪潮电子信息产业股份有限公司 A kind of method and device determining PCIE device and slot corresponding relation
CN109117326A (en) * 2018-07-12 2019-01-01 北京中科网威信息技术有限公司 The processing method and processing device that User space network interface card based on Shen prestige framework detects automatically
CN109144672A (en) * 2018-09-07 2019-01-04 郑州云海信息技术有限公司 A kind of method, system and associated component for distributing PCIe device
CN109656755A (en) * 2017-10-11 2019-04-19 阿里巴巴集团控股有限公司 The method and system of detection device state
CN112667538A (en) * 2020-12-04 2021-04-16 苏州浪潮智能科技有限公司 Method, system, equipment and medium for obtaining network card identification number
CN115114219A (en) * 2022-07-22 2022-09-27 深圳星云智联科技有限公司 PCI-E topological method, device, equipment and storage medium
CN115221092A (en) * 2022-07-22 2022-10-21 深圳星云智联科技有限公司 Method, device and equipment for determining distributable bus of PCI-E card and storage medium
CN115509978A (en) * 2022-09-28 2022-12-23 苏州浪潮智能科技有限公司 Method, device, equipment and storage medium for determining physical position of external plug-in equipment
CN115878327A (en) * 2022-12-29 2023-03-31 苏州浪潮智能科技有限公司 Bus reservation method, device, server, electronic equipment and storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040225772A1 (en) * 2001-01-31 2004-11-11 Efficient Networks, Inc. System and method for identifying open peripheral component interconnect (PCI) slots
CN103763129A (en) * 2013-12-31 2014-04-30 华为技术有限公司 PCIe equipment management method and device
CN104285218A (en) * 2013-12-31 2015-01-14 华为技术有限公司 Method and device for expanding PCIe bus region
CN105653481A (en) * 2014-11-14 2016-06-08 华为技术有限公司 PCIe bus-based data transmission method and device
CN106294222A (en) * 2016-08-03 2017-01-04 浪潮电子信息产业股份有限公司 A kind of method and device determining PCIE device and slot corresponding relation
CN109656755A (en) * 2017-10-11 2019-04-19 阿里巴巴集团控股有限公司 The method and system of detection device state
CN109117326A (en) * 2018-07-12 2019-01-01 北京中科网威信息技术有限公司 The processing method and processing device that User space network interface card based on Shen prestige framework detects automatically
CN109144672A (en) * 2018-09-07 2019-01-04 郑州云海信息技术有限公司 A kind of method, system and associated component for distributing PCIe device
CN112667538A (en) * 2020-12-04 2021-04-16 苏州浪潮智能科技有限公司 Method, system, equipment and medium for obtaining network card identification number
CN115114219A (en) * 2022-07-22 2022-09-27 深圳星云智联科技有限公司 PCI-E topological method, device, equipment and storage medium
CN115221092A (en) * 2022-07-22 2022-10-21 深圳星云智联科技有限公司 Method, device and equipment for determining distributable bus of PCI-E card and storage medium
CN115509978A (en) * 2022-09-28 2022-12-23 苏州浪潮智能科技有限公司 Method, device, equipment and storage medium for determining physical position of external plug-in equipment
CN115878327A (en) * 2022-12-29 2023-03-31 苏州浪潮智能科技有限公司 Bus reservation method, device, server, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN116303148B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
US6405145B1 (en) Instrumentation system and method which performs instrument interchangeability checking
CN105068929A (en) Test script generation method, test script generation device, testing method, testing device and testing system
US20080109780A1 (en) Method of and apparatus for optimal placement and validation of i/o blocks within an asic
CN106294040B (en) Method and device for acquiring optical module state information
US9286180B1 (en) Final result checking for system with pre-verified cores
CN110765032A (en) Method for reading and writing I2C memory based on system management bus interface
CN116256621B (en) Method and device for testing core particle, electronic equipment and storage medium
CN105446843B (en) SOC chip function test system and method
US20190094300A1 (en) Ensuring completeness of interface signal checking in functional verification
US20080183659A1 (en) Method and system for determining device criticality in a computer configuration
CN116303148B (en) Multi-slot device network card detection method and device, electronic device and storage medium
CN112256618B (en) Mapping relation determining method and device
CN112948233A (en) Interface testing method, device, terminal equipment and medium
CN111045948A (en) Method, apparatus and storage medium for checking interface signal between modules
EP3866050B1 (en) Conversion method, conversion apparatus, and conversion program
CN114077452B (en) PCIE equipment positioning method, device and related equipment
CN112567375A (en) Format verification method, information identification method, device and storage medium
CN115952132A (en) Asynchronous bridge, SOC, electronic assembly, electronic equipment and chip design method
CN115543750A (en) Method, device, equipment and medium for asset information function processing of PCIE (peripheral component interface express) equipment
KR19990023204A (en) Wiring method and system of multiple integrated circuits
CN112667538B (en) Method, system, equipment and medium for obtaining network card identification number
CN113138808A (en) Integration method, integration device, computer equipment and storage medium
US5732280A (en) Method and apparatus for dynamically assigning programmable option select identifiers
CN117076228A (en) Chip testing method and related assembly
US11010521B2 (en) Method of detecting relations between pins of circuit and computer program product thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant