# Mesh Forwarder

This module includes configuration variables for the Mesh Forwarder.

## Summary

| ### Macros ||
|---|---|
| `https://openthread.io/reference/config/group/config-mesh-forwarder#group__config-mesh-forwarder_1ga7ef15cc300d16d1473523e534fe55771 2` | The reassembly timeout between 6LoWPAN fragments in seconds. |
| `https://openthread.io/reference/config/group/config-mesh-forwarder#group__config-mesh-forwarder_1ga77c6874bb1bff3867ccbc0b175a4f672 1000` |   |
| `https://openthread.io/reference/config/group/config-mesh-forwarder#group__config-mesh-forwarder_1ga29d7a5fb10d66a03c8a9e9480faf7bbf (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3)` | Define to 1 to enable delay-aware queue management for the send queue. |
| `https://openthread.io/reference/config/group/config-mesh-forwarder#group__config-mesh-forwarder_1ga2befbc89f752b2a30cc820f0c085de22 16` | OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_ENTRY_LIST_SIZE. |
| `https://openthread.io/reference/config/group/config-mesh-forwarder#group__config-mesh-forwarder_1ga3177a00635eda7499e72de51d2f0faca (4 * 60)` | OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_RETAIN_TIME. |
| `https://openthread.io/reference/config/group/config-mesh-forwarder#group__config-mesh-forwarder_1ga463ef53913aa8be252d4d88db9ed0bbb 500` |   |
| `https://openthread.io/reference/config/group/config-mesh-forwarder#group__config-mesh-forwarder_1gae7bfa4f016787932e66402a26232651f 1` | Define as 1 for OpenThread to drop a message (and not send any remaining fragments of the message) if all transmit attempts fail for a fragment of the message. |
| `https://openthread.io/reference/config/group/config-mesh-forwarder#group__config-mesh-forwarder_1ga6cf3ca667259144715cf5f8072abc150 100` | Specifies the maximum number of frames in direct tx queue before new direct tx messages are dropped. |
| `https://openthread.io/reference/config/group/config-mesh-forwarder#group__config-mesh-forwarder_1ga9898bb0f3e15cb605b3dc8bc8c7fabdb 8` | The number of fragment priority entries. |
| `https://openthread.io/reference/config/group/config-mesh-forwarder#group__config-mesh-forwarder_1ga1640c63fda30076af10c7c67ab9714d8 (OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE && OPENTHREAD_FTD)` | Define as 1 to enable TX queue time-in-queue statistics collection feature. |
| `https://openthread.io/reference/config/group/config-mesh-forwarder#group__config-mesh-forwarder_1ga7651d7264ce088929c94eb291a30eb98 10` | Specifies the time-in-queue histogram bin interval in milliseconds when the TX queue time-in-queue statistics collection feature is enabled. |
| `https://openthread.io/reference/config/group/config-mesh-forwarder#group__config-mesh-forwarder_1gaeb35044a5fa533b3d9ea78a033c1eb0a OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_MARK_ECN_INTERVAL` | Specifies the maximum time-in-queue interval in milliseconds tracked by the histogram when the TX queue time-in-queue statistics collection feature is enabled. |

## Macros

### OPENTHREAD_CONFIG_6LOWPAN_REASSEMBLY_TIMEOUT

```
 OPENTHREAD_CONFIG_6LOWPAN_REASSEMBLY_TIMEOUT 2
```
The reassembly timeout between 6LoWPAN fragments in seconds.

### OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_DROP_MSG_INTERVAL

```
 OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_DROP_MSG_INTERVAL 1000
```
Specifies the time-in-queue threshold interval in milliseconds to drop a message.

### OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_ENABLE

```
 OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_ENABLE (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3)
```
Define to 1 to enable delay-aware queue management for the send queue.

When enabled device will monitor time-in-queue of messages in the direct tx queue and if the wait time is lager than specified thresholds it may update ECN flag (if message indicates it is ECN-capable) or drop the message.

### OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_ENTRY_LIST_SIZE

```
 OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_ENTRY_LIST_SIZE 16
```
OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_ENTRY_LIST_SIZE.

