10835cc78SMarcin Wojtas.\" SPDX-License-Identifier: BSD-2-Clause 20835cc78SMarcin Wojtas.\" 38d6806cdSOsama Abboud.\" Copyright (c) 2015-2024 Amazon.com, Inc. or its affiliates. 49b8d05b8SZbigniew Bodek.\" All rights reserved. 59b8d05b8SZbigniew Bodek.\" 69b8d05b8SZbigniew Bodek.\" Redistribution and use in source and binary forms, with or without 79b8d05b8SZbigniew Bodek.\" modification, are permitted provided that the following conditions 89b8d05b8SZbigniew Bodek.\" are met: 99b8d05b8SZbigniew Bodek.\" 109b8d05b8SZbigniew Bodek.\" 1. Redistributions of source code must retain the above copyright 119b8d05b8SZbigniew Bodek.\" notice, this list of conditions and the following disclaimer. 129b8d05b8SZbigniew Bodek.\" 139b8d05b8SZbigniew Bodek.\" 2. Redistributions in binary form must reproduce the above copyright 149b8d05b8SZbigniew Bodek.\" notice, this list of conditions and the following disclaimer in 159b8d05b8SZbigniew Bodek.\" the documentation and/or other materials provided with the 169b8d05b8SZbigniew Bodek.\" distribution. 179b8d05b8SZbigniew Bodek.\" 189b8d05b8SZbigniew Bodek.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 199b8d05b8SZbigniew Bodek.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 209b8d05b8SZbigniew Bodek.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 219b8d05b8SZbigniew Bodek.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 229b8d05b8SZbigniew Bodek.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 239b8d05b8SZbigniew Bodek.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 249b8d05b8SZbigniew Bodek.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 259b8d05b8SZbigniew Bodek.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 269b8d05b8SZbigniew Bodek.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 279b8d05b8SZbigniew Bodek.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 289b8d05b8SZbigniew Bodek.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 299b8d05b8SZbigniew Bodek.\" 30*13e82893SAlexander Ziaee.Dd November 14, 2024 319b8d05b8SZbigniew Bodek.Dt ENA 4 329b8d05b8SZbigniew Bodek.Os 339b8d05b8SZbigniew Bodek.Sh NAME 349b8d05b8SZbigniew Bodek.Nm ena 35*13e82893SAlexander Ziaee.Nd AWS EC2 Elastic Network Adapter (ENA) driver 369b8d05b8SZbigniew Bodek.Sh SYNOPSIS 379b8d05b8SZbigniew BodekTo compile this driver into the kernel, 38e44f5c81SMarcin Wojtasplace the following line in the 399b8d05b8SZbigniew Bodekkernel configuration file: 409b8d05b8SZbigniew Bodek.Bd -ragged -offset indent 419b8d05b8SZbigniew Bodek.Cd "device ena" 429b8d05b8SZbigniew Bodek.Ed 439b8d05b8SZbigniew Bodek.Pp 449b8d05b8SZbigniew BodekAlternatively, to load the driver as a 459b8d05b8SZbigniew Bodekmodule at boot time, place the following line in 469b8d05b8SZbigniew Bodek.Xr loader.conf 5 : 479b8d05b8SZbigniew Bodek.Bd -literal -offset indent 489b8d05b8SZbigniew Bodekif_ena_load="YES" 499b8d05b8SZbigniew Bodek.Ed 509b8d05b8SZbigniew Bodek.Sh DESCRIPTION 519b8d05b8SZbigniew BodekThe ENA is a networking interface designed to make good use of modern CPU 529b8d05b8SZbigniew Bodekfeatures and system architectures. 539b8d05b8SZbigniew Bodek.Pp 549b8d05b8SZbigniew BodekThe ENA device exposes a lightweight management interface with a 559b8d05b8SZbigniew Bodekminimal set of memory mapped registers and extendable command set 569b8d05b8SZbigniew Bodekthrough an Admin Queue. 579b8d05b8SZbigniew Bodek.Pp 589b8d05b8SZbigniew BodekThe driver supports a range of ENA devices, is link-speed independent 599b8d05b8SZbigniew Bodek(i.e., the same driver is used for 10GbE, 25GbE, 40GbE, etc.), and has 609b8d05b8SZbigniew Bodeka negotiated and extendable feature set. 619b8d05b8SZbigniew Bodek.Pp 62e44f5c81SMarcin WojtasSome ENA devices support SR-IOV. 63e44f5c81SMarcin WojtasThis driver is used for both the SR-IOV Physical Function (PF) and Virtual 64e44f5c81SMarcin WojtasFunction (VF) devices. 659b8d05b8SZbigniew Bodek.Pp 669b8d05b8SZbigniew BodekThe ENA devices enable high speed and low overhead network traffic 679b8d05b8SZbigniew Bodekprocessing by providing multiple Tx/Rx queue pairs (the maximum number 689b8d05b8SZbigniew Bodekis advertised by the device via the Admin Queue), a dedicated MSI-X 699b8d05b8SZbigniew Bodekinterrupt vector per Tx/Rx queue pair, and CPU cacheline optimized 709b8d05b8SZbigniew Bodekdata placement. 719b8d05b8SZbigniew Bodek.Pp 72eb4c4f4aSMarcin WojtasWhen RSS is enabled, each Tx/Rx queue pair is bound to a corresponding 7369d793a2SChristian BruefferCPU core and its NUMA domain. 7469d793a2SChristian BruefferThe order of those bindings is based on the RSS bucket mapping. 7569d793a2SChristian BruefferFor builds with RSS support disabled, the 76eb4c4f4aSMarcin WojtasCPU and NUMA management is left to the kernel. 779b8d05b8SZbigniew BodekReceive-side scaling (RSS) is supported for multi-core scaling. 789b8d05b8SZbigniew Bodek.Pp 799b8d05b8SZbigniew BodekThe 809b8d05b8SZbigniew Bodek.Nm 819b8d05b8SZbigniew Bodekdriver and its corresponding devices implement health 829b8d05b8SZbigniew Bodekmonitoring mechanisms such as watchdog, enabling the device and driver 839b8d05b8SZbigniew Bodekto recover in a manner transparent to the application, as well as 849b8d05b8SZbigniew Bodekdebug logs. 859b8d05b8SZbigniew Bodek.Pp 869b8d05b8SZbigniew BodekSome of the ENA devices support a working mode called Low-latency 87e44f5c81SMarcin WojtasQueue (LLQ), which saves several more microseconds. 88e34856a2SMarcin Wojtas.Pp 89e34856a2SMarcin WojtasSupport for the 90e34856a2SMarcin Wojtas.Xr netmap 4 91e34856a2SMarcin Wojtasframework is provided by the 92e34856a2SMarcin Wojtas.Nm 93e34856a2SMarcin Wojtasdriver. 94e34856a2SMarcin WojtasKernel must be built with the DEV_NETMAP option to be able to use this feature. 959b8d05b8SZbigniew Bodek.Sh HARDWARE 96*13e82893SAlexander ZiaeeThe 97*13e82893SAlexander Ziaee.Nm 98*13e82893SAlexander Ziaeedriver supports the following PCI vendor ID/device IDs: 999b8d05b8SZbigniew Bodek.Pp 1009b8d05b8SZbigniew Bodek.Bl -bullet -compact 1019b8d05b8SZbigniew Bodek.It 1029b8d05b8SZbigniew Bodek1d0f:0ec2 - ENA PF 1039b8d05b8SZbigniew Bodek.It 1049b8d05b8SZbigniew Bodek1d0f:1ec2 - ENA PF with LLQ support 1059b8d05b8SZbigniew Bodek.It 1069b8d05b8SZbigniew Bodek1d0f:ec20 - ENA VF 1079b8d05b8SZbigniew Bodek.It 1089b8d05b8SZbigniew Bodek1d0f:ec21 - ENA VF with LLQ support 1099b8d05b8SZbigniew Bodek.El 110e34856a2SMarcin Wojtas.Sh LOADER TUNABLES 111e34856a2SMarcin WojtasThe 112e34856a2SMarcin Wojtas.Nm 113e34856a2SMarcin Wojtasdriver's behavior can be changed using run-time or boot-time sysctl 114e34856a2SMarcin Wojtasarguments. 115e34856a2SMarcin WojtasThe boot-time arguments can be set at the 116e34856a2SMarcin Wojtas.Xr loader 8 117e34856a2SMarcin Wojtasprompt before booting the kernel, or stored in the 118e34856a2SMarcin Wojtas.Xr loader.conf 5 . 119e34856a2SMarcin WojtasThe run-time arguments can be set using the 120e34856a2SMarcin Wojtas.Xr sysctl 8 121e34856a2SMarcin Wojtascommand. 122e34856a2SMarcin Wojtas.Pp 123e34856a2SMarcin WojtasBoot-time tunables: 124e34856a2SMarcin Wojtas.Bl -tag -width indent 125e34856a2SMarcin Wojtas.It Va hw.ena.enable_9k_mbufs 126e34856a2SMarcin WojtasUse 9k mbufs for the Rx descriptors. 127e34856a2SMarcin WojtasThe default is 0. 128e34856a2SMarcin WojtasIf the node value is set to 1, 9k mbufs will be used for the Rx buffers. 129e34856a2SMarcin WojtasIf set to 0, page size mbufs will be used instead. 130e34856a2SMarcin Wojtas.Pp 131e34856a2SMarcin WojtasUsing 9k buffers for Rx can improve Rx throughput, but in low memory conditions 132e34856a2SMarcin Wojtasit might increase allocation time, as the system has to look for 3 contiguous 133e34856a2SMarcin Wojtaspages. 134e34856a2SMarcin WojtasThis can further lead to OS instability, together with ENA driver reset and NVMe 135e34856a2SMarcin Wojtastimeouts. 136e34856a2SMarcin WojtasIf network performance is critical and memory capacity is sufficient, the 9k 137e34856a2SMarcin Wojtasmbufs can be used. 138b1c38df0SOsama Abboud.It Va hw.ena.force_large_llq_header 139b1c38df0SOsama AbboudForce the driver to use large (224 bytes) or regular (96 bytes) LLQ header size. 140b1c38df0SOsama AbboudThe default value is 2 and the recommended LLQ header size will be used. 141e34856a2SMarcin WojtasIf the node value is set to 0, the regular size LLQ header will be used, which 142e34856a2SMarcin Wojtasis 96B. 143e34856a2SMarcin WojtasIn some cases, the packet header can be bigger than this (for example - 144e34856a2SMarcin WojtasIPv6 with multiple extensions). 145b1c38df0SOsama AbboudIn such a situation, the large LLQ header size which is 224B should be used, 146b1c38df0SOsama Abboudand can be forced by setting this node value to 1. 147b1c38df0SOsama AbboudUsing large LLQ header size will take effect only if the device supports 148b1c38df0SOsama Abboudboth LLQ and large LLQ headers. 149e34856a2SMarcin WojtasOtherwise, it will fallback to the no LLQ mode or regular header size. 150e34856a2SMarcin Wojtas.Pp 151e34856a2SMarcin WojtasIncreasing LLQ header size reduces the size of the Tx queue by half, so it may 152e34856a2SMarcin Wojtasaffect the number of dropped Tx packets. 153e34856a2SMarcin Wojtas.El 154e34856a2SMarcin Wojtas.Pp 155e34856a2SMarcin WojtasRun-time tunables: 156e34856a2SMarcin Wojtas.Bl -tag -width indent 157e34856a2SMarcin Wojtas.It Va hw.ena.log_level 158e34856a2SMarcin WojtasControls extra logging verbosity of the driver. 159e34856a2SMarcin WojtasThe default is 2. 160e34856a2SMarcin WojtasThe higher the logging level, the more logs will be printed out. 0 means all 161e34856a2SMarcin Wojtasextra logs are disabled and only error logs will be printed out. 162e34856a2SMarcin WojtasDefault value (2) reports errors, warnings and is verbose about driver 163e34856a2SMarcin Wojtasoperation. 164e34856a2SMarcin Wojtas.Pp 165e34856a2SMarcin WojtasThe possible flags are: 166e34856a2SMarcin Wojtas.Pp 167e34856a2SMarcin Wojtas.Bl -bullet -compact 168e34856a2SMarcin Wojtas.It 169e34856a2SMarcin Wojtas0 - ENA_ERR - Enable driver error messages and ena_com error logs. 170e34856a2SMarcin Wojtas.It 171e34856a2SMarcin Wojtas1 - ENA_WARN - Enable logs for non-critical errors. 172e34856a2SMarcin Wojtas.It 173e34856a2SMarcin Wojtas2 - ENA_INFO - Make the driver more verbose about its actions. 174e34856a2SMarcin Wojtas.It 175e34856a2SMarcin Wojtas3 - ENA_DBG - Enable debug logs. 176e34856a2SMarcin Wojtas.El 177e34856a2SMarcin Wojtas.Pp 178e34856a2SMarcin WojtasNOTE: In order to enable logging on the Tx/Rx data path, driver must be compiled 179e34856a2SMarcin Wojtaswith ENA_LOG_IO_ENABLE compilation flag. 180e34856a2SMarcin Wojtas.Pp 181e34856a2SMarcin WojtasExample: 182e34856a2SMarcin WojtasTo enable logs for errors and warnings, the following command should be used: 183e34856a2SMarcin Wojtas.Bd -literal -offset indent 184e34856a2SMarcin Wojtassysctl hw.ena.log_level=1 185e34856a2SMarcin Wojtas.Ed 186e34856a2SMarcin Wojtas.It Va dev.ena.X.io_queues_nb 187e34856a2SMarcin WojtasNumber of the currently allocated and used IO queues. 188e34856a2SMarcin WojtasThe default is max_num_io_queues. 189e34856a2SMarcin WojtasControls the number of IO queue pairs (Tx/Rx). As this call has to reallocate 190e34856a2SMarcin Wojtasthe queues, it will reset the interface and restart all the queues - this means 191e34856a2SMarcin Wojtasthat everything, which was currently held in the queue, will be lost, leading to 192e34856a2SMarcin Wojtaspotential packet drops. 193e34856a2SMarcin Wojtas.Pp 194e34856a2SMarcin WojtasThis call can fail if the system isn't able to provide the driver with enough 195e34856a2SMarcin Wojtasresources. 196e34856a2SMarcin WojtasIn that situation, the driver will try to revert the previous number of the IO 197e34856a2SMarcin Wojtasqueues. 198e34856a2SMarcin WojtasIf this also fails, the device reset will be triggered. 199e34856a2SMarcin Wojtas.Pp 200e34856a2SMarcin WojtasExample: 201e34856a2SMarcin WojtasTo use only 2 Tx and Rx queues for the device ena1, the following command should 202e34856a2SMarcin Wojtasbe used: 203e34856a2SMarcin Wojtas.Bd -literal -offset indent 204e34856a2SMarcin Wojtassysctl dev.ena.1.io_queues_nb=2 205e34856a2SMarcin Wojtas.Ed 206e34856a2SMarcin Wojtas.It Va dev.ena.X.rx_queue_size 207e34856a2SMarcin WojtasSize of the Rx queue. 208e34856a2SMarcin WojtasThe default is 1024. 209e34856a2SMarcin WojtasControls the number of IO descriptors for each Rx queue. 210e34856a2SMarcin WojtasThe user may want to increase the Rx queue size if they observe a high number of 211e34856a2SMarcin WojtasRx drops in the driver's statistics. 212e34856a2SMarcin WojtasFor performance reasons, the Rx queue size must be a power of 2. 213e34856a2SMarcin Wojtas.Pp 214e34856a2SMarcin WojtasThis call can fail if the system isn't able to provide the driver with enough 215e34856a2SMarcin Wojtasresources. 216e34856a2SMarcin WojtasIn that situation, the driver will try to revert to the previous number of the 217e34856a2SMarcin Wojtasdescriptors. 218e34856a2SMarcin WojtasIf this also fails, the device reset will be triggered. 219e34856a2SMarcin Wojtas.Pp 220e34856a2SMarcin WojtasExample: 221e34856a2SMarcin WojtasTo increase Rx ring size to 8K descriptors for the device ena0, the following 222e34856a2SMarcin Wojtascommand should be used: 223e34856a2SMarcin Wojtas.Bd -literal -offset indent 224e34856a2SMarcin Wojtassysctl dev.ena.0.rx_queue_size=8192 225e34856a2SMarcin Wojtas.Ed 226e34856a2SMarcin Wojtas.It Va dev.ena.X.buf_ring_size 227e34856a2SMarcin WojtasSize of the Tx buffer ring (drbr). 228e34856a2SMarcin WojtasThe default is 4096. 229e34856a2SMarcin WojtasInput must be a power of 2. 230e34856a2SMarcin WojtasControls the number of mbufs that can be held in the Tx buffer ring. 231e34856a2SMarcin WojtasThe drbr is used as a multiple-producer, single-consumer lockless ring for 232e34856a2SMarcin Wojtasbuffering extra mbufs coming from the stack in case the Tx procedure is busy 233e34856a2SMarcin Wojtassending the packets, or the Tx ring is full. 234e34856a2SMarcin WojtasIncreasing the size of the buffer ring may reduce the number of Tx packets being 235e34856a2SMarcin Wojtasdropped in case of a big Tx burst, which cannot be handled by the IO queue 236e34856a2SMarcin Wojtasimmediately. 237e34856a2SMarcin WojtasEach Tx queue has its own drbr. 238e34856a2SMarcin Wojtas.Pp 239e34856a2SMarcin WojtasIt is recommended to keep the drbr with at least the default value, but in case 240e34856a2SMarcin Wojtasthe system lacks the resources, it can be reduced. 241e34856a2SMarcin WojtasThis call can fail if the system is not able to provide the driver with enough 242e34856a2SMarcin Wojtasresources. 243e34856a2SMarcin WojtasIn that situation, the driver will try to revert to the previous number of the 244e34856a2SMarcin Wojtasdrbr and trigger the device reset. 245e34856a2SMarcin Wojtas.Pp 246e34856a2SMarcin WojtasExample: 247e34856a2SMarcin WojtasTo set drbr size for interface ena0 to 2048, the following command should 248e34856a2SMarcin Wojtasbe used: 249e34856a2SMarcin Wojtas.Bd -literal -offset indent 250e34856a2SMarcin Wojtassysctl dev.ena.0.buf_ring_size=2048 251e34856a2SMarcin Wojtas.Ed 252e34856a2SMarcin Wojtas.It Va dev.ena.X.eni_metrics.sample_interval 253e34856a2SMarcin WojtasInterval in seconds for updating ENI metrics. 254e34856a2SMarcin WojtasThe default is 0. 255e34856a2SMarcin WojtasDetermines how often (if ever) the ENI metrics should be updated. 256e34856a2SMarcin WojtasThe ENI metrics are being updated asynchronously in a timer service in order to 257e34856a2SMarcin Wojtasavoid admin queue overload by sysctl node reading. 258e34856a2SMarcin WojtasThe value in this node controls the interval between issuing admin commands to 259e34856a2SMarcin Wojtasthe device, which will update the ENI metrics values. 260e34856a2SMarcin Wojtas.Pp 261e34856a2SMarcin WojtasIf some application is periodically monitoring the eni_metrics, then the ENI 262e34856a2SMarcin Wojtasmetrics interval can be adjusted accordingly. 263e34856a2SMarcin WojtasValue 0 turns off the update completely. 264e34856a2SMarcin WojtasValue 1 is the minimum interval and is equal to 1 second. 265e34856a2SMarcin WojtasThe maximum allowed update interval is 1 hour. 266e34856a2SMarcin Wojtas.Pp 267e34856a2SMarcin WojtasExample: 268e34856a2SMarcin WojtasTo update ENI metrics for the device ena1 every 10 seconds, the following 269e34856a2SMarcin Wojtascommand should be used: 270e34856a2SMarcin Wojtas.Bd -literal -offset indent 271e34856a2SMarcin Wojtassysctl dev.ena.1.eni_metrics.sample_interval=10 272e34856a2SMarcin Wojtas.Ed 2736d1ef2abSArtur Rojek.It Va dev.ena.X.rss.indir_table_size 2746d1ef2abSArtur RojekRSS indirection table size. 2756d1ef2abSArtur RojekThe default is 128. 2766d1ef2abSArtur RojekReturns the number of entries in the RSS indirection table. 2776d1ef2abSArtur Rojek.Pp 2786d1ef2abSArtur RojekExample: 2796d1ef2abSArtur RojekTo read the RSS indirection table size, the following command should be used: 2806d1ef2abSArtur Rojek.Bd -literal -offset indent 2816d1ef2abSArtur Rojeksysctl dev.ena.0.rss.indir_table_size 2826d1ef2abSArtur Rojek.Ed 2836d1ef2abSArtur Rojek.It Va dev.ena.X.rss.indir_table 2846d1ef2abSArtur RojekRSS indirection table mapping. 2856d1ef2abSArtur RojekThe default is x:y key-pairs of indir_table_size length. 2866d1ef2abSArtur RojekUpdates selected indices of the RSS indirection table. 2876d1ef2abSArtur Rojek.Pp 2886d1ef2abSArtur RojekThe entry string consists of one or more x:y keypairs, where x stands for 28969d793a2SChristian Bruefferthe table index and y for its new value. 29069d793a2SChristian BruefferTable indices that don't need to be 2916d1ef2abSArtur Rojekupdated can be omitted from the string and will retain their existing values. 2926d1ef2abSArtur Rojek.Pp 2936d1ef2abSArtur RojekIf an index is entered more than once, the last value is used. 2946d1ef2abSArtur Rojek.Pp 2956d1ef2abSArtur RojekExample: 2966d1ef2abSArtur RojekTo update two selected indices in the RSS indirection table, e.g. setting index 2976d1ef2abSArtur Rojek0 to queue 5 and then index 5 to queue 0, the following command should be used: 2986d1ef2abSArtur Rojek.Bd -literal -offset indent 2996d1ef2abSArtur Rojeksysctl dev.ena.0.rss.indir_table="0:5 5:0" 3006d1ef2abSArtur Rojek.Ed 3016d1ef2abSArtur Rojek.It Va dev.ena.X.rss.key 3026d1ef2abSArtur RojekRSS hash key. 3036d1ef2abSArtur RojekThe default is 40 bytes long randomly generated hash key. 3046d1ef2abSArtur RojekControls the RSS Toeplitz hash algorithm key value. 3056d1ef2abSArtur Rojek.Pp 3066d1ef2abSArtur RojekOnly available when driver compiled without the kernel side RSS support. 3076d1ef2abSArtur Rojek.Pp 3086d1ef2abSArtur RojekExample: 3096d1ef2abSArtur RojekTo change the RSS hash key value to 3106d1ef2abSArtur Rojek.Pp 3116d1ef2abSArtur Rojek0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2, 3126d1ef2abSArtur Rojek.br 3136d1ef2abSArtur Rojek0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0, 3146d1ef2abSArtur Rojek.br 3156d1ef2abSArtur Rojek0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4, 3166d1ef2abSArtur Rojek.br 3176d1ef2abSArtur Rojek0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c, 3186d1ef2abSArtur Rojek.br 3196d1ef2abSArtur Rojek0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa 3206d1ef2abSArtur Rojek.Pp 3216d1ef2abSArtur Rojekthe following command should be used: 3226d1ef2abSArtur Rojek.Bd -literal -offset indent 3236d1ef2abSArtur Rojeksysctl dev.ena.0.rss.key=6d5a56da255b0ec24167253d43a38fb0d0ca2bcbae7b30b477cb2da38030f20c6a42b73bbeac01fa 3246d1ef2abSArtur Rojek.Ed 325e34856a2SMarcin Wojtas.El 3269b8d05b8SZbigniew Bodek.Sh DIAGNOSTICS 327e34856a2SMarcin Wojtas.Ss Device initialization phase 3289b8d05b8SZbigniew Bodek.Bl -diag 3299b8d05b8SZbigniew Bodek.It ena%d: failed to init mmio read less 3309b8d05b8SZbigniew Bodek.Pp 3315210fe00SEd MasteError occurred during initialization of the mmio register read request. 3329b8d05b8SZbigniew Bodek.It ena%d: Can not reset device 3339b8d05b8SZbigniew Bodek.Pp 334e44f5c81SMarcin WojtasDevice could not be reset. 335e44f5c81SMarcin Wojtas.br 336e44f5c81SMarcin WojtasDevice may not be responding or is already during reset. 3379b8d05b8SZbigniew Bodek.It ena%d: device version is too low 3389b8d05b8SZbigniew Bodek.Pp 339e44f5c81SMarcin WojtasVersion of the controller is too old and it is not supported by the driver. 3409b8d05b8SZbigniew Bodek.It ena%d: Invalid dma width value %d 3419b8d05b8SZbigniew Bodek.Pp 342e34856a2SMarcin WojtasThe controller is unable to request dma transaction width. 343e44f5c81SMarcin Wojtas.br 344e44f5c81SMarcin WojtasDevice stopped responding or it demanded invalid value. 3459b8d05b8SZbigniew Bodek.It ena%d: Can not initialize ena admin queue with device 3469b8d05b8SZbigniew Bodek.Pp 347e44f5c81SMarcin WojtasInitialization of the Admin Queue failed. 348e44f5c81SMarcin Wojtas.br 349e44f5c81SMarcin WojtasDevice may not be responding or there was a problem with initialization of 350e44f5c81SMarcin Wojtasthe resources. 3519b8d05b8SZbigniew Bodek.It ena%d: Cannot get attribute for ena device rc: %d 3529b8d05b8SZbigniew Bodek.Pp 3539b8d05b8SZbigniew BodekFailed to get attributes of the device from the controller. 3549b8d05b8SZbigniew Bodek.It ena%d: Cannot configure aenq groups rc: %d 3559b8d05b8SZbigniew Bodek.Pp 3565210fe00SEd MasteErrors occurred when trying to configure AENQ groups. 3579b8d05b8SZbigniew Bodek.El 358e34856a2SMarcin Wojtas.Ss Driver initialization/shutdown phase 3599b8d05b8SZbigniew Bodek.Bl -diag 3609b8d05b8SZbigniew Bodek.It ena%d: PCI resource allocation failed! 3619b8d05b8SZbigniew Bodek.It ena%d: failed to pmap registers bar 3629b8d05b8SZbigniew Bodek.It ena%d: can not allocate ifnet structure 3639b8d05b8SZbigniew Bodek.It ena%d: Error with network interface setup 3649b8d05b8SZbigniew Bodek.It ena%d: Failed to enable and set the admin interrupts 365e34856a2SMarcin Wojtas.It ena%d: Error, MSI-X is already enabled 3669b8d05b8SZbigniew Bodek.It ena%d: Failed to enable MSIX, vectors %d rc %d 367e34856a2SMarcin Wojtas.It ena%d: Not enough number of MSI-X allocated: %d 3689b8d05b8SZbigniew Bodek.It ena%d: Error with MSI-X enablement 3699b8d05b8SZbigniew Bodek.It ena%d: could not allocate irq vector: %d 370e34856a2SMarcin Wojtas.It ena%d: unable to allocate bus resource: registers! 371e34856a2SMarcin Wojtas.It ena%d: unable to allocate bus resource: msix! 3729b8d05b8SZbigniew Bodek.Pp 373e44f5c81SMarcin WojtasResource allocation failed when initializing the device. 374e44f5c81SMarcin Wojtas.br 375e44f5c81SMarcin WojtasDriver will not be attached. 3769b8d05b8SZbigniew Bodek.It ena%d: ENA device init failed (err: %d) 377e34856a2SMarcin Wojtas.It ena%d: Cannot initialize device 3789b8d05b8SZbigniew Bodek.Pp 379e44f5c81SMarcin WojtasDevice initialization failed. 380e44f5c81SMarcin Wojtas.br 381e44f5c81SMarcin WojtasDriver will not be attached. 3829b8d05b8SZbigniew Bodek.It ena%d: failed to register interrupt handler for irq %ju: %d 3839b8d05b8SZbigniew Bodek.Pp 3845210fe00SEd MasteError occurred when trying to register Admin Queue interrupt handler. 3859b8d05b8SZbigniew Bodek.It ena%d: Cannot setup mgmnt queue intr 3869b8d05b8SZbigniew Bodek.Pp 3875210fe00SEd MasteError occurred during configuration of the Admin Queue interrupts. 3889b8d05b8SZbigniew Bodek.It ena%d: Enable MSI-X failed 3899b8d05b8SZbigniew Bodek.Pp 390e44f5c81SMarcin WojtasConfiguration of the MSI-X for Admin Queue failed. 391e44f5c81SMarcin Wojtas.br 392e44f5c81SMarcin WojtasThere could be lack of resources or interrupts could not have been configured. 393e44f5c81SMarcin Wojtas.br 394e44f5c81SMarcin WojtasDriver will not be attached. 3959b8d05b8SZbigniew Bodek.It ena%d: VLAN is in use, detach first 3969b8d05b8SZbigniew Bodek.Pp 397e44f5c81SMarcin WojtasVLANs are being used when trying to detach the driver. 398e44f5c81SMarcin Wojtas.br 399e44f5c81SMarcin WojtasVLANs must be detached first and then detach routine have to be called again. 4009b8d05b8SZbigniew Bodek.It ena%d: Unmapped RX DMA tag associations 4019b8d05b8SZbigniew Bodek.It ena%d: Unmapped TX DMA tag associations 4029b8d05b8SZbigniew Bodek.Pp 4035210fe00SEd MasteError occurred when trying to destroy RX/TX DMA tag. 404e34856a2SMarcin Wojtas.It ena%d: Cannot init indirect table 4059b8d05b8SZbigniew Bodek.It ena%d: Cannot fill indirect table 4069b8d05b8SZbigniew Bodek.It ena%d: Cannot fill hash function 4079b8d05b8SZbigniew Bodek.It ena%d: Cannot fill hash control 4089b8d05b8SZbigniew Bodek.It ena%d: WARNING: RSS was not properly initialized, it will affect bandwidth 4099b8d05b8SZbigniew Bodek.Pp 410e44f5c81SMarcin WojtasError occurred during initialization of one of RSS resources. 411e44f5c81SMarcin Wojtas.br 412e44f5c81SMarcin WojtasThe device will work with reduced performance because all RX packets will be 4139b8d05b8SZbigniew Bodekpassed to queue 0 and there will be no hash information. 414e34856a2SMarcin Wojtas.It ena%d: LLQ is not supported. Fallback to host mode policy. 415e34856a2SMarcin Wojtas.It ena%d: Failed to configure the device mode. Fallback to host mode policy. 416e34856a2SMarcin Wojtas.It ena%d: unable to allocate LLQ bar resource. Fallback to host mode policy. 417e34856a2SMarcin Wojtas.Pp 41895161adfSMichal KrawczykError occurred during Low-latency Queue mode setup. 419e34856a2SMarcin Wojtas.br 420e34856a2SMarcin WojtasThe device will work, but without the LLQ performance gain. 421e34856a2SMarcin Wojtas.It ena%d: failed to enable write combining. 422e34856a2SMarcin Wojtas.Pp 42395161adfSMichal KrawczykError occurred while setting the Write Combining mode, required for the LLQ. 4249b8d05b8SZbigniew Bodek.It ena%d: failed to tear down irq: %d 4259b8d05b8SZbigniew Bodek.It ena%d: dev has no parent while releasing res for irq: %d 4269b8d05b8SZbigniew BodekRelease of the interrupts failed. 4279b8d05b8SZbigniew Bodek.El 428e34856a2SMarcin Wojtas.Ss Additional diagnostic 4299b8d05b8SZbigniew Bodek.Bl -diag 430e34856a2SMarcin Wojtas.It ena%d: Invalid MTU setting. new_mtu: %d max_mtu: %d min mtu: %d 4319b8d05b8SZbigniew Bodek.Pp 4329b8d05b8SZbigniew BodekRequested MTU value is not supported and will not be set. 433e34856a2SMarcin Wojtas.It ena%d: Failed to set MTU to %d 434e34856a2SMarcin Wojtas.Pp 435e34856a2SMarcin WojtasThis message appears when either MTU change feature is not supported, or device 43695161adfSMichal Krawczykcommunication error has occurred. 437e34856a2SMarcin Wojtas.It ena%d: Keep alive watchdog timeout. 4389b8d05b8SZbigniew Bodek.Pp 4399b8d05b8SZbigniew BodekDevice stopped responding and will be reset. 4409b8d05b8SZbigniew Bodek.It ena%d: Found a Tx that wasn't completed on time, qid %d, index %d. 4419b8d05b8SZbigniew Bodek.Pp 442e44f5c81SMarcin WojtasPacket was pushed to the NIC but not sent within given time limit. 443e44f5c81SMarcin Wojtas.br 444e44f5c81SMarcin WojtasIt may be caused by hang of the IO queue. 44595161adfSMichal Krawczyk.It ena%d: The number of lost tx completion is above the threshold (%d > %d). Reset the device 4469b8d05b8SZbigniew Bodek.Pp 447e34856a2SMarcin WojtasIf too many Tx weren't completed on time the device is going to be reset. 448e44f5c81SMarcin Wojtas.br 449e44f5c81SMarcin WojtasIt may be caused by hanged queue or device. 450e34856a2SMarcin Wojtas.It ena%d: Trigger reset is on 4519b8d05b8SZbigniew Bodek.Pp 452e44f5c81SMarcin WojtasDevice will be reset. 453e44f5c81SMarcin Wojtas.br 454e44f5c81SMarcin WojtasReset is triggered either by watchdog or if too many TX packets were not 455e44f5c81SMarcin Wojtascompleted on time. 456e34856a2SMarcin Wojtas.It ena%d: device reset scheduled but trigger_reset is off 4579b8d05b8SZbigniew Bodek.Pp 458e34856a2SMarcin WojtasReset task has been triggered, but the driver did not request it. 459e34856a2SMarcin Wojtas.br 460e34856a2SMarcin WojtasDevice reset will not be performed. 461e34856a2SMarcin Wojtas.It ena%d: Device reset failed 462e34856a2SMarcin Wojtas.Pp 46395161adfSMichal KrawczykError occurred while trying to reset the device. 464e34856a2SMarcin Wojtas.It ena%d: Cannot initialize device 465e34856a2SMarcin Wojtas.It ena%d: Error, mac address are different 466e34856a2SMarcin Wojtas.It ena%d: Error, device max mtu is smaller than ifp MTU 467e34856a2SMarcin Wojtas.It ena%d: Validation of device parameters failed 468e34856a2SMarcin Wojtas.It ena%d: Enable MSI-X failed 469e34856a2SMarcin Wojtas.It ena%d: Failed to create I/O queues 470e34856a2SMarcin Wojtas.It ena%d: Reset attempt failed. Can not reset the device 471e34856a2SMarcin Wojtas.Pp 47295161adfSMichal KrawczykError occurred while trying to restore the device after reset. 473e34856a2SMarcin Wojtas.It ena%d: Device reset completed successfully, Driver info: %s 474e34856a2SMarcin Wojtas.Pp 475e34856a2SMarcin WojtasDevice has been correctly restored after reset and is ready to use. 4769b8d05b8SZbigniew Bodek.It ena%d: Allocation for Tx Queue %u failed 4779b8d05b8SZbigniew Bodek.It ena%d: Allocation for Rx Queue %u failed 4789b8d05b8SZbigniew Bodek.It ena%d: Unable to create Rx DMA map for buffer %d 4799b8d05b8SZbigniew Bodek.It ena%d: Failed to create io TX queue #%d rc: %d 4809b8d05b8SZbigniew Bodek.It ena%d: Failed to get TX queue handlers. TX queue num %d rc: %d 4819b8d05b8SZbigniew Bodek.It ena%d: Failed to create io RX queue[%d] rc: %d 4829b8d05b8SZbigniew Bodek.It ena%d: Failed to get RX queue handlers. RX queue num %d rc: %d 4839b8d05b8SZbigniew Bodek.It ena%d: could not allocate irq vector: %d 4849b8d05b8SZbigniew Bodek.It ena%d: failed to register interrupt handler for irq %ju: %d 4859b8d05b8SZbigniew Bodek.Pp 486e44f5c81SMarcin WojtasIO resources initialization failed. 487e44f5c81SMarcin Wojtas.br 488e44f5c81SMarcin WojtasInterface will not be brought up. 4899b8d05b8SZbigniew Bodek.It ena%d: LRO[%d] Initialization failed! 4909b8d05b8SZbigniew Bodek.Pp 4919b8d05b8SZbigniew BodekInitialization of the LRO for the RX ring failed. 4929b8d05b8SZbigniew Bodek.It ena%d: failed to alloc buffer for rx queue 4939b8d05b8SZbigniew Bodek.It ena%d: failed to add buffer for rx queue %d 494e34856a2SMarcin Wojtas.It ena%d: refilled rx qid %d with only %d mbufs (from %d) 4959b8d05b8SZbigniew Bodek.Pp 496e44f5c81SMarcin WojtasAllocation of resources used on RX path failed. 497e44f5c81SMarcin Wojtas.br 498e44f5c81SMarcin WojtasIf happened during initialization of the IO queue, the interface will not be 499e44f5c81SMarcin Wojtasbrought up. 500e34856a2SMarcin Wojtas.It ena%d: NULL mbuf in rx_info 501e34856a2SMarcin Wojtas.Pp 50295161adfSMichal KrawczykError occurred while assembling mbuf from descriptors. 503e34856a2SMarcin Wojtas.It ena%d: tx_info doesn't have valid mbuf 504e34856a2SMarcin Wojtas.It ena%d: Invalid req_id: %hu 505e34856a2SMarcin Wojtas.It ena%d: failed to prepare tx bufs 506e34856a2SMarcin Wojtas.Pp 50795161adfSMichal KrawczykError occurred while preparing a packet for transmission. 5089b8d05b8SZbigniew Bodek.It ena%d: ioctl promisc/allmulti 5099b8d05b8SZbigniew Bodek.Pp 510e44f5c81SMarcin WojtasIOCTL request for the device to work in promiscuous/allmulti mode. 511e44f5c81SMarcin Wojtas.br 512e44f5c81SMarcin WojtasSee 5139b8d05b8SZbigniew Bodek.Xr ifconfig 8 5149b8d05b8SZbigniew Bodekfor more details. 515d458747eSChristian Brueffer.El 5169b8d05b8SZbigniew Bodek.Sh SUPPORT 517e44f5c81SMarcin WojtasIf an issue is identified with the released source code with a supported 518e44f5c81SMarcin Wojtasadapter, please email the specific information related to the issue to 519fb47286cSArthur Kiyanovski.Aq Mt akiyano@amazon.com , 520fb47286cSArthur Kiyanovski.Aq Mt osamaabb@amazon.com 5219b8d05b8SZbigniew Bodekand 522fb47286cSArthur Kiyanovski.Aq Mt darinzon@amazon.com . 5239b8d05b8SZbigniew Bodek.Sh SEE ALSO 524e34856a2SMarcin Wojtas.Xr netmap 4 , 5259b8d05b8SZbigniew Bodek.Xr vlan 4 , 5269b8d05b8SZbigniew Bodek.Xr ifconfig 8 527e34856a2SMarcin Wojtas.Sh HISTORY 528e34856a2SMarcin WojtasThe 529e34856a2SMarcin Wojtas.Nm 530e34856a2SMarcin Wojtasdriver first appeared in 531e34856a2SMarcin Wojtas.Fx 11.1 . 5329b8d05b8SZbigniew Bodek.Sh AUTHORS 5339b8d05b8SZbigniew BodekThe 5349b8d05b8SZbigniew Bodek.Nm 535fb47286cSArthur Kiyanovskidriver was developed by Amazon and originally written by 5369b8d05b8SZbigniew Bodek.An Semihalf . 537