The invention relates to the field of data networking protocol stack processors and more specifically to the field of managing of data packets in an efficient manner.
Memory buffers (MBUFs) are well known in the software and hardware design of protocol stack processors. MBUFs according to the Berkeley Software Distribution (BSD) implementation include a control portion and a data portion. The MBUF allocated memory is of a fixed size relating to the memory available and communication data being processed. A typical choice for MBUF size is between 128 and 512 bytes.
BSD was designed with systems having significant power and memory resources in mind. In today's technology markets, wireless battery operated circuits are becoming ever more popular. With their popularity, increased resource efficiency becomes a critical limitation on performance.
It would be advantageous to provide an architecture for more efficient resource utilization that is backward compatible with current protocol implementations.
In accordance with the invention there is provided a memory buffer architecture for use with a BSD implementation comprising: a first MBUF format including a control portion and a data portion, the first MBUF format for use where data is to be stored within the MBUF; and, a second MBUF format including a control portion and absent a substantial data portion, the second MBUF format for use in indexing data within a cluster.
In accordance with another aspect of the invention there is provided a storage device comprising data stored therein, the data for resulting in implementation of an integrated circuit design including circuitry for allocating a first MBUF format including a control portion and a data portion, the first MBUF format for use where data is to be stored within the MBUF; and, a second MBUF format including a control portion and absent a data portion, the second MBUF format for use in indexing data within a cluster, the MBUFs including pointer data memory locations within a control portion thereof for being arranged in a linked list.
In accordance with another aspect of the invention there is provided a method of packet processing comprising: storing packet data within a linked list, the linked list including MBUFs linked together at least one of the linked MBUFs addressing data within a cluster external to said MBUF, wherein at least one of the at least one of the linked MBUFs comprises a control portion absent a data portion thereof, and wherein at least one of the other than the at least one of the linked MBUFs comprises a control portion and a data portion.
Exemplary embodiments of the invention will now be described in conjunction with the following drawings, in which:
Referring to
The prior art MBUF structure suffers from considerable drawbacks for very high efficiency operation. Firstly, the memory storage wasted by unused data memory both in MBUFs relying on data within clusters and within MBUFs whose data portions are other than completely utilized is of concern. Also, allocating more memory than necessary can be problematic in integrated devices where available memory is highly constrained. Thirdly, in cases where MBUF reorganization is necessary, efficiency is further reduced.
Referring to
The enhanced memory efficiency of the two formats of MBUFs 30 and 300 is highly advantageous. For example, the format is compatible with existing protocols and BSD software since it does not allocate an unused resource. Modifying existing implementations in a fashion that is backwards compatible is often desirable.
Referring to
Numerous other embodiments may be envisaged without departing from the spirit or scope of the invention.