An intelligent network card management method, device and equipment and readable storage medium

By constructing probe packets encapsulated with multiple Package ID selection commands and utilizing message packet reassembly technology at the MCTP protocol layer, the bus monopoly problem caused by the dynamic nature of smart NIC Package IDs was solved, enabling rapid parallel probing and improving server management efficiency and reliability.

CN122120167APending Publication Date: 2026-05-29XINHUASAN INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XINHUASAN INFORMATION TECH CO LTD
Filing Date
2026-02-28
Publication Date
2026-05-29

Smart Images

  • Figure CN122120167A_ABST
    Figure CN122120167A_ABST
Patent Text Reader

Abstract

The present specification provides a smart network card management method, device and equipment and readable storage medium, the method comprises the following steps: in response to the preset trigger condition associated with the target smart network card, a Package ID probe packet is constructed; the constructed Package ID probe packet is sent to the target smart network card; the Package ID response packet returned by the target smart network card is received, and the Package ID recorded in the Package ID response packet is used to update the Package ID of the target smart network card recorded locally. Through the technical scheme of the present specification, all optional Package IDs of the smart network card can be batch detected, the effective ID can be quickly obtained and the local configuration is updated, the detection time is greatly shortened, the bus occupation and blocking risk are reduced, the BMC monitoring function is continuously guaranteed, and the efficiency of server out-of-band management and system readiness speed are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of communication technology, and in particular to a smart network interface card (NIC) management method, apparatus, device, and readable storage medium. Background Technology

[0002] As an independent monitoring and management unit, the BMC needs to communicate with various components within the server, especially the smart network interface card (NIC), via specific communication protocols to configure network functions, monitor status, and recover from faults. The Network Control Sideband Interface (NC-SI) protocol provides a standardized command set and interaction process for this type of communication. It is typically encapsulated and carried through the management component's transmission protocol and ultimately transmitted via physical media such as the system management bus or high-speed bus interconnecting peripheral components.

[0003] In out-of-band management applications of smart network interface cards (NICs), a core technical challenge lies in the dynamic nature of the Package ID (Physical Encapsulation Identifier) ​​used by the NC-SI protocol. This identifier is a unique three-digit identifier used to address different network controller entities at the NC-SI protocol layer, with a theoretical value range of zero to seven. However, in actual deployments, this identifier for smart NICs is not permanently fixed; it often changes unpredictably with controller firmware upgrades or hardware version changes. This dynamism means that if the BMC (Block Controller Center) uses a pre-configured static identifier, the entire management channel can easily fail after a smart NIC update due to identifier mismatch, preventing the BMC from performing necessary out-of-band management and control of the smart NIC. This severely impacts the manageability and operational efficiency of the server system.

[0004] Currently, according to the relevant protocol specifications released by the Distributed Management Task Force, the most direct and commonly implemented solution is for the BMC to pre-assume a default Package ID and initiate a probe process based on this. Specifically, the BMC constructs an NC-SI standard selection encapsulation command containing this assumed identifier, encapsulates it into the payload of a Management Component Transport Protocol (MCP) request message via a generic data service, and then writes it to the system management bus after transport layer encapsulation. Subsequently, the BMC starts an independent timeout timer and waits for a response. If the assumed identifier is correct, the BMC will receive a valid response and acknowledge the identifier; if the identifier is incorrect, the smart NIC will not reply with any MCP response message, and the BMC must wait until the entire timeout period has ended before determining that the probe has failed and releasing bus resources. To address the issue of dynamically changing identifiers, an improved but still inefficient method is to have the BMC sequentially and serially execute the complete probe process described above for all eight possible identifiers.

[0005] However, this existing technical solution has significant drawbacks, stemming from the contradiction between the shared nature of the system management bus and the serial probing mechanism. The system management bus is a shared communication channel connecting the BMC (Browser Management Center) and various critical input / output devices within the server, such as the platform environment controller, temperature sensors, and power management units. Each probe targeting an erroneous package ID will exhaust its full timeout period due to the lack of a response, resulting in the system management bus being monopolized by that probe task for an extended period. In the worst-case scenario of serially probing all possible identifiers, the total time the bus is blocked will equal the product of the total number of package IDs and the timeout period for a single probe. During this potentially tens of seconds-long blocking period, all other critical hardware monitoring requests that rely on the same system management bus, such as periodic polling of temperature sensors in peripheral component interconnect expansion slots, will be completely blocked and unable to execute. This not only temporarily disables the BMC's basic hardware health monitoring functions, posing a potential threat to the server system's reliability, but also significantly prolongs the overall time it takes for the smart network interface card (NIC) to be detected by the BMC and enter a ready state after system startup or reset, impacting system recovery and service deployment efficiency. Therefore, the industry urgently needs a technical solution that can quickly and dynamically discover the Package ID of a smart network interface card (NIC) without affecting other critical functions, while continuously increasing the bus load. Summary of the Invention

