Expand description
Compile-time configuration.
The sizes of the packet pool and of the buffers in it are set at compile time. They can be set in two ways:
- With a cargo feature named
<name>-<value>, lowercase and with dashes instead of underscores. For examplepacket-buf-count-32. Only the values listed inCargo.tomlcan be set this way. - With an environment variable named
XARXA_<NAME>at build time. For exampleXARXA_PACKET_BUF_COUNT=32 cargo build. They can also be set in the[env]section of.cargo/config.toml. Any value can be set this way.
Environment variables win over cargo features. Enabling two cargo features for the same setting with different values fails the build.
The xarxa crate forwards the features of the same name to this crate, and
has its own knobs in xarxa::config.
Constantsยง
- PACKET_
BUF_ ALIGN - Alignment of the buffer in a
PacketBuf, in bytes. - PACKET_
BUF_ COUNT - Number of buffers in the packet pool.
- PACKET_
BUF_ SIZE - Size of the buffer in a
PacketBuf, in bytes.