acltdtGetBufFromChain

Obtains the Nth Mbuf in a Mbuf chain. (N is the value of index.) This API is synchronous.

The Ascend 910 AI Processor does not support this API in the current version.

Restrictions

This API can be used only in open Ctrl CPU form or RC mode.

Prototype

aclError acltdtGetBufFromChain (const acltdtBuf headBuf, uin32_t index, acltdtBuf* buf)

Parameters

Parameter

Input/Output

Description

headBuf

Input

Pointer to the head of a shared buffer chain, which is obtained by calling acltdtAllocBuf or acltdtCopyBufRef.

index

Input

Index of a shared buffer in a shared buffer chain (starting from 0).

buf

Output

Pointer to the Nth shared buffer.

Returns

0 on success; else, failure.