[0006] In view of this, this specification provides a smart network interface card (NIC) management method, apparatus, device, and readable storage medium to improve the aforementioned problem of low Package ID detection efficiency.

[0007] The specific technical solution is as follows: This specification provides a smart network interface card (NIC) management method applied to a server's BMC device, wherein the server is configured with a smart NIC. The method includes: in response to a preset trigger condition associated with a target smart NIC, constructing a Package ID probe message, wherein the Package ID probe message includes several Select Package command encapsulations, each associated with a distinct Package ID, the number of Select Package command encapsulations being the same as the number of selectable Package IDs of the target smart NIC; sending the constructed Package ID probe message to the target smart NIC, wherein the Package ID probe message instructs the target smart NIC to return a Package ID response message based on a specific Select Package command encapsulation, wherein the Package ID response message records the Package ID of the target smart NIC, and the specific Select Package command encapsulation is a Select Package command encapsulation whose associated Package ID matches the Package ID of the target smart NIC among all Select Package command encapsulations included in the probe message; receiving the Package ID response message returned by the target smart NIC, and updating the locally recorded Package ID of the target smart NIC based on the Package ID recorded in the Package ID response message.

[0008] As a technical solution, the step of constructing a Package ID probe message in response to a preset trigger condition associated with the target smart network card includes: constructing a Package ID probe message in response to a firmware upgrade event of the target smart network card, a new installation event of the target smart network card, or a no-response event of the NCSI message of the target smart network card.

[0009] As a technical solution, the step of constructing a PackageID probe message in response to a preset trigger condition associated with the target smart network interface card includes: exhaustively assigning different Package IDs within the range of Package IDs supported by the target smart network interface card; generating Select Package command encapsulations for each Package ID; loading all generated Select Package command encapsulations into the data field of the MCTP-based Package ID probe message; and recording the length of each Select Package command encapsulation in a specific field.

[0010] As a technical solution, sending the constructed Package ID probe message to the target smart network card includes: recording the length of each Select Package command encapsulation based on the specific field, generating Package ID probe message packets, and continuously sending the Package ID probe message packets to the target smart network card through a preset channel.

[0011] This specification also provides a smart network interface card (NIC) management device applied to a server's BMC device. The server is configured with a smart NIC. The device includes: a first module, used to construct a Package ID probe message in response to a preset trigger condition associated with the target smart NIC. The Package ID probe message includes several Select Package command encapsulations, each associated with a distinct Package ID. The number of Select Package command encapsulations is the same as the number of selectable Package IDs of the target smart NIC. A second module is used to send the constructed Package ID probe message to the target smart NIC. The Package ID probe message instructs the target smart NIC to return a Package ID response message based on a specific Select Package command encapsulation. The Package ID response message records the Package ID of the target smart NIC. The specific Select Package command encapsulation is a Select Package command encapsulation whose associated Package ID matches the Package ID of the target smart NIC among all Select Package command encapsulations included in the probe message. A third module is used to receive the Package ID response message returned by the target smart NIC and, based on the Package ID recorded in the Package ID response message... Update the Package ID of the target smart network card recorded locally.

[0012] As a technical solution, the step of constructing a Package ID probe message in response to a preset trigger condition associated with the target smart network card includes: constructing a Package ID probe message in response to a firmware upgrade event of the target smart network card, a new installation event of the target smart network card, or a no-response event of the NCSI message of the target smart network card.

[0013] As a technical solution, the step of constructing a PackageID probe message in response to a preset trigger condition associated with the target smart network interface card includes: exhaustively assigning different Package IDs within the range of Package IDs supported by the target smart network interface card; generating Select Package command encapsulations for each Package ID; loading all generated Select Package command encapsulations into the data field of the MCTP-based Package ID probe message; and recording the length of each Select Package command encapsulation in a specific field.

[0014] As a technical solution, sending the constructed Package ID probe message to the target smart network card includes: recording the length of each Select Package command encapsulation based on the specific field, generating Package ID probe message packets, and continuously sending the Package ID probe message packets to the target smart network card through a preset channel.

[0015] This specification also provides an electronic device, including a processor and a readable storage medium storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the aforementioned smart network interface card method.

[0016] This specification also provides a readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the aforementioned smart network interface card method.

