sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftargetA/translations/zh_CN/networking/device_drivers/ethernet/amazon/enamodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetA/translations/zh_TW/networking/device_drivers/ethernet/amazon/enamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetA/translations/it_IT/networking/device_drivers/ethernet/amazon/enamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetA/translations/ja_JP/networking/device_drivers/ethernet/amazon/enamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetA/translations/ko_KR/networking/device_drivers/ethernet/amazon/enamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetA/translations/sp_SP/networking/device_drivers/ethernet/amazon/enamodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhh[/var/lib/git/docbuild/linux/Documentation/networking/device_drivers/ethernet/amazon/ena.rsthKubhsection)}(hhh](htitle)}(hhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hhhhubeh}(h]overviewah ]h"]overviewah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h#ENA Source Code Directory Structureh]h#ENA Source Code Directory Structure}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThhhhhK+ubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1johjlubjp)}(hhh]h}(h]h ]h"]h$]h&]colwidthK6uh1johjlubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h ena_com.[ch]h]h ena_com.[ch]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hManagement communication layer. This layer is responsible for the handling all the management (admin) communication between the device and the driver.h]hManagement communication layer. This layer is responsible for the handling all the management (admin) communication between the device and the driver.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hena_eth_com.[ch]h]hena_eth_com.[ch]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK2hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hTx/Rx data path.h]hTx/Rx data path.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK2hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hena_admin_defs.hh]hena_admin_defs.h}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h'Definition of ENA management interface.h]h'Definition of ENA management interface.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hena_eth_io_defs.hh]hena_eth_io_defs.h}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hj6ubah}(h]h ]h"]h$]h&]uh1jhj3ubj)}(hhh]h)}(h&Definition of ENA data path interface.h]h&Definition of ENA data path interface.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjMubah}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hena_common_defs.hh]hena_common_defs.h}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjmubah}(h]h ]h"]h$]h&]uh1jhjjubj)}(hhh]h)}(h%Common definitions for ena_com layer.h]h%Common definitions for ena_com layer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjubah}(h]h ]h"]h$]h&]uh1jhjjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hena_regs_defs.hh]hena_regs_defs.h}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h5Definition of ENA PCI memory-mapped (MMIO) registers.h]h5Definition of ENA PCI memory-mapped (MMIO) registers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hena_netdev.[ch]h]hena_netdev.[ch]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hMain Linux kernel driver.h]hMain Linux kernel driver.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h ena_ethtool.ch]h ena_ethtool.c}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hethtool callbacks.h]hethtool callbacks.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hj)ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h ena_xdp.[ch]h]h ena_xdp.[ch]}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjIubah}(h]h ]h"]h$]h&]uh1jhjFubj)}(hhh]h)}(h XDP filesh]h XDP files}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hj`ubah}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hena_pci_id_tbl.hh]hena_pci_id_tbl.h}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hjubah}(h]h ]h"]h$]h&]uh1jhj}ubj)}(hhh]h)}(hSupported device IDs.h]hSupported device IDs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hjubah}(h]h ]h"]h$]h&]uh1jhj}ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]colsKuh1jjhjgubah}(h]h ]h"]h$]h&]uh1jehjThhhhhNubeh}(h]#ena-source-code-directory-structureah ]h"]#ena source code directory structureah$]h&]uh1hhhhhhhhK+ubh)}(hhh](h)}(hManagement Interface:h]hManagement Interface:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK>ubh)}(h0ENA management interface is exposed by means of:h]h0ENA management interface is exposed by means of:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK@hjhhubh bullet_list)}(hhh](h list_item)}(hPCIe Configuration Spaceh]h)}(hjh]hPCIe Configuration Space}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hDevice Registersh]h)}(hjh]hDevice Registers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKChj ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h1Admin Queue (AQ) and Admin Completion Queue (ACQ)h]h)}(hj%h]h1Admin Queue (AQ) and Admin Completion Queue (ACQ)}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhj#ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h-Asynchronous Event Notification Queue (AENQ) h]h)}(h,Asynchronous Event Notification Queue (AENQ)h]h,Asynchronous Event Notification Queue (AENQ)}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKEhj:ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1jhhhKBhjhhubh)}(hENA device MMIO Registers are accessed only during driver initialization and are not used during further normal device operation.h]hENA device MMIO Registers are accessed only during driver initialization and are not used during further normal device operation.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhjhhubh)}(hqAQ is used for submitting management commands, and the results/responses are reported asynchronously through ACQ.h]hqAQ is used for submitting management commands, and the results/responses are reported asynchronously through ACQ.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjhhubh)}(hENA introduces a small set of management commands with room for vendor-specific extensions. Most of the management operations are framed in a generic Get/Set feature command.h]hENA introduces a small set of management commands with room for vendor-specific extensions. Most of the management operations are framed in a generic Get/Set feature command.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjhhubh)}(h1The following admin queue commands are supported:h]h1The following admin queue commands are supported:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjhhubj)}(hhh](j)}(hCreate I/O submission queueh]h)}(hjh]hCreate I/O submission queue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hCreate I/O completion queueh]h)}(hjh]hCreate I/O completion queue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hDestroy I/O submission queueh]h)}(hjh]hDestroy I/O submission queue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hDestroy I/O completion queueh]h)}(hjh]hDestroy I/O completion queue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKWhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h Get featureh]h)}(hjh]h Get feature}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKXhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h Set featureh]h)}(hj h]h Set feature}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hConfigure AENQh]h)}(hj!h]hConfigure AENQ}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKZhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hGet statistics h]h)}(hGet statisticsh]hGet statistics}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK[hj6ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]jXjYuh1jhhhKThjhhubh)}(hORefer to ena_admin_defs.h for the list of supported Get/Set Feature properties.h]hORefer to ena_admin_defs.h for the list of supported Get/Set Feature properties.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hjhhubh)}(hXThe Asynchronous Event Notification Queue (AENQ) is a uni-directional queue used by the ENA device to send to the driver events that cannot be reported using ACQ. AENQ events are subdivided into groups. Each group may have multiple syndromes, as shown belowh]hXThe Asynchronous Event Notification Queue (AENQ) is a uni-directional queue used by the ENA device to send to the driver events that cannot be reported using ACQ. AENQ events are subdivided into groups. Each group may have multiple syndromes, as shown below}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hjhhubh)}(hThe events are:h]hThe events are:}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehjhhubjf)}(hhh]jk)}(hhh](jp)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1johjubjp)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1johjubhthead)}(hhh]j)}(hhh](j)}(hhh]h)}(hGrouph]hGroup}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hSyndromeh]hSyndrome}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hLink state changeh]hLink state change}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h**X**h]hstrong)}(hjh]hX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKjhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h Fatal errorh]h Fatal error}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKkhj"ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h**X**h]j)}(hj>h]hX}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1hhhhKkhj9ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h Notificationh]h Notification}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhjbubah}(h]h ]h"]h$]h&]uh1jhj_ubj)}(hhh]h)}(hSuspend traffich]hSuspend traffic}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhjyubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h Notificationh]h Notification}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hResume traffich]hResume traffic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h Keep-Aliveh]h Keep-Alive}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h**X**h]j)}(hjh]hX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKnhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jjhj~ubah}(h]h ]h"]h$]h&]uh1jehjhhhhhNubh)}(h)ACQ and AENQ share the same MSI-X vector.h]h)ACQ and AENQ share the same MSI-X vector.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhjhhubh)}(hXBKeep-Alive is a special mechanism that allows monitoring the device's health. A Keep-Alive event is delivered by the device every second. The driver maintains a watchdog (WD) handler which logs the current state and statistics. If the keep-alive events aren't delivered as expected the WD resets the device and the driver.h]hXFKeep-Alive is a special mechanism that allows monitoring the device’s health. A Keep-Alive event is delivered by the device every second. The driver maintains a watchdog (WD) handler which logs the current state and statistics. If the keep-alive events aren’t delivered as expected the WD resets the device and the driver.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshjhhubeh}(h]management-interfaceah ]h"]management interface:ah$]h&]uh1hhhhhhhhK>ubh)}(hhh](h)}(hData Path Interfaceh]hData Path Interface}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhhhhhKzubh)}(hI/O operations are based on Tx and Rx Submission Queues (Tx SQ and Rx SQ correspondingly). Each SQ has a completion queue (CQ) associated with it.h]hI/O operations are based on Tx and Rx Submission Queues (Tx SQ and Rx SQ correspondingly). Each SQ has a completion queue (CQ) associated with it.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hjDhhubh)}(hRThe SQs and CQs are implemented as descriptor rings in contiguous physical memory.h]hRThe SQs and CQs are implemented as descriptor rings in contiguous physical memory.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjDhhubh)}(h=The ENA driver supports two Queue Operation modes for Tx SQs:h]h=The ENA driver supports two Queue Operation modes for Tx SQs:}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjDhhubj)}(hhh](j)}(h**Regular mode:** In this mode the Tx SQs reside in the host's memory. The ENA device fetches the ENA Tx descriptors and packet data from host memory. h]h)}(h**Regular mode:** In this mode the Tx SQs reside in the host's memory. The ENA device fetches the ENA Tx descriptors and packet data from host memory.h](j)}(h**Regular mode:**h]h Regular mode:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh In this mode the Tx SQs reside in the host’s memory. The ENA device fetches the ENA Tx descriptors and packet data from host memory.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hX7**Low Latency Queue (LLQ) mode or "push-mode":** In this mode the driver pushes the transmit descriptors and the first 96 bytes of the packet directly to the ENA device memory space. The rest of the packet payload is fetched by the device. For this operation mode, the driver uses a dedicated PCI device memory BAR, which is mapped with write-combine capability. **Note that** not all ENA devices support LLQ, and this feature is negotiated with the device upon initialization. If the ENA device does not support LLQ mode, the driver falls back to the regular mode. h](h)}(hXj**Low Latency Queue (LLQ) mode or "push-mode":** In this mode the driver pushes the transmit descriptors and the first 96 bytes of the packet directly to the ENA device memory space. The rest of the packet payload is fetched by the device. For this operation mode, the driver uses a dedicated PCI device memory BAR, which is mapped with write-combine capability.h](j)}(h0**Low Latency Queue (LLQ) mode or "push-mode":**h]h0Low Latency Queue (LLQ) mode or “push-mode”:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhX: In this mode the driver pushes the transmit descriptors and the first 96 bytes of the packet directly to the ENA device memory space. The rest of the packet payload is fetched by the device. For this operation mode, the driver uses a dedicated PCI device memory BAR, which is mapped with write-combine capability.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h**Note that** not all ENA devices support LLQ, and this feature is negotiated with the device upon initialization. If the ENA device does not support LLQ mode, the driver falls back to the regular mode.h](j)}(h **Note that**h]h Note that}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh not all ENA devices support LLQ, and this feature is negotiated with the device upon initialization. If the ENA device does not support LLQ mode, the driver falls back to the regular mode.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]jXjYuh1jhhhKhjDhhubh)}(h)The Rx SQs support only the regular mode.h]h)The Rx SQs support only the regular mode.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjDhhubh)}(hNThe driver supports multi-queue for both Tx and Rx. This has various benefits:h]hNThe driver supports multi-queue for both Tx and Rx. This has various benefits:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjDhhubj)}(hhh](j)}(hDReduced CPU/thread/process contention on a given Ethernet interface.h]h)}(hjh]hDReduced CPU/thread/process contention on a given Ethernet interface.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(hmCache miss rate on completion is reduced, particularly for data cache lines that hold the sk_buff structures.h]h)}(hmCache miss rate on completion is reduced, particularly for data cache lines that hold the sk_buff structures.h]hmCache miss rate on completion is reduced, particularly for data cache lines that hold the sk_buff structures.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj&ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(hCIncreased process-level parallelism when handling received packets.h]h)}(hj@h]hCIncreased process-level parallelism when handling received packets.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj>ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(hIncreased data cache hit rate, by steering kernel processing of packets to the CPU, where the application thread consuming the packet is running.h]h)}(hIncreased data cache hit rate, by steering kernel processing of packets to the CPU, where the application thread consuming the packet is running.h]hIncreased data cache hit rate, by steering kernel processing of packets to the CPU, where the application thread consuming the packet is running.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjUubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(h$In hardware interrupt re-direction. h]h)}(h#In hardware interrupt re-direction.h]h#In hardware interrupt re-direction.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjmubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubeh}(h]h ]h"]h$]h&]jXjYuh1jhhhKhjDhhubeh}(h]data-path-interfaceah ]h"]data path interfaceah$]h&]uh1hhhhhhhhKzubh)}(hhh](h)}(hInterrupt Modesh]hInterrupt Modes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hThe driver assigns a single MSI-X vector per queue pair (for both Tx and Rx directions). The driver assigns an additional dedicated MSI-X vector for management (for ACQ and AENQ).h]hThe driver assigns a single MSI-X vector per queue pair (for both Tx and Rx directions). The driver assigns an additional dedicated MSI-X vector for management (for ACQ and AENQ).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX$Management interrupt registration is performed when the Linux kernel probes the adapter, and it is de-registered when the adapter is removed. I/O queue interrupt registration is performed when the Linux interface of the adapter is opened, and it is de-registered when the interface is closed.h]hX$Management interrupt registration is performed when the Linux kernel probes the adapter, and it is de-registered when the adapter is removed. I/O queue interrupt registration is performed when the Linux interface of the adapter is opened, and it is de-registered when the interface is closed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h#The management interrupt is named::h]h"The management interrupt is named:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh literal_block)}(h,ena-mgmnt@pci:h]h,ena-mgmnt@pci:}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjhhubh)}(h0and for each queue pair, an interrupt is named::h]h/and for each queue pair, an interrupt is named:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(h$-Tx-Rx-h]h$-Tx-Rx-}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjhhubh)}(hXThe ENA device operates in auto-mask and auto-clear interrupt modes. That is, once MSI-X is delivered to the host, its Cause bit is automatically cleared and the interrupt is masked. The interrupt is unmasked by the driver after NAPI processing is complete.h]hXThe ENA device operates in auto-mask and auto-clear interrupt modes. That is, once MSI-X is delivered to the host, its Cause bit is automatically cleared and the interrupt is masked. The interrupt is unmasked by the driver after NAPI processing is complete.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]interrupt-modesah ]h"]interrupt modesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hInterrupt Moderationh]hInterrupt Moderation}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hXENA driver and device can operate in conventional or adaptive interrupt moderation mode.h]hXENA driver and device can operate in conventional or adaptive interrupt moderation mode.}(hj! hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hX**In conventional mode** the driver instructs device to postpone interrupt posting according to static interrupt delay value. The interrupt delay value can be configured through `ethtool(8)`. The following `ethtool` parameters are supported by the driver: ``tx-usecs``, ``rx-usecs``h](j)}(h**In conventional mode**h]hIn conventional mode}(hj3 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ ubh the driver instructs device to postpone interrupt posting according to static interrupt delay value. The interrupt delay value can be configured through }(hj/ hhhNhNubhtitle_reference)}(h `ethtool(8)`h]h ethtool(8)}(hjG hhhNhNubah}(h]h ]h"]h$]h&]uh1jE hj/ ubh. The following }(hj/ hhhNhNubjF )}(h `ethtool`h]hethtool}(hjY hhhNhNubah}(h]h ]h"]h$]h&]uh1jE hj/ ubh) parameters are supported by the driver: }(hj/ hhhNhNubhliteral)}(h ``tx-usecs``h]htx-usecs}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1jk hj/ ubh, }(hj/ hhhNhNubjl )}(h ``rx-usecs``h]hrx-usecs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jk hj/ ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h**In adaptive interrupt** moderation mode the interrupt delay value is updated by the driver dynamically and adjusted every NAPI cycle according to the traffic nature.h](j)}(h**In adaptive interrupt**h]hIn adaptive interrupt}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh moderation mode the interrupt delay value is updated by the driver dynamically and adjusted every NAPI cycle according to the traffic nature.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hgAdaptive coalescing can be switched on/off through `ethtool(8)`'s :code:`adaptive_rx on|off` parameter.h](h3Adaptive coalescing can be switched on/off through }(hj hhhNhNubjF )}(h `ethtool(8)`h]h ethtool(8)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jE hj ubh’s }(hj hhhNhNubjl )}(h:code:`adaptive_rx on|off`h]hadaptive_rx on|off}(hj hhhNhNubah}(h]h ]codeah"]h$]h&]languagehuh1jk hj ubh parameter.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hoMore information about Adaptive Interrupt Moderation (DIM) can be found in Documentation/networking/net_dim.rsth]hoMore information about Adaptive Interrupt Moderation (DIM) can be found in Documentation/networking/net_dim.rst}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubhtarget)}(h.. _`RX copybreak`:h]h}(h]h ]h"]h$]h&]refid rx-copybreakuh1j hKhj hhhh referencedKubeh}(h]interrupt-moderationah ]h"]interrupt moderationah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h RX copybreakh]h RX copybreak}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hThe rx_copybreak is initialized by default to ENA_DEFAULT_RX_COPYBREAK and can be configured by the ETHTOOL_STUNABLE command of the SIOCETHTOOL ioctl.h]hThe rx_copybreak is initialized by default to ENA_DEFAULT_RX_COPYBREAK and can be configured by the ETHTOOL_STUNABLE command of the SIOCETHTOOL ioctl.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hThis option controls the maximum packet length for which the RX descriptor it was received on would be recycled. When a packet smaller than RX copybreak bytes is received, it is copied into a new memory buffer and the RX descriptor is returned to HW.h]hThis option controls the maximum packet length for which the RX descriptor it was received on would be recycled. When a packet smaller than RX copybreak bytes is received, it is copied into a new memory buffer and the RX descriptor is returned to HW.}(hj' hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubeh}(h](j id1eh ]h"] rx copybreakah$] rx copybreakah&]uh1hhhhhhhhKj Kexpect_referenced_by_name}j: j sexpect_referenced_by_id}j j subh)}(hhh](h)}(h Statisticsh]h Statistics}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjB hhhhhKubh)}(hThe user can obtain ENA device and driver statistics using `ethtool`. The driver can collect regular or extended statistics (including per-queue stats) from the device.h](h;The user can obtain ENA device and driver statistics using }(hjS hhhNhNubjF )}(h `ethtool`h]hethtool}(hj[ hhhNhNubah}(h]h ]h"]h$]h&]uh1jE hjS ubhd. The driver can collect regular or extended statistics (including per-queue stats) from the device.}(hjS hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjB hhubh)}(hBIn addition the driver logs the stats to syslog upon device reset.h]hBIn addition the driver logs the stats to syslog upon device reset.}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjB hhubh)}(hXOn supported instance types, the statistics will also include the ENA Express data (fields prefixed with `ena_srd`). For a complete documentation of ENA Express data refer to https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ena-express.html#ena-express-monitorh](hiOn supported instance types, the statistics will also include the ENA Express data (fields prefixed with }(hj hhhNhNubjF )}(h `ena_srd`h]hena_srd}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jE hj ubh=). For a complete documentation of ENA Express data refer to }(hj hhhNhNubh reference)}(hXhttps://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ena-express.html#ena-express-monitorh]hXhttps://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ena-express.html#ena-express-monitor}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurij uh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjB hhubeh}(h] statisticsah ]h"] statisticsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hMTUh]hMTU}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hThe driver supports an arbitrarily large MTU with a maximum that is negotiated with the device. The driver configures MTU using the SetFeature command (ENA_ADMIN_MTU property). The user can change MTU via `ip(8)` and similar legacy tools.h](hThe driver supports an arbitrarily large MTU with a maximum that is negotiated with the device. The driver configures MTU using the SetFeature command (ENA_ADMIN_MTU property). The user can change MTU via }(hj hhhNhNubjF )}(h`ip(8)`h]hip(8)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jE hj ubh and similar legacy tools.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubeh}(h]mtuah ]h"]mtuah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hStateless Offloadsh]hStateless Offloads}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hThe ENA driver supports:h]hThe ENA driver supports:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj)}(hhh](j)}(hIPv4 header checksum offloadh]h)}(hj h]hIPv4 header checksum offload}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj)}(h)TCP/UDP over IPv4/IPv6 checksum offloads h]h)}(h(TCP/UDP over IPv4/IPv6 checksum offloadsh]h(TCP/UDP over IPv4/IPv6 checksum offloads}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj, ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubeh}(h]h ]h"]h$]h&]jXjYuh1jhhhKhj hhubeh}(h]stateless-offloadsah ]h"]stateless offloadsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hRSSh]hRSS}(hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjR hhhhhKubj)}(hhh](j)}(hEThe ENA device supports RSS that allows flexible Rx traffic steering.h]h)}(hEThe ENA device supports RSS that allows flexible Rx traffic steering.h]hEThe ENA device supports RSS that allows flexible Rx traffic steering.}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjf ubah}(h]h ]h"]h$]h&]uh1jhjc hhhhhNubj)}(h0Toeplitz and CRC32 hash functions are supported.h]h)}(hj h]h0Toeplitz and CRC32 hash functions are supported.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj~ ubah}(h]h ]h"]h$]h&]uh1jhjc hhhhhNubj)}(hYDifferent combinations of L2/L3/L4 fields can be configured as inputs for hash functions.h]h)}(hYDifferent combinations of L2/L3/L4 fields can be configured as inputs for hash functions.h]hYDifferent combinations of L2/L3/L4 fields can be configured as inputs for hash functions.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjc hhhhhNubj)}(hThe driver configures RSS settings using the AQ SetFeature command (ENA_ADMIN_RSS_HASH_FUNCTION, ENA_ADMIN_RSS_HASH_INPUT and ENA_ADMIN_RSS_INDIRECTION_TABLE_CONFIG properties).h]h)}(hThe driver configures RSS settings using the AQ SetFeature command (ENA_ADMIN_RSS_HASH_FUNCTION, ENA_ADMIN_RSS_HASH_INPUT and ENA_ADMIN_RSS_INDIRECTION_TABLE_CONFIG properties).h]hThe driver configures RSS settings using the AQ SetFeature command (ENA_ADMIN_RSS_HASH_FUNCTION, ENA_ADMIN_RSS_HASH_INPUT and ENA_ADMIN_RSS_INDIRECTION_TABLE_CONFIG properties).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjc hhhhhNubj)}(hIf the NETIF_F_RXHASH flag is set, the 32-bit result of the hash function delivered in the Rx CQ descriptor is set in the received SKB.h]h)}(hIf the NETIF_F_RXHASH flag is set, the 32-bit result of the hash function delivered in the Rx CQ descriptor is set in the received SKB.h]hIf the NETIF_F_RXHASH flag is set, the 32-bit result of the hash function delivered in the Rx CQ descriptor is set in the received SKB.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jhjc hhhhhNubj)}(hjThe user can provide a hash key, hash function, and configure the indirection table through `ethtool(8)`. h]h)}(hiThe user can provide a hash key, hash function, and configure the indirection table through `ethtool(8)`.h](h\The user can provide a hash key, hash function, and configure the indirection table through }(hj hhhNhNubjF )}(h `ethtool(8)`h]h ethtool(8)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jE hj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jhjc hhhhhNubeh}(h]h ]h"]h$]h&]jXjYuh1jhhhMhjR hhubeh}(h]rssah ]h"]rssah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h DATA PATHh]h DATA PATH}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hhh](h)}(hTxh]hTx}(hj) hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj& hhhhhMubh)}(hR:code:`ena_start_xmit()` is called by the stack. This function does the following:h](jl )}(h:code:`ena_start_xmit()`h]hena_start_xmit()}(hj; hhhNhNubah}(h]h ]j ah"]h$]h&]languagehuh1jk hj7 ubh: is called by the stack. This function does the following:}(hj7 hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj& hhubj)}(hhh](j)}(h,Maps data buffers (``skb->data`` and frags).h]h)}(hjY h](hMaps data buffers (}(hj[ hhhNhNubjl )}(h ``skb->data``h]h skb->data}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1jk hj[ ubh and frags).}(hj[ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjW ubah}(h]h ]h"]h$]h&]uh1jhjT hhhhhNubj)}(hVPopulates ``ena_buf`` for the push buffer (if the driver and device are in push mode).h]h)}(hVPopulates ``ena_buf`` for the push buffer (if the driver and device are in push mode).h](h Populates }(hj hhhNhNubjl )}(h ``ena_buf``h]hena_buf}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jk hj ubhA for the push buffer (if the driver and device are in push mode).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjT hhhhhNubj)}(h*Prepares ENA bufs for the remaining frags.h]h)}(hj h]h*Prepares ENA bufs for the remaining frags.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjT hhhhhNubj)}(hAllocates a new request ID from the empty ``req_id`` ring. The request ID is the index of the packet in the Tx info. This is used for out-of-order Tx completions.h]h)}(hAllocates a new request ID from the empty ``req_id`` ring. The request ID is the index of the packet in the Tx info. This is used for out-of-order Tx completions.h](h*Allocates a new request ID from the empty }(hj hhhNhNubjl )}(h ``req_id``h]hreq_id}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jk hj ubhn ring. The request ID is the index of the packet in the Tx info. This is used for out-of-order Tx completions.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjT hhhhhNubj)}(h3Adds the packet to the proper place in the Tx ring.h]h)}(hj h]h3Adds the packet to the proper place in the Tx ring.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjT hhhhhNubj)}(hXCalls :code:`ena_com_prepare_tx()`, an ENA communication layer that converts the ``ena_bufs`` to ENA descriptors (and adds meta ENA descriptors as needed). * This function also copies the ENA descriptors and the push buffer to the Device memory space (if in push mode). h](h)}(hCalls :code:`ena_com_prepare_tx()`, an ENA communication layer that converts the ``ena_bufs`` to ENA descriptors (and adds meta ENA descriptors as needed).h](hCalls }(hj hhhNhNubjl )}(h:code:`ena_com_prepare_tx()`h]hena_com_prepare_tx()}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]languagehuh1jk hj ubh/, an ENA communication layer that converts the }(hj hhhNhNubjl )}(h ``ena_bufs``h]hena_bufs}(hj! hhhNhNubah}(h]h ]h"]h$]h&]uh1jk hj ubh> to ENA descriptors (and adds meta ENA descriptors as needed).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hhh]j)}(hpThis function also copies the ENA descriptors and the push buffer to the Device memory space (if in push mode). h]h)}(hoThis function also copies the ENA descriptors and the push buffer to the Device memory space (if in push mode).h]hoThis function also copies the ENA descriptors and the push buffer to the Device memory space (if in push mode).}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj< ubah}(h]h ]h"]h$]h&]uh1jhj9 ubah}(h]h ]h"]h$]h&]jX*uh1jhhhM#hj ubeh}(h]h ]h"]h$]h&]uh1jhjT hhhNhNubj)}(h$Writes a doorbell to the ENA device.h]h)}(hjc h]h$Writes a doorbell to the ENA device.}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hja ubah}(h]h ]h"]h$]h&]uh1jhjT hhhhhNubj)}(hRWhen the ENA device finishes sending the packet, a completion interrupt is raised.h]h)}(hRWhen the ENA device finishes sending the packet, a completion interrupt is raised.h]hRWhen the ENA device finishes sending the packet, a completion interrupt is raised.}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hjx ubah}(h]h ]h"]h$]h&]uh1jhjT hhhhhNubj)}(h%The interrupt handler schedules NAPI.h]h)}(hj h]h%The interrupt handler schedules NAPI.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hj ubah}(h]h ]h"]h$]h&]uh1jhjT hhhhhNubj)}(hXThe :code:`ena_clean_tx_irq()` function is called. This function handles the completion descriptors generated by the ENA, with a single completion descriptor per completed packet. * ``req_id`` is retrieved from the completion descriptor. The ``tx_info`` of the packet is retrieved via the ``req_id``. The data buffers are unmapped and ``req_id`` is returned to the empty ``req_id`` ring. * The function stops when the completion descriptors are completed or the budget is reached. h](h)}(hThe :code:`ena_clean_tx_irq()` function is called. This function handles the completion descriptors generated by the ENA, with a single completion descriptor per completed packet.h](hThe }(hj hhhNhNubjl )}(h:code:`ena_clean_tx_irq()`h]hena_clean_tx_irq()}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]languagehuh1jk hj ubh function is called. This function handles the completion descriptors generated by the ENA, with a single completion descriptor per completed packet.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM*hj ubj)}(hhh](j)}(h``req_id`` is retrieved from the completion descriptor. The ``tx_info`` of the packet is retrieved via the ``req_id``. The data buffers are unmapped and ``req_id`` is returned to the empty ``req_id`` ring.h]h)}(h``req_id`` is retrieved from the completion descriptor. The ``tx_info`` of the packet is retrieved via the ``req_id``. The data buffers are unmapped and ``req_id`` is returned to the empty ``req_id`` ring.h](jl )}(h ``req_id``h]hreq_id}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jk hj ubh2 is retrieved from the completion descriptor. The }(hj hhhNhNubjl )}(h ``tx_info``h]htx_info}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jk hj ubh$ of the packet is retrieved via the }(hj hhhNhNubjl )}(h ``req_id``h]hreq_id}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jk hj ubh$. The data buffers are unmapped and }(hj hhhNhNubjl )}(h ``req_id``h]hreq_id}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jk hj ubh is returned to the empty }(hj hhhNhNubjl )}(h ``req_id``h]hreq_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jk hj ubh ring.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM.hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(h[The function stops when the completion descriptors are completed or the budget is reached. h]h)}(hZThe function stops when the completion descriptors are completed or the budget is reached.h]hZThe function stops when the completion descriptors are completed or the budget is reached.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hj=ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]jXjZ uh1jhhhM.hj ubeh}(h]h ]h"]h$]h&]uh1jhjT hhhNhNubeh}(h]h ]h"]h$]h&]jXjYuh1jhhhMhj& hhubeh}(h]txah ]h"]txah$]h&]uh1hhj hhhhhMubh)}(hhh](h)}(hRxh]hRx}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohhhhhM5ubj)}(hhh](j)}(h.When a packet is received from the ENA device.h]h)}(hjh]h.When a packet is received from the ENA device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h%The interrupt handler schedules NAPI.h]h)}(hjh]h%The interrupt handler schedules NAPI.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hThe :code:`ena_clean_rx_irq()` function is called. This function calls :code:`ena_com_rx_pkt()`, an ENA communication layer function, which returns the number of descriptors used for a new packet, and zero if no new packet is found.h]h)}(hThe :code:`ena_clean_rx_irq()` function is called. This function calls :code:`ena_com_rx_pkt()`, an ENA communication layer function, which returns the number of descriptors used for a new packet, and zero if no new packet is found.h](hThe }(hjhhhNhNubjl )}(h:code:`ena_clean_rx_irq()`h]hena_clean_rx_irq()}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]languagehuh1jk hjubh) function is called. This function calls }(hjhhhNhNubjl )}(h:code:`ena_com_rx_pkt()`h]hena_com_rx_pkt()}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]languagehuh1jk hjubh, an ENA communication layer function, which returns the number of descriptors used for a new packet, and zero if no new packet is found.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM9hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hX:code:`ena_rx_skb()` checks packet length: * If the packet is small (len < rx_copybreak), the driver allocates a SKB for the new packet, and copies the packet payload into the SKB data buffer. - In this way the original data buffer is not passed to the stack and is reused for future Rx packets. * Otherwise the function unmaps the Rx buffer, sets the first descriptor as `skb`'s linear part and the other descriptors as the `skb`'s frags. h](h)}(h*:code:`ena_rx_skb()` checks packet length:h](jl )}(h:code:`ena_rx_skb()`h]h ena_rx_skb()}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]languagehuh1jk hjubh checks packet length:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM=hjubj)}(hhh](j)}(hIf the packet is small (len < rx_copybreak), the driver allocates a SKB for the new packet, and copies the packet payload into the SKB data buffer. - In this way the original data buffer is not passed to the stack and is reused for future Rx packets. h](h)}(hIf the packet is small (len < rx_copybreak), the driver allocates a SKB for the new packet, and copies the packet payload into the SKB data buffer.h]hIf the packet is small (len < rx_copybreak), the driver allocates a SKB for the new packet, and copies the packet payload into the SKB data buffer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hjubj)}(hhh]j)}(heIn this way the original data buffer is not passed to the stack and is reused for future Rx packets. h]h)}(hdIn this way the original data buffer is not passed to the stack and is reused for future Rx packets.h]hdIn this way the original data buffer is not passed to the stack and is reused for future Rx packets.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChj(ubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]jXjYuh1jhhhMChjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hOtherwise the function unmaps the Rx buffer, sets the first descriptor as `skb`'s linear part and the other descriptors as the `skb`'s frags. h]h)}(hOtherwise the function unmaps the Rx buffer, sets the first descriptor as `skb`'s linear part and the other descriptors as the `skb`'s frags.h](hJOtherwise the function unmaps the Rx buffer, sets the first descriptor as }(hjPhhhNhNubjF )}(h`skb`h]hskb}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jE hjPubh2’s linear part and the other descriptors as the }(hjPhhhNhNubjF )}(h`skb`h]hskb}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jE hjPubh ’s frags.}(hjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMFhjLubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jXjZ uh1jhhhM?hjubeh}(h]h ]h"]h$]h&]uh1jhjhhhNhNubj)}(hThe new SKB is updated with the necessary information (protocol, checksum hw verify result, etc), and then passed to the network stack, using the NAPI interface function :code:`napi_gro_receive()`. h]h)}(hThe new SKB is updated with the necessary information (protocol, checksum hw verify result, etc), and then passed to the network stack, using the NAPI interface function :code:`napi_gro_receive()`.h](hThe new SKB is updated with the necessary information (protocol, checksum hw verify result, etc), and then passed to the network stack, using the NAPI interface function }(hjhhhNhNubjl )}(h:code:`napi_gro_receive()`h]hnapi_gro_receive()}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]languagehuh1jk hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMJhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]jXjYuh1jhhhM7hjohhubeh}(h]rxah ]h"]rxah$]h&]uh1hhj hhhhhM5ubh)}(hhh](h)}(hDynamic RX Buffers (DRB)h]hDynamic RX Buffers (DRB)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMOubh)}(hXGEach RX descriptor in the RX ring is a single memory page (which is either 4KB or 16KB long depending on system's configurations). To reduce the memory allocations required when dealing with a high rate of small packets, the driver tries to reuse the remaining RX descriptor's space if more than 2KB of this page remain unused.h]hXKEach RX descriptor in the RX ring is a single memory page (which is either 4KB or 16KB long depending on system’s configurations). To reduce the memory allocations required when dealing with a high rate of small packets, the driver tries to reuse the remaining RX descriptor’s space if more than 2KB of this page remain unused.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjhhubh)}(hGA simple example of this mechanism is the following sequence of events:h]hGA simple example of this mechanism is the following sequence of events:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhjhhubj)}(hX1. Driver allocates page-sized RX buffer and passes it to hardware +----------------------+ |4KB RX Buffer | +----------------------+ 2. A 300Bytes packet is received on this buffer 3. The driver increases the ref count on this page and returns it back to HW as an RX buffer of size 4KB - 300Bytes = 3796 Bytes +----+--------------------+ |****|3796 Bytes RX Buffer| +----+--------------------+h]hX1. Driver allocates page-sized RX buffer and passes it to hardware +----------------------+ |4KB RX Buffer | +----------------------+ 2. A 300Bytes packet is received on this buffer 3. The driver increases the ref count on this page and returns it back to HW as an RX buffer of size 4KB - 300Bytes = 3796 Bytes +----+--------------------+ |****|3796 Bytes RX Buffer| +----+--------------------+}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhM[hjhhubh)}(hXThis mechanism isn't used when an XDP program is loaded, or when the RX packet is less than rx_copybreak bytes (in which case the packet is copied out of the RX buffer into the linear part of a new skb allocated for it and the RX buffer remains the same size, see `RX copybreak`_).h](hX This mechanism isn’t used when an XDP program is loaded, or when the RX packet is less than rx_copybreak bytes (in which case the packet is copied out of the RX buffer into the linear part of a new skb allocated for it and the RX buffer remains the same size, see }(hjhhhNhNubj )}(h`RX copybreak`_h]h RX copybreak}(hjhhhNhNubah}(h]h ]h"]h$]h&]name RX copybreakj j uh1j hjresolvedKubh).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhhjhhubeh}(h]dynamic-rx-buffers-drbah ]h"]dynamic rx buffers (drb)ah$]h&]uh1hhj hhhhhMOubeh}(h] data-pathah ]h"] data pathah$]h&]uh1hhhhhhhhMubeh}(h]:linux-kernel-driver-for-elastic-network-adapter-ena-familyah ]h"]jjj j j j j: j j j j j jO jL j j j8j5jljijjj0j-u nametypes}(j@jQjjAjj j j: j j jO j j8jljj0uh}(j=hjNhjjTj>jjjDj jj j j j j7 j j jB j j jL j j jR j5j jij& jjoj-ju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jsKsRparse_messages]hsystem_message)}(hhh]h)}(h/Duplicate implicit target name: "rx copybreak".h]h3Duplicate implicit target name: “rx copybreak”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]j7 alevelKtypeINFOsourcehlineKuh1jhj hhhhhKubatransform_messages] transformerN include_log] decorationNhhub.