---
name: "rte_mbuf_set_platform_mempool_ops"
section: "3"
platform: "linux"
package: "dpdk-doc"
version: "24.11.4-0+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rte_mbuf_pool_ops.h"
---

# rte\_mbuf\_set\_platform\_mempool\_ops(3)

Part of [rte\_mbuf\_pool\_ops.h(3)](/rte_mbuf_pool_ops.h/3.md).

## NAME

rte\_mbuf\_pool\_ops.h

## SYNOPSIS

### Functions

int **rte\_mbuf\_set\_platform\_mempool\_ops** (const char \*ops\_name)\
 const char \* **rte\_mbuf\_platform\_mempool\_ops** (void)\
 int **rte\_mbuf\_set\_user\_mempool\_ops** (const char \*ops\_name)\
 const char \* **rte\_mbuf\_user\_mempool\_ops** (void)\
 const char \* **rte\_mbuf\_best\_mempool\_ops** (void)\

## Detailed Description

RTE Mbuf Pool Ops

These APIs are for configuring the mbuf pool ops names to be largely used by **rte\_pktmbuf\_pool\_create()**. However, this can also be used to set and inquire the best mempool ops available.

Definition in file **rte\_mbuf\_pool\_ops.h**.

## Function Documentation

### int rte\_mbuf\_set\_platform\_mempool\_ops (const char \* ops\_name)

Set the platform supported pktmbuf HW mempool ops name

This function allow the HW to register the actively supported HW mempool ops\_name. Only one HW mempool ops can be registered at any point of time.

**Parameters**

*ops\_name*

**Returns**

- •

  On success, zero.

- •

  On failure, a negative value.

### const char \* rte\_mbuf\_platform\_mempool\_ops (void)

Get configured platform supported pktmbuf HW mempool ops name

This function returns the platform supported mempool ops name.

**Returns**

- •

  On success, platform pool ops name.

- •

  On failure, NULL.

### int rte\_mbuf\_set\_user\_mempool\_ops (const char \* ops\_name)

Set the user preferred pktmbuf mempool ops name

This function can be used by the user to configure user preferred mempool ops name.

**Parameters**

*ops\_name*

**Returns**

- •

  On success, zero.

- •

  On failure, a negative value.

### const char \* rte\_mbuf\_user\_mempool\_ops (void)

Get user preferred pool ops name for mbuf

This function returns the user configured mempool ops name.

**Returns**

- •

  On success, user pool ops name..

- •

  On failure, NULL.

### const char \* rte\_mbuf\_best\_mempool\_ops (void)

Get the best mempool ops name for pktmbuf.

This function is used to determine the best options for mempool ops for pktmbuf allocations. Following are the priority order:

- 1\.

  User defined, 2. Platform HW supported, 3. Compile time configured. This function is also used by the rte\_pktmbuf\_pool\_create to get the best mempool ops name.

**Returns**

returns preferred mbuf pool ops name

## Author

Generated automatically by Doxygen for DPDK from the source code.