[0017] The technical solutions provided in this specification offer at least the following beneficial effects: By encapsulating probe commands for all optional Package IDs into a single message and sending them all at once, replacing the traditional serial, one-by-one probe mechanism, the bus occupancy time is drastically reduced from the worst-case "number of IDs × single timeout" to the time required for a single interaction. This significantly accelerates the dynamic discovery of smart NIC Package IDs and system readiness, and significantly reduces the risk of blocking access to other critical I2C devices due to prolonged bus monopoly, effectively ensuring the reliability of the server's out-of-band management channel and the continuity of system monitoring functions. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the drawings used in the description of the embodiments of this specification or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings of the embodiments of this specification.

[0019] Figure 1 This is a flowchart of a smart network card method according to one embodiment of this specification; Figure 2 This is a structural diagram of a smart network card device according to one embodiment of this specification; Figure 3 This is a flowchart of one embodiment of this specification; Figure 4 This is a hardware structure diagram of an electronic device according to one embodiment of this specification.

[0020] Reference numerals: Module 1 21, Module 22, Module 3 23. Detailed Implementation

[0021] The terminology used in the embodiments described herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this specification. The singular forms “a,” “described,” and “the” as used in this specification and claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to any and all possible combinations comprising one or more of the associated listed items.

[0022] It should be understood that although the terms first, second, third, etc., may be used to describe various information in embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" may also be interpreted as "when," "when," or "in response to a determination."

[0023] In view of the above, this specification provides a smart network interface card (NIC) management method, apparatus, device, and readable storage medium to at least improve one of the aforementioned technical problems.

[0024] The specific technical solution is described below.

[0025] In one embodiment, this specification provides a smart network interface card (NIC) management method applied to a server's BMC device, wherein the server is configured with a smart NIC. The method includes: in response to a preset trigger condition associated with a target smart NIC, constructing a Package ID probe message, wherein the Package ID probe message includes several Select Package command encapsulations, each associated with a distinct Package ID, the number of Select Package command encapsulations being the same as the number of selectable Package IDs of the target smart NIC; sending the constructed Package ID probe message to the target smart NIC, wherein the Package ID probe message instructs the target smart NIC to return a Package ID response message based on a specific Select Package command encapsulation, wherein the Package ID response message records the Package ID of the target smart NIC, and the specific Select Package command encapsulation is a Select Package command encapsulation among all Select Package command encapsulations included in the probe message whose associated Package ID matches the Package ID of the target smart NIC; receiving the Package ID response message returned by the target smart NIC, and updating the locally recorded Package ID of the target smart NIC according to the Package ID recorded in the Package ID response message. ID.

[0026] This method differs from the serial timeout mechanism for Package ID probing in the NC-SI protocol. By using message packet reassembly technology at the MCTP protocol layer, it encapsulates and integrates multiple selection commands for different Package IDs into a single transmission process, thereby enabling rapid parallel probing of the currently valid Package ID of the smart network interface card.

[0027] In a specific implementation environment, the server motherboard integrates a Baseboard Management Controller (BMC). This BMC establishes a communication connection with the Smart Network Interface Card (SNIC) via the System Management Bus (SMBus). The SNIC integrates a Network Controller (NC) entity, which has a 3-bit Physical Package ID in the NC-SI protocol architecture, with eight possible values ​​ranging from 0 to 7. Due to factors such as firmware version iterations, production batch differences, or configuration changes, this Package ID may dynamically change, causing the pre-configured static Package ID on the BMC side to become invalid.

[0028] Specifically, such as Figure 1 This includes the following steps, the order of which can be changed depending on the needs of the actual application scenario: Step S11: In response to the preset trigger conditions associated with the target smart network interface card, construct a Package ID probe packet.

[0029] There can be multiple triggering conditions. For example, the first typical triggering scenario is during the BMC startup initialization phase. After the BMC completes its firmware loading and enters the system ready state, it needs to identify and enumerate all connected smart network interface devices. If it is detected that the default Package ID of a certain smart network interface is set to the special value 0xFE, which is a reserved or invalid value in the NC-SI protocol specification, it indicates that the device needs to perform dynamic Package ID discovery.

[0030] The second triggering scenario is a smart network card hot-plugging or reset event. When a smart network card is replaced, firmware is upgraded online, or the network card controller is reset during server operation, the BMC senses the event through interrupt signals or changes in the status register, triggering a re-probing of the specific target smart network card.

[0031] The third trigger scenario is periodic health checks or communication failure retry mechanisms. When the BMC sends commands to a certain Package ID multiple times in regular management communication without receiving a valid response, it determines that the Package ID may have changed and initiates a dynamic discovery process to re-establish a valid communication link. These trigger conditions ensure that the BMC can promptly detect the risk of Package ID configuration failure in various real-world operational scenarios and proactively initiate a detection and recovery process.

