CN116545932A - Message transmission method and device of network card, computer equipment and storage medium - Google Patents

Message transmission method and device of network card, computer equipment and storage medium Download PDF

Info

Publication number
CN116545932A
CN116545932A CN202310609493.8A CN202310609493A CN116545932A CN 116545932 A CN116545932 A CN 116545932A CN 202310609493 A CN202310609493 A CN 202310609493A CN 116545932 A CN116545932 A CN 116545932A
Authority
CN
China
Prior art keywords
message
target
interface
type
network card
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310609493.8A
Other languages
Chinese (zh)
Inventor
孙崇雨
高磊
陈翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202310609493.8A priority Critical patent/CN116545932A/en
Publication of CN116545932A publication Critical patent/CN116545932A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9026Single buffer per packet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The invention relates to the technical field of network cards, and discloses a message transmission method, a device, computer equipment and a storage medium of the network card, wherein the method comprises the following steps: obtaining a target message; analyzing the target message and determining a target interface type corresponding to the target message; storing the target message in a buffer area corresponding to the target interface type; and carrying out parallel forwarding processing on the first message in each buffer area. The invention provides corresponding buffer areas for each type of interface, processes and forwards the messages in each type of buffer areas respectively, avoids the problem that part of interface channels are unstable due to resource congestion when the message flow is large, reduces the failure rate of each interface channel, reduces the packet loss rate of the equipment corresponding to part of interfaces, and improves the stability of the interfaces.

Description

