WO2018036007A1 - 网络数据接收的处理方法及装置、存储介质 - Google Patents

网络数据接收的处理方法及装置、存储介质 Download PDF

Info

Publication number
WO2018036007A1
WO2018036007A1 PCT/CN2016/107150 CN2016107150W WO2018036007A1 WO 2018036007 A1 WO2018036007 A1 WO 2018036007A1 CN 2016107150 W CN2016107150 W CN 2016107150W WO 2018036007 A1 WO2018036007 A1 WO 2018036007A1
Authority
WO
WIPO (PCT)
Prior art keywords
network device
identifier
data packets
polling queue
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.)
Ceased
Application number
PCT/CN2016/107150
Other languages
English (en)
French (fr)
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.)
State Grid Information and Telecommunication Group Co Ltd
Beijing Smartchip Microelectronics Technology Co Ltd
State Grid Corp of China SGCC
Original Assignee
State Grid Information and Telecommunication Group Co Ltd
Beijing Smartchip Microelectronics Technology Co Ltd
State Grid Corp of China SGCC
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 State Grid Information and Telecommunication Group Co Ltd, Beijing Smartchip Microelectronics Technology Co Ltd, State Grid Corp of China SGCC filed Critical State Grid Information and Telecommunication Group Co Ltd
Publication of WO2018036007A1 publication Critical patent/WO2018036007A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9063Intermediate storage in different physical parts of a node or terminal
    • H04L49/9068Intermediate storage in different physical parts of a node or terminal in the network interface card
    • H04L49/9073Early interruption upon arrival of a fraction of a packet

