[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

m_collapse Kernel Service

Purpose

Guarantees that an mbuf chain contains no more than a given number of mbuf structures.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/mbuf.h>
struct mbuf *m_collapse (m, size)
struct mbuf *m;
int size;

Parameters

m Specifies the mbuf chain to be collapsed.
size Denotes the maximum number of mbuf structures allowed in the chain.

Description

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.)

Execution Environment

The m_collapse kernel service can be called from either the process or interrupt environment.

Return Values

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.

Implementation Specifics

The m_collapse kernel service is part of Base Operating System (BOS) Runtime.

Related Information

I/O Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]