[0032] Once the preset trigger conditions are met, the BMC executes the Package ID probe packet construction operation. During the packet construction phase, the upper-layer NC-SI processing module of the BMC first determines the number of optional Package IDs supported by the target smart NIC. According to the NC-SI protocol specification, standard smart NICs typically support 8 Package ID values: 0, 1, 2, 3, 4, 5, 6, and 7. For each possible Package ID value, the NC-SI module constructs a standard Select Package command. This command has a fixed command type identifier and message format in the NC-SI protocol, and its function is to request the network controller to enter the selected state corresponding to the selected Package ID.

[0033] Each Select Package command is assigned a different Package ID parameter during the encapsulation process, resulting in eight Select Package command encapsulations with distinct content. These command encapsulations are then passed to the lower-level MCTP protocol stack for further processing. Upon receiving this batch of command data, the MCTP protocol stack integrates them into the Data field of the same MCTP message, forming a logical Package ID probe message. During the encapsulation process, the MCTP protocol stack needs to record the byte length of a single Select Package command encapsulation, denoted as Single Packet Len. This length value will serve as an important basis for subsequent packet reassembly. Simultaneously, the MCTP protocol stack sets the IsInternal flag to 1 in the internal control field of this message to identify it as an internal batch probe message, distinct from regular single-command management messages. Setting this flag will trigger the lower-level VDM processing module to adopt a special packet aggregation strategy.

[0034] Step S12: Send the constructed Package ID probe message to the target smart network card.

[0035] After the message is constructed, the BMC sends the constructed Package ID probe message to the target smart network card through the MCTP over SMBus protocol stack. During the sending phase, the VDM processing module of the MCTP protocol stack recognizes that the IsInternal flag is 1, and thus starts a special packet processing procedure.

[0036] The VDM module encapsulates the eight Package selection commands contained in the Data field and logically segments them according to the previously recorded SinglePacket Len length, forming eight logical packets. For each logical packet, the VDM module uniformly sets the SOM and EOM flags in the MCTP protocol header. The SOM flag indicates whether the packet marks the beginning of a message, and the EOM flag indicates whether the packet marks the end of a message.

[0037] In this embodiment, since the eight command encapsulations belong to the same probe logic and need to be sent continuously, the VDM module uniformly processes the SOM and EOM flags of all packets to indicate continuous transmission, ensuring that the lower-layer I2C driver can recognize that this is a continuous batch transmission sequence. Subsequently, these eight packets are added to the I2C transmission queue in sequence, and the I2C driver controller performs eight message transmission operations continuously when the bus is idle, transmitting the complete Package ID probe message to the target smart network card.

[0038] After receiving the Package ID probe message, the target smart NIC's internal NC entity processes the multiple Select Package command encapsulations contained within. Since the smart NIC has a defined valid Package ID in its current operating state (assuming this value is 5), when the NIC parses the Package ID probe message, it performs a Package ID matching check on each of the eight Select Package command encapsulations. For command encapsulations with Package ID parameters of 0, 1, 2, 3, 4, 6, and 7, since they do not match the NIC's current actual Package ID, the NIC will ignore these commands or return an indication of an unselected state. However, for the command encapsulation with a Package ID parameter of 5, since it completely matches the NIC's current actual Package ID, the NIC will execute the state switching operation requested by the Select Package command, enter the selected state, and prepare to return response information to the BMC.

[0039] It should be noted that in this embodiment, the smart network card only needs to respond to the PackageID command that is successfully matched. This design significantly simplifies the processing logic on the network card side and avoids multi-response conflicts or response storms.

[0040] The Package ID response message constructed by the network card follows the NC-SI protocol standard response format. The selected Package ID value is recorded in a specific field in the message header, which is the value 5 in this example. After being encapsulated by the MCTP protocol, the response message is transmitted back to the BMC via the SMBus bus.

[0041] Step S13: Receive the Package ID response message returned by the target smart network card, and update the Package ID of the target smart network card recorded locally according to the Package ID recorded in the Package ID response message.

[0042] After receiving the Package ID response message from the target smart NIC, the BMC performs message parsing and local Package ID update operations. During the receive phase, the MCTP protocol stack obtains response data from the SMBus bus, completes MCTP layer decapsulation, and submits the NC-SI layer message data to the upper-layer NC-SI processing module. The NC-SI module parses the response message header, extracts the Package ID field, and obtains the currently valid Package ID value of the target smart NIC. Subsequently, the BMC compares the obtained Package ID value with the locally stored Package ID configuration for the smart NIC. If a discrepancy is found, an update operation is performed, correcting the locally stored Package ID of the target smart NIC to the newly discovered value, and marking the completion of the smart NIC's dynamic discovery process. The updated Package ID will be used for all subsequent NC-SI management communications for this smart NIC, ensuring that the BMC can accurately address and establish a stable out-of-band management channel with the correct network controller entity.