Definitions

  • the present invention relates to communication technologies, and in particular, to a method and device for processing network data reception, and a storage medium.
  • the Central Processing Unit usually uses an interrupt mechanism to process network data reception.
  • the existing interrupt mechanism is: when the network card receives the data packet, the network card sends an interrupt request to the CPU.
  • the CPU receives the interrupt request sent by the network card, it determines whether to call the interrupt processing program in the driver according to the specific interrupt setting. If the interrupt status is on, the interrupt handler in the NIC driver is called to receive the data packet, that is, the interrupt is completely received by the interrupt method. In the case of small data traffic load, this mechanism of interrupt processing reduces the processing time delay and greatly improves the CPU utilization.
  • the inventors of the present invention have found that when the network traffic is huge, the data packet cannot be effectively processed, and as the data packet continues to flow, the buffer queue is filled and the packet is lost.
  • the technical problem to be solved by the embodiments of the present invention is to provide a processing method and device for network data receiving, and a storage medium, to solve the problem that the interrupt mechanism is prone to interrupt livelock or packet loss when the network traffic is large.
  • the first embodiment of the present invention provides a method for processing network data reception, including:
  • the method further includes:
  • the method before the obtaining the identifier of the network device in the polling queue and obtaining the number of data packets corresponding to the network device according to the identifier of the network device, the method includes:
  • the method before the obtaining the identifier of the network device in the polling queue and obtaining the number of data packets corresponding to the network device according to the identifier of the network device, the method further includes:
  • the preset value P is determined according to the number of identifiers of the network devices in the polling queue.
  • the obtaining the identifier of the network device in the polling queue, and acquiring the number of data packets corresponding to the network device according to the identifier of the network device includes:
  • An embodiment of the present invention provides, in a second aspect, a processing apparatus for network data reception, including:
  • the obtaining module is configured to obtain an identifier of the network device in the polling queue, and obtain the number of data packets corresponding to the network device according to the identifier of the network device;
  • the determining module is configured to determine whether the number of data packets corresponding to the network device is greater than a preset value P;
  • the processing module is configured to process P data packets in the data packet corresponding to the network device when the number of data packets corresponding to the network device is greater than a preset value P.
  • the processing module is further configured to: when the number of data packets corresponding to the network device is less than a preset value P, process all data packets corresponding to the network device; The identifier of the network device whose number of data packets is less than a preset value P is deleted in the polling queue.
  • the method further includes:
  • a receiving module configured to: acquire, by the acquiring module, an identifier of the network device in the polling queue, and receive a data packet sent by the network device before acquiring the number of data packets corresponding to the network device according to the identifier of the network device And an interrupt request;
  • the method further includes: a calculating module, configured to acquire, by the acquiring module, an identifier of the network device in the polling queue, and obtain a data packet corresponding to the network device according to the identifier of the network device Before the quantity,
  • the preset value P is determined according to the number of identifiers of the network devices in the polling queue.
  • the embodiment of the present invention provides a processing device for receiving network data, including:
  • the embodiment of the present invention provides a storage medium storing executable instructions for performing the processing method of network data receiving provided by the embodiment of the present invention.
  • the processing method greatly reduces the interrupt overhead, and avoids packet loss by setting the number of processing packets once.
  • FIG. 1 is a flowchart of a method for processing network data reception according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for processing network data reception according to another embodiment of the present invention.
  • FIG. 3 is a flowchart of a method for processing network data reception according to still another embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a processing apparatus for receiving network data according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a processing apparatus for receiving network data according to another embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a processing apparatus for receiving network data according to still another embodiment of the present invention.
  • the identifier of the network device in the polling queue is obtained, and the number of data packets corresponding to the network device is obtained according to the identifier of the network device; and the number of data packets corresponding to the network device is determined. Whether the number of data packets corresponding to the network device is greater than the preset number, and processing the preset number of data packets in the data packet corresponding to the corresponding network device.
  • step S1 the identifier of the network device in the polling queue is obtained, and the number of data packets corresponding to the network device is obtained according to the identifier of the network device.
  • the network device is a peripheral device connected to the CPU, and may be a network card or the like.
  • the network device sends an interrupt request to the CPU.
  • the ID of the network device that receives multiple packets is stored in the polling queue.
  • step S2 it is determined whether the number of data packets corresponding to the network device is greater than a preset value P.
  • Step S3 if the number of data packets corresponding to the network device is greater than a preset value P, The P packets in the data packet corresponding to the network device (that is, the network device whose corresponding number of packets is larger than the preset value P) are processed.
  • step S1 the method includes:
  • Step S01 receiving a data packet sent by the network device and an interrupt request
  • the network device After registering the identity of the network device into the polling queue, the network device turns off the reception interrupt.
  • the network device by receiving the data packet sent by the network device and the interrupt request, registering the identifier of the network device in the polling queue according to the interrupt request, and adopting a polling manner to reduce the interruption.
  • the overhead guarantees the integrity of the data and avoids packet loss.
  • step S2 the method further includes:
  • step S5 the identifier of the network device whose number of data packets is less than a preset value P is deleted in the polling queue.
  • step S3 or S5 the next network device in the polling queue is acquired.
  • the identification of the above steps is repeated until there is no identifier for the network device in the polling queue.
  • the identification greatly reduces the interrupt overhead, and avoids packet loss by setting the number of processing packets once.
  • FIG. 2 is a flowchart of a method for processing network data reception according to another embodiment of the present invention.
  • the steps of the same reference numerals in FIG. 2 and FIG. 1 are applied to the same text description, and Let me repeat.
  • This embodiment further defines Embodiment 1.
  • the embodiment may include:
  • Step S04 Determine the preset value P according to the number of identifiers of the network device in the polling queue.
  • the preset value P is smaller to ensure that all network devices in the polling queue are accessed once in a certain time interval.
  • step S03 and step S04 may be set to be executed after the preset number of times is updated in the polling queue, or may be set to be executed after a preset time.
  • the preset value P is determined according to the number of identifiers of the network devices in the polling queue.
  • the value of the preset value P may be corrected according to the number of the identifiers of the updated network device.
  • the number of processing of the data packet can be adaptively increased or decreased, and the fair scheduling of the plurality of network devices is realized, and the real-time performance of the data processing is ensured.
  • step S03 and step S01 are not limited. What is shown in the drawings is only an implementation and is not a limitation of the order of execution.
  • FIG. 3 is a flowchart of a method for processing network data reception according to still another embodiment of the present invention.
  • the steps of the same reference numerals in FIG. 3 and FIG. 1 are applied to the same text description, and FIG. Let me repeat.
  • This embodiment further defines step S1 of the first embodiment. As shown in FIG. 3, step S1 in this embodiment may specifically include:
  • Step S101 Acquire, according to the identifier of the network device in the polling queue, the communication traffic of each network device in the polling queue.
  • Step S102 Calculate a preset time according to the communication traffic of each network device in the polling queue
  • step S103 the identifier of the network device in the polling queue is obtained according to the preset time, and the number of data packets corresponding to the network device is obtained according to the identifier of the network device.
  • the calculation of the preset time can be achieved by setting a timer.
  • the timer starts timing when there is data update in the polling queue. When the preset time is reached, the timer notifies the CPU to process the data packet. The timer is reset when the CPU starts data processing.
  • the timer determines the time interval of the next polling by querying the status of the current network, and adjusts the frequency of the timer to achieve the purpose of adaptive network conditions. If the network is in a large amount of traffic and the data buffer update frequency is high, then the corresponding polling frequency is increased, that is, the timer interval is reduced, and the preset time is shortened. If the amount of data on the network is small, the polling frequency is reduced accordingly, and the time interval of the timer is increased to increase the preset time.
  • the step S1 may further include: determining whether the network device exists in the polling queue, and when there is an identifier of the network device in the polling queue, performing step S101, when the identifier of the network device does not exist in the polling queue. , receiving interrupts.
  • the preset time is calculated according to the communication traffic of each network device in the polling queue, and the identifier of the network device in the polling queue is obtained according to the preset time, and is obtained according to the identifier of the network device.
  • the number of data packets corresponding to the network device, according to network traffic Time is adjusted to improve the effectiveness of user process and kernel space data interaction.
  • FIG. 4 is a schematic structural diagram of a processing apparatus for receiving network data according to an embodiment of the present invention. As shown in FIG. 4, the apparatus 10 includes:
  • the obtaining module 1 is configured to obtain the identifier of the network device in the polling queue, and obtain the number of data packets corresponding to the network device according to the identifier of the network device.
  • the determining module 2 is configured to determine whether the number of data packets corresponding to the network device is greater than a preset value P.
  • the processing module 3 is configured to process P data packets in the data packet corresponding to the network device when the number of data packets corresponding to the network device is greater than a preset value P.
  • the invention obtains the identifier of the network device in the polling queue, and when the number of data packets corresponding to the network device is greater than the preset value P, processes P packets in the data packet corresponding to the network device, and uses polling.
  • the way of processing greatly reducing the interrupt overhead, by setting the number of processing packets once, to avoid packet loss.
  • the processing module 3 is further configured to: when the number of data packets corresponding to the network device is less than a preset value P, process all data packets corresponding to the network device; in the polling queue And deleting an identifier of the network device whose number of data packets is less than a preset value P.
  • the identification greatly reduces the interrupt overhead, and avoids packet loss by setting the number of processing packets once.
  • FIG. 5 is a schematic structural diagram of a processing apparatus for receiving network data according to another embodiment of the present invention. The steps of the same reference numerals in FIG. 5 and FIG. 4 are applied to the same text as FIG. 4. The word description will not be repeated here.
  • the device 10 further includes:
  • the receiving module 4 is configured to: before the acquiring module 1 acquires the identifier of the network device in the polling queue, and obtain the number of data packets corresponding to the network device according to the identifier of the network device, receive the sending by the network device a data packet and an interrupt request; according to the interrupt request, registering an identifier of the network device into the polling queue.
  • the network device by receiving the data packet sent by the network device and the interrupt request, registering the identifier of the network device in the polling queue according to the interrupt request, and adopting a polling manner to reduce the interruption.
  • the overhead guarantees the integrity of the data and avoids packet loss.
  • FIG. 6 is a schematic structural diagram of a processing apparatus for receiving network data according to still another embodiment of the present invention. The steps of the same reference numerals in FIG. 6 and FIG. 4 are applied to the same text description, and FIG. Let me repeat. As shown in FIG. 6, the device 10 further includes:
  • the calculation module 5 is configured to acquire the identifier of the network device in the polling queue, and acquire the number of data packets corresponding to the network device according to the identifier of the network device, and obtain the polling queue.
  • the number of identifiers of the network device determining the preset value P according to the number of identifiers of the network devices in the polling queue.
  • the acquiring module 1 is configured to: obtain, according to the identifier of the network device in the polling queue, the communication traffic of each network device in the polling queue; according to each network in the polling queue The communication traffic of the device is calculated by the preset time; the identifier of the network device in the polling queue is obtained according to the preset time, and the number of data packets corresponding to the network device is obtained according to the identifier of the network device.
  • the preset time is calculated according to the communication traffic of each network device in the polling queue, and the identifier of the network device in the polling queue is obtained according to the preset time, and according to the The identifier of the network device acquires the number of data packets corresponding to the network device, and adjusts the preset time according to the network traffic, thereby improving the effectiveness of the interaction between the user process and the kernel space data.
  • modules shown in FIG. 4 and FIG. 5 are partitioning of the network data receiving device at the logical function level. According to the understanding of FIG. 4 and FIG. 5, some of the modules may also be merged, or Some modules are further divided to implement various optional structures of the network data receiving device.
  • the processing device for network data reception can also implement the functions of the above modes by the processor and the memory, and the instructions of the executable instructions in the memory are executed by the memory.
  • the memory can be implemented in a microprocessor (MCU), which can be implemented in a variety of volatile or non-volatile storage media.
  • MCU microprocessor
  • the memory and processor may be implemented in an integrated manner using an application specific integrated circuit (ASIC), a logic programmable gate (FPGA), or a complex programmable logic device (CPLD).
  • ASIC application specific integrated circuit
  • FPGA logic programmable gate
  • CPLD complex programmable logic device
  • the network device is used as an example for the network card.
  • the processing method of the network device by the system may be changed when the first data packet arrives.
  • the specific method is:
  • the NIC When the first packet arrives, the NIC generates a hardware interrupt and the system then enters interrupt processing. The system closes the receiving interrupt of the network card, registers the network card device into the polling queue, then wakes up the soft interrupt and enters the polling processing program.
  • the processor uses the polling mode to perform data reading on the network device in the polling queue. Before each reading, it is determined whether there is fixed quota data in the buffer of the network card, and if so, the data in the network card buffer is obtained. If the packet is not sufficiently fixed, the network device is logged out of the polling queue after all data has been read.
  • the present invention approaches the interrupt mode in the case of light load, and the response speed is fast; in the case of heavy load, it approaches the polling mode, efficiently processes the data packet and avoids the interruption in the case of heavy load. Live lock and packet loss issues.
  • the adjustable interrupt polling completes the effective reading of data from the network card to the kernel, and the user process reading data from the kernel is also an important part of improving the data reception of the high speed network.
  • Adapted polling daemon technology the specific approach is:
  • the upper application uses polling to monitor the status of the data buffer update.
  • a timer is turned on and the application is temporarily hibernated. If the polling is not turned on within the time specified by the timer, the timer wakes up the upper application to process the data.
  • the timer will start timing again.
  • the time interval of the next polling is determined by querying the current running state, and the frequency of the timer is adjusted to achieve the purpose of adaptive network conditions.
  • the network is in a large amount of traffic and the data buffer update frequency is high, increase the polling frequency accordingly and decrease the timer interval. If the amount of data on the network is small, the polling frequency is reduced accordingly, and the time interval of the timer is increased.
  • the quota (preset value P) can effectively solve the fair scheduling problem of multiple network devices.
  • the quota is set to be large, when there are many network devices in the polling queue, the data packets of each network device cannot be processed in time, so that the real-time performance of the data cannot be guaranteed.
  • the set quota is small and there are not many devices in the polling queue, it will cause frequent context switching, resulting in unnecessary overhead.
  • the adjustable maximum quota technology can dynamically change the number of readable quotas according to the number of network devices in the polling queue, thus ensuring data real-time and system effectiveness.
  • the inventors of the present invention have also noticed that in the case of a multi-core multi-network device, when a continuous flow of data packets comes, if the CPU is not specifically limited, that is, each CPU can be used to process the network. Device data packets, so that multiple CPUs can be used simultaneously to process a large number of data packets sent from multiple network devices. Since the hard interrupt is closed before the NIC soft interrupt is executed, no interruption can interrupt such processing. The process until the soft interrupt ends itself. In extreme cases, because no processor can be used to process other processes, it can cause the system to crash. Accordingly, the present invention proposes to limit the processing of network device data packets by a particular CPU, thereby avoiding the collapse of the system in such extreme cases while ensuring efficient use of the processor.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

