---
name: "RTE_MBUF_F_RX_SEC_OFFLOAD"
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_core.h"
---

# RTE\_MBUF\_F\_RX\_SEC\_OFFLOAD(3)

Part of [rte\_mbuf\_core.h(3)](/rte_mbuf_core.h/3.md).

## NAME

rte\_mbuf\_core.h

## SYNOPSIS

`#include <stdalign.h>`\
 `#include <stdint.h>`\
 `#include <rte_byteorder.h>`\
 `#include <rte_stdatomic.h>`\

### Data Structures

struct **rte\_mbuf\_sched**\
 struct **rte\_mbuf**\
 struct **rte\_mbuf\_ext\_shared\_info**\

### Macros

\#define **RTE\_MBUF\_F\_RX\_VLAN**   (1ULL \<\< 0)\
 \#define **RTE\_MBUF\_F\_RX\_RSS\_HASH**   (1ULL \<\< 1)\
 \#define **RTE\_MBUF\_F\_RX\_FDIR**   (1ULL \<\< 2)\
 \#define **RTE\_MBUF\_F\_RX\_OUTER\_IP\_CKSUM\_BAD**   (1ULL \<\< 5)\
 \#define **RTE\_MBUF\_F\_RX\_VLAN\_STRIPPED**   (1ULL \<\< 6)\
 \#define **RTE\_MBUF\_F\_RX\_IP\_CKSUM\_MASK**   ((1ULL \<\< 4) \| (1ULL \<\< 7))\
 \#define **RTE\_MBUF\_F\_RX\_L4\_CKSUM\_MASK**   ((1ULL \<\< 3) \| (1ULL \<\< 8))\
 \#define **RTE\_MBUF\_F\_RX\_IEEE1588\_PTP**   (1ULL \<\< 9)\
 \#define **RTE\_MBUF\_F\_RX\_IEEE1588\_TMST**   (1ULL \<\< 10)\
 \#define **RTE\_MBUF\_F\_RX\_FDIR\_ID**   (1ULL \<\< 13)\
 \#define **RTE\_MBUF\_F\_RX\_FDIR\_FLX**   (1ULL \<\< 14)\
 \#define **RTE\_MBUF\_F\_RX\_QINQ\_STRIPPED**   (1ULL \<\< 15)\
 \#define **RTE\_MBUF\_F\_RX\_LRO**   (1ULL \<\< 16)\
 \#define **RTE\_MBUF\_F\_RX\_SEC\_OFFLOAD**   (1ULL \<\< 18)\
 \#define **RTE\_MBUF\_F\_RX\_SEC\_OFFLOAD\_FAILED**   (1ULL \<\< 19)\
 \#define **RTE\_MBUF\_F\_RX\_QINQ**   (1ULL \<\< 20)\
 \#define **RTE\_MBUF\_F\_RX\_OUTER\_L4\_CKSUM\_MASK**   ((1ULL \<\< 21) \| (1ULL \<\< 22))\
 \#define **RTE\_MBUF\_F\_TX\_OUTER\_UDP\_CKSUM**   (1ULL \<\< 41)\
 \#define **RTE\_MBUF\_F\_TX\_UDP\_SEG**   (1ULL \<\< 42)\
 \#define **RTE\_MBUF\_F\_TX\_SEC\_OFFLOAD**   (1ULL \<\< 43)\
 \#define **RTE\_MBUF\_F\_TX\_MACSEC**   (1ULL \<\< 44)\
 \#define **RTE\_MBUF\_F\_TX\_TUNNEL\_VXLAN**   (0x1ULL \<\< 45)\
 \#define **RTE\_MBUF\_F\_TX\_TUNNEL\_MPLSINUDP**   (0x5ULL \<\< 45)\
 \#define **RTE\_MBUF\_F\_TX\_TUNNEL\_IP**   (0xDULL \<\< 45)\
 \#define **RTE\_MBUF\_F\_TX\_TUNNEL\_UDP**   (0xEULL \<\< 45)\
 \#define **RTE\_MBUF\_F\_TX\_QINQ**   (1ULL \<\< 49)\
 \#define **RTE\_MBUF\_F\_TX\_TCP\_SEG**   (1ULL \<\< 50)\
 \#define **RTE\_MBUF\_F\_TX\_IEEE1588\_TMST**   (1ULL \<\< 51)\
 \#define **RTE\_MBUF\_F\_TX\_L4\_NO\_CKSUM**   (0ULL \<\< 52)\
 \#define **RTE\_MBUF\_F\_TX\_TCP\_CKSUM**   (1ULL \<\< 52)\
 \#define **RTE\_MBUF\_F\_TX\_SCTP\_CKSUM**   (2ULL \<\< 52)\
 \#define **RTE\_MBUF\_F\_TX\_UDP\_CKSUM**   (3ULL \<\< 52)\
 \#define **RTE\_MBUF\_F\_TX\_L4\_MASK**   (3ULL \<\< 52)\
 \#define **RTE\_MBUF\_F\_TX\_IP\_CKSUM**   (1ULL \<\< 54)\
 \#define **RTE\_MBUF\_F\_TX\_IPV4**   (1ULL \<\< 55)\
 \#define **RTE\_MBUF\_F\_TX\_IPV6**   (1ULL \<\< 56)\
 \#define **RTE\_MBUF\_F\_TX\_VLAN**   (1ULL \<\< 57)\
 \#define **RTE\_MBUF\_F\_TX\_OUTER\_IP\_CKSUM**   (1ULL \<\< 58)\
 \#define **RTE\_MBUF\_F\_TX\_OUTER\_IPV4**   (1ULL \<\< 59)\
 \#define **RTE\_MBUF\_F\_TX\_OUTER\_IPV6**   (1ULL \<\< 60)\
 \#define **RTE\_MBUF\_F\_TX\_OFFLOAD\_MASK**\
 \#define **RTE\_MBUF\_F\_EXTERNAL**   (1ULL \<\< 61)\
 \#define **RTE\_MBUF\_F\_INDIRECT**   (1ULL \<\< 62)\
 \#define **RTE\_MBUF\_PRIV\_ALIGN**   8\
 \#define **RTE\_MBUF\_DEFAULT\_DATAROOM**   2048\
 \#define **RTE\_MBUF\_MAX\_NB\_SEGS**   UINT16\_MAX\
 \#define **RTE\_MBUF\_CLONED**(mb)   ((mb)-\>ol\_flags & **RTE\_MBUF\_F\_INDIRECT**)\
 \#define **RTE\_MBUF\_HAS\_EXTBUF**(mb)   ((mb)-\>ol\_flags & **RTE\_MBUF\_F\_EXTERNAL**)\
 \#define **RTE\_MBUF\_DIRECT**(mb)   	(!((mb)-\>ol\_flags & (**RTE\_MBUF\_F\_INDIRECT** \| **RTE\_MBUF\_F\_EXTERNAL**)))\
 \#define **RTE\_MBUF\_PORT\_INVALID**   UINT16\_MAX\
 \#define **MBUF\_INVALID\_PORT**   **RTE\_MBUF\_PORT\_INVALID**\
 \#define **rte\_pktmbuf\_mtod\_offset**(m,  t,  o)   	((t)(void \*)((char \*)(m)-\>buf\_addr + (m)-\>data\_off + (o)))\
 \#define **rte\_pktmbuf\_mtod**(m,  t)   **rte\_pktmbuf\_mtod\_offset**(m, t, 0)\
 \#define **rte\_pktmbuf\_iova\_offset**(m,  o)   	(**rte\_iova\_t**)(**rte\_mbuf\_iova\_get**(m) + (m)-\>data\_off + (o))\
 \#define **rte\_pktmbuf\_iova**(m)   **rte\_pktmbuf\_iova\_offset**(m, 0)\