Message transmission method and device of network card, computer equipment and storage medium
Technical Field
The present invention relates to the field of network cards, and in particular, to a method and apparatus for transmitting a packet of a network card, a computer device, and a storage medium.
Background
Network controller sideband interface technology (Network Controller Sideband Interface, abbreviated as NCSI) is an industry standard for network controller sideband interfaces for server out-of-band management defined by a distributed management task force that defines the control topology, electrical characteristics, message type, message format, etc. of the network controller sideband interface. In practical application, the baseboard management controller (Baseboard Management Controller, abbreviated as BMC) of the server can manage the network card device through the NSCI interface, and meanwhile, the baseboard management controller can also realize network access by means of the NCSI channel of the network card. The network card mainly realizes the forwarding of network messages through an onboard network controller and responds to the control command of the baseboard management controller. The network messages include traffic messaging with the HOST operating system over PCIe (Peripheral Component Interconnect express, high speed serial computer expansion bus standard) lanes and network message interactions with the BMC over NCSI lanes. Meanwhile, a control message is stored in the NCSI channel and is used for realizing the out-of-band management function of the BMC on the network card.
Because the BMC network message and the HOST network message use the same receiving and transmitting buffer area, the message processing adopts the same assembly line, when the network card physical port has a large flow rate on the service, in order to ensure the stability of the network, the network controller can preferentially process the network message in the HOST direction, and the stability of the NCSI channel interface flow rate is affected, thereby causing the jitter of the BMC network.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide a method, an apparatus, a computer device, and a storage medium for transmitting a message of a network card, so as to solve the problem that the stability of a part of interface channels is not high due to interface channel resource competition.
In a first aspect, an embodiment of the present invention provides a method for transmitting a packet of a network card, where the network card includes buffer areas corresponding to interface types of the network card one by one, and the method includes:
obtaining a target message;
analyzing the target message and determining a target interface type corresponding to the target message;
storing the target message in a buffer area corresponding to the target interface type;
and carrying out parallel forwarding processing on the first messages in each buffer area.
The message transmission method of the network card provided by the embodiment of the invention is used for the network card, wherein the network card comprises the buffer areas corresponding to the interface types of the network card one by one, and the target message is firstly obtained and analyzed so as to determine the corresponding interface type of the target message. The method provides corresponding buffer areas for interfaces of various types, processes and forwards the messages in the buffer areas of various types respectively, avoids the problem of unstable part of interface channels caused by resource congestion when the message flow is large, reduces the failure rate of each interface channel, reduces the packet loss rate of equipment corresponding to part of interfaces, and improves the stability of the interfaces.
In some optional embodiments, the analyzing the target message to determine a target interface type corresponding to the target message includes:
analyzing the target message and determining the MAC address corresponding to the target message;
and determining the interface type corresponding to the MAC address based on a preset corresponding table so as to determine the target interface type corresponding to the target message, wherein the preset corresponding table comprises the corresponding relation between the MAC address and the interface type.
In some optional embodiments, the performing parallel forwarding processing on the first packet in each buffer area includes:
and respectively analyzing the target field of the first message in each buffer area based on the pipeline corresponding to each message type to obtain an analysis result of the target field, and forwarding the first message, wherein the analysis result of the target field comprises the target interface type of the first message.
When the target interface type is an NCSI interface and the message type is a network message, forwarding the first message based on the message type includes:
and forwarding the first message to an NCSI interface, and sending the first message to a baseboard management controller by the NCSI interface.
In some optional embodiments, when the target interface type is an NCSI interface, and when the packet type is a control packet, the forwarding the first packet based on the packet type includes:
and sending the first message to a target microprocessor.
In some alternative embodiments, when the network card interface type includes an NCSI interface, the method further includes:
receiving a second message based on the NCSI interface;
storing the second message in a buffer area corresponding to the NCSI interface;
analyzing the second message in the buffer memory area, determining the message type of the second message, and forwarding the second message based on the message type.
In some alternative embodiments, the method further comprises:
acquiring the MAC address of a message corresponding to each type of interface;
and storing the interface type and the corresponding MAC address, and determining a preset corresponding table.
In a second aspect, an embodiment of the present invention provides a packet transmission device of a network card, where the device includes:
the message acquisition module is used for acquiring a target message;
the message analysis module is used for analyzing the target message and determining a target interface type corresponding to the target message;
The message storage module is used for storing the target message in a buffer area corresponding to the type of the target interface;
and the message analysis module is used for carrying out parallel forwarding processing on the first messages in each buffer area.
In a third aspect, an embodiment of the present invention provides a computer apparatus, including: the memory and the processor are in communication connection with each other, the memory stores computer instructions, and the processor executes the computer instructions, so as to execute the message transmission method of the network card according to the first aspect or any implementation manner corresponding to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium, where computer instructions are stored on the computer readable storage medium, where the computer instructions are configured to cause a computer to execute the method for transmitting a packet of a network card according to the first aspect or any one of the embodiments corresponding to the first aspect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a message transmission method of a network card according to some embodiments of the present invention;
fig. 2 is a flow chart of a message transmission method of a network card according to some embodiments of the present invention;
fig. 3 is a flow chart of a message transmission method of a network card according to some embodiments of the present invention;
FIG. 4 is a schematic diagram of a network management module of a server according to some embodiments of the invention;
fig. 5 is a block diagram of a packet transmission device of a network card according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
With the development of network technology, higher requirements are put on the out-of-band manageability and controllability of servers, and through out-of-band management, engineers can be connected to corresponding servers through a network at any place for management and maintenance. NCSI (Network Controller Sideband Interface) is an industry standard for a network controller sideband interface for server out-of-band management defined by the distributed management task force DMTF (Distributed Management Task Force). The standard defines the control topology, electrical characteristics, message type, message format, etc. of the network controller sideband interface. In practical application, the baseboard management controller of the server can manage the network card device through the NCSI interface, and the baseboard management controller can also realize network access by means of the NCSI channel of the network card.
The physical interface of the network card receives and transmits the message on the network cable, when the physical interface of the network card receives the message, the network card interface transmits the optical/electrical signal received on the channel to the PHY module in the network controller, the PHY module demodulates the signal and transmits the signal to the MAC module, and the MAC module converts the electrical signal into digital information to form a network packet. The network packets are placed in a receive buffer within the network controller. In the related art, in order to orderly and rapidly process network packets in a receiving buffer zone, a network controller designs a packet processing pipeline inside the network controller for accelerating processing of the network packets. The pipeline comprises a server analyzer, a Scheduler, a classifier, an ACL access control list, a Filter packet Filter and other modules, and after the operations of checking, analyzing, scheduling, filtering, classifying and the like are completed on the network packet, the analyzed message is delivered to HOST or BMC for processing. Each interface in the network card is provided with a corresponding channel.
The message forwarded to the BMC by the network controller is processed by the NCSI module inside the network controller. If the message format is NCSI control message, then it is sent to the microprocessor embedded in the network controller for processing; if the message format is a network message, the message is forwarded to BMC for processing through NCSI channel.
Otherwise, when HOST or BMC sends network message outwards, the message is put into the sending buffer area. The message in the sending buffer area is also pipelined and then delivered to the MAC-PHY module, and finally sent out through the physical port. When the BMC sends out the control message, the message is also put into a sending buffer area, and then is processed by a pipeline and then is delivered to a microprocessor embedded in the network controller for processing.
When the network card and HOST or BMC transmit messages, the messages are stored in a buffer area and share a pipeline, so when the network card physical interface has a large flow on the service, in order to ensure the stability of the service network, the network controller preferentially processes the network messages in the HOST direction, and the stability of the NCSI channel flow is affected, thereby causing the jitter of the BMC network; on the other hand, because the network card is limited in internal and protocol processing capacity, when the network card driver under the operating system is not loaded, the message processing capacity is limited. In the system initialization stage, in the PXE driving working process and other scenes, the probability packet loss phenomenon can occur when the BMC network is subjected to flow pressure measurement. In summary, there may be a problem of resource contention between the interface channels of each type, so that a problem of network instability may occur in some interface channels.
Based on this, the embodiment of the invention provides a message transmission method of a network card, which aims to solve the problem that part of interface channels are not high in stability due to competition of interface channel resources in the network card.
According to an embodiment of the present invention, there is provided a method for transmitting a message of a network card, it should be noted that, steps shown in a flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and although a logic sequence is shown in the flowchart, in some cases, steps shown or described may be performed in a sequence different from that shown or described herein.
In this embodiment, a method for transmitting a message of a network card is provided, which may be used for a network card, where the network card includes buffer areas corresponding to interface types of the network card one by one, and fig. 1 is a flowchart of a method for transmitting a message of a network card according to an embodiment of the present invention, as shown in fig. 1, where the flowchart includes the following steps:
step S11, obtaining a target message.
The messages sent and received by the network card comprise control messages, network messages and the like. Taking an example that the interface type includes an NCSI interface and a PCIe interface, the control packet may be used to manage the network card, for example: the baseboard management controller implements the out-of-band management function of the network card, and the target message may be a response message to the baseboard management controller. The network packets received and transmitted by the network card may include: network messages between the HOST operating system through the PCIe interface, and network messages between the baseboard management controller through the NCSI interface.
In this embodiment, the target message refers to a message sent to the outside via the network card.
And step S12, analyzing the target message and determining the type of the target interface corresponding to the target message.
After the physical port of the network card receives the target message, the port on the network card transmits the optical/electrical signal received on the channel to the PHY module, the PHY module demodulates the signal and transmits the signal to the MAC module, and the MAC module converts the target message from the electrical signal to digital information.
For the target message converted by the MAC module, the direction of the target message to be sent, namely the type of the target interface, can be determined by analyzing part of the fields of the target message. The number of interfaces of each type may be one or a plurality, and the number of specific interfaces and the number of interface types are not limited.
Specifically, a forwarding engine Switch module may be set in the network controller of the network card, and the Switch module identifies the type of the target interface corresponding to the target message.
Step S13, storing the target message in a buffer area corresponding to the target interface type.
The network controller of the network card is internally provided with buffer areas corresponding to the interface types of the network card one by one, each type of interface is provided with a corresponding buffer area, and after the target interface type corresponding to the target message is determined, the target message is stored in the buffer area corresponding to the interface type.
Step S14, the first message in each buffer area is forwarded in parallel.
And each buffer area can store a plurality of messages, and the first message refers to the message sent from the buffer area, and as each interface type is provided with the corresponding buffer area, the first message sent to the interfaces of different types is required to be processed at the same time, and the first message in each buffer area is processed at the same time and forwarded.
Specifically, before forwarding, operations such as checking, parsing, classifying and the like are performed on the first message. The forwarding direction of the first message may be determined after performing operations such as checking, parsing, classifying, etc. on the first message, where the forwarding direction of the first message is related to the service type of the first message.
After the target message is stored in the buffer, the transmission direction of the target message can be the network card to send to the outside or the outside to send to the inside of the network card, so that the target message can be marked for distinguishing the transmission direction of the message, and an identifier can be arranged on the message after the target message is stored in the buffer to indicate the source of the target message; or, the specific marking mode is not limited, and whether the target message is a sending message or a receiving message is marked. By means of the marking, when messages in different transmission directions exist in the buffer area at the same time, the messages can be accurately sent out according to the correct directions according to the marks in the messages. The marking of the message is equivalent to labeling the message, and is used for recording the attribute of the message, wherein the attribute can comprise a message source, a sending direction and the like.
In the present embodiment, the case where the network card is sent to the outside is described, and in practical cases, there may be both a packet sent to the outside by the network card and a packet sent to the network card by the outside in each buffer area.
The message transmission method of the network card provided by the embodiment of the invention is used for the network card, wherein the network card comprises the buffer areas corresponding to the interface types of the network card one by one, and the target message is firstly obtained and analyzed so as to determine the corresponding interface type of the target message. The method provides corresponding buffer areas for interfaces of various types, processes and forwards the messages in the buffer areas of various types respectively, avoids the problem of unstable part of interface channels caused by resource congestion when the message flow is large, reduces the failure rate of each interface channel, reduces the packet loss rate of equipment corresponding to part of interfaces, and improves the stability of the interfaces.
In this embodiment, a method for transmitting a message of a network card is provided, which may be used for a network card, where the network card includes buffer areas corresponding to interface types of the network card one by one, and fig. 2 is a flowchart of a method for transmitting a message of a network card according to an embodiment of the present invention, as shown in fig. 2, where the flowchart includes the following steps:
Step S21, obtaining a target message.
Please refer to step S11 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S22, analyzing the target message and determining the MAC address corresponding to the target message.
The MAC address is used to define the location of the network device and consists of a 48-bit long, 12-bit 16-ary number. In this embodiment, the destination message refers to a message sent to the outside by the network card, so here, the MAC address corresponding to the destination message refers to the MAC address of the destination interface to which the destination message needs to be sent. The target message carries the corresponding MAC address, the target message is analyzed, part of the fields of the message indicate the MAC address of the message, the fields of the message indicating the target MAC address are analyzed, and the corresponding MAC address is extracted.
The functional module for analyzing the message and forwarding the message can be arranged in the network controller of the network card, and after the functional module receives the message forwarded by other modules, the functional module analyzes key fields in the message and extracts the MAC address corresponding to the message.
When the target message is a message sent to the network card from the outside, the MAC address corresponding to the target message may be the MAC address of the interface through which the target message passes when the target message is sent to the network card from the outside.
Step S23, determining the interface type corresponding to the MAC address based on the preset corresponding table so as to determine the target interface type corresponding to the target message.
The preset corresponding table comprises a corresponding relation between the MAC address and the interface type. The preset corresponding table is stored in the network card, the preset corresponding table stores the MAC address corresponding to each interface type in the network card, after the MAC address corresponding to the target message is determined, the MAC address can be queried from the preset corresponding table, and if the preset corresponding table contains a table item corresponding to the MAC address corresponding to the target message, the interface type corresponding to the MAC address can be determined, namely the target interface type corresponding to the target message. In this embodiment, the type of the interface corresponding to the target packet is the type of the receiving interface of the target packet.
If the preset comparison table does not contain the table item corresponding to the MAC address corresponding to the target message, the message can be forwarded by adopting a broadcasting mode on all interfaces except the target interface in the VLAN.
In this embodiment, a Switch module may be disposed in the network card, where the Switch module has functions of analyzing and forwarding a message, and may be used to process a message transmitted from each direction, analyze a MAC address corresponding to the received message, and forward the message to a corresponding interface according to the MAC address. The Switch module stores a preset corresponding table, and after analyzing and extracting the MAC address corresponding to the message, the interface type corresponding to the MAC address is searched in the preset corresponding table, so that the interface type corresponding to the message is determined, and the message is forwarded to the corresponding interface.
Taking an example that the interface types include an NCSI interface and a PCIe interface, the PCIe interface corresponds to the HOST channel, and the forwarding direction related to the Switch module includes: physical port MAC layer < - > HOST channel, physical port MAC layer < - > NCSI channel. The message received by the physical port can be shunted to the HOST channel or the NCSI channel according to the MAC address; the message sent by the HOST channel or the NCSI channel can be sent to the MAC layer, and the Switch module bears the function of switching and forwarding, which is equivalent to shunting the message by the transfer station. In practical applications, other modules may also be employed to carry out this function.
In some optional embodiments, the method for transmitting a message of the network card further includes: acquiring the MAC address of a message corresponding to each type of interface; and storing the interface type and the corresponding MAC address, and determining a preset corresponding table.
The mapping relation between the MAC address and the interface is stored in the preset corresponding table, the learned corresponding relation between the MAC address and the interface of each message and the information of VLAN to which the interface belongs can be recorded, and the MAC address of the message can be the source MAC address of the message. The preset corresponding table can be used for guiding the forwarding of the message, so that when the message is forwarded, the preset corresponding table can be queried according to the destination MAC address of the message, and if the preset corresponding table contains an interface corresponding to the destination MAC address of the message, the message is forwarded directly through the interface in the table entry.
The messages corresponding to the interfaces of all types refer to the messages sent to the network card through the interfaces, and also refer to the messages sent from the network card through the interfaces, and for the messages in different forwarding directions, different fields of the messages can be analyzed to determine the source MAC address or the destination MAC address of the messages.
And for the functional module storing the preset corresponding table, when receiving the message sent by the network card or the message sent to the network card externally, analyzing the message. For the message sent to the network card through the interface, the source MAC address of the message can be analyzed; for the message sent from the network card through the interface, the destination MAC address of the message can be analyzed. Thereby learning the mapping relationship between each interface type and the MAC address. The preset corresponding table can automatically learn the MAC address and establish the MAC address after acquiring the message.
The preset corresponding table is updatable, and when the interface type corresponding to the MAC address does not exist in the preset corresponding table, the new MAC address and the corresponding interface type are added into the preset corresponding table as a new table entry. Only when a message is received, the learning and refreshing of the preset corresponding table are triggered. In order to adapt to network changes, the preset corresponding table needs to be updated continuously, the table entries generated in the preset corresponding table are not always valid, each table entry has a life cycle, the table entries which still cannot be updated after reaching the life cycle are deleted, and the life cycle can be regarded as aging time. If the record is updated before the life cycle is reached, the aging time of the entry may be recalculated.
Step S24, storing the target message in a buffer area corresponding to the target interface type.
Please refer to step S13 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S25, the first message in each buffer area is forwarded in parallel.
Please refer to step S14 in the embodiment shown in fig. 1 in detail, which is not described herein.
According to the message transmission method of the network card, the target message is analyzed, after the MAC address of the target message is determined, the interface type corresponding to the MAC address is determined based on the preset corresponding table, so that the interface type corresponding to the target message is determined, the distribution of the target message is realized, the target interface type corresponding to the target message is accurately determined, the target message is stored in the buffer areas corresponding to the target interface types, and the messages in the buffer areas are forwarded in parallel. The failure rate of part of interface channels is reduced, and resource competition among the interface channels is avoided.
In some alternative embodiments, step S14 in fig. 1 includes:
and respectively analyzing the target field of the first message in each buffer area based on the pipeline corresponding to each message type to obtain an analysis result of the target field, and forwarding the first message, wherein the analysis result of the target field comprises the target interface type of the first message.
One or more interfaces may exist in the network card, corresponding buffer areas are set for different interface types in the network card, corresponding pipelines are designed for different types of interfaces in the network controller and used for accelerating processing of the message, and the pipelines may include modules such as a packet parser, a Scheduler, a classifier, an ACL access control list, a Filter packet Filter and the like, and perform operations such as checking, parsing, scheduling, filtering and classifying on the message.
Multiple messages may exist in the buffer area at the same time, and the transmission direction of the messages may include two types of sending the network card to the outside and sending the message to the network card from the outside, where the first message in the buffer area refers to a message that needs to be parsed and forwarded currently. The target field of each message identifies the type of the message, different processing modes are adopted for the messages of different types, and the forwarding destinations of the messages are different based on the different processing modes, for example, for a control message, the control message needs to be forwarded to a microprocessor in a network card for processing response. After the target field of the first message is analyzed, the type of the message can be determined, and then the first message is forwarded according to the type of the message.
According to the message transmission method of the network card, the target field of the first message in the buffer area is analyzed based on the pipeline corresponding to each message type, and the message type of the first message is determined; and forwarding the first message based on the message type. Corresponding pipelines are arranged for different types of interfaces, each pipeline has independent analysis and forwarding functions for messages stored in corresponding buffer areas, forwarding processing efficiency of the messages is improved, parallel processing efficiency of the messages is improved to the greatest extent, the problem that part of interface channels are unstable due to resource congestion is avoided, fault rate of each interface channel is reduced, and integrity and correctness of message data are guaranteed.
In some alternative embodiments, when the target interface type is an NCSI interface, and when the message type is a network message, step S32 includes: and forwarding the first message to an NCSI interface, and sending the first message to a baseboard management controller by the NCSI interface.
In this embodiment, taking the target interface type as the NCSI interface as an example, when the message type is determined to be a network message, it indicates that the first message is a network message that the network card performs data transmission with an external device through the NCSI interface, and the external device may be a baseboard management controller. Based on the message type, the first message is forwarded to an NCSI interface and forwarded to a baseboard management controller for processing via the NCSI interface.
In some alternative embodiments, when the target interface type is an NCSI interface, and when the message type is a control message, step S32 includes: and sending the first message to the target microprocessor.
The external device can carry out function management on the network card through the NCSI interface, a control message is sent to the network card in the process, the network card can respond to the control message, meanwhile, the control message is returned, and the control message is forwarded to a microprocessor in the network card for processing. In this embodiment, taking the NCSI interface as an example, when the type of the target interface is determined to be the control message, the first message is forwarded to the target microprocessor, and the target microprocessor responds to the first message based on the NCSI protocol stack. The external device may be a baseboard management controller, and the baseboard management controller may manage management functions of the network card, and in the process, data interaction may occur between the network card and the baseboard management controller.
After the network card is powered on, the microprocessor core initializes the Switch module, the pipeline, the receiving and transmitting buffer and the like, and the microprocessor core can actively acquire the state information of the network card and control the network card, including information reading, power management, remote diagnosis, firmware update and the like, so as to meet the management requirement of the baseboard management controller on the network card.
In this embodiment, a method for transmitting a message of a network card is provided, which may be used for a network card, when a network card interface type includes an NCSI interface, fig. 3 is a flowchart of a method for transmitting a message of a network card according to an embodiment of the present invention, as shown in fig. 3, where the flowchart includes the following steps:
step S31, receiving a second message based on the NCSI interface.
In this embodiment, the second packet refers to a packet sent by the external device to the network card, where the second packet sent by the external device is received by the NCSI sideband interface of the network controller.
The external device may be a baseboard management controller and the second message sent by the baseboard management controller may be received by an NCSI sideband interface.
Step S32, the second message is stored in a buffer area corresponding to the NCSI interface.
After receiving the second message, the second message is first stored in a buffer area corresponding to the NCSI interface, and the second message stored in the buffer area may be marked to indicate the source of the second message, so as to mark the transmission direction of the second message.
Step S33, analyzing the second message in the buffer area, determining the message type of the second message, and forwarding the second message based on the message type.
And each type of interface is provided with a corresponding pipeline so as to analyze and forward the messages in the buffer area corresponding to the interface. The pipeline corresponding to the NCSI interface analyzes the second message in the buffer area, so that the message type of the second message is determined, and the message type can be determined by analyzing the target field in the second message. And forwarding the second message differently according to different message types. When the message type is a control message, the control message is a message sent to the network card by the external equipment for managing the network card, and the second message is sent to a microprocessor in the network card for processing the control message. When the message type is a network message, the network message is an interaction message between the external device and the network card, and the message is sent to a message processing module in the network card, and the message processing module bears a transfer function, and in the embodiment, the message processing module is a Switch module.
According to the message transmission method of the network card, when the network card interface type comprises an NCSI interface, a second message is received based on the NCSI interface; storing the second message in a buffer area corresponding to the NCSI interface; analyzing the second message in the buffer memory area, determining the message type of the second message, and forwarding the second message based on the message type. The method provides a buffer area for the NCSI interface, analyzes the message in the buffer area, reduces the failure rate of the NCSI interface channel, reduces the packet loss rate of the equipment corresponding to the NCSI interface, and improves the stability of the interface.
The message transmission method of the network card provided above is described in the following by way of example.
The network management module of the server is schematically shown in fig. 4, and mainly includes a management controller (abbreviated as MC), and one or more network controllers (Network Controller, abbreviated as NC). The network controller connects the external network interface with the internal host interface on the one hand, and has an out-of-band interface with the management controller on the other hand. Network packets through an out-of-band interface are largely divided into two categories: the network controller only forwards the data packets; another type is the data packets carrying control information that are transmitted between the management controller and the network controller, which are often some modification operations of the configuration of the network controller by the management controller, for which the network controller needs to respond accordingly. The electrical nature of the out-of-band interface between the management controller and the network controller, and the communication protocol, are defined by the NCSI, which provides a corresponding transport protocol stack to ensure such out-of-band management.
In this embodiment, the network card interface type is taken as an NCSI interface as an example, and the external device is a BMC.
A Switch module is added in the network controller chip, and after a physical port receives a message, the message is received by a PHY-MAC layer and then delivered to the Switch module, so that the message in the BMC direction is forwarded; otherwise, the message sent by the BMC to the network card is also sent to the MAC layer through the Switch. After the Switch module, a message processing Pipeline is added to process Pipeline, and an independent receiving and transmitting buffer area is used to realize separation of other interface service networks and NCSI networks, so as to avoid resource competition with the service networks; and a microprocessor core is embedded in the chip to process the control message on the NCSI channel and manage the Switch module, pipeline processing Pipeline and receiving and sending buffer.
The Switch module in the network controller is a forwarding engine, which is used for processing the data frames transmitted in all directions and forwarding the data frames to the correct interface according to the MAC address. The Switch module is internally provided with a MAC forwarding table, namely a preset corresponding table. For learning the MAC address of the NCSI channel. The forwarding direction involved by the Switch module is as follows: physical port MAC layer < - > NCSI channel. Messages received by the physical port may be assigned to the NCSI channel according to the MAC address.
The NCSI channel receives the message forwarded by the Switch module, and then firstly puts the message into a receiving buffer zone of the NCSI, and places a receiving mark to indicate that the message is a network card and is sent to external equipment; pipeline processing Pipeline on NCSI channel can make operations of checking, analyzing, filtering and classifying message identification bit so as to identify message type. When the message type is NCSI control message, the message is delivered to the embedded microprocessor to process response; if the message type is a network message, the message is further forwarded to the NCSI sideband interface and finally received by the BMC. The purpose of pipeline processing on the NCSI channel is to maximize the network packet parallel processing efficiency while maintaining the integrity and correctness of the data.
The NCSI message sent by the BMC is also received by the NCSI sideband interface of the network controller, then the message is put into a receiving buffer area, and a sending mark is put on the message, so that the message is indicated to be sent to the network card by the external equipment. After the message is pipelined, if the message is NCSI control message, the message is handed to an embedded microprocessor to process response; if the message type is a network message, the message is handed to a Switch module and then further sent out through a physical port.
The core of the microprocessor is embedded into the chip to run an NCSI protocol stack, and the NCSI protocol stack is responded to the control message; after the network card is powered on, the microprocessor core initializes the Switch module, pipeline and the receiving and transmitting buffer. The microprocessor core can actively acquire the state information of the network card and control the network card, and the content comprises information reading, power management, remote diagnosis, firmware updating and the like, so that the management requirement of the BMC on the network card is met.
The embodiment provides a novel network controller scheme, and the network controller is separated from the management network by separating the service network in the network controller, so that the resource competition in the network card is avoided. The invention realizes the purpose of stabilizing network connection of BMC through NCSI channel, reduces failure rate of NCSI channel, and further improves management capability and reliability of server. The invention has important significance for the integration of the data center service network and the management network, and is beneficial to the reduction of the management cost of the server. And the network message and the control message are processed separately, so that the internal resource competition of the network controller is avoided, and the stability of the NCSI channel of the network card is improved.
The embodiment also provides a message transmission device of the network card, which is used for implementing the above embodiment and the preferred implementation manner, and the description is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The embodiment provides a message transmission device of a network card, as shown in fig. 5, including:
a message obtaining module 41, configured to obtain a target message;
a message analysis module 42, configured to analyze the target message and determine a target interface type corresponding to the target message;
a message storage module 43, configured to store the target message in a buffer area corresponding to the target interface type;
and the message parsing module 44 is configured to perform parallel forwarding processing on the first message in each buffer.
In some alternative embodiments, the message analysis module 42 includes:
the address determining unit is used for analyzing the target message and determining the MAC address corresponding to the target message;
the type determining unit is configured to determine an interface type corresponding to the MAC address based on a preset correspondence table, so as to determine a target interface type corresponding to the target packet, where the preset correspondence table includes a correspondence between the MAC address and the interface type.
In some alternative embodiments, the message parsing module 44 includes:
the analyzing unit is used for analyzing the target field of the first message in each buffer area based on the pipeline corresponding to each message type to obtain an analysis result of the target field, forwarding the first message, and the analysis result of the target field comprises the target interface type of the first message.
In some optional embodiments, when the target interface type is an NCSI interface and when the packet type is a network packet, the parsing unit includes:
and the first processing subunit is used for forwarding the first message to an NCSI interface, and the NCSI interface sends the first message to a baseboard management controller.
In some optional embodiments, when the target interface type is an NCSI interface and when the packet type is a control packet, the parsing unit includes:
and the second processing unit is used for sending the first message to a target microprocessor.
In some alternative embodiments, when the network card interface type includes an NCSI interface, the apparatus further includes:
the message receiving module is used for receiving a second message based on the NCSI interface;
the second message storage module is used for storing the second message in a buffer area corresponding to the NCSI interface;
and the second message analyzing module is used for analyzing the second message in the buffer memory area, determining the message type of the second message and forwarding the second message based on the message type.
In some alternative embodiments, the apparatus further comprises:
the address acquisition module is used for acquiring the MAC address of the message corresponding to each type of interface;
The preset table determining module is used for storing the interface type and the corresponding MAC address and determining a preset corresponding table.
The message transmission device of the network card in this embodiment is presented as a functional unit, where the unit refers to an ASIC circuit, a processor and a memory that execute one or more software or firmware programs, and/or other devices that can provide the above functions.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The embodiment of the invention also provides a computer device, which is provided with the message transmission device of the network card shown in the figure 5.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 6, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 6.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods shown in implementing the above embodiments.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created from the use of the computer device of the presentation of a sort of applet landing page, and the like. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (10)