本发明涉及一种网络数据接收的处理方法及装置、存储介质;方法包括:获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量,判断所述网络设备对应的数据包数量是否大于预设数量,若所述网络设备对应的数据包数量大于预设数量,则对相应网络设备对应的数据包中的预设数量的数据包进行处理,采用轮询方式的处理方式,减少了中断开销,通过设置一次数据包的处理个数,避免丢包。

Description

网络数据接收的处理方法及装置、存储介质 技术领域
本发明涉及通信技术,尤其涉及一种网络数据接收的处理方法及装置、存储介质。
背景技术
目前,中央处理器(Central Processing Unit,缩写:CPU)通常采用中断机制来进行网络数据接收的处理。
现有的中断机制为,当网卡收到数据包后,网卡会向CPU发送中断请求,当CPU收到网卡发送的中断请求后,根据具体的中断设置,判断是否调用驱动中的中断处理程序,如果是开中断状态则会调用网卡驱动中的中断处理程序接收数据包,即完全靠中断方式来收包。在数据流量负载不大的情况下,这种中断处理的机制减少了处理的时间延迟,大大提高了CPU的利用率。
但是,基于此,本发明的发明人发现,当网络流量巨大的时候,数据包无法被有效处理,随着数据包的不断涌进,就会塞满缓冲队列,造成丢包。
发明内容
有鉴于此,本发明实施例要解决的技术问题是,提供一种网络数据接收的处理方法及装置、存储介质,以解决中断机制在网络流量大时容易出现中断活锁或丢包的问题。
为解决以上技术问题,本发明实施例在第一方面提供一种网络数据接收的处理方法,包括:
获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量;
判断所述网络设备对应的数据包数量是否大于预设值P;
若所述网络设备对应的数据包数量大于预设值P,则对所述网络设备对应的数据包中的P个数据包进行处理。
在一种可能的实现方式中,在判断所述网络设备对应的数据包数量是否大于预设值P之后,还包括:
若所述网络设备对应的数据包数量小于预设值P,对所述网络设备对应的全部数据包进行处理;
在所述轮询队列中删除所述数据包数量小于预设值P的所述网络设备的标识。
在一种可能的实现方式中,在所述获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量之前,包括:
接收所述网络设备发送的数据包以及中断请求;
根据所述中断请求,将所述网络设备的标识注册到所述轮询队列中。
在一种可能的实现方式中,在所述获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量之前,还包括:
获取所述轮询队列中所述网络设备的标识的数量;
根据所述轮询队列中所述网络设备的标识的数量,确定所述预设值P。
在一种可能的实现方式中,所述获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量,包括:
根据所述轮询队列中网络设备的标识,获取所述轮询队列中每个网络设备的通信流量;
根据所述轮询队列中每个网络设备的通信流量计算预设时间;
根据所述预设时间,获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量。
本发明实施例在第二方面提供一种网络数据接收的处理装置,包括:
获取模块,配置为获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量;
判断模块,配置为判断所述网络设备对应的数据包数量是否大于预设值P;
处理模块,配置为在所述网络设备对应的数据包数量大于预设值P时,对所述网络设备对应的数据包中的P个数据包进行处理。
在一种可能的实现方式中,所述处理模块还配置为,在所述网络设备对应的数据包数量小于预设值P时,对所述网络设备对应的全部数据包进行处理;在所述轮询队列中删除所述数据包数量小于预设值P的所述网络设备的标识。
在一种可能的实现方式中,还包括:
接收模块,配置为在所述获取模块获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量之前,接收所述网络设备发送的数据包以及中断请求;
根据所述中断请求,将所述网络设备的标识注册到所述轮询队列中。
在一种可能的实现方式中,还包括:计算模块,配置为在所述获取模块获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量之前,
获取所述轮询队列中所述网络设备的标识的数量;
根据所述轮询队列中所述网络设备的标识的数量,确定所述预设值P。
在一种可能的实现方式中,所述获取模块还配置为:
根据所述轮询队列中网络设备的标识,获取所述轮询队列中每个网络设备的通信流量;
根据所述轮询队列中每个网络设备的通信流量计算预设时间;
根据所述预设时间,获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量。
本发明实施例在第三方面提供一种网络数据接收的处理装置,包括:
处理器和存储器,所述存储器中存储有可执行指令,所述可执行指令用于引起所述处理器执行以下操作:
获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量;
判断所述网络设备对应的数据包数量是否大于预设数量;
若所述网络设备对应的数据包数量大于所述预设数量,则对相应网络设备对应的数据包中所述预设数量的数据包进行处理。
本发明实施例在第四方面提供一种存储介质,存储有可执行指令,用于执行本发明实施例提供的网络数据接收的处理方法。
本发明实施例具有以下有益效果:
通过获取轮询队列中的网络设备的标识,当网络设备对应的数据包数量大于预设值P时,对所述网络设备对应的数据包中的P个数据包进行处理,采用轮询方式的处理方式,大大减少了中断开销,通过设置一次数据包的处理个数,避免丢包。
附图说明
包含在说明书中并且构成说明书的一部分的附图与说明书一起示出了本发明的示例性实施例、特征和方面,并且用于解释本发明的原理。
图1示出本发明实施例提供的网络数据接收的处理方法的流程图;
图2示出本发明另一实施例提供的网络数据接收的处理方法的流程图;
图3示出发明再一实施例提供的网络数据接收的处理方法的流程图;
图4示出本发明实施例提供的网络数据接收的处理装置的结构示意图;
图5示出本发明另一实施例提供的网络数据接收的处理装置的结构示意图;
图6示出本发明再一实施例提供的网络数据接收的处理装置的结构示意图。
具体实施方式
下面结合附图,对本发明的具体实施方式进行详细描述,但应当理解本发明的保护范围并不受具体实施方式的限制。
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。除非另有其它明确表示,否则在整个说明书和权利要求书中,术语“包括”或其变换如“包含”或“包括有”等等将被理解为包括所陈述的元件或组成部分,而并未排除其它元件或其它组成部分。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
另外,为了更好的说明本发明,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本发明同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件未作详细描述,以便于凸显本发明的主旨。
本发明的发明人发现,当网络流量巨大的时候,相关技术会频繁地进行中断处理和切换,一旦中断负荷超过了最大无损转发率时,CPU就无法 响应其他任务,造成中断活锁。同时,如果当前正在处理前一个数据包时,下一个数据包到来时发出的中断可能会打断前面的过程。这种频繁的打断使得之前的数据包无法有效处理,随着数据包的不断涌进,就会塞满缓冲队列,造成丢包。
针对上述问题,本发明各实施例中获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量;判断所述网络设备对应的数据包数量是否大于预设数量;若所述网络设备对应的数据包数量大于所述预设数量,则对相应网络设备对应的数据包中所述预设数量的数据包进行处理。
下面结合具体实施例进行说明。
实施例1
图1示出本发明实施例提供的网络数据接收的处理方法的流程图,如图1所示,该方法包括:
步骤S1,获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量。
具体地,网络设备为与CPU连接的外设,可以为网卡等。当第一个数据包到达网络设备时,网络设备向CPU发送中断请求。轮询队列中存储有多个接收到数据包的网络设备的标识。
网络设备将接收到的数据包存储到与网络设备对应的寄存器中,当CPU获取轮询队列中的网络设备的标识时,从相应的寄存器中获取网络设备对应的数据包数量。
步骤S2,判断所述网络设备对应的数据包数量是否大于预设值P。
其中,预设值P可以为根据经验值预先设定的,也可以为根据当前网络状态计算得到的。
步骤S3,若所述网络设备对应的数据包数量大于预设值P,则对所述 网络设备(即对应的数据包数量大于预设值P的网络设备)对应的数据包中的P个数据包进行处理。
本发明实施例通过获取轮询队列中的网络设备的标识,当网络设备对应的数据包数量大于预设值P时,对所述网络设备对应的数据包中的P个数据包进行处理,采用轮询方式的处理方式,大大减少了中断开销,通过设置一次数据包的处理个数,避免丢包。
可选的,在步骤S1之前,包括:
步骤S01,接收所述网络设备发送的数据包以及中断请求;
步骤S02,根据所述中断请求,将所述网络设备的标识注册到所述轮询队列中。
具体地,轮询队列中存储有多个接收到数据包的网络设备的标识。
在将所述网络设备的标识注册到所述轮询队列中后,该网络设备关闭接收中断。
由此,通过接收所述网络设备发送的数据包以及中断请求,根据所述中断请求,将所述网络设备的标识注册到所述轮询队列中,采用轮询方式的处理方式,减少了中断开销,保证了数据的完整性,避免丢包。
可选的,在步骤S2之后还包括:
步骤S4,若所述网络设备对应的数据包数量小于预设值P,对所述网络设备对应的全部数据包进行处理;
步骤S5,在所述轮询队列中删除所述数据包数量小于预设值P的所述网络设备的标识。
具体地,当网络设备对应的数据包数量小于预设值P时,CPU在处理时可以一次将数据包处理完成。将轮询队列中网络设备对应的所有数据包处理完成后,在所述轮询队列中删除该网络设备的标识。
更为具体的,在步骤S3或S5之后,获取轮询队列中的下一网络设备 的标识,重复执行上述步骤,直至轮询队列中没有网络设备的标识为止。
由此,通过在网络设备对应的数据包数量小于预设值P时,对全部数据包进行处理,在所述轮询队列中删除所述数据包数量小于预设值P的所述网络设备的标识,采用轮询方式的处理方式,大大减少了中断开销,通过设置一次数据包的处理个数,避免丢包。
实施例2
图2示出本发明另一实施例提供的网络数据接收的处理方法的流程图,在图2中与图1采用相同附图标记的步骤均与图1适用于相同的文字说明,在此不再赘述。本实施例对实施例一进行进一步限定。
如图2所示,本实施例在步骤S1之前,可以包括:
步骤S03,获取所述轮询队列中所述网络设备的标识的数量;
步骤S04,根据所述轮询队列中所述网络设备的标识的数量,确定所述预设值P。
具体的,可以设置为,若所述轮询队列中所述网络设备的标识的数量越多则预设值P越小,以保证在一定时间间隔内将轮询队列中所有网络设备访问一次。
更为具体的,步骤S03和步骤S04可以设置为,轮询队列中更新预设次数后执行,也可以设置为经过预设时间后执行。当第一次进行预设值P的计算时,根据所述轮询队列中所述网络设备的标识的数量,确定所述预设值P。当已经存在预设值P时,可以根据更新后的网络设备的标识的数量对预设值P的值进行修正。
由此,可以实现自适应的增减一次数据包的处理个数,实现了多个网络设备公平调度,保证了数据处理的实时性。
需要说明的是,本实施例中,对步骤S03和步骤S01的执行顺序不进行限定。附图中给出的只是一种实现方式,并不是对执行先后顺序的限定。
实施例3
图3示出本发明再一实施例提供的网络数据接收的处理方法的流程图,在图3中与图1采用相同附图标记的步骤均与图1适用于相同的文字说明,在此不再赘述。本实施例对实施例一的步骤S1进行进一步限定。如图3所示,本实施例中步骤S1可以具体包括:
步骤S101,根据所述轮询队列中网络设备的标识,获取所述轮询队列中每个网络设备的通信流量;
步骤S102,根据所述轮询队列中每个网络设备的通信流量计算预设时间;
步骤S103,根据所述预设时间,获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量。
可以通过设置定时器来实现对预设时间的计算。当轮询队列中有数据更新时,定时器开始计时。到达预设时间时,定时器通知CPU对数据包进行处理。当CPU开始数据处理时,对定时器进行复位。定时器通过查询当前网络的状态来确定下一次轮询的时间间隔,并调整定时器的频率,从而达到自适应网络状况的目的。如果网络处于大流量的情况下,数据缓冲区更新频率很高,那么相应的加大轮询的频率,也就是减小定时器的时间间隔,缩短预设时间。如果网络上的数据量很小,那么相应的减少轮询频率,同时增加定时器的时间间隔,增大预设时间。
步骤S1还可以包括:判断所述轮询队列中是否存在网络设备,当所述轮询队列中存在网络设备的标识时,执行步骤S101,当所述轮询队列中不存在网络设备的标识时,接收中断。
由此,通过根据所述轮询队列中每个网络设备的通信流量计算预设时间,根据所述预设时间,获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量,根据网络流量对预 设时间进行调整,提高了用户进程与内核空间数据交互的有效性。
实施例4
图4示出本发明实施例提供的网络数据接收的处理装置的结构示意图,如图4所示,该装置10包括:
获取模块1,配置为获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量。
判断模块2,配置为判断所述网络设备对应的数据包数量是否大于预设值P。
处理模块3,配置为在所述网络设备对应的数据包数量大于预设值P时,对所述网络设备对应的数据包中的P个数据包进行处理。
本发明通过获取轮询队列中的网络设备的标识,当网络设备对应的数据包数量大于预设值P时,对所述网络设备对应的数据包中的P个数据包进行处理,采用轮询方式的处理方式,大大减少了中断开销,通过设置一次数据包的处理个数,避免丢包。
可选的,所述处理模块3还配置为,在所述网络设备对应的数据包数量小于预设值P时,对所述网络设备对应的全部数据包进行处理;在所述轮询队列中删除所述数据包数量小于预设值P的所述网络设备的标识。
由此,通过在网络设备对应的数据包数量小于预设值P时,对全部数据包进行处理,在所述轮询队列中删除所述数据包数量小于预设值P的所述网络设备的标识,采用轮询方式的处理方式,大大减少了中断开销,通过设置一次数据包的处理个数,避免丢包。
实施例5
图5示出本发明另一实施例提供的网络数据接收的处理装置的结构示意图,在图5中与图4采用相同附图标记的步骤均与图4适用于相同的文 字说明,在此不再赘述。如图5所示,该装置10还包括:
接收模块4,配置为在所述获取模块1获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量之前,接收所述网络设备发送的数据包以及中断请求;根据所述中断请求,将所述网络设备的标识注册到所述轮询队列中。
由此,通过接收所述网络设备发送的数据包以及中断请求,根据所述中断请求,将所述网络设备的标识注册到所述轮询队列中,采用轮询方式的处理方式,减少了中断开销,保证了数据的完整性,避免丢包。
实施例6
图6示出本发明再一实施例提供的网络数据接收的处理装置的结构示意图,在图6中与图4采用相同附图标记的步骤均与图4适用于相同的文字说明,在此不再赘述。如图6所示,该装置10还包括:
计算模块5,配置为在所述获取模块1获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量之前,获取所述轮询队列中所述网络设备的标识的数量;根据所述轮询队列中所述网络设备的标识的数量,确定所述预设值P。
由此,可以实现自适应的增减一次数据包的处理个数,提高了多个网络设备公平调度,以及数据的实时性。
可选的,所述获取模块1具体配置为:根据所述轮询队列中网络设备的标识,获取所述轮询队列中每个网络设备的通信流量;根据所述轮询队列中每个网络设备的通信流量计算预设时间;根据所述预设时间,获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量。
由此,通过根据所述轮询队列中每个网络设备的通信流量计算预设时间,根据所述预设时间,获取轮询队列中的网络设备的标识,并根据所述 网络设备的标识获取所述网络设备对应的数据包数量,根据网络流量对预设时间进行调整,提高了用户进程与内核空间数据交互的有效性。
需要指出地,图4和图5中示出的模块是对网络数据接收装置在逻辑功能层面的划分,根据对图4和图5的理解,还可以对其中的部分模块进行合并,或者对其中的部分模块进行进一步的划分,从而实现网络数据接收装置多种可选的结构。
从硬件实现上来说,网络数据接收的处理装置还可以通过处理器和存储器配合,由存储器执行存储器中的可执行指令的指令而实现上述各模的功能。
作为存储器和处理器的一个示例,存储器可以采用微处理器(MCU)实现,存储器可以采用各种易失性或非易失性的存储介质实现。
作为存储器和处理器的另一示例,存储器和处理器可以采用专用集成电路(ASIC)、逻辑可编程门电路(FPGA)或复杂可编程逻辑器件(CPLD)等集成的方式实现。
实施例7
以所述网络设备为网卡为例进行说明。
本发明实施例中可以在第一个数据包到达时转变系统对网络设备的处理方法。具体方法是:
当第一个数据包到达时,网卡产生硬件中断,随后系统进入中断处理。系统关闭网卡的接收中断,将网卡设备注册到轮询队列中,然后唤醒软中断,进入轮询处理程序。
处理器采用轮询方式对轮询队列中的网络设备进行数据读取,每次读取前判断该网卡的缓冲区中是否有固定配额的数据,如果有,则获取该网卡缓冲区中的数据;如果数据包不够固定配额,则将所有数据读取后将网络设备从轮询队列中注销。
随后判断轮询队列是否为空,如果非空,则返回轮询开始,否则软中断处理结束,再打开网卡的接收中断。
因此,本发明在轻负载的情况下趋近于中断方式,响应速度很快;而在重负载的情况下,趋近于轮询方式,高效的处理数据包并且避免了重负载情况下的中断活锁及丢包问题。
本发明的发明人注意到:可调节的中断轮询完成了数据从网卡到内核的有效读取,而用户进程从内核读取数据同样也是提高高速网络数据接收的重要部分,因此,提出了自适应的轮询守护进程技术,具体做法是:
上层应用采用轮询的方式来监视数据缓冲区更新的状态。当数据缓冲区更新后,开启一个定时器同时使应用程序暂时休眠,如果在定时器规定的时间内,轮询没有开启,那么定时器就会唤醒上层的应用程序来处理数据。
如果上层程序已经处理了缓冲区中的数据,定时器就会重新开始计时。在定时器中断处理函数中通过查询当前运行的状态来确定下一次轮询的时间间隔,并调整定时器的频率,从而达到自适应网络状况的目的。
如果网络处于大流量的情况下,数据缓冲区更新频率很高,那么相应的加大轮询的频率,同时减小定时器的时间间隔。如果网络上的数据量很小,那么相应的减少轮询频率,同时增加定时器的时间间隔。
在轮询过程中,如果系统连接多个网络设备,设置配额(预设值P)可以有效地解决多个网络设备的公平调度问题。然而如果设置配额较大,当轮询队列中的网络设备较多时,就不能及时的处理各个网络设备的数据包,从而使数据的实时性无法得到保障。相反地,如果设置配额较小,而轮询队列中的设备不多时,又会造成频繁的上下文切换,造成不必要的开销。可调节的最大配额技术则可以动态的根据轮询队列中网络设备的多少来改变一次可读的配额数,从而保证了数据实时性和系统有效性。
除此之外,本发明的发明人还注意到:在多核多网络设备的情况下,当数据包源源不断的到来时,如果不对CPU进行特定的限制,即每个CPU都可以用来处理网络设备数据包,这样多个CPU有可能同时被用作处理多个网络设备的发来的大量的数据包,由于在执行网卡软中断之前,硬中断已经关闭,所以没有中断可以打断这样的处理过程,直到软中断自己执行结束为止。在极端情况下,由于没有处理器可以用来处理其他进程,就会导致系统死机。因此,本发明提出可以限制由特定的CPU来执行网络设备数据包的处理,从而避免这种极端情况下系统的崩溃,同时保证处理机的有效使用。
前述对本发明的具体示例性实施方案的描述是为了说明和例证的目的。这些描述并非想将本发明限定为所公开的精确形式,并且很显然,根据上述教导,可以进行很多改变和变化。对示例性实施例进行选择和描述的目的在于解释本发明的特定原理及其实际应用,从而使得本领域的技术人员能够实现并利用本发明的各种不同的示例性实施方案以及各种不同的选择和改变。本发明的范围意在由权利要求书及其等同形式所限定。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。

