msphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget$/translations/zh_CN/bpf/bpf_prog_runmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/zh_TW/bpf/bpf_prog_runmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/it_IT/bpf/bpf_prog_runmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/ja_JP/bpf/bpf_prog_runmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/ko_KR/bpf/bpf_prog_runmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/sp_SP/bpf/bpf_prog_runmodnameN 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/bpf/bpf_prog_run.rsthKubhsection)}(hhh](htitle)}(h#Running BPF programs from userspaceh]h#Running BPF programs from userspace}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(h^This document describes the ``BPF_PROG_RUN`` facility for running BPF programs from userspace.h](hThis document describes the }(hhhhhNhNubhliteral)}(h``BPF_PROG_RUN``h]h BPF_PROG_RUN}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh2 facility for running BPF programs from userspace.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhtopic)}(hhh]h bullet_list)}(hhh](h list_item)}(hhh]h)}(hhh]h reference)}(hhh]hOverview}(hjhhhNhNubah}(h]id1ah ]h"]h$]h&]refidoverviewuh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]j)}(hhh]h-Running XDP programs in “live frame mode”}(hj#hhhNhNubah}(h]id2ah ]h"]h$]h&]refid'running-xdp-programs-in-live-frame-modeuh1hhj ubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhNhNubah}(h]contentsah ](contentslocaleh"]contentsah$]h&]uh1hhhhK hhhhubh)}(hhh](h)}(hOverviewh]hOverview}(hjRhhhNhNubah}(h]h ]h"]h$]h&]refidj uh1hhjOhhhhhKubh)}(hXThe ``BPF_PROG_RUN`` command can be used through the ``bpf()`` syscall to execute a BPF program in the kernel and return the results to userspace. This can be used to unit test BPF programs against user-supplied context objects, and as way to explicitly execute programs in the kernel for their side effects. The command was previously named ``BPF_PROG_TEST_RUN``, and both constants continue to be defined in the UAPI header, aliased to the same value.h](hThe }(hjahhhNhNubh)}(h``BPF_PROG_RUN``h]h BPF_PROG_RUN}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjaubh! command can be used through the }(hjahhhNhNubh)}(h ``bpf()``h]hbpf()}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjaubhX syscall to execute a BPF program in the kernel and return the results to userspace. This can be used to unit test BPF programs against user-supplied context objects, and as way to explicitly execute programs in the kernel for their side effects. The command was previously named }(hjahhhNhNubh)}(h``BPF_PROG_TEST_RUN``h]hBPF_PROG_TEST_RUN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjaubhZ, and both constants continue to be defined in the UAPI header, aliased to the same value.}(hjahhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjOhhubh)}(hXThe ``BPF_PROG_RUN`` command can be used to execute BPF programs of the following types:h](hThe }(hjhhhNhNubh)}(h``BPF_PROG_RUN``h]h BPF_PROG_RUN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhD command can be used to execute BPF programs of the following types:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjOhhubh)}(hhh](h)}(h``BPF_PROG_TYPE_SOCKET_FILTER``h]h)}(hjh]h)}(hjh]hBPF_PROG_TYPE_SOCKET_FILTER}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(h``BPF_PROG_TYPE_SCHED_CLS``h]h)}(hjh]h)}(hjh]hBPF_PROG_TYPE_SCHED_CLS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(h``BPF_PROG_TYPE_SCHED_ACT``h]h)}(hj h]h)}(hj h]hBPF_PROG_TYPE_SCHED_ACT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(h``BPF_PROG_TYPE_XDP``h]h)}(hj*h]h)}(hj*h]hBPF_PROG_TYPE_XDP}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,ubah}(h]h ]h"]h$]h&]uh1hhhhKhj(ubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(h``BPF_PROG_TYPE_SK_LOOKUP``h]h)}(hjJh]h)}(hjJh]hBPF_PROG_TYPE_SK_LOOKUP}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLubah}(h]h ]h"]h$]h&]uh1hhhhK hjHubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(h``BPF_PROG_TYPE_CGROUP_SKB``h]h)}(hjjh]h)}(hjjh]hBPF_PROG_TYPE_CGROUP_SKB}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlubah}(h]h ]h"]h$]h&]uh1hhhhK!hjhubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(h``BPF_PROG_TYPE_LWT_IN``h]h)}(hjh]h)}(hjh]hBPF_PROG_TYPE_LWT_IN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhhK"hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(h``BPF_PROG_TYPE_LWT_OUT``h]h)}(hjh]h)}(hjh]hBPF_PROG_TYPE_LWT_OUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(h``BPF_PROG_TYPE_LWT_XMIT``h]h)}(hjh]h)}(hjh]hBPF_PROG_TYPE_LWT_XMIT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhhK$hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(h``BPF_PROG_TYPE_LWT_SEG6LOCAL``h]h)}(hjh]h)}(hjh]hBPF_PROG_TYPE_LWT_SEG6LOCAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhhK%hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(h ``BPF_PROG_TYPE_FLOW_DISSECTOR``h]h)}(hj h]h)}(hj h]hBPF_PROG_TYPE_FLOW_DISSECTOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1hhhhK&hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(h``BPF_PROG_TYPE_STRUCT_OPS``h]h)}(hj*h]h)}(hj*h]hBPF_PROG_TYPE_STRUCT_OPS}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,ubah}(h]h ]h"]h$]h&]uh1hhhhK'hj(ubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(h ``BPF_PROG_TYPE_RAW_TRACEPOINT``h]h)}(hjJh]h)}(hjJh]hBPF_PROG_TYPE_RAW_TRACEPOINT}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLubah}(h]h ]h"]h$]h&]uh1hhhhK(hjHubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(h``BPF_PROG_TYPE_SYSCALL`` h]h)}(h``BPF_PROG_TYPE_SYSCALL``h]h)}(hjnh]hBPF_PROG_TYPE_SYSCALL}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlubah}(h]h ]h"]h$]h&]uh1hhhhK)hjhubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1hhhhKhjOhhubh)}(hXLWhen using the ``BPF_PROG_RUN`` command, userspace supplies an input context object and (for program types operating on network packets) a buffer containing the packet data that the BPF program will operate on. The kernel will then execute the program and return the results to userspace. Note that programs will not have any side effects while being run in this mode; in particular, packets will not actually be redirected or dropped, the program return code will just be returned to userspace. A separate mode for live execution of XDP programs is provided, documented separately below.h](hWhen using the }(hjhhhNhNubh)}(h``BPF_PROG_RUN``h]h BPF_PROG_RUN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhX- command, userspace supplies an input context object and (for program types operating on network packets) a buffer containing the packet data that the BPF program will operate on. The kernel will then execute the program and return the results to userspace. Note that programs will not have any side effects while being run in this mode; in particular, packets will not actually be redirected or dropped, the program return code will just be returned to userspace. A separate mode for live execution of XDP programs is provided, documented separately below.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK+hjOhhubeh}(h]jah ]h"]overviewah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h)Running XDP programs in "live frame mode"h]h-Running XDP programs in “live frame mode”}(hjhhhNhNubah}(h]h ]h"]h$]h&]j`j,uh1hhjhhhhhK5ubh)}(hXThe ``BPF_PROG_RUN`` command has a separate mode for running live XDP programs, which can be used to execute XDP programs in a way where packets will actually be processed by the kernel after the execution of the XDP program as if they arrived on a physical interface. This mode is activated by setting the ``BPF_F_TEST_XDP_LIVE_FRAMES`` flag when supplying an XDP program to ``BPF_PROG_RUN``.h](hThe }(hjhhhNhNubh)}(h``BPF_PROG_RUN``h]h BPF_PROG_RUN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhX command has a separate mode for running live XDP programs, which can be used to execute XDP programs in a way where packets will actually be processed by the kernel after the execution of the XDP program as if they arrived on a physical interface. This mode is activated by setting the }(hjhhhNhNubh)}(h``BPF_F_TEST_XDP_LIVE_FRAMES``h]hBPF_F_TEST_XDP_LIVE_FRAMES}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh' flag when supplying an XDP program to }(hjhhhNhNubh)}(h``BPF_PROG_RUN``h]h BPF_PROG_RUN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK7hjhhubh)}(hXThe live packet mode is optimised for high performance execution of the supplied XDP program many times (suitable for, e.g., running as a traffic generator), which means the semantics are not quite as straight-forward as the regular test run mode. Specifically:h]hXThe live packet mode is optimised for high performance execution of the supplied XDP program many times (suitable for, e.g., running as a traffic generator), which means the semantics are not quite as straight-forward as the regular test run mode. Specifically:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK>hjhhubh)}(hhh](h)}(hX'When executing an XDP program in live frame mode, the result of the execution will not be returned to userspace; instead, the kernel will perform the operation indicated by the program's return code (drop the packet, redirect it, etc). For this reason, setting the ``data_out`` or ``ctx_out`` attributes in the syscall parameters when running in this mode will be rejected. In addition, not all failures will be reported back to userspace directly; specifically, only fatal errors in setup or during execution (like memory allocation errors) will halt execution and return an error. If an error occurs in packet processing, like a failure to redirect to a given interface, execution will continue with the next repetition; these errors can be detected via the same trace points as for regular XDP programs. h]h)}(hX&When executing an XDP program in live frame mode, the result of the execution will not be returned to userspace; instead, the kernel will perform the operation indicated by the program's return code (drop the packet, redirect it, etc). For this reason, setting the ``data_out`` or ``ctx_out`` attributes in the syscall parameters when running in this mode will be rejected. In addition, not all failures will be reported back to userspace directly; specifically, only fatal errors in setup or during execution (like memory allocation errors) will halt execution and return an error. If an error occurs in packet processing, like a failure to redirect to a given interface, execution will continue with the next repetition; these errors can be detected via the same trace points as for regular XDP programs.h](hX When executing an XDP program in live frame mode, the result of the execution will not be returned to userspace; instead, the kernel will perform the operation indicated by the program’s return code (drop the packet, redirect it, etc). For this reason, setting the }(hj"hhhNhNubh)}(h ``data_out``h]hdata_out}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"ubh or }(hj"hhhNhNubh)}(h ``ctx_out``h]hctx_out}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"ubhX attributes in the syscall parameters when running in this mode will be rejected. In addition, not all failures will be reported back to userspace directly; specifically, only fatal errors in setup or during execution (like memory allocation errors) will halt execution and return an error. If an error occurs in packet processing, like a failure to redirect to a given interface, execution will continue with the next repetition; these errors can be detected via the same trace points as for regular XDP programs.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKChjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(hXUserspace can supply an ifindex as part of the context object, just like in the regular (non-live) mode. The XDP program will be executed as though the packet arrived on this interface; i.e., the ``ingress_ifindex`` of the context object will point to that interface. Furthermore, if the XDP program returns ``XDP_PASS``, the packet will be injected into the kernel networking stack as though it arrived on that ifindex, and if it returns ``XDP_TX``, the packet will be transmitted *out* of that same interface. Do note, though, that because the program execution is not happening in driver context, an ``XDP_TX`` is actually turned into the same action as an ``XDP_REDIRECT`` to that same interface (i.e., it will only work if the driver has support for the ``ndo_xdp_xmit`` driver op). h]h)}(hXUserspace can supply an ifindex as part of the context object, just like in the regular (non-live) mode. The XDP program will be executed as though the packet arrived on this interface; i.e., the ``ingress_ifindex`` of the context object will point to that interface. Furthermore, if the XDP program returns ``XDP_PASS``, the packet will be injected into the kernel networking stack as though it arrived on that ifindex, and if it returns ``XDP_TX``, the packet will be transmitted *out* of that same interface. Do note, though, that because the program execution is not happening in driver context, an ``XDP_TX`` is actually turned into the same action as an ``XDP_REDIRECT`` to that same interface (i.e., it will only work if the driver has support for the ``ndo_xdp_xmit`` driver op).h](hUserspace can supply an ifindex as part of the context object, just like in the regular (non-live) mode. The XDP program will be executed as though the packet arrived on this interface; i.e., the }(hj^hhhNhNubh)}(h``ingress_ifindex``h]hingress_ifindex}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^ubh] of the context object will point to that interface. Furthermore, if the XDP program returns }(hj^hhhNhNubh)}(h ``XDP_PASS``h]hXDP_PASS}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^ubhw, the packet will be injected into the kernel networking stack as though it arrived on that ifindex, and if it returns }(hj^hhhNhNubh)}(h ``XDP_TX``h]hXDP_TX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^ubh!, the packet will be transmitted }(hj^hhhNhNubhemphasis)}(h*out*h]hout}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubht of that same interface. Do note, though, that because the program execution is not happening in driver context, an }(hj^hhhNhNubh)}(h ``XDP_TX``h]hXDP_TX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^ubh/ is actually turned into the same action as an }(hj^hhhNhNubh)}(h``XDP_REDIRECT``h]h XDP_REDIRECT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^ubhS to that same interface (i.e., it will only work if the driver has support for the }(hj^hhhNhNubh)}(h``ndo_xdp_xmit``h]h ndo_xdp_xmit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^ubh driver op).}(hj^hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKOhjZubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(hXWhen running the program with multiple repetitions, the execution will happen in batches. The batch size defaults to 64 packets (which is same as the maximum NAPI receive batch size), but can be specified by userspace through the ``batch_size`` parameter, up to a maximum of 256 packets. For each batch, the kernel executes the XDP program repeatedly, each invocation getting a separate copy of the packet data. For each repetition, if the program drops the packet, the data page is immediately recycled (see below). Otherwise, the packet is buffered until the end of the batch, at which point all packets buffered this way during the batch are transmitted at once. h]h)}(hXWhen running the program with multiple repetitions, the execution will happen in batches. The batch size defaults to 64 packets (which is same as the maximum NAPI receive batch size), but can be specified by userspace through the ``batch_size`` parameter, up to a maximum of 256 packets. For each batch, the kernel executes the XDP program repeatedly, each invocation getting a separate copy of the packet data. For each repetition, if the program drops the packet, the data page is immediately recycled (see below). Otherwise, the packet is buffered until the end of the batch, at which point all packets buffered this way during the batch are transmitted at once.h](hWhen running the program with multiple repetitions, the execution will happen in batches. The batch size defaults to 64 packets (which is same as the maximum NAPI receive batch size), but can be specified by userspace through the }(hjhhhNhNubh)}(h``batch_size``h]h batch_size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhX parameter, up to a maximum of 256 packets. For each batch, the kernel executes the XDP program repeatedly, each invocation getting a separate copy of the packet data. For each repetition, if the program drops the packet, the data page is immediately recycled (see below). Otherwise, the packet is buffered until the end of the batch, at which point all packets buffered this way during the batch are transmitted at once.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK[hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(hXWhen setting up the test run, the kernel will initialise a pool of memory pages of the same size as the batch size. Each memory page will be initialised with the initial packet data supplied by userspace at ``BPF_PROG_RUN`` invocation. When possible, the pages will be recycled on future program invocations, to improve performance. Pages will generally be recycled a full batch at a time, except when a packet is dropped (by return code or because of, say, a redirection error), in which case that page will be recycled immediately. If a packet ends up being passed to the regular networking stack (because the XDP program returns ``XDP_PASS``, or because it ends up being redirected to an interface that injects it into the stack), the page will be released and a new one will be allocated when the pool is empty. When recycling, the page content is not rewritten; only the packet boundary pointers (``data``, ``data_end`` and ``data_meta``) in the context object will be reset to the original values. This means that if a program rewrites the packet contents, it has to be prepared to see either the original content or the modified version on subsequent invocations.h](h)}(hX/When setting up the test run, the kernel will initialise a pool of memory pages of the same size as the batch size. Each memory page will be initialised with the initial packet data supplied by userspace at ``BPF_PROG_RUN`` invocation. When possible, the pages will be recycled on future program invocations, to improve performance. Pages will generally be recycled a full batch at a time, except when a packet is dropped (by return code or because of, say, a redirection error), in which case that page will be recycled immediately. If a packet ends up being passed to the regular networking stack (because the XDP program returns ``XDP_PASS``, or because it ends up being redirected to an interface that injects it into the stack), the page will be released and a new one will be allocated when the pool is empty.h](hWhen setting up the test run, the kernel will initialise a pool of memory pages of the same size as the batch size. Each memory page will be initialised with the initial packet data supplied by userspace at }(hj hhhNhNubh)}(h``BPF_PROG_RUN``h]h BPF_PROG_RUN}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubhX invocation. When possible, the pages will be recycled on future program invocations, to improve performance. Pages will generally be recycled a full batch at a time, except when a packet is dropped (by return code or because of, say, a redirection error), in which case that page will be recycled immediately. If a packet ends up being passed to the regular networking stack (because the XDP program returns }(hj hhhNhNubh)}(h ``XDP_PASS``h]hXDP_PASS}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh, or because it ends up being redirected to an interface that injects it into the stack), the page will be released and a new one will be allocated when the pool is empty.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKehjubh)}(hXbWhen recycling, the page content is not rewritten; only the packet boundary pointers (``data``, ``data_end`` and ``data_meta``) in the context object will be reset to the original values. This means that if a program rewrites the packet contents, it has to be prepared to see either the original content or the modified version on subsequent invocations.h](hVWhen recycling, the page content is not rewritten; only the packet boundary pointers (}(hjRhhhNhNubh)}(h``data``h]hdata}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRubh, }(hjRhhhNhNubh)}(h ``data_end``h]hdata_end}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRubh and }(hjRhhhNhNubh)}(h ``data_meta``h]h data_meta}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRubh) in the context object will be reset to the original values. This means that if a program rewrites the packet contents, it has to be prepared to see either the original content or the modified version on subsequent invocations.}(hjRhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKqhjubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1hhhhKChjhhubeh}(h]j2ah ]h"])running xdp programs in "live frame mode"ah$]h&]uh1hhhhhhhhK5ubeh}(h]#running-bpf-programs-from-userspaceah ]h"]#running bpf programs from userspaceah$]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_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _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}(jjjLjGjjjj2u nametypes}(jjLjjuh}(jhjGhjjOj2jj jj,j#u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages] transformerN include_log] decorationNhhub.