1. The message transmission method of the network card is characterized in that the network card comprises buffer areas corresponding to the interface types of the network card one by one, and the method comprises the following steps:
obtaining a target message;
analyzing the target message and determining a target interface type corresponding to the target message;
storing the target message in a buffer area corresponding to the target interface type;
and carrying out parallel forwarding processing on the first messages in each buffer area.
2. The method of claim 1, wherein the analyzing the target message to determine the target interface type corresponding to the target message comprises:
analyzing the target message and determining the MAC address corresponding to the target message;
and determining the interface type corresponding to the MAC address based on a preset corresponding table so as to determine the target interface type corresponding to the target message, wherein the preset corresponding table comprises the corresponding relation between the MAC address and the interface type.
3. The method of claim 1, wherein the parallel forwarding of the first packet in each buffer zone includes:
and respectively analyzing the target field of the first message in each buffer area based on the pipeline corresponding to each message type to obtain an analysis result of the target field, and forwarding the first message, wherein the analysis result of the target field comprises the target interface type of the first message.
4. The method of claim 3, wherein when the target interface type is an NCSI interface and when the message type is a network message, the forwarding the first message based on the message type comprises:
and forwarding the first message to an NCSI interface, and sending the first message to a baseboard management controller by the NCSI interface.
5. The method of claim 3, wherein when the target interface type is an NCSI interface and when the message type is a control message, the forwarding the first message based on the message type comprises:
and sending the first message to a target microprocessor.
6. The method of claim 1, wherein when the network card interface type comprises an NCSI interface, the method further comprises:
Receiving a second message based on the NCSI interface;
storing the second message in a buffer area corresponding to the NCSI interface;
analyzing the second message in the buffer memory area, determining the message type of the second message, and forwarding the second message based on the message type.
7. The method according to claim 2, wherein the method further comprises:
acquiring the MAC address of a message corresponding to each type of interface;
and storing the interface type and the corresponding MAC address, and determining a preset corresponding table.
8. A message transmission device of a network card, the device comprising:
the message acquisition module is used for acquiring a target message;
the message analysis module is used for analyzing the target message and determining a target interface type corresponding to the target message;
the message storage module is used for storing the target message in a buffer area corresponding to the type of the target interface;
and the message analysis module is used for carrying out parallel forwarding processing on the first messages in each buffer area.
9. A computer device, comprising:
the network card comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions, so that the message transmission method of the network card of any one of claims 1 to 7 is executed.
10. A computer-readable storage medium, wherein computer instructions are stored on the computer-readable storage medium, and the computer instructions are configured to cause a computer to perform the method for transmitting a message of the network card according to any one of claims 1 to 7.
CN202310609493.8A 2023-05-26 2023-05-26 Message transmission method and device of network card, computer equipment and storage medium Pending CN116545932A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310609493.8A CN116545932A (en) 2023-05-26 2023-05-26 Message transmission method and device of network card, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310609493.8A CN116545932A (en) 2023-05-26 2023-05-26 Message transmission method and device of network card, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116545932A true CN116545932A (en) 2023-08-04