[0043] In a specific scenario, a smart network interface card (NIC) is installed in an expansion slot of a data center server. This NIC was manufactured with firmware version 1.2, and its internal network controller's Package ID was configured to be 3. Server maintenance personnel manually set the NIC's Package ID to 3 in the BMC's configuration interface. Based on this, the BMC establishes communication with the NIC via the NC-SI over MCTP protocol to monitor information such as the NIC's port status, temperature, and firmware version.

[0044] After running for a period of time, the operations and maintenance team performed an online firmware upgrade on the smart network interface card (NIC), updating the firmware version to 2.0. After the firmware upgrade, the Package ID configuration of the NIC's internal network controller changed, with the new Package ID set to 6. Since the BMC side still used the old configuration value of 3, when the next management communication after the upgrade was initiated, the BMC sent a Select Package command to Package ID 3. The NIC refused to respond because its ID had changed to 6, and the BMC determined the communication had failed after a timeout. After three consecutive failed retries, the BMC's fault management module triggered a Package ID invalidation check, initiating the dynamic discovery process of this embodiment.

[0045] The BMC first sets the target smart NIC's default Package ID to 0xFE, a special value indicating an unknown state requiring re-probing. Then, the BMC's NC-SI module exhaustively constructs eight Select Package commands, corresponding to Package IDs 0 to 7. Each command, according to the NC-SI protocol specification, includes a command type field, a Package ID parameter field, and necessary control fields, with a fixed encapsulation length of 16 bytes. These eight command encapsulations are sequentially filled into the Data field of the MCTP message, for a total data length of 128 bytes. The MCTP protocol stack sets SinglePacket Len to 16 and the IsInternal flag to 1 in the encapsulation control block, instructing the VDM layer to perform batch packet splitting. The VDM layer divides the 128 bytes of data into eight 16-byte packets, sets transmission flags uniformly, and submits them to the I2C queue. The I2C controller completes eight consecutive transmissions within a short bus time window, delivering the complete probe message to the smart NIC. After receiving and parsing the message, the network card found that only the command with Package ID 6 matched its current state. Therefore, it constructed a response message, filling the Package ID field in the header with the value 6, encapsulated it using MCTP, and sent it back to the BMC. The BMC parsed the response and obtained Package ID 6. Comparing it with the locally stored value 3, it found a discrepancy and performed an update operation to correct the configuration to 6. Subsequent management communication returned to normal.

[0046] In one implementation, when the server completes the power-on self-test process and enters the BMC initialization phase, the BMC firmware first reads the pre-stored smart network card configuration file in the non-volatile memory. If the Package ID field of the target smart network card (such as a DPU accelerator card of model SNIC-500 located in PCIeSlot 3) is detected to be empty and marked as "pending verification", or if the version management module finds that the smart network card firmware version number (e.g., upgraded from v2.1.0 to v3.0.5) differs from the historical record, the probe task scheduler is activated. In addition, during the continuous operation of the server, if the BMC captures the "communication timeout accumulated to threshold" abnormal event when periodically polling the smart network card status register through SMBus, or receives the "force refresh network controller parameters" operation and maintenance instruction issued by the upper-layer Redfish API, this process will also be started as a dynamic trigger condition. To avoid frequent probes interfering with system stability, the BMC has an intelligent trigger suppression mechanism: for example, only one probe is allowed to be performed on the same smart network card within a single system startup cycle, or a minimum probe interval time (such as 5 minutes) is set to ensure the rationality of resource scheduling and the controllability of operation and maintenance.

[0047] During the probe message construction phase, the BMC's MCTP protocol stack allocates a dedicated buffer in memory (usually a 1024-byte aligned area) and assembles messages in accordance with the DMTF DSP0236 MCTP specification and the DSP0228 NC-SI protocol standard. First, the MCTP message header is generated: the Destination EID is set to the physical address of the smart NIC on the SMBus bus (e.g., 0x32, which is fixed by the hardware design and is unrelated to the Package ID), the Source EID is set to the BMC's own address (e.g., 0x20), the Message Type is set to 0x01 (identifying NC-SI over MCTP), and the Message Tag is a unique 16-bit sequence number dynamically created by the BMC's random number generator (e.g., 0xC7F3) for subsequent precise matching of requests and responses. Subsequently, the protocol stack generates 8 NC-SI "Select Package" command data units in a loop. Each unit is constructed strictly according to the NC-SI frame structure. The command opcode is fixed at 0x01. The lower 3 bits (Bits 0-2) of the command parameter byte are filled with binary values ​​from 0 to 7 (i.e., 0x00, 0x01...0x07), the higher 5 bits are cleared, and the checksum field is temporarily reserved for subsequent calculation.

