Network packet receiving and sending path optimization method and device and storage medium
A technology for path optimization and sending and receiving packets, which is applied in the field of network optimization, can solve problems affecting the performance of data sending and receiving, and achieve the effects of reducing data copying, optimizing paths, and improving performance
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0030] This embodiment introduces a network sending and receiving packet path optimization method, which is applied to the user terminal, including:
[0031] When the network receives packets, call the recv interface to read the data packets stored in the pre-built ring queue, and return the address of the data packet to the user program, so that the user program can operate the data packet according to the address;
[0032] When the network sends a packet, first call the alloc interface, return the first available memory address from the ring queue, construct an Ethernet frame on the memory, and then call the send interface to send the data packet.
[0033] Such as figure 1 , figure 2 As shown, the application process of the network sending and receiving packet route optimization method provided in this embodiment specifically involves the following steps:
[0034] 1. In the initialization stage of the NIC (network card) driver, create two Ring buffers (ring queues) which ...
Embodiment 2
[0039] This embodiment provides a device for optimizing a path for network sending and receiving packets, including a processor and a storage medium;
[0040] The storage medium is used to store instructions;
[0041] The processor is configured to operate in accordance with the instructions to perform the steps of any of the following methods:
[0042] When the network receives packets, call the recv interface to read the data packets stored in the pre-built ring queue, and return the address of the data packet to the user program, so that the user program can operate the data packet according to the address;
[0043] When the network sends a packet, first call the alloc interface, return the first available memory address from the ring queue, construct an Ethernet frame on the memory, and then call the send interface to send the data packet.
Embodiment 3
[0045] This embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the following methods are implemented:
[0046] When the network receives packets, call the recv interface to read the data packets stored in the pre-built ring queue, and return the address of the data packet to the user program, so that the user program can operate the data packet according to the address;
[0047] When the network sends a packet, first call the alloc interface, return the first available memory address from the ring queue, construct an Ethernet frame on the memory, and then call the send interface to send the data packet.
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com