---
name: "rte_swx_table_learner_params"
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_swx_table_learner_params"
---

# rte\_swx\_table\_learner\_params(3)

## NAME

rte\_swx\_table\_learner\_params

## SYNOPSIS

`#include <rte_swx_table_learner.h>`

### Data Fields

uint32\_t **key\_size**\
 uint32\_t **key\_offset**\
 uint8\_t \* **key\_mask0**\
 uint32\_t **action\_data\_size**\
 **rte\_swx\_hash\_func\_t** **hash\_func**\
 uint32\_t **n\_keys\_max**\
 uint32\_t \* **key\_timeout**\
 uint32\_t **n\_key\_timeouts**\

## Detailed Description

Learner table creation parameters.

Definition at line **62** of file **rte\_swx\_table\_learner.h**.

## Field Documentation

### uint32\_t key\_size

Key size in bytes. Must be non-zero.

Definition at line **64** of file **rte\_swx\_table\_learner.h**.

### uint32\_t key\_offset

Offset of the first byte of the key within the key buffer.

Definition at line **67** of file **rte\_swx\_table\_learner.h**.

### uint8\_t\* key\_mask0

Mask of *key\_size* bytes logically laid over the bytes at positions *key\_offset* .. (*key\_offset* + *key\_size* - 1) of the key buffer in order to specify which bits from the key buffer are part of the key and which ones are not. A bit value of 1 in the *key\_mask0* means the respective bit in the key buffer is part of the key, while a bit value of 0 means the opposite. A NULL value means that all the bits are part of the key, i.e. the *key\_mask0* is an all-ones mask.

Definition at line **76** of file **rte\_swx\_table\_learner.h**.

### uint32\_t action\_data\_size

Maximum size (in bytes) of the action data. The data stored in the table for each entry is equal to *action\_data\_size* plus 8 bytes, which are used to store the action ID.

Definition at line **81** of file **rte\_swx\_table\_learner.h**.

### rte\_swx\_hash\_func\_t hash\_func

Hash function. When NULL, the default hash function will be used.

Definition at line **85** of file **rte\_swx\_table\_learner.h**.

### uint32\_t n\_keys\_max

Maximum number of keys to be stored in the table together with their associated data.

Definition at line **88** of file **rte\_swx\_table\_learner.h**.

### uint32\_t\* key\_timeout

The set of all possible key timeout values measured in seconds. Each value must be non-zero. Each table key expires and is automatically deleted from the table after this many seconds.

Definition at line **94** of file **rte\_swx\_table\_learner.h**.

### uint32\_t n\_key\_timeouts

Number of possible key timeout values present in the *key\_timeout* set. It must be less than or equal to *RTE\_SWX\_TABLE\_LEARNER\_N\_KEY\_TIMEOUTS\_MAX*.

Definition at line **99** of file **rte\_swx\_table\_learner.h**.

## Author

Generated automatically by Doxygen for DPDK from the source code.
