CN112929183A - Intelligent network card, message transmission method, device, equipment and storage medium - Google Patents

Intelligent network card, message transmission method, device, equipment and storage medium Download PDF

Info

Publication number
CN112929183A
CN112929183A CN202110105650.2A CN202110105650A CN112929183A CN 112929183 A CN112929183 A CN 112929183A CN 202110105650 A CN202110105650 A CN 202110105650A CN 112929183 A CN112929183 A CN 112929183A
Authority
CN
China
Prior art keywords
message
chip
network
network message
target network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110105650.2A
Other languages
Chinese (zh)
Other versions
CN112929183B (en
Inventor
李兆耕
程钢
李国川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110105650.2A priority Critical patent/CN112929183B/en
Publication of CN112929183A publication Critical patent/CN112929183A/en
Application granted granted Critical
Publication of CN112929183B publication Critical patent/CN112929183B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal

Abstract

The disclosure provides an intelligent network card, a message transmission method, a message transmission device, equipment and a storage medium, relates to the field of network equipment, and can be applied to data centers in the field of cloud computing or cloud. The intelligent network card comprises a first chip and a second chip, wherein the first chip is communicated with a physical machine end, the second chip is communicated with a network end, and the first chip is communicated with the second chip through a high-speed serial bus exchanger. According to the technical scheme disclosed by the invention, in the process of processing the network data stream by the intelligent network card, a CPU (central processing unit) is not required to participate in the processing, so that the performance requirement on the CPU is reduced, and the processing efficiency on the network data stream can be improved.

Description

Intelligent network card, message transmission method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of network device technologies, and in particular, to an intelligent network card, a message transmission method, an apparatus, and a storage medium.
Background
In the related art, the intelligent network card needs a Central Processing Unit (CPU) of the intelligent network card to participate in message processing in the process of receiving or sending the network message. Based on this, the performance requirement of the intelligent network card on the CPU will be increased, so that the limited performance of the CPU becomes the performance bottleneck of the intelligent network card system.
Disclosure of Invention
The disclosure provides an intelligent network card, a message transmission method, a message transmission device, message transmission equipment and a storage medium.
According to one aspect of the disclosure, an intelligent network card is provided, which includes a first chip and a second chip, the first chip communicates with a physical machine end, the second chip communicates with a network end, wherein the first chip and the second chip communicate with each other through a high-speed serial bus exchanger.
According to an aspect of the present disclosure, a method for transmitting a message of an intelligent network card is provided, including:
reading a network message from a physical machine end through a first chip, and writing the network message into a storage module;
sending a first message transmission notice to a second chip through a high-speed serial bus exchanger;
and reading the network message from the storage module through the second chip, and transmitting the first target network message to a network terminal.
According to another aspect of the present disclosure, a method for transmitting a message of an intelligent network card is provided, which includes:
receiving the network message from the network end through the second chip, and writing a second target network message into the storage module;
sending a second message transmission notice to the first chip through the high-speed serial bus exchanger;
and reading the second target network message from the storage module through the first chip, and transmitting the second target network message to the physical machine end.
According to another aspect of the present disclosure, there is provided a message transmission device of an intelligent network card, including:
the network message reading and writing module is used for reading the network message from the physical machine end through the first chip and writing the network message into the storage module;
the first message transmission notification sending module is used for sending a first message transmission notification to the second chip through the high-speed serial bus exchanger;
and the first target network message transmission module is used for reading the network message from the storage module through the second chip and transmitting the first target network message to the network terminal.
According to another aspect of the present disclosure, there is provided a message transmission device of an intelligent network card, including:
the network message reading and writing module is used for reading the network message through the second chip and writing the second target network message into the storage module;
the second message transmission notification sending module is used for sending a second message transmission notification to the first chip through the high-speed serial bus exchanger;
and the second target network message transmission module is used for reading the second target network message from the storage module through the first chip and transmitting the second target network message to the physical machine end.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method according to any one of the embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform a method in any of the embodiments of the present disclosure.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method in any of the embodiments of the present disclosure.
According to the technical scheme disclosed by the invention, in the process of processing the network data stream by the intelligent network card, a CPU (central processing unit) is not required to participate in the processing, so that the performance requirement on the CPU is reduced, and the processing efficiency on the network data stream can be improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram of an intelligent network card according to an embodiment of an aspect of the present disclosure;
fig. 2 is a flowchart of a message transmission method of an intelligent network card according to another embodiment of the present disclosure;
FIG. 3 is a detailed flow chart of invoking a first chip to read and write a network message according to another embodiment of the present disclosure;
FIG. 4 is a detailed flow diagram of invoking a second chip to read a network message and send a first target network message according to another aspect of the present disclosure;
fig. 5 is a flowchart of a message transmission method of an intelligent network card according to another embodiment of the present disclosure;
FIG. 6 is a detailed flow chart of invoking a second chip to read and write a network message according to another aspect of the present disclosure;
FIG. 7 is a detailed flowchart of invoking a first chip to read and send a second target network packet according to another embodiment of the present disclosure;
fig. 8 is a schematic diagram of a message transmission device of an intelligent network card according to another embodiment of the present disclosure;
fig. 9 is a schematic diagram of a message transmission device of an intelligent network card according to another embodiment of the present disclosure;
fig. 10 is a block diagram of an electronic device for implementing the message transmission method of the intelligent network card according to the embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The intelligent network card has become a vital basic device in the field of cloud computing. The intelligent network card can complete the conversion work of network virtualization, so that users of bare metal servers or virtual machines can use the intelligent network card as common network cards. The intelligent network card applied to the cloud computing scene is usually internally provided with a CPU and at least one other chip, and the CPU is connected with each chip by adopting a high-speed serial bus.
In the related art, an intelligent network card having one CPU and two other chips is provided, and the following processing method is generally adopted for a network data stream.
In the process of sending network messages by the intelligent network card, the method for processing the network messages by the intelligent network card comprises the following steps: an application program on a server CPU sends a network message sending request to a first chip, wherein the network message is stored in a server memory; after receiving a network message sending request, the first chip reads the network message from the server Memory by using Direct Memory Access (DMA), and writes the network message into a first chip receiving queue of the intelligent network card storage module by using the DMA; the virtual switch software on the intelligent network card CPU drives the first chip, so that the first chip reads the network message in the first chip receiving queue of the intelligent network card storage module and executes message processing; the virtual switch software on the intelligent network card CPU drives the second chip to make the second chip submit the modified network message sending request and write the network message into the second chip sending queue of the intelligent network card storage module; and after receiving the modified network message sending request, the second chip reads the modified network message from a second chip sending queue of the intelligent network card storage module by using DMA (direct memory access) and sends the modified network message to a network terminal.
In the process of receiving the network message by the intelligent network card, the method for processing the network message by the intelligent network card comprises the following steps: the second chip receives the network message from the network end and writes the network message into a second chip receiving queue of the intelligent network card storage module by using DMA (direct memory access); the virtual switch software on the intelligent network card CPU drives the second chip so that the second chip reads the network message from the second chip receiving queue of the intelligent network card storage module and executes message processing; the virtual switch software on the intelligent network card CPU drives the first chip to make the first chip submit the modified network message sending request and write the network message into the first chip sending queue of the intelligent network card storage module; after receiving the modified network message sending request, the first chip reads the modified network message from the first chip sending queue of the intelligent network card storage module by using DMA (direct memory access), and writes the modified network message into a server memory by using DMA; and driving the first chip by an application program on the CPU of the server so that the first chip reads the modified network message in the memory of the server.
Therefore, in the related art, the intelligent network card needs the CPU of the intelligent network card to participate in the message processing in the process of receiving or sending the network message, so that the performance requirement on the CPU is improved, and the limited performance of the CPU becomes the performance bottleneck of the intelligent network card.
Based on the above problems in the related art, the embodiments of the present disclosure provide an intelligent network card.
As shown in fig. 1, the intelligent network card according to the embodiment of the disclosure includes a first chip and a second chip, where the first chip communicates with a physical machine end, and the second chip communicates with a network end, where the first chip and the second chip communicate with each other through a high-speed serial bus switch.
Illustratively, the first chip and the second chip may be FPGA (Field Programmable Gate Array) chips. It is understood that an FPGA chip is a product of further development on the basis of Programmable devices such as PAL (Programmable Array Logic), GAL (general Array Logic), and the like. The FPGA chip can be used as a semi-custom Circuit in the field of ASIC (Application Specific Integrated Circuit), which can not only solve the disadvantages of custom Circuit, but also overcome the disadvantages of limited gate circuits of the original programmable device.
Further, the basic structure of the first chip and the second chip may include a programmable input/output unit, a configurable logic block, a digital clock management module, an embedded block RAM (Random Access Memory), a wiring resource, an embedded dedicated hard core, a bottom layer embedded functional unit, and the like.
Illustratively, the physical machine end may be a server, for example, other servers such as a bare metal server, a computing server, and the like, and the first chip and the physical machine end may communicate with each other through a high-speed serial bus. In addition, the network side may be an ethernet.
In one specific example, as shown in fig. 1, the physical machine end may be a server, and the server includes a server memory and a server CPU. In the process that the server receives the network message from the intelligent network card, the server CPU calls a first chip of the intelligent network card so that the first chip directly writes the network message into a server memory. In the process that the server sends the network message to the intelligent network card, the server CPU sends a network message sending request to the first chip so as to drive the first chip to read the network message from the server memory.
Illustratively, the high-speed serial bus switch may be a high-speed serial transceiver integrated with the first chip or the second chip. For example, the high-speed serial Transceiver may be a Gigabit Transceiver (GTP) with Low Power, and the Gigabit Transceiver is a configurable hardmac resource integrated in the first chip or the second chip, which may implement serial conversion and parallel conversion of data, and may be used for the first chip and the second chip to implement peer-to-peer communication interaction.
In one example, in the process of sending the network message by the intelligent network card, after receiving a network message sending request from the physical terminal, the first chip reads the network message from the server memory of the physical terminal and writes the network message into the storage module of the intelligent network card, and then directly sends a first message transmission notification to the second chip through the high-speed serial bus exchanger. And responding to the first message transmission notice, the second chip reads the network message from the storage module, executes message processing on the network message to generate a first target network message, and finally sends the first target network message to the network terminal.
In another example, in the process of receiving the network message by the intelligent network card, after receiving the network message from the network side, the second chip performs message processing on the network message, writes the generated second target network message into the storage module of the intelligent network card, and then directly sends a second message transmission notification to the first chip through the high-speed serial bus switch. And responding to the second message transmission notice, the first chip reads the second target network message from the storage module and sends the second target network message to the physical machine end.
According to the intelligent network card of the embodiment of the disclosure, the high-speed serial bus exchanger is arranged between the first chip and the second chip, so that the first chip and the second chip can directly communicate, for example, in the process of sending a network message by the intelligent network card, the first chip can directly send a first message transmission notice to the second chip through the high-speed serial bus exchanger, so that the second chip directly reads and sends the network message to a network end; for another example, in the process of receiving the network message by the intelligent network card, the second chip may directly send the second message transmission notification to the first chip through the high-speed serial bus switch, so that the first chip reads and sends the network message to the physical machine side. Therefore, the process of processing the network data stream by the intelligent network card can be simplified, and a CPU of the intelligent network card is not required to participate in the processing of the network data stream. Therefore, according to the intelligent network card disclosed by the embodiment of the disclosure, the processing efficiency of the intelligent network card on the network data stream can be improved, and the performance requirement on the CPU of the intelligent network card can be reduced.
In one embodiment, the first chip or the second chip has a message processing module, and the message processing module is configured to perform message processing on the network message.
Illustratively, the message processing module is configured to perform encapsulation, routing, header modification, and the like on the network message to generate a first target network message for transmission to the network end, or to generate a second target network message for transmission to the physical end.
In one specific example, the message processing module is integrated with the first chip.
In the process of sending the network message by the intelligent network card, after the first chip reads the network message from the physical machine end, the message processing module is used for executing message processing on the network message to generate a first target network message, and the first target network message is written into the storage module. The first chip sends a first message transmission notification to the second chip using the high speed serial bus switch. And responding to the first message transmission notice, the second chip reads the first target network message from the storage module and sends the first target network message to the network terminal.
In the process of receiving the network message by the intelligent network card, after receiving the network message from the network end, the second chip writes the network message into the storage module, and sends a second message transmission notice to the first chip by using the high-speed serial bus exchanger. And responding to the second message transmission notice, the first chip reads the network message from the storage module, performs message processing on the network message by using the message processing module to generate a second target network message, and sends the second target network message to the physical machine end.
In another specific example, the message processing module is integrated with the second chip.
In the process of sending the network message by the intelligent network card, after the first chip reads the network message from the physical machine end, the network message is written into the storage module, and a first message transmission notice is sent to the second chip by utilizing the high-speed serial bus exchanger. And responding to the first message transmission notice, the second chip reads the network message from the storage module, performs message processing on the network message by using the message processing module to generate a first target network message, and sends the first target network message to the network terminal.
In the process of receiving the network message by the intelligent network card, after the second chip receives the network message from the network terminal, the message processing module is used for executing message processing on the network message to generate a second target network message, and the second target network message is written into the storage module. The second chip sends a second message transmission notification to the first chip using the high speed serial bus switch. And responding to the second message transmission notice, the first chip reads the second target network message from the storage module and sends the second target network message to the physical machine end.
By arranging the message processing module on the first chip or the second chip, the intelligent network card can use the message processing module to perform operations such as encapsulation, routing, header modification and the like on network messages in the process of transmitting or receiving the messages, and a CPU of the intelligent network card is not required to participate in message processing, so that the performance requirement of the intelligent network card on the CPU is further reduced.
In one embodiment, the intelligent network card further comprises a storage module, and the first chip and the second chip utilize the DMA controller to write or read network messages in the storage module.
It is appreciated that a DMA (Direct Memory Access) controller may allow hardware devices of different speeds to communicate without relying on a significant interrupt load of the CPU. A DMA controller transfer copies data from one address space to another. For example, the network packet may be copied from the address space of the first chip or the second chip to the address space of the memory module, or the network packet may be copied from the address space of the memory module to the address space of the first chip or the second chip. In the process of transmitting network messages by using the DMA controller, the DMA controller directly manages the bus, namely, before the DMA controller transmits the network messages, the CPU gives the bus control right to the DMA controller, and after the DMA transmission is finished, the DMA controller immediately gives the bus control right back to the CPU.
Illustratively, in the process of sending the network message by the intelligent network card, the first chip reads the network message from the physical machine end and then writes the network message into the storage module by using the DMA controller. And after the second chip receives the first message transmission notice sent by the first chip, the second chip reads the network message from the storage module by using the DMA controller.
Illustratively, in the process of receiving the network message by the intelligent network card, the second chip receives the network message from the network side, and after generating the second target network message, writes the second target network message into the storage module by using the DMA controller. And after the first chip receives a second message transmission notice sent by the second chip, the first chip reads a second target network message from the storage module by using the DMA controller.
By the embodiment, the efficiency of reading or writing the message in the storage module by the first chip or the second chip can be improved, and the first chip or the second chip is not driven by a CPU (central processing unit), so that the process of sending or receiving the message is simplified, and the message processing efficiency of the intelligent network card is further improved.
According to an embodiment of the present disclosure, the present disclosure further provides a data center, where the data center includes the intelligent network card according to any one of the above embodiments of the present disclosure. The data center can be cloud computing or a data center in the cloud field.
According to the embodiment of the disclosure, the disclosure also provides a message transmission method of the intelligent network card.
As shown in fig. 2, the message transmission method of the intelligent network card includes:
step S201: reading a network message from a physical machine end through a first chip, and writing the network message into a storage module;
step S202: sending a first message transmission notice to a second chip through a high-speed serial bus exchanger;
step S203: and reading the network message from the storage module through the second chip, and transmitting the first target network message to a network terminal.
For example, in step S201, the network packet may be a packet sent from the physical end and transmitted to the network end. And the CPU at the physical machine end generates a message sending request and sends the message sending request to the first chip. And responding to the message sending request, the first chip reads the network message from the memory at the physical machine end and writes the network message into the storage module of the intelligent network card.
Illustratively, in step S202, the first message transmission notification may be generated by the first chip, and the first chip sends the first message transmission notification to the second chip directly through the high-speed serial bus switch.
Illustratively, in step S203, the message processing module may be integrated with the second chip. After the second chip reads the network message from the storage module, the message processing module is used for performing operations such as packaging, routing, header modification and the like on the network message so as to generate a first target network message.
It should be noted that, in other examples of the present disclosure, the message processing module may also be integrated in the first chip. For example, after reading the network packet, the first chip performs packet processing on the network packet by using the packet processing module to generate a first target network packet, and then writes the first target network packet into the storage module. And after reading the first target network message from the storage module, the second chip sends the first target network message to the network terminal.
According to the method of the embodiment of the disclosure, when the physical machine end sends the network message, the first chip can directly read the network message from the memory of the physical machine end and write the network message into the storage module, and the first chip is not required to be driven by the CPU to execute reading and writing operations on the network message. And after writing the network message into the storage module, the first chip can directly send a first message transmission notice to the second chip through the high-speed serial bus exchanger, so that the second chip directly reads the first target network message from the storage module. Thus, the second chip does not need to be driven by the CPU when executing message reading, processing and transmission. Therefore, according to the method disclosed by the embodiment of the invention, in the process that the intelligent network card transmits the network message from the physical machine end to the network end, the CPU is not required to participate in message processing, the requirement of the intelligent network card on the performance of the CPU is favorably reduced, the message processing process is simplified, and the message processing efficiency is improved.
As shown in fig. 3, in one embodiment, step S201 includes:
step S301: the first chip reads the network message from the memory of the physical machine end through the DMA controller and writes the network message into a second chip sending queue of the storage module.
Illustratively, in response to a message sending request sent by the physical machine, the first chip directly reads the network message from the memory of the physical machine through the DMA controller, and writes the network message into the second chip sending queue of the memory module through the DMA controller. It should be noted that, in the related art, the intelligent network card needs to receive the message sending request through the CPU of the intelligent network card, and then drives the first chip to execute the message reading operation through the CPU of the intelligent network card.
As can be seen, in this embodiment, in the process of transmitting the network packet from the physical device end to the network end through the intelligent network card, the first chip may directly read the network packet from the memory on the physical device end through the DMA controller. Therefore, the first chip can directly read and write the network message without waiting for the driving of the CPU of the intelligent network card, so that the process of reading and writing the network message by the first chip is simplified, and the processing efficiency of the intelligent network card on the network message is improved.
As shown in fig. 4, in one embodiment, step S203 includes:
step S401: in response to the first message transmission notification, the second chip reads a network message from a second chip sending queue through the DMA controller;
step S402: executing message processing on the network message through a message processing module to generate a first target network message;
step S403: and transmitting the first target network message to a network terminal through the second chip.
For example, in step S401, the second chip may be directly invoked to perform a network packet reading operation by sending a first packet transmission notification to the second chip. The first message transmission notice can be directly sent to the second chip by the first chip through the high-speed serial bus exchanger. In response to the first message transfer notification, the second chip may read the network message directly from the second chip send queue through the DMA controller.
Illustratively, in step S402, the message processing module may be integrated with the second chip. After the second chip reads the network message, the message processing module performs operations such as packaging, routing, header modification and the like on the network message to generate a first target network message.
Through the embodiment, before the second chip reads the network message from the storage module, the second chip can respond to the first message transmission notice sent by the first chip without waiting for the driving of the intelligent network card CPU, and can directly execute the reading operation of the network message, so that the purpose that the second chip bypasses the CPU to directly read the network message is realized, the requirement on the performance of the CPU is favorably reduced, and the message transmission efficiency of the intelligent network card is further improved.
The following describes a message transmission method of an intelligent network card according to an embodiment of the present disclosure with reference to a specific example.
In the process that the intelligent network card transmits the network message from the physical machine end to the network end, an application program on a CPU (central processing unit) of the physical machine end submits a message sending request to the first chip. And responding to the message sending request, the first chip directly reads the network message from the server memory by using the DMA controller, and writes the network message into a second chip sending queue in the intelligent network card memory module by using the DMA controller. The first chip then sends a first message transmission notification to the second chip through the high speed serial bus switch. In response to the first message transfer notification, the second chip reads a network message from a second chip send queue of the memory module using the DMA controller. And then, the second chip executes message processing on the network message by using the message processing module to generate a first target network message and transmits the first target network message to the network terminal. Therefore, the intelligent network card completes the message transmission process of transmitting the network message from the physical machine end to the network end.
According to the embodiment of the disclosure, the disclosure also provides a message transmission method of the intelligent network card.
As shown in fig. 5, the message transmission method of the intelligent network card includes:
step S501: receiving the network message from the network end through the second chip, and writing a second target network message into the storage module;
step S502: sending a second message transmission notice to the first chip through the high-speed serial bus exchanger;
step S503: and reading the second target network message from the storage module through the first chip, and transmitting the second target network message to the physical machine end.
For example, in step S501, the second chip may receive a network message directly from the network, in other words, the network message may be sent directly from the network to the second chip. After the second chip reads the network message, the message processing module is used for executing message processing on the network message to generate a second target network message, and the second target network message is written into the storage module of the intelligent network card.
Illustratively, in step S502, the second message transmission notification may be generated by the second chip, and the second chip sends the second message transmission notification directly to the first chip through the high-speed serial bus switch. It should be noted that, in the process of transmitting a network message from a network end to a physical machine end, the intelligent network card in the related art needs to feed back information to the CPU of the intelligent network card after the second chip writes the second target network message into the storage module, and then the CPU of the intelligent network card generates a second message transmission notification and sends the second message transmission notification to the first chip.
For example, in step S503, after the first chip reads the second target network packet from the storage module, the second target network packet may be directly written into the memory at the physical machine end without waiting for the CPU of the intelligent network card to send a write instruction to the second target network packet.
It should be noted that in other examples of the present disclosure, the message processing module may be integrated with the first chip. And after receiving the network message from the network terminal, the second chip directly writes the network message into the storage module and sends a second message transmission notice to the first chip. In response to the second message transmission notification, the first chip performs message processing on the network message by using the message processing module to generate a second target network message, and transmits the second target network message to the physical machine end.
According to the message transmission method of the embodiment of the disclosure, the second chip can directly receive the network message sent by the network terminal, generate the second target network message after performing message processing on the network message, and write the second target network message into the storage module, so that the process that the second chip waits for the CPU drive of the intelligent network card is omitted, and the second chip can directly perform processing and write operation on the network message. And after writing the second target network message into the storage module, the second chip can directly send a second message transmission notice to the first chip through the high-speed serial bus exchanger, so that the first chip directly reads the second target network message from the storage module and transmits the second target network message. Therefore, the first chip does not need to be driven by the CPU of the intelligent network card before the reading and the transmission of the second target network message are executed. Therefore, according to the method disclosed by the embodiment of the disclosure, in the process of transmitting the network message from the network end to the physical end by the intelligent network card, the CPU does not need to participate in message processing, the performance requirement on the CPU can be reduced, the message processing process is simplified, and the message processing efficiency is favorably improved.
As shown in fig. 6, in one embodiment, step S501 includes:
step S601: receiving a network message from a network terminal through a second chip;
step S602: executing message processing on the network message through a message processing module to generate a second target network message;
step S603: and writing the second target network message into a first chip sending queue of the storage module through the DMA controller.
Illustratively, in step S602, the message processing module may be integrated with the second chip. After receiving the network message, the second chip may directly perform operations such as encapsulation, routing, and header modification on the network message by using the message processing module to generate a second target network message.
It should be noted that, in the process of transmitting a network message from a network end to a physical machine end, the intelligent network card in the related art needs to drive the second chip to perform message processing and message writing operations through the CPU of the intelligent network card, and then drive the first chip to perform message reading and message transmission operations through the CPU of the intelligent network card.
Through the above embodiment, in the process that the intelligent network card transmits the network message from the network end to the physical machine end, after the second chip receives the network message from the network end, the second chip can directly perform message processing and message writing operations on the network message. Therefore, the second chip can bypass the CPU to directly execute message processing and message writing operation without waiting for the driving of the CPU of the intelligent network card, and the transmission efficiency of the intelligent network card to network messages is improved.
As shown in fig. 7, in one embodiment, step S503 includes:
step S701: in response to the second message transmission notification, the first chip reads a second target network message from the first chip sending queue through the DMA controller;
step S702: and transmitting the second target network message to a physical machine end through the first chip.
For example, in step S701, after receiving the second message transmission notification, the first chip may directly read the second target network message from the first chip sending queue through the DMA controller, so that it is not necessary to wait for the CPU of the intelligent network card to drive the first chip to perform the message reading operation.
In the intelligent network card in the related art, after the second chip writes the second target network message into the storage module, the second chip feeds back information to the CPU of the intelligent network card, and then the CPU generates a second message transmission notification and sends the second message transmission notification to the first chip to drive the first chip to execute a message reading operation.
Through the embodiment, before the first chip reads the second target network message from the storage module, the first chip can directly execute the reading operation of the second target network message in response to the second message transmission notification sent by the second chip without waiting for the driving of the intelligent network card CPU, so that the purpose that the first chip bypasses the CPU to directly read the second target network message is realized, the performance requirement on the CPU is favorably reduced, and the message transmission efficiency of the intelligent network card is further improved.
The following describes a message transmission method of an intelligent network card according to an embodiment of the present disclosure with reference to a specific example.
In the process that the intelligent network card transmits the network message from the network end to the physical machine end, the second chip receives the network message from the network end, performs message processing on the network message by using the message processing module to generate a second target network message, and writes the second target network message into a first chip sending queue in the intelligent network card storage module by using the DMA controller. The second chip then sends a second message transmission notification to the first chip through the high speed serial bus switch. And responding to the second message transmission notice, the first chip reads a second target network message from the first chip sending queue of the intelligent network card memory by using the DMA controller, and writes the second target network message into a memory at a physical machine end by using the DMA controller. Therefore, the intelligent network card completes the message transmission function of transmitting the network message from the network end to the physical machine end.
According to the embodiment of the disclosure, the disclosure also provides a message transmission device of the intelligent network card.
As shown in fig. 8, the message transmission device of the intelligent network card includes:
a network message reading and writing module 801, configured to read a network message from a physical machine end through a first chip, and write the network message into a storage module;
a first message transmission notification sending module 802, configured to send a first message transmission notification to the second chip through the high-speed serial bus switch;
the first target network message transmission module 803 is configured to read a network message from the storage module through the second chip, and transmit the first target network message to the network.
In one embodiment, the network packet reading and writing module 801 is further configured to:
and reading the network message from a memory at the physical machine end through the DMA controller, and writing the network message into a second chip sending queue of the storage module.
In one embodiment, the first target network messaging module 803 includes:
the network message reading submodule is used for responding to the first message transmission notice and reading the network message from the second chip sending queue through the DMA controller;
the first target network message generation submodule is used for executing message processing on the network message through the message processing module to generate a first target network message;
and the first target network message transmission submodule is used for transmitting the first target network message to a network terminal through the second chip.
According to the embodiment of the disclosure, the disclosure also provides a message transmission device of the intelligent network card.
As shown in fig. 9, the message transmission device of the intelligent network card includes:
a network message reading and writing module 901, configured to read a network message through a second chip and write a second target network message into a storage module;
a second message transmission notification sending module 902, configured to send a second message transmission notification to the first chip through the high-speed serial bus switch;
the second target network message transmission module 903 is configured to read a second target network message from the storage module through the first chip, and transmit the second target network message to the physical machine end.
In one embodiment, the network packet reading and writing module 901 further includes:
the network message reading submodule is used for receiving a network message from a network terminal through the second chip;
the second target network message generation submodule is used for executing message processing on the network message through the message processing module to generate a second target network message;
and the second target network message writing submodule is used for writing the second target network message into the first chip sending queue of the storage module through the DMA controller.
In one embodiment, the second target network messaging module 903 further includes:
the second target network message reading submodule is used for reading a second target network message from the first chip sending queue through the DMA controller;
and the second target network message transmission submodule is used for transmitting the second target network message to the physical machine end.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 10 illustrates a schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 10, the electronic device 1000 includes a computing unit 1001 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)1002 or a computer program loaded from a storage unit 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data necessary for the operation of the electronic apparatus 1000 can also be stored. The calculation unit 1001, the ROM 1002, and the RAM 1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
A number of components in the electronic device 1000 are connected to the I/O interface 1005, including: an input unit 1006 such as a keyboard, a mouse, and the like; an output unit 1007 such as various types of displays, speakers, and the like; a storage unit 1008 such as a magnetic disk, an optical disk, or the like; and a communication unit 1009 such as a network card, a modem, a wireless communication transceiver, or the like. The communication unit 1009 allows the electronic device 1000 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
Computing unit 1001 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 1001 executes the respective methods and processes described above, such as the message transmission method of the smart card. For example, in some embodiments, the message transmission method of the smart card may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program may be loaded and/or installed onto electronic device 1000 via ROM 1002 and/or communications unit 1009. When the computer program is loaded into the RAM 1003 and executed by the computing unit 1001, one or more steps of the message transmission method of the smart card described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to perform the message transmission method of the smart network card by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (19)