### Typedefs

**typedef** void(\* **rte\_mbuf\_extbuf\_free\_callback\_t**) (void \*addr, void \*opaque)\

### Enumerations

enum \

## Detailed Description

This file contains definition of RTE mbuf structure itself, packet offload flags and some related macros. For majority of DPDK entities, it is not recommended to include this file directly, use include \<**rte\_mbuf.h**\> instead.

New fields and flags should fit in the 'dynamic space'.

Definition in file **rte\_mbuf\_core.h**.

## Macro Definition Documentation

### #define RTE\_MBUF\_F\_RX\_VLAN (1ULL \<\< 0)

The RX packet is a 802.1q VLAN packet, and the tci has been saved in mbuf-\>vlan\_tci. If the flag RTE\_MBUF\_F\_RX\_VLAN\_STRIPPED is also present, the VLAN header has been stripped from mbuf data, else it is still present.

Definition at line **51** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_RX\_RSS\_HASH (1ULL \<\< 1)

RX packet with RSS hash result.

Definition at line **54** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_RX\_FDIR (1ULL \<\< 2)

RX packet with FDIR match indicate.

Definition at line **57** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_RX\_OUTER\_IP\_CKSUM\_BAD (1ULL \<\< 5)

This flag is set when the outermost IP header checksum is detected as wrong by the hardware.

