Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Buffer configuration method and device

A configuration method and a configuration device technology, which are applied in the field of data transmission, can solve the problems of buffer occupation, large number of buffers, full BD ring, etc., and achieve the effects of reducing buffer usage, improving buffer utilization, and simple algorithms

Active Publication Date: 2015-03-25
MAIPU COMM TECH CO LTD
View PDF7 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

But there is a disadvantage: at any time the BD ring is full, taking up n buffers
[0029] For the above two solutions, the defects are not obvious on low-speed and low-density interfaces, but once on high-speed and high-density devices, the number of caches occupied will be large, and the defects will be very obvious

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
  • Buffer configuration method and device
  • Buffer configuration method and device
  • Buffer configuration method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0059] The technical scheme of the present invention will be described in detail below by taking the Gigabit Ethernet port as an example. Such as image 3 As shown, this example includes the steps:

[0060] 1. Construct a BD ring with a length of n, and initialize it to an unacceptable state first.

[0061] 2. During initialization, pre-apply for m buffers and store them in the buffer pool. They are used to request buffers when mounting BDs in batches, so as to avoid applying for buffers from the system and reduce time overhead. Then apply for m buffers, connect to the first m BDs of the BD ring, and initialize the corresponding BDs to the "receivable" state, and start hardware reception.

[0062] 3. When a BD finishes receiving DMA data, an interrupt is generated.

[0063] 4. Query the number of BDs currently received in the interrupt service routine, assuming it is z. Get z buffers from the buffer pool, starting after the last BD that was last mounted. And initialize th...

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 relates to a data transmission technology, and discloses a buffer configuration method for solving the problem that in the prior art, a DMA data transmission system is large in buffer memory occupation. The method comprises the steps that A, a buffer descriptor (BD) ring with the length of n is established and initialized to be in a non-receivable state, wherein n is a positive integer and is determined by system parameters; B, m buffers are applied for and stored in a buffer pool, wherein m is a positive integer and is smaller than n; C, k buffers are applied for and attached to first k BDs of the BD ring, the corresponding BDs are set to be in a receivable state, and hardware is started for reception, wherein k is a positive integer and is smaller than or equal to m; D, after DMA data reception of the BDs is completed, the number z of the BDs of which reception is completed currently is queried, z buffers are taken from the buffer pool and attached behind the kth BD of the BD ring, the corresponding BD is set to be in a receivable state, the reception semaphore is released, and a reception task is awaken. The algorithm is simple, and buffer memory occupation can be reduced without influencing performance.

Description

technical field [0001] The invention relates to data transmission technology, in particular to a data transmission system buffer configuration method and device. Background technique [0002] With the rapid development of the network, the performance of network equipment has been greatly improved. Taking router equipment as an example, the interface speed has developed from the previous 100M port to the current 10M port. In the form of presentation, the number of solidified ports and expandable ports is also increasing. The improvement of network equipment performance will inevitably require a corresponding increase in CPU processing speed and memory capacity. For any kind of device, memory is an important resource. Under the condition of certain performance, the software consumes as little memory as possible. [0003] Among data communication devices, a router is a data routing device that works at the edge of the network. Each communication interface in a router may di...

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
Patent Type & Authority Applications(China)
IPC IPC(8): H04L12/883H04L49/9015
Inventor 王刚杨大川
Owner MAIPU COMM TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products