Non-interrupted linear-speed packet transmitting and receiving methods and equipment based on LINUX

A line-speed, device-based technology, applied in the field of non-interrupted line-speed packet sending and receiving based on LINUX, can solve the problem of low performance of sending and receiving packets

Active Publication Date: 2017-08-18
EVERSEC BEIJING TECH
View PDF4 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In order to avoid sending and receiving data packets by triggering interrupts, and avoid the problem of low performance of sending and receiving packets due to data copying when triggering interrupts to send

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Non-interrupted linear-speed packet transmitting and receiving methods and equipment based on LINUX
  • Non-interrupted linear-speed packet transmitting and receiving methods and equipment based on LINUX
  • Non-interrupted linear-speed packet transmitting and receiving methods and equipment based on LINUX

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0080] The embodiment of the present invention provides a kind of uninterrupted wire-speed packet receiving method based on LINUX, refer to figure 1 As shown, the method flow includes:

[0081] S11. The application program obtains the serial number corresponding to at least one free buffer block.

[0082] S12. The application program carries the number of at least one free buffer block to trigger the kernel module to exchange data packets with the network card.

[0083] Specifically, this step includes:

[0084] The application program carries at least one free buffer block number through the packet receiving function, and sends at least one free buffer block number to the kernel module;

[0085] The packet receiving function in the kernel module is called to trigger the kernel module to exchange data packets with the network card according to at least one free buffer block number.

[0086] S13. The kernel module exchanges the number of at least one free buffer block with t...

Embodiment 2

[0106] The embodiment of the present invention provides a kind of uninterrupted wire-speed packet receiving method based on LINUX, refer to figure 2 As shown, the method flow includes:

[0107] S31. Determine the shared memory, where the shared memory is used as a buffer memory for transmitting and receiving data packets.

[0108] Specifically, the kernel module applies for a memory of a certain size as a shared memory; the user can also preset a memory of a certain size through the kernel module. In addition, the shared memory can also be determined in other ways. The embodiment of the present invention is specific to the method Not limited.

[0109] Among them, the size of the shared memory is at least greater than 2M, and the size of the shared memory can also be set according to the overall size of the device memory space and the size of the interaction with network data; the size of the shared memory can also be set according to other settings, such as device performanc...

Embodiment 3

[0161] The embodiment of the present invention provides a method for sending packets at a line speed without interruption based on LINUX, referring to Figure 4 As shown, the method flow includes:

[0162] S41. Determine the shared memory, where the shared memory is used as a buffer memory for transmitting and receiving data packets.

[0163] S42. The application programs share the shared memory through kernel module mapping.

[0164] S43. Set part of the memory in the shared memory as a plurality of buffer blocks, and mark and number each buffer block.

[0165] Wherein, the plurality of buffer blocks are idle buffer blocks when no data packets are stored.

[0166] S44. Initialize all nodes of the packet receiving queue of the network card using multiple free buffer blocks, configure physical addresses of the multiple free buffer blocks to the network card for packet receiving, and record numbers of the multiple free buffer blocks.

[0167] S45. Turn off the interruption of...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses non-interrupted linear-speed packet transmitting and receiving methods and equipment based on LINUX, and belongs to the technical field of data packet transmitting and receiving in LINUX systems. The packet receiving method comprises the steps that an application program carries a serial number of at least one free buffer block to trigger an inner core module and a network card to perform data packet exchange; the inner core module exchanges the serial numbers of the free buffer blocks with a serial number of at least one stored data packet buffer block received in the network card, and configures physical addresses of the free buffer blocks to the network card; and the application program processes data according to the serial numbers returned by the inner core module. Therefore, the network card stores data packets into the buffer blocks which can be accessed by the application program during packet receiving; the data packets are transmitted by the physical addresses of the data packet buffer blocks filled by the application program during packet transmitting; data copy is not required during packet transmitting and receiving courses; and the transmitting and receiving performance of the data packets is improved. In addition, non-interrupted circulating active packet transmitting and receiving are adopted, so that calling of a CPU (Central Processing Unit) resource during packet transmitting and receiving interruption is avoided, and the packet transmitting and receiving performance is further improved.

Description

technical field [0001] The invention relates to the technical field of transmitting and receiving data packets in a LINUX system, in particular to a method for transmitting and receiving packets at a line speed without interruption based on LINUX. Background technique [0002] With the rapid development of Internet technology, the network bandwidth is also increasing, and network equipment is facing greater pressure on traffic processing. The performance of sending and receiving packets is one of the key points for improving the performance of network equipment. Therefore, it is necessary to improve the traditional way of sending and receiving packets. Adapt to the needs of sending and receiving packets with large traffic. [0003] The traditional way of LINUX to send and receive packets is to complete the sending and receiving of data packets by triggering interrupts. When a data packet arrives, a hard interrupt is triggered, and a hard interrupt triggers a soft interrupt. ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F9/54H04L12/863
CPCG06F9/544H04L47/50
Inventor 岑立仲金红杨满智刘长永
Owner EVERSEC BEIJING TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products