Method and apparatus for managing buffering of data packet of network card, terminal and storage medium
摘要:
A method and apparatus for managing buffering of data packets of a network card, a terminal and a storage medium are provided. The method includes: setting ring buffer queues, setting a length of each ring buffer queue, then setting a buffer pool formed by two ring buffer queues, and setting the two ring buffer queues in the buffer pool as a busy queue and an idle queue, respectively; a network card driver receiving data packets from a data link, classifying the data packets, sequentially buffering the classified data packets into the busy queue, and then sequentially mapping addresses of the buffered data packets in the busy queue into the idle queue; acquiring latest addresses of the buffered data packets in the busy queue; and the upper-layer application successively acquiring and processing the buffered data packets, and successively releasing the addresses of the processed buffered data packets in the busy queue.
信息查询
0/0