Definition at line **63** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_RX\_VLAN\_STRIPPED (1ULL \<\< 6)

A vlan has been stripped by the hardware and its tci is saved in mbuf-\>vlan\_tci. This can only happen if vlan stripping is enabled in the RX configuration of the PMD. When RTE\_MBUF\_F\_RX\_VLAN\_STRIPPED is set, RTE\_MBUF\_F\_RX\_VLAN must also be set.

Definition at line **71** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_RX\_IP\_CKSUM\_MASK ((1ULL \<\< 4) \| (1ULL \<\< 7))

Mask of bits used to determine the status of RX IP checksum.

- •

  RTE\_MBUF\_F\_RX\_IP\_CKSUM\_UNKNOWN: no information about the RX IP checksum

- •

  RTE\_MBUF\_F\_RX\_IP\_CKSUM\_BAD: the IP checksum in the packet is wrong

- •

  RTE\_MBUF\_F\_RX\_IP\_CKSUM\_GOOD: the IP checksum in the packet is valid

- •

  RTE\_MBUF\_F\_RX\_IP\_CKSUM\_NONE: the IP checksum is not correct in the packet data, but the integrity of the IP header is verified.

Definition at line **81** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_RX\_L4\_CKSUM\_MASK ((1ULL \<\< 3) \| (1ULL \<\< 8))

Mask of bits used to determine the status of RX L4 checksum.

- •

  RTE\_MBUF\_F\_RX\_L4\_CKSUM\_UNKNOWN: no information about the RX L4 checksum

- •

  RTE\_MBUF\_F\_RX\_L4\_CKSUM\_BAD: the L4 checksum in the packet is wrong

- •

  RTE\_MBUF\_F\_RX\_L4\_CKSUM\_GOOD: the L4 checksum in the packet is valid

- •

  RTE\_MBUF\_F\_RX\_L4\_CKSUM\_NONE: the L4 checksum is not correct in the packet data, but the integrity of the L4 data is verified.

Definition at line **96** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_RX\_IEEE1588\_PTP (1ULL \<\< 9)

RX IEEE1588 L2 Ethernet PT Packet.

Definition at line **104** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_RX\_IEEE1588\_TMST (1ULL \<\< 10)

RX IEEE1588 L2/L4 timestamped packet.

Definition at line **107** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_RX\_FDIR\_ID (1ULL \<\< 13)

FD id reported if FDIR match.

Definition at line **110** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_RX\_FDIR\_FLX (1ULL \<\< 14)

Flexible bytes reported if FDIR match.

Definition at line **113** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_RX\_QINQ\_STRIPPED (1ULL \<\< 15)

The outer VLAN has been stripped by the hardware and its TCI is saved in mbuf-\>vlan\_tci\_outer. This can only happen if VLAN stripping is enabled in the Rx configuration of the PMD. When RTE\_MBUF\_F\_RX\_QINQ\_STRIPPED is set, the flags RTE\_MBUF\_F\_RX\_VLAN and RTE\_MBUF\_F\_RX\_QINQ must also be set.

