[go: up one dir, main page]

CN115412502A - Network port expansion and message rapid equalization processing method - Google Patents

Network port expansion and message rapid equalization processing method Download PDF

Info

Publication number
CN115412502A
CN115412502A CN202211359114.6A CN202211359114A CN115412502A CN 115412502 A CN115412502 A CN 115412502A CN 202211359114 A CN202211359114 A CN 202211359114A CN 115412502 A CN115412502 A CN 115412502A
Authority
CN
China
Prior art keywords
dpdk
queue
qdma
module
virtual 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
CN202211359114.6A
Other languages
Chinese (zh)
Other versions
CN115412502B (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.)
Zhejiang Lab
Original Assignee
Zhejiang Lab
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 Zhejiang Lab filed Critical Zhejiang Lab
Priority to CN202211359114.6A priority Critical patent/CN115412502B/en
Publication of CN115412502A publication Critical patent/CN115412502A/en
Application granted granted Critical
Publication of CN115412502B publication Critical patent/CN115412502B/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
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/35Switches specially adapted for specific applications
    • H04L49/354Switches specially adapted for specific applications for supporting virtual local area networks [VLAN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9015Buffering arrangements for supporting a linked list

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method for expanding a network port and quickly balancing and processing a message, which comprises the following steps: firstly, a virtual network port is established in a virtual network port module of a server end, a physical function queue is established in an FPGA-QDMA module of the FPGA end, the virtual network port module and the FPGA-QDMA module are connected through a DPDK-QDMA module of the server end, the physical function queues are redistributed to be in one-to-one correspondence with the virtual network ports, and the network port of the FPGA end is expanded; secondly, creating a lock-free queue, a memory pool and a thread when the DPDK-QDMA module is started, and guiding the virtual network port module and the FPGA-QDMA module to complete starting resource creation and allocation; and step three, when the network message is received and transmitted between the server side and the FPGA side, the DPDK-QDMA module is used for transmitting the network message to the virtual network port and the physical function queue corresponding to the virtual network port, so that the parallel and rapid processing of the message is realized.

Description

一种网络端口扩展和报文快速均衡处理方法A method for network port expansion and packet fast equalization processing

技术领域technical field

本发明属于计算机网络领域,涉及一种网络端口扩展和报文快速均衡处理方法。The invention belongs to the field of computer networks, and relates to a method for network port expansion and message fast equalization processing.

背景技术Background technique

在服务器设备中存在大量不同的业务程序在同时运行,每个程序均需要独立的网口与外部服务进行网络报文交互,服务器原生网口设备一般较少而无法满足需求。对于这种应用场景可以通过带100G网口的FPGA来扩展网口,利用FPGA的QDMA(队列直接存储器访问)功能、服务器的多核处理器和DPDK(数据平面开发套件)的优势,达到网络报文的并行、均衡和快速处理的效果,因此设计一套有效实用的基于DPDK与QDMA的网络端口扩展和报文快速均衡处理方法是实现服务器网络端口资源需求的关键。There are a large number of different business programs running on the server device at the same time, and each program requires an independent network port to exchange network messages with external services. The server's native network port devices are generally too small to meet the demand. For this application scenario, the FPGA with 100G network port can be used to expand the network port, using the advantages of FPGA's QDMA (Queue Direct Memory Access) function, server's multi-core processor and DPDK (Data Plane Development Kit) to achieve network packet Therefore, designing a set of effective and practical network port expansion and packet fast balanced processing methods based on DPDK and QDMA is the key to realizing the server network port resource requirements.

发明内容Contents of the invention

为了解决现有技术中存在的上述技术问题,本发明提出了一种网络端口扩展和报文快速均衡处理方法,其具体技术方案如下:In order to solve the above-mentioned technical problems existing in the prior art, the present invention proposes a network port expansion and message fast equalization processing method, and its specific technical scheme is as follows:

一种网络端口扩展和报文快速均衡处理方法,包括以下步骤:A method for network port expansion and packet fast equalization processing, comprising the following steps:

骤一,在服务器端的虚拟网络端口模块创建虚拟网络端口,在FPGA端的FPGA-QDMA模块创建物理功能队列,通过服务器端的DPDK-QDMA模块连接虚拟网络端口模块和FPGA-QDMA模块,再分配一个物理功能队列与虚拟网络端口一一对应,扩展FPGA端的网口;Step 1: Create a virtual network port on the virtual network port module on the server side, create a physical function queue on the FPGA-QDMA module on the FPGA side, connect the virtual network port module and the FPGA-QDMA module through the DPDK-QDMA module on the server side, and assign a physical function The queue corresponds to the virtual network port one by one, and the network port on the FPGA side is expanded;

步骤二,在DPDK-QDMA模块启动时创建无锁队列、内存池和线程,引导虚拟网络端口模块和FPGA-QDMA模块完成启动资源创建和分配;Step 2, create lock-free queues, memory pools and threads when the DPDK-QDMA module starts, and guide the virtual network port module and FPGA-QDMA module to complete the creation and allocation of startup resources;

步骤三,所述服务器端和FPGA端之间进行网络报文的收发时,通过DPDK-QDMA模块将虚拟网络端口和与其分配对应的物理功能队列传输网络报文。Step 3, when sending and receiving network messages between the server and the FPGA, transmit the network messages through the DPDK-QDMA module through the virtual network port and the physical function queue corresponding to its allocation.

进一步的,所述步骤二中的在DPDK-QDMA模块启动时创建无锁队列、内存池和线程,具体包括以下子步骤:Further, the creation of lock-free queues, memory pools and threads when the DPDK-QDMA module starts in said step 2 specifically includes the following sub-steps:

(2.1)初始化环境变量,获取FPGA-QDMA模块支持的物理功能PF数量n,根据用户配置文件获取需创建的虚拟网络端口数量k,计算得到为每个物理功能PF分配的队列pf_queue数量m=k/n;(2.1) Initialize environment variables, obtain the number n of physical function PFs supported by the FPGA-QDMA module, obtain the number k of virtual network ports to be created according to the user configuration file, and calculate the number of queues pf_queue allocated for each physical function PF m=k /n;

(2.2)创建虚拟网络端口模块需要的无锁队列和内存池,具体包括:(2.2) Create the lock-free queue and memory pool required by the virtual network port module, including:

(2.2.1)创建k个虚拟网络端口存储发送报文的内存池mbuf_pool_tx_vn[1—k],每个内存池包含p个rte_mbuf内存;(2.2.1) Create k virtual network ports to store memory pools mbuf_pool_tx_vn[1—k] for sending messages, and each memory pool contains p rte_mbuf memories;

(2.2.2)创建k个虚拟网络端口发送报文的无锁队列vn_port_tx_q[1—k],队列深度为p;(2.2.2) Create a lock-free queue vn_port_tx_q[1—k] for k virtual network ports to send messages, and the queue depth is p;

(2.2.3)创建k个虚拟网络端口向DPDK-QDMA模块发送报文的无锁队列vn_dpdk_tx_q[1—k],队列深度为p;(2.2.3) Create a lock-free queue vn_dpdk_tx_q[1—k] for k virtual network ports to send messages to the DPDK-QDMA module, and the queue depth is p;

(2.2.4)创建k个虚拟网络端口从DPDK-QDMA模块接收报文的无锁队列vn_dpdk_rx_q[1—k],队列深度为p;(2.2.4) Create a lock-free queue vn_dpdk_rx_q[1—k] for k virtual network ports to receive messages from the DPDK-QDMA module, and the queue depth is p;

(2.3)创建DPDK-QDMA模块需要的内存池和线程,具体包括:(2.3) Create the memory pool and threads required by the DPDK-QDMA module, including:

(2.3.1)创建n个DPDK-QDMA模块存储接收报文的内存池mbuf_pool_rx_pf[1—n],每个内存池包含(m×p)个rte_mbuf内存;(2.3.1) Create n memory pools mbuf_pool_rx_pf[1—n] for DPDK-QDMA modules to store received messages, and each memory pool contains (m×p) rte_mbuf memories;

(2.3.2)创建n个转发FPGA-QDMA模块报文至虚拟网络端口模块的线程qdma_ingress_pthread,绑定在CPU[1—n]上运行;(2.3.2) Create n threads qdma_ingress_pthread that forward FPGA-QDMA module messages to the virtual network port module, bound to run on CPU[1—n];

(2.3.3)创建n个转发虚拟网络端口模块报文至FPGA-QDMA模块的线程qdma_egress_pthread,绑定在CPU[(n+1)—2n]上运行;(2.3.3) Create n threads qdma_egress_pthread that forward virtual network port module messages to FPGA-QDMA module, bound to run on CPU[(n+1)—2n];

(2.4)向虚拟网络端口模块发送命令并获取信息,后创建收发报文内核线程,具体包括:(2.4) Send commands to the virtual network port module and obtain information, and then create a kernel thread for sending and receiving messages, including:

(2.4.1)通知虚拟网络端口模块创建k个虚拟网络端口,并获得虚拟网络端口MAC地址和混杂模式;(2.4.1) Notify the virtual network port module to create k virtual network ports, and obtain the virtual network port MAC address and promiscuous mode;

(2.4.2)将无锁队列vn_port_tx_q[1—k]、vn_dpdk_tx_q[1—k]、vn_dpdk_rx_q[1—k]和存储发送报文的内存池mbuf_pool_tx_vn[1—k]的物理地址发送至虚拟网络端口模块;(2.4.2) Send the lock-free queue vn_port_tx_q[1—k], vn_dpdk_tx_q[1—k], vn_dpdk_rx_q[1—k] and the physical address of the memory pool mbuf_pool_tx_vn[1—k] that stores the sent message to the virtual network port module;

(2.4.3)通知虚拟网络端口模块创建从DPDK-QDMA模块接收报文内核线程和向DPDK-QDMA模块发送报文内核线程;(2.4.3) Notify the virtual network port module to create a kernel thread for receiving messages from the DPDK-QDMA module and sending a message kernel thread to the DPDK-QDMA module;

(2.5)向FPGA-QDMA模块发送信息,具体包括:(2.5) Send information to the FPGA-QDMA module, including:

(2.5.1)将每个物理功能PF分配的队列pf_queue发送至FPGA-QDMA模块;(2.5.1) Send the queue pf_queue allocated by each physical function PF to the FPGA-QDMA module;

(2.5.2)将k个虚拟网络端口的MAC地址和混杂模式发送至FPGA-QDMA模块。(2.5.2) Send the MAC addresses and promiscuous modes of k virtual network ports to the FPGA-QDMA module.

进一步的,所述步骤二中的引导虚拟网络端口模块完成启动资源创建和分配,具体包括以下子步骤:Further, the boot virtual network port module in step 2 completes creation and allocation of startup resources, specifically including the following sub-steps:

(3.1)创建k个虚拟网络端口,为各个端口分配MAC地址和设置混杂模式,将所有端口的MAC地址和混杂模式发送至DPDK-QDMA模块;(3.1) Create k virtual network ports, assign MAC addresses and set promiscuous modes for each port, and send the MAC addresses and promiscuous modes of all ports to the DPDK-QDMA module;

(3.2)保存无锁队列vn_port_tx_q[1—k]、vn_dpdk_tx_q[1—k]、vn_dpdk_rx_q[1—k]和存储发送报文的内存池mbuf_pool_tx_vn[1—k]的物理地址;(3.2) Save the lock-free queue vn_port_tx_q[1—k], vn_dpdk_tx_q[1—k], vn_dpdk_rx_q[1—k] and the physical address of the memory pool mbuf_pool_tx_vn[1—k] that stores and sends messages;

(3.3)创建n个从DPDK-QDMA模块接收报文的内核线程rx_from_dpdk_kthread,绑定在CPU[(2n+1)—3n]运行;(3.3) Create n kernel threads rx_from_dpdk_kthread that receive messages from the DPDK-QDMA module, bound to run on CPU [(2n+1)-3n];

(3.4)创建向DPDK-QDMA模块发送报文的内核线程tx_to_dpdk_balance_kthread,绑定在CPU[3n+1]运行。(3.4) Create a kernel thread tx_to_dpdk_balance_kthread that sends messages to the DPDK-QDMA module, bound to run on CPU[3n+1].

进一步的,所述步骤二中的引导FPGA-QDMA模块完成启动资源创建和分配,具体包括以下子步骤:Further, the guide FPGA-QDMA module in said step 2 completes the creation and allocation of startup resources, specifically including the following sub-steps:

(4.1)创建k个队列pf_queue[1—k],每个物理功能PF分配m个队列;(4.1) Create k queues pf_queue[1—k], each physical function PF allocates m queues;

(4.2)根据虚拟网络端口是否开启混杂模式,创建两个列表vn_promisc_list和vn_normal_list,分别存储开启混杂功能和未开启混杂功能虚拟网络端口信息,保存MAC地址与虚拟网络端口的对应关系,同时保存虚拟网络端口与物理功能队列的对应关系。(4.2) Create two lists vn_promisc_list and vn_normal_list according to whether the virtual network port is in promiscuous mode, store the virtual network port information with the promiscuous function enabled and the non-promiscuous function enabled, save the corresponding relationship between the MAC address and the virtual network port, and save the virtual network at the same time Correspondence between ports and physical function queues.

进一步的,所述步骤三具体为:Further, the step three is specifically:

FPGA-QDMA模块接收100G网口的网络报文,根据报文类型、混杂模式以及目的MAC地址,指定网络报文相对应的发送物理功能队列,并在DPDK-QDMA模块运行线程qdma_ingress_pthread,在虚拟网络端口运行线程rx_from_dpdk_kthread,通过发送物理功能队列将网络报文发送至与该队列相对应的虚拟网络端口;The FPGA-QDMA module receives the network message of the 100G network port, and specifies the physical function queue corresponding to the network message according to the message type, promiscuous mode, and destination MAC address, and runs the thread qdma_ingress_pthread on the DPDK-QDMA module, in the virtual network The port runs the thread rx_from_dpdk_kthread, and sends the network message to the virtual network port corresponding to the queue by sending the physical function queue;

虚拟网络端口接收到网络报文,并在虚拟网络端口模块运行线程tx_to_dpdk_balance_kthread,在DPDK-QDMA模块运行线程qdma_egress_pthread,将网络报文通过该虚拟网络端口对应的物理功能队列发送至FPGA-QDMA模块,最终通过100G网口发送出去;The virtual network port receives the network message, runs the thread tx_to_dpdk_balance_kthread in the virtual network port module, runs the thread qdma_egress_pthread in the DPDK-QDMA module, and sends the network message to the FPGA-QDMA module through the physical function queue corresponding to the virtual network port, and finally Send out through the 100G network port;

其中,当某个虚拟网络端口所对应的物理功能队列处于拥塞时,则通过虚拟网络端口模块和FPGA-QDMA模块将网络报文分配到空闲物理功能队列进行传输。Wherein, when the physical function queue corresponding to a certain virtual network port is congested, the network message is allocated to an idle physical function queue for transmission through the virtual network port module and the FPGA-QDMA module.

进一步的,所述的FPGA-QDMA模块接收100G网口的网络报文,根据报文类型、混杂模式以及目的MAC地址,指定网络报文相对应的发送物理功能队列,具体包括以下子步骤:Further, the FPGA-QDMA module receives the network message of the 100G network port, and according to the message type, the mixed mode and the destination MAC address, specifies the sending physical function queue corresponding to the network message, specifically including the following substeps:

(5.1.1)FPGA端通过100G网口接收外部网络报文;(5.1.1) The FPGA side receives external network messages through the 100G network port;

(5.1.2)判断网络报文是否为广播包,是则执行(5.1.3),否则执行(5.1.4);(5.1.2) Determine whether the network packet is a broadcast packet, if so, execute (5.1.3), otherwise execute (5.1.4);

(5.1.3)将为广播包的网络报文复制成k个网络报文,依次给这k个网络报文指定报文对应的发送物理功能队列pf_queue_send;(5.1.3) The network message of the broadcast packet will be copied into k network messages, and the sending physical function queue pf_queue_send corresponding to the message is assigned to the k network messages in turn;

(5.1.4)计算获得列表vn_promisc_list个数promisc_nums,复制promisc_nums个报文,根据列表vn_promisc_list的虚拟网络端口号依次给报文指定对应的发送物理功能队列pf_queue_send;(5.1.4) Calculate and obtain the number promisc_nums of the list vn_promisc_list, copy promisc_nums messages, and assign the corresponding sending physical function queue pf_queue_send to the messages in turn according to the virtual network port numbers of the list vn_promisc_list;

(5.1.5)轮询列表vn_normal_list,找到mac地址与报文相同的虚拟网络端口号,指定报文对应的发送物理功能队列pf_queue_send;(5.1.5) Poll the list vn_normal_list, find the virtual network port number with the same mac address as the message, and specify the sending physical function queue pf_queue_send corresponding to the message;

(5.1.6)判断网络报文对应的发送物理功能队列pf_queue_send是否已满,是则执行(5.1.7),否则执行(5.1.10);(5.1.6) Determine whether the sending physical function queue pf_queue_send corresponding to the network message is full, if so, execute (5.1.7), otherwise execute (5.1.10);

(5.1.7)定义临时变量数组qdma_to_dpdk_q_pkgs[1—k]和qdma_to_dpdk_pf_pkgs[1—n],计算pf_queue[1—k]每个队列的待读取报文数,分别保存至数组qdma_to_dpdk_q_pkgs,根据数组qdma_to_dpdk_q_pkgs计算PF[1—n]每个物理功能的待读取报文数,分别保存至数组qdma_to_dpdk_pf_pkgs;(5.1.7) Define temporary variable arrays qdma_to_dpdk_q_pkgs[1—k] and qdma_to_dpdk_pf_pkgs[1—n], calculate the number of messages to be read in each queue of pf_queue[1—k], and save them to the array qdma_to_dpdk_q_pkgs respectively, according to the array qdma_to_dpdk_q_pkgs Calculate the number of messages to be read for each physical function of PF[1—n], and save them in the array qdma_to_dpdk_pf_pkgs;

(5.1.8)定义临时变量a和b,在qdma_to_dpdk_pf_pkgs[1—n]找到最小值,索引记作a,在qdma_to_dpdk_q_pkgs[(32a-31)—32a]找到最小值,索引记作b,判断pf_queue[b]是否已满,是则丢弃报文,否则执行(5.1.9);(5.1.8) Define temporary variables a and b, find the minimum value in qdma_to_dpdk_pf_pkgs[1—n], record the index as a, find the minimum value in qdma_to_dpdk_q_pkgs[(32a-31)—32a], record the index as b, and judge pf_queue [b] Whether it is full, if yes, discard the message, otherwise execute (5.1.9);

(5.1.9)修改网络报文发送物理功能队列pf_queue_send=pf_queue[b],报文增加vlan字段,并填充对应的虚拟网络端口号;(5.1.9) Modify the network message sending physical function queue pf_queue_send=pf_queue[b], add the vlan field to the message, and fill in the corresponding virtual network port number;

(5.1.10)依次将报文发送至指定对应的发送物理功能队列pf_queue_send。(5.1.10) Send the message to the specified corresponding sending physical function queue pf_queue_send in sequence.

进一步的,所述的在DPDK-QDMA模块运行线程qdma_ingress_pthread,具体包括以下子步骤:Further, the described running thread qdma_ingress_pthread in the DPDK-QDMA module specifically includes the following sub-steps:

(5.2.1)定义临时变量i、j、c和可存储p个rte_mbuf内存地址的链表pkts_burst_rx_l,轮询PF[i]的队列集pf_queue[((i-1)m+1)—im],获取当前轮询到的队列pf_queue[j],读取pf_queue[j]的报文数c,判断读取的报文数c是否在[1—p]范围内,是则执行(5.2.2),否则执行(5.2.1);(5.2.1) Define temporary variables i, j, c and a linked list pkts_burst_rx_l that can store p rte_mbuf memory addresses, poll the queue set pf_queue[((i-1)m+1)—im] of PF[i], Get the currently polled queue pf_queue[j], read the number c of messages in pf_queue[j], and judge whether the number c of messages read is within the range of [1—p], and if so, execute (5.2.2) , otherwise execute (5.2.1);

(5.2.2)从mbuf_pool_rx_pn[i]内存池申请c个rte_mbuf内存,获取队列pf_queue[j]的网络报文,将报文依次保存至rte_mbuf内存,并将rte_mbuf内存地址插入到链表pkts_burst_rx_l,判断数组pkts_burst_rx是否为空,是则执行(5.2.1),否则执行(5.2.3);(5.2.2) Apply c pieces of rte_mbuf memory from the mbuf_pool_rx_pn[i] memory pool, obtain the network message of the queue pf_queue[j], save the message to the rte_mbuf memory in turn, insert the rte_mbuf memory address into the linked list pkts_burst_rx_l, and judge the array Whether pkts_burst_rx is empty, if yes, execute (5.2.1), otherwise execute (5.2.3);

(5.2.3)循环获取链表pkts_burst_rx_l的可读元素rte_mbuf内存,判断是否读取完毕,是则执行(5.2.1),否则执行(5.2.4);(5.2.3) Circularly obtain the readable element rte_mbuf memory of the linked list pkts_burst_rx_l, and judge whether the reading is complete, if so, execute (5.2.1), otherwise execute (5.2.4);

(5.2.4)判断无锁队列vn_dpdk_rx_q[j]是否已满,是则丢弃rte_mbuf内存中的报文,执行(5.2.3),否则执行(5.2.5);(5.2.4) Determine whether the lock-free queue vn_dpdk_rx_q[j] is full, if so, discard the message in the rte_mbuf memory and execute (5.2.3), otherwise execute (5.2.5);

(5.2.5)获取无锁队列vn_dpdk_rx_q[j]的空闲元素vn_from_dpdk_item,将rte_mbuf内存的地址赋值给vn_from_dpdk_item,并插入到无锁队列vn_dpdk_rx_q[j],执行(5.2.3)。(5.2.5) Obtain the free element vn_from_dpdk_item of the lock-free queue vn_dpdk_rx_q[j], assign the address of rte_mbuf memory to vn_from_dpdk_item, and insert it into the lock-free queue vn_dpdk_rx_q[j], and execute (5.2.3).

进一步的,所述的在虚拟网络端口运行线程rx_from_dpdk_kthread,通过发送物理功能队列将网络报文发送至与该队列相对应的虚拟网络端口,具体包括以下子步骤:Further, the thread rx_from_dpdk_kthread is run on the virtual network port, and the network message is sent to the virtual network port corresponding to the queue by sending the physical function queue, specifically including the following sub-steps:

(5.4.1)定义临时变量i和j,轮询无锁队列集vn_dpdk_rx_q[((i-1)m+1)—im],获得当前轮询到的无锁队列vn_dpdk_rx_q[j],判断vn_dpdk_rx_q[j]是否为空,是则执行(5.4.1),否则执行(5.4.2);(5.4.1) Define temporary variables i and j, poll the lock-free queue set vn_dpdk_rx_q[((i-1)m+1)—im], obtain the currently polled lock-free queue vn_dpdk_rx_q[j], and judge vn_dpdk_rx_q Whether [j] is empty, execute (5.4.1) if yes, otherwise execute (5.4.2);

(5.4.2)定义单次读取vn_dpdk_rx_q单个队列的元素数量阈值,循环获取vn_dpdk_rx_q[j]的可读元素dpdk_rx_item,判断vn_dpdk_rx_q[j]是否读取完毕或者读取元素数量达到所定义阈值,是则停止循环执行(5.4.1),否则执行(5.4.3);(5.4.2) Define the threshold value of the number of elements in a single read vn_dpdk_rx_q single queue, loop to obtain the readable element dpdk_rx_item of vn_dpdk_rx_q[j], and judge whether vn_dpdk_rx_q[j] has been read or the number of read elements reaches the defined threshold, yes Then stop the loop execution (5.4.1), otherwise execute (5.4.3);

(5.4.3)定义临时变量vn_port,判断dpdk_rx_item的rte_mbuf内存的报文是否包含vlan字段,是则从vlan获取虚拟网络端口号赋值给vn_port并将vlan字段从报文中删除,否则vn_port=j,执行(5.4.4);(5.4.3) Define the temporary variable vn_port to determine whether the message in the rte_mbuf memory of dpdk_rx_item contains the vlan field, and if so, obtain the virtual network port number from vlan and assign it to vn_port and delete the vlan field from the message, otherwise vn_port=j, execute (5.4.4);

(5.4.4)申请一个sk_buff内存,将rte_mbuf内存的报文拷贝至sk_buff内存,调用netif_rx_ni函数将sk_buff内存发送至虚拟网络端口vn_port,释放rte_mbuf内存,将dpdk_rx_item从vn_dpdk_rx_q[j]删除,执行(5.4.2)。(5.4.4) Apply for a sk_buff memory, copy the message in the rte_mbuf memory to the sk_buff memory, call the netif_rx_ni function to send the sk_buff memory to the virtual network port vn_port, release the rte_mbuf memory, delete dpdk_rx_item from vn_dpdk_rx_q[j], execute (5.4 .2).

进一步的,所述虚拟网络端口接收到网络报文,将网络报文插入无锁队列中,具体包括以下子步骤:Further, the virtual network port receives the network message and inserts the network message into the lock-free queue, which specifically includes the following sub-steps:

(6.1.1)定义临时变量i,在内存池mbuf_pool_tx_vn[i]中申请一个rte_mbuf内存;(6.1.1) Define a temporary variable i, and apply for an rte_mbuf memory in the memory pool mbuf_pool_tx_vn[i];

(6.1.2)判断虚拟网络端口i相应的无锁队列vn_port_tx_q[i]是否已满,是则丢弃网络报文,否则执行(6.1.3);(6.1.2) Determine whether the lock-free queue vn_port_tx_q[i] corresponding to the virtual network port i is full, if so, discard the network packets, otherwise execute (6.1.3);

(6.1.3)获得无锁队列vn_port_tx_q[i]的空闲元素vn_tx_item,将sk_buff内存中的网络报文拷贝到rte_mbuf内存,将rte_mbuf内存地址赋值给vn_tx_item,将vn_tx_item插入到vn_port_tx_q[i]队列,释放sk_buff内存。(6.1.3) Obtain the free element vn_tx_item of the lock-free queue vn_port_tx_q[i], copy the network packets in the sk_buff memory to the rte_mbuf memory, assign the rte_mbuf memory address to vn_tx_item, insert vn_tx_item into the vn_port_tx_q[i] queue, release sk_buff memory.

进一步的,所述在虚拟网络端口模块运行线程tx_to_dpdk_balance_kthread,在DPDK-QDMA模块运行线程qdma_egress_pthread,将网络报文通过该虚拟网络端口对应的物理功能队列发送至FPGA-QDMA模块,最终通过100G网口发送出去,具体包括以下子步骤:Further, the thread tx_to_dpdk_balance_kthread is run in the virtual network port module, and the thread qdma_egress_pthread is run in the DPDK-QDMA module, and the network message is sent to the FPGA-QDMA module through the physical function queue corresponding to the virtual network port, and finally sent through the 100G network port Go out, specifically including the following sub-steps:

(6.3.1)定义临时变量i,循环轮询无锁队列集vn_port_tx_q[1—k],获得当前轮询到的无锁队列vn_port_tx_q[i],判断vn_port_tx_q[i]是否为空,是则执行(6.3.1),否则执行(6.3.2);(6.3.1) Define a temporary variable i, circularly poll the lock-free queue set vn_port_tx_q[1—k], obtain the currently polled lock-free queue vn_port_tx_q[i], judge whether vn_port_tx_q[i] is empty, and execute if so (6.3.1), otherwise execute (6.3.2);

(6.3.2)设置向DPDK-QDMA模块发送报文无锁队列:vn_dpdk_tx_q_cur=vn_dpdk_tx_q[i];(6.3.2) Set the lock-free queue for sending messages to the DPDK-QDMA module: vn_dpdk_tx_q_cur=vn_dpdk_tx_q[i];

(6.3.3)定义单次读取vn_port_tx_q单个队列的元素数量阈值,循环获取vn_port_tx_q[i]的可读元素vn_tx_item,判断vn_port_tx_q[i]是否读取完毕或者读取元素数量达到所定阈值,是则停止循环执行(6.3.1),否则执行(6.3.4);(6.3.3) Define the threshold value of the number of elements of a single read vn_port_tx_q single queue, loop to obtain the readable element vn_tx_item of vn_port_tx_q[i], and judge whether vn_port_tx_q[i] has been read or the number of read elements reaches the set threshold, if so Stop loop execution (6.3.1), otherwise execute (6.3.4);

(6.3.4)判断vn_dpdk_tx_q_cur是否满,是则执行(6.3.5),否则执行(6.3.8);(6.3.4) Determine whether vn_dpdk_tx_q_cur is full, if yes, execute (6.3.5), otherwise execute (6.3.8);

(6.3.5)定义临时变量数组vn_to_dpdk_q_single_pkgs[1—k],计算vn_dpdk_tx_q[1—k]每个队列的待发送报文数,分别保存至数组vn_to_dpdk_q_single_pkgs;(6.3.5) Define the temporary variable array vn_to_dpdk_q_single_pkgs[1—k], calculate the number of packets to be sent in each queue of vn_dpdk_tx_q[1—k], and save them in the array vn_to_dpdk_q_single_pkgs respectively;

(6.3.6)定义临时变量数组vn_to_dpdk_q_muster_pkgs[1—n],将vn_dpdk_tx_q[1—k]分成4组,每组每个队列,分别为vn_dpdk_tx_q[1—m],… ,vn_dpdk_tx_q[((n-1)m+1)—nm],根据数组vn_to_dpdk_q_single_pkgs计算每组的待发送报文数,分别保存至数组vn_to_dpdk_q_muster_pkgs;(6.3.6) Define the temporary variable array vn_to_dpdk_q_muster_pkgs[1—n], divide vn_dpdk_tx_q[1—k] into 4 groups, each group and each queue are vn_dpdk_tx_q[1—m],…, vn_dpdk_tx_q[((n- 1) m+1)—nm], calculate the number of packets to be sent in each group according to the array vn_to_dpdk_q_single_pkgs, and store them in the array vn_to_dpdk_q_muster_pkgs respectively;

(6.3.7)定义临时变量a和b,在vn_to_dpdk_q_muster_pkgs[1—n]找到最小值,索引记作a,在vn_dpdk_tx_q[((a-1)m+1)—am]找到最小值,索引记作b,判断vn_dpdk_tx_q[b]是否已满,是则丢弃报文,执行(6.3.3),否则vn_dpdk_tx_q_cur=vn_dpdk_tx_q[b],执行(6.3.8);(6.3.7) Define temporary variables a and b, find the minimum value in vn_to_dpdk_q_muster_pkgs[1—n], the index is recorded as a, find the minimum value in vn_dpdk_tx_q[((a-1)m+1)—am], the index is recorded Do b, judge whether vn_dpdk_tx_q[b] is full, discard the message if yes, execute (6.3.3), otherwise vn_dpdk_tx_q_cur=vn_dpdk_tx_q[b], execute (6.3.8);

(6.3.8)获得vn_dpdk_tx_q_cur空闲元素dpdk_tx_item,将vn_tx_item的rte_mbuf内存地址赋值给dpdk_tx_item,将dpdk_tx_item插入到vn_dpdk_tx_q_cur,将vn_tx_item从删除vn_port_tx_q[i],执行(6.3.3);(6.3.8) Get vn_dpdk_tx_q_cur free element dpdk_tx_item, assign the rte_mbuf memory address of vn_tx_item to dpdk_tx_item, insert dpdk_tx_item into vn_dpdk_tx_q_cur, delete vn_tx_item from vn_port_tx_q[i], execute (6.3)

(6.4.1)再定义临时变量i和j,轮询无锁队列集vn_dpdk_tx_q[((i-1)m+1)—im],获得当前轮询到的无锁队列vn_dpdk_tx_q[j],判断vn_dpdk_tx_q[j]是否为空,是则执行(6.4.1),否则执行(6.4.2);(6.4.1) Define temporary variables i and j again, poll the lock-free queue set vn_dpdk_tx_q[((i-1)m+1)—im], obtain the currently polled lock-free queue vn_dpdk_tx_q[j], and judge Whether vn_dpdk_tx_q[j] is empty, if yes, execute (6.4.1), otherwise execute (6.4.2);

(6.4.2)定义临时变量可存储p个rte_mbuf内存地址的链表pkts_burst_tx_l,定义单次读取vn_dpdk_tx_q单个队列的元素数量阈值为p,循环获取vn_dpdk_tx_q[j]的可读元素dpdk_tx_item,判断vn_dpdk_tx_q[j]是否读取完毕或者读取元素数量达到p,是则停止循环执行(6.4.1),否则将dpdk_tx_item的rte_mbuf内存地址插入到pkts_burst_tx_l,并将dpdk_tx_item从vn_dpdk_tx_q[j]删除,执行(6.4.3);(6.4.2) Define the linked list pkts_burst_tx_l, which can store p rte_mbuf memory addresses in temporary variables, define the threshold value of the number of elements in a single read vn_dpdk_tx_q single queue as p, loop to obtain the readable element dpdk_tx_item of vn_dpdk_tx_q[j], and judge vn_dpdk_tx_q[j ] Whether the reading is completed or the number of read elements reaches p, then stop the loop execution (6.4.1), otherwise insert the rte_mbuf memory address of dpdk_tx_item into pkts_burst_tx_l, and delete dpdk_tx_item from vn_dpdk_tx_q[j], execute (6.4.3 );

(6.4.3)调用rte_eth_tx_burst函数将链表pkts_burst_tx_l中的报文发送至FPGA-QDMA模块的PF[i]的pf_queue[j]队列,rte_eth_tx_burst函数释放链表pkts_burst_tx_l中的rte_mbuf内存,执行(6.4.1);(6.4.3) Call the rte_eth_tx_burst function to send the message in the linked list pkts_burst_tx_l to the pf_queue[j] queue of PF[i] of the FPGA-QDMA module, the rte_eth_tx_burst function releases the rte_mbuf memory in the linked list pkts_burst_tx_l, and executes (6.4.1);

(6.5)FPGA-QDMA模块报文发送功能轮询PF[1—n]的pf_queue[1—k]队列,依次获取报文,发送至100G网口。(6.5) The message sending function of the FPGA-QDMA module polls the pf_queue[1—k] queue of PF[1—n], obtains the messages in turn, and sends them to the 100G network port.

与现有技术相比,本发明具有如下有益效果:Compared with the prior art, the present invention has the following beneficial effects:

1、本发明通过FPGA-QDMA模块的一个物理功能队列对应虚拟网络端口模块的一个虚拟网络端口,将FPGA的100G网口扩展成k个网络端口,实现网络端口扩展的功能,有效降低成本;1. The present invention expands the 100G network port of the FPGA into k network ports through a physical function queue of the FPGA-QDMA module corresponding to a virtual network port of the virtual network port module, realizes the function of network port expansion, and effectively reduces costs;

2、本发明利用服务器端多线程、无锁队列、零拷贝和CPU绑核技术,FPGA端的QDMA多物理功能多队列的特性,实现报文的并行快速处理;2. The present invention utilizes server-side multi-threading, lock-free queue, zero-copy and CPU binding core technology, and the characteristics of QDMA multi-physics function and multi-queue at the FPGA side to realize parallel and fast processing of messages;

3、虚拟网络端口分配固定的物理功能队列传输网络报文,某个虚拟网络端口处于网络拥塞时将网络报文分配到空闲队列传输,实现网络报文的快速均衡传输,同时大幅减少网络报文拥塞时的丢包率。3. The virtual network port allocates a fixed physical function queue to transmit network messages. When a virtual network port is in network congestion, the network message is allocated to an idle queue for transmission, so as to realize fast and balanced transmission of network messages and greatly reduce network messages. Packet loss rate during congestion.

附图说明Description of drawings

图1为本发明总体架构图;Fig. 1 is the overall architecture diagram of the present invention;

图2为本发明的一种网络端口扩展和报文快速均衡处理方法的主要流程图;Fig. 2 is the main flow chart of a kind of network port expansion of the present invention and message fast equalization processing method;

图3为本发明的FPGA-QDMA模块接收外部网络报文发送至相对应的物理功能队列的流程图;Fig. 3 is the flow chart that FPGA-QDMA module of the present invention receives external network message and sends to corresponding physical function queue;

图4为本发明的在DPDK-QDMA模块转发FPGA-QDMA模块报文至虚拟网络端口模块的流程图;Fig. 4 is the flowchart of forwarding FPGA-QDMA module message to virtual network port module at DPDK-QDMA module of the present invention;

图5为本发明的在虚拟网络端口模块转发DPDK-QDMA模块报文至虚拟网络端口内核的流程图;Fig. 5 is the flowchart of forwarding the DPDK-QDMA module message to the virtual network port kernel at the virtual network port module of the present invention;

图6为本发明的虚拟网络端口发送网络报文并插入无锁队列的流程图;Fig. 6 is the flow chart that virtual network port of the present invention sends network message and inserts lock-free queue;

图7为本发明的在虚拟网络端口模块转发虚拟网络端口报文至DPDK-QDMA模块的流程图;Fig. 7 is the flowchart of forwarding virtual network port message to DPDK-QDMA module at virtual network port module of the present invention;

图8为本发明的在DPDK-QDMA模块转发虚拟网络端口模块报文至FPGA-QDMA模块的流程图。Fig. 8 is a flow chart of forwarding the virtual network port module message to the FPGA-QDMA module in the DPDK-QDMA module of the present invention.

具体实施方式Detailed ways

为了使本发明的目的、技术方案和技术效果更加清楚明白,以下结合说明书附图和实施例,对本发明作进一步详细说明。In order to make the object, technical solution and technical effect of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments.

如图1所示为本发明的总体架构,由服务器端和FPGA端通过PCIe总线连接组成,其中,在所述服务器端的内核层运行有虚拟网络端口模块,应用层运行有DPDK-QDMA模块;在所述FPGA端运行有FPGA-QDMA模块。As shown in Figure 1, it is the overall architecture of the present invention, which is formed by connecting the server end and the FPGA end through the PCIe bus, wherein the virtual network port module is operated at the kernel layer of the server end, and the DPDK-QDMA module is operated at the application layer; The FPGA-side runs an FPGA-QDMA module.

所述服务器端的CPU至少为16核处理器,其中将CPU[1~13]核设置为孤立状态防止被系统其他服务进程或线程使用。The CPU at the server end is at least a 16-core processor, wherein the CPU [1-13] cores are set to an isolated state to prevent being used by other service processes or threads of the system.

如图2所示,本发明的基于DPDK与QDMA的网络端口扩展和报文快速均衡处理方法,具体包括以下步骤:As shown in Fig. 2, the network port expansion based on DPDK and QDMA of the present invention and message fast equalization processing method, specifically comprise the following steps:

步骤一,在服务器端的虚拟网络端口模块创建k个虚拟网络端口,在FPGA端的FPGA-QDMA模块创建k个物理功能队列,通过服务器端的DPDK-QDMA模块连接虚拟网络端口模块和FPGA-QDMA模块,再分配物理功能队列与虚拟网络端口一一对应,扩展FPGA端的100G网口,将FPGA端的100G网口扩展成k个网络端口,实现网络端口扩展,本实施例中k取128,Step 1, create k virtual network ports at the virtual network port module on the server side, create k physical function queues at the FPGA-QDMA module at the FPGA side, connect the virtual network port module and the FPGA-QDMA module through the DPDK-QDMA module at the server side, and then Allocate a one-to-one correspondence between the physical function queue and the virtual network port, expand the 100G network port on the FPGA side, expand the 100G network port on the FPGA side into k network ports, and realize the network port expansion. In this embodiment, k is 128,

步骤二,在DPDK-QDMA模块启动时创建无锁队列、内存池和线程,引导虚拟网络端口模块和FPGA-QDMA模块完成启动资源创建和分配,具体步骤内容如下:Step 2: Create lock-free queues, memory pools and threads when the DPDK-QDMA module starts, and guide the virtual network port module and FPGA-QDMA module to complete the creation and allocation of startup resources. The specific steps are as follows:

所述在DPDK-QDMA模块启动时创建无锁队列、内存池和线程,具体包括以下子步骤:The described creation of lock-free queue, memory pool and thread when the DPDK-QDMA module starts specifically includes the following sub-steps:

(2.1)调用函数rte_eal_init完成环境变量初始化,获取FPGA-QDMA模块支持的物理功能PF数量n,本实施方式为n取4,根据用户配置文件获取需创建的虚拟网络端口数量128,计算得到为每个PF分配的队列pf_queue数量m,m=128/4=32;(2.1) Call the function rte_eal_init to complete the environment variable initialization, and obtain the physical function PF number n supported by the FPGA-QDMA module. In this implementation, n is set to 4, and the number of virtual network ports to be created is obtained according to the user configuration file. 128, calculated as each The number of queues pf_queue allocated by each PF is m, m=128/4=32;

(2.2)创建虚拟网络端口模块需要的内存池和无锁队列,具体步骤如下:(2.2) Create the memory pool and lock-free queue required by the virtual network port module. The specific steps are as follows:

(2.2.1)创建128个虚拟网络端口存储发送报文的内存池mbuf_pool_tx_vn[1—128],每个内存池包含p=4096个rte_mbuf内存;(2.2.1) Create 128 virtual network ports to store the memory pool mbuf_pool_tx_vn[1-128] for sending messages, each memory pool contains p=4096 rte_mbuf memories;

(2.2.2)创建128个虚拟网络端口发送报文的无锁队列vn_port_tx_q[1—128],队列深度为p=4096;(2.2.2) Create a lock-free queue vn_port_tx_q[1—128] for 128 virtual network ports to send messages, and the queue depth is p=4096;

(2.2.3)创建128个虚拟网络端口向DPDK-QDMA模块发送报文的无锁队列vn_dpdk_tx_q[1—128],队列深度为p=4096;(2.2.3) Create a lock-free queue vn_dpdk_tx_q[1—128] for 128 virtual network ports to send messages to the DPDK-QDMA module, and the queue depth is p=4096;

(2.2.4)创建128个虚拟网络端口从DPDK-QDMA模块接收报文的无锁队列vn_dpdk_rx_q[1—128],队列深度为p=4096。(2.2.4) Create a lock-free queue vn_dpdk_rx_q[1—128] for 128 virtual network ports to receive messages from the DPDK-QDMA module, and the queue depth is p=4096.

(2.3)创建DPDK-QDMA模块需要的内存池和线程,具体步骤如下:(2.3) Create the memory pool and threads required by the DPDK-QDMA module. The specific steps are as follows:

(2.3.1)创建4个DPDK-QDMA模块存储接收报文的内存池mbuf_pool_rx_pf[1—4],每个内存池包含131072(32x4096)个rte_mbuf内存;(2.3.1) Create 4 memory pools mbuf_pool_rx_pf[1-4] for DPDK-QDMA modules to store received messages, each memory pool contains 131072 (32x4096) rte_mbuf memories;

(2.3.2)创建4个转发FPGA-QDMA模块报文至虚拟网络端口模块的线程qdma_ingress_pthread,绑定在CPU[1—4]上运行;(2.3.2) Create 4 threads qdma_ingress_pthread that forward FPGA-QDMA module messages to the virtual network port module, bound to run on CPU[1-4];

(2.3.3)创建4个转发虚拟网络端口模块报文至FPGA-QDMA模块的线程qdma_egress_pthread,绑定在CPU[5—8]上运行。(2.3.3) Create 4 threads qdma_egress_pthread that forward virtual network port module messages to FPGA-QDMA module, bound to run on CPU[5-8].

(2.4)向虚拟网络端口模块发送命令和获取信息,具体步骤如下:(2.4) Send commands and obtain information to the virtual network port module, the specific steps are as follows:

(2.4.1)通知虚拟网络端口模块创建128个虚拟网络端口,并获得虚拟网络端口MAC地址和混杂模式;(2.4.1) Notify the virtual network port module to create 128 virtual network ports, and obtain the virtual network port MAC address and promiscuous mode;

(2.4.2)将无锁队列vn_port_tx_q[1—128]、vn_dpdk_tx_q[1—128]、vn_dpdk_rx_q[1—128]和存储发送报文的内存池mbuf_pool_tx_vn[1—128]的物理地址发送至虚拟网络端口模块;(2.4.2) Send the lock-free queue vn_port_tx_q[1—128], vn_dpdk_tx_q[1—128], vn_dpdk_rx_q[1—128] and the physical address of the memory pool mbuf_pool_tx_vn[1—128] that stores and sends messages to the virtual network port module;

(2.4.3)通知虚拟网络端口模块创建从DPDK-QDMA模块接收报文内核线程和向DPDK-QDMA模块发送报文内核线程。(2.4.3) Notify the virtual network port module to create a kernel thread for receiving messages from the DPDK-QDMA module and a kernel thread for sending messages to the DPDK-QDMA module.

(2.5)向FPGA-QDMA模块发送信息,具体步骤如下:(2.5) Send information to the FPGA-QDMA module, the specific steps are as follows:

(2.5.1)将每个物理功能PF分配的队列pf_queue发送至FPGA-QDMA模块;(2.5.1) Send the queue pf_queue allocated by each physical function PF to the FPGA-QDMA module;

(2.5.2)将k个虚拟网络端口的MAC地址和混杂模式发送至FPGA-QDMA模块。(2.5.2) Send the MAC addresses and promiscuous modes of k virtual network ports to the FPGA-QDMA module.

步骤(2)的虚拟网络端口模块完成启动资源创建和分配具体步骤如下:The virtual network port module in step (2) completes the creation and allocation of startup resources. The specific steps are as follows:

(3.1)创建128个虚拟网络端口,为各个端口分配MAC地址和设置混杂模式,将所有端口的MAC地址和混杂模式发送至DPDK-QDMA模块;(3.1) Create 128 virtual network ports, assign MAC addresses and set promiscuous modes for each port, and send the MAC addresses and promiscuous modes of all ports to the DPDK-QDMA module;

(3.2)保存无锁队列vn_port_tx_q[1—128]、vn_dpdk_tx_q[1—128]、vn_dpdk_rx_q[1—128]和存储发送报文的内存池mbuf_pool_tx_vn[1—128]的物理地址;(3.2) Save the lock-free queue vn_port_tx_q[1-128], vn_dpdk_tx_q[1-128], vn_dpdk_rx_q[1-128] and the physical address of the memory pool mbuf_pool_tx_vn[1-128] that stores and sends messages;

(3.3)创建4个从DPDK-QDMA模块接收报文的内核线程rx_from_dpdk_kthread,绑定在CPU[9—12]运行;(3.3) Create 4 kernel threads rx_from_dpdk_kthread that receive messages from the DPDK-QDMA module, bound to run on CPU[9-12];

(3.4)创建向DPDK-QDMA模块发送报文的内核线程tx_to_dkdk_balance_kthread,绑定在CPU[13]运行;(3.4) Create a kernel thread tx_to_dkdk_balance_kthread that sends messages to the DPDK-QDMA module, bound to run on CPU[13];

步骤(2)的FPGA-QDMA模块完成启动资源创建和分配具体步骤如下:The specific steps for the FPGA-QDMA module in step (2) to complete the creation and allocation of startup resources are as follows:

(4.1)创建128个队列pf_queue[1—128],每个物理功能PF分配32个队列,对应关系:PF[1]—>pf_queue[1—32], PF[2]—>pf_queue[33—64], PF[3]—>pf_queue[65—96], PF[4]—>pf_queue[97—128];(4.1) Create 128 queues pf_queue[1—128], each physical function PF allocates 32 queues, corresponding relationship: PF[1]—>pf_queue[1—32], PF[2]—>pf_queue[33— 64], PF[3]—>pf_queue[65—96], PF[4]—>pf_queue[97—128];

(4.2)根据虚拟网络端口是否开启混杂模式,创建两个列表vn_promisc_list和vn_normal_list,分别存储开启混杂功能和未开启混杂功能虚拟网络端口信息,保存MAC地址与虚拟网络端口的对应关系,同时保存虚拟网络端口与物理功能队列的对应关系。(4.2) Create two lists vn_promisc_list and vn_normal_list according to whether the virtual network port is in promiscuous mode, store the virtual network port information with the promiscuous function enabled and the non-promiscuous function enabled, save the corresponding relationship between the MAC address and the virtual network port, and save the virtual network at the same time Correspondence between ports and physical function queues.

步骤三,所述服务器端和FPGA端之间进行网络报文的收发时,将DPDK-QDMA模块作为网络报文传输的桥梁,通过DPDK-QDMA模块将虚拟网络端口和与其分配对应的物理功能队列传输网络报文。Step 3, when sending and receiving network messages between the server side and the FPGA side, use the DPDK-QDMA module as a bridge for network message transmission, and use the DPDK-QDMA module to queue the virtual network ports and the physical function queues corresponding to their distribution transmit network packets.

具体为:Specifically:

FPGA-QDMA模块接收从100G网口输入的外部网络报文,根据报文类型、混杂模式以及目的MAC地址,指定报文相对应的发送物理功能队列,并在DPDK-QDMA模块运行线程qdma_ingress_pthread,在虚拟网络端口运行线程rx_from_dpdk_kthread,通过该队列将报文发送至相对应的虚拟网络端口;The FPGA-QDMA module receives the external network message input from the 100G network port, and specifies the physical function queue corresponding to the message according to the message type, promiscuous mode, and destination MAC address, and runs the thread qdma_ingress_pthread on the DPDK-QDMA module. The virtual network port runs the thread rx_from_dpdk_kthread, and sends the message to the corresponding virtual network port through the queue;

所述虚拟网络端口接收到网络报文,并在虚拟网络端口模块运行线程tx_to_dpdk_balance_kthread,在DPDK-QDMA模块运行线程qdma_egress_pthread,将网络报文通过该虚拟网络端口对应的物理功能队列发送至FPGA-QDMA模块,最终通过100G网口发送出去;The virtual network port receives the network message, and runs the thread tx_to_dpdk_balance_kthread in the virtual network port module, runs the thread qdma_egress_pthread in the DPDK-QDMA module, and sends the network message to the FPGA-QDMA module through the physical function queue corresponding to the virtual network port , and finally sent out through the 100G network port;

其中,当某个虚拟网络端口所对应的物理功能队列处于拥塞时,则通过虚拟网络端口模块和FPGA-QDMA模块将网络报文分配到空闲物理功能队列传输,实现网络报文的快速均衡传输。Among them, when the physical function queue corresponding to a certain virtual network port is congested, the network message is allocated to the idle physical function queue for transmission through the virtual network port module and the FPGA-QDMA module, so as to realize the fast and balanced transmission of the network message.

其中的网络报文接收流程,具体步骤如下:The specific steps of the network packet receiving process are as follows:

(5.1)FPGA-QDMA模块的网络报文接收功能:接收外部网络报文发送至相对应的物理功能队列,即FPGA-QDMA模块接收100G网口的网络报文,根据报文类型、混杂模式以及目的MAC地址,指定网络报文相对应的发送物理功能队列,如图3所示,具体步骤如下:(5.1) The network message receiving function of the FPGA-QDMA module: receive external network messages and send them to the corresponding physical function queue, that is, the FPGA-QDMA module receives network messages from the 100G network port, according to the message type, mixed mode and The destination MAC address specifies the sending physical function queue corresponding to the network message, as shown in Figure 3, and the specific steps are as follows:

(5.1.1)FPGA端通过100G网口接收外部网络报文;(5.1.1) The FPGA side receives external network messages through the 100G network port;

(5.1.2)判断网络报文是否为广播包,是则执行(5.1.3),否则执行(5.1.4);(5.1.2) Determine whether the network packet is a broadcast packet, if so, execute (5.1.3), otherwise execute (5.1.4);

(5.1.3)将为广播包的网络报文复制成128个网络报文,依次给这128个网络报文指定报文对应的发送物理功能队列pf_queue_send;(5.1.3) The network message of the broadcast packet will be copied into 128 network messages, and the sending physical function queue pf_queue_send corresponding to the message is assigned to the 128 network messages in turn;

(5.1.4)计算获得列表vn_promisc_list个数promisc_nums,复制promisc_nums个报文,根据列表vn_promisc_list的虚拟网络端口号依次给报文指定对应的发送物理功能队列pf_queue_send;(5.1.4) Calculate and obtain the number promisc_nums of the list vn_promisc_list, copy promisc_nums messages, and assign the corresponding sending physical function queue pf_queue_send to the messages in turn according to the virtual network port numbers of the list vn_promisc_list;

(5.1.5)轮询列表vn_normal_list,找到mac地址与报文相同的虚拟网络端口号,指定报文对应的发送物理功能队列pf_queue_send;(5.1.5) Poll the list vn_normal_list, find the virtual network port number with the same mac address as the message, and specify the sending physical function queue pf_queue_send corresponding to the message;

(5.1.6)判断网络报文对应的发送物理功能队列pf_queue_send是否已满,是则执行(5.1.7),否则执行(5.1.10);(5.1.6) Determine whether the sending physical function queue pf_queue_send corresponding to the network message is full, if so, execute (5.1.7), otherwise execute (5.1.10);

(5.1.7)定义临时变量数组qdma_to_dpdk_q_pkgs[1—128]和qdma_to_dpdk_pf_pkgs[1—4],计算pf_queue[1—128]每个队列的待读取报文数,分别保存至数组qdma_to_dpdk_q_pkgs,根据数组qdma_to_dpdk_q_pkgs计算PF[1—4]每个物理功能的待读取报文数,分别保存至数组qdma_to_dpdk_pf_pkgs;(5.1.7) Define temporary variable arrays qdma_to_dpdk_q_pkgs[1—128] and qdma_to_dpdk_pf_pkgs[1—4], calculate the number of messages to be read in each queue of pf_queue[1—128], and save them to the array qdma_to_dpdk_q_pkgs respectively, according to the array qdma_to_dpdk_q_pkgs Calculate the number of messages to be read for each physical function of PF[1-4], and save them in the array qdma_to_dpdk_pf_pkgs;

(5.1.8)定义临时变量a和b,在qdma_to_dpdk_pf_pkgs[1—4]找到最小值,索引记作a,在qdma_to_dpdk_q_pkgs[(32a-31)—32a]找到最小值,索引记作b,判断pf_queue[b]是否已满,是则丢弃报文,否则执行(5.1.9);(5.1.8) Define temporary variables a and b, find the minimum value in qdma_to_dpdk_pf_pkgs[1-4], the index is recorded as a, find the minimum value in qdma_to_dpdk_q_pkgs[(32a-31)-32a], the index is recorded as b, and judge pf_queue [b] Whether it is full, if yes, discard the message, otherwise execute (5.1.9);

(5.1.9)修改网络报文发送队列pf_queue_send=pf_queue[b],报文增加vlan字段,并填充对应的虚拟网络端口号;(5.1.9) Modify the network message sending queue pf_queue_send=pf_queue[b], add the vlan field to the message, and fill in the corresponding virtual network port number;

(5.1.10)依次将报文发送至指定对应的发送物理功能队列pf_queue_send。(5.1.10) Send the message to the specified corresponding sending physical function queue pf_queue_send in sequence.

(5.2)在DPDK-QDMA模块,运行线程qdma_ingress_pthread,转发FPGA-QDMA模块报文至虚拟网络端口模块,如图4所示,具体步骤如下:(5.2) In the DPDK-QDMA module, run the thread qdma_ingress_pthread, forward the FPGA-QDMA module message to the virtual network port module, as shown in Figure 4, the specific steps are as follows:

(5.2.1)定义临时变量i、j、c和可存储4096个rte_mbuf内存地址的链表pkts_burst_rx_l,轮询PF[i]的队列集pf_queue[(32i-31)—32i],获取当前轮询到的队列pf_queue[j],读取pf_queue[j]的报文数c,判断读取的报文数c是否在[1—4096]范围内,是则执行(5.2.2),否则执行(5.2.1);(5.2.1) Define temporary variables i, j, c and a linked list pkts_burst_rx_l that can store 4096 rte_mbuf memory addresses, poll the queue set pf_queue[(32i-31)—32i] of PF[i], and obtain the current polled The queue pf_queue[j], read the number c of messages in pf_queue[j], and judge whether the number c of messages read is in the range of [1-4096], if yes, execute (5.2.2), otherwise execute (5.2 .1);

(5.2.2)从mbuf_pool_rx_pn[i]内存池申请c个rte_mbuf内存,调用rte_eth_rx_burst函数获取队列pf_queue[j]的网络报文,将报文依次保存至rte_mbuf内存,并将rte_mbuf内存地址插入到链表pkts_burst_rx_l,判断数组pkts_burst_rx是否为空,是则执行(5.2.1),否则执行(5.2.3);(5.2.2) Apply for c rte_mbuf memory from the mbuf_pool_rx_pn[i] memory pool, call the rte_eth_rx_burst function to obtain the network message of the queue pf_queue[j], save the message to the rte_mbuf memory in turn, and insert the rte_mbuf memory address into the linked list pkts_burst_rx_l , to determine whether the array pkts_burst_rx is empty, if yes, execute (5.2.1), otherwise execute (5.2.3);

(5.2.3)循环获取链表pkts_burst_rx_l的可读元素rte_mbuf内存,判断是否读取完毕,是则执行(5.2.1),否则执行(5.2.4);(5.2.3) Circularly obtain the readable element rte_mbuf memory of the linked list pkts_burst_rx_l, and judge whether the reading is complete, if so, execute (5.2.1), otherwise execute (5.2.4);

(5.2.4)判断无锁队列vn_dpdk_rx_q[j]是否已满,是则丢弃rte_mbuf内存中的报文,执行(5.2.3),否则执行(5.2.5);(5.2.4) Determine whether the lock-free queue vn_dpdk_rx_q[j] is full, if so, discard the message in the rte_mbuf memory and execute (5.2.3), otherwise execute (5.2.5);

(5.2.5)获取无锁队列vn_dpdk_rx_q[j]的空闲元素vn_from_dpdk_item,将rte_mbuf内存的地址赋值给vn_from_dpdk_item,并插入到无锁队列vn_dpdk_rx_q[j],执行(5.2.3)。(5.2.5) Obtain the free element vn_from_dpdk_item of the lock-free queue vn_dpdk_rx_q[j], assign the address of rte_mbuf memory to vn_from_dpdk_item, and insert it into the lock-free queue vn_dpdk_rx_q[j], and execute (5.2.3).

(5.3)DPDK-QDMA模块同时运行4个功能等价的qdma_ingress_pthread线程;(5.3) The DPDK-QDMA module runs four functionally equivalent qdma_ingress_pthread threads at the same time;

(5.4)在虚拟网络端口模块,运行线程rx_from_dpdk_kthread,转发DPDK-QDMA模块报文至虚拟网络端口内核,即通过发送物理功能队列将网络报文发送至与该队列相对应的虚拟网络端口,如图5所示,具体步骤如下:(5.4) In the virtual network port module, run the thread rx_from_dpdk_kthread to forward the DPDK-QDMA module message to the virtual network port kernel, that is, send the network message to the virtual network port corresponding to the queue by sending the physical function queue, as shown in the figure 5, the specific steps are as follows:

(5.4.1)定义临时变量i和j,轮询无锁队列集vn_dpdk_rx_q[(32i-31)—32i],获得当前轮询到的无锁队列vn_dpdk_rx_q[j],判断vn_dpdk_rx_q[j]是否为空,是则执行(5.4.1),否则执行(5.4.2);(5.4.1) Define temporary variables i and j, poll the lock-free queue set vn_dpdk_rx_q[(32i-31)—32i], obtain the currently polled lock-free queue vn_dpdk_rx_q[j], and judge whether vn_dpdk_rx_q[j] is Empty, if yes, execute (5.4.1), otherwise execute (5.4.2);

(5.4.2)定义单次读取vn_dpdk_rx_q单个队列的元素数量阈值为4096,循环获取vn_dpdk_rx_q[j]的可读元素dpdk_rx_item,判断vn_dpdk_rx_q[j]是否读取完毕或者读取元素数量达到4096,是则停止循环执行(5.4.1),否则执行(5.4.3);(5.4.2) Define the threshold value of the number of elements for a single read vn_dpdk_rx_q single queue to be 4096, obtain the readable element dpdk_rx_item of vn_dpdk_rx_q[j] in a loop, and judge whether vn_dpdk_rx_q[j] has been read or the number of read elements reaches 4096, yes Then stop the loop execution (5.4.1), otherwise execute (5.4.3);

(5.4.3)定义临时变量vn_port,判断dpdk_rx_item的rte_mbuf内存的报文是否包含vlan字段,是则从vlan获取虚拟网络端口号赋值给vn_port并将vlan字段从报文中删除,否则vn_port=j,执行(5.4.4);(5.4.3) Define the temporary variable vn_port to determine whether the message in the rte_mbuf memory of dpdk_rx_item contains the vlan field, and if so, obtain the virtual network port number from vlan and assign it to vn_port and delete the vlan field from the message, otherwise vn_port=j, execute (5.4.4);

(5.4.4)申请一个sk_buff内存,将rte_mbuf内存的报文拷贝至sk_buff内存,调用netif_rx_ni函数将sk_buff内存发送至虚拟网络端口vn_port,释放rte_mbuf内存,将dpdk_rx_item从vn_dpdk_rx_q[j]删除,执行(5.4.2)。(5.4.4) Apply for a sk_buff memory, copy the message in the rte_mbuf memory to the sk_buff memory, call the netif_rx_ni function to send the sk_buff memory to the virtual network port vn_port, release the rte_mbuf memory, delete dpdk_rx_item from vn_dpdk_rx_q[j], execute (5.4 .2).

(5.5)虚拟网络端口模块同时运行4个功能等价的rx_from_dpdk_kthread内核线程。(5.5) The virtual network port module runs four functionally equivalent rx_from_dpdk_kthread kernel threads simultaneously.

所述网络报文发送流程,具体步骤如下:The specific steps of the network message sending process are as follows:

(6.1)定义临时变量i,虚拟网络端口i发送网络报文,将网络报文插入无锁队列vn_port_tx_q[i],如图6所示,具体步骤如下:(6.1) Define a temporary variable i, the virtual network port i sends a network message, and inserts the network message into the lock-free queue vn_port_tx_q[i], as shown in Figure 6, the specific steps are as follows:

(6.1.1)在内存池mbuf_pool_tx_vn[i]中申请一个rte_mbuf内存;(6.1.1) Apply for an rte_mbuf memory in the memory pool mbuf_pool_tx_vn[i];

(6.1.2)判断虚拟网络端口i相应的无锁队列vn_port_tx_q[i]是否已满,是则丢弃网络报文,否则执行(6.1.3);(6.1.2) Determine whether the lock-free queue vn_port_tx_q[i] corresponding to the virtual network port i is full, if so, discard the network packets, otherwise execute (6.1.3);

(6.1.3)获得无锁队列vn_port_tx_q[i]的空闲元素vn_tx_item,将sk_buff内存中的网络报文拷贝到rte_mbuf内存,将rte_mbuf内存地址赋值给vn_tx_item,将vn_tx_item插入到vn_port_tx_q[i]队列,释放sk_buff内存。(6.1.3) Obtain the free element vn_tx_item of the lock-free queue vn_port_tx_q[i], copy the network packets in the sk_buff memory to the rte_mbuf memory, assign the rte_mbuf memory address to vn_tx_item, insert vn_tx_item into the vn_port_tx_q[i] queue, release sk_buff memory.

(6.2)所述的虚拟网络端口模块支持128个功能等价的虚拟网络端口同时发送报文;(6.2) The virtual network port module supports 128 function-equivalent virtual network ports to send messages at the same time;

(6.3)在虚拟网络端口模块,运行线程tx_to_dpdk_balance_kthread,转发虚拟网络端口报文至DPDK-QDMA模块内核,如图7所示,具体步骤如下:(6.3) In the virtual network port module, run the thread tx_to_dpdk_balance_kthread to forward the virtual network port message to the DPDK-QDMA module core, as shown in Figure 7, and the specific steps are as follows:

(6.3.1)定义临时变量i,循环轮询无锁队列集vn_port_tx_q[1—k],获得当前轮询到的无锁队列vn_port_tx_q[i],判断vn_port_tx_q[i]是否为空,是则执行(6.3.1),否则执行(6.3.2);(6.3.1) Define a temporary variable i, circularly poll the lock-free queue set vn_port_tx_q[1—k], obtain the currently polled lock-free queue vn_port_tx_q[i], judge whether vn_port_tx_q[i] is empty, and execute if so (6.3.1), otherwise execute (6.3.2);

(6.3.2)设置向DPDK-QDMA模块发送报文无锁队列:vn_dpdk_tx_q_cur=vn_dpdk_tx_q[i];(6.3.2) Set the lock-free queue for sending messages to the DPDK-QDMA module: vn_dpdk_tx_q_cur=vn_dpdk_tx_q[i];

(6.3.3)定义单次读取vn_port_tx_q单个队列的元素数量阈值为4096,循环获取vn_port_tx_q[i]的可读元素vn_tx_item,判断vn_port_tx_q[i]是否读取完毕或者读取元素数量达到4096,是则停止循环执行(6.3.1),否则执行(6.3.4);(6.3.3) Define the threshold for the number of elements of a single read vn_port_tx_q single queue to be 4096, obtain the readable element vn_tx_item of vn_port_tx_q[i] in a loop, and judge whether vn_port_tx_q[i] has been read or the number of read elements reaches 4096, yes Then stop the loop execution (6.3.1), otherwise execute (6.3.4);

(6.3.4)判断vn_dpdk_tx_q_cur是否满,是则执行(6.3.5),否则执行(6.3.8);(6.3.4) Determine whether vn_dpdk_tx_q_cur is full, if yes, execute (6.3.5), otherwise execute (6.3.8);

(6.3.5)定义临时变量数组vn_to_dpdk_q_single_pkgs[1—128],计算vn_dpdk_tx_q[1—k]每个队列的待发送报文数,分别保存至数组vn_to_dpdk_q_single_pkgs;(6.3.5) Define the temporary variable array vn_to_dpdk_q_single_pkgs[1—128], calculate the number of messages to be sent in each queue of vn_dpdk_tx_q[1—k], and save them in the array vn_to_dpdk_q_single_pkgs respectively;

(6.3.6)定义临时变量数组vn_to_dpdk_q_muster_pkgs[1—4],将vn_dpdk_tx_q[1—k]分成4组,每组每个队列,分别为vn_dpdk_tx_q[1—32],vn_dpdk_tx_q[33—64] ,vn_dpdk_tx_q[65—96],vn_dpdk_tx_q[97—128],根据数组vn_to_dpdk_q_single_pkgs计算每组的待发送报文数,分别保存至数组vn_to_dpdk_q_muster_pkgs;(6.3.6) Define the temporary variable array vn_to_dpdk_q_muster_pkgs[1—4], divide vn_dpdk_tx_q[1—k] into 4 groups, each group and each queue are vn_dpdk_tx_q[1—32], vn_dpdk_tx_q[33—64], vn_dpdk_tx_q [65-96], vn_dpdk_tx_q[97-128], calculate the number of packets to be sent in each group according to the array vn_to_dpdk_q_single_pkgs, and save them in the array vn_to_dpdk_q_muster_pkgs respectively;

(6.3.7)定义临时变量a和b,在vn_to_dpdk_q_muster_pkgs[1—4]找到最小值,索引记作a,在vn_dpdk_tx_q[(32a-31)—32a]找到最小值,索引记作b,判断vn_dpdk_tx_q[b]是否已满,是则丢弃报文,执行(6.3.3),否则vn_dpdk_tx_q_cur=vn_dpdk_tx_q[b],执行(6.3.8);(6.3.7) Define temporary variables a and b, find the minimum value in vn_to_dpdk_q_muster_pkgs[1-4], the index is recorded as a, find the minimum value in vn_dpdk_tx_q[(32a-31)-32a], the index is recorded as b, and judge vn_dpdk_tx_q [b] Whether it is full, if yes, discard the message and execute (6.3.3), otherwise vn_dpdk_tx_q_cur=vn_dpdk_tx_q[b], execute (6.3.8);

(6.3.8)获得vn_dpdk_tx_q_cur空闲元素dpdk_tx_item,将vn_tx_item的rte_mbuf内存地址赋值给dpdk_tx_item,将dpdk_tx_item插入到vn_dpdk_tx_q_cur,将vn_tx_item从删除vn_port_tx_q[i],执行(6.3.3)。(6.3.8) Get vn_dpdk_tx_q_cur free element dpdk_tx_item, assign the rte_mbuf memory address of vn_tx_item to dpdk_tx_item, insert dpdk_tx_item into vn_dpdk_tx_q_cur, delete vn_tx_item from vn_port_tx_q[i], execute (6.3).

(6.4)在DPDK-QDMA模块运行线程qdma_egress_pthread,转发虚拟网络端口模块报文至FPGA-QDMA模块,如图8所示,具体步骤如下:(6.4) Run the thread qdma_egress_pthread on the DPDK-QDMA module, and forward the virtual network port module message to the FPGA-QDMA module, as shown in Figure 8. The specific steps are as follows:

(6.4.1)定义临时变量i和j,轮询无锁队列集vn_dpdk_tx_q[(32i-31)—32i],获得当前轮询到的无锁队列vn_dpdk_tx_q[j],判断vn_dpdk_tx_q[j]是否为空,是则执行(6.4.1),否则执行(6.4.2);(6.4.1) Define temporary variables i and j, poll the lock-free queue set vn_dpdk_tx_q[(32i-31)—32i], obtain the currently polled lock-free queue vn_dpdk_tx_q[j], and judge whether vn_dpdk_tx_q[j] is Empty, if yes, execute (6.4.1), otherwise execute (6.4.2);

(6.4.2)定义临时变量可存储4096个rte_mbuf内存地址的链表pkts_burst_tx_l,定义单次读取vn_dpdk_tx_q单个队列的元素数量阈值为4096,循环获取vn_dpdk_tx_q[j]的可读元素dpdk_tx_item,判断vn_dpdk_tx_q[j]是否读取完毕或者读取元素数量达到4096,是则停止循环执行(6.4.1),否则将dpdk_tx_item的rte_mbuf内存地址插入到pkts_burst_tx_l,并将dpdk_tx_item从vn_dpdk_tx_q[j]删除,执行(6.4.3);(6.4.2) Define the linked list pkts_burst_tx_l which can store 4096 rte_mbuf memory addresses as a temporary variable, define the threshold of the number of elements in a single read vn_dpdk_tx_q single queue as 4096, obtain the readable element dpdk_tx_item of vn_dpdk_tx_q[j] in a loop, and judge vn_dpdk_tx_q[j ] Whether the reading is completed or the number of read elements reaches 4096, then stop the loop execution (6.4.1), otherwise insert the rte_mbuf memory address of dpdk_tx_item into pkts_burst_tx_l, and delete dpdk_tx_item from vn_dpdk_tx_q[j], execute (6.4.3 );

(6.4.3)调用rte_eth_tx_burst函数将链表pkts_burst_tx_l中的报文发送至FPGA-QDMA模块的PF[i]的pf_queue[j]队列,rte_eth_tx_burst函数释放链表pkts_burst_tx_l中的rte_mbuf内存,执行(6.4.1)。(6.4.3) Call the rte_eth_tx_burst function to send the message in the linked list pkts_burst_tx_l to the pf_queue[j] queue of PF[i] of the FPGA-QDMA module, the rte_eth_tx_burst function releases the rte_mbuf memory in the linked list pkts_burst_tx_l, and executes (6.4.1).

所述DPDK-QDMA模块同时运行4个功能等价的qdma_egress_pthread线程。The DPDK-QDMA module runs four functionally equivalent qdma_egress_pthread threads simultaneously.

(6.5)所述FPGA-QDMA模块报文发送功能轮询PF[1—4]的pf_queue[1—128]队列,依次获取报文后发送至100G网口。(6.5) The message sending function of the FPGA-QDMA module polls the pf_queue[1-128] of PF[1-4], obtains the messages in sequence and sends them to the 100G network port.

以上所述,仅为本发明的优选实施案例,并非对本发明做任何形式上的限制。虽然前文对本发明的实施过程进行了详细说明,对于熟悉本领域的人员来说,其依然可以对前述各实例记载的技术方案进行修改,或者对其中部分技术特征进行同等替换。凡在本发明精神和原则之内所做修改、同等替换等,均应包含在本发明的保护范围之内。The above descriptions are only preferred implementation examples of the present invention, and do not limit the present invention in any form. Although the implementation process of the present invention has been described in detail above, for those skilled in the art, it is still possible to modify the technical solutions described in the foregoing examples, or perform equivalent replacements for some of the technical features. All modifications, equivalent replacements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (10)

1. A method for expanding network ports and quickly equalizing messages is characterized by comprising the following steps:
firstly, a virtual network port is established in a virtual network port module of a server end, a physical function queue is established in an FPGA-QDMA module of the FPGA end, the virtual network port module and the FPGA-QDMA module are connected through a DPDK-QDMA module of the server end, one physical function queue is redistributed to be in one-to-one correspondence with the virtual network port, and the network port of the FPGA end is expanded;
step two, creating a lock-free queue, a memory pool and a thread when the DPDK-QDMA module is started, and guiding the virtual network port module and the FPGA-QDMA module to complete starting resource creation and allocation;
and step three, when the server side and the FPGA side receive and transmit the network messages, the virtual network port and the physical function queue corresponding to the virtual network port are transmitted to the network messages through the DPDK-QDMA module.
2. The method for processing network port expansion and packet fast equalization according to claim 1, wherein the creating of the lock-free queue, the memory pool, and the thread in the step two when the DPDK-QDMA module is started includes the following sub-steps:
(2.1) initializing an environment variable, acquiring the number n of physical functions PF supported by an FPGA-QDMA module, acquiring the number k of virtual network ports to be created according to a user configuration file, and calculating to obtain the number m = k/n of queues PF _ queue allocated to each physical function PF;
(2.2) creating a lock-free queue and a memory pool required by the virtual network port module, which specifically comprises the following steps:
(2.2.1) creating memory pools mbuf _ pool _ tx _ vn [ 1-k ] of k virtual network ports for storing and sending messages, wherein each memory pool comprises p rte _ mbuf memories;
(2.2.2) creating a lock-free queue vn _ port _ tx _ q [ 1-k ] of k virtual network ports for sending messages, wherein the queue depth is p;
(2.2.3) creating a lock-free queue vn _ DPDK _ tx _ q [ 1-k ] of k virtual network ports for sending messages to a DPDK-QDMA module, wherein the depth of the queue is p;
(2.2.4) establishing a lock-free queue vn _ DPDK _ rx _ q [ 1-k ] of k virtual network ports for receiving messages from a DPDK-QDMA module, wherein the queue depth is p;
(2.3) creating a memory pool and a thread required by the DPDK-QDMA module, which specifically comprises the following steps:
(2.3.1) creating memory pools mbuf _ pool _ rx _ pf [ 1-n ] of n DPDK-QDMA modules for storing received messages, wherein each memory pool comprises (m multiplied by p) rte _ mbuf memories;
(2.3.2) creating n threads QDMA _ ingress _ pthread for forwarding FPGA-QDMA module messages to the virtual network port module, and binding the threads QDMA _ ingress _ pthread to run on the CPU [ 1-n ];
(2.3.3) creating n threads QDMA _ offsets _ pthread for forwarding the virtual network port module message to the FPGA-QDMA module, and binding the threads QDMA _ offsets _ pthread to run on the CPU [ (n + 1) -2 n ];
(2.4) sending a command to the virtual network port module, acquiring information, and then creating a kernel thread for receiving and sending messages, specifically comprising:
(2.4.1) informing a virtual network port module to create k virtual network ports and obtaining the MAC addresses of the virtual network ports and the promiscuous mode;
(2.4.2) sending the physical addresses of the lock-free queues vn _ port _ tx _ q [ 1-k ], vn _ dpdk _ rx _ q [ 1-k ] and the memory pools mbuf _ pool _ tx _ vn [ 1-k ] for storing the sending messages to the virtual network port module;
(2.4.3) informing the virtual network port module to create a kernel thread for receiving messages from the DPDK-QDMA module and a kernel thread for sending messages to the DPDK-QDMA module;
(2.5) sending information to the FPGA-QDMA module, specifically comprising:
(2.5.1) sending the queue PF _ queue allocated by each physical function PF to the FPGA-QDMA module;
and (2.5.2) sending the MAC addresses of the k virtual network ports and the promiscuous mode to the FPGA-QDMA module.
3. The method according to claim 2, wherein the step two of guiding the virtual network port module to complete the creation and allocation of the start resource includes the following substeps:
(3.1) creating k virtual network ports, distributing MAC addresses for the ports, setting a promiscuous mode, and sending the MAC addresses and the promiscuous mode of all the ports to a DPDK-QDMA module;
(3.2) storing the physical addresses of lock-free queues vn _ port _ tx _ q [ 1-k ], vn _ dpdk _ rx _ q [ 1-k ] and memory pools mbuf _ pool _ tx _ vn [ 1-k ] for storing and sending messages;
(3.3) creating n kernel threads rx _ from _ DPDK _ kthread for receiving messages from the DPDK-QDMA module, and binding the n kernel threads rx _ from _ DPDK _ kthread to the CPU [ (2n + 1) -3 n ] for operation;
(3.4) creating a kernel thread tx _ to _ DPDK _ balance _ kthread for sending a message to the DPDK-QDMA module, and binding the kernel thread tx _ to _ dpdkk _ balance _ kthread to the CPU [3n +1] for running.
4. The method according to claim 3, wherein the step two of directing the FPGA-QDMA module to complete the creation and allocation of the boot resources comprises the following substeps:
(4.1) creating k queues PF _ queue [ 1-k ], each physical function PF being assigned m queues;
and (4.2) creating two lists, namely vn _ promisc _ list and vn _ normal _ list, according to whether the virtual network port opens the promiscuous mode, respectively storing the information of the virtual network port with the promiscuous function opened and the information of the virtual network port without the promiscuous function opened, storing the corresponding relation between the MAC address and the virtual network port, and simultaneously storing the corresponding relation between the virtual network port and the physical function queue.
5. The method according to claim 4, wherein the third step is specifically:
the method comprises the steps that an FPGA-QDMA module receives a network message of a 100G network port, a sending physical function queue corresponding to the network message is designated according to the message type, the promiscuous mode and a destination MAC address, a thread QDMA _ ingress _ pthread is operated on a DPDK-QDMA module, a thread rx _ from _ DPDK _ ktread is operated on a virtual network port, and the network message is sent to the virtual network port corresponding to the queue through the sending physical function queue;
the virtual network port receives the network message, runs a thread tx _ to _ DPDK _ balance _ kthread on the virtual network port module, runs a thread QDMA _ equations _ pthread on the DPDK-QDMA module, sends the network message to the FPGA-QDMA module through a physical function queue corresponding to the virtual network port, and finally sends the network message out through a 100G network port;
when the physical function queue corresponding to a virtual network port is in congestion, the virtual network port module and the FPGA-QDMA module distribute the network message to the idle physical function queue for transmission.
6. The method according to claim 5, wherein the FPGA-QDMA module receives a network packet of a 100G network port, and specifies a physical transmission function queue corresponding to the network packet according to a packet type, a hash pattern, and a destination MAC address, and specifically comprises the following sub-steps:
(5.1.1) receiving an external network message by the FPGA terminal through a 100G network port;
(5.1.2) judging whether the network message is a broadcast packet, if so, executing (5.1.3), otherwise, executing (5.1.4);
(5.1.3) duplicating the network messages which are the broadcast packets into k network messages, and sequentially assigning a sending physical function queue pf _ queue _ send corresponding to the messages to the k network messages;
(5.1.4) calculating the number promisc _ nums of the list vn _ promisc _ list, copying promisc _ nums messages, and sequentially assigning a corresponding physical function sending queue pf _ queue _ send to the messages according to the virtual network port number of the list vn _ promisc _ list;
(5.1.5) polling the list vn _ normal _ list, finding out the virtual network port number with the mac address same as the message, and appointing a sending physical function queue pf _ queue _ send corresponding to the message;
(5.1.6) judging whether a sending physical function queue pf _ queue _ send corresponding to the network message is full, if so, executing (5.1.7), otherwise, executing (5.1.10);
(5.1.7) defining temporary variable arrays qdma _ to _ dpdk _ q _ pkgs [ 1-k ] and qdma _ to _ dpdk _ PF _ pkgs [ 1-n ], calculating the number of messages to be read of each queue of PF _ queue [ 1-k ], respectively saving the number of messages to be read of each queue to the arrays qdma _ to _ dpdk _ q _ pkgs, calculating the number of messages to be read of each physical function of PF [ 1-n ] according to the arrays qdma _ to _ dpdk _ q _ pkgs, and respectively saving the number of messages to be read of each physical function of PF [ 1-n ] to the arrays qdma _ to _ dpdk _ PF _ pkgs;
(5.1.8) defining temporary variables a and b, finding the minimum value at qdma _ to _ dpdk _ pf _ pkgs [ 1-n ], marking the index as a, finding the minimum value at qdma _ to _ dpdk _ q _ pkgs [ (32 a-31) -32 a ], marking the index as b, judging whether pf _ queue [ b ] is full, if so, discarding the message, otherwise, executing (5.1.9);
(5.1.9) modifying a network message sending physical function queue pf _ queue _ send = pf _ queue [ b ], adding a vlan field in the message, and filling a corresponding virtual network port number;
(5.1.10) sequentially sending the message to the designated corresponding sending physical function queue pf _ queue _ send.
7. The method as claimed in claim 6, wherein the step of running the thread QDMA _ ingress _ pthread in the DPDK-QDMA module specifically includes the following sub-steps:
(5.2.1) defining temporary variables i, j and c and a linked list pkts _ burst _ rx _ l capable of storing p rte _ mbuf memory addresses, polling a queue set PF _ queue [ ((i-1) m + 1) -im ] of PF [ i ], acquiring the currently polled queue PF _ queue [ j ], reading the message number c of PF _ queue [ j ], judging whether the read message number c is in the range of [ 1-p ], if so, executing (5.2.2), otherwise, executing (5.2.1);
(5.2.2) applying for c rte _ mbuf memories from an mbuf _ pool _ rx _ pn [ i ] memory pool, acquiring network messages of a queue pf _ queue [ j ], sequentially storing the messages to rte _ mbuf memories, inserting rte _ mbuf memory addresses into a linked list pkts _ burst _ rx _ l, judging whether the array pkts _ burst _ rx is empty, if so, executing (5.2.1), otherwise, executing (5.2.3);
(5.2.3) circularly acquiring the readable element rte _ mbuf memory of the linked list pkts _ burst _ rx _ l, judging whether reading is finished, if so, executing (5.2.1), and if not, executing (5.2.4);
(5.2.4) judging whether the lock-free queue vn _ dpdk _ rx _ q [ j ] is full, if yes, discarding the message in the rte _ mbuf memory, and executing (5.2.3), otherwise, executing (5.2.5);
(5.2.5) obtaining a free element vn _ from _ dpdk _ item of the lock-free queue vn _ dpdk _ rx _ q [ j ], assigning the address of rte _ mbuf memory to the vn _ from _ dpdk _ item, inserting the address into the lock-free queue vn _ dpdk _ rx _ q [ j ], and executing (5.2.3).
8. The method as claimed in claim 7, wherein the running of the thread rx _ from _ dpdk _ kthread on the virtual network port sends the network packet to the virtual network port corresponding to the queue by sending a physical function queue, and the method comprises the following sub-steps:
(5.4.1) defining temporary variables i and j, polling a lock-free queue set vn _ dpdk _ rx _ q [ ((i-1) m + 1) -im ], obtaining a currently polled lock-free queue vn _ dpdk _ rx _ q [ j ], judging whether vn _ dpdk _ rx _ q [ j ] is empty, if yes, executing (5.4.1), and if no, executing (5.4.2);
(5.4.2) defining a threshold value of the number of elements of a single queue of single reading vn _ dpdk _ rx _ q, circularly obtaining the readable elements dpdk _ rx _ item of the vn _ dpdk _ rx _ q [ j ], judging whether the reading of the vn _ dpdk _ rx _ q [ j is finished or the number of the read elements reaches the defined threshold value, if so, stopping circularly executing (5.4.1), otherwise, executing (5.4.3);
(5.4.3) defining a temporary variable vn _ port, judging whether a rte _ mbuf memory message of the dpdk _ rx _ item contains a vlan field, if so, acquiring a virtual network port number from the vlan, assigning the virtual network port number to the vn _ port, deleting the vlan field from the message, otherwise, vn _ port = j, and executing (5.4.4);
(5.4.4) applying for an sk _ buff memory, copying a packet of rte _ mbuf memory to the sk _ buff memory, calling a netif _ rx _ ni function to send the sk _ buff memory to a virtual network port vn _ port, releasing rte _ mbuf memory, deleting dpdk _ rx _ item from vn _ dpdk _ rx _ q [ j ], and executing (5.4.2).
9. The method according to claim 8, wherein the virtual network port receives the network packet and inserts the network packet into the lock-free queue, and the method specifically includes the following sub-steps:
(6.1.1) defining a temporary variable i, and applying for a rte _ mbuf memory in a memory pool mbuf _ pool _ tx _ vn [ i ];
(6.1.2) judging whether a lock-free queue vn _ port _ tx _ q [ i ] corresponding to the virtual network port i is full, if so, discarding the network message, otherwise, executing (6.1.3);
(6.1.3) obtaining a free element vn _ tx _ item of a lock-free queue vn _ port _ tx _ q [ i ], copying a network message in the sk _ buff memory to rte _ mbuf memory, assigning a rte _ mbuf memory address to the vn _ tx _ item, inserting the vn _ tx _ item into the vn _ port _ tx _ q [ i ] queue, and releasing the sk _ buff memory.
10. The method as claimed in claim 9, wherein the running of the thread tx _ to _ DPDK _ balance _ kthread at the virtual network port module, the running of the thread QDMA _ equations _ pthread at the DPDK-QDMA module, the sending of the network packet to the FPGA-QDMA module through the physical function queue corresponding to the virtual network port, and the sending of the network packet through the 100G network port, specifically includes the following sub-steps:
(6.3.1) defining a temporary variable i, circularly polling a lock-free queue set vn _ port _ tx _ q [ 1-k ], obtaining a currently polled lock-free queue vn _ port _ tx _ q [ i ], judging whether the vn _ port _ tx _ q [ i ] is empty, if so, executing (6.3.1), otherwise, executing (6.3.2);
(6.3.2) setting a message lock-free queue sent to the DPDK-QDMA module: vn _ dpdk _ tx _ q _ cur = vn _ dpdk _ tx _ q [ i ];
(6.3.3) defining a threshold value of the number of elements of a single queue of each read vn _ port _ tx _ q, circularly acquiring the readable elements vn _ tx _ item of the vn _ port _ tx _ q [ i ], judging whether the reading of the vn _ port _ tx _ q [ i ] is finished or the number of the read elements reaches the set threshold value, if so, stopping the circular execution (6.3.1), otherwise, executing (6.3.4);
(6.3.4) determining whether vn _ dpdk _ tx _ q _ cur is full, if yes, performing (6.3.5), otherwise, performing (6.3.8);
(6.3.5) defining a temporary variable array vn _ to _ dpdk _ q _ single _ pkgs [ 1-k ], calculating the number of messages to be sent of each queue of vn _ dpdk _ tx _ q [ 1-k ], and respectively saving the number of the messages to be sent to the array vn _ to _ dpdk _ q _ single _ pkgs;
(6.3.6) defining a temporary variable array vn _ to _ dpdk _ q _ multiplexer _ pkgs [ 1-n ], dividing vn _ dpdk _ tx _ q [ 1-k ] into 4 groups, wherein each group comprises vn _ dpdk _ tx _ q [ 1-m ], … and vn _ dpdk _ tx _ q [ ((n-1) m + 1) -nm ], calculating the number of messages to be sent of each group according to the array vn _ to _ dpdk _ q _ single _ pkgs, and storing the number of messages to be sent to the array vn _ to _ dpdk _ q _ multiplexer _ pkgs respectively;
(6.3.7) defining temporary variables a and b, finding the minimum value at vn _ to _ dpdk _ q _ master _ pkgs [ 1-n ], marking the index as a, finding the minimum value at vn _ dpdk _ tx _ q [ ((a-1) m + 1) -am ], marking the index as b, judging whether vn _ dpdk _ tx _ q [ b ] is full, if yes, discarding the message, executing (6.3.3), otherwise, vn _ dpdk _ tx _ q _ cur = vn _ dpdk _ tx _ q [ b ], and executing (6.3.8);
(6.3.8) obtaining vn _ dpdk _ tx _ q _ cur free element dpdk _ tx _ item, assigning rte _ mbuf memory address of vn _ tx _ item to dpdk _ tx _ item, inserting dpdk _ tx _ item into vn _ dpdk _ tx _ q _ cur, deleting vn _ port _ tx _ q [ i ], and executing (6.3.3);
(6.4.1) redefining temporary variables i and j, polling a lock-free queue set vn _ dpdk _ tx _ q [ ((i-1) m + 1) -im ], obtaining a currently polled lock-free queue vn _ dpdk _ tx _ q [ j ], judging whether vn _ dpdk _ tx _ q [ j ] is empty, if yes, executing (6.4.1), and if no, executing (6.4.2);
(6.4.2) defining a temporary variable capable of storing a linked list pkts _ burst _ tx _ l of p rte _ mbuf memory addresses, defining a threshold value of the number of elements of a single read vn _ dpdk _ tx _ q queue as p, circularly obtaining the readable elements dpdk _ tx _ item of vn _ dpdk _ tx _ q [ j ], judging whether the reading of vn _ dpdk _ tx _ q [ j ] is finished or the number of the read elements reaches p, if so, stopping circular execution (6.4.1), otherwise, inserting rte _ mbuf memory addresses of dpdk _ tx _ item into pkts _ burst _ tx _ l, deleting the dpdk _ tx _ item from the vn _ dpdk _ tx _ q [ j ], and executing (6.4.3);
(6.4.3) calling rte _ eth _ tx _ burst function to send the message in the linked list pkts _ burst _ tx _ l to the PF _ queue [ j ] queue of PF [ i ] of the FPGA-QDMA module, and releasing rte _ mbuf memory in the linked list pkts _ burst _ tx _ l by rte _ eth _ tx _ burst function to execute (6.4.1);
and (6.5) polling PF _ queue [ 1-k ] queues of PF [ 1-n ] by the FPGA-QDMA module message sending function, sequentially acquiring messages and sending the messages to a 100G network port.
CN202211359114.6A 2022-11-02 2022-11-02 Network port expansion and message rapid equalization processing method Active CN115412502B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211359114.6A CN115412502B (en) 2022-11-02 2022-11-02 Network port expansion and message rapid equalization processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211359114.6A CN115412502B (en) 2022-11-02 2022-11-02 Network port expansion and message rapid equalization processing method

Publications (2)

Publication Number Publication Date
CN115412502A true CN115412502A (en) 2022-11-29
CN115412502B CN115412502B (en) 2023-03-24

Family

ID=84169137

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211359114.6A Active CN115412502B (en) 2022-11-02 2022-11-02 Network port expansion and message rapid equalization processing method

Country Status (1)

Country Link
CN (1) CN115412502B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117640546A (en) * 2023-11-28 2024-03-01 北京中科腾越科技发展有限公司 Method and device for expanding network port based on source MAC address and electronic equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108270676A (en) * 2016-12-31 2018-07-10 普天信息技术有限公司 A kind of network data processing method and device based on IntelDPDK
US20180232334A1 (en) * 2017-02-13 2018-08-16 Mellanox Technologies, Ltd. Multi-PCIe Socket NIC OS Interface
CN108632166A (en) * 2018-04-25 2018-10-09 湖北锐世数字医学影像科技有限公司 A kind of packet receiving L2 cache method and system based on DPDK
CN109634720A (en) * 2018-12-13 2019-04-16 郑州云海信息技术有限公司 A kind of multi-dummy machine shares the method, system and device of FPGA board
CN110719234A (en) * 2019-10-17 2020-01-21 南京中孚信息技术有限公司 DPDK-based data packet processing method and device
CN111522653A (en) * 2020-02-07 2020-08-11 华中科技大学 Container-based Network Functions Virtualization Platform
EP3796168A1 (en) * 2019-09-19 2021-03-24 Fujitsu Limited Information processing apparatus, information processing method, and virtual machine connection management program
CN112787937A (en) * 2021-01-21 2021-05-11 深圳市中网信安技术有限公司 Message forwarding method, terminal equipment and computer storage medium
CN113051057A (en) * 2021-03-30 2021-06-29 联想(北京)有限公司 Multithreading data lock-free processing method and device and electronic equipment
CN113419780A (en) * 2021-05-08 2021-09-21 中国科学院声学研究所 DPDK driving system based on FPGA accelerator card
CN114020618A (en) * 2021-10-30 2022-02-08 江苏信而泰智能装备有限公司 High-availability test method and system based on FPGA and DPDK
CN115277407A (en) * 2022-07-25 2022-11-01 北京天融信网络安全技术有限公司 Network port configuration processing method and device, electronic equipment and storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108270676A (en) * 2016-12-31 2018-07-10 普天信息技术有限公司 A kind of network data processing method and device based on IntelDPDK
US20180232334A1 (en) * 2017-02-13 2018-08-16 Mellanox Technologies, Ltd. Multi-PCIe Socket NIC OS Interface
CN108632166A (en) * 2018-04-25 2018-10-09 湖北锐世数字医学影像科技有限公司 A kind of packet receiving L2 cache method and system based on DPDK
CN109634720A (en) * 2018-12-13 2019-04-16 郑州云海信息技术有限公司 A kind of multi-dummy machine shares the method, system and device of FPGA board
EP3796168A1 (en) * 2019-09-19 2021-03-24 Fujitsu Limited Information processing apparatus, information processing method, and virtual machine connection management program
CN110719234A (en) * 2019-10-17 2020-01-21 南京中孚信息技术有限公司 DPDK-based data packet processing method and device
CN111522653A (en) * 2020-02-07 2020-08-11 华中科技大学 Container-based Network Functions Virtualization Platform
CN112787937A (en) * 2021-01-21 2021-05-11 深圳市中网信安技术有限公司 Message forwarding method, terminal equipment and computer storage medium
CN113572688A (en) * 2021-01-21 2021-10-29 深圳市中网信安技术有限公司 Message forwarding method, terminal equipment and computer storage medium
CN113051057A (en) * 2021-03-30 2021-06-29 联想(北京)有限公司 Multithreading data lock-free processing method and device and electronic equipment
CN113419780A (en) * 2021-05-08 2021-09-21 中国科学院声学研究所 DPDK driving system based on FPGA accelerator card
CN114020618A (en) * 2021-10-30 2022-02-08 江苏信而泰智能装备有限公司 High-availability test method and system based on FPGA and DPDK
CN115277407A (en) * 2022-07-25 2022-11-01 北京天融信网络安全技术有限公司 Network port configuration processing method and device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
姜海粟等: "基于DPDK的多端口并行通信机制", 《小型微型计算机系统》 *
陈姚节等: "基于FPGA的VGA显示接口的研究与设计", 《交通与计算机》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117640546A (en) * 2023-11-28 2024-03-01 北京中科腾越科技发展有限公司 Method and device for expanding network port based on source MAC address and electronic equipment
CN117640546B (en) * 2023-11-28 2024-10-18 北京中科腾越科技发展有限公司 Method and device for expanding network port based on source MAC address and electronic equipment

Also Published As

Publication number Publication date
CN115412502B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
CN107690622B9 (en) Method, device and system for implementing hardware accelerated processing
WO2021254330A1 (en) Memory management method and system, client, server and storage medium
CN104521198B (en) For the system and method for Virtual Ethernet binding
CN110891026B (en) A flow scheduling method, device and system
WO2020073903A1 (en) Latency-sensitive network communication method and apparatus thereof
CN103763173B (en) Data transmission method and calculate node
CN104580011B (en) A kind of data forwarding device and method
WO2015058698A1 (en) Data forwarding
WO2014015664A1 (en) Communication method and system
CN106301859A (en) A kind of manage the method for network interface card, Apparatus and system
CN104468401A (en) Message processing method and device
CN102790777A (en) Network interface adapter register method as well as drive equipment and server
CN115913937A (en) A network configuration method, device, equipment and storage medium for a container with multiple network cards
CN112583655A (en) Data transmission method and device, electronic equipment and readable storage medium
CN115412502B (en) Network port expansion and message rapid equalization processing method
CN110267276A (en) Network slicing deployment method and device
CN111404986B (en) Data transmission processing method, device and storage medium
CN113553137B (en) A high-speed data processing method for access capability network elements based on DPDK under NFV architecture
CN111416776B (en) Method for transmitting data and network device
CN114780228A (en) Method and system for creating hybrid cloud resources
CN115914236B (en) Storage space allocation adjustment method and device, electronic equipment and storage medium
CN113852589B (en) Method, apparatus and medium for data transmission and data reception
CN116954874A (en) Resource allocation method, device, equipment and storage medium
CN104079508B (en) Message treatment method and device
US10992601B2 (en) Packet processing method and apparatus in multi-layered network environment

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