1. The intelligent network card is characterized by comprising a first chip and a second chip, wherein the first chip is communicated with a physical machine end, the second chip is communicated with a network end, and the first chip is communicated with the second chip through a high-speed serial bus exchanger.
2. The intelligent network card of claim 1, wherein the first chip or the second chip has a message processing module, and the message processing module is configured to perform message processing on a network message.
3. The intelligent network card of claim 1, further comprising a memory module, wherein the first chip and the second chip utilize a DMA controller to write or read network messages in the memory module.
4. A message transmission method of an intelligent network card is characterized by comprising the following steps:
reading a network message from a physical machine end through a first chip, and writing the network message into a storage module;
sending a first message transmission notice to a second chip through a high-speed serial bus exchanger;
and reading the network message from the storage module through the second chip, and transmitting a first target network message to a network terminal.
5. The method of claim 4, wherein reading the network packet from the physical machine side through the first chip and writing the network packet into the storage module comprises:
the first chip reads the network message from a memory at a physical machine end through a DMA controller and writes the network message into a second chip sending queue of the storage module.
6. The method of claim 4, wherein reading the network packet from the storage module via the second chip and transmitting a first target network packet to a network side comprises:
in response to the first message transmission notification, the second chip reads the network message from the second chip transmission queue through a DMA controller;
executing message processing on the network message through a message processing module to generate a first target network message;
and transmitting the first target network message to a network terminal through the second chip.
7. A message transmission method of an intelligent network card is characterized by comprising the following steps:
receiving the network message from the network end through the second chip, and writing a second target network message into the storage module;
sending a second message transmission notice to the first chip through the high-speed serial bus exchanger;
and reading the second target network message from the storage module through the first chip, and transmitting the second target network message to a physical machine end.
8. The method of claim 7, wherein receiving the network packet from the network end via the second chip and writing the second target network packet to the storage module comprises:
receiving a network message from a network terminal through a second chip;
executing message processing on the network message through a message processing module to generate a second target network message;
and writing the second target network message into a first chip sending queue of a storage module through the DMA controller.
9. The method of claim 7, wherein reading the second target network packet from the storage module through the first chip and transmitting the second target network packet to a physical machine side comprises:
in response to the second message transmission notification, the first chip reads the second target network message from the first chip send queue through a DMA controller;
and transmitting the second target network message to a physical machine end through the first chip.
10. A message transmission device of an intelligent network card is characterized by comprising:
the network message reading and writing module is used for reading a network message from a physical machine end through a first chip and writing the network message into the storage module;
the first message transmission notification sending module is used for sending a first message transmission notification to the second chip through the high-speed serial bus exchanger;
and the first target network message transmission module is used for reading the network message from the storage module through the second chip and transmitting the first target network message to a network terminal.
11. The apparatus of claim 10, wherein the network packet reading and writing module is further configured to:
and reading the network message from a memory at the physical machine end through the DMA controller, and writing the network message into a second chip sending queue of the storage module.
12. The apparatus of claim 10, wherein the first target network messaging module comprises:
a network message reading submodule, configured to read, in response to the first message transmission notification, the network message from the second chip transmission queue through a DMA controller;
the first target network message generation submodule is used for executing message processing on the network message through the message processing module to generate a first target network message;
and the first target network message transmission submodule is used for transmitting the first target network message to a network terminal through the second chip.
13. A message transmission device of an intelligent network card is characterized by comprising:
the network message reading and writing module is used for reading the network message through the second chip and writing the second target network message into the storage module;
the second message transmission notification sending module is used for sending a second message transmission notification to the first chip through the high-speed serial bus exchanger;
and the second target network message transmission module is used for reading the second target network message from the storage module through the first chip and transmitting the second target network message to a physical machine end.
14. The apparatus of claim 13, wherein the network packet reading and writing module further comprises:
the network message reading submodule is used for receiving a network message from a network terminal through the second chip;
the second target network message generation submodule is used for executing message processing on the network message through the message processing module to generate a second target network message;
and the second target network message writing submodule is used for writing the second target network message into a first chip sending queue of the storage module through the DMA controller.
15. The apparatus of claim 13, wherein the second target network messaging module further comprises:
a second target network message reading submodule, configured to read the second target network message from the first chip send queue through the DMA controller;
and the second target network message transmission submodule is used for transmitting the second target network message to a physical machine end through the first chip.
16. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 4-6 and/or the method of any one of claims 7-9.
17. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 4-6 and/or the method of any one of claims 7-9.
18. A computer program product comprising a computer program which, when executed by a processor, implements the method of any of claims 4-6 and/or the method of any of claims 7-9.
19. A data center comprising the intelligent network card of any one of claims 1-3.
CN202110105650.2A 2021-01-26 2021-01-26 Intelligent network card, message transmission method, device, equipment and storage medium Active CN112929183B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110105650.2A CN112929183B (en) 2021-01-26 2021-01-26 Intelligent network card, message transmission method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110105650.2A CN112929183B (en) 2021-01-26 2021-01-26 Intelligent network card, message transmission method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112929183A true CN112929183A (en) 2021-06-08
CN112929183B CN112929183B (en) 2023-01-20