- •

  If both RTE\_MBUF\_F\_RX\_QINQ\_STRIPPED and RTE\_MBUF\_F\_RX\_VLAN\_STRIPPED are set, the 2 VLANs have been stripped by the hardware and their TCIs are saved in mbuf-\>vlan\_tci (inner) and mbuf-\>vlan\_tci\_outer (outer).

- •

  If RTE\_MBUF\_F\_RX\_QINQ\_STRIPPED is set and RTE\_MBUF\_F\_RX\_VLAN\_STRIPPED is unset, only the outer VLAN is removed from packet data, but both tci are saved in mbuf-\>vlan\_tci (inner) and mbuf-\>vlan\_tci\_outer (outer).

Definition at line **130** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_RX\_LRO (1ULL \<\< 16)

When packets are coalesced by a hardware or virtual driver, this flag can be set in the RX mbuf, meaning that the m-\>tso\_segsz field is valid and is set to the segment size of original packets.

Definition at line **137** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_RX\_SEC\_OFFLOAD (1ULL \<\< 18)

Indicate that security offload processing was applied on the RX packet.

Definition at line **144** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_RX\_SEC\_OFFLOAD\_FAILED (1ULL \<\< 19)

Indicate that security offload processing failed on the RX packet.

Definition at line **149** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_RX\_QINQ (1ULL \<\< 20)

The RX packet is a double VLAN, and the outer tci has been saved in mbuf-\>vlan\_tci\_outer. If this flag is set, RTE\_MBUF\_F\_RX\_VLAN must also be set and the inner tci is saved in mbuf-\>vlan\_tci. If the flag RTE\_MBUF\_F\_RX\_QINQ\_STRIPPED is also present, both VLANs headers have been stripped from mbuf data, else they are still present.

Definition at line **159** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_RX\_OUTER\_L4\_CKSUM\_MASK ((1ULL \<\< 21) \| (1ULL \<\< 22))

Mask of bits used to determine the status of outer RX L4 checksum.

- •

  RTE\_MBUF\_F\_RX\_OUTER\_L4\_CKSUM\_UNKNOWN: no info about the outer RX L4 checksum

- •

  RTE\_MBUF\_F\_RX\_OUTER\_L4\_CKSUM\_BAD: the outer L4 checksum in the packet is wrong

- •

  RTE\_MBUF\_F\_RX\_OUTER\_L4\_CKSUM\_GOOD: the outer L4 checksum in the packet is valid

- •

  RTE\_MBUF\_F\_RX\_OUTER\_L4\_CKSUM\_INVALID: invalid outer L4 checksum state.

The detection of RTE\_MBUF\_F\_RX\_OUTER\_L4\_CKSUM\_GOOD shall be based on the given HW capability, At minimum, the PMD should support RTE\_MBUF\_F\_RX\_OUTER\_L4\_CKSUM\_UNKNOWN and RTE\_MBUF\_F\_RX\_OUTER\_L4\_CKSUM\_BAD states if the RTE\_ETH\_RX\_OFFLOAD\_OUTER\_UDP\_CKSUM offload is available.

Definition at line **176** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_OUTER\_UDP\_CKSUM (1ULL \<\< 41)

Outer UDP checksum offload flag. This flag is used for enabling outer UDP checksum in PMD. To use outer UDP checksum, the user needs to 1) Enable the following in mbuf, a) Fill outer\_l2\_len and outer\_l3\_len in mbuf. b) Set the RTE\_MBUF\_F\_TX\_OUTER\_UDP\_CKSUM flag. c) Set the RTE\_MBUF\_F\_TX\_OUTER\_IPV4 or RTE\_MBUF\_F\_TX\_OUTER\_IPV6 flag. 2) Configure RTE\_ETH\_TX\_OFFLOAD\_OUTER\_UDP\_CKSUM offload flag.

Definition at line **199** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_UDP\_SEG (1ULL \<\< 42)

UDP Fragmentation Offload flag. This flag is used for enabling UDP fragmentation in SW or in HW. When use UFO, mbuf-\>tso\_segsz is used to store the MSS of UDP fragments.

Definition at line **206** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_SEC\_OFFLOAD (1ULL \<\< 43)