Specifies the number of mesh header fragmentation tag entries in the list for delay-aware queue management.

The list is used to track whether an earlier fragment of same message was dropped by the router and if so the next fragments are also dropped.

### OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_RETAIN_TIME

```
 OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_RETAIN_TIME (4 * 60)
```
OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_RETAIN_TIME.

Specifies the max retain time in seconds of a mesh header fragmentation tag entry in the list.

The entry in list is used to track whether an earlier fragment of same message was dropped by the router and if so the next fragments are also dropped. The entry is removed once last fragment is processed or after the retain time specified by this config parameter expires.

### OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_MARK_ECN_INTERVAL

```
 OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_MARK_ECN_INTERVAL 500
```
Specifies the time-in-queue threshold interval in milliseconds to mark ECN on a message if it is ECN-capable or drop the message if not ECN-capable.

### OPENTHREAD_CONFIG_DROP_MESSAGE_ON_FRAGMENT_TX_FAILURE

```
 OPENTHREAD_CONFIG_DROP_MESSAGE_ON_FRAGMENT_TX_FAILURE 1
```
Define as 1 for OpenThread to drop a message (and not send any remaining fragments of the message) if all transmit attempts fail for a fragment of the message.

For a direct transmission, a failure occurs after all MAC transmission attempts for a given fragment are unsuccessful. For an indirect transmission, a failure occurs after all data poll triggered transmission attempts for a given fragment fail.

If set to zero (disabled), OpenThread will attempt to send subsequent fragments, whether or not all transmission attempts fail for a given fragment.

### OPENTHREAD_CONFIG_MAX_FRAMES_IN_DIRECT_TX_QUEUE

```
 OPENTHREAD_CONFIG_MAX_FRAMES_IN_DIRECT_TX_QUEUE 100
```
Specifies the maximum number of frames in direct tx queue before new direct tx messages are dropped.

If set to zero then the behavior is disabled, i.e., no check is performed on tx queue length.

### OPENTHREAD_CONFIG_NUM_FRAGMENT_PRIORITY_ENTRIES

```
 OPENTHREAD_CONFIG_NUM_FRAGMENT_PRIORITY_ENTRIES 8
```
The number of fragment priority entries.

### OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE

```
 OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE (OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE && OPENTHREAD_FTD)
```
Define as 1 to enable TX queue time-in-queue statistics collection feature.

When enabled, histogram of the time-in-queue of messages in the transmit queue is collected. The time-in-queue is tracked for direct transmissions only and is measured as the duration from when a message is added to the transmit queue until it is passed to the MAC layer for transmission or dropped.

The histogram data consists of number of bins, each representing a range of time-in-queue values. The bin interval length is specified by the `OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_HISTOGRAM_BIN_INTERVAL` configuration, and the maximum tracked interval is given by the `OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_HISTOGRAM_MAX_INTERVAL`.

Along with histogram, the maximum observed time-in-queue is also tracked.

### OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_HISTOGRAM_BIN_INTERVAL

```
 OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_HISTOGRAM_BIN_INTERVAL 10
```
Specifies the time-in-queue histogram bin interval in milliseconds when the TX queue time-in-queue statistics collection feature is enabled.

The number of bins is calculated by dividing `OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_HISTOGRAM_MAX_INTERVAL` by `OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_HISTOGRAM_BIN_INTERVAL` and rounding up to the nearest integer.

### OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_HISTOGRAM_MAX_INTERVAL

```
 OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_HISTOGRAM_MAX_INTERVAL OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_MARK_ECN_INTERVAL
```
Specifies the maximum time-in-queue interval in milliseconds tracked by the histogram when the TX queue time-in-queue statistics collection feature is enabled.

By default the `OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_MARK_ECN_INTERVAL` is used which defines the maximum time-in-queue interval after which a non-ECN capable message is dropped by delay-aware queue management feature.

## Resources

OpenThread API Reference topics originate from the source code, available
on [GitHub](https://github.com/openthread/openthread/tree/main/include/openthread).
For more information, or to contribute to our documentation, refer to
[Resources](https://openthread.io/resources).