Family

ID=76166366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110105650.2A Active CN112929183B (en) 2021-01-26 2021-01-26 Intelligent network card, message transmission method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112929183B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113595694A (en) * 2021-09-28 2021-11-02 阿里巴巴(中国)有限公司 Data transmission method, computing device and storage medium
CN114546920A (en) * 2022-02-20 2022-05-27 中电云数智科技有限公司 Bare metal server data disk hot plug method based on intelligent network card under Feiteng CPU architecture

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004112313A2 (en) * 2003-06-18 2004-12-23 Lenovo (Beijing) Limited A network security equipment and realize method
CN101650698A (en) * 2009-08-28 2010-02-17 曙光信息产业(北京)有限公司 Method for realizing direct memory access
CN103986585A (en) * 2014-05-13 2014-08-13 杭州华三通信技术有限公司 Message preprocessing method and device
WO2018127024A1 (en) * 2017-01-03 2018-07-12 中兴通讯股份有限公司 Error correction method, device based on network port transmission and network port transmission equipment
CN109558344A (en) * 2018-12-03 2019-04-02 郑州云海信息技术有限公司 A kind of DMA transfer method and dma controller suitable for network transmission

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004112313A2 (en) * 2003-06-18 2004-12-23 Lenovo (Beijing) Limited A network security equipment and realize method
CN101650698A (en) * 2009-08-28 2010-02-17 曙光信息产业(北京)有限公司 Method for realizing direct memory access
CN103986585A (en) * 2014-05-13 2014-08-13 杭州华三通信技术有限公司 Message preprocessing method and device
WO2018127024A1 (en) * 2017-01-03 2018-07-12 中兴通讯股份有限公司 Error correction method, device based on network port transmission and network port transmission equipment
CN109558344A (en) * 2018-12-03 2019-04-02 郑州云海信息技术有限公司 A kind of DMA transfer method and dma controller suitable for network transmission

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张佩珩 等: "面向机群互连网络的智能网卡设计", 《计算机工程与应用》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113595694A (en) * 2021-09-28 2021-11-02 阿里巴巴(中国)有限公司 Data transmission method, computing device and storage medium
CN113595694B (en) * 2021-09-28 2022-04-01 阿里巴巴(中国)有限公司 Data transmission method, computing device and storage medium
CN114546920A (en) * 2022-02-20 2022-05-27 中电云数智科技有限公司 Bare metal server data disk hot plug method based on intelligent network card under Feiteng CPU architecture
CN114546920B (en) * 2022-02-20 2024-02-20 中电云计算技术有限公司 Hot plug method for bare metal server data disc under Feiteng CPU architecture based on intelligent network card