Claims (12)

  1. 一种网络数据接收的处理方法,包括:
    获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量;
    判断所述网络设备对应的数据包数量是否大于预设数量;
    若所述网络设备对应的数据包数量大于所述预设数量,则对相应网络设备对应的数据包中所述预设数量的数据包进行处理。
  2. 根据权利要求1所述的处理方法,其中,在判断所述网络设备对应的数据包数量是否大于预设数量之后,还包括:
    若所述网络设备对应的数据包数量小于所述预设数量,对相应网络设备对应的全部数据包进行处理;
    在所述轮询队列中删除所对应的数据包数量小于所述预设数量的所述网络设备的标识。
  3. 根据权利要求1所述的处理方法,其中,在所述获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量之前,还包括:
    接收所述网络设备发送的数据包以及中断请求;
    根据所述中断请求,将所述网络设备的标识注册到所述轮询队列中。
  4. 根据权利要求1或2所述的处理方法,其中,在所述获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量之前,还包括:
    获取所述轮询队列中所述网络设备的标识的数量;
    根据所述轮询队列中所述网络设备的标识的数量,确定所述预设数量。
  5. 根据权利要求1或2所述的处理方法,其中,所述获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的 数据包数量,包括:
    根据所述轮询队列中网络设备的标识,获取所述轮询队列中每个网络设备的通信流量;
    根据所述轮询队列中每个网络设备的通信流量计算预设时间;
    根据所述预设时间,获取所述轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量。
  6. 一种网络数据接收的处理装置,包括:
    获取模块,配置为获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量;
    判断模块,配置为判断所述网络设备对应的数据包数量是否大于预设数量;
    处理模块,配置为在所述网络设备对应的数据包数量大于预设数量时,对相应网络设备对应的数据包中的预设数量的数据包进行处理。
  7. 根据权利要求6所述的处理装置,其中,
    所述处理模块还配置为,在所述网络设备对应的数据包数量小于预设数量时,对相应网络设备对应的全部数据包进行处理;在所述轮询队列中删除所对应的数据包数量小于所述预设数量的所述网络设备的标识。
  8. 根据权利要求6所述的处理装置,其中,还包括:
    接收模块,配置为在所述获取模块获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量之前,接收所述网络设备发送的数据包以及中断请求;
    根据所述中断请求,将所述网络设备的标识注册到所述轮询队列中。
  9. 根据权利要求6或7所述的处理装置,其中,还包括:
    计算模块,配置为在所述获取模块获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量之前,
    获取所述轮询队列中所述网络设备的标识的数量;
    根据所述轮询队列中所述网络设备的标识的数量,确定所述预设数量。
  10. 根据权利要求6或7所述的处理装置,其中,所述获取模块还配置为:
    根据所述轮询队列中网络设备的标识,获取所述轮询队列中每个网络设备的通信流量;
    根据所述轮询队列中每个网络设备的通信流量计算预设时间;
    根据所述预设时间,获取所述轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量。
  11. 一种网络数据接收的处理装置,包括:处理器和存储器,所述存储器中存储有可执行指令,所述可执行指令用于引起所述处理器执行以下操作:
    获取轮询队列中的网络设备的标识,并根据所述网络设备的标识获取所述网络设备对应的数据包数量;
    判断所述网络设备对应的数据包数量是否大于预设数量;
    若所述网络设备对应的数据包数量大于所述预设数量,则对相应网络设备对应的数据包中所述预设数量的数据包进行处理。
  12. 一种存储介质,存储有可执行指令,用于执行权利要求1至5任一项所述的网络数据接收的处理方法。
