A multi-network card network integration device and network card communication method
By introducing the waiting state and the control command retransmission characteristics of the NCSI protocol in the multi-Nannary Card network integrated architecture, the bus competition problem during network card state switching is solved, and higher communication reliability is achieved.
Patent Information
- Application Number
- CN202411623378.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2044-11-14
AI Technical Summary
In the multi-network integrated architecture, under the influence of external factors in network conditions, bus competition may occur during the switching state of the network card, resulting in packet loss in communication and affecting communication reliability.
By introducing a waiting state into the network card and using the control command retransmission feature of the NCSI protocol to detect bus competition, it is ensured that the network card only switches to the on state after it is determined that the RMII bus is correctly occupied and sends network messages.
It effectively reduces the packet loss rate and improves the reliability of network communication without adding additional hardware structure.
Smart Images

Figure CN119135459B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network communication technology, and in particular to a multi-network card network integration device and a network card communication method. Background Art
[0002] At present, with the development of server network functions, there may be a situation where the server provides more than two network cards to the outside. These multiple network cards are connected to the BMC (Baseboard Management Controller) inside the server through the RMII bus, and different users can access the BMC through time-sharing multiplexing.
[0003] When the server adopts this multi-NIC network integration architecture, the BMC needs to arbitrate multiple NICs in order to distinguish which NIC the network traffic comes from and to avoid bus competition. Since most NICs may not support hardware arbitration, command arbitration is more commonly used. The principle of command arbitration is: BMC sends a selection command to one of the NICs that needs to communicate and sends a shutdown command to other NICs. Each NIC that receives the shutdown command releases the RMII bus and no longer sends data to the RMII bus, while the NIC that receives the selection command normally occupies the RMII bus to communicate with the BMC.
[0004] In theory, the bus contention problem between different network cards can be avoided through the above command arbitration process. However, in reality, due to external factors such as network conditions, when the network card that receives the enable command starts to occupy the RMII bus to communicate with the BMC, it is possible that other network cards have not yet successfully released the RMII bus and are still sending data to the RMII bus. This will seriously interfere with other network cards on the same RMII bus, resulting in communication packet loss between the network card that receives the enable command and should normally occupy the RMII bus and the BMC, affecting communication reliability. Summary of the invention
[0005] In view of the above problems and technical requirements, this application proposes a multi-network card network integration device and a network card communication method. The technical solution of this application is as follows:
[0006] A multi-network card network integration device, the multi-network card network integration device comprises a baseboard management controller BMC and multiple network cards, the multiple network cards share a RMII bus to connect to the BMC;
[0007] BMC, used to send a gating command to one of the target network cards and a shutdown command to other network cards according to the NCSI protocol;
[0008] The network card currently in the on state and receiving the off command is used to switch from the on state to the off state in response to the off command; the network card currently in the off state and receiving the off command is used to remain in the off state in response to the off command; any network card is used to store the network messages received when in the off state in their respective local caches;
[0009] The target network card which is currently in the shutdown state and receives the gating command is used to switch from the shutdown state to the waiting state in response to the gating command, and send the network message in its local cache to the BMC according to the NCSI protocol;
[0010] The BMC is also used to retransmit the gating command according to the control command retransmission feature of the NCSI protocol when the time duration for not receiving the response information replied by the target network card after sending the gating command reaches the maximum waiting time duration;
[0011] The target network card that receives the enable command is also used to switch from the waiting state to the on state and release its own local cache if it does not receive the enable command again within a predetermined time after sending a network message to the BMC in response to the enable command, and directly send the network message received when in the on state to the BMC according to the NCSI protocol.
[0012] A network card communication method for a multi-network card network integration device, wherein multiple network cards in the multi-network card network integration device share a RMII bus to connect to a BMC, and the network card communication method executed by any network card includes:
[0013] After being in the on state and receiving a shutdown command sent by the BMC according to the NCSI protocol, switching from the on state to the off state in response to the shutdown command, and storing the network messages received when in the off state in the local cache of the network card;
[0014] After being in the shutdown state and receiving the shutdown command sent by the BMC according to the NCSI protocol, responding to the shutdown command to maintain the shutdown state, and storing the network messages received when in the shutdown state in the local cache of the network card;
[0015] After the current state is in the off state and the gating command sent by the BMC is received according to the NCSI protocol, the network message in the local cache is switched from the off state to the waiting state and the network message in the local cache is sent to the BMC according to the NCSI protocol; after the network message is sent to the BMC in response to the gating command, the gating command retransmitted by the BMC after the time period reaches a predetermined time period, the network message is switched from the waiting state to the on state and the local cache is released, and the network message received when in the on state is directly sent to the BMC according to the NCSI protocol;
[0016] Among them, when the time for which the BMC does not receive the response information replied by the target network card after sending the gating command reaches the maximum waiting time, the gating command is retransmitted according to the control command retransmission feature of the NCSI protocol.
[0017] The beneficial technical effects of this application are:
[0018] The present application discloses a multi-NIC network integration device and a NIC communication method. The multi-NIC network integration device is based on a hardware architecture in which a BMC connects multiple NICs through an RMII bus and communicates according to an NCSI protocol. The NIC first switches to a newly added waiting state under a selection command and temporarily suspends the release of a local cache. Then, the control command retransmission feature of the NCSI protocol is used to detect whether there is a packet loss caused by bus competition between different NICs. Only after determining that the RMII bus is correctly occupied and communicating with the BMC, the NIC will officially switch to a conducting state to release the local cache and then directly send the received network message. This method does not require the addition of additional hardware structure, and can effectively reduce the packet loss rate and improve the reliability of network communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 The figure is a schematic diagram of the connection architecture of a multi-NIC network integration device in an example.
[0020] Figure 2 It is a communication flow chart between the BMC and the target network card in a multi-network card network integration device in one embodiment of the present application.
[0021] Figure 3 It is a communication flow chart between the BMC and the target network card in a multi-network card network integration device in another embodiment of the present application. DETAILED DESCRIPTION
[0022] The specific implementation of the present application is further described below in conjunction with the accompanying drawings.
[0023] This application discloses a multi-network card network integration device, please refer to Figure 1 The device architecture diagram shown in the figure shows that the multi-NIC network integration device includes a BMC (Baseboard Management Controller) and multiple NICs. The multiple NICs share the RMII bus to connect to the BMC. Figure 1 Take the multi-NIC network integrated device including four NICs, denoted as NIC 1, NIC 2, NIC 3, and NIC 4, as an example. BMC uses RMII bus to communicate with NIC according to NCSI protocol. The data on RMII bus is divided into two types, one is NCSI control message, and the other is network message for BMC to communicate with the outside world.
[0024] The working process of the multi-NIC network integration device is as follows, please refer to Figure 2 The communication flow chart between BMC and target network card is shown as follows:
[0025] BMC is used to send a gating command to one of the target network cards and a shutdown command to other network cards according to the NCSI protocol. The target network card can refer to any network card connected to the BMC and is determined according to the actual functional requirements, such as Figure 1 Taking network card 1 as the target network card for example, the BMC sends an enable command to network card 1, and sends a shutdown command to network cards 2, 3, and 4.
[0026] The enable and shutdown commands sent by the BMC to the network card are both NCSI control messages. Each NCSI control message has its own unique IID (Instance ID) to distinguish it from other NCSI control messages.
[0027] The network card that is currently in the on state and has received the shutdown command is used to switch from the on state to the off state in response to the shutdown command. The network card that is currently in the off state and has received the shutdown command is used to remain in the off state in response to the shutdown command. When any network card is in the off state, if it still receives network messages for communication with the outside world, it will temporarily postpone sending them to the BMC, and instead store the network messages received when it is in the off state in their respective local caches.
[0028] For the target network card that is currently in the off state and receives the gating command, after receiving the gating command, it switches from the off state to the waiting state in response to the gating command, and sends the network message in its local cache to the BMC according to the NCSI protocol. In fact, according to the communication mechanism of the NCSI protocol, the target network card will also respond to the gating command to reply with a response message and then send the network message in the local cache. This application will not distinguish and describe this part in detail.
[0029] According to conventional practice, after the target network card sends the network message in its local cache to the BMC, it releases the local cache and then directly switches from the off state to the on state. In order to ensure the continuity of communication, the multi-network card network integration device generally switches from selecting one network card to selecting another network card, so generally the selection command and the shutdown command are issued at the same time. In theory, each network card will perform synchronous switching in response to the commands received by each network card, that is, when the target network card switches from the off state to the on state, other network cards will switch from the on state to the off state, thereby realizing the network card switching. However, when there is a network delay, it may happen that when the target network card receives the selection command and starts the state switching, the network card currently in the on state has not received the shutdown command and is still occupying the RMII bus, resulting in the communication between the target network card and the BMC being interfered by other network cards and causing packet loss. Therefore, in this application, the target network card does not operate according to conventional practices, but adds a waiting state. After entering the waiting state and sending the network message in the local cache, the target network card does not release the local cache first, but waits until it successfully switches to the on state before releasing the local cache.
[0030] Moreover, the target network card will continue to receive network messages while in the waiting state. The continuously received network messages are directly sent to the BMC according to the NCSI protocol, and are also stored in its own local cache.
[0031] After the target NIC sends the network message in its local cache to the BMC, two situations may occur:
[0032] (1) The communication between the target network card and the BMC is not interfered by other network cards. In this case, the BMC will successfully receive the response information replied by the target network card, where the response information includes the above-mentioned reply information and the network message in the local cache sent by the target network card.
[0033] In order to avoid errors caused by communication delays, a custom maximum waiting time can be introduced. When the BMC receives the response information from the target network card within the maximum waiting time after sending the strobe command, the BMC can determine that the target network card has successfully occupied the RMII bus. At this time, the BMC and the target network card can communicate normally without being interfered by other network cards. Therefore, in this case, the BMC waits for the network message transmitted by the target network card after receiving the response information from the target network card.
[0034] (2) The communication between the target network card and the BMC is interfered by other network cards. In this case, the BMC cannot successfully receive the response information replied by the target network card, where the response information includes the above-mentioned reply information and the network message in the local cache sent by the target network card.
[0035] When the BMC does not receive the response information from the target network card for a period of time that reaches the maximum waiting time after sending the strobe command, it is determined that the response information from the target network card cannot be successfully received. At this time, the BMC can determine that the target network card has not successfully occupied the RMII bus, and there is still a bus competition problem between network cards. If the target network card is directly switched to the on state at this time, the probability of packet loss is high, affecting communication reliability. Therefore, the BMC will retransmit the strobe command to the target network card based on the control command retransmission characteristics of the NCSI protocol.
[0036] As for the target network card, after it sends the network message in the local cache to the BMC in response to the selection command, it cannot be determined whether the network message is successfully received by the BMC, that is, it cannot directly determine which of the above situations has occurred. Therefore, the target network card will wait for the next operation of the BMC and determine whether there is bus contention according to the operation of the BMC.
[0037] (1) When the communication between the target network card and the BMC is not interfered by other network cards, the target network card will not receive the gating command again because the BMC will not time out and retransmit after receiving the response information replied by the target network card. Then, after the target network card sends the network message in the local cache to the BMC in response to the gating command, when the time without receiving the gating command again reaches the predetermined time, it can be determined that the BMC has received the response information replied by itself normally. The predetermined time can be customized and is greater than the maximum waiting time of the BMC.
[0038] At this time, the target network card can determine that it has successfully occupied the RMII bus and can communicate normally with the BMC without being interfered by other network cards, so it releases the local cache after switching from the waiting state to the on state. After the target network card switches to the on state, it will directly send the network message received in the on state to the BMC according to the NCSI protocol.
[0039] (2) When the communication between the target network card and the BMC is interfered by other network cards, the BMC will retransmit the strobe command to the target network card according to the control command retransmission characteristics of the NCSI protocol. Correspondingly, the target network card will receive the strobe command again within a predetermined time after sending a network message to the BMC in response to the currently received strobe command. At this time, the target network card can determine that there is still a bus contention problem. In order to avoid packet loss, it continues to wait. Since the target network card has not released the local cache, it will resend the network message in the local cache to the BMC in response to the currently received strobe command, avoiding data loss. Since the target network card will continue to store the network messages continuously received during the waiting process in the local cache, the network messages in the local cache resent by the target network card to the BMC include not only the network messages sent last time, but also the new network messages continuously received during this period.
[0040] In actual applications, when the target network card resends the network message in the local cache to the BMC, there may still be two situations where the BMC successfully receives the message or fails to receive the message, that is, the above process will be repeated. However, according to the NCSI protocol's provisions on the control command retransmission feature, the number of times the BMC retransmits the same strobe command after a timeout has an upper limit, which is defined as the control command retransmission threshold. The control command retransmission threshold is usually set to 3 or can be customized.
[0041] Therefore please refer to Figure 3 As shown in the communication flow chart, when the time for which the BMC has not received a response message after sending a strobe command to the target network card reaches the maximum waiting time, and when it is detected that the number of consecutive timeout retransmissions of the strobe command does not reach the control command retransmission threshold of the NCSI protocol, that is, when there is still bus contention and the upper limit of the timeout retransmission is not reached, the strobe command is retransmitted based on the control command retransmission characteristics of the NCSI protocol.
[0042] When it is detected that the number of consecutive timeout retransmissions of the gating command reaches the control command retransmission threshold of the NCSI protocol, the timeout retransmission operation can no longer be performed. The BMC will regenerate the gating command and shutdown command according to the communication requirements and send them to each corresponding network card. The communication requirements at this time may be the same as the last time, that is, the gating command is still sent to the target network card and the shutdown command is sent to other network cards, and the above process is re-executed. The communication requirements may also change, that is, other network cards are reselected for communication, and the gating command is sent to the reselected network card for communication, and the shutdown command is sent to the current target network card.
[0043] However, regardless of whether the BMC retransmits the same enable command after a timeout or sends a new command, the target network card will receive the enable command or shutdown command sent by the BMC within the predetermined time after sending the network message to the BMC:
[0044] When the target network card receives the strobe command again within the predetermined time after sending the network message to the BMC, the strobe command may be retransmitted by the BMC after timeout, or it may be regenerated by the BMC after the timeout retransmission reaches the control command retransmission count threshold. Although the generation mechanism is different, the target network card does not need to be distinguished in detail, and the operation mechanism is the same, which is to maintain a waiting state and resend the network message in the local cache to the BMC in response to the currently received strobe command.
[0045] As mentioned above, after the BMC reaches the control command retransmission count threshold after the timeout retransmission, it may also send a shutdown command to the target network card due to changes in communication requirements. Therefore, the target network card may also receive a shutdown command within a predetermined period of time after sending a network message to the BMC in the waiting state. In response to the currently received shutdown command, the target network card retains the network message in the local cache and switches from the waiting state to the shutdown state.
[0046] The present application also discloses a network card communication method for a multi-network card network integration device, which is a method executed by any network card in the multi-network card network integration device:
[0047] When the network card is currently in the on state and receives the shutdown command sent by the BMC according to the NCSI protocol, it switches from the on state to the off state in response to the shutdown command, and stores the network messages received when it is in the off state in the local cache of the network card. When the network card is currently in the off state and receives the shutdown command sent by the BMC according to the NCSI protocol, it maintains the off state in response to the shutdown command, and stores the network messages received when it is in the off state in the local cache of the network card. The specific execution method corresponds to the method executed by any network card that receives the shutdown command in the above-mentioned multi-network card network integration device, and this embodiment will not be repeated here.
[0048] When the network card is currently in the off state and receives the gating command sent by BMC according to the NCSI protocol, it switches from the off state to the waiting state and sends the network message in the local cache to BMC according to the NCSI protocol. When the network card sends a network message to BMC in response to the gating command and the duration of the gating command that BMC timed out and retransmitted reaches a predetermined duration, it switches from the waiting state to the on state and releases the local cache, and the network message received when it is in the on state is directly sent to BMC according to the NCSI protocol. Among them, when the duration of the response information that BMC does not receive the reply of the target network card after sending the gating command reaches the maximum waiting duration, the gating command is retransmitted according to the control command retransmission characteristic of the NCSI protocol. The specific execution method corresponds to the method executed by the target network card in the above-mentioned multi-network card network integration device, and this embodiment will not be repeated here.
[0049] In another embodiment, when the network card is the target network card that receives the gating command, the network card switches from the waiting state to the on state when no other gating commands are received within a predetermined time after the network message in the local cache is sent to the BMC in response to the currently received gating command. When the gating command is received again within a predetermined time after the network message in the local cache is sent to the BMC in response to the currently received gating command, the network card maintains the waiting state and re-sends the network message in the local cache to the BMC in response to the currently received gating command.
[0050] In another embodiment, when the network card is the target network card that receives the gating command, when the network card receives a shutdown command sent by the BMC within a predetermined time after sending a network message to the BMC, the network card retains the network message in the local cache and switches from the waiting state to the shutdown state in response to the currently received shutdown command.
[0051] In another embodiment, when the network card is the target network card that receives the gating command, the network card continues to receive network messages while in the waiting state, sends the received network messages directly to the BMC according to the NCSI protocol, and stores them in its own local cache.
[0052] The implementation manner of the network card when receiving the gating command in the above-mentioned various embodiments can refer to the implementation manner of the target network card in the multi-network card network integration device, which will not be described in detail in this embodiment.
[0053] The above is only a preferred embodiment of the present application, and the present application is not limited to the above embodiments. It is understood that other improvements and changes directly derived or associated by those skilled in the art without departing from the spirit and concept of the present application should be considered to be included in the protection scope of the present application.
Claims
1. A multi-network card network integration device, characterized in that: The multi-NIC network integration device comprises a baseboard management controller BMC and multiple network cards, and the multiple network cards share a RMII bus to connect to the BMC; BMC, used to send a gating command to one of the target network cards and a shutdown command to other network cards according to the NCSI protocol; A network card that is currently in an on state and receives a shutdown command, configured to switch from the on state to the off state in response to the shutdown command; The network card that is currently in the shutdown state and receives the shutdown command is used to maintain the shutdown state in response to the shutdown command; any network card is used to store the network messages received when in the shutdown state in their respective local caches; The target network card that is currently in the off state and receives the gating command is used to switch from the off state to the waiting state in response to the gating command, and send the network message in its own local cache to the BMC according to the NCSI protocol without releasing the local cache first, and wait until it is successfully switched to the on state before releasing the local cache; When the BMC receives the response information replied by the target network card within the maximum waiting time after sending the gating command, it is determined that the communication between the target network card and the BMC is not interfered by other network cards, and it is determined that the target network card has successfully occupied the RMII bus. After receiving the response information replied by the target network card, the BMC waits for the network message transmitted by the target network card; When the BMC does not receive the response information replied by the target network card for a period of time that reaches the maximum waiting period after sending the gating command, it is determined that the communication between the target network card and the BMC is interfered by other network cards, and the gating command is retransmitted after a timeout according to the control command retransmission characteristic of the NCSI protocol; The target network card that receives the enable command is also used to switch from the waiting state to the on state and release its own local cache when it does not receive the enable command again within a predetermined time after sending a network message to the BMC in response to the enable command, and send the network message received when in the on state directly to the BMC according to the NCSI protocol.
2. The multi-NIC network integration device according to claim 1, characterized in that: The target network card is further configured to maintain a waiting state and resend the network message in the local cache to the BMC in response to the received gating command when receiving the gating command again within a predetermined time after sending the network message to the BMC in response to the currently received gating command.
3. The multi-NIC network integration device according to claim 2, characterized in that: The BMC is used to execute the step of retransmitting the gating command with timeout according to the control command retransmission characteristic of the NCSI protocol when the time duration for not receiving the response information after sending the gating command to the target network card reaches the maximum waiting time duration and it is detected that the number of consecutive timeout retransmissions of the gating command does not reach the control command retransmission number threshold of the NCSI protocol.
4. The multi-NIC network integration device according to claim 3, characterized in that: The BMC is also used to regenerate the gating command and the shutdown command and send them to the corresponding network card when the time duration for not receiving the response information after sending the gating command to the target network card reaches the maximum waiting time duration, and when it is detected that the number of consecutive timeout retransmissions of the gating command reaches the control command retransmission number threshold of the NCSI protocol.
5. The multi-NIC network integration device according to claim 4, characterized in that: The target network card is further configured to retain the network message in the local cache and switch from the waiting state to the shutdown state in response to the currently received shutdown command when receiving the shutdown command sent by the BMC within a predetermined time period after sending the gating command to the target network card.
6. The multi-NIC network integration device according to claim 1, characterized in that: The target network card continuously receives network messages while being in the waiting state, directly sends the received network messages to the BMC according to the NCSI protocol, and stores the received network messages in its own local cache.
7. A network card communication method for a multi-network card network integration device, characterized in that: Multiple network cards in a multi-network card network integration device share a RMII bus to connect to the BMC, and a network card communication method executed by any network card includes: After being in the on state and receiving a shutdown command sent by the BMC according to the NCSI protocol, switching from the on state to the off state in response to the shutdown command, and storing the network messages received when in the off state in the local cache of the network card; After being in a shutdown state and receiving a shutdown command sent by the BMC according to the NCSI protocol, maintaining the shutdown state in response to the shutdown command, and storing the network messages received when in the shutdown state in the local cache of the network card; After being in the off state and receiving the gating command sent by the BMC according to the NCSI protocol, switching from the off state to the waiting state and sending the network message in the local cache to the BMC according to the NCSI protocol without releasing the local cache first, waiting until the local cache is released after successfully switching to the on state; when the gating command is not received again within a predetermined time after sending the network message to the BMC in response to the gating command, switching from the waiting state to the on state and releasing the local cache, and sending the network message received when in the on state directly to the BMC according to the NCSI protocol; Among them, the target network card is one of the network cards that is currently in the shutdown state and receives the enable command sent by the BMC. When the BMC does not receive the response information replied by the target network card after sending the enable command, the enable command is retransmitted according to the control command retransmission characteristics of the NCSI protocol.
8. The network card communication method according to claim 7, characterized in that: The network card communication method further includes: When no other gating command is received within a predetermined time after the network message in the local cache is sent to the BMC in response to the currently received gating command, switching from the waiting state to the conducting state; When receiving a strobe command again within a predetermined time after sending a network message to the BMC in response to the currently received strobe command, the waiting state is maintained and the network message in the local cache is resent to the BMC in response to the currently received strobe command.
9. The network card communication method according to claim 8, characterized in that: The network card communication method further includes: When a shutdown command sent by the BMC is received within a predetermined time period after the network message is sent to the BMC, the network message in the local cache is retained in response to the currently received shutdown command and the state is switched from the waiting state to the shutdown state.
10. The network card communication method according to claim 7, characterized in that: The network card continuously receives network messages while being in the waiting state, directly sends the received network messages to the BMC according to the NCSI protocol, and stores the messages in its own local cache.
Citation Information
Patent Citations
Channel selection method and device under multiple network cards, server and storage medium
CN116633999A
Server NCSI signal switching control method and device, electronic equipment and storage medium
CN116962500A