Also Published As

Publication number Publication date
CN112929183B (en) 2023-01-20

Similar Documents

Publication Publication Date Title
US11290392B2 (en) Technologies for pooling accelerator over fabric
CN112929183B (en) Intelligent network card, message transmission method, device, equipment and storage medium
US11868297B2 (en) Far-end data migration device and method based on FPGA cloud platform
CN112799840A (en) Method, device, equipment and storage medium for transmitting data
CN114742000B (en) SoC chip verification system, method and device based on FPGA cluster
EP4075759A1 (en) Processor, implementation method, electronic device, and storage medium
CN103092676A (en) Analog input output method, device and system of virtual machine cluster
US10305772B2 (en) Using a single work item to send multiple messages
CN115514718B (en) Data interaction method, control layer and equipment based on data transmission system
JP4412369B2 (en) Distributed processing system, distributed processing method, terminal, and program
CN103299298A (en) Service processing method and system
CN111966502A (en) Method and device for adjusting number of instances, electronic equipment and readable storage medium
CN216623148U (en) Embedded server, intelligent network card, SOC module and electronic equipment
CN115633037A (en) Method, device, virtual gateway equipment, medium and system for forwarding data packet
CN103036815B (en) A kind of information technology and communication technology ICT emerging system
CN112148663A (en) Data exchange chip and server
CN113905040A (en) File transmission method, device, system, equipment and storage medium
CN112835837B (en) Method for establishing data connection, related device and computer program product
CN113676521A (en) Service request response method and device and electronic equipment
US11922237B1 (en) Single-step collective operations
CN116743587B (en) Virtual network interface implementation method and device based on heterogeneous computing accelerator card
CN115664974A (en) Simulation communication method and device, electronic equipment and readable storage medium
CN105045418A (en) SOC (System on Chip) based KVM (Keyboard Video Mouse) implementation system
CN117421268A (en) Interconnection system, equipment and network
CN114327771A (en) Communication method, device, equipment and storage medium of virtual machine and host

Legal Events

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