[0048] The protocol stack encapsulates the eight commands sequentially into consecutive MCTP packets. Packet 1 (corresponding to Package ID=0) sets the Start Message Flag (SOM) to 1 and the End Message Flag (EOM) to 0. Packets 2 to 7 (Package IDs=1 to 6) have their SOM and EOM set to 0. Packet 8 (Package ID=7) has its SOM set to 0 and its EOM set to 1, forming a logically complete single MCTP message. To adapt to the physical limitation of a maximum of 255 bytes per transaction on the SMBus bus, the protocol stack intelligently inserts padding bytes at the end of each packet and uses the CRC-8 algorithm to independently calculate the checksum for each packet. Simultaneously, the BMC kernel sets the internal probe flag (IsInternal=1), enabling the MCTP driver layer to skip the conventional "only allow sending pre-configured Package ID commands" verification logic before sending, ensuring that probe packets containing all candidate IDs can legally pass the protocol stack verification. The entire construction process is completed within milliseconds, and the generated probe message is approximately 384 bytes long (including the MCTP header, 8 sub-headers, and payload), with a compact structure and full compliance with protocol specifications.

[0049] After the message is constructed, the BMC's SMBus controller initiates the transmission sequence as the master device. At the hardware level, the controller first pulls the SCL and SDA lines low to generate the start condition, sends the 7-bit SMBus slave device address of the smart network card (such as 0x19) and attaches the write flag. After receiving the ACK response, it continuously outputs all 8 MCTP packet data streams.

[0050] When the electrical signal arrives at the SMBus physical interface of the target smart network card via the motherboard management bus, its built-in MCTP protocol engine immediately starts the receiving process: the hardware layer verifies the continuity of the SOM / EOM flags and the CRC checksum of each packet, and the software layer reassembles the valid data into a complete MCTP message; subsequently, the network controller firmware (NCFirmware) of the smart network card enters a dedicated probing processing context. The firmware traverses each NC-SI command packet in the reassembled message, parses the command parameters byte by byte, extracts the Package ID field value and compares it with the currently effective value stored in its own non-volatile memory area (such as OTP fuse array or Flash configuration area).

[0051] Assuming the smart network interface card (NIC) has recently reconfigured its Package ID to 5 (binary 101) due to a firmware upgrade, when processing the 6th packet (Package ID=5), the comparison result shows an exact match. The firmware immediately terminates subsequent packet parsing (optimizing processing efficiency) and generates a standard response message according to the NC-SI protocol: the opcode is set to 0x81 (Select Package Command Response), the status code is set to 0x00 (Success), the key data field is explicitly filled with the successfully matched Package ID value (0x05), and the response header retains the same Message Tag (0xC7F3) as the request message for association. This response message is encapsulated into a single MCTP packet (SOM=1, EOM=1) by the smart NIC's MCTP stack and returned to the BMC as a slave device via the SMBus bus. A response is generated only for the first matching item, and the response content is strictly limited to the Package ID of the successful match. This avoids BMC parsing ambiguity caused by multiple responses. When eight consecutive SelectPackage commands are detected and the Package ID covers the full range of 0-7, a fast matching response path is automatically enabled. No modification to the core communication state machine is required, achieving low cost and full backward compatibility with existing devices.

[0052] After sending the probe message, the BMC side synchronously starts a hardware timer (the timeout threshold is set to 120 milliseconds, slightly higher than the timeout for a typical single probe but much lower than the total timeout for traditional polling) to continuously monitor the SMBus bus. When the MCTP response packet returned by the smart NIC arrives, the SMBus controller triggers an interrupt, and the MCTP protocol stack immediately parses it: first, it verifies the packet's EID, MessageTag, and CRC to confirm that it is a legitimate response to this probe request; then, it strips the MCTP encapsulation layer and hands over the inner NC-SI response message to a dedicated parsing module for processing. This module accurately locates the 3rd byte of the response data offset (according to the NC-SI specification), extracts the Package ID field value (such as 0x05), and performs a validity check (ensuring that the value is within the range of 0-7 and is not a reserved value). After successful verification, the BMC firmware calls the non-volatile storage management interface to perform an atomic write operation: writing the newly acquired Package ID to the preset smart network card configuration partition in the SPI Flash (e.g., address 0x80004A00), updating the runtime cache copy in memory, and generating an audit log with a timestamp (recording "Slot 3 SNIC-500 Package ID updated from 2 to 5 at 2026-02-28 14:15:22"). To ensure data reliability, the data is first written to a temporary buffer and verified. Only after confirming that there are no errors is the data overwritten to the main configuration area to avoid configuration corruption due to power failure.

