Guarantees that an mbuf chain contains no more than a given number of mbuf structures.
Item | Description |
---|---|
m | Specifies the mbuf chain to be collapsed. |
size | Denotes the maximum number of mbuf structures allowed in the chain. |
The m_collapse kernel service reduces the number of mbuf structures in an mbuf chain to the number of mbuf structures specified by the size parameter. The m_collapse service accomplishes this by copying data into page-sized mbuf structures until the chain is of the desired length. (If required, more than one page-sized mbuf structure is used.)
The m_collapse kernel service can be called from either the process or interrupt environment.
If the chain cannot be collapsed into the number of mbuf structures specified by the size parameter, a value of null is returned and the original chain is deallocated. Upon successful completion, the head of the altered mbuf chain is returned.