Request security offload processing on the TX packet. To use Tx security offload, the user needs to fill l2\_len in mbuf indicating L2 header size and where L3 header starts. Similarly, l3\_len should also be filled along with ol\_flags reflecting current L3 type.

Definition at line **214** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_MACSEC (1ULL \<\< 44)

Offload the MACsec. This flag must be set by the application to enable this offload feature for a packet to be transmitted.

Definition at line **220** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_TUNNEL\_VXLAN (0x1ULL \<\< 45)

Bits 45:48 used for the tunnel type. The tunnel type must be specified for TSO or checksum on the inner part of tunnel packets. These flags can be used with RTE\_MBUF\_F\_TX\_TCP\_SEG for TSO, or RTE\_MBUF\_F\_TX\_xxx\_CKSUM. The mbuf fields for inner and outer header lengths are required: outer\_l2\_len, outer\_l3\_len, l2\_len, l3\_len, l4\_len and tso\_segsz for TSO.

Definition at line **231** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_TUNNEL\_MPLSINUDP (0x5ULL \<\< 45)

TX packet with MPLS-in-UDP RFC 7510 header.

Definition at line **236** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_TUNNEL\_IP (0xDULL \<\< 45)

Generic IP encapsulated tunnel type, used for TSO and checksum offload. It can be used for tunnels which are not standards or listed above. It is preferred to use specific tunnel flags like RTE\_MBUF\_F\_TX\_TUNNEL\_GRE or RTE\_MBUF\_F\_TX\_TUNNEL\_IPIP if possible. The ethdev must be configured with RTE\_ETH\_TX\_OFFLOAD\_IP\_TNL\_TSO. Outer and inner checksums are done according to the existing flags like RTE\_MBUF\_F\_TX\_xxx\_CKSUM. Specific tunnel headers that contain payload length, sequence id or checksum are not expected to be updated.

Definition at line **251** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_TUNNEL\_UDP (0xEULL \<\< 45)

Generic UDP encapsulated tunnel type, used for TSO and checksum offload. UDP tunnel type implies outer IP layer. It can be used for tunnels which are not standards or listed above. It is preferred to use specific tunnel flags like RTE\_MBUF\_F\_TX\_TUNNEL\_VXLAN if possible. The ethdev must be configured with RTE\_ETH\_TX\_OFFLOAD\_UDP\_TNL\_TSO. Outer and inner checksums are done according to the existing flags like RTE\_MBUF\_F\_TX\_xxx\_CKSUM. Specific tunnel headers that contain payload length, sequence id or checksum are not expected to be updated.

Definition at line **264** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_QINQ (1ULL \<\< 49)

Double VLAN insertion (QinQ) request to driver, driver may offload the insertion based on device capability. mbuf 'vlan\_tci' & 'vlan\_tci\_outer' must be valid when this flag is set.

Definition at line **273** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_TCP\_SEG (1ULL \<\< 50)

TCP segmentation offload. To enable this offload feature for a packet to be transmitted on hardware supporting TSO:

- •

  set the RTE\_MBUF\_F\_TX\_TCP\_SEG flag in mbuf-\>ol\_flags (this flag implies RTE\_MBUF\_F\_TX\_TCP\_CKSUM)

- •

  set the flag RTE\_MBUF\_F\_TX\_IPV4 or RTE\_MBUF\_F\_TX\_IPV6

- •

  if it's IPv4, set the RTE\_MBUF\_F\_TX\_IP\_CKSUM flag

- •

  fill the mbuf offload information: l2\_len, l3\_len, l4\_len, tso\_segsz

Definition at line **284** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_IEEE1588\_TMST (1ULL \<\< 51)

TX IEEE1588 packet to timestamp.

Definition at line **287** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_L4\_NO\_CKSUM (0ULL \<\< 52)

Disable L4 cksum of TX pkt.

Definition at line **300** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_TCP\_CKSUM (1ULL \<\< 52)

TCP cksum of TX pkt. computed by NIC.

Definition at line **303** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_SCTP\_CKSUM (2ULL \<\< 52)

