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]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetA/translations/pt_BR/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)}(hh]h,ena-mgmnt@pci:}hj sbah}(h]h ]h"]h$]h&]hhuh1j hhhKhje hhubh)}(h0and for each queue pair, an interrupt is named::h]h/and for each queue pair, an interrupt is named:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhje hhubj )}(h$-Tx-Rx-h]h$-Tx-Rx-}hj sbah}(h]h ]h"]h$]h&]hhuh1j hhhKhje hhubh)}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhje hhubeh}(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}(hj 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)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh. The following }(hj hhhNhNubj )}(h `ethtool`h]hethtool}(hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh) parameters are supported by the driver: }(hj hhhNhNubhliteral)}(h ``tx-usecs``h]htx-usecs}(hj? hhhNhNubah}(h]h ]h"]h$]h&]uh1j= hj ubh, }(hj hhhNhNubj> )}(h ``rx-usecs``h]hrx-usecs}(hjQ hhhNhNubah}(h]h ]h"]h$]h&]uh1j= 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}(hji hhhNhNubah}(h]h ]h"]h$]h&]uh1jhje ubh moderation mode the interrupt delay value is updated by the driver dynamically and adjusted every NAPI cycle according to the traffic nature.}(hje 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 hhhNhNubj )}(h `ethtool(8)`h]h ethtool(8)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh’s }(hj hhhNhNubj> )}(h:code:`adaptive_rx on|off`h]hadaptive_rx on|off}(hj hhhNhNubah}(h]h ]codeah"]h$]h&]languagehuh1j= 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&]j rx-copybreakuh1j hKhj hhhhnj 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 hhubj )}(h .. _`PHC`:h]h}(h]h ]h"]h$]h&]jjuh1j hKhj hhhhj Kubeh}(h](j id1eh ]h"] rx copybreakah$] rx copybreakah&]uh1hhhhhhhhKj Kexpect_referenced_by_name}j j sexpect_referenced_by_id}j j subh)}(hhh](h)}(hPTP Hardware Clock (PHC)h]hPTP Hardware Clock (PHC)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubj )}(hf.. _`ptp-userspace-api`: https://docs.kernel.org/driver-api/ptp.html#ptp-hardware-clock-user-space-apih]h}(h]ptp-userspace-apiah ]h"]ptp-userspace-apiah$]h&]refuriMhttps://docs.kernel.org/driver-api/ptp.html#ptp-hardware-clock-user-space-apiuh1j hKhj hhhhj Kubj )}(hc.. _`testptp`: https://elixir.bootlin.com/linux/latest/source/tools/testing/selftests/ptp/testptp.ch]h}(h]testptpah ]h"]testptpah$]h&]j: Thttps://elixir.bootlin.com/linux/latest/source/tools/testing/selftests/ptp/testptp.cuh1j hKhj hhhhj Kubh)}(hlENA Linux driver supports PTP hardware clock providing timestamp reference to achieve nanosecond resolution.h]hlENA Linux driver supports PTP hardware clock providing timestamp reference to achieve nanosecond resolution.}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h**PHC support**h]j)}(hjY h]h PHC support}(hj[ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjW ubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hgPHC depends on the PTP module, which needs to be either loaded as a module or compiled into the kernel.h]hgPHC depends on the PTP module, which needs to be either loaded as a module or compiled into the kernel.}(hjn hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h$Verify if the PTP module is present:h]h$Verify if the PTP module is present:}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj )}(h=grep -w '^CONFIG_PTP_1588_CLOCK=[ym]' /boot/config-`uname -r`h]h=grep -w '^CONFIG_PTP_1588_CLOCK=[ym]' /boot/config-`uname -r`}hj sbah}(h]h ]h"]h$]h&]hhƌforcelanguageshellhighlight_args}uh1j hhhKhj hhubj)}(hhh]j)}(hLIf no output is provided, the ENA driver cannot be loaded with PHC support. h]h)}(hKIf no output is provided, the ENA driver cannot be loaded with PHC support.h]hKIf no output is provided, the ENA driver cannot be loaded with PHC support.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubah}(h]h ]h"]h$]h&]j*j+uh1jhhhKhj hhubh)}(h**PHC activation**h]j)}(hj h]hPHC activation}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hyThe feature is turned off by default, in order to turn the feature on, the ENA driver can be loaded in the following way:h]hyThe feature is turned off by default, in order to turn the feature on, the ENA driver can be loaded in the following way:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj)}(hhh]j)}(h devlink: h]h)}(hdevlink:h]hdevlink:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubah}(h]h ]h"]h$]h&]j*j+uh1jhhhKhj hhubj )}(hX,sudo devlink dev param set pci/ name enable_phc value true cmode driverinit sudo devlink dev reload pci/ # for example: sudo devlink dev param set pci/0000:00:06.0 name enable_phc value true cmode driverinit sudo devlink dev reload pci/0000:00:06.0h]hX,sudo devlink dev param set pci/ name enable_phc value true cmode driverinit sudo devlink dev reload pci/ # for example: sudo devlink dev param set pci/0000:00:06.0 name enable_phc value true cmode driverinit sudo devlink dev reload pci/0000:00:06.0}hj sbah}(h]h ]h"]h$]h&]hhj j shellj }uh1j hhhKhj hhubh)}(h4All available PTP clock sources can be tracked here:h]h4All available PTP clock sources can be tracked here:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj )}(hls /sys/class/ptph]hls /sys/class/ptp}hj" sbah}(h]h ]h"]h$]h&]hhj j shellj }uh1j hhhM hj hhubh)}(h;PHC support and capabilities can be verified using ethtool:h]h;PHC support and capabilities can be verified using ethtool:}(hj2 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj hhubj )}(hethtool -T h]hethtool -T }hj@ sbah}(h]h ]h"]h$]h&]hhj j shellj }uh1j hhhMhj hhubh)}(h**PHC timestamp**h]j)}(hjR h]h PHC timestamp}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjP ubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hTTo retrieve PHC timestamp, use `ptp-userspace-api`_, usage example using `testptp`_:h](hTo retrieve PHC timestamp, use }(hjg hhhNhNubj)}(h`ptp-userspace-api`_h]hptp-userspace-api}(hjo hhhNhNubah}(h]h ]h"]h$]h&]nameptp-userspace-apij: j; uh1jhjg jKubh, usage example using }(hjg hhhNhNubj)}(h `testptp`_h]htestptp}(hj hhhNhNubah}(h]h ]h"]h$]h&]nametestptpj: jH uh1jhjg jKubh:}(hjg hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj )}(h[testptp -d /dev/ptp$(ethtool -T | awk '/PTP Hardware Clock:/ {print $NF}') -k 1h]h[testptp -d /dev/ptp$(ethtool -T | awk '/PTP Hardware Clock:/ {print $NF}') -k 1}hj sbah}(h]h ]h"]h$]h&]hhj j shellj }uh1j hhhMhj hhubh)}(hX]PHC get time requests should be within reasonable bounds, avoid excessive utilization to ensure optimal performance and efficiency. The ENA device restricts the frequency of PHC get time requests to a maximum of 125 requests per second. If this limit is surpassed, the get time request will fail, leading to an increment in the phc_err_ts statistic.h]hX]PHC get time requests should be within reasonable bounds, avoid excessive utilization to ensure optimal performance and efficiency. The ENA device restricts the frequency of PHC get time requests to a maximum of 125 requests per second. If this limit is surpassed, the get time request will fail, leading to an increment in the phc_err_ts statistic.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(h**PHC statistics**h]j)}(hj h]hPHC statistics}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhM!hj hhubh)}(h0PHC can be monitored using debugfs (if mounted):h]h0PHC can be monitored using debugfs (if mounted):}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj hhubj )}(hsudo cat /sys/kernel/debug//phc_stats # for example: sudo cat /sys/kernel/debug/0000:00:06.0/phc_statsh]hsudo cat /sys/kernel/debug//phc_stats # for example: sudo cat /sys/kernel/debug/0000:00:06.0/phc_stats}hj sbah}(h]h ]h"]h$]h&]hhj j shellj }uh1j hhhM%hj hhubh)}(hmPHC errors must remain below 1% of all PHC requests to maintain the desired level of accuracy and reliabilityh]hmPHC errors must remain below 1% of all PHC requests to maintain the desired level of accuracy and reliability}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hj hhubjz)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK[uh1jhj ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h **phc_cnt**h]j)}(hj# h]hphc_cnt}(hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj! ubah}(h]h ]h"]h$]h&]uh1hhhhM/hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h line_block)}(hhh]hh)}(hANumber of successful retrieved timestamps (below expire timeout).h]hANumber of successful retrieved timestamps (below expire timeout).}(hjG hhhNhNubah}(h]h ]h"]h$]h&]uh1hindentKhjC hhhKubah}(h]h ]h"]h$]h&]uh1jA hj> ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(h **phc_exp**h]j)}(hjp h]hphc_exp}(hjr hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjn ubah}(h]h ]h"]h$]h&]uh1hhhhM0hjk ubah}(h]h ]h"]h$]h&]uh1jhjh ubj)}(hhh]jB )}(hhh]jF )}(h>Number of expired retrieved timestamps (above expire timeout).h]h>Number of expired retrieved timestamps (above expire timeout).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hjU Khj hhhKubah}(h]h ]h"]h$]h&]uh1jA hj ubah}(h]h ]h"]h$]h&]uh1jhjh ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(h **phc_skp**h]j)}(hj h]hphc_skp}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhM1hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]jB )}(hhh]jF )}(h:Number of skipped get time attempts (during block period).h]h:Number of skipped get time attempts (during block period).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hjU Khj hhhKubah}(h]h ]h"]h$]h&]uh1jA hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(h**phc_err_dv**h]j)}(hjh]h phc_err_dv}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhM2hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]jB )}(hhh]jF )}(hTNumber of failed get time attempts due to device errors (entering into block state).h]hTNumber of failed get time attempts due to device errors (entering into block state).}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hjU Khj hhhKubah}(h]h ]h"]h$]h&]uh1jA hjubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(h**phc_err_ts**h]j)}(hjKh]h phc_err_ts}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]uh1hhhhM3hjFubah}(h]h ]h"]h$]h&]uh1jhjCubj)}(hhh]jB )}(hhh](jF )}(hWNumber of failed get time attempts due to timestamp errors (entering into block state),h]hWNumber of failed get time attempts due to timestamp errors (entering into block state),}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hjU KhjihhhKubjF )}(hYThis occurs if driver exceeded the request limit or device received an invalid timestamp.h]hYThis occurs if driver exceeded the request limit or device received an invalid timestamp.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hjU KhjihhhKubeh}(h]h ]h"]h$]h&]uh1jA hjfubah}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]colsKuh1j~hj ubah}(h]h ]h"]h$]h&]uh1jyhj hhhNhNubh)}(h PHC timeouts:h]h PHC timeouts:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hj hhubjz)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKLuh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h **expire**h]j)}(hjh]hexpire}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhM:hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]jB )}(hhh](jF )}(hJMax time for a valid timestamp retrieval, passing this threshold will failh]hJMax time for a valid timestamp retrieval, passing this threshold will fail}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hjU KhjhhhKubjF )}(h@the get time request and block new requests until block timeout.h]h@the get time request and block new requests until block timeout.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hjU KhjhhhKubeh}(h]h ]h"]h$]h&]uh1jA hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h **block**h]j)}(hj7h]hblock}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1hhhhM<hj2ubah}(h]h ]h"]h$]h&]uh1jhj/ubj)}(hhh]jB )}(hhh](jF )}(h>Blocking period starts once get time request expires or fails,h]h>Blocking period starts once get time request expires or fails,}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hjU KhjUhhhKubjF )}(h:all get time requests during block period will be skipped.h]h:all get time requests during block period will be skipped.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hjU KhjUhhhKubeh}(h]h ]h"]h$]h&]uh1jA hjRubah}(h]h ]h"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1j~hjubah}(h]h ]h"]h$]h&]uh1jyhj hhhNhNubeh}(h](ptp-hardware-clock-phcjeh ]h"](ptp hardware clock (phc)phceh$]h&]uh1hhhhhhhhKj }jj sj }jj sj Kubh)}(hhh](h)}(h Statisticsh]h Statistics}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMAubh)}(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 }(hjhhhNhNubj )}(h `ethtool`h]hethtool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubhd. The driver can collect regular or extended statistics (including per-queue stats) from the device.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMChjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhjhhubh)}(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 }(hjhhhNhNubj )}(h `ena_srd`h]hena_srd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh=). For a complete documentation of ENA Express data refer to }(hjhhhNhNubj)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhMIhjhhubeh}(h] statisticsah ]h"] statisticsah$]h&]uh1hhhhhhhhMAubh)}(hhh](h)}(hMTUh]hMTU}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMOubh)}(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+hhhNhNubj )}(h`ip(8)`h]hip(8)}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj+ubh and similar legacy tools.}(hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMQhjhhubeh}(h]mtuah ]h"]mtuah$]h&]uh1hhhhhhhhMOubh)}(hhh](h)}(hStateless Offloadsh]hStateless Offloads}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShhhhhMWubh)}(hThe ENA driver supports:h]hThe ENA driver supports:}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhjShhubj)}(hhh](j)}(hIPv4 header checksum offloadh]h)}(hjwh]hIPv4 header checksum offload}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hjuubah}(h]h ]h"]h$]h&]uh1jhjrhhhhhNubj)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hjubah}(h]h ]h"]h$]h&]uh1jhjrhhhhhNubeh}(h]h ]h"]h$]h&]j*j+uh1jhhhM[hjShhubeh}(h]stateless-offloadsah ]h"]stateless offloadsah$]h&]uh1hhhhhhhhMWubh)}(hhh](h)}(hRSSh]hRSS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM_ubj)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h0Toeplitz and CRC32 hash functions are supported.h]h)}(hjh]h0Toeplitz and CRC32 hash functions are supported.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMchjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhj ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(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&]uh1hhhhMihj%ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(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 }(hjAhhhNhNubj )}(h `ethtool(8)`h]h ethtool(8)}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjAubh.}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMlhj=ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]j*j+uh1jhhhMahjhhubeh}(h]rssah ]h"]rssah$]h&]uh1hhhhhhhhM_ubh)}(hhh](h)}(hDEVLINK SUPPORTh]hDEVLINK SUPPORT}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhhhhhMpubj )}(hS.. _`devlink`: https://www.kernel.org/doc/html/latest/networking/devlink/index.htmlh]h}(h]devlinkah ]h"]devlinkah$]h&]j: Dhttps://www.kernel.org/doc/html/latest/networking/devlink/index.htmluh1j hMqhjuhhhhj Kubh)}(hZ`devlink`_ supports reloading the driver and initiating re-negotiation with the ENA deviceh](j)}(h `devlink`_h]hdevlink}(hjhhhNhNubah}(h]h ]h"]h$]h&]namedevlinkj: juh1jhjjKubhP supports reloading the driver and initiating re-negotiation with the ENA device}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMshjuhhubj )}(hnsudo devlink dev reload pci/ # for example: sudo devlink dev reload pci/0000:00:06.0h]hnsudo devlink dev reload pci/ # for example: sudo devlink dev reload pci/0000:00:06.0}hjsbah}(h]h ]h"]h$]h&]hhj j shellj }uh1j hhhMuhjuhhubeh}(h]devlink-supportah ]h"]devlink supportah$]h&]uh1hhhhhhhhMpubh)}(hhh](h)}(h DATA PATHh]h DATA PATH}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM|ubh)}(hhh](h)}(hTxh]hTx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hR:code:`ena_start_xmit()` is called by the stack. This function does the following:h](j> )}(h:code:`ena_start_xmit()`h]hena_start_xmit()}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]languagehuh1j= hjubh: is called by the stack. This function does the following:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(hhh](j)}(h,Maps data buffers (``skb->data`` and frags).h]h)}(hj h](hMaps data buffers (}(hjhhhNhNubj> )}(h ``skb->data``h]h skb->data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j= hjubh and frags).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(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 }(hj8hhhNhNubj> )}(h ``ena_buf``h]hena_buf}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j= hj8ubhA for the push buffer (if the driver and device are in push mode).}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h*Prepares ENA bufs for the remaining frags.h]h)}(hj`h]h*Prepares ENA bufs for the remaining frags.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj^ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(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 }(hjyhhhNhNubj> )}(h ``req_id``h]hreq_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j= hjyubhn ring. The request ID is the index of the packet in the Tx info. This is used for out-of-order Tx completions.}(hjyhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjuubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h3Adds the packet to the proper place in the Tx ring.h]h)}(hjh]h3Adds the packet to the proper place in the Tx ring.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(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 }(hjhhhNhNubj> )}(h:code:`ena_com_prepare_tx()`h]hena_com_prepare_tx()}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]languagehuh1j= hjubh/, an ENA communication layer that converts the }(hjhhhNhNubj> )}(h ``ena_bufs``h]hena_bufs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j= hjubh> to ENA descriptors (and adds meta ENA descriptors as needed).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]j**uh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhNhNubj)}(h$Writes a doorbell to the ENA device.h]h)}(hjh]h$Writes a doorbell to the ENA device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(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.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h%The interrupt handler schedules NAPI.h]h)}(hjFh]h%The interrupt handler schedules NAPI.}(hjHhhhNhNubah}(h=]h ]h"]h$]h&]uh1hhhhMhjDubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(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_hhhNhNubj> )}(h:code:`ena_clean_tx_irq()`h]hena_clean_tx_irq()}(hjghhhNhNubah}(h]h ]j ah"]h$]h&]languagehuh1j= 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&]uh1hhhhMhj[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](j> )}(h ``req_id``h]hreq_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j= hjubh2 is retrieved from the completion descriptor. The }(hjhhhNhNubj> )}(h ``tx_info``h]htx_info}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j= hjubh$ of the packet is retrieved via the }(hjhhhNhNubj> )}(h ``req_id``h]hreq_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j= hjubh$. The data buffers are unmapped and }(hjhhhNhNubj> )}(h ``req_id``h]hreq_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j= hjubh is returned to the empty }(hjhhhNhNubj> )}(h ``req_id``h]hreq_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j= hjubh ring.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]j*juh1jhhhMhj[ubeh}(h]h ]h"]h$]h&]uh1jhjhhhNhNubeh}(h]h ]h"]h$]h&]j*j+uh1jhhhMhjhhubeh}(h]txah ]h"]txah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(hRxh]hRx}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hhhhhMubj)}(hhh](j)}(h.When a packet is received from the ENA device.h]h)}(hj9h]h.When a packet is received from the ENA device.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7ubah}(h]h ]h"]h$]h&]uh1jhj4hhhhhNubj)}(h%The interrupt handler schedules NAPI.h]h)}(hjPh]h%The interrupt handler schedules NAPI.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNubah}(h]h ]h"]h$]h&]uh1jhj4hhhhhNubj)}(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 }(hjihhhNhNubj> )}(h:code:`ena_clean_rx_irq()`h]hena_clean_rx_irq()}(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]languagehuh1j= hjiubh) function is called. This function calls }(hjihhhNhNubj> )}(h:code:`ena_com_rx_pkt()`h]hena_com_rx_pkt()}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]languagehuh1j= hjiubh, an ENA communication layer function, which returns the number of descriptors used for a new packet, and zero if no new packet is found.}(hjihhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjeubah}(h]h ]h"]h$]h&]uh1jhj4hhhhhNubj)}(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](j> )}(h:code:`ena_rx_skb()`h]h ena_rx_skb()}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]languagehuh1j= hjubh checks packet length:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(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&]uh1hhhhMhjubj)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]j*j+uh1jhhhMhjubeh}(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 }(hjhhhNhNubj )}(h`skb`h]hskb}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh2’s linear part and the other descriptors as the }(hjhhhNhNubj )}(h`skb`h]hskb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh ’s frags.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]j*juh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhj4hhhNhNubj)}(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 }(hjLhhhNhNubj> )}(h:code:`napi_gro_receive()`h]hnapi_gro_receive()}(hjThhhNhNubah}(h]h ]j ah"]h$]h&]languagehuh1j= hjLubh.}(hjLhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjHubah}(h]h ]h"]h$]h&]uh1jhj4hhhhhNubeh}(h]h ]h"]h$]h&]j*j+uh1jhhhMhj#hhubeh}(h]rxah ]h"]rxah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(hDynamic RX Buffers (DRB)h]hDynamic RX Buffers (DRB)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(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&]uh1hhhhMhjhhubh)}(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&]uh1hhhhMhjhhubj )}(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&]hhuh1j hhhMhjhhubh)}(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 copybreakjj uh1jhjjKubh).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]dynamic-rx-buffers-drbah ]h"]dynamic rx buffers (drb)ah$]h&]uh1hhjhhhhhMubeh}(h] data-pathah ]h"] data pathah$]h&]uh1hhhhhhhhM|ubeh}(h]:linux-kernel-driver-for-elastic-network-adapter-ena-familyah ]h"]