Server boot method and apparatus, storage medium, and electronic apparatus
By detecting and filtering the in-place information of the server network device interface, turning off unnecessary pre-start execution environment control functions, and selecting the target network device according to the device type, solving the problem of mismatch in network card types during server startup, achieving higher compatibility and correct operating system installation.
Patent Information
- Application Number
- PCT/CN2024/122612
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-27
- Filing Date
- 2024-09-30
- Publication Date
- 2025-09-04
AI Technical Summary
The server's network port PXE function installs the operating system in the recognition order by default, which may cause the network cards of different network ports to be installed with different operating systems, and cannot be compatible with the currently needed systems, especially the compatibility issues between smart network cards and OCP network cards.
During the server startup process, the in-location information of the network device interface is detected, the pre-start execution environment control function of multiple reference network device interfaces is turned off, the target network device is filtered according to the device type, and the pre-start execution environment control function is activated to ensure the compatibility of the device version from high to low.
Improves compatibility between pre-start execution environment control functions and network devices during server startup, ensuring that the installed operating system meets the current needs of network devices.
Smart Images

Figure CN2024122612_04092025_PF_FP_ABST
Abstract
Description
Server startup method and device, storage medium and electronic device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to a Chinese patent application filed with the Patent Office of China on February 27, 2024, with application number 202410216549.8 and entitled “Server startup method and device, storage medium and electronic device”, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The embodiments of the present application relate to the field of computers, and in particular to a server startup method and device, a storage medium, and an electronic device. Background Art
[0004] In the related art, it is usually possible to install an operating system on a server by launching the PXE (Preboot eXecution Environment) function through a network port. However, a server typically includes multiple network ports, and multiple network cards may be connected to multiple network ports at the same time. Currently, the server's network port PXE function defaults to launching in the order identified during startup. Regardless of the type of network card currently connected to the network port, the first recognized network card will be used to execute the PXE function to install the operating system on the server.
[0005] In this case, because different network cards using PXE may install different operating systems on the server, and the currently connected network port is not the first network port or a specific network port such as the one of a smart network card, the first network card identified using PXE may install an operating system that is not the currently required system, or the location of the pre-installed system may not be the currently expected location, making it incompatible with other network cards. For example, if the first network card identified is an OCP (Open Compute Project) network card, the system installed with PXE enabled on the OCP network card will not support the smart network card used on the server at the same time.
[0006] Summary of the Invention
[0007] According to some embodiments of the present application, a server startup method is provided. The server startup method is applied to a basic input and output system installed in the server. A network device interface group is deployed on the server. The network device interface in the network device interface group is used to connect to a network device. The network device has a pre-boot execution environment control function. The method includes:
[0008] In response to determining that the execution reaches the peripheral component interconnection standard enumeration phase, detecting presence information of the network device interfaces in the network device interface group, wherein the presence information is used to indicate whether the corresponding network device interface is connected to a network device;
[0009] disabling a pre-boot execution environment control function of a corresponding reference network device connected to a plurality of reference network device interfaces in the network device interface group, wherein the reference network device interface is a network device interface whose in-place information is used to indicate that the reference network device is connected;
[0010] Filtering a target network device from the multiple reference network devices based on reference device types of the reference network devices correspondingly connected to the multiple reference network device interfaces, wherein the target network device is a network device having a target startup priority corresponding to the target device type being the highest among the multiple reference network devices, the device type of the network device being used to indicate a device version of the network device, the pre-boot execution environment control functions of the device versions being downwardly compatible, and each device type being set to a corresponding startup priority that is proportional to the indicated device version;
[0011] Enable the pre-boot execution environment control function of the target network device.
[0012] In some embodiments, in response to determining that the network device is a network card device, screening the target network device from the plurality of reference network devices according to the reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces includes:
[0013] Identifying a device type of each reference network device among the multiple reference network devices until all reference network devices among the multiple reference network devices are identified, thereby obtaining multiple reference device types;
[0014] In response to determining that the multiple reference device types include a smart network card type, determining a network card device of the smart network card type among the multiple reference device types as the target network device with the highest startup priority;
[0015] In response to determining that the plurality of reference device types do not include a Smart NIC type but include an Open Compute Project NIC type, determining a NIC device of the Open Compute Project NIC type among the plurality of reference device types as a target network device with a highest startup priority;
[0016] In response to determining that the plurality of reference device types do not include a SmartNIC type and an Open Compute Project NIC type but include a Peripheral Component Interconnect standard NIC type, a NIC device of the Peripheral Component Interconnect standard NIC type among the plurality of reference device types is determined as a target network device with the highest startup priority.
[0017] In some embodiments, in response to determining that the network device is a network card device, screening the target network device from the plurality of reference network devices according to the reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces includes:
[0018] Extracting a candidate network device to be currently identified from a plurality of reference network devices;
[0019] Identifying a device type of a candidate network device to obtain a candidate device type, wherein the reference device type includes the candidate device type;
[0020] Determine whether the candidate device type is a smart network card type;
[0021] In response to determining that the candidate device type is a smart network card type, ending the identification in advance and determining the candidate network device as the target network device with the highest startup priority;
[0022] In response to determining that the candidate device type is not a smart network card type, continuously extracting a next reference network device that is not currently identified from the multiple reference network devices as a candidate network device to be currently identified, until no more unidentified reference network devices exist in the multiple reference network devices, and then ending identification to obtain multiple candidate device types;
[0023] In response to determining that the plurality of candidate device types include an Open Compute Project network card type, determining a network card device of the Open Compute Project network card type among the plurality of reference network devices as a target network device with a highest startup priority;
[0024] In response to determining that the plurality of candidate device types do not include an Open Compute Project network card type but include a Peripheral Component Interconnect standard network card type, a network card device of the Peripheral Component Interconnect standard network card type among the plurality of reference network devices is determined as a target network device with the highest startup priority.
[0025] In some embodiments, disabling a pre-boot execution environment control function of a reference network device connected to a plurality of reference network device interfaces in a network device interface group includes:
[0026] The network port parameters corresponding to the multiple reference network device interfaces are updated to first network port parameters, wherein the first network port parameters are used to instruct the corresponding reference network device interfaces to turn off the pre-boot execution environment control function of the connected reference network device.
[0027] In some embodiments, starting a pre-boot execution environment control function of a target network device includes:
[0028] Locating a target network device corresponding to a target network device from multiple reference network device interfaces;
[0029] The network port parameters of the target network device interface are updated to second network port parameters, wherein the second network port parameters are used to instruct the target network device interface to start a pre-boot execution environment control function of the target network device to be connected.
[0030] In some embodiments, after disabling the pre-boot execution environment control function of the reference network devices corresponding to the plurality of reference network device interfaces in the network device interface group, the method further includes:
[0031] A control option is created for each of the multiple reference network device interfaces on the basic input / output system interface of the basic input / output system, wherein each control option is used to control the corresponding reference network device interface to enable or disable a pre-boot execution environment control function of the connected reference network device.
[0032] In some embodiments, after creating a control option for each of the plurality of reference network device interfaces on the BIOS interface of the BIOS, the method further comprises:
[0033] Check whether any control options have been adjusted;
[0034] In response to detecting that an adjustment operation has been performed on a control option, enabling a pre-boot execution environment control function of a reference network device corresponding to the control option on which the adjustment operation has been performed, and controlling other currently enabled pre-boot execution environment control functions in the server to be disabled;
[0035] In some embodiments, after screening the target network device from the plurality of reference network devices based on the reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces, the method further includes:
[0036] Check whether any control options have been adjusted;
[0037] In response to detecting that an adjustment operation has been performed on a control option, obtaining a candidate network device interface corresponding to the control option on which the adjustment operation has been performed from a plurality of reference network device interfaces, and generating a target confirmation instruction, wherein the target confirmation instruction is used to request the target account to determine a network device that is allowed to start the pre-boot execution environment control function from among the candidate network devices and the target network device connected to the candidate network device interface;
[0038] Receive target confirmation information returned by the target account, and control the corresponding network device to start the pre-boot execution environment control function according to the target confirmation information, wherein the target confirmation information is used to indicate the network device that is allowed to start the pre-boot execution environment control function.
[0039] In some embodiments, screening a target network device from a plurality of reference network devices according to reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces includes:
[0040] Detecting device types of corresponding reference network devices connected to multiple reference network device interfaces to obtain reference device types;
[0041] Filter target network devices from multiple reference network devices based on detected reference device types.
[0042] In some embodiments, detecting the device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces to obtain the reference device types includes:
[0043] Reading device identification information from reference network devices correspondingly connected to the plurality of reference network device interfaces, wherein the device identification information is used to indicate a device type of the corresponding reference network device;
[0044] Parse the device identification message to obtain a reference device type of the reference network device.
[0045] In some embodiments, detecting the device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces to obtain the reference device types further includes:
[0046] Sending a target request instruction to the reference network devices correspondingly connected to the plurality of reference network device interfaces, wherein the target request instruction is used to request the reference network devices correspondingly connected to the plurality of reference network device interfaces to send a device identification message to the basic input and output system, wherein the device identification message is used to indicate the device type of the corresponding reference network device;
[0047] Device identification messages sent by reference network devices corresponding to the multiple reference network device interfaces are received, and the device identification messages are parsed to obtain reference device types of the reference network devices.
[0048] In some embodiments, detecting the device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces to obtain the reference device types includes:
[0049] According to the target detection sorting, the device types of the reference network devices corresponding to the connection of multiple reference network device interfaces are detected in sequence to obtain the reference device types, wherein the target detection sorting records the detection order of the multiple reference network device interfaces. In the target detection sorting, the reference network device interface at the front has a higher reference device version of the network device allowed to be connected, and the reference device version is the highest device version of the network device allowed to be connected by the corresponding reference network device interface.
[0050] In some embodiments, in response to determining that the network device is a network card device, before sequentially detecting the device types of the reference network devices corresponding to the plurality of reference network device interfaces according to the target detection order and obtaining the reference device type, the method further includes:
[0051] In response to determining that the plurality of reference network device interfaces include a first network device interface, a second network device interface, and a third network device interface, constructing a first detection ranking in the order of the first network device interface, the second network device interface, and the third network device interface, wherein the target detection ranking includes the first detection ranking;
[0052] In response to determining that the plurality of reference network device interfaces include the first network device interface and the third network device interface, constructing a second detection ranking in the order of the first network device interface and the third network device interface, wherein the target detection ranking includes the second detection ranking;
[0053] In response to determining that the plurality of reference network device interfaces include a second network device interface and a third network device interface, constructing a third detection ranking in the order of the second network device interface and the third network device interface, wherein the target detection ranking includes the third detection ranking;
[0054] Among them, the network device with the highest device version allowed to be connected by the first network device interface is a smart network card type network card device, the network device with the highest device version allowed to be connected by the second network device interface is a network card device of the open compute project network card type, and the network device with the highest device version allowed to be connected by the third network device interface is a network card device of the peripheral component interconnection standard network card type. The device version of the network card device indicated by the smart network card type is higher than the device version of the network card device indicated by the open compute project network card type, and the device version of the network card device indicated by the open compute project network card type is higher than the device version of the network card device indicated by the peripheral component interconnection standard network card type.
[0055] In some embodiments, the step of updating the network port parameters corresponding to the plurality of reference network device interfaces to the first network port parameters includes:
[0056] Sending a first update instruction carrying first network port parameters to multiple reference network device interfaces through a basic input and output system; and
[0057] In response to the first update instruction, the network port parameters corresponding to the plurality of reference network device interfaces are updated to the first network port parameters.
[0058] In some embodiments, the step of reading device identification information from the reference network devices correspondingly connected to the plurality of reference network device interfaces includes:
[0059] The device identification information is read from the reference network devices correspondingly connected to the plurality of reference network device interfaces through the basic input and output system.
[0060] In some embodiments, in response to determining that the network device is a network card device, screening the target network device from the plurality of reference network devices according to the reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces includes:
[0061] Reference device types of multiple reference network devices are identified to obtain all reference device types, and the target network device is determined from all the reference device types.
[0062] According to other embodiments of the present application, a server startup device is provided, which is applied to a basic input and output system installed in the server, wherein a network device interface group is deployed on the server, and the network device interface in the network device interface group is used to connect to a network device, and the network device has a pre-boot execution environment control function, and the device includes:
[0063] a first detection module, configured to detect presence information of network device interfaces in the network device interface group in response to determining that the peripheral component interconnection standard enumeration phase has been reached, wherein the presence information is used to indicate whether the corresponding network device interface is connected to a network device;
[0064] A shut-down module, configured to shut down a pre-boot execution environment control function of a reference network device connected to a plurality of reference network device interfaces in the network device interface group, wherein the reference network device interface is a network device interface whose in-place information is used to indicate that the reference network device is connected;
[0065] a screening module, configured to screen a target network device from a plurality of reference network devices based on reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces, wherein the target network device is a network device having a target boot priority corresponding to the target device type thereof being the highest among the plurality of reference network devices, the device type of the network device being used to indicate a device version of the network device, the pre-boot execution environment control functions of the device versions being downwardly compatible, and each device type being set to a corresponding boot priority proportional to the indicated device version;
[0066] The startup module is used to start the pre-boot execution environment control function of the target network device.
[0067] According to some further embodiments of the present application, a computer program product is provided, which stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the steps in any of the above method embodiments are implemented.
[0068] According to some further embodiments of the present application, a non-transitory computer-readable storage medium is provided, which stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the steps in any of the above method embodiments are implemented.
[0069] According to some further embodiments of the present application, an electronic device is also provided, comprising: one or more processors; and a memory associated with the one or more processors, the memory being used to store computer-readable instructions, which, when read and executed by the one or more processors, implement the steps in any of the above method embodiments.
[0070] In an embodiment of the present application, a server startup method is proposed, which is applied to a basic input and output system installed in the server. A network device interface group is deployed on the server. The network device interfaces in the network device interface group are used to connect to network devices. The network devices have a pre-startup execution environment control function. When the server startup process executes to the peripheral component interconnection standard enumeration stage, the in-place information of the network device interfaces in the network device interface group is detected to determine whether the corresponding network device interface is connected to the network device, and the pre-startup execution environment control functions of the corresponding reference network devices connected to multiple reference network device interfaces in the network device interface group are turned off. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] FIG1 is a hardware structure block diagram of a server device of a server startup method according to an embodiment of the present application;
[0072] FIG2 is a flow chart of a method for starting a server according to an embodiment of the present application;
[0073] FIG3 is a schematic diagram of a server according to an embodiment of the present application;
[0074] FIG4 is a schematic diagram of a server startup process according to an embodiment of the present application;
[0075] FIG5 is a swim lane diagram of a server startup process according to an embodiment of the present application;
[0076] FIG6 is a structural block diagram of a server startup device according to an embodiment of the present application;
[0077] FIG7 is a block diagram of a computer program product according to an embodiment of the present application;
[0078] FIG8 is a block diagram of a non-transitory computer storage medium according to an embodiment of the present application;
[0079] FIG9 is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0080] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0081] It should be noted that the terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0082] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking operation on a server device as an example, FIG1 is a hardware structure block diagram of a server device of a method for starting a server in an embodiment of the present application. As shown in FIG1 , the server device may include one or more (only one is shown in FIG1 ) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU (Microcontroller Unit) or a programmable logic device FPGA (Field Programmable Gate Array)) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that the structure shown in FIG1 is only for illustration, and it does not limit the structure of the above-mentioned server device. For example, the server device may also include more or fewer components than those shown in FIG1 , or have a configuration different from that shown in FIG1 .
[0083] The memory 104 can be used to store computer-readable instructions, for example, software programs and modules of application software, such as computer-readable instructions corresponding to the startup method of the server in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer-readable instructions stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory, and may also include a non-transitory memory, such as one or more magnetic storage devices, flash memory, or other non-transitory solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0084] The transmission device 106 is used to receive or send data via a network. Examples of such networks may include wireless networks provided by a communication provider of a server device. In some examples, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In some examples, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0085] In this embodiment, a method for starting a server is provided. FIG2 is a flow chart of a method for starting a server according to an embodiment of the present application. As shown in FIG2 , the method for starting a server is applied to a basic input and output system installed in the server. A network device interface group is deployed on the server. The network device interface in the network device interface group is used to connect to a network device. The network device has a pre-boot execution environment control function. The process of the method includes the following steps:
[0086] Step S12, in response to determining that the peripheral component interconnection standard enumeration phase has been reached, detecting presence information of the network device interfaces in the network device interface group, wherein the presence information is used to indicate whether the corresponding network device interface is connected to a network device;
[0087] In some embodiments, FIG3 is a schematic diagram of a server according to an embodiment of the present application. As shown in FIG3 , the entire server includes a server motherboard and a connected network card, wherein the network card is connected to an expansion slot (Slot0 to Slot3, for example only, the number of expansion slots and the connected network card can be adjusted according to actual needs), the expansion slot is connected to CPU (Central Processing Unit) 0 via a PCI (Peripheral Component Interconnect) bus, CPU0 is connected to BIOS via CPU1, CPU0 is connected to CPU1 via a UPI (Ultra Path Interconnect) bus, and CPU1 is connected to BIOS (Basic Input Output System) via an SPI / LPI (Serial Peripheral Interface / Low Power Interface) bus. The server startup method is applied to the basic input and output system installed in the server, and the basic input and output system can be, but is not limited to, the BIOS in FIG3 .
[0088] In some embodiments, the network device interface may be, but is not limited to, a network port, and the network device may be, but is not limited to, a network card. As shown in FIG3 , when the network device is a network card, the network device may be, but is not limited to, a Smart NIC, an OCP NIC (i.e., an Open Compute Project NIC), or a PCI standard NIC (i.e., a Peripheral Component Interconnect NIC). Smart NICs, Open Compute Project NICs, and Peripheral Component Interconnect NICs all have a pre-boot execution environment control function.
[0089] In some embodiments, the pre-boot execution environment control function may be, but is not limited to, a PXE (Preboot eXecution Environment) function.
[0090] Step S14, disabling a pre-boot execution environment control function of a reference network device corresponding to a plurality of reference network device interfaces in the network device interface group, wherein the reference network device interface is a network device interface for indicating a network device interface connected to the reference network device;
[0091] In some embodiments, taking Figure 3 as an example, a smart network card, an OCP network card, and a PCI network card are connected to the network device interface group of the server. The smart network card, the OCP network card, and the PCI network card are all reference network devices, and the pre-boot execution environment control function of the smart network card, the OCP network card, and the PCI network card is turned off. This application uses the network devices deployed on the server as smart network cards, OCP network cards, and PCI network cards as examples to illustrate the server startup method. The network devices can also be host bus adapter HBA (Host Bus Adapter) network cards and host channel adapter HCA (Host Channel Adaptor) network cards. Because each type of network card has different functions and speeds, different network cards configured on the server have different business requirements. For example, smart network cards focus on virtual cloud services, OCP network cards focus on network data exchange, and PCI interface network cards focus on traditional information transmission. All physical network cards perform network information transmission, but in a server configured with a smart network card, it is necessary to use the PXE function on the smart network card to start and install the cloud system. If the network without a smart network card uses the PXE function to start and install the system, the system will be installed to the local storage hard disk and the cloud system cannot be started. The server startup method proposed in this application can overcome the problem of low compatibility between the pre-boot execution environment control function enabled during the server startup process and the network equipment in the server.
[0092] Step S16: Filtering a target network device from the multiple reference network devices based on the reference device types of the reference network devices correspondingly connected to the multiple reference network device interfaces, wherein the target network device is a network device having a target startup priority corresponding to the target device type thereof being the highest among the multiple reference network devices, the device type of the network device being used to indicate a device version of the network device, and the pre-boot execution environment control functions of the device versions being downwardly compatible, and each device type being set to a corresponding startup priority proportional to the indicated device version;
[0093] In some embodiments, the device type of a network device is used to indicate the device version of the network device. The pre-boot execution environment control function of the device versions from high to low is backward compatible. Taking the smart network card, OCP network card and PCI network card as examples, the device versions from high to low are: smart network card, OCP network card and PCI network card. The pre-boot execution environment control function of the smart network card is compatible with the normal operation of the smart network card, OCP network card and PCI network card; the pre-boot execution environment control function of the OCP network card is compatible with the normal operation of the OCP network card and PCI network card, but not compatible with the normal operation of the smart network card; the pre-boot execution environment control function of the PCI network card is only compatible with the normal operation of the PCI network card, but not compatible with the normal operation of the smart network card and OCP network card. Each device type is set to a corresponding boot priority that is proportional to the indicated device version. The boot priority from high to low is: smart network card, OCP network card and PCI network card.
[0094] In some embodiments, the pre-boot execution environment control function of the smart network card can be compatible with the normal operation of the smart network card, OCP network card and PCI network card. It can be understood that when the smart network card turns on the pre-boot execution environment control function, the operating system installed in the server can support the normal operation of the smart network card, OCP network card and PCI network card.
[0095] The pre-boot execution environment control function of the OCP network card is compatible with the normal operation of the OCP network card and the PCI network card, but is not compatible with the normal operation of the Smart NIC. This means that when the pre-boot execution environment control function is enabled on the OCP network card, the operating system installed on the server cannot support the normal operation of the Smart NIC, but can support the normal operation of the OCP network card and the PCI network card.
[0096] The pre-boot execution environment control function of the PCI network card is only compatible with the normal operation of the PCI network card, and is not compatible with the normal operation of the Smart NIC and OCP network card. It can be understood that when the pre-boot execution environment control function of the PCI network card is enabled, the operating system installed in the server cannot support the normal operation of the Smart NIC and OCP network card, but can support the normal operation of the PCI network card.
[0097] It is worth noting that when the pre-boot execution environment control function is enabled on the Smart NIC, the operating system installed on the server is the cloud system, which is installed in the Smart NIC. When the pre-boot execution environment control function is enabled on the OCP NIC and PCI NIC, the operating system installed on the server is the local system, which is installed on the local storage hard disk.
[0098] Step S18: starting the pre-boot execution environment control function of the target network device.
[0099] In an embodiment of the present application, a server startup method is proposed, which is applied to a basic input and output system installed in the server, wherein a network device interface group is deployed on the server, and the network device interfaces in the network device interface group are used to connect to network devices, and the network devices have a pre-start execution environment control function. In response to determining that the startup process of the server has executed to the peripheral component interconnection standard enumeration stage, the presence information of the network device interfaces in the network device interface group is detected to determine whether the corresponding network device interface is connected to the network device, and the pre-start execution environment control functions of the corresponding reference network devices on multiple reference network device interfaces in the network device interface group are turned off. The presence information of the reference network device interface is used to indicate the network device interface that is connected to the reference network device, thereby avoiding the situation similar to the related art in which the reference network device interface is directly started upon detecting that the network device interface is connected to the reference network device. The pre-start execution environment control function of the network device is used to prevent the low compatibility between the pre-start execution environment control function and the network device in the server. Furthermore, according to the reference device type of the reference network device correspondingly connected to the multiple reference network device interfaces, the target network device is screened from the multiple reference network devices, wherein the target network device is the network device with the highest target startup priority corresponding to the target device type among the multiple reference network devices. The device type of the network device is used to indicate the device version of the network device. The pre-start execution environment control function of the device version from high to low is downward compatible. Each device type is set to a corresponding startup priority proportional to the indicated device version; therefore, starting the pre-start execution environment control function of the target network device can ensure that the started pre-start execution environment control function is compatible with the current network device of the server. The above technical solution solves the problem of low compatibility between the pre-start execution environment control function turned on by the server during the startup process and the network device in the server in the related technology, and achieves the technical effect of improving the compatibility between the pre-start execution environment control function turned on by the server during the startup process and the network device in the server.
[0100] In some embodiments, in response to determining that the network device is a network card device, screening the target network device from the plurality of reference network devices according to the reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces includes:
[0101] S21, identifying a device type of each reference network device among the multiple reference network devices until all reference network devices among the multiple reference network devices are identified, thereby obtaining multiple reference device types;
[0102] S22, in response to determining that the multiple reference device types include a Smart NIC type, determining a Smart NIC type network card device among the multiple reference device types as a target network device with the highest startup priority;
[0103] S23, in response to determining that the plurality of reference device types do not include a Smart NIC type but include an Open Compute Project NIC type, determining a NIC device of the Open Compute Project NIC type among the plurality of reference device types as a target network device with the highest startup priority;
[0104] S24, in response to determining that the multiple reference device types do not include the Smart NIC type and the Open Compute Project NIC type, but include the Peripheral Component Interconnect Standard NIC type, determine the NIC device of the Peripheral Component Interconnect Standard NIC type among the multiple reference device types as the target network device with the highest startup priority.
[0105] In some embodiments, take the following scenario as an example: multiple reference network device interfaces include: interface 1, interface 2, interface 3, interface 4, interface 5, and interface 6, wherein reference network devices: device 1, device 2, device 3, device 4, device 5, and device 6 are connected respectively;
[0106] Identifying the device type of each reference network device in the plurality of reference network devices until the reference network device in the plurality of reference network devices is identified, thereby obtaining a plurality of reference device types, i.e., identifying the device types of device 1, device 2, device 3, device 4, device 5, and device 6 until the reference network devices in device 1, device 2, device 3, device 4, device 5, and device 6 are identified, thereby obtaining six reference device types;
[0107] In response to determining that the six reference device types include a Smart NIC type, for example, device 3 is a Smart NIC, the Smart NIC is determined as the target network device with the highest startup priority, wherein, in response to determining that there are multiple Smart NICs, the first identified Smart NIC can be used as the target network device, or a Smart NIC is randomly selected from the multiple Smart NICs as the target network device; in response to determining that the six reference device types do not include a Smart NIC type but include an Open Compute Project NIC type, for example, device 1 is an Open Compute Project NIC, the Open Compute Project NIC is determined as the target network device with the highest startup priority, wherein, in response to determining that there are multiple Open Compute Project NICs, the first identified Open Compute Project NIC can be used as the target network device. The method further comprises: selecting a Smart NIC type and an Open Compute Project NIC as the target network device, or randomly selecting an Open Compute Project NIC from multiple Open Compute Project NICs as the target network device; in response to determining that the six reference device types do not include the Smart NIC type and the Open Compute Project NIC type, but include the Peripheral Component Interconnect Standard NIC type, for example, device 6 is a Peripheral Component Interconnect Standard NIC, determining the Peripheral Component Interconnect Standard NIC as the target network device with the highest startup priority, wherein, in response to determining that there are multiple Peripheral Component Interconnect Standard NICs, the first identified Peripheral Component Interconnect Standard NIC can be used as the target network device, or randomly selecting a Peripheral Component Interconnect Standard NIC from the multiple Peripheral Component Interconnect Standard NICs as the target network device.
[0108] In some embodiments, in response to determining that the network device is a network card device, screening the target network device from the plurality of reference network devices according to the reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces further includes:
[0109] S31, extracting a candidate network device to be identified from multiple reference network devices;
[0110] S32, identifying the device type of the candidate network device to obtain a candidate device type, wherein the reference device type includes the candidate device type;
[0111] S33, determining whether the candidate device type is a smart network card type;
[0112] S34, in response to determining that the candidate device type is a smart network card type, ending the identification in advance, and determining the candidate network device as the target network device with the highest startup priority;
[0113] S35, in response to determining that the candidate device type is not a Smart NIC type, continue extracting a next reference network device that is not currently identified from the multiple reference network devices as a candidate network device to be identified, until no more unidentified reference network devices exist in the multiple reference network devices, and then terminate identification to obtain multiple candidate device types;
[0114] S36 , in response to determining that the plurality of candidate device types include an Open Compute Project network card type, determining a network card device of the Open Compute Project network card type among the plurality of reference network devices as a target network device with the highest startup priority;
[0115] S37 , in response to determining that the plurality of candidate device types do not include the Open Compute Project network card type but include the Peripheral Component Interconnect standard network card type, determine a network card device of the Peripheral Component Interconnect standard network card type among the plurality of reference network devices as the target network device with the highest startup priority.
[0116] In some embodiments, different from the method in S21 to S24 in which the reference device type of the reference network device is first identified and then the target network device is filtered out according to the reference device type, S31 to S37 propose another method, in which the type of one reference network device (i.e., the candidate network device) among multiple reference network devices is detected each time, and whether it is a smart network card type is immediately determined after the detection. In response to determining that the type is a smart network card type, the reference network device currently being detected as a smart network card type is directly determined as the target network device. In response to determining that the smart network card type does not exist after multiple reference network devices are detected, the target network device is filtered out according to the reference device type.
[0117] In some embodiments, disabling the pre-boot execution environment control function of the reference network devices connected to the plurality of reference network device interfaces in the network device interface group further includes:
[0118] S41 : Update network port parameters corresponding to a plurality of reference network device interfaces to first network port parameters, wherein the first network port parameters are used to instruct the corresponding reference network device interfaces to disable a pre-boot execution environment control function of the connected reference network device.
[0119] In some embodiments, the method of updating the network port parameters corresponding to the multiple reference network device interfaces to the first network port parameters may be, but is not limited to, sending a first update instruction carrying the first network port parameters to the corresponding reference network device interfaces via BIOS.
[0120] In some embodiments, starting the pre-boot execution environment control function of the target network device further includes:
[0121] S51, locating a target network device corresponding to a target network device from a plurality of reference network device interfaces;
[0122] S52: Update the network port parameters of the target network device interface to second network port parameters, wherein the second network port parameters are used to instruct the target network device interface to start a pre-boot execution environment control function of the target network device to which it is connected.
[0123] In some embodiments, updating the network port parameters of the target network device interface to the second network port parameters may be, but is not limited to, sending a second update instruction carrying the second network port parameters to the corresponding target network device interface via BIOS.
[0124] In some embodiments, after disabling the pre-boot execution environment control function of the reference network devices corresponding to the plurality of reference network device interfaces in the network device interface group, the method further includes:
[0125] S61, creating a control option for each of the multiple reference network device interfaces on the basic input / output system interface of the basic input / output system, wherein each control option is used to control the corresponding reference network device interface to enable or disable a pre-boot execution environment control function of the connected reference network device.
[0126] In some embodiments, taking the following scenario as an example: multiple reference network device interfaces include: interface 1, interface 2, interface 3, interface 4, interface 5 and interface 6, wherein the reference network devices are connected respectively: device 1, device 2, device 3, device 4, device 5 and device 6; then control options can be created for each of interface 1, interface 2, interface 3, interface 4, interface 5 and interface 6 on the basic input / output system interface for manual adjustment and control.
[0127] In some embodiments, after screening the target network device from the plurality of reference network devices based on the reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces, the method further includes:
[0128] S71, detecting whether an adjustment operation has been performed on a control option;
[0129] S72, in response to detecting that an adjustment operation has been performed on a control option, the pre-boot execution environment control function of the reference network device corresponding to the control option on which the adjustment operation has been performed is turned on, and other currently turned-on pre-boot execution environment control functions in the server are controlled to be turned off.
[0130] In some embodiments, taking the following scenario as an example: multiple reference network device interfaces include: interface 1, interface 2, interface 3, interface 4, interface 5, and interface 6, wherein the reference network devices: device 1, device 2, device 3, device 4, device 5, and device 6 are connected respectively; and the target network device is device 1. In response to determining that an adjustment operation has been performed on a control option corresponding to interface 2, a pre-boot execution environment control function of device 2 connected to interface 2 is enabled, and other currently enabled pre-boot execution environment control functions in the server (such as the pre-boot execution environment control function of device 1) are controlled to be disabled.
[0131] In some embodiments, after screening the target network device from the plurality of reference network devices according to the reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces, the method further includes:
[0132] S81, detecting whether an adjustment operation has been performed on a control option;
[0133] S82, in response to detecting that an adjustment operation has been performed on a control option, obtaining a candidate network device interface corresponding to the control option on which the adjustment operation has been performed from a plurality of reference network device interfaces, and generating a target confirmation instruction, wherein the target confirmation instruction is used to request the target account to determine a network device that is allowed to start the pre-boot execution environment control function from among the candidate network devices and the target network device connected to the candidate network device interface;
[0134] S83, receiving target confirmation information returned by the target account, and controlling the corresponding network device to start the pre-boot execution environment control function according to the target confirmation information, wherein the target confirmation information is used to indicate the network device that is allowed to start the pre-boot execution environment control function.
[0135] In some embodiments, the following scenario is taken as an example: multiple reference network device interfaces include: interface 1, interface 2, interface 3, interface 4, interface 5, and interface 6, wherein the reference network devices: device 1, device 2, device 3, device 4, device 5, and device 6 are connected respectively; and the target network device is device 1. In response to determining that the control option corresponding to interface 2 has been adjusted, interface 2 is determined as a candidate network device interface, and a target confirmation instruction is generated, wherein the target confirmation instruction is used to request the target account to determine a network device that allows the pre-boot execution environment control function to be activated from device 2 and device 1 connected to interface 2; in response to determining that the target confirmation information returned by the target account is used to indicate that device 2 allows the pre-boot execution environment control function to be activated, the pre-boot execution environment control function of device 2 connected to interface 2 is activated, and the pre-boot execution environment control function of device 1 is controlled to be deactivated.
[0136] In some embodiments, screening a target network device from a plurality of reference network devices based on reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces further includes:
[0137] S91, detecting device types of corresponding reference network devices connected to multiple reference network device interfaces to obtain reference device types;
[0138] S92: Filter a target network device from a plurality of reference network devices according to the detected reference device type.
[0139] In some embodiments, detecting the device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces to obtain the reference device types further includes:
[0140] S101, reading device identification information from reference network devices correspondingly connected to multiple reference network device interfaces, wherein the device identification information is used to indicate a device type of the corresponding reference network device;
[0141] S102: Parse the device identification message to obtain a reference device type of the reference network device.
[0142] In some embodiments, one way to detect the device type of the reference network device is to have the BIOS directly and actively read a device identification message indicating the device type of the corresponding reference network device from the reference network device.
[0143] In some embodiments, detecting the device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces to obtain the reference device types further includes:
[0144] S111, sending a target request instruction to the reference network devices correspondingly connected to the multiple reference network device interfaces, wherein the target request instruction is used to request the reference network devices correspondingly connected to the multiple reference network device interfaces to send a device identification message to the basic input and output system, wherein the device identification message is used to indicate the device type of the corresponding reference network device;
[0145] S112: Receive device identification messages sent by reference network devices corresponding to the multiple reference network device interfaces, and parse the device identification messages to obtain reference device types of the reference network devices.
[0146] In some embodiments, another way to detect the device type of the reference network device is to send a target request instruction for requesting a device identification message to the reference network device through the BIOS, and receive a device identification message indicating the device type of the corresponding reference network device.
[0147] After receiving the device identification message, the BIOS can determine the reference device type corresponding to the currently read device identification message based on the corresponding device identification message and device type, or can identify specific fields in the device identification message to determine the reference device type.
[0148] In some embodiments, detecting the device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces to obtain the reference device types further includes:
[0149] S121, detecting the device types of the reference network devices corresponding to the connection of the multiple reference network device interfaces in sequence according to the target detection sorting to obtain the reference device types, wherein the target detection sorting records the detection order of the multiple reference network device interfaces. In the target detection sorting, the reference network device interface at the front has a higher reference device version of the network device allowed to be connected, and the reference device version is the highest device version of the network device allowed to be connected by the corresponding reference network device interface.
[0150] In some embodiments, taking the following scenario as an example: multiple reference network device interfaces include: interface 1, interface 2, interface 3, interface 4, interface 5, and interface 6, wherein the reference network devices: device 1, device 2, device 3, device 4, device 5, and device 6 are connected, respectively. The device types of the corresponding reference network devices connected to the multiple reference network device interfaces can then be detected in sequence according to the target detection order to obtain the reference device type. The target detection order can be preset, based on the principle that the earlier the reference network device interface, the higher the reference device version allowed to connect to the network device. For example, the target detection order can be: interface 3, interface 4, interface 1, interface 2, interface 5, and interface 6. The device types of the reference network devices connected to interface 3, interface 4, interface 1, interface 2, interface 5, and interface 6 are then detected in sequence.
[0151] In some embodiments, in response to determining that the network device is a network card device, before sequentially detecting the device types of the reference network devices corresponding to the plurality of reference network device interfaces according to the target detection order and obtaining the reference device type, the method further includes:
[0152] S131, in response to determining that the plurality of reference network device interfaces include a first network device interface, a second network device interface, and a third network device interface, constructing a first detection ranking in the order of the first network device interface, the second network device interface, and the third network device interface, wherein the target detection ranking includes the first detection ranking;
[0153] S132, in response to determining that the plurality of reference network device interfaces include the first network device interface and the third network device interface, constructing a second detection ranking in the order of the first network device interface and the third network device interface, wherein the target detection ranking includes the second detection ranking;
[0154] S133, in response to determining that the plurality of reference network device interfaces include the second network device interface and the third network device interface, constructing a third detection ranking in the order of the second network device interface and the third network device interface, wherein the target detection ranking includes the third detection ranking;
[0155] Among them, the network device with the highest device version allowed to be connected by the first network device interface is a smart network card type network card device, the network device with the highest device version allowed to be connected by the second network device interface is a network card device of the open compute project network card type, and the network device with the highest device version allowed to be connected by the third network device interface is a network card device of the peripheral component interconnection standard network card type. The device version of the network card device indicated by the smart network card type is higher than the device version of the network card device indicated by the open compute project network card type, and the device version of the network card device indicated by the open compute project network card type is higher than the device version of the network card device indicated by the peripheral component interconnection standard network card type.
[0156] In some embodiments, the network device with the highest device version allowed to be connected by the first network device interface is a smart network card type network card device, such as interface 3 and interface 4, where interface 3 / interface 4 can connect to a smart network card, an OCP network card, and a PCI network card, and the device versions are from high to low: smart network card, OCP network card, PCI network card; the network device with the highest device version allowed to be connected by the second network device interface is a network card device with an open computing project network card type, such as interface 1 and interface 2, where interface 1 / interface 2 can connect to an OCP network card and a PCI network card; the network device with the highest device version allowed to be connected by the third network device interface is a peripheral component interconnection standard network card type network card device, such as interface 5 and interface 6, where interface 5 / interface 6 can only connect to a PCI network card.
[0157] In some embodiments, in order to better understand the process of starting the above-mentioned server, the startup process of the above-mentioned server is described below in combination with the embodiments, but it is not used to limit the technical solutions of the embodiments of the present application.
[0158] In this embodiment, a method for starting a server is provided. FIG4 is a schematic diagram of a server startup process according to an embodiment of the present application. As shown in FIG4 , the method mainly includes the following steps:
[0159] Step S401: In response to determining that the server is started, the BIOS identifies and determines the type of network card in the PCI enumeration phase, and sets the presence information of the Smart NIC, OCP NIC, and PCI interface NIC.
[0160] Step S402: assigning initial values (i.e., first network port parameters) to the identified network ports of each type of network card, creating a network card PXE function setting option (equivalent to a control option) for each network port, displaying it in the BIOS interface (Basic Input and Output System interface), and updating the network card boot classification group (equivalent to the target detection sorting);
[0161] Step S403: After the network card startup classification group is created, the network card type is confirmed through the device identification message of the network card type;
[0162] Step S404: In response to determining that the Smart NIC is present, the PXE function of the network port of the Smart NIC is enabled, and the PXE functions of the network ports of the remaining OCP NICs or PCI standard NICs are disabled. At the same time, the initial values of the network ports are updated and the shutdown function is set. The BIOS interface displays the Smart NIC enabled and the PXE functions of the remaining network ports disabled.
[0163] Step S405: In response to determining that the Smart NIC does not exist and that both the OCP NIC and the standard PCI NIC are identified, the PXE function of the network port of the OCP NIC is enabled, and the PXE functions of the network ports of the remaining standard PCI NICs are disabled. At the same time, the initial values of the network ports are updated and the shutdown function is set. The BIOS interface displays the OCP NIC enabled and the PXE functions of the remaining network ports disabled.
[0164] Step S406: In response to determining that the OCP network card does not exist and a standard PCI network card is identified, the PXE function of the network port of the identified PCI standard network card is enabled, and at the same time, the BIOS interface displays that the PXE function of the PCI standard network port is enabled;
[0165] Step S407: Step 4-6 is to automatically turn on or off the network port PXE function. Based on step 4-6, the network port can be manually turned on or off.
[0166] Figure 5 is a swimlane diagram of a server startup process according to an embodiment of the present application. As shown in Figure 5, the server startup process involves the server, BIOS and network port control. The server startup method is run through the BIOS, and the PXE function of the server network port is controlled to install the operating system in the server, thereby realizing the entire process from powering on the server to entering the operating system.
[0167] The server startup method proposed in this application designs a solution for turning off or on the network port function in combination with the type of network card used, that is, when the smart network card, OCP network card, and PCI standard network card are all configured in the server system, no matter which network port is recognized first, the network port PXE function of the smart network card is turned on, the network port PXE functions of the other network cards are turned off, and the above-mentioned PXE function is controlled as a control option in the BIOS interface; when there is no smart network card, and there are OCP network card and other standard PCI network cards, no matter which network port is recognized first, the network port PXE function of the OCP network card is turned on, the network port PXE functions of the other network cards are turned off and the PXE functions are controlled in the BIOS interface. The IOS interface controls the above PXE function as a control option. When there is no smart network card or OCP network card and a standard PCI network card is present, the PXE function of the network port of the first identified network card is enabled, and the PXE functions of the network ports of the remaining network cards are disabled, and the above PXE function is controlled as a control option in the BIOS interface. If it is necessary to support the requirement of enabling the PXE function when both the smart network card and the OCP network card are in place, the PXE function of the smart network card and the OCP network card is enabled in the same way, the PXE function of the network port of the remaining network cards is disabled, and the above PXE function is controlled as a control option in the BIOS interface.
[0168] The present application relates to a method for dynamically controlling the PXE booting of a network port. In response to determining that a server is booting, the PCI enumeration stage of the BIOS identifies the type of network card in the PCI device, such as the smart network card, OCP network card, and standard PCI network card in place information. According to the identification result, the PXE of the network card is enabled by default and the BIOS interface control options of each network port are innovated. At the same time, according to the message type of the PCI device, the network card types such as the smart network card, OCP network card, and standard network card identified in the booting process are identified. According to the priority of the network card device, the network port PXE function is set for each identified network card. At the same time, during the BIOS booting process, it supports manual special settings for the activation of the network port PXE function for use in specific environments. In the solution proposed in the present application, in response to determining PCI enumeration, the BIOS sets and updates the BIOS interface display options according to the device presence information and the expected priority of the network port PXE function activation. When special needs arise, the network port PXE function can be set through the BIOS interface to ignore the need for the BIOS to automatically control the activation of the PXE function.
[0169] In the solution proposed in this application, when the BIOS is started, the presence information of the smart network card, OCP network card, and PCI standard network card is identified during the PCI enumeration process. At the same time, BIOS options are created for the network ports of each type of identified network card and enabled by default. Different BIOS option setting functions are set according to the device message type to confirm what type of network card exists and different requirements for enabling the PXE function of different network card types. At the same time, it supports the need to manually set special network port functions to be turned on or off. It supports both automatic identification of the PXE function started by the network card and modification of the PXE setting function for special needs. The solution proposed in this application is applicable to server products of any architecture.
[0170] The solution proposed in this application has strong replicability and scalability. By combining the server startup, the BIOS identifies the presence information of the smart network card, OCP network card, and standard PCI network card during PCI enumeration. At the same time, the PXE function of the network port is enabled and a control option for the PXE function of each network port is added and enabled in the BIOS interface. The current network card type is confirmed by the message type of the network card device. In response to determining that the current network card type is a smart network card, the PXE function of the smart network card is enabled, and the PXE functions of other non-smart network cards are turned off. In response to determining that the smart network card is not identified and the OCP network card is identified, the PXE function of the OCP network card is used and the PXE functions of other non-OCP network cards are turned off. In response to determining that the smart network card and the OCP network card are not identified, the PXE function of all network ports is enabled. At the same time, the PXE function of the corresponding network port is set and displayed accordingly in the BIOS interface. When any PXE function that does not meet the above expectations needs to be modified manually, the PXE function of the specific network port can be enabled in the BIOS interface, and the automatic control of the PXE function can be ignored. This solution is convenient and easy for R&D and operation and maintenance personnel to adjust according to actual business needs. It supports any architecture server product and has strong versatility and high applicability.
[0171] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0172] This embodiment also provides a server startup device for implementing the above-mentioned embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0173] FIG6 is a block diagram of a server startup device according to an embodiment of the present application. As shown in FIG6 , the server startup device is applied to a basic input and output system installed in the server. A network device interface group is deployed on the server. The network device interface in the network device interface group is used to connect to a network device. The network device has a pre-boot execution environment control function. The device includes:
[0174] A first detection module 602 is configured to detect presence information of network device interfaces in the network device interface group in response to determining that the peripheral component interconnection standard enumeration phase has been reached, wherein the presence information is used to indicate whether the corresponding network device interface is connected to a network device;
[0175] A shut-down module 604 is configured to shut down a pre-boot execution environment control function of a reference network device connected to a plurality of reference network device interfaces in the network device interface group, wherein the reference network device interface is a network device interface whose in-place information indicates a network device interface connected to the reference network device;
[0176] a screening module 606 configured to screen a target network device from the plurality of reference network devices based on reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces, wherein the target network device is a network device having a target boot priority corresponding to the target device type being the highest among the plurality of reference network devices, the device type of the network device being used to indicate a device version of the network device, the pre-boot execution environment control functions of the device versions being backward compatible from highest to lowest, and a boot priority being set for each device type being proportional to the indicated device version;
[0177] The startup module 608 is used to start the pre-start execution environment control function of the target network device.
[0178] In some embodiments, in response to determining that the network device is a network card device, the screening module includes:
[0179] a first identifying unit, configured to identify a device type of each reference network device among the plurality of reference network devices until the reference network devices among the plurality of reference network devices are identified, thereby obtaining a plurality of reference device types;
[0180] a first determining unit, configured to, in response to determining that the multiple reference device types include a smart network card type, determine a network card device of the smart network card type among the multiple reference device types as a target network device with the highest startup priority;
[0181] a second determining unit configured to, in response to determining that the plurality of reference device types do not include a Smart NIC type but include an Open Compute Project NIC type, determine a network card device of the Open Compute Project NIC type among the plurality of reference device types as a target network device with a highest startup priority;
[0182] The third determining unit is configured to, in response to determining that the multiple reference device types do not include the Smart NIC type and the Open Compute Project NIC type but include the Peripheral Component Interconnect Standard NIC class, determine a NIC device of the Peripheral Component Interconnect Standard NIC type among the multiple reference device types as the target network device with the highest startup priority.
[0183] In some embodiments, in response to determining that the network device is a network card device, the screening module includes:
[0184] A first extraction unit, configured to extract a candidate network device to be currently identified from a plurality of reference network devices;
[0185] a second identification unit, configured to identify a device type of a candidate network device to obtain a candidate device type, wherein the reference device type includes the candidate device type;
[0186] a fourth determining unit, configured to determine whether the candidate device type is a smart network card type;
[0187] a fifth determining unit, configured to, in response to determining that the candidate device type is a smart network card type, terminate identification in advance and determine the candidate network device as the target network device with the highest startup priority;
[0188] a second extraction unit, configured to, in response to determining that the candidate device type is not a smart network card type, continue to extract a next reference network device that is not currently identified from the multiple reference network devices as a candidate network device to be currently identified, until no more reference network devices that are not currently identified exist in the multiple reference network devices, and terminate identification to obtain multiple candidate device types;
[0189] a sixth determining unit, configured to, in response to determining that the plurality of candidate device types include an Open Compute Project network card type, determine a network card device of the Open Compute Project network card type among the plurality of reference network devices as a target network device with a highest startup priority;
[0190] a seventh determining unit configured to, in response to determining that the plurality of candidate device types do not include an Open Compute Project network card type but include a Peripheral Component Interconnect standard network card type, determine a network card device of the Peripheral Component Interconnect standard network card type among the plurality of reference network devices as a target network device with the highest startup priority.
[0191] In some embodiments, the shutdown module includes:
[0192] The network port parameters corresponding to the multiple reference network device interfaces are updated to first network port parameters, wherein the first network port parameters are used to instruct the corresponding reference network device interfaces to turn off the pre-boot execution environment control function of the connected reference network device.
[0193] In some embodiments, the startup module includes:
[0194] Locating a target network device corresponding to a target network device from multiple reference network device interfaces;
[0195] The network port parameters of the target network device interface are updated to second network port parameters, wherein the second network port parameters are used to instruct the target network device interface to start a pre-boot execution environment control function of the target network device to be connected.
[0196] In some embodiments, the apparatus further comprises:
[0197] A creation module is used to create a control option for each of the multiple reference network device interfaces on the basic input and output system interface of the basic input and output system after turning off the pre-boot execution environment control function of the reference network device corresponding to the multiple reference network device interfaces in the network device interface group, wherein each control option is used to control the corresponding reference network device interface to turn on or off the pre-boot execution environment control function of the connected reference network device.
[0198] In some embodiments, the apparatus further comprises:
[0199] a second detection module, configured to detect whether an adjustment operation has been performed on a control option after screening a target network device from a plurality of reference network devices according to reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces;
[0200] The activation module is used to activate the pre-boot execution environment control function of the reference network device corresponding to the control option on which the adjustment operation has been performed, in response to detecting that an adjustment operation has been performed on the control option, and to control the closure of other currently activated pre-boot execution environment control functions in the server.
[0201] In some embodiments, the apparatus further comprises:
[0202] a third detection module, configured to detect whether an adjustment operation has been performed on a control option after screening a target network device from a plurality of reference network devices according to reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces;
[0203] an acquisition module configured to, in response to detecting that an adjustment operation has been performed on a control option, acquire, from a plurality of reference network device interfaces, a candidate network device interface corresponding to the control option on which the adjustment operation has been performed, and generate a target confirmation instruction, wherein the target confirmation instruction is configured to request a target account to determine, from among the candidate network devices and the target network device to which the candidate network device interface is connected, a network device that is allowed to initiate the pre-boot execution environment control function;
[0204] The receiving module is used to receive the target confirmation information returned by the target account, and control the start of the pre-boot execution environment control function of the corresponding network device according to the target confirmation information, wherein the target confirmation information is used to indicate the network device that is allowed to start the pre-boot execution environment control function.
[0205] In some embodiments, the screening module comprises:
[0206] a detection unit, configured to detect device types of reference network devices correspondingly connected to a plurality of reference network device interfaces to obtain reference device types;
[0207] The screening unit is used to screen a target network device from a plurality of reference network devices according to the detected reference device type.
[0208] In some embodiments, the detection unit is further configured to:
[0209] Reading device identification information from reference network devices correspondingly connected to the plurality of reference network device interfaces, wherein the device identification information is used to indicate a device type of the corresponding reference network device;
[0210] Parse the device identification message to obtain a reference device type of the reference network device.
[0211] In some embodiments, the detection unit is further configured to:
[0212] Sending a target request instruction to the reference network devices correspondingly connected to the plurality of reference network device interfaces, wherein the target request instruction is used to request the reference network devices correspondingly connected to the plurality of reference network device interfaces to send a device identification message to the basic input and output system, wherein the device identification message is used to indicate the device type of the corresponding reference network device;
[0213] Device identification messages sent by reference network devices corresponding to the multiple reference network device interfaces are received, and the device identification messages are parsed to obtain reference device types of the reference network devices.
[0214] In some embodiments, the detection unit is configured to:
[0215] According to the target detection sorting, the device types of the reference network devices corresponding to the connection of multiple reference network device interfaces are detected in sequence to obtain the reference device types, wherein the target detection sorting records the detection order of the multiple reference network device interfaces. In the target detection sorting, the reference network device interface at the front has a higher reference device version of the network device allowed to be connected, and the reference device version is the highest device version of the network device allowed to be connected by the corresponding reference network device interface.
[0216] In some embodiments, the apparatus further comprises:
[0217] a first constructing module, configured to, in response to determining that the network device is a network card device, sequentially detect device types of reference network devices correspondingly connected to a plurality of reference network device interfaces according to a target detection ranking, and before obtaining the reference device types, in response to determining that the plurality of reference network device interfaces include a first network device interface, a second network device interface, and a third network device interface, construct a first detection ranking in the order of the first network device interface, the second network device interface, and the third network device interface, wherein the target detection ranking includes the first detection ranking;
[0218] a second constructing module, configured to construct a second detection ranking in the order of the first network device interface and the third network device interface in response to determining that the plurality of reference network device interfaces include the first network device interface and the third network device interface, wherein the target detection ranking includes the second detection ranking;
[0219] a third constructing module, configured to construct a third detection ranking in the order of the second network device interface and the third network device interface in response to determining that the plurality of reference network device interfaces include the second network device interface and the third network device interface, wherein the target detection ranking includes the third detection ranking;
[0220] Among them, the network device with the highest device version allowed to be connected by the first network device interface is a smart network card type network card device, the network device with the highest device version allowed to be connected by the second network device interface is a network card device of the open compute project network card type, and the network device with the highest device version allowed to be connected by the third network device interface is a network card device of the peripheral component interconnection standard network card type. The device version of the network card device indicated by the smart network card type is higher than the device version of the network card device indicated by the open compute project network card type, and the device version of the network card device indicated by the open compute project network card type is higher than the device version of the network card device indicated by the peripheral component interconnection standard network card type.
[0221] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0222] As shown in Figure 7, an embodiment of the present application also provides a computer program product, including computer-readable instructions, which implement the steps of the method in each embodiment of the present application when the computer-readable instructions are executed by one or more processors; the computer program product also includes a non-transitory computer-readable storage medium, which stores computer-readable instructions, and which implements the steps of the method in each embodiment of the present application when the computer-readable instructions are executed by the processor.
[0223] As shown in Figure 8, an embodiment of the present application also provides a non-transitory computer-readable storage medium, which stores computer-readable instructions, wherein the computer-readable instructions, when executed by one or more processors, implement the steps of any of the above method embodiments.
[0224] In some embodiments, the above-mentioned non-transitory computer-readable storage medium may include but is not limited to: USB flash drive, read-only memory (ROM), random access memory (RAM), mobile hard disk, magnetic disk or optical disk, and other media that can store computer-readable instructions.
[0225] As shown in Figure 9, an embodiment of the present application also provides an electronic device, including one or more processors; and a memory associated with the one or more processors, the memory being used to store computer-readable instructions, which, when read and executed by the one or more processors, implement the steps in any of the above method embodiments.
[0226] In some embodiments, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0227] The examples in this embodiment can refer to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.
[0228] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, they can be implemented using program code executable by the computing device, and thus, they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0229] The above description is merely an embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A method for starting a server, characterized in that: Applied to a basic input / output system installed in a server, wherein a network device interface group is deployed on the server, wherein the network device interfaces in the network device interface group are used to connect to a network device, wherein the network device has a pre-boot execution environment control function, the method comprises: In response to determining that the execution reaches the peripheral component interconnection standard enumeration phase, detecting presence information of the network device interfaces in the network device interface group, wherein the presence information is used to indicate whether the corresponding network device interface is connected to the network device; disabling the pre-boot execution environment control function of a reference network device corresponding to a plurality of reference network device interfaces in the network device interface group, wherein the reference network device interface is a network device interface for which the presence information indicates that the reference network device is connected; Filtering a target network device from the plurality of reference network devices based on reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces, wherein the target network device is a network device having a target startup priority corresponding to the target device type thereof being the highest among the plurality of reference network devices, the device type of the network device being used to indicate a device version of the network device, the pre-boot execution environment control functions of the device versions being downwardly compatible from highest to lowest, and each device type being set to a corresponding startup priority proportional to the indicated device version; and The pre-boot execution environment control function of the target network device is started.
2. The method according to claim 1, characterized in that In response to determining that the network device is a network card device, screening a target network device from the plurality of reference network devices according to the reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces includes: Identifying a device type of each of the plurality of reference network devices until the reference network devices are identified, thereby obtaining a plurality of reference device types; In response to determining that the plurality of reference device types include a smart network card type, determining a network card device of the smart network card type among the plurality of reference device types as a target network device with the highest startup priority; In response to determining that the plurality of reference device types do not include a Smart NIC type but include an Open Compute Project NIC type, determining a NIC device of the Open Compute Project NIC type among the plurality of reference device types as a target network device with a highest startup priority; or In response to determining that the plurality of reference device types do not include a SmartNIC type and an Open Compute Project NIC type, but include a Peripheral Component Interconnect standard NIC type, a NIC device of the Peripheral Component Interconnect standard NIC type among the plurality of reference device types is determined as a target network device with the highest startup priority.
3. The method according to claim 1, characterized in that In response to determining that the network device is a network card device, screening a target network device from the plurality of reference network devices according to the reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces includes: Extracting a candidate network device to be currently identified from the plurality of reference network devices; Identifying a device type of the candidate network device to obtain a candidate device type, wherein the reference device type includes the candidate device type; Determine whether the candidate device type is a smart network card type; In response to determining that the candidate device type is the smart network card type, ending identification in advance and determining the candidate network device as the target network device with the highest startup priority; In response to determining that the candidate device type is not the smart network card type, continuously extracting the next reference network device that is not currently identified from the multiple reference network devices as the candidate network device to be currently identified, until no more unidentified reference network devices exist among the multiple reference network devices, and then ending identification to obtain multiple candidate device types; In response to determining that the plurality of candidate device types include an Open Compute Project network card type, determining a network card device of the Open Compute Project network card type among the plurality of reference network devices as a target network device with a highest startup priority; or In response to determining that the plurality of candidate device types do not include an Open Compute Project network card type but include a Peripheral Component Interconnect standard network card type, a network card device of the Peripheral Component Interconnect standard network card type among the plurality of reference network devices is determined as a target network device with the highest startup priority.
4. The method according to claim 1, wherein The step of disabling the pre-boot execution environment control function of the reference network devices connected to the plurality of reference network device interfaces in the network device interface group includes: The network port parameters corresponding to the multiple reference network device interfaces are updated to first network port parameters, wherein the first network port parameters are used to instruct the corresponding reference network device interface to turn off the pre-boot execution environment control function of the reference network device to which it is connected.
5. The method according to claim 1, wherein The starting of the pre-start execution environment control function of the target network device includes: Locating a target network device interface corresponding to the target network device from a plurality of reference network device interfaces; and The network port parameters of the target network device interface are updated to second network port parameters, wherein the second network port parameters are used to instruct the target network device interface to start the pre-boot execution environment control function of the target network device to be connected.
6. The method according to claim 5, characterized in that After disabling the pre-boot execution environment control function of the reference network devices correspondingly connected to the plurality of reference network device interfaces in the network device interface group, the method further includes: A control option is created for each of the multiple reference network device interfaces on the basic input / output system interface of the basic input / output system, wherein each control option is used to control the corresponding reference network device interface to turn on or off the pre-boot execution environment control function of the connected reference network device.
7. The method according to claim 6, characterized in that After filtering the target network device from the plurality of reference network devices according to the reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces, the method further includes: detecting whether an adjustment operation has been performed on the control option; and In response to detecting that the adjustment operation has been performed on the control option, the pre-boot execution environment control function of the reference network device corresponding to the control option on which the adjustment operation has been performed is turned on, and the other pre-boot execution environment control functions currently turned on in the server are controlled to be turned off.
8. The method according to claim 6, characterized in that After filtering the target network device from the plurality of reference network devices according to the reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces, the method further includes: Detecting whether an adjustment operation has been performed on the control option; In response to detecting that the adjustment operation has been performed on the control option, obtaining a candidate network device interface corresponding to the control option on which the adjustment operation has been performed from the plurality of reference network device interfaces, and generating a target confirmation instruction, wherein the target confirmation instruction is used to request the target account to determine a network device that is allowed to start the pre-boot execution environment control function from among the candidate network devices connected to the candidate network device interface and the target network device; and Receive target confirmation information returned by the target account, and control the start of the pre-boot execution environment control function of the corresponding network device according to the target confirmation information, wherein the target confirmation information is used to indicate the network device that is allowed to start the pre-boot execution environment control function.
9. The method according to claim 1, characterized in that The step of screening a target network device from the plurality of reference network devices according to the reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces comprises: Detecting device types of the reference network devices correspondingly connected to the multiple reference network device interfaces to obtain the reference device types; and A target network device is filtered from the plurality of reference network devices according to the detected reference device type.
10. The method according to claim 9, characterized in that The detecting the device types of the reference network devices correspondingly connected to the multiple reference network device interfaces to obtain the reference device types includes: Reading device identification information from the reference network devices correspondingly connected to the plurality of reference network device interfaces, wherein the device identification information is used to indicate a device type of the corresponding reference network device; and The device identification message is parsed to obtain the reference device type of the reference network device.
11. The method according to claim 9, characterized in that The detecting the device types of the reference network devices correspondingly connected to the multiple reference network device interfaces to obtain the reference device types further includes: sending a target request instruction to the reference network devices correspondingly connected to the multiple reference network device interfaces, wherein the target request instruction is used to request the reference network devices correspondingly connected to the multiple reference network device interfaces to send a device identification message to the basic input and output system, wherein the device identification message is used to indicate the device type of the corresponding reference network device; and The device identification message sent by the reference network device correspondingly connected to the multiple reference network device interfaces is received, and the device identification message is parsed to obtain the reference device type of the reference network device.
12. The method according to claim 9, characterized in that The detecting the device types of the reference network devices correspondingly connected to the multiple reference network device interfaces to obtain the reference device types includes: According to the target detection sorting, the device types of the reference network devices corresponding to the connection of the multiple reference network device interfaces are detected in sequence to obtain the reference device types, wherein the target detection sorting records the detection order of the multiple reference network device interfaces. In the target detection sorting, the reference network device interface at the front allows the network device to be connected with a higher reference device version, and the reference device version is the highest device version of the network device allowed to be connected by the corresponding reference network device interface.
13. The method according to claim 12, characterized in that In response to determining that the network device is a network card device, before sequentially detecting the device types of the reference network devices correspondingly connected to the multiple reference network device interfaces according to the target detection order to obtain the reference device types, the method further includes: In response to determining that the plurality of reference network device interfaces include a first network device interface, a second network device interface, and a third network device interface, constructing a first detection ranking in the order of the first network device interface, the second network device interface, and the third network device interface, wherein the target detection ranking includes the first detection ranking; In response to determining that the plurality of reference network device interfaces include a first network device interface and a third network device interface, constructing a second detection ranking in the order of the first network device interface and the third network device interface, wherein the target detection ranking includes the second detection ranking; or In response to determining that the plurality of reference network device interfaces include a second network device interface and a third network device interface, constructing a third detection ranking in the order of the second network device interface and the third network device interface, wherein the target detection ranking includes the third detection ranking; The network device with the highest device version allowed to be connected by the first network device interface is a smart network card type network card device, the network device with the highest device version allowed to be connected by the second network device interface is an open compute project network card type network card device, and the network device with the highest device version allowed to be connected by the third network device interface is a peripheral component interconnection standard network card type network card device. The device version of the network card device indicated by the smart network card type is higher than the device version of the network card device indicated by the open compute project network card type, and the device version of the network card device indicated by the open compute project network card type is higher than the device version of the network card device indicated by the peripheral component interconnection standard network card type.
14. The method according to claim 1, wherein The step of updating the network port parameters corresponding to the multiple reference network device interfaces to the first network port parameters includes: Sending a first update instruction carrying the first network port parameters to the multiple reference network device interfaces through the basic input and output system; and In response to the first update instruction, network port parameters corresponding to multiple reference network device interfaces are updated to the first network port parameters.
15. The method according to claim 10, characterized in that The step of reading device identification information from the reference network devices correspondingly connected to the multiple reference network device interfaces includes: The basic input and output system reads device identification information from the reference network devices correspondingly connected to the plurality of reference network device interfaces.
16. The method according to claim 1, wherein In response to determining that the network device is a network card device, screening a target network device from the plurality of reference network devices according to the reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces includes: Reference device types of the multiple reference network devices are identified to obtain all reference device types, and the target network device is determined from all the reference device types.
17. A server startup device, characterized in that: Applicable to a basic input / output system installed in a server, wherein a network device interface group is deployed on the server, wherein the network device interfaces in the network device interface group are used to connect to a network device, wherein the network device has a pre-boot execution environment control function, the apparatus comprises: a first detection module, configured to detect presence information of network device interfaces in the network device interface group in response to determining that the peripheral component interconnection standard enumeration phase has been executed, wherein the presence information is used to indicate whether the corresponding network device interface is connected to the network device; a shutting down module, configured to shut down the pre-boot execution environment control function of the reference network device correspondingly connected to a plurality of reference network device interfaces in the network device interface group, wherein the reference network device interface is a network device interface for which the presence information indicates that the reference network device is connected; a screening module, configured to screen a target network device from the plurality of reference network devices based on the reference device types of the reference network devices correspondingly connected to the plurality of reference network device interfaces, wherein the target network device is a network device having a target boot priority corresponding to its target device type being the highest among the plurality of reference network devices, the device type of the network device being used to indicate a device version of the network device, the pre-boot execution environment control functions of the device versions being backward compatible from highest to lowest, and each device type being set to a corresponding boot priority proportional to the indicated device version; and A startup module is used to start the pre-start execution environment control function of the target network device.
18. A computer program product, characterized in that The computer program product stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the steps of the method described in any one of items 1 to 16 are implemented.
19. A non-transitory computer-readable storage medium, characterized in that The non-transitory computer-readable storage medium stores computer-readable instructions, which implement the steps of the method according to any one of claims 1 to 16 when executed by one or more processors.
20. An electronic device comprising: one or more processors; as well as A memory associated with the one or more processors, the memory being configured to store computer-readable instructions, wherein the computer-readable instructions, when read and executed by the one or more processors, implement the steps of the method according to any one of claims 1 to 16.
Citation Information
Patent Citations
Network protocol packet binding method, system and device and storage medium
CN114528030A
Self-adaptive support method and device for pre-starting function of server
CN116700809A
Configuration method and device for pre-starting execution environment function and server
CN116886524A
Pre-startup execution environment startup item adjustment method and device, equipment and storage medium
CN117135043A
Server starting method and device, storage medium and electronic device
CN117785311A