[0053] After the parameters are updated, the BMC automatically clears the internal probe flag (IsInternal=0) and marks the communication status of the smart NIC as "ready". All subsequent NC-SI interactions (such as querying link speed and configuring VLANs) will directly encapsulate commands using the new Package ID. In terms of exception handling, if the timer times out without a response (theoretically, the probability is extremely low when the hardware is normal and the entire ID space is covered), the BMC will record a detailed error log (including Message Tag and number of attempts), initiate a degradation strategy, and if the probe fails after one retry, it will fall back to the traditional serial polling mode as a backup plan. It will also report a smart NIC communication anomaly alarm to the upper-level operation and maintenance platform via the IPMI event channel, and simultaneously illuminate the management status LED on the server's front panel to provide on-site engineers with intuitive diagnostic clues.

[0054] In one implementation, the step of constructing a Package ID probe message in response to a preset trigger condition associated with the target smart network interface card includes: constructing a Package ID probe message in response to a firmware upgrade event of the target smart network interface card, a new installation event of the target smart network interface card, or a no-response event of the NCSI message of the target smart network interface card.

[0055] In one implementation, the step of constructing a PackageID probe message in response to a preset trigger condition associated with the target smart network interface card includes: exhaustively assigning different Package IDs within the range of Package IDs supported by the target smart network interface card; generating Select Package command encapsulations for each Package ID; loading all generated Select Package command encapsulations into the data field of the MCTP-based Package ID probe message; and recording the length of each Select Package command encapsulation in a specific field.

[0056] In one implementation, sending the constructed Package ID probe message to the target smart network interface card includes: recording the length of each Select Package command encapsulation based on the specific field, generating Package ID probe message packets, and continuously sending the Package ID probe message packets to the target smart network interface card through a preset channel.

[0057] In one implementation, such as Figure 2 This specification also provides a smart network interface card (NIC) management device applied to the BMC device of a server. The server is configured with a smart NIC. The device includes: a first module, used to construct a Package ID probe message in response to a preset trigger condition associated with the target smart NIC. The Package ID probe message includes several Select Package command encapsulations, each associated with a different Package ID. The number of Select Package command encapsulations is the same as the number of selectable Package IDs of the target smart NIC; a second module, used to send the constructed Package ID probe message to the target smart NIC. The Package ID probe message instructs the target smart NIC to return a Package ID response message based on a specific Select Package command encapsulation. The Package ID response message records the Package ID of the target smart NIC. The specific Select Package command encapsulation is a Select Package command encapsulation whose associated Package ID matches the Package ID of the target smart NIC among all Select Package command encapsulations included in the probe message; a third module, used to receive the Package ID response message returned by the target smart NIC and, based on the Package ID recorded in the Package ID response message... Update the PackageID of the target smart network card recorded locally.

[0058] In one implementation, the step of constructing a Package ID probe message in response to a preset trigger condition associated with the target smart network interface card includes: constructing a Package ID probe message in response to a firmware upgrade event of the target smart network interface card, a new installation event of the target smart network interface card, or a no-response event of the NCSI message of the target smart network interface card.

[0059] In one implementation, the step of constructing a PackageID probe message in response to a preset trigger condition associated with the target smart network interface card includes: exhaustively assigning different Package IDs within the range of Package IDs supported by the target smart network interface card; generating Select Package command encapsulations for each Package ID; loading all generated Select Package command encapsulations into the data field of the MCTP-based Package ID probe message; and recording the length of each Select Package command encapsulation in a specific field.

[0060] In one implementation, sending the constructed Package ID probe message to the target smart network interface card includes: recording the length of each Select Package command encapsulation based on the specific field, generating Package ID probe message packets, and continuously sending the Package ID probe message packets to the target smart network interface card through a preset channel.

[0061] like Figure 3 The default Package ID of the smart NIC is set to 0xFE. The upper-layer NCSI assigns different Package IDs through exhaustive enumeration, encapsulating the corresponding Select Package command and placing it sequentially in the Data field of the MCTP message. The length of a single Select Package is stored in the Single Packet Len. The MCTP process decomposes the Data field of the request into different sub-packets of the same MCTP message according to the length of the Single Packet Len, and sends them to the interface's VDM process for processing. If the interface VDM receives a message with the internal flag IsInternal set to 1, it uniformly processes the SOM (Start of Message) and EOM (End of Message) fields in the sub-packets, and sends them to the I2C queue when all Package ID packets are ready. After the I2C sends all 8 message packets consecutively, it waits for the NIC's response. After parsing the corresponding message, the NC-SI message header is read, and the Package ID content in the header is the value of successful negotiation.

[0062] In one embodiment, this specification provides an electronic device including a processor and a readable storage medium storing machine-executable instructions executable by the processor. The processor executes the machine-executable instructions to implement the aforementioned smart network interface card (NIC) method. From a hardware perspective, a hardware architecture diagram can be found... Figure 4 As shown.

[0063] In one embodiment, this specification provides a readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the aforementioned smart network interface card method.

