lsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget./translations/zh_CN/networking/xdp-rx-metadatamodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/zh_TW/networking/xdp-rx-metadatamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/it_IT/networking/xdp-rx-metadatamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ja_JP/networking/xdp-rx-metadatamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ko_KR/networking/xdp-rx-metadatamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/pt_BR/networking/xdp-rx-metadatamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/sp_SP/networking/xdp-rx-metadatamodnameN 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:spacepreserveuh1hhhhhhH/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata.rsthKubhsection)}(hhh](htitle)}(hXDP RX Metadatah]hXDP RX Metadata}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hThis document describes how an eXpress Data Path (XDP) program can access hardware metadata related to a packet using a set of helper functions, and how it can pass that metadata on to other consumers.h]hThis document describes how an eXpress Data Path (XDP) program can access hardware metadata related to a packet using a set of helper functions, and how it can pass that metadata on to other consumers.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hGeneral Designh]hGeneral Design}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh)}(hXXDP has access to a set of kfuncs to manipulate the metadata in an XDP frame. Every device driver that wishes to expose additional packet metadata can implement these kfuncs. The set of kfuncs is declared in ``include/net/xdp.h`` via ``XDP_METADATA_KFUNC_xxx``.h](hXDP has access to a set of kfuncs to manipulate the metadata in an XDP frame. Every device driver that wishes to expose additional packet metadata can implement these kfuncs. The set of kfuncs is declared in }(hhhhhNhNubhliteral)}(h``include/net/xdp.h``h]hinclude/net/xdp.h}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhubh via }(hhhhhNhNubj)}(h``XDP_METADATA_KFUNC_xxx``h]hXDP_METADATA_KFUNC_xxx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhubh.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hpCurrently, the following kfuncs are supported. In the future, as more metadata is supported, this set will grow:h]hpCurrently, the following kfuncs are supported. In the future, as more metadata is supported, this set will grow:}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single*bpf_xdp_metadata_rx_timestamp (C function)c.bpf_xdp_metadata_rx_timestamphNtauh1j@hhhhhNhNubhdesc)}(hhh](hdesc_signature)}(hX__bpf_kfunc int bpf_xdp_metadata_rx_timestamp (const struct xdp_md *ctx, u64 *timestamp)h]hdesc_signature_line)}(hW__bpf_kfunc int bpf_xdp_metadata_rx_timestamp(const struct xdp_md *ctx, u64 *timestamp)h](h __bpf_kfunc}(hj^hhhNhNubhdesc_sig_space)}(h h]h }(hjhhhhNhNubah}(h]h ]wah"]h$]h&]uh1jfhj^hhhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:22: ./net/core/xdp.chM~ubhdesc_sig_keyword_type)}(hinth]hint}(hjzhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jxhj^hhhjwhM~ubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj^hhhjwhM~ubh desc_name)}(hbpf_xdp_metadata_rx_timestamph]h desc_sig_name)}(hbpf_xdp_metadata_rx_timestamph]hbpf_xdp_metadata_rx_timestamp}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhj^hhhjwhM~ubhdesc_parameterlist)}(h*(const struct xdp_md *ctx, u64 *timestamp)h](hdesc_parameter)}(hconst struct xdp_md *ctxh](hdesc_sig_keyword)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubj)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubh)}(hhh]j)}(hxdp_mdh]hxdp_md}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jjsbc.bpf_xdp_metadata_rx_timestampasbuh1hhjubjg)}(h h]h }(hj)hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubhdesc_sig_punctuation)}(h*h]h*}(hj9hhhNhNubah}(h]h ]pah"]h$]h&]uh1j7hjubj)}(hctxh]hctx}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hu64 *timestamph](h)}(hhh]j)}(hu64h]hu64}(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjfmodnameN classnameNjj)}j!]j%c.bpf_xdp_metadata_rx_timestampasbuh1hhj]ubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj]ubj8)}(hj;h]h*}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj]ubj)}(h timestamph]h timestamp}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhj^hhhjwhM~ubeh}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1j\sphinx_line_type declaratorhjXhhhjwhM~ubah}(h]jOah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jVhjwhM~hjShhubh desc_content)}(hhh]h)}(hRead XDP frame RX timestamp.h]hRead XDP frame RX timestamp.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:22: ./net/core/xdp.chM~hjhhubah}(h]h ]h"]h$]h&]uh1jhjShhhjwhM~ubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jQhhhhhNhNubh container)}(hX/**Parameters** ``const struct xdp_md *ctx`` XDP context pointer. ``u64 *timestamp`` Return value pointer. **Return** * Returns 0 on success or ``-errno`` on error. * ``-EOPNOTSUPP`` : means device driver does not implement kfunc * ``-ENODATA`` : means no RX-timestamp available for this frameh](h)}(h**Parameters**h]hstrong)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:22: ./net/core/xdp.chMhjubhdefinition_list)}(hhh](hdefinition_list_item)}(h2``const struct xdp_md *ctx`` XDP context pointer. h](hterm)}(h``const struct xdp_md *ctx``h]j)}(hj"h]hconst struct xdp_md *ctx}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:22: ./net/core/xdp.chMhjubh definition)}(hhh]h)}(hXDP context pointer.h]hXDP context pointer.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hMhj:ubah}(h]h ]h"]h$]h&]uh1j8hjubeh}(h]h ]h"]h$]h&]uh1jhj7hMhjubj)}(h)``u64 *timestamp`` Return value pointer. h](j)}(h``u64 *timestamp``h]j)}(hj]h]hu64 *timestamp}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:22: ./net/core/xdp.chMhjWubj9)}(hhh]h)}(hReturn value pointer.h]hReturn value pointer.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhMhjsubah}(h]h ]h"]h$]h&]uh1j8hjWubeh}(h]h ]h"]h$]h&]uh1jhjrhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:22: ./net/core/xdp.chMhjubh bullet_list)}(hhh](h list_item)}(h,Returns 0 on success or ``-errno`` on error.h]h)}(hjh](hReturns 0 on success or }(hjhhhNhNubj)}(h ``-errno``h]h-errno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh on error.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:22: ./net/core/xdp.chMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h>``-EOPNOTSUPP`` : means device driver does not implement kfunch]h)}(hjh](j)}(h``-EOPNOTSUPP``h]h -EOPNOTSUPP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh/ : means device driver does not implement kfunc}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:22: ./net/core/xdp.chMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h@``-ENODATA`` : means no RX-timestamp available for this frameh]h)}(hjh](j)}(h ``-ENODATA``h]h-ENODATA}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh4 : means no RX-timestamp available for this frame}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:22: ./net/core/xdp.chMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]bulletj;uh1jhjhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubjA)}(hhh]h}(h]h ]h"]h$]h&]entries](jM%bpf_xdp_metadata_rx_hash (C function)c.bpf_xdp_metadata_rx_hashhNtauh1j@hhhhhNhNubjR)}(hhh](jW)}(hp__bpf_kfunc int bpf_xdp_metadata_rx_hash (const struct xdp_md *ctx, u32 *hash, enum xdp_rss_hash_type *rss_type)h]j])}(ho__bpf_kfunc int bpf_xdp_metadata_rx_hash(const struct xdp_md *ctx, u32 *hash, enum xdp_rss_hash_type *rss_type)h](h __bpf_kfunc}(hjNhhhNhNubjg)}(h h]h }(hjVhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjNhhhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:25: ./net/core/xdp.chMubjy)}(hinth]hint}(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhjNhhhjdhMubjg)}(h h]h }(hjshhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjNhhhjdhMubj)}(hbpf_xdp_metadata_rx_hashh]j)}(hbpf_xdp_metadata_rx_hashh]hbpf_xdp_metadata_rx_hash}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjNhhhjdhMubj)}(hG(const struct xdp_md *ctx, u32 *hash, enum xdp_rss_hash_type *rss_type)h](j)}(hconst struct xdp_md *ctxh](j)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubj)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubh)}(hhh]j)}(hxdp_mdh]hxdp_md}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j!]j$)}jjsbc.bpf_xdp_metadata_rx_hashasbuh1hhjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubj8)}(hj;h]h*}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubj)}(hctxh]hctx}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h u32 *hashh](h)}(hhh]j)}(hu32h]hu32}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj3modnameN classnameNjj)}j!]jc.bpf_xdp_metadata_rx_hashasbuh1hhj*ubjg)}(h h]h }(hjOhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj*ubj8)}(hj;h]h*}(hj]hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj*ubj)}(hhashh]hhash}(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h enum xdp_rss_hash_type *rss_typeh](j)}(henumh]henum}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubh)}(hhh]j)}(hxdp_rss_hash_typeh]hxdp_rss_hash_type}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j!]jc.bpf_xdp_metadata_rx_hashasbuh1hhjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubj8)}(hj;h]h*}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubj)}(hrss_typeh]hrss_type}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjNhhhjdhMubeh}(h]h ]h"]h$]h&]hhjuh1j\jjhjJhhhjdhMubah}(h]jEah ](jjeh"]h$]h&]jj)jhuh1jVhjdhMhjGhhubj)}(hhh]h)}(hRead XDP frame RX hash.h]hRead XDP frame RX hash.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:25: ./net/core/xdp.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjGhhhjdhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jQhhhhhNhNubj)}(hX**Parameters** ``const struct xdp_md *ctx`` XDP context pointer. ``u32 *hash`` Return value pointer. ``enum xdp_rss_hash_type *rss_type`` Return value pointer for RSS type. **Description** The RSS hash type (**rss_type**) specifies what portion of packet headers NIC hardware used when calculating RSS hash value. The RSS type can be decoded via :c:type:`enum xdp_rss_hash_type ` either matching on individual L3/L4 bits ``XDP_RSS_L*`` or by combined traditional *RSS Hashing Types* ``XDP_RSS_TYPE_L*``. **Return** * Returns 0 on success or ``-errno`` on error. * ``-EOPNOTSUPP`` : means device driver doesn't implement kfunc * ``-ENODATA`` : means no RX-hash available for this frameh](h)}(h**Parameters**h]j)}(hj'h]h Parameters}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:25: ./net/core/xdp.chMhj!ubj)}(hhh](j)}(h2``const struct xdp_md *ctx`` XDP context pointer. h](j)}(h``const struct xdp_md *ctx``h]j)}(hjFh]hconst struct xdp_md *ctx}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:25: ./net/core/xdp.chMhj@ubj9)}(hhh]h)}(hXDP context pointer.h]hXDP context pointer.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hMhj\ubah}(h]h ]h"]h$]h&]uh1j8hj@ubeh}(h]h ]h"]h$]h&]uh1jhj[hMhj=ubj)}(h$``u32 *hash`` Return value pointer. h](j)}(h ``u32 *hash``h]j)}(hjh]h u32 *hash}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:25: ./net/core/xdp.chMhjyubj9)}(hhh]h)}(hReturn value pointer.h]hReturn value pointer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j8hjyubeh}(h]h ]h"]h$]h&]uh1jhjhMhj=ubj)}(hH``enum xdp_rss_hash_type *rss_type`` Return value pointer for RSS type. h](j)}(h$``enum xdp_rss_hash_type *rss_type``h]j)}(hjh]h enum xdp_rss_hash_type *rss_type}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:25: ./net/core/xdp.chMhjubj9)}(hhh]h)}(h"Return value pointer for RSS type.h]h"Return value pointer for RSS type.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j8hjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj=ubeh}(h]h ]h"]h$]h&]uh1jhj!ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:25: ./net/core/xdp.chMhj!ubh)}(hXNThe RSS hash type (**rss_type**) specifies what portion of packet headers NIC hardware used when calculating RSS hash value. The RSS type can be decoded via :c:type:`enum xdp_rss_hash_type ` either matching on individual L3/L4 bits ``XDP_RSS_L*`` or by combined traditional *RSS Hashing Types* ``XDP_RSS_TYPE_L*``.h](hThe RSS hash type (}(hj hhhNhNubj)}(h **rss_type**h]hrss_type}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh) specifies what portion of packet headers NIC hardware used when calculating RSS hash value. The RSS type can be decoded via }(hj hhhNhNubh)}(h4:c:type:`enum xdp_rss_hash_type `h]j)}(hj%h]henum xdp_rss_hash_type}(hj'hhhNhNubah}(h]h ](xrefjc-typeeh"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]refdocnetworking/xdp-rx-metadata refdomainjreftypetype refexplicitrefwarnjj)}j!]sb reftargetxdp_rss_hash_typeuh1hhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:25: ./net/core/xdp.chMhj ubh* either matching on individual L3/L4 bits }(hj hhhNhNubj)}(h``XDP_RSS_L*``h]h XDP_RSS_L*}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh or by combined traditional }(hj hhhNhNubhemphasis)}(h*RSS Hashing Types*h]hRSS Hashing Types}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1j_hj ubh }(hj hhhNhNubj)}(h``XDP_RSS_TYPE_L*``h]hXDP_RSS_TYPE_L*}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjHhMhj!ubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:25: ./net/core/xdp.chMhj!ubj)}(hhh](j)}(h,Returns 0 on success or ``-errno`` on error.h]h)}(hjh](hReturns 0 on success or }(hjhhhNhNubj)}(h ``-errno``h]h-errno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh on error.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:25: ./net/core/xdp.chMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h=``-EOPNOTSUPP`` : means device driver doesn't implement kfunch]h)}(hjh](j)}(h``-EOPNOTSUPP``h]h -EOPNOTSUPP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh0 : means device driver doesn’t implement kfunc}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:25: ./net/core/xdp.chMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h;``-ENODATA`` : means no RX-hash available for this frameh]h)}(hjh](j)}(h ``-ENODATA``h]h-ENODATA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh/ : means no RX-hash available for this frame}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:25: ./net/core/xdp.chMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]j1j;uh1jhjhMhj!ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubjA)}(hhh]h}(h]h ]h"]h$]h&]entries](jM)bpf_xdp_metadata_rx_vlan_tag (C function)c.bpf_xdp_metadata_rx_vlan_taghNtauh1j@hhhhhNhNubjR)}(hhh](jW)}(hj__bpf_kfunc int bpf_xdp_metadata_rx_vlan_tag (const struct xdp_md *ctx, __be16 *vlan_proto, u16 *vlan_tci)h]j])}(hi__bpf_kfunc int bpf_xdp_metadata_rx_vlan_tag(const struct xdp_md *ctx, __be16 *vlan_proto, u16 *vlan_tci)h](h __bpf_kfunc}(hj>hhhNhNubjg)}(h h]h }(hjFhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj>hhhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:28: ./net/core/xdp.chMubjy)}(hinth]hint}(hjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhj>hhhjThMubjg)}(h h]h }(hjchhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj>hhhjThMubj)}(hbpf_xdp_metadata_rx_vlan_tagh]j)}(hbpf_xdp_metadata_rx_vlan_tagh]hbpf_xdp_metadata_rx_vlan_tag}(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqubah}(h]h ](jjeh"]h$]h&]hhuh1jhj>hhhjThMubj)}(h=(const struct xdp_md *ctx, __be16 *vlan_proto, u16 *vlan_tci)h](j)}(hconst struct xdp_md *ctxh](j)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubj)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubh)}(hhh]j)}(hxdp_mdh]hxdp_md}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j!]j$)}jjwsbc.bpf_xdp_metadata_rx_vlan_tagasbuh1hhjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubj8)}(hj;h]h*}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubj)}(hctxh]hctx}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h__be16 *vlan_protoh](h)}(hhh]j)}(h__be16h]h__be16}(hj! hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj# modnameN classnameNjj)}j!]jc.bpf_xdp_metadata_rx_vlan_tagasbuh1hhj ubjg)}(h h]h }(hj? hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj ubj8)}(hj;h]h*}(hjM hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj ubj)}(h vlan_protoh]h vlan_proto}(hjZ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h u16 *vlan_tcih](h)}(hhh]j)}(hu16h]hu16}(hjv hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjs ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjx modnameN classnameNjj)}j!]jc.bpf_xdp_metadata_rx_vlan_tagasbuh1hhjo ubjg)}(h h]h }(hj hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjo ubj8)}(hj;h]h*}(hj hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjo ubj)}(hvlan_tcih]hvlan_tci}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjo ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhj>hhhjThMubeh}(h]h ]h"]h$]h&]hhjuh1j\jjhj:hhhjThMubah}(h]j5ah ](jjeh"]h$]h&]jj)jhuh1jVhjThMhj7hhubj)}(hhh]h)}(h!Get XDP packet outermost VLAN tagh]h!Get XDP packet outermost VLAN tag}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:28: ./net/core/xdp.chMhj hhubah}(h]h ]h"]h$]h&]uh1jhj7hhhjThMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1jQhhhhhNhNubj)}(hX**Parameters** ``const struct xdp_md *ctx`` XDP context pointer. ``__be16 *vlan_proto`` Destination pointer for VLAN Tag protocol identifier (TPID). ``u16 *vlan_tci`` Destination pointer for VLAN TCI (VID + DEI + PCP) **Description** In case of success, ``vlan_proto`` contains *Tag protocol identifier (TPID)*, usually ``ETH_P_8021Q`` or ``ETH_P_8021AD``, but some networks can use custom TPIDs. ``vlan_proto`` is stored in **network byte order (BE)** and should be used as follows: ``if (vlan_proto == bpf_htons(ETH_P_8021Q)) do_something();`` ``vlan_tci`` contains the remaining 16 bits of a VLAN tag. Driver is expected to provide those in **host byte order (usually LE)**, so the bpf program should not perform byte conversion. According to 802.1Q standard, *VLAN TCI (Tag control information)* is a bit field that contains: *VLAN identifier (VID)* that can be read with ``vlan_tci & 0xfff``, *Drop eligible indicator (DEI)* - 1 bit, *Priority code point (PCP)* - 3 bits. For detailed meaning of DEI and PCP, please refer to other sources. **Return** * Returns 0 on success or ``-errno`` on error. * ``-EOPNOTSUPP`` : device driver doesn't implement kfunc * ``-ENODATA`` : VLAN tag was not stripped or is not availableh](h)}(h**Parameters**h]j)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:28: ./net/core/xdp.chMhj ubj)}(hhh](j)}(h2``const struct xdp_md *ctx`` XDP context pointer. h](j)}(h``const struct xdp_md *ctx``h]j)}(hj h]hconst struct xdp_md *ctx}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:28: ./net/core/xdp.chMhj ubj9)}(hhh]h)}(hXDP context pointer.h]hXDP context pointer.}(hj3 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/ hMhj0 ubah}(h]h ]h"]h$]h&]uh1j8hj ubeh}(h]h ]h"]h$]h&]uh1jhj/ hMhj ubj)}(hT``__be16 *vlan_proto`` Destination pointer for VLAN Tag protocol identifier (TPID). h](j)}(h``__be16 *vlan_proto``h]j)}(hjS h]h__be16 *vlan_proto}(hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQ ubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/networking/xdp-rx-metadata:28: ./net/core/xdp.chMhjM ubj9)}(hhh]h)}(hdata_meta xdp_buff->datah]h+----------+-----------------+------+ | headroom | custom metadata | data | +----------+-----------------+------+ ^ ^ | | xdp_buff->data_meta xdp_buff->data}hj sbah}(h]h ]h"]h$]h&]hhuh1j hhhK-hhhhubh)}(hAn XDP program can store individual metadata items into this ``data_meta`` area in whichever format it chooses. Later consumers of the metadata will have to agree on the format by some out of band contract (like for the AF_XDP use case, see below).h](h=An XDP program can store individual metadata items into this }(hj hhhNhNubj)}(h ``data_meta``h]h data_meta}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh area in whichever format it chooses. Later consumers of the metadata will have to agree on the format by some out of band contract (like for the AF_XDP use case, see below).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK4hhhhubeh}(h]general-designah ]h"]general designah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hAF_XDPh]hAF_XDP}(hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj% hhhhhK:ubh)}(hXo:doc:`af_xdp` use-case implies that there is a contract between the BPF program that redirects XDP frames into the ``AF_XDP`` socket (``XSK``) and the final consumer. Thus the BPF program manually allocates a fixed number of bytes out of metadata via ``bpf_xdp_adjust_meta`` and calls a subset of kfuncs to populate it. The userspace ``XSK`` consumer computes ``xsk_umem__get_data() - METADATA_SIZE`` to locate that metadata. Note, ``xsk_umem__get_data`` is defined in ``libxdp`` and ``METADATA_SIZE`` is an application-specific constant (``AF_XDP`` receive descriptor does _not_ explicitly carry the size of the metadata).h](h)}(h :doc:`af_xdp`h]hinline)}(hj< h]haf_xdp}(hj@ hhhNhNubah}(h]h ](j1stdstd-doceh"]h$]h&]uh1j> hj: ubah}(h]h ]h"]h$]h&]refdocj= refdomainjJ reftypedoc refexplicitrefwarnjFaf_xdpuh1hhhhKaddressh]h+----------+-----------------+------+ | headroom | custom metadata | data | +----------+-----------------+------+ ^ | rx_desc->address}hj:sbah}(h]h ]h"]h$]h&]hhuh1j hhhKHhj% hhubeh}(h]af-xdpah ]h"]af_xdpah$]h&]uh1hhhhhhhhK:ubh)}(hhh](h)}(hXDP_PASSh]hXDP_PASS}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPhhhhhKPubh)}(hXThis is the path where the packets processed by the XDP program are passed into the kernel. The kernel creates the ``skb`` out of the ``xdp_buff`` contents. Currently, every driver has custom kernel code to parse the descriptors and populate ``skb`` metadata when doing this ``xdp_buff->skb`` conversion, and the XDP metadata is not used by the kernel when building ``skbs``. However, TC-BPF programs can access the XDP metadata area using the ``data_meta`` pointer.h](hsThis is the path where the packets processed by the XDP program are passed into the kernel. The kernel creates the }(hjahhhNhNubj)}(h``skb``h]hskb}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubh out of the }(hjahhhNhNubj)}(h ``xdp_buff``h]hxdp_buff}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubh` contents. Currently, every driver has custom kernel code to parse the descriptors and populate }(hjahhhNhNubj)}(h``skb``h]hskb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubh metadata when doing this }(hjahhhNhNubj)}(h``xdp_buff->skb``h]h xdp_buff->skb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubhJ conversion, and the XDP metadata is not used by the kernel when building }(hjahhhNhNubj)}(h``skbs``h]hskbs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubhF. However, TC-BPF programs can access the XDP metadata area using the }(hjahhhNhNubj)}(h ``data_meta``h]h data_meta}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubh pointer.}(hjahhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKRhjPhhubh)}(h}In the future, we'd like to support a case where an XDP program can override some of the metadata used for building ``skbs``.h](hvIn the future, we’d like to support a case where an XDP program can override some of the metadata used for building }(hjhhhNhNubj)}(h``skbs``h]hskbs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKZhjPhhubeh}(h]xdp-passah ]h"]xdp_passah$]h&]uh1hhhhhhhhKPubh)}(hhh](h)}(hbpf_redirect_maph]hbpf_redirect_map}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK^ubh)}(hXn``bpf_redirect_map`` can redirect the frame to a different device. Some devices (like virtual ethernet links) support running a second XDP program after the redirect. However, the final consumer doesn't have access to the original hardware descriptor and can't access any of the original metadata. The same applies to XDP programs installed into devmaps and cpumaps.h](j)}(h``bpf_redirect_map``h]hbpf_redirect_map}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhX^ can redirect the frame to a different device. Some devices (like virtual ethernet links) support running a second XDP program after the redirect. However, the final consumer doesn’t have access to the original hardware descriptor and can’t access any of the original metadata. The same applies to XDP programs installed into devmaps and cpumaps.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK`hjhhubh)}(hXThis means that for redirected packets only custom metadata is currently supported, which has to be prepared by the initial XDP program before redirect. If the frame is eventually passed to the kernel, the ``skb`` created from such a frame won't have any hardware metadata populated in its ``skb``. If such a packet is later redirected into an ``XSK``, that will also only have access to the custom metadata.h](hThis means that for redirected packets only custom metadata is currently supported, which has to be prepared by the initial XDP program before redirect. If the frame is eventually passed to the kernel, the }(hj0hhhNhNubj)}(h``skb``h]hskb}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubhO created from such a frame won’t have any hardware metadata populated in its }(hj0hhhNhNubj)}(h``skb``h]hskb}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh/. If such a packet is later redirected into an }(hj0hhhNhNubj)}(h``XSK``h]hXSK}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh9, that will also only have access to the custom metadata.}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKghjhhubeh}(h]bpf-redirect-mapah ]h"]bpf_redirect_mapah$]h&]uh1hhhhhhhhK^ubh)}(hhh](h)}(h bpf_tail_callh]h bpf_tail_call}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hhhhhKoubh)}(hjAdding programs that access metadata kfuncs to the ``BPF_MAP_TYPE_PROG_ARRAY`` is currently not supported.h](h3Adding programs that access metadata kfuncs to the }(hjhhhNhNubj)}(h``BPF_MAP_TYPE_PROG_ARRAY``h]hBPF_MAP_TYPE_PROG_ARRAY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is currently not supported.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKqhj|hhubeh}(h] bpf-tail-callah ]h"] bpf_tail_callah$]h&]uh1hhhhhhhhKoubh)}(hhh](h)}(hSupported Devicesh]hSupported Devices}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKuubh)}(hIt is possible to query which kfunc the particular netdev implements via netlink. See ``xdp-rx-metadata-features`` attribute set in ``Documentation/netlink/specs/netdev.yaml``.h](hVIt is possible to query which kfunc the particular netdev implements via netlink. See }(hjhhhNhNubj)}(h``xdp-rx-metadata-features``h]hxdp-rx-metadata-features}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh attribute set in }(hjhhhNhNubj)}(h+``Documentation/netlink/specs/netdev.yaml``h]h'Documentation/netlink/specs/netdev.yaml}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKwhjhhubeh}(h]supported-devicesah ]h"]supported devicesah$]h&]uh1hhhhhhhhKuubh)}(hhh](h)}(hDriver Implementationh]hDriver Implementation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK|ubh)}(hX=Certain devices may prepend metadata to received packets. However, as of now, ``AF_XDP`` lacks the ability to communicate the size of the ``data_meta`` area to the consumer. Therefore, it is the responsibility of the driver to copy any device-reserved metadata out from the metadata area and ensure that ``xdp_buff->data_meta`` is pointing to ``xdp_buff->data`` before presenting the frame to the XDP program. This is necessary so that, after the XDP program adjusts the metadata area, the consumer can reliably retrieve the metadata address using ``METADATA_SIZE`` offset.h](hNCertain devices may prepend metadata to received packets. However, as of now, }(hjhhhNhNubj)}(h ``AF_XDP``h]hAF_XDP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh2 lacks the ability to communicate the size of the }(hjhhhNhNubj)}(h ``data_meta``h]h data_meta}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh area to the consumer. Therefore, it is the responsibility of the driver to copy any device-reserved metadata out from the metadata area and ensure that }(hjhhhNhNubj)}(h``xdp_buff->data_meta``h]hxdp_buff->data_meta}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is pointing to }(hjhhhNhNubj)}(h``xdp_buff->data``h]hxdp_buff->data}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh before presenting the frame to the XDP program. This is necessary so that, after the XDP program adjusts the metadata area, the consumer can reliably retrieve the metadata address using }(hjhhhNhNubj)}(h``METADATA_SIZE``h]h METADATA_SIZE}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh offset.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK~hjhhubh)}(hThe following diagram shows how custom metadata is positioned relative to the packet data and how pointers are adjusted for metadata access::h]hThe following diagram shows how custom metadata is positioned relative to the packet data and how pointers are adjusted for metadata access:}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj )}(hX  |<-- bpf_xdp_adjust_meta(xdp_buff, -METADATA_SIZE) --| new xdp_buff->data_meta old xdp_buff->data_meta | | | xdp_buff->data | | +----------+----------------------------------------------------+------+ | headroom | custom metadata | data | +----------+----------------------------------------------------+------+ | | | xdp_desc->addr |<------ xsk_umem__get_data() - METADATA_SIZE -------|h]hX  |<-- bpf_xdp_adjust_meta(xdp_buff, -METADATA_SIZE) --| new xdp_buff->data_meta old xdp_buff->data_meta | | | xdp_buff->data | | +----------+----------------------------------------------------+------+ | headroom | custom metadata | data | +----------+----------------------------------------------------+------+ | | | xdp_desc->addr |<------ xsk_umem__get_data() - METADATA_SIZE -------|}hjsbah}(h]h ]h"]h$]h&]hhuh1j hhhKhjhhubh)}(hX=``bpf_xdp_adjust_meta`` ensures that ``METADATA_SIZE`` is aligned to 4 bytes, does not exceed 252 bytes, and leaves sufficient space for building the xdp_frame. If these conditions are not met, it returns a negative error. In this case, the BPF program should not proceed to populate data into the ``data_meta`` area.h](j)}(h``bpf_xdp_adjust_meta``h]hbpf_xdp_adjust_meta}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh ensures that }(hjhhhNhNubj)}(h``METADATA_SIZE``h]h METADATA_SIZE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is aligned to 4 bytes, does not exceed 252 bytes, and leaves sufficient space for building the xdp_frame. If these conditions are not met, it returns a negative error. In this case, the BPF program should not proceed to populate data into the }(hjhhhNhNubj)}(h ``data_meta``h]h data_meta}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh area.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]driver-implementationah ]h"]driver implementationah$]h&]uh1hhhhhhhhK|ubh)}(hhh](h)}(hExampleh]hExample}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hSee ``tools/testing/selftests/bpf/progs/xdp_metadata.c`` and ``tools/testing/selftests/bpf/prog_tests/xdp_metadata.c`` for an example of BPF program that handles XDP metadata.h](hSee }(hjhhhNhNubj)}(h4``tools/testing/selftests/bpf/progs/xdp_metadata.c``h]h0tools/testing/selftests/bpf/progs/xdp_metadata.c}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h9``tools/testing/selftests/bpf/prog_tests/xdp_metadata.c``h]h5tools/testing/selftests/bpf/prog_tests/xdp_metadata.c}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh9 for an example of BPF program that handles XDP metadata.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]exampleah ]h"]exampleah$]h&]uh1hhhhhhhhKubeh}(h]xdp-rx-metadataah ]h"]xdp rx metadataah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjSerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j-j*j" j jMjJjjjyjvjjjjjjj%j"u nametypes}(j-j" jMjjyjjjj%uh}(j*hj hjOjXjEjJj5j:jJj% jjPjvjjj|jjjjj"ju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.