€•ÍoŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ./translations/zh_CN/networking/xsk-tx-metadata”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/zh_TW/networking/xsk-tx-metadata”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/it_IT/networking/xsk-tx-metadata”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/ja_JP/networking/xsk-tx-metadata”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/ko_KR/networking/xsk-tx-metadata”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/pt_BR/networking/xsk-tx-metadata”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/sp_SP/networking/xsk-tx-metadata”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒH/var/lib/git/docbuild/linux/Documentation/networking/xsk-tx-metadata.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒAF_XDP TX Metadata”h]”hŒAF_XDP TX Metadata”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)”}”(hŒ²This document describes how to enable offloads when transmitting packets via :doc:`af_xdp`. Refer to :doc:`xdp-rx-metadata` on how to access similar metadata on the receive side.”h]”(hŒMThis document describes how to enable offloads when transmitting packets via ”…””}”(hhßh²hh³Nh´Nubh)”}”(hŒ :doc:`af_xdp`”h]”hŒinline”“”)”}”(hhéh]”hŒaf_xdp”…””}”(hhíh²hh³Nh´Nubah}”(h]”h ]”(Œxref”Œstd”Œstd-doc”eh"]”h$]”h&]”uh1hëhhçubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œnetworking/xsk-tx-metadata”Œ refdomain”høŒreftype”Œdoc”Œ refexplicit”‰Œrefwarn”ˆŒ reftarget”Œaf_xdp”uh1hh³hÇh´KhhßubhŒ . Refer to ”…””}”(hhßh²hh³Nh´Nubh)”}”(hŒ:doc:`xdp-rx-metadata`”h]”hì)”}”(hjh]”hŒxdp-rx-metadata”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”(h÷Œstd”Œstd-doc”eh"]”h$]”h&]”uh1hëhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒreftype”Œdoc”Œ refexplicit”‰Œrefwarn”ˆj Œxdp-rx-metadata”uh1hh³hÇh´KhhßubhŒ7 on how to access similar metadata on the receive side.”…””}”(hhßh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒGeneral Design”h]”hŒGeneral Design”…””}”(hj=h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj:h²hh³hÇh´K ubhÞ)”}”(hX¬The headroom for the metadata is reserved via ``tx_metadata_len`` and ``XDP_UMEM_TX_METADATA_LEN`` flag in ``struct xdp_umem_reg``. The metadata length is therefore the same for every socket that shares the same umem. The metadata layout is a fixed UAPI, refer to ``union xsk_tx_metadata`` in ``include/uapi/linux/if_xdp.h``. Thus, generally, the ``tx_metadata_len`` field above should contain ``sizeof(union xsk_tx_metadata)``.”h]”(hŒ.The headroom for the metadata is reserved via ”…””}”(hjKh²hh³Nh´NubhŒliteral”“”)”}”(hŒ``tx_metadata_len``”h]”hŒtx_metadata_len”…””}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjKubhŒ and ”…””}”(hjKh²hh³Nh´NubjT)”}”(hŒ``XDP_UMEM_TX_METADATA_LEN``”h]”hŒXDP_UMEM_TX_METADATA_LEN”…””}”(hjgh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjKubhŒ flag in ”…””}”(hjKh²hh³Nh´NubjT)”}”(hŒ``struct xdp_umem_reg``”h]”hŒstruct xdp_umem_reg”…””}”(hjyh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjKubhŒ†. The metadata length is therefore the same for every socket that shares the same umem. The metadata layout is a fixed UAPI, refer to ”…””}”(hjKh²hh³Nh´NubjT)”}”(hŒ``union xsk_tx_metadata``”h]”hŒunion xsk_tx_metadata”…””}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjKubhŒ in ”…””}”(hjKh²hh³Nh´NubjT)”}”(hŒ``include/uapi/linux/if_xdp.h``”h]”hŒinclude/uapi/linux/if_xdp.h”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjKubhŒ. Thus, generally, the ”…””}”(hjKh²hh³Nh´NubjT)”}”(hŒ``tx_metadata_len``”h]”hŒtx_metadata_len”…””}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjKubhŒ field above should contain ”…””}”(hjKh²hh³Nh´NubjT)”}”(hŒ!``sizeof(union xsk_tx_metadata)``”h]”hŒsizeof(union xsk_tx_metadata)”…””}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjKubhŒ.”…””}”(hjKh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj:h²hubhÞ)”}”(hŒÒNote that in the original implementation the ``XDP_UMEM_TX_METADATA_LEN`` flag was not required. Applications might attempt to create a umem with a flag first and if it fails, do another attempt without a flag.”h]”(hŒ-Note that in the original implementation the ”…””}”(hjÙh²hh³Nh´NubjT)”}”(hŒ``XDP_UMEM_TX_METADATA_LEN``”h]”hŒXDP_UMEM_TX_METADATA_LEN”…””}”(hjáh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjÙubhŒ‰ flag was not required. Applications might attempt to create a umem with a flag first and if it fails, do another attempt without a flag.”…””}”(hjÙh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj:h²hubhÞ)”}”(hŒThe headroom and the metadata itself should be located right before ``xdp_desc->addr`` in the umem frame. Within a frame, the metadata layout is as follows::”h]”(hŒDThe headroom and the metadata itself should be located right before ”…””}”(hjùh²hh³Nh´NubjT)”}”(hŒ``xdp_desc->addr``”h]”hŒxdp_desc->addr”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjùubhŒF in the umem frame. Within a frame, the metadata layout is as follows:”…””}”(hjùh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj:h²hubhŒ literal_block”“”)”}”(hXE tx_metadata_len / \ +-----------------+---------+----------------------------+ | xsk_tx_metadata | padding | payload | +-----------------+---------+----------------------------+ ^ | xdp_desc->addr”h]”hXE tx_metadata_len / \ +-----------------+---------+----------------------------+ | xsk_tx_metadata | padding | payload | +-----------------+---------+----------------------------+ ^ | xdp_desc->addr”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jh³hÇh´Khj:h²hubhÞ)”}”(hX}An AF_XDP application can request headrooms larger than ``sizeof(struct xsk_tx_metadata)``. The kernel will ignore the padding (and will still use ``xdp_desc->addr - tx_metadata_len`` to locate the ``xsk_tx_metadata``). For the frames that shouldn't carry any metadata (i.e., the ones that don't have ``XDP_TX_METADATA`` option), the metadata area is ignored by the kernel as well.”h]”(hŒ8An AF_XDP application can request headrooms larger than ”…””}”(hj)h²hh³Nh´NubjT)”}”(hŒ"``sizeof(struct xsk_tx_metadata)``”h]”hŒsizeof(struct xsk_tx_metadata)”…””}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj)ubhŒ9. The kernel will ignore the padding (and will still use ”…””}”(hj)h²hh³Nh´NubjT)”}”(hŒ$``xdp_desc->addr - tx_metadata_len``”h]”hŒ xdp_desc->addr - tx_metadata_len”…””}”(hjCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj)ubhŒ to locate the ”…””}”(hj)h²hh³Nh´NubjT)”}”(hŒ``xsk_tx_metadata``”h]”hŒxsk_tx_metadata”…””}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj)ubhŒX). For the frames that shouldn’t carry any metadata (i.e., the ones that don’t have ”…””}”(hj)h²hh³Nh´NubjT)”}”(hŒ``XDP_TX_METADATA``”h]”hŒXDP_TX_METADATA”…””}”(hjgh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj)ubhŒ= option), the metadata area is ignored by the kernel as well.”…””}”(hj)h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K&hj:h²hubhÞ)”}”(hŒ/The flags field enables the particular offload:”h]”hŒ/The flags field enables the particular offload:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K-hj:h²hubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ‰``XDP_TXMD_FLAGS_TIMESTAMP``: requests the device to put transmission timestamp into ``tx_timestamp`` field of ``union xsk_tx_metadata``.”h]”hÞ)”}”(hŒ‰``XDP_TXMD_FLAGS_TIMESTAMP``: requests the device to put transmission timestamp into ``tx_timestamp`` field of ``union xsk_tx_metadata``.”h]”(jT)”}”(hŒ``XDP_TXMD_FLAGS_TIMESTAMP``”h]”hŒXDP_TXMD_FLAGS_TIMESTAMP”…””}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj˜ubhŒ9: requests the device to put transmission timestamp into ”…””}”(hj˜h²hh³Nh´NubjT)”}”(hŒ``tx_timestamp``”h]”hŒ tx_timestamp”…””}”(hj®h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj˜ubhŒ field of ”…””}”(hj˜h²hh³Nh´NubjT)”}”(hŒ``union xsk_tx_metadata``”h]”hŒunion xsk_tx_metadata”…””}”(hjÀh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj˜ubhŒ.”…””}”(hj˜h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K/hj”ubah}”(h]”h ]”h"]”h$]”h&]”uh1j’hjh²hh³hÇh´Nubj“)”}”(hŒõ``XDP_TXMD_FLAGS_CHECKSUM``: requests the device to calculate L4 checksum. ``csum_start`` specifies byte offset of where the checksumming should start and ``csum_offset`` specifies byte offset where the device should store the computed checksum.”h]”hÞ)”}”(hŒõ``XDP_TXMD_FLAGS_CHECKSUM``: requests the device to calculate L4 checksum. ``csum_start`` specifies byte offset of where the checksumming should start and ``csum_offset`` specifies byte offset where the device should store the computed checksum.”h]”(jT)”}”(hŒ``XDP_TXMD_FLAGS_CHECKSUM``”h]”hŒXDP_TXMD_FLAGS_CHECKSUM”…””}”(hjæh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjâubhŒ0: requests the device to calculate L4 checksum. ”…””}”(hjâh²hh³Nh´NubjT)”}”(hŒ``csum_start``”h]”hŒ csum_start”…””}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjâubhŒB specifies byte offset of where the checksumming should start and ”…””}”(hjâh²hh³Nh´NubjT)”}”(hŒ``csum_offset``”h]”hŒ csum_offset”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjâubhŒK specifies byte offset where the device should store the computed checksum.”…””}”(hjâh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K1hjÞubah}”(h]”h ]”h"]”h$]”h&]”uh1j’hjh²hh³hÇh´Nubj“)”}”(hŒæ``XDP_TXMD_FLAGS_LAUNCH_TIME``: requests the device to schedule the packet for transmission at a pre-determined time called launch time. The value of launch time is indicated by ``launch_time`` field of ``union xsk_tx_metadata``. ”h]”hÞ)”}”(hŒå``XDP_TXMD_FLAGS_LAUNCH_TIME``: requests the device to schedule the packet for transmission at a pre-determined time called launch time. The value of launch time is indicated by ``launch_time`` field of ``union xsk_tx_metadata``.”h]”(jT)”}”(hŒ``XDP_TXMD_FLAGS_LAUNCH_TIME``”h]”hŒXDP_TXMD_FLAGS_LAUNCH_TIME”…””}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj,ubhŒ”: requests the device to schedule the packet for transmission at a pre-determined time called launch time. The value of launch time is indicated by ”…””}”(hj,h²hh³Nh´NubjT)”}”(hŒ``launch_time``”h]”hŒ launch_time”…””}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj,ubhŒ field of ”…””}”(hj,h²hh³Nh´NubjT)”}”(hŒ``union xsk_tx_metadata``”h]”hŒunion xsk_tx_metadata”…””}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj,ubhŒ.”…””}”(hj,h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K5hj(ubah}”(h]”h ]”h"]”h$]”h&]”uh1j’hjh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jh³hÇh´K/hj:h²hubhÞ)”}”(hXBesides the flags above, in order to trigger the offloads, the first packet's ``struct xdp_desc`` descriptor should set ``XDP_TX_METADATA`` bit in the ``options`` field. Also note that in a multi-buffer packet only the first chunk should carry the metadata.”h]”(hŒPBesides the flags above, in order to trigger the offloads, the first packet’s ”…””}”(hjzh²hh³Nh´NubjT)”}”(hŒ``struct xdp_desc``”h]”hŒstruct xdp_desc”…””}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjzubhŒ descriptor should set ”…””}”(hjzh²hh³Nh´NubjT)”}”(hŒ``XDP_TX_METADATA``”h]”hŒXDP_TX_METADATA”…””}”(hj”h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjzubhŒ bit in the ”…””}”(hjzh²hh³Nh´NubjT)”}”(hŒ ``options``”h]”hŒoptions”…””}”(hj¦h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjzubhŒ_ field. Also note that in a multi-buffer packet only the first chunk should carry the metadata.”…””}”(hjzh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K:hj:h²hubeh}”(h]”Œgeneral-design”ah ]”h"]”Œgeneral design”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K ubhÉ)”}”(hhh]”(hÎ)”}”(hŒSoftware TX Checksum”h]”hŒSoftware TX Checksum”…””}”(hjÉh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÆh²hh³hÇh´K@ubhÞ)”}”(hX4For development and testing purposes its possible to pass ``XDP_UMEM_TX_SW_CSUM`` flag to ``XDP_UMEM_REG`` UMEM registration call. In this case, when running in ``XDK_COPY`` mode, the TX checksum is calculated on the CPU. Do not enable this option in production because it will negatively affect performance.”h]”(hŒ:For development and testing purposes its possible to pass ”…””}”(hj×h²hh³Nh´NubjT)”}”(hŒ``XDP_UMEM_TX_SW_CSUM``”h]”hŒXDP_UMEM_TX_SW_CSUM”…””}”(hjßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj×ubhŒ flag to ”…””}”(hj×h²hh³Nh´NubjT)”}”(hŒ``XDP_UMEM_REG``”h]”hŒ XDP_UMEM_REG”…””}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj×ubhŒ7 UMEM registration call. In this case, when running in ”…””}”(hj×h²hh³Nh´NubjT)”}”(hŒ ``XDK_COPY``”h]”hŒXDK_COPY”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj×ubhŒ‡ mode, the TX checksum is calculated on the CPU. Do not enable this option in production because it will negatively affect performance.”…””}”(hj×h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KBhjÆh²hubeh}”(h]”Œsoftware-tx-checksum”ah ]”h"]”Œsoftware tx checksum”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K@ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ Launch Time”h]”hŒ Launch Time”…””}”(hj&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj#h²hh³hÇh´KIubhÞ)”}”(hX±The value of the requested launch time should be based on the device's PTP Hardware Clock (PHC) to ensure accuracy. AF_XDP takes a different data path compared to the ETF queuing discipline, which organizes packets and delays their transmission. Instead, AF_XDP immediately hands off the packets to the device driver without rearranging their order or holding them prior to transmission. Since the driver maintains FIFO behavior and does not perform packet reordering, a packet with a launch time request will block other packets in the same Tx Queue until it is sent. Therefore, it is recommended to allocate separate queue for scheduling traffic that is intended for future transmission.”h]”hX³The value of the requested launch time should be based on the device’s PTP Hardware Clock (PHC) to ensure accuracy. AF_XDP takes a different data path compared to the ETF queuing discipline, which organizes packets and delays their transmission. Instead, AF_XDP immediately hands off the packets to the device driver without rearranging their order or holding them prior to transmission. Since the driver maintains FIFO behavior and does not perform packet reordering, a packet with a launch time request will block other packets in the same Tx Queue until it is sent. Therefore, it is recommended to allocate separate queue for scheduling traffic that is intended for future transmission.”…””}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KKhj#h²hubhÞ)”}”(hX‰In scenarios where the launch time offload feature is disabled, the device driver is expected to disregard the launch time request. For correct interpretation and meaningful operation, the launch time should never be set to a value larger than the farthest programmable time in the future (the horizon). Different devices have different hardware limitations on the launch time offload feature.”h]”hX‰In scenarios where the launch time offload feature is disabled, the device driver is expected to disregard the launch time request. For correct interpretation and meaningful operation, the launch time should never be set to a value larger than the farthest programmable time in the future (the horizon). Different devices have different hardware limitations on the launch time offload feature.”…””}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KVhj#h²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒ stmmac driver”h]”hŒ stmmac driver”…””}”(hjSh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjPh²hh³hÇh´K^ubhÞ)”}”(hX[For stmmac, TSO and launch time (TBS) features are mutually exclusive for each individual Tx Queue. By default, the driver configures Tx Queue 0 to support TSO and the rest of the Tx Queues to support TBS. The launch time hardware offload feature can be enabled or disabled by using the tc-etf command to call the driver's ndo_setup_tc() callback.”h]”hX]For stmmac, TSO and launch time (TBS) features are mutually exclusive for each individual Tx Queue. By default, the driver configures Tx Queue 0 to support TSO and the rest of the Tx Queues to support TBS. The launch time hardware offload feature can be enabled or disabled by using the tc-etf command to call the driver’s ndo_setup_tc() callback.”…””}”(hjah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K`hjPh²hubhÞ)”}”(hX½The value of the launch time that is programmed in the Enhanced Normal Transmit Descriptors is a 32-bit value, where the most significant 8 bits represent the time in seconds and the remaining 24 bits represent the time in 256 ns increments. The programmed launch time is compared against the PTP time (bits[39:8]) and rolls over after 256 seconds. Therefore, the horizon of the launch time for dwmac4 and dwxlgmac2 is 128 seconds in the future.”h]”hX½The value of the launch time that is programmed in the Enhanced Normal Transmit Descriptors is a 32-bit value, where the most significant 8 bits represent the time in seconds and the remaining 24 bits represent the time in 256 ns increments. The programmed launch time is compared against the PTP time (bits[39:8]) and rolls over after 256 seconds. Therefore, the horizon of the launch time for dwmac4 and dwxlgmac2 is 128 seconds in the future.”…””}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KfhjPh²hubeh}”(h]”Œ stmmac-driver”ah ]”h"]”Œ stmmac driver”ah$]”h&]”uh1hÈhj#h²hh³hÇh´K^ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ igc driver”h]”hŒ igc driver”…””}”(hjˆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj…h²hh³hÇh´KoubhÞ)”}”(hXkFor igc, all four Tx Queues support the launch time feature. The launch time hardware offload feature can be enabled or disabled by using the tc-etf command to call the driver's ndo_setup_tc() callback. When entering TSN mode, the igc driver will reset the device and create a default Qbv schedule with a 1-second cycle time, with all Tx Queues open at all times.”h]”hXmFor igc, all four Tx Queues support the launch time feature. The launch time hardware offload feature can be enabled or disabled by using the tc-etf command to call the driver’s ndo_setup_tc() callback. When entering TSN mode, the igc driver will reset the device and create a default Qbv schedule with a 1-second cycle time, with all Tx Queues open at all times.”…””}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kqhj…h²hubhÞ)”}”(hXLThe value of the launch time that is programmed in the Advanced Transmit Context Descriptor is a relative offset to the starting time of the Qbv transmission window of the queue. The Frst flag of the descriptor can be set to schedule the packet for the next Qbv cycle. Therefore, the horizon of the launch time for i225 and i226 is the ending time of the next cycle of the Qbv transmission window of the queue. For example, when the Qbv cycle time is set to 1 second, the horizon of the launch time ranges from 1 second to 2 seconds, depending on where the Qbv cycle is currently running.”h]”hXLThe value of the launch time that is programmed in the Advanced Transmit Context Descriptor is a relative offset to the starting time of the Qbv transmission window of the queue. The Frst flag of the descriptor can be set to schedule the packet for the next Qbv cycle. Therefore, the horizon of the launch time for i225 and i226 is the ending time of the next cycle of the Qbv transmission window of the queue. For example, when the Qbv cycle time is set to 1 second, the horizon of the launch time ranges from 1 second to 2 seconds, depending on where the Qbv cycle is currently running.”…””}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kwhj…h²hubeh}”(h]”Œ igc-driver”ah ]”h"]”Œ igc driver”ah$]”h&]”uh1hÈhj#h²hh³hÇh´Koubeh}”(h]”Œ launch-time”ah ]”h"]”Œ launch time”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KIubhÉ)”}”(hhh]”(hÎ)”}”(hŒQuerying Device Capabilities”h]”hŒQuerying Device Capabilities”…””}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÂh²hh³hÇh´K‚ubhÞ)”}”(hŒ¢Every devices exports its offloads capabilities via netlink netdev family. Refer to ``xsk-flags`` features bitmask in ``Documentation/netlink/specs/netdev.yaml``.”h]”(hŒTEvery devices exports its offloads capabilities via netlink netdev family. Refer to ”…””}”(hjÓh²hh³Nh´NubjT)”}”(hŒ ``xsk-flags``”h]”hŒ xsk-flags”…””}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjÓubhŒ features bitmask in ”…””}”(hjÓh²hh³Nh´NubjT)”}”(hŒ+``Documentation/netlink/specs/netdev.yaml``”h]”hŒ'Documentation/netlink/specs/netdev.yaml”…””}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjÓubhŒ.”…””}”(hjÓh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K„hjÂh²hubjŽ)”}”(hhh]”(j“)”}”(hŒ>``tx-timestamp``: device supports ``XDP_TXMD_FLAGS_TIMESTAMP``”h]”hÞ)”}”(hj h]”(jT)”}”(hŒ``tx-timestamp``”h]”hŒ tx-timestamp”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj ubhŒ: device supports ”…””}”(hj h²hh³Nh´NubjT)”}”(hŒ``XDP_TXMD_FLAGS_TIMESTAMP``”h]”hŒXDP_TXMD_FLAGS_TIMESTAMP”…””}”(hj!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kˆhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j’hjh²hh³hÇh´Nubj“)”}”(hŒ<``tx-checksum``: device supports ``XDP_TXMD_FLAGS_CHECKSUM``”h]”hÞ)”}”(hj=h]”(jT)”}”(hŒ``tx-checksum``”h]”hŒ tx-checksum”…””}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj?ubhŒ: device supports ”…””}”(hj?h²hh³Nh´NubjT)”}”(hŒ``XDP_TXMD_FLAGS_CHECKSUM``”h]”hŒXDP_TXMD_FLAGS_CHECKSUM”…””}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj?ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K‰hj;ubah}”(h]”h ]”h"]”h$]”h&]”uh1j’hjh²hh³hÇh´Nubj“)”}”(hŒH``tx-launch-time-fifo``: device supports ``XDP_TXMD_FLAGS_LAUNCH_TIME`` ”h]”hÞ)”}”(hŒG``tx-launch-time-fifo``: device supports ``XDP_TXMD_FLAGS_LAUNCH_TIME``”h]”(jT)”}”(hŒ``tx-launch-time-fifo``”h]”hŒtx-launch-time-fifo”…””}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjrubhŒ: device supports ”…””}”(hjrh²hh³Nh´NubjT)”}”(hŒ``XDP_TXMD_FLAGS_LAUNCH_TIME``”h]”hŒXDP_TXMD_FLAGS_LAUNCH_TIME”…””}”(hjˆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjrubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KŠhjnubah}”(h]”h ]”h"]”h$]”h&]”uh1j’hjh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jxjyuh1jh³hÇh´KˆhjÂh²hubhÞ)”}”(hŒHSee ``tools/net/ynl/samples/netdev.c`` on how to query this information.”h]”(hŒSee ”…””}”(hj¨h²hh³Nh´NubjT)”}”(hŒ"``tools/net/ynl/samples/netdev.c``”h]”hŒtools/net/ynl/samples/netdev.c”…””}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShj¨ubhŒ" on how to query this information.”…””}”(hj¨h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KŒhjÂh²hubeh}”(h]”Œquerying-device-capabilities”ah ]”h"]”Œquerying device capabilities”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K‚ubhÉ)”}”(hhh]”(hÎ)”}”(hŒExample”h]”hŒExample”…””}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÐh²hh³hÇh´KubhÞ)”}”(hŒ±See ``tools/testing/selftests/bpf/xdp_hw_metadata.c`` for an example program that handles TX metadata. Also see https://github.com/fomichev/xskgen for a more bare-bones example.”h]”(hŒSee ”…””}”(hjáh²hh³Nh´NubjT)”}”(hŒ1``tools/testing/selftests/bpf/xdp_hw_metadata.c``”h]”hŒ-tools/testing/selftests/bpf/xdp_hw_metadata.c”…””}”(hjéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jShjáubhŒ; for an example program that handles TX metadata. Also see ”…””}”(hjáh²hh³Nh´NubhŒ reference”“”)”}”(hŒ"https://github.com/fomichev/xskgen”h]”hŒ"https://github.com/fomichev/xskgen”…””}”(hjýh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jÿuh1jûhjáubhŒ for a more bare-bones example.”…””}”(hjáh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K‘hjÐh²hubeh}”(h]”Œexample”ah ]”h"]”Œexample”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´Kubeh}”(h]”Œaf-xdp-tx-metadata”ah ]”h"]”Œaf_xdp tx metadata”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jIŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j#j jÃjÀj jj¿j¼j‚jj·j´jÍjÊjjuŒ nametypes”}”(j#‰jÉj ‰j¿‰j‚‰j·‰j͉j‰uh}”(j hÊjÀj:jjÆj¼j#jjPj´j…jÊjÂjjÐuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.