PCT/CN2016/107150 2016-08-25 2016-11-24 网络数据接收的处理方法及装置、存储介质 Ceased WO2018036007A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610727058.5A CN106375239B (zh) 2016-08-25 2016-08-25 一种网络数据接收的处理方法及装置
CN201610727058.5 2016-08-25

Publications (1)

Publication Number Publication Date
WO2018036007A1 true WO2018036007A1 (zh) 2018-03-01

Family

ID=57878443

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/107150 Ceased WO2018036007A1 (zh) 2016-08-25 2016-11-24 网络数据接收的处理方法及装置、存储介质

Country Status (2)

Country Link
CN (1) CN106375239B (zh)
WO (1) WO2018036007A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965032A (zh) * 2018-08-22 2018-12-07 北京奇虎科技有限公司 一种基于循环队列的消息推送量统计方法和装置
CN111200541A (zh) * 2019-12-31 2020-05-26 山石网科通信技术股份有限公司 网络数据处理方法和装置

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107659512A (zh) * 2017-10-18 2018-02-02 盛科网络(苏州)有限公司 一种处理网卡报文的方法和装置
CN110968403A (zh) * 2018-09-28 2020-04-07 深信服科技股份有限公司 一种cpu工作控制方法、装置、设备及存储介质
CN110968402A (zh) * 2018-09-28 2020-04-07 深信服科技股份有限公司 一种cpu工作控制方法、装置、设备及存储介质
CN109800073B (zh) * 2019-01-28 2021-06-18 Oppo广东移动通信有限公司 实时进程的调度方法、装置、终端及存储介质
KR102802463B1 (ko) * 2019-08-05 2025-05-02 에스케이하이닉스 주식회사 적층형 반도체 장치
CN113079114B (zh) * 2021-06-04 2021-08-27 鹏城实验室 一种数据包接收方法、装置、终端及存储介质
CN116668538B (zh) * 2023-08-02 2023-10-03 深圳市翼联网络通讯有限公司 Usb新型网卡和通信方法
CN120128624B (zh) * 2025-05-14 2025-09-09 深圳Tcl新技术有限公司 数据包的接收方法、装置、电子设备及计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7937499B1 (en) * 2004-07-09 2011-05-03 Oracle America, Inc. Methods and apparatus for dynamically switching between polling and interrupt mode for a ring buffer of a network interface card
CN103441941A (zh) * 2013-08-13 2013-12-11 广东睿江科技有限公司 一种基于Linux的高性能数据报文捕获方法和装置
CN103440213A (zh) * 2013-07-23 2013-12-11 深圳市共进电子股份有限公司 一种应用于具有多cpu和网卡的系统的网卡驱动方法
WO2015089824A1 (zh) * 2013-12-20 2015-06-25 华为技术有限公司 一种轮询和中断的切换方法及装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101309257A (zh) * 2008-07-08 2008-11-19 中兴通讯股份有限公司 一种基于内部集成电路总线的单板通信方法及系统
CN101938406B (zh) * 2009-07-02 2012-07-04 华为技术有限公司 微波多通道报文发送方法和装置及传送系统
CN102063335B (zh) * 2009-11-13 2014-04-02 大唐移动通信设备有限公司 中断控制器以及多核处理器共享设备中断的处理方法
CN101827333A (zh) * 2010-05-19 2010-09-08 北京神州泰岳软件股份有限公司 手机浏览器后台服务器数据处理方法
CN103023809B (zh) * 2012-12-28 2015-07-22 中国船舶重工集团公司第七0九研究所 一种采用二次缓冲技术的信息系统数据同步处理方法
CN103888317B (zh) * 2014-03-31 2017-03-29 西南科技大学 一种协议无关的网络冗余流量消除方法
CN105071973B (zh) * 2015-08-28 2018-07-17 迈普通信技术股份有限公司 一种报文接收方法及网络设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7937499B1 (en) * 2004-07-09 2011-05-03 Oracle America, Inc. Methods and apparatus for dynamically switching between polling and interrupt mode for a ring buffer of a network interface card
CN103440213A (zh) * 2013-07-23 2013-12-11 深圳市共进电子股份有限公司 一种应用于具有多cpu和网卡的系统的网卡驱动方法
CN103441941A (zh) * 2013-08-13 2013-12-11 广东睿江科技有限公司 一种基于Linux的高性能数据报文捕获方法和装置
WO2015089824A1 (zh) * 2013-12-20 2015-06-25 华为技术有限公司 一种轮询和中断的切换方法及装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965032A (zh) * 2018-08-22 2018-12-07 北京奇虎科技有限公司 一种基于循环队列的消息推送量统计方法和装置
CN108965032B (zh) * 2018-08-22 2022-07-01 北京奇虎科技有限公司 一种基于循环队列的消息推送量统计方法和装置
CN111200541A (zh) * 2019-12-31 2020-05-26 山石网科通信技术股份有限公司 网络数据处理方法和装置