SCTP cksum of TX pkt. computed by NIC.

Definition at line **306** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_UDP\_CKSUM (3ULL \<\< 52)

UDP cksum of TX pkt. computed by NIC.

Definition at line **309** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_L4\_MASK (3ULL \<\< 52)

Mask for L4 cksum offload request.

Definition at line **312** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_IP\_CKSUM (1ULL \<\< 54)

Offload the IP checksum in the hardware. The flag RTE\_MBUF\_F\_TX\_IPV4 should also be set by the application, although a PMD will only check RTE\_MBUF\_F\_TX\_IP\_CKSUM.

- •

  fill the mbuf offload information: l2\_len, l3\_len

Definition at line **320** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_IPV4 (1ULL \<\< 55)

Packet is IPv4. This flag must be set when using any offload feature (TSO, L3 or L4 checksum) to tell the NIC that the packet is an IPv4 packet. If the packet is a tunneled packet, this flag is related to the inner headers.

Definition at line **328** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_IPV6 (1ULL \<\< 56)

Packet is IPv6. This flag must be set when using an offload feature (TSO or L4 checksum) to tell the NIC that the packet is an IPv6 packet. If the packet is a tunneled packet, this flag is related to the inner headers.

Definition at line **336** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_VLAN (1ULL \<\< 57)

VLAN tag insertion request to driver, driver may offload the insertion based on the device capability. mbuf 'vlan\_tci' field must be valid when this flag is set.

Definition at line **343** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_OUTER\_IP\_CKSUM (1ULL \<\< 58)

Offload the IP checksum of an external header in the hardware. The flag RTE\_MBUF\_F\_TX\_OUTER\_IPV4 should also be set by the application, although a PMD will only check RTE\_MBUF\_F\_TX\_OUTER\_IP\_CKSUM.

- •

  fill the mbuf offload information: outer\_l2\_len, outer\_l3\_len

Definition at line **351** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_OUTER\_IPV4 (1ULL \<\< 59)

Packet outer header is IPv4. This flag must be set when using any outer offload feature (L3 or L4 checksum) to tell the NIC that the outer header of the tunneled packet is an IPv4 packet.

Definition at line **358** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_OUTER\_IPV6 (1ULL \<\< 60)

Packet outer header is IPv6. This flag must be set when using any outer offload feature (L4 checksum) to tell the NIC that the outer header of the tunneled packet is an IPv6 packet.

Definition at line **365** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_TX\_OFFLOAD\_MASK

**Value:**.PP

```
        (    \
        RTE_MBUF_F_TX_OUTER_IPV6 |   \
        RTE_MBUF_F_TX_OUTER_IPV4 |   \
        RTE_MBUF_F_TX_OUTER_IP_CKSUM |  \
        RTE_MBUF_F_TX_VLAN |        \
        RTE_MBUF_F_TX_IPV6 |         \
        RTE_MBUF_F_TX_IPV4 |         \
        RTE_MBUF_F_TX_IP_CKSUM |        \
        RTE_MBUF_F_TX_L4_MASK |         \
        RTE_MBUF_F_TX_IEEE1588_TMST |    \
        RTE_MBUF_F_TX_TCP_SEG |         \
        RTE_MBUF_F_TX_QINQ |        \
        RTE_MBUF_F_TX_TUNNEL_MASK |  \
        RTE_MBUF_F_TX_MACSEC |       \
        RTE_MBUF_F_TX_SEC_OFFLOAD |  \
        RTE_MBUF_F_TX_UDP_SEG |  \
        RTE_MBUF_F_TX_OUTER_UDP_CKSUM)
```

Bitmask of all supported packet Tx offload features flags, which can be set for packet.

Definition at line **371** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_EXTERNAL (1ULL \<\< 61)

Mbuf having an external buffer attached. shinfo in mbuf must be filled.

Definition at line **392** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_F\_INDIRECT (1ULL \<\< 62)

Indirect attached mbuf

Definition at line **394** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_PRIV\_ALIGN 8

Alignment constraint of mbuf private area.

Definition at line **397** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_DEFAULT\_DATAROOM 2048

