#include "tsc.h"
#include <rte_mbuf.h>
#include <rte_mbuf_dyn.h>
#include <rte_ring.h>
Go to the source code of this file.
|
enum | { Mbuf_HasMark = RTE_MBUF_F_RX_FDIR | RTE_MBUF_F_RX_FDIR_ID
} |
|
|
bool | Mbuf_RegisterDynFields () |
| Register mbuf dynfields. More...
|
|
int | Mbuf_AsIovec (struct rte_mbuf *m, struct iovec *iov, uint32_t offset, uint32_t length) |
| Gather segments of m as iovec. More...
|
|
struct rte_mbuf * | Mbuf_AllocRoom (struct rte_mempool *mp, struct iovec *iov, int *iovcnt, uint16_t firstHeadroom, uint16_t firstDataLen, uint16_t eachHeadroom, uint16_t eachDataLen, uint32_t pktLen) |
| Allocate room within chained mbufs. More...
|
|
void | Mbuf_RemainingIovec (struct spdk_iov_xfer ix, struct iovec *iov, int *iovcnt) |
| Recover remaining iovecs after spdk_iov_xfer_* operations. More...
|
|
◆ anonymous enum
Enumerator |
---|
Mbuf_HasMark | mbuf.ol_flags bits to indicate MARK action was applied.
|
◆ Mbuf_AllocRoom()
struct rte_mbuf* Mbuf_AllocRoom |
( |
struct rte_mempool * |
mp, |
|
|
struct iovec * |
iov, |
|
|
int * |
iovcnt, |
|
|
uint16_t |
firstHeadroom, |
|
|
uint16_t |
firstDataLen, |
|
|
uint16_t |
eachHeadroom, |
|
|
uint16_t |
eachDataLen, |
|
|
uint32_t |
pktLen |
|
) |
| |
Allocate room within chained mbufs.
- Parameters
-
| mp | mempool to create mbufs. |
[out] | iov | room iov, must be filled/zeroed by caller. |
[in,out] | iovcnt | iov capacity; room iov count. |
| firstHeadroom | headroom in first mbuf. |
| firstDataLen | data length in first mbuf, defaults to maximum available. |
| eachHeadroom | headroom in subsequent mbuf. |
| eachDataLen | data length in subsequent mbuf, defaults to maximum available. |
| pktLen | total packet length i.e. size of room. |
- Returns
- chained mbuf, or NULL upon failure.
- Postcondition
rte_errno=E2BIG
if either firstHeadroom+firstDataLen
or eachHeadroom+eachDataLen
exceeds mp
dataroom.
-
rte_errno=EFBIG
if number of segments would exceed *iovcnt
.
◆ Mbuf_AsIovec()
int Mbuf_AsIovec |
( |
struct rte_mbuf * |
m, |
|
|
struct iovec * |
iov, |
|
|
uint32_t |
offset, |
|
|
uint32_t |
length |
|
) |
| |
Gather segments of m
as iovec.
- Parameters
-
[out] | iov | must have m->nb_segs room. |
- Returns
- iov count.
◆ Mbuf_RegisterDynFields()
bool Mbuf_RegisterDynFields |
( |
| ) |
|
◆ Mbuf_RemainingIovec()
void Mbuf_RemainingIovec |
( |
struct spdk_iov_xfer |
ix, |
|
|
struct iovec * |
iov, |
|
|
int * |
iovcnt |
|
) |
| |
Recover remaining iovecs after spdk_iov_xfer_*
operations.
- Parameters
-
| ix | initialized io_xfer instance. |
[out] | iov | remaining iov, must have capacity as spdk_iov_xfer_init iovcnt. |
[out] | iovcnt | remaining iov count. |
◆ Mbuf_Timestamp_DynFieldOffset_
int Mbuf_Timestamp_DynFieldOffset_ |
|
extern |