[0064] Here, a readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, a readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.

[0065] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.

[0066] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.

[0067] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification can take the form of a completely hardware implementation, a completely software implementation, or an implementation combining software and hardware aspects. Furthermore, embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0068] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments thereof. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0069] Furthermore, these computer program instructions can also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in the process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0070] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0071] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification can take the form of a completely hardware implementation, a completely software implementation, or an implementation combining software and hardware aspects. Furthermore, this specification can take the form of a computer program product implemented on one or more computer-usable storage media (which may include, but are not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0072] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.

Claims

1. A method for managing intelligent network interface cards (NICs), characterized in that, A BMC device applied to a server, the server being configured with a smart network interface card, the method comprising: In response to a preset trigger condition associated with the target smart network interface card, a Package ID probe message is constructed. The Package ID probe message includes several Select Package command encapsulations, each associated with a different Package ID. The number of Select Package command encapsulations is the same as the number of selectable Package IDs of the target smart network interface card. Send a constructed Package ID probe message to the target smart network interface card (NIC). The Package ID probe message is used to instruct the target smart NIC to encapsulate and return a Package ID response message according to a specific Select Package command. The Package ID response message contains the Package ID of the target smart NIC. The specific Select Package command encapsulation is the Select Package command encapsulation that matches the Package ID of the target smart NIC among all Select Package command encapsulations included in the probe message. Receive the Package ID response message returned by the target smart network card, and update the Package ID of the target smart network card recorded locally according to the Package ID recorded in the Package ID response message.

2. The method according to claim 1, characterized in that, The process of constructing a Package ID probe message in response to a preset trigger condition associated with the target smart network interface includes: In response to a target smart NIC firmware upgrade event, a target smart NIC new installation event, or a target smart NIC NCSI message no response event, construct a Package ID probe message.

3. The method according to claim 1, characterized in that, The process of constructing a Package ID probe message in response to a preset trigger condition associated with the target smart network interface includes: Exhaustively assign different Package IDs within the range of Package IDs supported by the target smart NIC, generate Select Package command encapsulations for each Package ID, load all generated Select Package command encapsulations into the data field of the MCTP-based Package ID probe packet, and record the length of each Select Package command encapsulation in a specific field.

4. The method according to claim 3, characterized in that, The step of sending the constructed PackageID probe message to the target smart network interface card includes: Based on the length of each Select Package command encapsulation recorded in the specific field, Package ID probe message packets are generated and continuously sent to the target smart network card through a preset channel.

5. A smart network interface card (NIC) management device, characterized in that, A BMC device for use in a server, the server being configured with a smart network interface card, the device comprising: The first module is used to construct a Package ID probe message in response to a preset trigger condition associated with the target smart network interface card. The Package ID probe message includes several SelectPackage command encapsulations, each associated with a different Package ID. The number of SelectPackage command encapsulations is the same as the number of selectable Package IDs of the target smart network interface card. The second module is used to send a constructed Package ID probe message to the target smart network interface card. The Package ID probe message is used to instruct the target smart network interface card to encapsulate and return a Package ID response message according to a specific Select Package command. The Package ID response message contains the Package ID of the target smart network interface card. The specific Select Package command encapsulation is the Select Package command encapsulation that matches the Package ID of the target smart network interface card among all Select Package command encapsulations included in the probe message. The third module is used to receive the Package ID response message returned by the target smart network card, and update the Package ID of the target smart network card recorded locally according to the Package ID recorded in the Package ID response message.

6. The apparatus according to claim 5, characterized in that, The process of constructing a Package ID probe message in response to a preset trigger condition associated with the target smart network interface includes: In response to a target smart NIC firmware upgrade event, a target smart NIC new installation event, or a target smart NIC NCSI message no response event, construct a Package ID probe message.

7. The apparatus according to claim 5, characterized in that, The process of constructing a Package ID probe message in response to a preset trigger condition associated with the target smart network interface includes: Exhaustively assign different Package IDs within the range of Package IDs supported by the target smart NIC, generate Select Package command encapsulations for each Package ID, load all generated Select Package command encapsulations into the data field of the MCTP-based Package ID probe packet, and record the length of each Select Package command encapsulation in a specific field.

8. The apparatus according to claim 7, characterized in that, The step of sending the constructed PackageID probe message to the target smart network interface card includes: Based on the length of each Select Package command encapsulation recorded in the specific field, Package ID probe message packets are generated and continuously sent to the target smart network card through a preset channel.

9. An electronic device, characterized in that, include: A processor and a readable storage medium storing machine-executable instructions that can be executed by the processor to implement the method of any one of claims 1-4.

10. A readable storage medium, characterized in that, The readable storage medium stores machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method described in any one of claims 1-4.