Also Published As

Publication number Publication date
CN106375239A (zh) 2017-02-01
CN106375239B (zh) 2019-02-12

Similar Documents

Publication Publication Date Title
WO2018036007A1 (zh) 网络数据接收的处理方法及装置、存储介质
US11972285B2 (en) Interrupt request processing method and apparatus, and virtualized device
US7567567B2 (en) Network system including packet classification for partitioned resources
CN107690622B9 (zh) 实现硬件加速处理的方法、设备和系统
US7987306B2 (en) Hiding system latencies in a throughput networking system
US7415034B2 (en) Virtualized partitionable shared network interface
US6434630B1 (en) Host adapter for combining I/O completion reports and method of using the same
US9697029B2 (en) Guest idle based VM request completion processing
CN110896404A (zh) 数据处理的方法、装置和计算节点
US20100118884A1 (en) Method for Resolving Mutex Contention in a Network System
US7889734B1 (en) Method and apparatus for arbitrarily mapping functions to preassigned processing entities in a network system
CN106339458B (zh) 一种基于弹性分布式数据集的Stage划分方法和终端
CN106325995B (zh) 一种gpu资源的分配方法及系统
US7529245B1 (en) Reorder mechanism for use in a relaxed order input/output system
KR20190047035A (ko) 비휘발성 메모리 지속화 방법 및 컴퓨팅 디바이스
CN111886583A (zh) 支持处理器高速缓存的高速缓存服务类别的整体观的技术
WO2017032152A1 (zh) 将数据写入存储设备的方法及存储设备
CN111857859A (zh) 应用控制方法、装置、终端及计算机可读存储介质
US7443878B2 (en) System for scaling by parallelizing network workload
US8762595B1 (en) Method for sharing interfaces among multiple domain environments with enhanced hooks for exclusiveness
CN107707619A (zh) 分布式存储方法及装置
US9239804B2 (en) Back-off mechanism for a peripheral page request log
CN103634230B (zh) 一种基于动态预测的网络驱动层数据包接收方法和系统
WO2020228036A1 (zh) 任务处理方法、装置、系统、电子设备及存储介质
US7415035B1 (en) Device driver access method into a virtualized network interface

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16914027

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16914027

Country of ref document: EP

Kind code of ref document: A1