Family

ID=87446944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310609493.8A Pending CN116545932A (en) 2023-05-26 2023-05-26 Message transmission method and device of network card, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116545932A (en)

Similar Documents

Publication Publication Date Title
CN111352889B (en) Equipment management method, equipment, device and medium based on MCTP (Multi-port technology protocol)
CN100553199C (en) Method of realizing group broadcasting, system and equipment based on the PCIE switching network
CN113810791B (en) Method for improving intelligent network card/DPU network telemetering technology performance
CN111294235B (en) Data processing method, device, gateway and readable storage medium
CN109379764B (en) Message sending method and device
WO2018171641A1 (en) Method and device for transmitting and receiving network management information, transmitting apparatus and receiving apparatus
CN109474614B (en) Multi-protocol analysis method and system
CN111026324B (en) Updating method and device of forwarding table entry
CN102333210B (en) Video data storage method and equipment
CN106656714A (en) Communication protocol method and system based on EtherCAT bus
US20180225247A1 (en) Packet forwarding
US20200244579A1 (en) Flexible Ethernet Frame Forwarding Method and Apparatus
CN113347258A (en) Method and system for data acquisition, monitoring and analysis under cloud flow
CN101741745A (en) Method and system for identifying application traffic of peer-to-peer network
CN111092952B (en) Data interaction method and related product
CN116545932A (en) Message transmission method and device of network card, computer equipment and storage medium
CN116647490A (en) Aviation AFDX network data detection system
US8625619B2 (en) Domain gateway control system and method thereof
CN112543142B (en) Method and device for realizing RSTP ring network protocol based on FPGA
CN111865801B (en) Virtio port-based data transmission method and system
CN114125078A (en) MAC address learning method and device
US9385968B2 (en) Methods and devices for connecting to multiple interfaces
CN114785396B (en) Logic port configuration, lookup mapping and traffic management method, system and terminal
CN112929197A (en) Network communication method, device, equipment and storage medium
CN107005476A (en) Method and the first equipment for the data frame in switched network management network

Legal Events

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