Some NICs need at least 2KB buffer to RX standard Ethernet frame without splitting it into multiple segments. So, for mbufs that planned to be involved into RX/TX, the recommended minimal buffer length is 2KB + RTE\_PKTMBUF\_HEADROOM.

Definition at line **405** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_MAX\_NB\_SEGS UINT16\_MAX

Maximum number of nb\_segs allowed.

Definition at line **691** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_CLONED(mb) ((mb)-\>ol\_flags & RTE\_MBUF\_F\_INDIRECT)

Returns TRUE if given mbuf is cloned by mbuf indirection, or FALSE otherwise.

If a mbuf has its data in another mbuf and references it by mbuf indirection, this mbuf can be defined as a cloned mbuf.

Definition at line **700** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_HAS\_EXTBUF(mb) ((mb)-\>ol\_flags & RTE\_MBUF\_F\_EXTERNAL)

Returns TRUE if given mbuf has an external buffer, or FALSE otherwise.

External buffer is a user-provided anonymous buffer.

Definition at line **707** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_DIRECT(mb) (!((mb)-\>ol\_flags & (RTE\_MBUF\_F\_INDIRECT \| RTE\_MBUF\_F\_EXTERNAL)))

Returns TRUE if given mbuf is direct, or FALSE otherwise.

If a mbuf embeds its own data after the **rte\_mbuf** structure, this mbuf can be defined as a direct mbuf.

Definition at line **715** of file **rte\_mbuf\_core.h**.

### #define RTE\_MBUF\_PORT\_INVALID UINT16\_MAX

Uninitialized or unspecified port.

Definition at line **719** of file **rte\_mbuf\_core.h**.

### #define MBUF\_INVALID\_PORT RTE\_MBUF\_PORT\_INVALID

For backwards compatibility.

Definition at line **721** of file **rte\_mbuf\_core.h**.

### #define rte\_pktmbuf\_mtod\_offset(m, t, o) ((t)(void \*)((char \*)(m)-\>buf\_addr + (m)-\>data\_off + (o)))

A macro that points to an offset into the data in the mbuf.

The returned pointer is cast to type t. Before using this function, the user must ensure that the first segment is large enough to accommodate its data.

**Parameters**

*m* The packet mbuf. \
 *o* The offset into the mbuf data. \
 *t* The type to cast the result into.

Definition at line **737** of file **rte\_mbuf\_core.h**.

### #define rte\_pktmbuf\_mtod(m, t) rte\_pktmbuf\_mtod\_offset(m, t, 0)

A macro that points to the start of the data in the mbuf.

The returned pointer is cast to type t. Before using this function, the user must ensure that the first segment is large enough to accommodate its data.

**Parameters**

*m* The packet mbuf. \
 *t* The type to cast the result into.

Definition at line **752** of file **rte\_mbuf\_core.h**.

### #define rte\_pktmbuf\_iova\_offset(m, o) (rte\_iova\_t)(rte\_mbuf\_iova\_get(m) + (m)-\>data\_off + (o))

A macro that returns the IO address that points to an offset of the start of the data in the mbuf

**Parameters**

*m* The packet mbuf. \
 *o* The offset into the data to calculate address from.

Definition at line **763** of file **rte\_mbuf\_core.h**.

### #define rte\_pktmbuf\_iova(m) rte\_pktmbuf\_iova\_offset(m, 0)

A macro that returns the IO address that points to the start of the data in the mbuf

**Parameters**

*m* The packet mbuf.

Definition at line **773** of file **rte\_mbuf\_core.h**.

## Typedef Documentation

### typedef void(\* rte\_mbuf\_extbuf\_free\_callback\_t) (void \*addr, void \*opaque)

Function typedef of callback to free externally attached buffer.

Definition at line **679** of file **rte\_mbuf\_core.h**.

## Enumeration Type Documentation

### anonymous enum

enum for the tx\_offload bit-fields lengths and offsets. defines the layout of **rte\_mbuf** tx\_offload field.

Definition at line **424** of file **rte\_mbuf\_core.h**.

## Author

Generated automatically by Doxygen for DPDK from the source code.
