sphinx.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/cpumasksmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/zh_TW/bpf/cpumasksmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/it_IT/bpf/cpumasksmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/ja_JP/bpf/cpumasksmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/ko_KR/bpf/cpumasksmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/sp_SP/bpf/cpumasksmodnameN 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/cpumasks.rsthKubhtarget)}(h.. _cpumasks-header-label:h]h}(h]h ]h"]h$]h&]refidcpumasks-header-labeluh1hhKhhhhhhubhsection)}(hhh](htitle)}(hBPF cpumask kfuncsh]hBPF cpumask kfuncs}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h1. Introductionh]h1. Introduction}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(hX8``struct cpumask`` is a bitmap data structure in the kernel whose indices reflect the CPUs on the system. Commonly, cpumasks are used to track which CPUs a task is affinitized to, but they can also be used to e.g. track which cores are associated with a scheduling domain, which cores on a machine are idle, etc.h](hliteral)}(h``struct cpumask``h]hstruct cpumask}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubhX& is a bitmap data structure in the kernel whose indices reflect the CPUs on the system. Commonly, cpumasks are used to track which CPUs a task is affinitized to, but they can also be used to e.g. track which cores are associated with a scheduling domain, which cores on a machine are idle, etc.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(h~BPF provides programs with a set of :ref:`kfuncs-header-label` that can be used to allocate, mutate, query, and free cpumasks.h](h$BPF provides programs with a set of }(hjhhhNhNubh)}(h:ref:`kfuncs-header-label`h]hinline)}(hjh]hkfuncs-header-label}(hjhhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoc bpf/cpumasks refdomainj!reftyperef refexplicitrefwarn reftargetkfuncs-header-labeluh1hhhhKhjubh@ that can be used to allocate, mutate, query, and free cpumasks.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h] introductionah ]h"]1. introductionah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h2. BPF cpumask objectsh]h2. BPF cpumask objects}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhhhhhKubh)}(hKThere are two different types of cpumasks that can be used by BPF programs.h]hKThere are two different types of cpumasks that can be used by BPF programs.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjGhhubh)}(hhh](h)}(h2.1 ``struct bpf_cpumask *``h](h2.1 }(hjihhhNhNubh)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjiubeh}(h]h ]h"]h$]h&]uh1hhjfhhhhhKubh)}(hX``struct bpf_cpumask *`` is a cpumask that is allocated by BPF, on behalf of a BPF program, and whose lifecycle is entirely controlled by BPF. These cpumasks are RCU-protected, can be mutated, can be used as kptrs, and can be safely cast to a ``struct cpumask *``.h](h)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh is a cpumask that is allocated by BPF, on behalf of a BPF program, and whose lifecycle is entirely controlled by BPF. These cpumasks are RCU-protected, can be mutated, can be used as kptrs, and can be safely cast to a }(hjhhhNhNubh)}(h``struct cpumask *``h]hstruct cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjfhhubeh}(h]struct-bpf-cpumaskah ]h"]2.1 struct bpf_cpumask *ah$]h&]uh1hhjGhhhhhKubh)}(hhh](h)}(h(2.1.1 ``struct bpf_cpumask *`` lifecycleh](h2.1.1 }(hjhhhNhNubh)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh lifecycle}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhK#ubh)}(h_A ``struct bpf_cpumask *`` is allocated, acquired, and released, using the following functions:h](hA }(hjhhhNhNubh)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhE is allocated, acquired, and released, using the following functions:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK%hjhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singlebpf_cpumask_create (C function)c.bpf_cpumask_createhNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(h:__bpf_kfunc struct bpf_cpumask * bpf_cpumask_create (void)h]hdesc_signature_line)}(h8__bpf_kfunc struct bpf_cpumask *bpf_cpumask_create(void)h](h __bpf_kfunc}(hjhhhNhNubhdesc_sig_space)}(h h]h }(hj&hhhNhNubah}(h]h ]wah"]h$]h&]uh1j$hjhhhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK5ubhdesc_sig_keyword)}(hstructh]hstruct}(hj8hhhNhNubah}(h]h ]kah"]h$]h&]uh1j6hjhhhj5hK5ubj%)}(h h]h }(hjGhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjhhhj5hK5ubh)}(hhh]h desc_sig_name)}(h bpf_cpumaskh]h bpf_cpumask}(hjZhhhNhNubah}(h]h ]nah"]h$]h&]uh1jXhjUubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetj\modnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]jw ASTIdentifier)}jrbpf_cpumask_createsbc.bpf_cpumask_createasbuh1hhjhhhj5hK5ubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjhhhj5hK5ubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjhhhj5hK5ubh desc_name)}(hbpf_cpumask_createh]jY)}(hjh]hbpf_cpumask_create}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjhhhj5hK5ubhdesc_parameterlist)}(h(void)h]hdesc_parameter)}(hvoidh]hdesc_sig_keyword_type)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjhhhj5hK5ubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1jsphinx_line_type declaratorhjhhhj5hK5ubah}(h]j ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhj5hK5hjhhubh desc_content)}(hhh]h)}(hCreate a mutable BPF cpumask.h]hCreate a mutable BPF cpumask.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK(hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj5hK5ubeh}(h]h ](jpfunctioneh"]h$]h&]domainjpobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jhhhjhNhNubh container)}(hX**Parameters** ``void`` no arguments **Description** Allocates a cpumask that can be queried, mutated, acquired, and released by a BPF program. The cpumask returned by this function must either be embedded in a map as a kptr, or freed with bpf_cpumask_release(). bpf_cpumask_create() allocates memory using the BPF memory allocator, and will not block. It may return NULL if no memory is available. **Return** * A pointer to a new struct bpf_cpumask instance on success. * NULL if the BPF memory allocator is out of memory.h](h)}(h**Parameters**h]hstrong)}(hj,h]h Parameters}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj*ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK,hj&ubhdefinition_list)}(hhh]hdefinition_list_item)}(h``void`` no arguments h](hterm)}(h``void``h]h)}(hjSh]hvoid}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQubah}(h]h ]h"]h$]h&]uh1jOhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK/hjKubh definition)}(hhh]h)}(h no argumentsh]h no arguments}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhK/hjkubah}(h]h ]h"]h$]h&]uh1jihjKubeh}(h]h ]h"]h$]h&]uh1jIhjhhK/hjFubah}(h]h ]h"]h$]h&]uh1jDhj&ubh)}(h**Description**h]j/)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK1hj&ubh)}(hAllocates a cpumask that can be queried, mutated, acquired, and released by a BPF program. The cpumask returned by this function must either be embedded in a map as a kptr, or freed with bpf_cpumask_release().h]hAllocates a cpumask that can be queried, mutated, acquired, and released by a BPF program. The cpumask returned by this function must either be embedded in a map as a kptr, or freed with bpf_cpumask_release().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK)hj&ubh)}(hbpf_cpumask_create() allocates memory using the BPF memory allocator, and will not block. It may return NULL if no memory is available.h]hbpf_cpumask_create() allocates memory using the BPF memory allocator, and will not block. It may return NULL if no memory is available.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK-hj&ubh)}(h **Return**h]j/)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK0hj&ubh bullet_list)}(hhh](h list_item)}(h:A pointer to a new struct bpf_cpumask instance on success.h]h)}(hjh]h:A pointer to a new struct bpf_cpumask instance on success.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK1hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h2NULL if the BPF memory allocator is out of memory.h]h)}(hjh]h2NULL if the BPF memory allocator is out of memory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK2hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]bulletjuh1jhjhK1hj&ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j  bpf_cpumask_acquire (C function)c.bpf_cpumask_acquirehNtauh1jhjhhhNhNubj)}(hhh](j)}(hR__bpf_kfunc struct bpf_cpumask * bpf_cpumask_acquire (struct bpf_cpumask *cpumask)h]j)}(hP__bpf_kfunc struct bpf_cpumask *bpf_cpumask_acquire(struct bpf_cpumask *cpumask)h](h __bpf_kfunc}(hj6hhhNhNubj%)}(h h]h }(hj>hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj6hhhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKSubj7)}(hj:h]hstruct}(hjMhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj6hhhjLhKSubj%)}(h h]h }(hjZhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj6hhhjLhKSubh)}(hhh]jY)}(h bpf_cpumaskh]h bpf_cpumask}(hjkhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjhubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjmmodnameN classnameNjvjy)}j|]j)}jrbpf_cpumask_acquiresbc.bpf_cpumask_acquireasbuh1hhj6hhhjLhKSubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj6hhhjLhKSubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6hhhjLhKSubj)}(hbpf_cpumask_acquireh]jY)}(hjh]hbpf_cpumask_acquire}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhj6hhhjLhKSubj)}(h(struct bpf_cpumask *cpumask)h]j)}(hstruct bpf_cpumask *cpumaskh](j7)}(hj:h]hstruct}(hjhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubh)}(hhh]jY)}(h bpf_cpumaskh]h bpf_cpumask}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjmodnameN classnameNjvjy)}j|]jc.bpf_cpumask_acquireasbuh1hhjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjY)}(hcpumaskh]hcpumask}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhj6hhhjLhKSubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj2hhhjLhKSubah}(h]j-ah ](jjeh"]h$]h&]jj)jhuh1jhjLhKShj/hhubj)}(hhh]h)}(h%Acquire a reference to a BPF cpumask.h]h%Acquire a reference to a BPF cpumask.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKGhjDhhubah}(h]h ]h"]h$]h&]uh1jhj/hhhjLhKSubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjj_j j_j!j"j#uh1jhhhjhNhNubj%)}(hXp**Parameters** ``struct bpf_cpumask *cpumask`` The BPF cpumask being acquired. The cpumask must be a trusted pointer. **Description** Acquires a reference to a BPF cpumask. The cpumask returned by this function must either be embedded in a map as a kptr, or freed with bpf_cpumask_release(). **Return** * The struct bpf_cpumask pointer passed to the function.h](h)}(h**Parameters**h]j/)}(hjih]h Parameters}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjgubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKKhjcubjE)}(hhh]jJ)}(hg``struct bpf_cpumask *cpumask`` The BPF cpumask being acquired. The cpumask must be a trusted pointer. h](jP)}(h``struct bpf_cpumask *cpumask``h]h)}(hjh]hstruct bpf_cpumask *cpumask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jOhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKIhjubjj)}(hhh]h)}(hFThe BPF cpumask being acquired. The cpumask must be a trusted pointer.h]hFThe BPF cpumask being acquired. The cpumask must be a trusted pointer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKHhjubah}(h]h ]h"]h$]h&]uh1jihjubeh}(h]h ]h"]h$]h&]uh1jIhjhKIhjubah}(h]h ]h"]h$]h&]uh1jDhjcubh)}(h**Description**h]j/)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKKhjcubh)}(hAcquires a reference to a BPF cpumask. The cpumask returned by this function must either be embedded in a map as a kptr, or freed with bpf_cpumask_release().h]hAcquires a reference to a BPF cpumask. The cpumask returned by this function must either be embedded in a map as a kptr, or freed with bpf_cpumask_release().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKKhjcubh)}(h **Return**h]j/)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKOhjcubj)}(hhh]j)}(h6The struct bpf_cpumask pointer passed to the function.h]h)}(hjh]h6The struct bpf_cpumask pointer passed to the function.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKOhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhKOhjcubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j  bpf_cpumask_release (C function)c.bpf_cpumask_releasehNtauh1jhjhhhNhNubj)}(hhh](j)}(hB__bpf_kfunc void bpf_cpumask_release (struct bpf_cpumask *cpumask)h]j)}(hA__bpf_kfunc void bpf_cpumask_release(struct bpf_cpumask *cpumask)h](h __bpf_kfunc}(hj>hhhNhNubj%)}(h h]h }(hjFhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj>hhhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:46: ./kernel/bpf/cpumask.chKaubj)}(hvoidh]hvoid}(hjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>hhhjThKaubj%)}(h h]h }(hjchhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj>hhhjThKaubj)}(hbpf_cpumask_releaseh]jY)}(hbpf_cpumask_releaseh]hbpf_cpumask_release}(hjuhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjqubah}(h]h ](jjeh"]h$]h&]hhuh1jhj>hhhjThKaubj)}(h(struct bpf_cpumask *cpumask)h]j)}(hstruct bpf_cpumask *cpumaskh](j7)}(hj:h]hstruct}(hjhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubh)}(hhh]jY)}(h bpf_cpumaskh]h bpf_cpumask}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjmodnameN classnameNjvjy)}j|]j)}jrjwsbc.bpf_cpumask_releaseasbuh1hhjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjY)}(hcpumaskh]hcpumask}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhj>hhhjThKaubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj:hhhjThKaubah}(h]j5ah ](jjeh"]h$]h&]jj)jhuh1jhjThKahj7hhubj)}(hhh]h)}(h*Release a previously acquired BPF cpumask.h]h*Release a previously acquired BPF cpumask.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:46: ./kernel/bpf/cpumask.chKZhjhhubah}(h]h ]h"]h$]h&]uh1jhj7hhhjThKaubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjj,j j,j!j"j#uh1jhhhjhNhNubj%)}(hX"**Parameters** ``struct bpf_cpumask *cpumask`` The cpumask being released. **Description** Releases a previously acquired reference to a BPF cpumask. When the final reference of the BPF cpumask has been released, it is subsequently freed in an RCU callback in the BPF memory allocator.h](h)}(h**Parameters**h]j/)}(hj6h]h Parameters}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj4ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:46: ./kernel/bpf/cpumask.chK^hj0ubjE)}(hhh]jJ)}(h<``struct bpf_cpumask *cpumask`` The cpumask being released. h](jP)}(h``struct bpf_cpumask *cpumask``h]h)}(hjUh]hstruct bpf_cpumask *cpumask}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjSubah}(h]h ]h"]h$]h&]uh1jOhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:46: ./kernel/bpf/cpumask.chK[hjOubjj)}(hhh]h)}(hThe cpumask being released.h]hThe cpumask being released.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjhK[hjkubah}(h]h ]h"]h$]h&]uh1jihjOubeh}(h]h ]h"]h$]h&]uh1jIhjjhK[hjLubah}(h]h ]h"]h$]h&]uh1jDhj0ubh)}(h**Description**h]j/)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:46: ./kernel/bpf/cpumask.chK]hj0ubh)}(hReleases a previously acquired reference to a BPF cpumask. When the final reference of the BPF cpumask has been released, it is subsequently freed in an RCU callback in the BPF memory allocator.h]hReleases a previously acquired reference to a BPF cpumask. When the final reference of the BPF cpumask has been released, it is subsequently freed in an RCU callback in the BPF memory allocator.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:46: ./kernel/bpf/cpumask.chK]hj0ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hjhhhNhNubh)}(h For example:h]h For example:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjhhubh literal_block)}(hXstruct cpumask_map_value { struct bpf_cpumask __kptr * cpumask; }; struct array_map { __uint(type, BPF_MAP_TYPE_ARRAY); __type(key, int); __type(value, struct cpumask_map_value); __uint(max_entries, 65536); } cpumask_map SEC(".maps"); static int cpumask_map_insert(struct bpf_cpumask *mask, u32 pid) { struct cpumask_map_value local, *v; long status; struct bpf_cpumask *old; u32 key = pid; local.cpumask = NULL; status = bpf_map_update_elem(&cpumask_map, &key, &local, 0); if (status) { bpf_cpumask_release(mask); return status; } v = bpf_map_lookup_elem(&cpumask_map, &key); if (!v) { bpf_cpumask_release(mask); return -ENOENT; } old = bpf_kptr_xchg(&v->cpumask, mask); if (old) bpf_cpumask_release(old); return 0; } /** * A sample tracepoint showing how a task's cpumask can be queried and * recorded as a kptr. */ SEC("tp_btf/task_newtask") int BPF_PROG(record_task_cpumask, struct task_struct *task, u64 clone_flags) { struct bpf_cpumask *cpumask; int ret; cpumask = bpf_cpumask_create(); if (!cpumask) return -ENOMEM; if (!bpf_cpumask_full(task->cpus_ptr)) bpf_printk("task %s has CPU affinity", task->comm); bpf_cpumask_copy(cpumask, task->cpus_ptr); return cpumask_map_insert(cpumask, task->pid); }h]hXstruct cpumask_map_value { struct bpf_cpumask __kptr * cpumask; }; struct array_map { __uint(type, BPF_MAP_TYPE_ARRAY); __type(key, int); __type(value, struct cpumask_map_value); __uint(max_entries, 65536); } cpumask_map SEC(".maps"); static int cpumask_map_insert(struct bpf_cpumask *mask, u32 pid) { struct cpumask_map_value local, *v; long status; struct bpf_cpumask *old; u32 key = pid; local.cpumask = NULL; status = bpf_map_update_elem(&cpumask_map, &key, &local, 0); if (status) { bpf_cpumask_release(mask); return status; } v = bpf_map_lookup_elem(&cpumask_map, &key); if (!v) { bpf_cpumask_release(mask); return -ENOENT; } old = bpf_kptr_xchg(&v->cpumask, mask); if (old) bpf_cpumask_release(old); return 0; } /** * A sample tracepoint showing how a task's cpumask can be queried and * recorded as a kptr. */ SEC("tp_btf/task_newtask") int BPF_PROG(record_task_cpumask, struct task_struct *task, u64 clone_flags) { struct bpf_cpumask *cpumask; int ret; cpumask = bpf_cpumask_create(); if (!cpumask) return -ENOMEM; if (!bpf_cpumask_full(task->cpus_ptr)) bpf_printk("task %s has CPU affinity", task->comm); bpf_cpumask_copy(cpumask, task->cpus_ptr); return cpumask_map_insert(cpumask, task->pid); }}hjsbah}(h]h ]h"]h$]h&]hhforcelanguagejphighlight_args}uh1jhhhK3hjhhubeh}(h]struct-bpf-cpumask-lifecycleah ]h"]$2.1.1 struct bpf_cpumask * lifecycleah$]h&]uh1hhjGhhhhhK#ubh transition)}(h----h]h}(h]h ]h"]h$]h&]uh1jhhhKphjGhhubh)}(hhh](h)}(h'2.1.1 ``struct bpf_cpumask *`` as kptrsh](h2.1.1 }(hjhhhNhNubh)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh as kptrs}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhKsubh)}(hX As mentioned and illustrated above, these ``struct bpf_cpumask *`` objects can also be stored in a map and used as kptrs. If a ``struct bpf_cpumask *`` is in a map, the reference can be removed from the map with bpf_kptr_xchg(), or opportunistically acquired using RCU:h](h*As mentioned and illustrated above, these }(hjhhhNhNubh)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh= objects can also be stored in a map and used as kptrs. If a }(hjhhhNhNubh)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhv is in a map, the reference can be removed from the map with bpf_kptr_xchg(), or opportunistically acquired using RCU:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKuhjhhubj)}(hXc/* struct containing the struct bpf_cpumask kptr which is stored in the map. */ struct cpumasks_kfunc_map_value { struct bpf_cpumask __kptr * bpf_cpumask; }; /* The map containing struct cpumasks_kfunc_map_value entries. */ struct { __uint(type, BPF_MAP_TYPE_ARRAY); __type(key, int); __type(value, struct cpumasks_kfunc_map_value); __uint(max_entries, 1); } cpumasks_kfunc_map SEC(".maps"); /* ... */ /** * A simple example tracepoint program showing how a * struct bpf_cpumask * kptr that is stored in a map can * be passed to kfuncs using RCU protection. */ SEC("tp_btf/cgroup_mkdir") int BPF_PROG(cgrp_ancestor_example, struct cgroup *cgrp, const char *path) { struct bpf_cpumask *kptr; struct cpumasks_kfunc_map_value *v; u32 key = 0; /* Assume a bpf_cpumask * kptr was previously stored in the map. */ v = bpf_map_lookup_elem(&cpumasks_kfunc_map, &key); if (!v) return -ENOENT; bpf_rcu_read_lock(); /* Acquire a reference to the bpf_cpumask * kptr that's already stored in the map. */ kptr = v->cpumask; if (!kptr) { /* If no bpf_cpumask was present in the map, it's because * we're racing with another CPU that removed it with * bpf_kptr_xchg() between the bpf_map_lookup_elem() * above, and our load of the pointer from the map. */ bpf_rcu_read_unlock(); return -EBUSY; } bpf_cpumask_setall(kptr); bpf_rcu_read_unlock(); return 0; }h]hXc/* struct containing the struct bpf_cpumask kptr which is stored in the map. */ struct cpumasks_kfunc_map_value { struct bpf_cpumask __kptr * bpf_cpumask; }; /* The map containing struct cpumasks_kfunc_map_value entries. */ struct { __uint(type, BPF_MAP_TYPE_ARRAY); __type(key, int); __type(value, struct cpumasks_kfunc_map_value); __uint(max_entries, 1); } cpumasks_kfunc_map SEC(".maps"); /* ... */ /** * A simple example tracepoint program showing how a * struct bpf_cpumask * kptr that is stored in a map can * be passed to kfuncs using RCU protection. */ SEC("tp_btf/cgroup_mkdir") int BPF_PROG(cgrp_ancestor_example, struct cgroup *cgrp, const char *path) { struct bpf_cpumask *kptr; struct cpumasks_kfunc_map_value *v; u32 key = 0; /* Assume a bpf_cpumask * kptr was previously stored in the map. */ v = bpf_map_lookup_elem(&cpumasks_kfunc_map, &key); if (!v) return -ENOENT; bpf_rcu_read_lock(); /* Acquire a reference to the bpf_cpumask * kptr that's already stored in the map. */ kptr = v->cpumask; if (!kptr) { /* If no bpf_cpumask was present in the map, it's because * we're racing with another CPU that removed it with * bpf_kptr_xchg() between the bpf_map_lookup_elem() * above, and our load of the pointer from the map. */ bpf_rcu_read_unlock(); return -EBUSY; } bpf_cpumask_setall(kptr); bpf_rcu_read_unlock(); return 0; }}hjGsbah}(h]h ]h"]h$]h&]hhjjjpj}uh1jhhhKzhjhhubeh}(h]struct-bpf-cpumask-as-kptrsah ]h"]#2.1.1 struct bpf_cpumask * as kptrsah$]h&]uh1hhjGhhhhhKsubj)}(h----h]h}(h]h ]h"]h$]h&]uh1jhhhKhjGhhubh)}(hhh](h)}(h2.2 ``struct cpumask``h](h2.2 }(hjkhhhNhNubh)}(h``struct cpumask``h]hstruct cpumask}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhhKubh)}(hXi``struct cpumask`` is the object that actually contains the cpumask bitmap being queried, mutated, etc. A ``struct bpf_cpumask`` wraps a ``struct cpumask``, which is why it's safe to cast it as such (note however that it is **not** safe to cast a ``struct cpumask *`` to a ``struct bpf_cpumask *``, and the verifier will reject any program that tries to do so).h](h)}(h``struct cpumask``h]hstruct cpumask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhX is the object that actually contains the cpumask bitmap being queried, mutated, etc. A }(hjhhhNhNubh)}(h``struct bpf_cpumask``h]hstruct bpf_cpumask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh wraps a }(hjhhhNhNubh)}(h``struct cpumask``h]hstruct cpumask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhG, which is why it’s safe to cast it as such (note however that it is }(hjhhhNhNubj/)}(h**not**h]hnot}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubh safe to cast a }(hjhhhNhNubh)}(h``struct cpumask *``h]hstruct cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh to a }(hjhhhNhNubh)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh@, and the verifier will reject any program that tries to do so).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhhubh)}(hAs we'll see below, any kfunc that mutates its cpumask argument will take a ``struct bpf_cpumask *`` as that argument. Any argument that simply queries the cpumask will instead take a ``struct cpumask *``.h](hNAs we’ll see below, any kfunc that mutates its cpumask argument will take a }(hjhhhNhNubh)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhT as that argument. Any argument that simply queries the cpumask will instead take a }(hjhhhNhNubh)}(h``struct cpumask *``h]hstruct cpumask *}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhhubeh}(h]struct-cpumaskah ]h"]2.2 struct cpumaskah$]h&]uh1hhjGhhhhhKubeh}(h]bpf-cpumask-objectsah ]h"]2. bpf cpumask objectsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h3. cpumask kfuncsh]h3. cpumask kfuncs}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj? hhhhhKubh)}(hAbove, we described the kfuncs that can be used to allocate, acquire, release, etc a ``struct bpf_cpumask *``. This section of the document will describe the kfuncs for mutating and querying cpumasks.h](hUAbove, we described the kfuncs that can be used to allocate, acquire, release, etc a }(hjP hhhNhNubh)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjP ubh[. This section of the document will describe the kfuncs for mutating and querying cpumasks.}(hjP hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj? hhubh)}(hhh](h)}(h3.1 Mutating cpumasksh]h3.1 Mutating cpumasks}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjp hhhhhKubh)}(hSome cpumask kfuncs are "read-only" in that they don't mutate any of their arguments, whereas others mutate at least one argument (which means that the argument must be a ``struct bpf_cpumask *``, as described above).h](hSome cpumask kfuncs are “read-only” in that they don’t mutate any of their arguments, whereas others mutate at least one argument (which means that the argument must be a }(hj hhhNhNubh)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh, as described above).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjp hhubh)}(hThis section will describe all of the cpumask kfuncs which mutate at least one argument. :ref:`cpumasks-querying-label` below describes the read-only kfuncs.h](hYThis section will describe all of the cpumask kfuncs which mutate at least one argument. }(hj hhhNhNubh)}(h:ref:`cpumasks-querying-label`h]j)}(hj h]hcpumasks-querying-label}(hj hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj- refdomainj reftyperef refexplicitrefwarnj3cpumasks-querying-labeluh1hhhhKhj ubh& below describes the read-only kfuncs.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjp hhubeh}(h]mutating-cpumasksah ]h"]3.1 mutating cpumasksah$]h&]uh1hhj? hhhhhKubh)}(hhh](h)}(h3.1.1 Setting and clearing CPUsh]h3.1.1 Setting and clearing CPUs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(h~bpf_cpumask_set_cpu() and bpf_cpumask_clear_cpu() can be used to set and clear a CPU in a ``struct bpf_cpumask`` respectively:h](hZbpf_cpumask_set_cpu() and bpf_cpumask_clear_cpu() can be used to set and clear a CPU in a }(hj hhhNhNubh)}(h``struct bpf_cpumask``h]hstruct bpf_cpumask}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh respectively:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j  bpf_cpumask_set_cpu (C function)c.bpf_cpumask_set_cpuhNtauh1jhj hhhNhNubj)}(hhh](j)}(hK__bpf_kfunc void bpf_cpumask_set_cpu (u32 cpu, struct bpf_cpumask *cpumask)h]j)}(hJ__bpf_kfunc void bpf_cpumask_set_cpu(u32 cpu, struct bpf_cpumask *cpumask)h](h __bpf_kfunc}(hj! hhhNhNubj%)}(h h]h }(hj) hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj! hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKubj)}(hvoidh]hvoid}(hj8 hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj! hhhj7 hKubj%)}(h h]h }(hjF hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj! hhhj7 hKubj)}(hbpf_cpumask_set_cpuh]jY)}(hbpf_cpumask_set_cpuh]hbpf_cpumask_set_cpu}(hjX hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjT ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj! hhhj7 hKubj)}(h&(u32 cpu, struct bpf_cpumask *cpumask)h](j)}(hu32 cpuh](h)}(hhh]jY)}(hu32h]hu32}(hjw hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjt ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjy modnameN classnameNjvjy)}j|]j)}jrjZ sbc.bpf_cpumask_set_cpuasbuh1hhjp ubj%)}(h h]h }(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjp ubjY)}(hcpuh]hcpu}(hj hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjp ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjl ubj)}(hstruct bpf_cpumask *cpumaskh](j7)}(hj:h]hstruct}(hj hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj ubj%)}(h h]h }(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj ubh)}(hhh]jY)}(h bpf_cpumaskh]h bpf_cpumask}(hj hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj modnameN classnameNjvjy)}j|]j c.bpf_cpumask_set_cpuasbuh1hhj ubj%)}(h h]h }(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjY)}(hcpumaskh]hcpumask}(hj hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjl ubeh}(h]h ]h"]h$]h&]hhuh1jhj! hhhj7 hKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj hhhj7 hKubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jhj7 hKhj hhubj)}(hhh]h)}(h%Set a bit for a CPU in a BPF cpumask.h]h%Set a bit for a CPU in a BPF cpumask.}(hj? hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhj< hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj7 hKubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjjW j jW j!j"j#uh1jhhhj hNhNubj%)}(h**Parameters** ``u32 cpu`` The CPU to be set in the cpumask. ``struct bpf_cpumask *cpumask`` The BPF cpumask in which a bit is being set.h](h)}(h**Parameters**h]j/)}(hja h]h Parameters}(hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj_ ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhj[ ubjE)}(hhh](jJ)}(h.``u32 cpu`` The CPU to be set in the cpumask. h](jP)}(h ``u32 cpu``h]h)}(hj h]hu32 cpu}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~ ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhjz ubjj)}(hhh]h)}(h!The CPU to be set in the cpumask.h]h!The CPU to be set in the cpumask.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jihjz ubeh}(h]h ]h"]h$]h&]uh1jIhj hKhjw ubjJ)}(hL``struct bpf_cpumask *cpumask`` The BPF cpumask in which a bit is being set.h](jP)}(h``struct bpf_cpumask *cpumask``h]h)}(hj h]hstruct bpf_cpumask *cpumask}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhj ubjj)}(hhh]h)}(h,The BPF cpumask in which a bit is being set.h]h,The BPF cpumask in which a bit is being set.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhj ubah}(h]h ]h"]h$]h&]uh1jihj ubeh}(h]h ]h"]h$]h&]uh1jIhj hKhjw ubeh}(h]h ]h"]h$]h&]uh1jDhj[ ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j "bpf_cpumask_clear_cpu (C function)c.bpf_cpumask_clear_cpuhNtauh1jhj hhhNhNubj)}(hhh](j)}(hM__bpf_kfunc void bpf_cpumask_clear_cpu (u32 cpu, struct bpf_cpumask *cpumask)h]j)}(hL__bpf_kfunc void bpf_cpumask_clear_cpu(u32 cpu, struct bpf_cpumask *cpumask)h](h __bpf_kfunc}(hj hhhNhNubj%)}(h h]h }(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKubj)}(hvoidh]hvoid}(hj& hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj% hKubj%)}(h h]h }(hj4 hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj hhhj% hKubj)}(hbpf_cpumask_clear_cpuh]jY)}(hbpf_cpumask_clear_cpuh]hbpf_cpumask_clear_cpu}(hjF hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjB ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhj% hKubj)}(h&(u32 cpu, struct bpf_cpumask *cpumask)h](j)}(hu32 cpuh](h)}(hhh]jY)}(hu32h]hu32}(hje hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjb ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjg modnameN classnameNjvjy)}j|]j)}jrjH sbc.bpf_cpumask_clear_cpuasbuh1hhj^ ubj%)}(h h]h }(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj^ ubjY)}(hcpuh]hcpu}(hj hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj^ ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjZ ubj)}(hstruct bpf_cpumask *cpumaskh](j7)}(hj:h]hstruct}(hj hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj ubj%)}(h h]h }(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj ubh)}(hhh]jY)}(h bpf_cpumaskh]h bpf_cpumask}(hj hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj modnameN classnameNjvjy)}j|]j c.bpf_cpumask_clear_cpuasbuh1hhj ubj%)}(h h]h }(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjY)}(hcpumaskh]hcpumask}(hj hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjZ ubeh}(h]h ]h"]h$]h&]hhuh1jhj hhhj% hKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj hhhj% hKubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jhj% hKhj hhubj)}(hhh]h)}(h'Clear a bit for a CPU in a BPF cpumask.h]h'Clear a bit for a CPU in a BPF cpumask.}(hj- hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhj* hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj% hKubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjjE j jE j!j"j#uh1jhhhj hNhNubj%)}(h**Parameters** ``u32 cpu`` The CPU to be cleared from the cpumask. ``struct bpf_cpumask *cpumask`` The BPF cpumask in which a bit is being cleared.h](h)}(h**Parameters**h]j/)}(hjO h]h Parameters}(hjQ hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjM ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhjI ubjE)}(hhh](jJ)}(h4``u32 cpu`` The CPU to be cleared from the cpumask. h](jP)}(h ``u32 cpu``h]h)}(hjn h]hu32 cpu}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjl ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhjh ubjj)}(hhh]h)}(h'The CPU to be cleared from the cpumask.h]h'The CPU to be cleared from the cpumask.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jihjh ubeh}(h]h ]h"]h$]h&]uh1jIhj hKhje ubjJ)}(hP``struct bpf_cpumask *cpumask`` The BPF cpumask in which a bit is being cleared.h](jP)}(h``struct bpf_cpumask *cpumask``h]h)}(hj h]hstruct bpf_cpumask *cpumask}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhj ubjj)}(hhh]h)}(h0The BPF cpumask in which a bit is being cleared.h]h0The BPF cpumask in which a bit is being cleared.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhj ubah}(h]h ]h"]h$]h&]uh1jihj ubeh}(h]h ]h"]h$]h&]uh1jIhj hKhje ubeh}(h]h ]h"]h$]h&]uh1jDhjI ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj hhhNhNubh)}(hRThese kfuncs are pretty straightforward, and can be used, for example, as follows:h]hRThese kfuncs are pretty straightforward, and can be used, for example, as follows:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj)}(hX/** * A sample tracepoint showing how a cpumask can be queried. */ SEC("tp_btf/task_newtask") int BPF_PROG(test_set_clear_cpu, struct task_struct *task, u64 clone_flags) { struct bpf_cpumask *cpumask; cpumask = bpf_cpumask_create(); if (!cpumask) return -ENOMEM; bpf_cpumask_set_cpu(0, cpumask); if (!bpf_cpumask_test_cpu(0, cast(cpumask))) /* Should never happen. */ goto release_exit; bpf_cpumask_clear_cpu(0, cpumask); if (bpf_cpumask_test_cpu(0, cast(cpumask))) /* Should never happen. */ goto release_exit; /* struct cpumask * pointers such as task->cpus_ptr can also be queried. */ if (bpf_cpumask_test_cpu(0, task->cpus_ptr)) bpf_printk("task %s can use CPU %d", task->comm, 0); release_exit: bpf_cpumask_release(cpumask); return 0; }h]hX/** * A sample tracepoint showing how a cpumask can be queried. */ SEC("tp_btf/task_newtask") int BPF_PROG(test_set_clear_cpu, struct task_struct *task, u64 clone_flags) { struct bpf_cpumask *cpumask; cpumask = bpf_cpumask_create(); if (!cpumask) return -ENOMEM; bpf_cpumask_set_cpu(0, cpumask); if (!bpf_cpumask_test_cpu(0, cast(cpumask))) /* Should never happen. */ goto release_exit; bpf_cpumask_clear_cpu(0, cpumask); if (bpf_cpumask_test_cpu(0, cast(cpumask))) /* Should never happen. */ goto release_exit; /* struct cpumask * pointers such as task->cpus_ptr can also be queried. */ if (bpf_cpumask_test_cpu(0, task->cpus_ptr)) bpf_printk("task %s can use CPU %d", task->comm, 0); release_exit: bpf_cpumask_release(cpumask); return 0; }}hj sbah}(h]h ]h"]h$]h&]hhjjjpj}uh1jhhhKhj hhubj)}(h----h]h}(h]h ]h"]h$]h&]uh1jhhhKhj hhubh)}(hbpf_cpumask_test_and_set_cpu() and bpf_cpumask_test_and_clear_cpu() are complementary kfuncs that allow callers to atomically test and set (or clear) CPUs:h]hbpf_cpumask_test_and_set_cpu() and bpf_cpumask_test_and_clear_cpu() are complementary kfuncs that allow callers to atomically test and set (or clear) CPUs:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j )bpf_cpumask_test_and_set_cpu (C function)c.bpf_cpumask_test_and_set_cpuhNtauh1jhj hhhNhNubj)}(hhh](j)}(hT__bpf_kfunc bool bpf_cpumask_test_and_set_cpu (u32 cpu, struct bpf_cpumask *cpumask)h]j)}(hS__bpf_kfunc bool bpf_cpumask_test_and_set_cpu(u32 cpu, struct bpf_cpumask *cpumask)h](h __bpf_kfunc}(hj2hhhNhNubj%)}(h h]h }(hj:hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj2hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKubj)}(hboolh]hbool}(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2hhhjHhKubj%)}(h h]h }(hjWhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj2hhhjHhKubj)}(hbpf_cpumask_test_and_set_cpuh]jY)}(hbpf_cpumask_test_and_set_cpuh]hbpf_cpumask_test_and_set_cpu}(hjihhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjeubah}(h]h ](jjeh"]h$]h&]hhuh1jhj2hhhjHhKubj)}(h&(u32 cpu, struct bpf_cpumask *cpumask)h](j)}(hu32 cpuh](h)}(hhh]jY)}(hu32h]hu32}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjmodnameN classnameNjvjy)}j|]j)}jrjksbc.bpf_cpumask_test_and_set_cpuasbuh1hhjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubjY)}(hcpuh]hcpu}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj}ubj)}(hstruct bpf_cpumask *cpumaskh](j7)}(hj:h]hstruct}(hjhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubh)}(hhh]jY)}(h bpf_cpumaskh]h bpf_cpumask}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjmodnameN classnameNjvjy)}j|]jc.bpf_cpumask_test_and_set_cpuasbuh1hhjubj%)}(h h]h }(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjY)}(hcpumaskh]hcpumask}(hj&hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj}ubeh}(h]h ]h"]h$]h&]hhuh1jhj2hhhjHhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj.hhhjHhKubah}(h]j)ah ](jjeh"]h$]h&]jj)jhuh1jhjHhKhj+hhubj)}(hhh]h)}(h/Atomically test and set a CPU in a BPF cpumask.h]h/Atomically test and set a CPU in a BPF cpumask.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjMhhubah}(h]h ]h"]h$]h&]uh1jhj+hhhjHhKubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjjhj jhj!j"j#uh1jhhhj hNhNubj%)}(hX**Parameters** ``u32 cpu`` The CPU being set and queried for. ``struct bpf_cpumask *cpumask`` The BPF cpumask being set and queried for containing a CPU. **Return** * true - **cpu** is set in the cpumask * false - **cpu** was not set in the cpumask, or **cpu** is invalid.h](h)}(h**Parameters**h]j/)}(hjrh]h Parameters}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjpubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjlubjE)}(hhh](jJ)}(h/``u32 cpu`` The CPU being set and queried for. h](jP)}(h ``u32 cpu``h]h)}(hjh]hu32 cpu}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubjj)}(hhh]h)}(h"The CPU being set and queried for.h]h"The CPU being set and queried for.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jihjubeh}(h]h ]h"]h$]h&]uh1jIhjhKhjubjJ)}(h\``struct bpf_cpumask *cpumask`` The BPF cpumask being set and queried for containing a CPU. h](jP)}(h``struct bpf_cpumask *cpumask``h]h)}(hjh]hstruct bpf_cpumask *cpumask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubjj)}(hhh]h)}(h;The BPF cpumask being set and queried for containing a CPU.h]h;The BPF cpumask being set and queried for containing a CPU.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jihjubeh}(h]h ]h"]h$]h&]uh1jIhjhKhjubeh}(h]h ]h"]h$]h&]uh1jDhjlubh)}(h **Return**h]j/)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjlubj)}(hhh](j)}(h%true - **cpu** is set in the cpumaskh]h)}(hj h](htrue - }(hj"hhhNhNubj/)}(h**cpu**h]hcpu}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj"ubh is set in the cpumask}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hBfalse - **cpu** was not set in the cpumask, or **cpu** is invalid.h]h)}(hjJh](hfalse - }(hjLhhhNhNubj/)}(h**cpu**h]hcpu}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjLubh was not set in the cpumask, or }(hjLhhhNhNubj/)}(h**cpu**h]hcpu}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjLubh is invalid.}(hjLhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjHubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjAhKhjlubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j +bpf_cpumask_test_and_clear_cpu (C function) c.bpf_cpumask_test_and_clear_cpuhNtauh1jhj hhhNhNubj)}(hhh](j)}(hV__bpf_kfunc bool bpf_cpumask_test_and_clear_cpu (u32 cpu, struct bpf_cpumask *cpumask)h]j)}(hU__bpf_kfunc bool bpf_cpumask_test_and_clear_cpu(u32 cpu, struct bpf_cpumask *cpumask)h](h __bpf_kfunc}(hjhhhNhNubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjhhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKubj)}(hjKh]hbool}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjhhhjhKubj)}(hbpf_cpumask_test_and_clear_cpuh]jY)}(hbpf_cpumask_test_and_clear_cpuh]hbpf_cpumask_test_and_clear_cpu}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubj)}(h&(u32 cpu, struct bpf_cpumask *cpumask)h](j)}(hu32 cpuh](h)}(hhh]jY)}(hu32h]hu32}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjmodnameN classnameNjvjy)}j|]j)}jrjsb c.bpf_cpumask_test_and_clear_cpuasbuh1hhjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubjY)}(hcpuh]hcpu}(hj)hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct bpf_cpumask *cpumaskh](j7)}(hj:h]hstruct}(hjBhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj>ubj%)}(h h]h }(hjOhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj>ubh)}(hhh]jY)}(h bpf_cpumaskh]h bpf_cpumask}(hj`hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj]ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjbmodnameN classnameNjvjy)}j|]j c.bpf_cpumask_test_and_clear_cpuasbuh1hhj>ubj%)}(h h]h }(hj~hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj>ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubjY)}(hcpumaskh]hcpumask}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj>ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhKhjhhubj)}(hhh]h)}(h1Atomically test and clear a CPU in a BPF cpumask.h]h1Atomically test and clear a CPU in a BPF cpumask.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjjj jj!j"j#uh1jhhhj hNhNubj%)}(hX!**Parameters** ``u32 cpu`` The CPU being cleared and queried for. ``struct bpf_cpumask *cpumask`` The BPF cpumask being cleared and queried for containing a CPU. **Return** * true - **cpu** is set in the cpumask * false - **cpu** was not set in the cpumask, or **cpu** is invalid.h](h)}(h**Parameters**h]j/)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubjE)}(hhh](jJ)}(h3``u32 cpu`` The CPU being cleared and queried for. h](jP)}(h ``u32 cpu``h]h)}(hjh]hu32 cpu}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubjj)}(hhh]h)}(h&The CPU being cleared and queried for.h]h&The CPU being cleared and queried for.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jihjubeh}(h]h ]h"]h$]h&]uh1jIhjhKhjubjJ)}(h```struct bpf_cpumask *cpumask`` The BPF cpumask being cleared and queried for containing a CPU. h](jP)}(h``struct bpf_cpumask *cpumask``h]h)}(hj=h]hstruct bpf_cpumask *cpumask}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhj7ubjj)}(hhh]h)}(h?The BPF cpumask being cleared and queried for containing a CPU.h]h?The BPF cpumask being cleared and queried for containing a CPU.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhKhjSubah}(h]h ]h"]h$]h&]uh1jihj7ubeh}(h]h ]h"]h$]h&]uh1jIhjRhKhjubeh}(h]h ]h"]h$]h&]uh1jDhjubh)}(h **Return**h]j/)}(hjxh]hReturn}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjvubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubj)}(hhh](j)}(h%true - **cpu** is set in the cpumaskh]h)}(hjh](htrue - }(hjhhhNhNubj/)}(h**cpu**h]hcpu}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubh is set in the cpumask}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hBfalse - **cpu** was not set in the cpumask, or **cpu** is invalid.h]h)}(hjh](hfalse - }(hjhhhNhNubj/)}(h**cpu**h]hcpu}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubh was not set in the cpumask, or }(hjhhhNhNubj/)}(h**cpu**h]hcpu}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubh is invalid.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj hhhNhNubj)}(h----h]h}(h]h ]h"]h$]h&]uh1jhhhMhj hhubh)}(hWe can also set and clear entire ``struct bpf_cpumask *`` objects in one operation using bpf_cpumask_setall() and bpf_cpumask_clear():h](h!We can also set and clear entire }(hjhhhNhNubh)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhM objects in one operation using bpf_cpumask_setall() and bpf_cpumask_clear():}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j bpf_cpumask_setall (C function)c.bpf_cpumask_setallhNtauh1jhj hhhNhNubj)}(hhh](j)}(hA__bpf_kfunc void bpf_cpumask_setall (struct bpf_cpumask *cpumask)h]j)}(h@__bpf_kfunc void bpf_cpumask_setall(struct bpf_cpumask *cpumask)h](h __bpf_kfunc}(hjChhhNhNubj%)}(h h]h }(hjKhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjChhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKubj)}(hvoidh]hvoid}(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjChhhjYhKubj%)}(h h]h }(hjhhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjChhhjYhKubj)}(hbpf_cpumask_setallh]jY)}(hbpf_cpumask_setallh]hbpf_cpumask_setall}(hjzhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjvubah}(h]h ](jjeh"]h$]h&]hhuh1jhjChhhjYhKubj)}(h(struct bpf_cpumask *cpumask)h]j)}(hstruct bpf_cpumask *cpumaskh](j7)}(hj:h]hstruct}(hjhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubh)}(hhh]jY)}(h bpf_cpumaskh]h bpf_cpumask}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjmodnameN classnameNjvjy)}j|]j)}jrj|sbc.bpf_cpumask_setallasbuh1hhjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjY)}(hcpumaskh]hcpumask}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjChhhjYhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj?hhhjYhKubah}(h]j:ah ](jjeh"]h$]h&]jj)jhuh1jhjYhKhj<hhubj)}(hhh]h)}(h%Set all of the bits in a BPF cpumask.h]h%Set all of the bits in a BPF cpumask.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKhjhhubah}(h]h ]h"]h$]h&]uh1jhj<hhhjYhKubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjj1j j1j!j"j#uh1jhhhj hNhNubj%)}(h]**Parameters** ``struct bpf_cpumask *cpumask`` The BPF cpumask having all of its bits set.h](h)}(h**Parameters**h]j/)}(hj;h]h Parameters}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj9ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKhj5ubjE)}(hhh]jJ)}(hK``struct bpf_cpumask *cpumask`` The BPF cpumask having all of its bits set.h](jP)}(h``struct bpf_cpumask *cpumask``h]h)}(hjZh]hstruct bpf_cpumask *cpumask}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKhjTubjj)}(hhh]h)}(h+The BPF cpumask having all of its bits set.h]h+The BPF cpumask having all of its bits set.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKhjpubah}(h]h ]h"]h$]h&]uh1jihjTubeh}(h]h ]h"]h$]h&]uh1jIhjohKhjQubah}(h]h ]h"]h$]h&]uh1jDhj5ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j bpf_cpumask_clear (C function)c.bpf_cpumask_clearhNtauh1jhj hhhNhNubj)}(hhh](j)}(h@__bpf_kfunc void bpf_cpumask_clear (struct bpf_cpumask *cpumask)h]j)}(h?__bpf_kfunc void bpf_cpumask_clear(struct bpf_cpumask *cpumask)h](h __bpf_kfunc}(hjhhhNhNubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjhhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKubj)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjhhhjhKubj)}(hbpf_cpumask_clearh]jY)}(hbpf_cpumask_clearh]hbpf_cpumask_clear}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubj)}(h(struct bpf_cpumask *cpumask)h]j)}(hstruct bpf_cpumask *cpumaskh](j7)}(hj:h]hstruct}(hjhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubh)}(hhh]jY)}(h bpf_cpumaskh]h bpf_cpumask}(hj!hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj#modnameN classnameNjvjy)}j|]j)}jrjsbc.bpf_cpumask_clearasbuh1hhjubj%)}(h h]h }(hjAhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj)}(hjh]h*}(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjY)}(hcpumaskh]hcpumask}(hj\hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhKhjhhubj)}(hhh]h)}(h'Clear all of the bits in a BPF cpumask.h]h'Clear all of the bits in a BPF cpumask.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjjj jj!j"j#uh1jhhhj hNhNubj%)}(hP**Parameters** ``struct bpf_cpumask *cpumask`` The BPF cpumask being cleared.h](h)}(h**Parameters**h]j/)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKhjubjE)}(hhh]jJ)}(h>``struct bpf_cpumask *cpumask`` The BPF cpumask being cleared.h](jP)}(h``struct bpf_cpumask *cpumask``h]h)}(hjh]hstruct bpf_cpumask *cpumask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKhjubjj)}(hhh]h)}(hThe BPF cpumask being cleared.h]hThe BPF cpumask being cleared.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKhjubah}(h]h ]h"]h$]h&]uh1jihjubeh}(h]h ]h"]h$]h&]uh1jIhjhKhjubah}(h]h ]h"]h$]h&]uh1jDhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj hhhNhNubeh}(h]setting-and-clearing-cpusah ]h"]3.1.1 setting and clearing cpusah$]h&]uh1hhj? hhhhhKubh)}(hhh](h)}(h!3.1.2 Operations between cpumasksh]h!3.1.2 Operations between cpumasks}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hIn addition to setting and clearing individual CPUs in a single cpumask, callers can also perform bitwise operations between multiple cpumasks using bpf_cpumask_and(), bpf_cpumask_or(), and bpf_cpumask_xor():h]hIn addition to setting and clearing individual CPUs in a single cpumask, callers can also perform bitwise operations between multiple cpumasks using bpf_cpumask_and(), bpf_cpumask_or(), and bpf_cpumask_xor():}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j bpf_cpumask_and (C function)c.bpf_cpumask_andhNtauh1jhjhhhNhNubj)}(hhh](j)}(hr__bpf_kfunc bool bpf_cpumask_and (struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h]j)}(hq__bpf_kfunc bool bpf_cpumask_and(struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h](h __bpf_kfunc}(hjDhhhNhNubj%)}(h h]h }(hjLhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjDhhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM ubj)}(hjKh]hbool}(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDhhhjZhM ubj%)}(h h]h }(hjhhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjDhhhjZhM ubj)}(hbpf_cpumask_andh]jY)}(hbpf_cpumask_andh]hbpf_cpumask_and}(hjzhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjvubah}(h]h ](jjeh"]h$]h&]hhuh1jhjDhhhjZhM ubj)}(hQ(struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h](j)}(hstruct bpf_cpumask *dsth](j7)}(hj:h]hstruct}(hjhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubh)}(hhh]jY)}(h bpf_cpumaskh]h bpf_cpumask}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjmodnameN classnameNjvjy)}j|]j)}jrj|sbc.bpf_cpumask_andasbuh1hhjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjY)}(hdsth]hdst}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hconst struct cpumask *src1h](j7)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj7)}(hj:h]hstruct}(hj$hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hj1hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hjBhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj?ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjDmodnameN classnameNjvjy)}j|]jc.bpf_cpumask_andasbuh1hhjubj%)}(h h]h }(hj`hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj)}(hjh]h*}(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjY)}(hsrc1h]hsrc1}(hj{hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hconst struct cpumask *src2h](j7)}(hj h]hconst}(hjhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj7)}(hj:h]hstruct}(hjhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjmodnameN classnameNjvjy)}j|]jc.bpf_cpumask_andasbuh1hhjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjY)}(hsrc2h]hsrc2}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjDhhhjZhM ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj@hhhjZhM ubah}(h]j;ah ](jjeh"]h$]h&]jj)jhuh1jhjZhM hj=hhubj)}(hhh]h)}(h&AND two cpumasks and store the result.h]h&AND two cpumasks and store the result.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhj-hhubah}(h]h ]h"]h$]h&]uh1jhj=hhhjZhM ubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjjHj jHj!j"j#uh1jhhhjhNhNubj%)}(hX**Parameters** ``struct bpf_cpumask *dst`` The BPF cpumask where the result is being stored. ``const struct cpumask *src1`` The first input. ``const struct cpumask *src2`` The second input. **Return** * true - **dst** has at least one bit set following the operation * false - **dst** is empty following the operation **Description** struct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h)}(h**Parameters**h]j/)}(hjRh]h Parameters}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjPubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjLubjE)}(hhh](jJ)}(hN``struct bpf_cpumask *dst`` The BPF cpumask where the result is being stored. h](jP)}(h``struct bpf_cpumask *dst``h]h)}(hjqh]hstruct bpf_cpumask *dst}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjoubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjkubjj)}(hhh]h)}(h1The BPF cpumask where the result is being stored.h]h1The BPF cpumask where the result is being stored.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jihjkubeh}(h]h ]h"]h$]h&]uh1jIhjhMhjhubjJ)}(h0``const struct cpumask *src1`` The first input. h](jP)}(h``const struct cpumask *src1``h]h)}(hjh]hconst struct cpumask *src1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjubjj)}(hhh]h)}(hThe first input.h]hThe first input.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jihjubeh}(h]h ]h"]h$]h&]uh1jIhjhMhjhubjJ)}(h1``const struct cpumask *src2`` The second input. h](jP)}(h``const struct cpumask *src2``h]h)}(hjh]hconst struct cpumask *src2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjubjj)}(hhh]h)}(hThe second input.h]hThe second input.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jihjubeh}(h]h ]h"]h$]h&]uh1jIhjhMhjhubeh}(h]h ]h"]h$]h&]uh1jDhjLubh)}(h **Return**h]j/)}(hjh]hReturn}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjLubj)}(hhh](j)}(h@true - **dst** has at least one bit set following the operationh]h)}(hj9h](htrue - }(hj;hhhNhNubj/)}(h**dst**h]hdst}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj;ubh1 has at least one bit set following the operation}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhj7ubah}(h]h ]h"]h$]h&]uh1jhj4ubj)}(h1false - **dst** is empty following the operation h]h)}(h0false - **dst** is empty following the operationh](hfalse - }(hjehhhNhNubj/)}(h**dst**h]hdst}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjeubh! is empty following the operation}(hjehhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjaubah}(h]h ]h"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]jjuh1jhjZhMhjLubh)}(h**Description**h]j/)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM hjLubh)}(hJstruct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h4struct bpf_cpumask pointers may be safely passed to }(hjhhhNhNubj/)}(h**src1**h]hsrc1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubh and }(hjhhhNhNubj/)}(h**src2**h]hsrc2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM hjLubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j bpf_cpumask_or (C function)c.bpf_cpumask_orhNtauh1jhjhhhNhNubj)}(hhh](j)}(hq__bpf_kfunc void bpf_cpumask_or (struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h]j)}(hp__bpf_kfunc void bpf_cpumask_or(struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h](h __bpf_kfunc}(hjhhhNhNubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjhhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMubj)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjhhhjhMubj)}(hbpf_cpumask_orh]jY)}(hbpf_cpumask_orh]hbpf_cpumask_or}(hj0hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj,ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhMubj)}(hQ(struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h](j)}(hstruct bpf_cpumask *dsth](j7)}(hj:h]hstruct}(hjLhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjHubj%)}(h h]h }(hjYhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjHubh)}(hhh]jY)}(h bpf_cpumaskh]h bpf_cpumask}(hjjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjgubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjlmodnameN classnameNjvjy)}j|]j)}jrj2sbc.bpf_cpumask_orasbuh1hhjHubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjHubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubjY)}(hdsth]hdst}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjHubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjDubj)}(hconst struct cpumask *src1h](j7)}(hj h]hconst}(hjhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj7)}(hj:h]hstruct}(hjhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjmodnameN classnameNjvjy)}j|]jc.bpf_cpumask_orasbuh1hhjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj)}(hjh]h*}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjY)}(hsrc1h]hsrc1}(hj0hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjDubj)}(hconst struct cpumask *src2h](j7)}(hj h]hconst}(hjIhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjEubj%)}(h h]h }(hjVhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjEubj7)}(hj:h]hstruct}(hjdhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjEubj%)}(h h]h }(hjqhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjEubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjmodnameN classnameNjvjy)}j|]jc.bpf_cpumask_orasbuh1hhjEubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjEubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEubjY)}(hsrc2h]hsrc2}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjEubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjDubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjhhubj)}(hhh]h)}(h%OR two cpumasks and store the result.h]h%OR two cpumasks and store the result.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjjj jj!j"j#uh1jhhhjhNhNubj%)}(hX#**Parameters** ``struct bpf_cpumask *dst`` The BPF cpumask where the result is being stored. ``const struct cpumask *src1`` The first input. ``const struct cpumask *src2`` The second input. **Description** struct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h)}(h**Parameters**h]j/)}(hjh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjubjE)}(hhh](jJ)}(hN``struct bpf_cpumask *dst`` The BPF cpumask where the result is being stored. h](jP)}(h``struct bpf_cpumask *dst``h]h)}(hj&h]hstruct bpf_cpumask *dst}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhj ubjj)}(hhh]h)}(h1The BPF cpumask where the result is being stored.h]h1The BPF cpumask where the result is being stored.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hMhj<ubah}(h]h ]h"]h$]h&]uh1jihj ubeh}(h]h ]h"]h$]h&]uh1jIhj;hMhjubjJ)}(h0``const struct cpumask *src1`` The first input. h](jP)}(h``const struct cpumask *src1``h]h)}(hj_h]hconst struct cpumask *src1}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjYubjj)}(hhh]h)}(hThe first input.h]hThe first input.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthMhjuubah}(h]h ]h"]h$]h&]uh1jihjYubeh}(h]h ]h"]h$]h&]uh1jIhjthMhjubjJ)}(h1``const struct cpumask *src2`` The second input. h](jP)}(h``const struct cpumask *src2``h]h)}(hjh]hconst struct cpumask *src2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjubjj)}(hhh]h)}(hThe second input.h]hThe second input.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jihjubeh}(h]h ]h"]h$]h&]uh1jIhjhMhjubeh}(h]h ]h"]h$]h&]uh1jDhjubh)}(h**Description**h]j/)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjubh)}(hJstruct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h4struct bpf_cpumask pointers may be safely passed to }(hjhhhNhNubj/)}(h**src1**h]hsrc1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubh and }(hjhhhNhNubj/)}(h**src2**h]hsrc2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j bpf_cpumask_xor (C function)c.bpf_cpumask_xorhNtauh1jhjhhhNhNubj)}(hhh](j)}(hr__bpf_kfunc void bpf_cpumask_xor (struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h]j)}(hq__bpf_kfunc void bpf_cpumask_xor(struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h](h __bpf_kfunc}(hj8hhhNhNubj%)}(h h]h }(hj@hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj8hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM*ubj)}(hvoidh]hvoid}(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8hhhjNhM*ubj%)}(h h]h }(hj]hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj8hhhjNhM*ubj)}(hbpf_cpumask_xorh]jY)}(hbpf_cpumask_xorh]hbpf_cpumask_xor}(hjohhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjkubah}(h]h ](jjeh"]h$]h&]hhuh1jhj8hhhjNhM*ubj)}(hQ(struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h](j)}(hstruct bpf_cpumask *dsth](j7)}(hj:h]hstruct}(hjhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubh)}(hhh]jY)}(h bpf_cpumaskh]h bpf_cpumask}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjmodnameN classnameNjvjy)}j|]j)}jrjqsbc.bpf_cpumask_xorasbuh1hhjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjY)}(hdsth]hdst}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hconst struct cpumask *src1h](j7)}(hj h]hconst}(hjhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj7)}(hj:h]hstruct}(hjhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hj%hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hj6hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj3ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj8modnameN classnameNjvjy)}j|]jc.bpf_cpumask_xorasbuh1hhjubj%)}(h h]h }(hjThhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj)}(hjh]h*}(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjY)}(hsrc1h]hsrc1}(hjohhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hconst struct cpumask *src2h](j7)}(hj h]hconst}(hjhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj7)}(hj:h]hstruct}(hjhhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjmodnameN classnameNjvjy)}j|]jc.bpf_cpumask_xorasbuh1hhjubj%)}(h h]h }(hjhhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjY)}(hsrc2h]hsrc2}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhj8hhhjNhM*ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj4hhhjNhM*ubah}(h]j/ah ](jjeh"]h$]h&]jj)jhuh1jhjNhM*hj1hhubj)}(hhh]h)}(h&XOR two cpumasks and store the result.h]h&XOR two cpumasks and store the result.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM#hj!hhubah}(h]h ]h"]h$]h&]uh1jhj1hhhjNhM*ubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjj<j j<j!j"j#uh1jhhhjhNhNubj%)}(hX#**Parameters** ``struct bpf_cpumask *dst`` The BPF cpumask where the result is being stored. ``const struct cpumask *src1`` The first input. ``const struct cpumask *src2`` The second input. **Description** struct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h)}(h**Parameters**h]j/)}(hjFh]h Parameters}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjDubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM'hj@ubjE)}(hhh](jJ)}(hN``struct bpf_cpumask *dst`` The BPF cpumask where the result is being stored. h](jP)}(h``struct bpf_cpumask *dst``h]h)}(hjeh]hstruct bpf_cpumask *dst}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM$hj_ubjj)}(hhh]h)}(h1The BPF cpumask where the result is being stored.h]h1The BPF cpumask where the result is being stored.}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhM$hj{ubah}(h]h ]h"]h$]h&]uh1jihj_ubeh}(h]h ]h"]h$]h&]uh1jIhjzhM$hj\ubjJ)}(h0``const struct cpumask *src1`` The first input. h](jP)}(h``const struct cpumask *src1``h]h)}(hjh]hconst struct cpumask *src1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM%hjubjj)}(hhh]h)}(hThe first input.h]hThe first input.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM%hjubah}(h]h ]h"]h$]h&]uh1jihjubeh}(h]h ]h"]h$]h&]uh1jIhjhM%hj\ubjJ)}(h1``const struct cpumask *src2`` The second input. h](jP)}(h``const struct cpumask *src2``h]h)}(hjh]hconst struct cpumask *src2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM&hjubjj)}(hhh]h)}(hThe second input.h]hThe second input.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM&hjubah}(h]h ]h"]h$]h&]uh1jihjubeh}(h]h ]h"]h$]h&]uh1jIhjhM&hj\ubeh}(h]h ]h"]h$]h&]uh1jDhj@ubh)}(h**Description**h]j/)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM(hj@ubh)}(hJstruct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h4struct bpf_cpumask pointers may be safely passed to }(hj( hhhNhNubj/)}(h**src1**h]hsrc1}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj( ubh and }(hj( hhhNhNubj/)}(h**src2**h]hsrc2}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj( ubh.}(hj( hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM(hj@ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hjhhhNhNubh)}(hThe following is an example of how they may be used. Note that some of the kfuncs shown in this example will be covered in more detail below.h]hThe following is an example of how they may be used. Note that some of the kfuncs shown in this example will be covered in more detail below.}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(hX/** * A sample tracepoint showing how a cpumask can be mutated using bitwise operators (and queried). */ SEC("tp_btf/task_newtask") int BPF_PROG(test_and_or_xor, struct task_struct *task, u64 clone_flags) { struct bpf_cpumask *mask1, *mask2, *dst1, *dst2; mask1 = bpf_cpumask_create(); if (!mask1) return -ENOMEM; mask2 = bpf_cpumask_create(); if (!mask2) { bpf_cpumask_release(mask1); return -ENOMEM; } // ...Safely create the other two masks... */ bpf_cpumask_set_cpu(0, mask1); bpf_cpumask_set_cpu(1, mask2); bpf_cpumask_and(dst1, (const struct cpumask *)mask1, (const struct cpumask *)mask2); if (!bpf_cpumask_empty((const struct cpumask *)dst1)) /* Should never happen. */ goto release_exit; bpf_cpumask_or(dst1, (const struct cpumask *)mask1, (const struct cpumask *)mask2); if (!bpf_cpumask_test_cpu(0, (const struct cpumask *)dst1)) /* Should never happen. */ goto release_exit; if (!bpf_cpumask_test_cpu(1, (const struct cpumask *)dst1)) /* Should never happen. */ goto release_exit; bpf_cpumask_xor(dst2, (const struct cpumask *)mask1, (const struct cpumask *)mask2); if (!bpf_cpumask_equal((const struct cpumask *)dst1, (const struct cpumask *)dst2)) /* Should never happen. */ goto release_exit; release_exit: bpf_cpumask_release(mask1); bpf_cpumask_release(mask2); bpf_cpumask_release(dst1); bpf_cpumask_release(dst2); return 0; }h]hX/** * A sample tracepoint showing how a cpumask can be mutated using bitwise operators (and queried). */ SEC("tp_btf/task_newtask") int BPF_PROG(test_and_or_xor, struct task_struct *task, u64 clone_flags) { struct bpf_cpumask *mask1, *mask2, *dst1, *dst2; mask1 = bpf_cpumask_create(); if (!mask1) return -ENOMEM; mask2 = bpf_cpumask_create(); if (!mask2) { bpf_cpumask_release(mask1); return -ENOMEM; } // ...Safely create the other two masks... */ bpf_cpumask_set_cpu(0, mask1); bpf_cpumask_set_cpu(1, mask2); bpf_cpumask_and(dst1, (const struct cpumask *)mask1, (const struct cpumask *)mask2); if (!bpf_cpumask_empty((const struct cpumask *)dst1)) /* Should never happen. */ goto release_exit; bpf_cpumask_or(dst1, (const struct cpumask *)mask1, (const struct cpumask *)mask2); if (!bpf_cpumask_test_cpu(0, (const struct cpumask *)dst1)) /* Should never happen. */ goto release_exit; if (!bpf_cpumask_test_cpu(1, (const struct cpumask *)dst1)) /* Should never happen. */ goto release_exit; bpf_cpumask_xor(dst2, (const struct cpumask *)mask1, (const struct cpumask *)mask2); if (!bpf_cpumask_equal((const struct cpumask *)dst1, (const struct cpumask *)dst2)) /* Should never happen. */ goto release_exit; release_exit: bpf_cpumask_release(mask1); bpf_cpumask_release(mask2); bpf_cpumask_release(dst1); bpf_cpumask_release(dst2); return 0; }}hjp sbah}(h]h ]h"]h$]h&]hhjjjpj}uh1jhhhMhjhhubj)}(h----h]h}(h]h ]h"]h$]h&]uh1jhhhMOhjhhubh)}(hTThe contents of an entire cpumask may be copied to another using bpf_cpumask_copy():h]hTThe contents of an entire cpumask may be copied to another using bpf_cpumask_copy():}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j bpf_cpumask_copy (C function)c.bpf_cpumask_copyhNtauh1jhjhhhNhNubj)}(hhh](j)}(hV__bpf_kfunc void bpf_cpumask_copy (struct bpf_cpumask *dst, const struct cpumask *src)h]j)}(hU__bpf_kfunc void bpf_cpumask_copy(struct bpf_cpumask *dst, const struct cpumask *src)h](h __bpf_kfunc}(hj hhhNhNubj%)}(h h]h }(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:340: ./kernel/bpf/cpumask.chMubj)}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj hMubj%)}(h h]h }(hj hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj hhhj hMubj)}(hbpf_cpumask_copyh]jY)}(hbpf_cpumask_copyh]hbpf_cpumask_copy}(hj hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhj hMubj)}(h4(struct bpf_cpumask *dst, const struct cpumask *src)h](j)}(hstruct bpf_cpumask *dsth](j7)}(hj:h]hstruct}(hj hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj ubj%)}(h h]h }(hj !hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj ubh)}(hhh]jY)}(h bpf_cpumaskh]h bpf_cpumask}(hj!hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj!ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj!modnameN classnameNjvjy)}j|]j)}jrj sbc.bpf_cpumask_copyasbuh1hhj ubj%)}(h h]h }(hj=!hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj ubj)}(hjh]h*}(hjK!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjY)}(hdsth]hdst}(hjX!hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hconst struct cpumask *srch](j7)}(hj h]hconst}(hjq!hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjm!ubj%)}(h h]h }(hj~!hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjm!ubj7)}(hj:h]hstruct}(hj!hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjm!ubj%)}(h h]h }(hj!hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjm!ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hj!hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj!ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj!modnameN classnameNjvjy)}j|]j9!c.bpf_cpumask_copyasbuh1hhjm!ubj%)}(h h]h }(hj!hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjm!ubj)}(hjh]h*}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjm!ubjY)}(hsrch]hsrc}(hj!hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjm!ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubeh}(h]h ]h"]h$]h&]hhuh1jhj hhhj hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj hhhj hMubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jhj hMhj hhubj)}(hhh]h)}(h2Copy the contents of a cpumask into a BPF cpumask.h]h2Copy the contents of a cpumask into a BPF cpumask.}(hj "hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:340: ./kernel/bpf/cpumask.chMhj "hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hMubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjj%"j j%"j!j"j#uh1jhhhjhNhNubj%)}(h**Parameters** ``struct bpf_cpumask *dst`` The BPF cpumask being copied into. ``const struct cpumask *src`` The cpumask being copied. **Description** A struct bpf_cpumask pointer may be safely passed to **src**.h](h)}(h**Parameters**h]j/)}(hj/"h]h Parameters}(hj1"hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj-"ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:340: ./kernel/bpf/cpumask.chMhj)"ubjE)}(hhh](jJ)}(h?``struct bpf_cpumask *dst`` The BPF cpumask being copied into. h](jP)}(h``struct bpf_cpumask *dst``h]h)}(hjN"h]hstruct bpf_cpumask *dst}(hjP"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjL"ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:340: ./kernel/bpf/cpumask.chMhjH"ubjj)}(hhh]h)}(h"The BPF cpumask being copied into.h]h"The BPF cpumask being copied into.}(hjg"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjc"hMhjd"ubah}(h]h ]h"]h$]h&]uh1jihjH"ubeh}(h]h ]h"]h$]h&]uh1jIhjc"hMhjE"ubjJ)}(h8``const struct cpumask *src`` The cpumask being copied. h](jP)}(h``const struct cpumask *src``h]h)}(hj"h]hconst struct cpumask *src}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:340: ./kernel/bpf/cpumask.chMhj"ubjj)}(hhh]h)}(hThe cpumask being copied.h]hThe cpumask being copied.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hMhj"ubah}(h]h ]h"]h$]h&]uh1jihj"ubeh}(h]h ]h"]h$]h&]uh1jIhj"hMhjE"ubeh}(h]h ]h"]h$]h&]uh1jDhj)"ubh)}(h**Description**h]j/)}(hj"h]h Description}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj"ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:340: ./kernel/bpf/cpumask.chMhj)"ubh)}(h=A struct bpf_cpumask pointer may be safely passed to **src**.h](h5A struct bpf_cpumask pointer may be safely passed to }(hj"hhhNhNubj/)}(h**src**h]hsrc}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj"ubh.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:340: ./kernel/bpf/cpumask.chMhj)"ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hjhhhNhNubj)}(h----h]h}(h]h ]h"]h$]h&]uh1jhhhMWhjhhubh)}(h.. _cpumasks-querying-label:h]h}(h]h ]h"]h$]h&]hcpumasks-querying-labeluh1hhMYhjhhhhubeh}(h]operations-between-cpumasksah ]h"]!3.1.2 operations between cpumasksah$]h&]uh1hhj? hhhhhMubh)}(hhh](h)}(h3.2 Querying cpumasksh]h3.2 Querying cpumasks}(hj #hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hhhhhM\ubh)}(h|In addition to the above kfuncs, there is also a set of read-only kfuncs that can be used to query the contents of cpumasks.h]h|In addition to the above kfuncs, there is also a set of read-only kfuncs that can be used to query the contents of cpumasks.}(hj.#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hj#hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j bpf_cpumask_first (C function)c.bpf_cpumask_firsthNtauh1jhj#hhhNhNubj)}(hhh](j)}(hA__bpf_kfunc u32 bpf_cpumask_first (const struct cpumask *cpumask)h]j)}(h@__bpf_kfunc u32 bpf_cpumask_first(const struct cpumask *cpumask)h](h __bpf_kfunc}(hjQ#hhhNhNubj%)}(h h]h }(hjY#hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjQ#hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKyubh)}(hhh]jY)}(hu32h]hu32}(hjk#hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjh#ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjm#modnameN classnameNjvjy)}j|]j)}jrbpf_cpumask_firstsbc.bpf_cpumask_firstasbuh1hhjQ#hhhjg#hKyubj%)}(h h]h }(hj#hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjQ#hhhjg#hKyubj)}(hbpf_cpumask_firsth]jY)}(hj#h]hbpf_cpumask_first}(hj#hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj#ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjQ#hhhjg#hKyubj)}(h(const struct cpumask *cpumask)h]j)}(hconst struct cpumask *cpumaskh](j7)}(hj h]hconst}(hj#hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj#ubj%)}(h h]h }(hj#hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj#ubj7)}(hj:h]hstruct}(hj#hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj#ubj%)}(h h]h }(hj#hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj#ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hj#hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj#ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj#modnameN classnameNjvjy)}j|]j#c.bpf_cpumask_firstasbuh1hhj#ubj%)}(h h]h }(hj$hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj#ubj)}(hjh]h*}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubjY)}(hcpumaskh]hcpumask}(hj+$hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj#ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj#ubah}(h]h ]h"]h$]h&]hhuh1jhjQ#hhhjg#hKyubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjM#hhhjg#hKyubah}(h]jH#ah ](jjeh"]h$]h&]jj)jhuh1jhjg#hKyhjJ#hhubj)}(hhh]h)}(h6Get the index of the first nonzero bit in the cpumask.h]h6Get the index of the first nonzero bit in the cpumask.}(hjU$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKphjR$hhubah}(h]h ]h"]h$]h&]uh1jhjJ#hhhjg#hKyubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjjm$j jm$j!j"j#uh1jhhhj#hNhNubj%)}(hX%**Parameters** ``const struct cpumask *cpumask`` The cpumask being queried. **Description** Find the index of the first nonzero bit of the cpumask. A struct bpf_cpumask pointer may be safely passed to this function. **Return** * The index of the first nonzero bit in the struct cpumask.h](h)}(h**Parameters**h]j/)}(hjw$h]h Parameters}(hjy$hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hju$ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKthjq$ubjE)}(hhh]jJ)}(h=``const struct cpumask *cpumask`` The cpumask being queried. h](jP)}(h!``const struct cpumask *cpumask``h]h)}(hj$h]hconst struct cpumask *cpumask}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKqhj$ubjj)}(hhh]h)}(hThe cpumask being queried.h]hThe cpumask being queried.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hKqhj$ubah}(h]h ]h"]h$]h&]uh1jihj$ubeh}(h]h ]h"]h$]h&]uh1jIhj$hKqhj$ubah}(h]h ]h"]h$]h&]uh1jDhjq$ubh)}(h**Description**h]j/)}(hj$h]h Description}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj$ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKshjq$ubh)}(h{Find the index of the first nonzero bit of the cpumask. A struct bpf_cpumask pointer may be safely passed to this function.h]h{Find the index of the first nonzero bit of the cpumask. A struct bpf_cpumask pointer may be safely passed to this function.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKshjq$ubh)}(h **Return**h]j/)}(hj$h]hReturn}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj$ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKvhjq$ubj)}(hhh]j)}(h9The index of the first nonzero bit in the struct cpumask.h]h)}(hj%h]h9The index of the first nonzero bit in the struct cpumask.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKvhj%ubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]jjuh1jhj"%hKvhjq$ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j #bpf_cpumask_first_zero (C function)c.bpf_cpumask_first_zerohNtauh1jhj#hhhNhNubj)}(hhh](j)}(hF__bpf_kfunc u32 bpf_cpumask_first_zero (const struct cpumask *cpumask)h]j)}(hE__bpf_kfunc u32 bpf_cpumask_first_zero(const struct cpumask *cpumask)h](h __bpf_kfunc}(hjK%hhhNhNubj%)}(h h]h }(hjS%hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjK%hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKubh)}(hhh]jY)}(hu32h]hu32}(hje%hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjb%ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjg%modnameN classnameNjvjy)}j|]j)}jrbpf_cpumask_first_zerosbc.bpf_cpumask_first_zeroasbuh1hhjK%hhhja%hKubj%)}(h h]h }(hj%hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjK%hhhja%hKubj)}(hbpf_cpumask_first_zeroh]jY)}(hj%h]hbpf_cpumask_first_zero}(hj%hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj%ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjK%hhhja%hKubj)}(h(const struct cpumask *cpumask)h]j)}(hconst struct cpumask *cpumaskh](j7)}(hj h]hconst}(hj%hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj%ubj%)}(h h]h }(hj%hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj%ubj7)}(hj:h]hstruct}(hj%hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj%ubj%)}(h h]h }(hj%hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj%ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hj%hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj%ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj%modnameN classnameNjvjy)}j|]j%c.bpf_cpumask_first_zeroasbuh1hhj%ubj%)}(h h]h }(hj &hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj%ubj)}(hjh]h*}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubjY)}(hcpumaskh]hcpumask}(hj%&hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj%ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj%ubah}(h]h ]h"]h$]h&]hhuh1jhjK%hhhja%hKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjG%hhhja%hKubah}(h]jB%ah ](jjeh"]h$]h&]jj)jhuh1jhja%hKhjD%hhubj)}(hhh]h)}(h4Get the index of the first unset bit in the cpumask.h]h4Get the index of the first unset bit in the cpumask.}(hjO&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhjL&hhubah}(h]h ]h"]h$]h&]uh1jhjD%hhhja%hKubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjjg&j jg&j!j"j#uh1jhhhj#hNhNubj%)}(hX **Parameters** ``const struct cpumask *cpumask`` The cpumask being queried. **Description** Find the index of the first unset bit of the cpumask. A struct bpf_cpumask pointer may be safely passed to this function. **Return** * The index of the first zero bit in the struct cpumask.h](h)}(h**Parameters**h]j/)}(hjq&h]h Parameters}(hjs&hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjo&ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhjk&ubjE)}(hhh]jJ)}(h=``const struct cpumask *cpumask`` The cpumask being queried. h](jP)}(h!``const struct cpumask *cpumask``h]h)}(hj&h]hconst struct cpumask *cpumask}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj&ubjj)}(hhh]h)}(hThe cpumask being queried.h]hThe cpumask being queried.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hKhj&ubah}(h]h ]h"]h$]h&]uh1jihj&ubeh}(h]h ]h"]h$]h&]uh1jIhj&hKhj&ubah}(h]h ]h"]h$]h&]uh1jDhjk&ubh)}(h**Description**h]j/)}(hj&h]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj&ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhjk&ubh)}(hyFind the index of the first unset bit of the cpumask. A struct bpf_cpumask pointer may be safely passed to this function.h]hyFind the index of the first unset bit of the cpumask. A struct bpf_cpumask pointer may be safely passed to this function.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhjk&ubh)}(h **Return**h]j/)}(hj&h]hReturn}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj&ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhjk&ubj)}(hhh]j)}(h6The index of the first zero bit in the struct cpumask.h]h)}(hj 'h]h6The index of the first zero bit in the struct cpumask.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj 'ubah}(h]h ]h"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]jjuh1jhj'hKhjk&ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j "bpf_cpumask_first_and (C function)c.bpf_cpumask_first_andhNtauh1jhj#hhhNhNubj)}(hhh](j)}(h^__bpf_kfunc u32 bpf_cpumask_first_and (const struct cpumask *src1, const struct cpumask *src2)h]j)}(h]__bpf_kfunc u32 bpf_cpumask_first_and(const struct cpumask *src1, const struct cpumask *src2)h](h __bpf_kfunc}(hjE'hhhNhNubj%)}(h h]h }(hjM'hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjE'hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKubh)}(hhh]jY)}(hu32h]hu32}(hj_'hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj\'ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetja'modnameN classnameNjvjy)}j|]j)}jrbpf_cpumask_first_andsbc.bpf_cpumask_first_andasbuh1hhjE'hhhj['hKubj%)}(h h]h }(hj'hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjE'hhhj['hKubj)}(hbpf_cpumask_first_andh]jY)}(hj}'h]hbpf_cpumask_first_and}(hj'hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj'ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjE'hhhj['hKubj)}(h8(const struct cpumask *src1, const struct cpumask *src2)h](j)}(hconst struct cpumask *src1h](j7)}(hj h]hconst}(hj'hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj'ubj%)}(h h]h }(hj'hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj'ubj7)}(hj:h]hstruct}(hj'hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj'ubj%)}(h h]h }(hj'hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj'ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hj'hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj'ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj'modnameN classnameNjvjy)}j|]j{'c.bpf_cpumask_first_andasbuh1hhj'ubj%)}(h h]h }(hj(hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj'ubj)}(hjh]h*}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubjY)}(hsrc1h]hsrc1}(hj(hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj'ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj'ubj)}(hconst struct cpumask *src2h](j7)}(hj h]hconst}(hj8(hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj4(ubj%)}(h h]h }(hjE(hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj4(ubj7)}(hj:h]hstruct}(hjS(hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj4(ubj%)}(h h]h }(hj`(hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj4(ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hjq(hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjn(ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjs(modnameN classnameNjvjy)}j|]j{'c.bpf_cpumask_first_andasbuh1hhj4(ubj%)}(h h]h }(hj(hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj4(ubj)}(hjh]h*}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4(ubjY)}(hsrc2h]hsrc2}(hj(hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj4(ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj'ubeh}(h]h ]h"]h$]h&]hhuh1jhjE'hhhj['hKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjA'hhhj['hKubah}(h]j<'ah ](jjeh"]h$]h&]jj)jhuh1jhj['hKhj>'hhubj)}(hhh]h)}(hGReturn the index of the first nonzero bit from the AND of two cpumasks.h]hGReturn the index of the first nonzero bit from the AND of two cpumasks.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj(hhubah}(h]h ]h"]h$]h&]uh1jhj>'hhhj['hKubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjj(j j(j!j"j#uh1jhhhj#hNhNubj%)}(hXo**Parameters** ``const struct cpumask *src1`` The first cpumask. ``const struct cpumask *src2`` The second cpumask. **Description** Find the index of the first nonzero bit of the AND of two cpumasks. struct bpf_cpumask pointers may be safely passed to **src1** and **src2**. **Return** * The index of the first bit that is nonzero in both cpumask instances.h](h)}(h**Parameters**h]j/)}(hj(h]h Parameters}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj(ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj(ubjE)}(hhh](jJ)}(h2``const struct cpumask *src1`` The first cpumask. h](jP)}(h``const struct cpumask *src1``h]h)}(hj)h]hconst struct cpumask *src1}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj)ubjj)}(hhh]h)}(hThe first cpumask.h]hThe first cpumask.}(hj.)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*)hKhj+)ubah}(h]h ]h"]h$]h&]uh1jihj)ubeh}(h]h ]h"]h$]h&]uh1jIhj*)hKhj )ubjJ)}(h3``const struct cpumask *src2`` The second cpumask. h](jP)}(h``const struct cpumask *src2``h]h)}(hjN)h]hconst struct cpumask *src2}(hjP)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjL)ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhjH)ubjj)}(hhh]h)}(hThe second cpumask.h]hThe second cpumask.}(hjg)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjc)hKhjd)ubah}(h]h ]h"]h$]h&]uh1jihjH)ubeh}(h]h ]h"]h$]h&]uh1jIhjc)hKhj )ubeh}(h]h ]h"]h$]h&]uh1jDhj(ubh)}(h**Description**h]j/)}(hj)h]h Description}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj)ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj(ubh)}(hFind the index of the first nonzero bit of the AND of two cpumasks. struct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](hxFind the index of the first nonzero bit of the AND of two cpumasks. struct bpf_cpumask pointers may be safely passed to }(hj)hhhNhNubj/)}(h**src1**h]hsrc1}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj)ubh and }(hj)hhhNhNubj/)}(h**src2**h]hsrc2}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj)ubh.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj(ubh)}(h **Return**h]j/)}(hj)h]hReturn}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj)ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj(ubj)}(hhh]j)}(hEThe index of the first bit that is nonzero in both cpumask instances.h]h)}(hj)h]hEThe index of the first bit that is nonzero in both cpumask instances.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj)ubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]jjuh1jhj)hKhj(ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j !bpf_cpumask_test_cpu (C function)c.bpf_cpumask_test_cpuhNtauh1jhj#hhhNhNubj)}(hhh](j)}(hN__bpf_kfunc bool bpf_cpumask_test_cpu (u32 cpu, const struct cpumask *cpumask)h]j)}(hM__bpf_kfunc bool bpf_cpumask_test_cpu(u32 cpu, const struct cpumask *cpumask)h](h __bpf_kfunc}(hj'*hhhNhNubj%)}(h h]h }(hj/*hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj'*hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKubj)}(hjKh]hbool}(hj>*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'*hhhj=*hKubj%)}(h h]h }(hjK*hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj'*hhhj=*hKubj)}(hbpf_cpumask_test_cpuh]jY)}(hbpf_cpumask_test_cpuh]hbpf_cpumask_test_cpu}(hj]*hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjY*ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj'*hhhj=*hKubj)}(h((u32 cpu, const struct cpumask *cpumask)h](j)}(hu32 cpuh](h)}(hhh]jY)}(hu32h]hu32}(hj|*hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjy*ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj~*modnameN classnameNjvjy)}j|]j)}jrj_*sbc.bpf_cpumask_test_cpuasbuh1hhju*ubj%)}(h h]h }(hj*hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hju*ubjY)}(hcpuh]hcpu}(hj*hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhju*ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjq*ubj)}(hconst struct cpumask *cpumaskh](j7)}(hj h]hconst}(hj*hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj*ubj%)}(h h]h }(hj*hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj*ubj7)}(hj:h]hstruct}(hj*hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj*ubj%)}(h h]h }(hj*hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj*ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hj*hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj*ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj*modnameN classnameNjvjy)}j|]j*c.bpf_cpumask_test_cpuasbuh1hhj*ubj%)}(h h]h }(hj+hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj*ubj)}(hjh]h*}(hj(+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubjY)}(hcpumaskh]hcpumask}(hj5+hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj*ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjq*ubeh}(h]h ]h"]h$]h&]hhuh1jhj'*hhhj=*hKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj#*hhhj=*hKubah}(h]j*ah ](jjeh"]h$]h&]jj)jhuh1jhj=*hKhj *hhubj)}(hhh]h)}(h'Test whether a CPU is set in a cpumask.h]h'Test whether a CPU is set in a cpumask.}(hj_+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj\+hhubah}(h]h ]h"]h$]h&]uh1jhj *hhhj=*hKubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjjw+j jw+j!j"j#uh1jhhhj#hNhNubj%)}(hX**Parameters** ``u32 cpu`` The CPU being queried for. ``const struct cpumask *cpumask`` The cpumask being queried for containing a CPU. **Return** * true - **cpu** is set in the cpumask * false - **cpu** was not set in the cpumask, or **cpu** is an invalid cpu.h](h)}(h**Parameters**h]j/)}(hj+h]h Parameters}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj+ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj{+ubjE)}(hhh](jJ)}(h'``u32 cpu`` The CPU being queried for. h](jP)}(h ``u32 cpu``h]h)}(hj+h]hu32 cpu}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj+ubjj)}(hhh]h)}(hThe CPU being queried for.h]hThe CPU being queried for.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hKhj+ubah}(h]h ]h"]h$]h&]uh1jihj+ubeh}(h]h ]h"]h$]h&]uh1jIhj+hKhj+ubjJ)}(hR``const struct cpumask *cpumask`` The cpumask being queried for containing a CPU. h](jP)}(h!``const struct cpumask *cpumask``h]h)}(hj+h]hconst struct cpumask *cpumask}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj+ubjj)}(hhh]h)}(h/The cpumask being queried for containing a CPU.h]h/The cpumask being queried for containing a CPU.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hKhj+ubah}(h]h ]h"]h$]h&]uh1jihj+ubeh}(h]h ]h"]h$]h&]uh1jIhj+hKhj+ubeh}(h]h ]h"]h$]h&]uh1jDhj{+ubh)}(h **Return**h]j/)}(hj,h]hReturn}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj,ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj{+ubj)}(hhh](j)}(h%true - **cpu** is set in the cpumaskh]h)}(hj/,h](htrue - }(hj1,hhhNhNubj/)}(h**cpu**h]hcpu}(hj8,hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj1,ubh is set in the cpumask}(hj1,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj-,ubah}(h]h ]h"]h$]h&]uh1jhj*,ubj)}(hIfalse - **cpu** was not set in the cpumask, or **cpu** is an invalid cpu.h]h)}(hjY,h](hfalse - }(hj[,hhhNhNubj/)}(h**cpu**h]hcpu}(hjb,hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj[,ubh was not set in the cpumask, or }(hj[,hhhNhNubj/)}(h**cpu**h]hcpu}(hjt,hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj[,ubh is an invalid cpu.}(hj[,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhjW,ubah}(h]h ]h"]h$]h&]uh1jhj*,ubeh}(h]h ]h"]h$]h&]jjuh1jhjP,hKhj{+ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j bpf_cpumask_weight (C function)c.bpf_cpumask_weighthNtauh1jhj#hhhNhNubj)}(hhh](j)}(hB__bpf_kfunc u32 bpf_cpumask_weight (const struct cpumask *cpumask)h]j)}(hA__bpf_kfunc u32 bpf_cpumask_weight(const struct cpumask *cpumask)h](h __bpf_kfunc}(hj,hhhNhNubj%)}(h h]h }(hj,hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj,hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chMubh)}(hhh]jY)}(hu32h]hu32}(hj,hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj,ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj,modnameN classnameNjvjy)}j|]j)}jrbpf_cpumask_weightsbc.bpf_cpumask_weightasbuh1hhj,hhhj,hMubj%)}(h h]h }(hj,hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj,hhhj,hMubj)}(hbpf_cpumask_weighth]jY)}(hj,h]hbpf_cpumask_weight}(hj-hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj,ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj,hhhj,hMubj)}(h(const struct cpumask *cpumask)h]j)}(hconst struct cpumask *cpumaskh](j7)}(hj h]hconst}(hj-hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj-ubj%)}(h h]h }(hj*-hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj-ubj7)}(hj:h]hstruct}(hj8-hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj-ubj%)}(h h]h }(hjE-hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj-ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hjV-hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjS-ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjX-modnameN classnameNjvjy)}j|]j,c.bpf_cpumask_weightasbuh1hhj-ubj%)}(h h]h }(hjt-hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj-ubj)}(hjh]h*}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubjY)}(hcpumaskh]hcpumask}(hj-hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj-ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj-ubah}(h]h ]h"]h$]h&]hhuh1jhj,hhhj,hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj,hhhj,hMubah}(h]j,ah ](jjeh"]h$]h&]jj)jhuh1jhj,hMhj,hhubj)}(hhh]h)}(h)Return the number of bits in **cpumask**.h](hReturn the number of bits in }(hj-hhhNhNubj/)}(h **cpumask**h]hcpumask}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj-ubh.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chMhj-hhubah}(h]h ]h"]h$]h&]uh1jhj,hhhj,hMubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjj-j j-j!j"j#uh1jhhhj#hNhNubj%)}(h**Parameters** ``const struct cpumask *cpumask`` The cpumask being queried. **Description** Count the number of set bits in the given cpumask. **Return** * The number of bits set in the mask.h](h)}(h**Parameters**h]j/)}(hj-h]h Parameters}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj-ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chMhj-ubjE)}(hhh]jJ)}(h=``const struct cpumask *cpumask`` The cpumask being queried. h](jP)}(h!``const struct cpumask *cpumask``h]h)}(hj .h]hconst struct cpumask *cpumask}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj .ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chMhj.ubjj)}(hhh]h)}(hThe cpumask being queried.h]hThe cpumask being queried.}(hj%.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!.hMhj".ubah}(h]h ]h"]h$]h&]uh1jihj.ubeh}(h]h ]h"]h$]h&]uh1jIhj!.hMhj.ubah}(h]h ]h"]h$]h&]uh1jDhj-ubh)}(h**Description**h]j/)}(hjG.h]h Description}(hjI.hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjE.ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chMhj-ubh)}(h2Count the number of set bits in the given cpumask.h]h2Count the number of set bits in the given cpumask.}(hj].hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chMhj-ubh)}(h **Return**h]j/)}(hjn.h]hReturn}(hjp.hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjl.ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chMhj-ubj)}(hhh]j)}(h#The number of bits set in the mask.h]h)}(hj.h]h#The number of bits set in the mask.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chMhj.ubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]jjuh1jhj.hMhj-ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j bpf_cpumask_equal (C function)c.bpf_cpumask_equalhNtauh1jhj#hhhNhNubj)}(hhh](j)}(h[__bpf_kfunc bool bpf_cpumask_equal (const struct cpumask *src1, const struct cpumask *src2)h]j)}(hZ__bpf_kfunc bool bpf_cpumask_equal(const struct cpumask *src1, const struct cpumask *src2)h](h __bpf_kfunc}(hj.hhhNhNubj%)}(h h]h }(hj.hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj.hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM<ubj)}(hjKh]hbool}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.hhhj.hM<ubj%)}(h h]h }(hj.hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj.hhhj.hM<ubj)}(hbpf_cpumask_equalh]jY)}(hbpf_cpumask_equalh]hbpf_cpumask_equal}(hj.hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj.ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj.hhhj.hM<ubj)}(h8(const struct cpumask *src1, const struct cpumask *src2)h](j)}(hconst struct cpumask *src1h](j7)}(hj h]hconst}(hj/hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj/ubj%)}(h h]h }(hj /hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj/ubj7)}(hj:h]hstruct}(hj./hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj/ubj%)}(h h]h }(hj;/hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj/ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hjL/hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjI/ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetjN/modnameN classnameNjvjy)}j|]j)}jrj.sbc.bpf_cpumask_equalasbuh1hhj/ubj%)}(h h]h }(hjl/hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj/ubj)}(hjh]h*}(hjz/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubjY)}(hsrc1h]hsrc1}(hj/hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj/ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj /ubj)}(hconst struct cpumask *src2h](j7)}(hj h]hconst}(hj/hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj/ubj%)}(h h]h }(hj/hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj/ubj7)}(hj:h]hstruct}(hj/hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj/ubj%)}(h h]h }(hj/hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj/ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hj/hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj/ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj/modnameN classnameNjvjy)}j|]jh/c.bpf_cpumask_equalasbuh1hhj/ubj%)}(h h]h }(hj/hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj/ubj)}(hjh]h*}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubjY)}(hsrc2h]hsrc2}(hj0hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj/ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj /ubeh}(h]h ]h"]h$]h&]hhuh1jhj.hhhj.hM<ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj.hhhj.hM<ubah}(h]j.ah ](jjeh"]h$]h&]jj)jhuh1jhj.hM<hj.hhubj)}(hhh]h)}(h Check two cpumasks for equality.h]h Check two cpumasks for equality.}(hj<0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM2hj90hhubah}(h]h ]h"]h$]h&]uh1jhj.hhhj.hM<ubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjjT0j jT0j!j"j#uh1jhhhj#hNhNubj%)}(hXU**Parameters** ``const struct cpumask *src1`` The first input. ``const struct cpumask *src2`` The second input. **Return** * true - **src1** and **src2** have the same bits set. * false - **src1** and **src2** differ in at least one bit. **Description** struct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h)}(h**Parameters**h]j/)}(hj^0h]h Parameters}(hj`0hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj\0ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM6hjX0ubjE)}(hhh](jJ)}(h0``const struct cpumask *src1`` The first input. h](jP)}(h``const struct cpumask *src1``h]h)}(hj}0h]hconst struct cpumask *src1}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{0ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM3hjw0ubjj)}(hhh]h)}(hThe first input.h]hThe first input.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hM3hj0ubah}(h]h ]h"]h$]h&]uh1jihjw0ubeh}(h]h ]h"]h$]h&]uh1jIhj0hM3hjt0ubjJ)}(h1``const struct cpumask *src2`` The second input. h](jP)}(h``const struct cpumask *src2``h]h)}(hj0h]hconst struct cpumask *src2}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM4hj0ubjj)}(hhh]h)}(hThe second input.h]hThe second input.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hM4hj0ubah}(h]h ]h"]h$]h&]uh1jihj0ubeh}(h]h ]h"]h$]h&]uh1jIhj0hM4hjt0ubeh}(h]h ]h"]h$]h&]uh1jDhjX0ubh)}(h **Return**h]j/)}(hj0h]hReturn}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj0ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM6hjX0ubj)}(hhh](j)}(h6true - **src1** and **src2** have the same bits set.h]h)}(hj 1h](h true - }(hj1hhhNhNubj/)}(h**src1**h]hsrc1}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj1ubh and }(hj1hhhNhNubj/)}(h**src2**h]hsrc2}(hj'1hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj1ubh have the same bits set.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM6hj 1ubah}(h]h ]h"]h$]h&]uh1jhj1ubj)}(h;false - **src1** and **src2** differ in at least one bit. h]h)}(h:false - **src1** and **src2** differ in at least one bit.h](h false - }(hjJ1hhhNhNubj/)}(h**src1**h]hsrc1}(hjR1hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjJ1ubh and }(hjJ1hhhNhNubj/)}(h**src2**h]hsrc2}(hjd1hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjJ1ubh differ in at least one bit.}(hjJ1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM7hjF1ubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]jjuh1jhj?1hM6hjX0ubh)}(h**Description**h]j/)}(hj1h]h Description}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj1ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM9hjX0ubh)}(hJstruct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h4struct bpf_cpumask pointers may be safely passed to }(hj1hhhNhNubj/)}(h**src1**h]hsrc1}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj1ubh and }(hj1hhhNhNubj/)}(h**src2**h]hsrc2}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj1ubh.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM:hjX0ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j #bpf_cpumask_intersects (C function)c.bpf_cpumask_intersectshNtauh1jhj#hhhNhNubj)}(hhh](j)}(h`__bpf_kfunc bool bpf_cpumask_intersects (const struct cpumask *src1, const struct cpumask *src2)h]j)}(h___bpf_kfunc bool bpf_cpumask_intersects(const struct cpumask *src1, const struct cpumask *src2)h](h __bpf_kfunc}(hj1hhhNhNubj%)}(h h]h }(hj1hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj1hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMLubj)}(hjKh]hbool}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1hhhj2hMLubj%)}(h h]h }(hj2hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj1hhhj2hMLubj)}(hbpf_cpumask_intersectsh]jY)}(hbpf_cpumask_intersectsh]hbpf_cpumask_intersects}(hj&2hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj"2ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj1hhhj2hMLubj)}(h8(const struct cpumask *src1, const struct cpumask *src2)h](j)}(hconst struct cpumask *src1h](j7)}(hj h]hconst}(hjB2hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj>2ubj%)}(h h]h }(hjO2hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj>2ubj7)}(hj:h]hstruct}(hj]2hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj>2ubj%)}(h h]h }(hjj2hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj>2ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hj{2hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjx2ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj}2modnameN classnameNjvjy)}j|]j)}jrj(2sbc.bpf_cpumask_intersectsasbuh1hhj>2ubj%)}(h h]h }(hj2hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj>2ubj)}(hjh]h*}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>2ubjY)}(hsrc1h]hsrc1}(hj2hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj>2ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj:2ubj)}(hconst struct cpumask *src2h](j7)}(hj h]hconst}(hj2hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj2ubj%)}(h h]h }(hj2hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj2ubj7)}(hj:h]hstruct}(hj2hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj2ubj%)}(h h]h }(hj2hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj2ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hj3hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj3ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj 3modnameN classnameNjvjy)}j|]j2c.bpf_cpumask_intersectsasbuh1hhj2ubj%)}(h h]h }(hj&3hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj2ubj)}(hjh]h*}(hj43hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubjY)}(hsrc2h]hsrc2}(hjA3hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj2ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj:2ubeh}(h]h ]h"]h$]h&]hhuh1jhj1hhhj2hMLubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj1hhhj2hMLubah}(h]j1ah ](jjeh"]h$]h&]jj)jhuh1jhj2hMLhj1hhubj)}(hhh]h)}(hCheck two cpumasks for overlap.h]hCheck two cpumasks for overlap.}(hjk3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMBhjh3hhubah}(h]h ]h"]h$]h&]uh1jhj1hhhj2hMLubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjj3j j3j!j"j#uh1jhhhj#hNhNubj%)}(hXn**Parameters** ``const struct cpumask *src1`` The first input. ``const struct cpumask *src2`` The second input. **Return** * true - **src1** and **src2** have at least one of the same bits set. * false - **src1** and **src2** don't have any of the same bits set. **Description** struct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h)}(h**Parameters**h]j/)}(hj3h]h Parameters}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj3ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMFhj3ubjE)}(hhh](jJ)}(h0``const struct cpumask *src1`` The first input. h](jP)}(h``const struct cpumask *src1``h]h)}(hj3h]hconst struct cpumask *src1}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMChj3ubjj)}(hhh]h)}(hThe first input.h]hThe first input.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMChj3ubah}(h]h ]h"]h$]h&]uh1jihj3ubeh}(h]h ]h"]h$]h&]uh1jIhj3hMChj3ubjJ)}(h1``const struct cpumask *src2`` The second input. h](jP)}(h``const struct cpumask *src2``h]h)}(hj3h]hconst struct cpumask *src2}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMDhj3ubjj)}(hhh]h)}(hThe second input.h]hThe second input.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMDhj3ubah}(h]h ]h"]h$]h&]uh1jihj3ubeh}(h]h ]h"]h$]h&]uh1jIhj3hMDhj3ubeh}(h]h ]h"]h$]h&]uh1jDhj3ubh)}(h **Return**h]j/)}(hj 4h]hReturn}(hj"4hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj4ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMFhj3ubj)}(hhh](j)}(hFtrue - **src1** and **src2** have at least one of the same bits set.h]h)}(hj;4h](h true - }(hj=4hhhNhNubj/)}(h**src1**h]hsrc1}(hjD4hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj=4ubh and }(hj=4hhhNhNubj/)}(h**src2**h]hsrc2}(hjV4hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj=4ubh( have at least one of the same bits set.}(hj=4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMFhj94ubah}(h]h ]h"]h$]h&]uh1jhj64ubj)}(hDfalse - **src1** and **src2** don't have any of the same bits set. h]h)}(hCfalse - **src1** and **src2** don't have any of the same bits set.h](h false - }(hjy4hhhNhNubj/)}(h**src1**h]hsrc1}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjy4ubh and }(hjy4hhhNhNubj/)}(h**src2**h]hsrc2}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjy4ubh' don’t have any of the same bits set.}(hjy4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMGhju4ubah}(h]h ]h"]h$]h&]uh1jhj64ubeh}(h]h ]h"]h$]h&]jjuh1jhjn4hMFhj3ubh)}(h**Description**h]j/)}(hj4h]h Description}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj4ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMIhj3ubh)}(hJstruct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h4struct bpf_cpumask pointers may be safely passed to }(hj4hhhNhNubj/)}(h**src1**h]hsrc1}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj4ubh and }(hj4hhhNhNubj/)}(h**src2**h]hsrc2}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj4ubh.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMJhj3ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j bpf_cpumask_subset (C function)c.bpf_cpumask_subsethNtauh1jhj#hhhNhNubj)}(hhh](j)}(h\__bpf_kfunc bool bpf_cpumask_subset (const struct cpumask *src1, const struct cpumask *src2)h]j)}(h[__bpf_kfunc bool bpf_cpumask_subset(const struct cpumask *src1, const struct cpumask *src2)h](h __bpf_kfunc}(hj5hhhNhNubj%)}(h h]h }(hj'5hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj5hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM\ubj)}(hjKh]hbool}(hj65hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5hhhj55hM\ubj%)}(h h]h }(hjC5hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj5hhhj55hM\ubj)}(hbpf_cpumask_subseth]jY)}(hbpf_cpumask_subseth]hbpf_cpumask_subset}(hjU5hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjQ5ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj5hhhj55hM\ubj)}(h8(const struct cpumask *src1, const struct cpumask *src2)h](j)}(hconst struct cpumask *src1h](j7)}(hj h]hconst}(hjq5hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjm5ubj%)}(h h]h }(hj~5hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjm5ubj7)}(hj:h]hstruct}(hj5hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjm5ubj%)}(h h]h }(hj5hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjm5ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hj5hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj5ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj5modnameN classnameNjvjy)}j|]j)}jrjW5sbc.bpf_cpumask_subsetasbuh1hhjm5ubj%)}(h h]h }(hj5hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjm5ubj)}(hjh]h*}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjm5ubjY)}(hsrc1h]hsrc1}(hj5hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjm5ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhji5ubj)}(hconst struct cpumask *src2h](j7)}(hj h]hconst}(hj5hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj5ubj%)}(h h]h }(hj 6hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj5ubj7)}(hj:h]hstruct}(hj6hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj5ubj%)}(h h]h }(hj&6hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj5ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hj76hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj46ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj96modnameN classnameNjvjy)}j|]j5c.bpf_cpumask_subsetasbuh1hhj5ubj%)}(h h]h }(hjU6hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj5ubj)}(hjh]h*}(hjc6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubjY)}(hsrc2h]hsrc2}(hjp6hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj5ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhji5ubeh}(h]h ]h"]h$]h&]hhuh1jhj5hhhj55hM\ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj5hhhj55hM\ubah}(h]j5ah ](jjeh"]h$]h&]jj)jhuh1jhj55hM\hj5hhubj)}(hhh]h)}(h*Check if a cpumask is a subset of another.h]h*Check if a cpumask is a subset of another.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMRhj6hhubah}(h]h ]h"]h$]h&]uh1jhj5hhhj55hM\ubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjj6j j6j!j"j#uh1jhhhj#hNhNubj%)}(hX**Parameters** ``const struct cpumask *src1`` The first cpumask being checked as a subset. ``const struct cpumask *src2`` The second cpumask being checked as a superset. **Return** * true - All of the bits of **src1** are set in **src2**. * false - At least one bit in **src1** is not set in **src2**. **Description** struct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h)}(h**Parameters**h]j/)}(hj6h]h Parameters}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj6ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMVhj6ubjE)}(hhh](jJ)}(hL``const struct cpumask *src1`` The first cpumask being checked as a subset. h](jP)}(h``const struct cpumask *src1``h]h)}(hj6h]hconst struct cpumask *src1}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMShj6ubjj)}(hhh]h)}(h,The first cpumask being checked as a subset.h]h,The first cpumask being checked as a subset.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hMShj6ubah}(h]h ]h"]h$]h&]uh1jihj6ubeh}(h]h ]h"]h$]h&]uh1jIhj6hMShj6ubjJ)}(hO``const struct cpumask *src2`` The second cpumask being checked as a superset. h](jP)}(h``const struct cpumask *src2``h]h)}(hj7h]hconst struct cpumask *src2}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMThj7ubjj)}(hhh]h)}(h/The second cpumask being checked as a superset.h]h/The second cpumask being checked as a superset.}(hj-7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)7hMThj*7ubah}(h]h ]h"]h$]h&]uh1jihj7ubeh}(h]h ]h"]h$]h&]uh1jIhj)7hMThj6ubeh}(h]h ]h"]h$]h&]uh1jDhj6ubh)}(h **Return**h]j/)}(hjO7h]hReturn}(hjQ7hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjM7ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMVhj6ubj)}(hhh](j)}(h9true - All of the bits of **src1** are set in **src2**.h]h)}(hjj7h](htrue - All of the bits of }(hjl7hhhNhNubj/)}(h**src1**h]hsrc1}(hjs7hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjl7ubh are set in }(hjl7hhhNhNubj/)}(h**src2**h]hsrc2}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjl7ubh.}(hjl7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMVhjh7ubah}(h]h ]h"]h$]h&]uh1jhje7ubj)}(h>false - At least one bit in **src1** is not set in **src2**. h]h)}(h=false - At least one bit in **src1** is not set in **src2**.h](hfalse - At least one bit in }(hj7hhhNhNubj/)}(h**src1**h]hsrc1}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj7ubh is not set in }(hj7hhhNhNubj/)}(h**src2**h]hsrc2}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj7ubh.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMWhj7ubah}(h]h ]h"]h$]h&]uh1jhje7ubeh}(h]h ]h"]h$]h&]jjuh1jhj7hMVhj6ubh)}(h**Description**h]j/)}(hj7h]h Description}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj7ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMYhj6ubh)}(hJstruct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h4struct bpf_cpumask pointers may be safely passed to }(hj7hhhNhNubj/)}(h**src1**h]hsrc1}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj7ubh and }(hj7hhhNhNubj/)}(h**src2**h]hsrc2}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj7ubh.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMZhj6ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j bpf_cpumask_empty (C function)c.bpf_cpumask_emptyhNtauh1jhj#hhhNhNubj)}(hhh](j)}(hB__bpf_kfunc bool bpf_cpumask_empty (const struct cpumask *cpumask)h]j)}(hA__bpf_kfunc bool bpf_cpumask_empty(const struct cpumask *cpumask)h](h __bpf_kfunc}(hjN8hhhNhNubj%)}(h h]h }(hjV8hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjN8hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMkubj)}(hjKh]hbool}(hje8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjN8hhhjd8hMkubj%)}(h h]h }(hjr8hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjN8hhhjd8hMkubj)}(hbpf_cpumask_emptyh]jY)}(hbpf_cpumask_emptyh]hbpf_cpumask_empty}(hj8hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj8ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjN8hhhjd8hMkubj)}(h(const struct cpumask *cpumask)h]j)}(hconst struct cpumask *cpumaskh](j7)}(hj h]hconst}(hj8hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj8ubj%)}(h h]h }(hj8hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj8ubj7)}(hj:h]hstruct}(hj8hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj8ubj%)}(h h]h }(hj8hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj8ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hj8hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj8ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj8modnameN classnameNjvjy)}j|]j)}jrj8sbc.bpf_cpumask_emptyasbuh1hhj8ubj%)}(h h]h }(hj8hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj8ubj)}(hjh]h*}(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubjY)}(hcpumaskh]hcpumask}(hj9hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj8ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj8ubah}(h]h ]h"]h$]h&]hhuh1jhjN8hhhjd8hMkubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjJ8hhhjd8hMkubah}(h]jE8ah ](jjeh"]h$]h&]jj)jhuh1jhjd8hMkhjG8hhubj)}(hhh]h)}(hCheck if a cpumask is empty.h]hCheck if a cpumask is empty.}(hj>9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMbhj;9hhubah}(h]h ]h"]h$]h&]uh1jhjG8hhhjd8hMkubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjjV9j jV9j!j"j#uh1jhhhj#hNhNubj%)}(hX**Parameters** ``const struct cpumask *cpumask`` The cpumask being checked. **Return** * true - None of the bits in **cpumask** are set. * false - At least one bit in **cpumask** is set. **Description** A struct bpf_cpumask pointer may be safely passed to **cpumask**.h](h)}(h**Parameters**h]j/)}(hj`9h]h Parameters}(hjb9hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj^9ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMfhjZ9ubjE)}(hhh]jJ)}(h=``const struct cpumask *cpumask`` The cpumask being checked. h](jP)}(h!``const struct cpumask *cpumask``h]h)}(hj9h]hconst struct cpumask *cpumask}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}9ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMchjy9ubjj)}(hhh]h)}(hThe cpumask being checked.h]hThe cpumask being checked.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMchj9ubah}(h]h ]h"]h$]h&]uh1jihjy9ubeh}(h]h ]h"]h$]h&]uh1jIhj9hMchjv9ubah}(h]h ]h"]h$]h&]uh1jDhjZ9ubh)}(h **Return**h]j/)}(hj9h]hReturn}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj9ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMehjZ9ubj)}(hhh](j)}(h1true - None of the bits in **cpumask** are set.h]h)}(hj9h](htrue - None of the bits in }(hj9hhhNhNubj/)}(h **cpumask**h]hcpumask}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj9ubh are set.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMehj9ubah}(h]h ]h"]h$]h&]uh1jhj9ubj)}(h1false - At least one bit in **cpumask** is set. h]h)}(h0false - At least one bit in **cpumask** is set.h](hfalse - At least one bit in }(hj:hhhNhNubj/)}(h **cpumask**h]hcpumask}(hj :hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj:ubh is set.}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMfhj9ubah}(h]h ]h"]h$]h&]uh1jhj9ubeh}(h]h ]h"]h$]h&]jjuh1jhj9hMehjZ9ubh)}(h**Description**h]j/)}(hj0:h]h Description}(hj2:hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj.:ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMhhjZ9ubh)}(hAA struct bpf_cpumask pointer may be safely passed to **cpumask**.h](h5A struct bpf_cpumask pointer may be safely passed to }(hjF:hhhNhNubj/)}(h **cpumask**h]hcpumask}(hjN:hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjF:ubh.}(hjF:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMihjZ9ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j bpf_cpumask_full (C function)c.bpf_cpumask_fullhNtauh1jhj#hhhNhNubj)}(hhh](j)}(hA__bpf_kfunc bool bpf_cpumask_full (const struct cpumask *cpumask)h]j)}(h@__bpf_kfunc bool bpf_cpumask_full(const struct cpumask *cpumask)h](h __bpf_kfunc}(hj:hhhNhNubj%)}(h h]h }(hj:hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj:hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMzubj)}(hjKh]hbool}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:hhhj:hMzubj%)}(h h]h }(hj:hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj:hhhj:hMzubj)}(hbpf_cpumask_fullh]jY)}(hbpf_cpumask_fullh]hbpf_cpumask_full}(hj:hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj:ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj:hhhj:hMzubj)}(h(const struct cpumask *cpumask)h]j)}(hconst struct cpumask *cpumaskh](j7)}(hj h]hconst}(hj:hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj:ubj%)}(h h]h }(hj:hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj:ubj7)}(hj:h]hstruct}(hj:hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj:ubj%)}(h h]h }(hj:hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj:ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hj;hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj ;ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj;modnameN classnameNjvjy)}j|]j)}jrj:sbc.bpf_cpumask_fullasbuh1hhj:ubj%)}(h h]h }(hj.;hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj:ubj)}(hjh]h*}(hj<;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubjY)}(hcpumaskh]hcpumask}(hjI;hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj:ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj:ubah}(h]h ]h"]h$]h&]hhuh1jhj:hhhj:hMzubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj:hhhj:hMzubah}(h]jz:ah ](jjeh"]h$]h&]jj)jhuh1jhj:hMzhj|:hhubj)}(hhh]h)}(h$Check if a cpumask has all bits set.h]h$Check if a cpumask has all bits set.}(hjs;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMqhjp;hhubah}(h]h ]h"]h$]h&]uh1jhj|:hhhj:hMzubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjj;j j;j!j"j#uh1jhhhj#hNhNubj%)}(hX**Parameters** ``const struct cpumask *cpumask`` The cpumask being checked. **Return** * true - All of the bits in **cpumask** are set. * false - At least one bit in **cpumask** is cleared. **Description** A struct bpf_cpumask pointer may be safely passed to **cpumask**.h](h)}(h**Parameters**h]j/)}(hj;h]h Parameters}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj;ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMuhj;ubjE)}(hhh]jJ)}(h=``const struct cpumask *cpumask`` The cpumask being checked. h](jP)}(h!``const struct cpumask *cpumask``h]h)}(hj;h]hconst struct cpumask *cpumask}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMrhj;ubjj)}(hhh]h)}(hThe cpumask being checked.h]hThe cpumask being checked.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hMrhj;ubah}(h]h ]h"]h$]h&]uh1jihj;ubeh}(h]h ]h"]h$]h&]uh1jIhj;hMrhj;ubah}(h]h ]h"]h$]h&]uh1jDhj;ubh)}(h **Return**h]j/)}(hj;h]hReturn}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj;ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMthj;ubj)}(hhh](j)}(h0true - All of the bits in **cpumask** are set.h]h)}(hj <h](htrue - All of the bits in }(hj <hhhNhNubj/)}(h **cpumask**h]hcpumask}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj <ubh are set.}(hj <hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMthj<ubah}(h]h ]h"]h$]h&]uh1jhj<ubj)}(h5false - At least one bit in **cpumask** is cleared. h]h)}(h4false - At least one bit in **cpumask** is cleared.h](hfalse - At least one bit in }(hj6<hhhNhNubj/)}(h **cpumask**h]hcpumask}(hj><hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj6<ubh is cleared.}(hj6<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMuhj2<ubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]jjuh1jhj+<hMthj;ubh)}(h**Description**h]j/)}(hje<h]h Description}(hjg<hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjc<ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMwhj;ubh)}(hAA struct bpf_cpumask pointer may be safely passed to **cpumask**.h](h5A struct bpf_cpumask pointer may be safely passed to }(hj{<hhhNhNubj/)}(h **cpumask**h]hcpumask}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj{<ubh.}(hj{<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMxhj;ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j 'bpf_cpumask_any_distribute (C function)c.bpf_cpumask_any_distributehNtauh1jhj#hhhNhNubj)}(hhh](j)}(hJ__bpf_kfunc u32 bpf_cpumask_any_distribute (const struct cpumask *cpumask)h]j)}(hI__bpf_kfunc u32 bpf_cpumask_any_distribute(const struct cpumask *cpumask)h](h __bpf_kfunc}(hj<hhhNhNubj%)}(h h]h }(hj<hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj<hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMubh)}(hhh]jY)}(hu32h]hu32}(hj<hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj<ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj<modnameN classnameNjvjy)}j|]j)}jrbpf_cpumask_any_distributesbc.bpf_cpumask_any_distributeasbuh1hhj<hhhj<hMubj%)}(h h]h }(hj<hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj<hhhj<hMubj)}(hbpf_cpumask_any_distributeh]jY)}(hj<h]hbpf_cpumask_any_distribute}(hj=hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj=ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj<hhhj<hMubj)}(h(const struct cpumask *cpumask)h]j)}(hconst struct cpumask *cpumaskh](j7)}(hj h]hconst}(hj =hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj=ubj%)}(h h]h }(hj-=hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj=ubj7)}(hj:h]hstruct}(hj;=hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj=ubj%)}(h h]h }(hjH=hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj=ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hjY=hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjV=ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj[=modnameN classnameNjvjy)}j|]j<c.bpf_cpumask_any_distributeasbuh1hhj=ubj%)}(h h]h }(hjw=hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj=ubj)}(hjh]h*}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubjY)}(hcpumaskh]hcpumask}(hj=hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj=ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj=ubah}(h]h ]h"]h$]h&]hhuh1jhj<hhhj<hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj<hhhj<hMubah}(h]j<ah ](jjeh"]h$]h&]jj)jhuh1jhj<hMhj<hhubj)}(hhh]h)}(h'Return a random set CPU from a cpumask.h]h'Return a random set CPU from a cpumask.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj=hhubah}(h]h ]h"]h$]h&]uh1jhj<hhhj<hMubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjj=j j=j!j"j#uh1jhhhj#hNhNubj%)}(hX**Parameters** ``const struct cpumask *cpumask`` The cpumask being queried. **Return** * A random set bit within [0, num_cpus) if at least one bit is set. * >= num_cpus if no bit is set. **Description** A struct bpf_cpumask pointer may be safely passed to **src**.h](h)}(h**Parameters**h]j/)}(hj=h]h Parameters}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj=ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj=ubjE)}(hhh]jJ)}(h=``const struct cpumask *cpumask`` The cpumask being queried. h](jP)}(h!``const struct cpumask *cpumask``h]h)}(hj=h]hconst struct cpumask *cpumask}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj=ubjj)}(hhh]h)}(hThe cpumask being queried.h]hThe cpumask being queried.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hMhj>ubah}(h]h ]h"]h$]h&]uh1jihj=ubeh}(h]h ]h"]h$]h&]uh1jIhj>hMhj=ubah}(h]h ]h"]h$]h&]uh1jDhj=ubh)}(h **Return**h]j/)}(hj8>h]hReturn}(hj:>hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj6>ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj=ubj)}(hhh](j)}(hAA random set bit within [0, num_cpus) if at least one bit is set.h]h)}(hjS>h]hAA random set bit within [0, num_cpus) if at least one bit is set.}(hjU>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhjQ>ubah}(h]h ]h"]h$]h&]uh1jhjN>ubj)}(h>= num_cpus if no bit is set. h]h)}(h>= num_cpus if no bit is set.h]h>= num_cpus if no bit is set.}(hjm>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhji>ubah}(h]h ]h"]h$]h&]uh1jhjN>ubeh}(h]h ]h"]h$]h&]jjuh1jhjb>hMhj=ubh)}(h**Description**h]j/)}(hj>h]h Description}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj>ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj=ubh)}(h=A struct bpf_cpumask pointer may be safely passed to **src**.h](h5A struct bpf_cpumask pointer may be safely passed to }(hj>hhhNhNubj/)}(h**src**h]hsrc}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj>ubh.}(hj>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj=ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j +bpf_cpumask_any_and_distribute (C function) c.bpf_cpumask_any_and_distributehNtauh1jhj#hhhNhNubj)}(hhh](j)}(hg__bpf_kfunc u32 bpf_cpumask_any_and_distribute (const struct cpumask *src1, const struct cpumask *src2)h]j)}(hf__bpf_kfunc u32 bpf_cpumask_any_and_distribute(const struct cpumask *src1, const struct cpumask *src2)h](h __bpf_kfunc}(hj>hhhNhNubj%)}(h h]h }(hj>hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj>hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMubh)}(hhh]jY)}(hu32h]hu32}(hj>hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj>ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj>modnameN classnameNjvjy)}j|]j)}jrbpf_cpumask_any_and_distributesb c.bpf_cpumask_any_and_distributeasbuh1hhj>hhhj>hMubj%)}(h h]h }(hj?hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj>hhhj>hMubj)}(hbpf_cpumask_any_and_distributeh]jY)}(hj?h]hbpf_cpumask_any_and_distribute}(hj*?hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj&?ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj>hhhj>hMubj)}(h8(const struct cpumask *src1, const struct cpumask *src2)h](j)}(hconst struct cpumask *src1h](j7)}(hj h]hconst}(hjE?hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjA?ubj%)}(h h]h }(hjR?hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjA?ubj7)}(hj:h]hstruct}(hj`?hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hjA?ubj%)}(h h]h }(hjm?hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjA?ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hj~?hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj{?ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj?modnameN classnameNjvjy)}j|]j? c.bpf_cpumask_any_and_distributeasbuh1hhjA?ubj%)}(h h]h }(hj?hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hjA?ubj)}(hjh]h*}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjA?ubjY)}(hsrc1h]hsrc1}(hj?hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjA?ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj=?ubj)}(hconst struct cpumask *src2h](j7)}(hj h]hconst}(hj?hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj?ubj%)}(h h]h }(hj?hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj?ubj7)}(hj:h]hstruct}(/hj?hhhNhNubah}(h]h ]jCah"]h$]h&]uh1j6hj?ubj%)}(h h]h }(hj?hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj?ubh)}(hhh]jY)}(hcpumaskh]hcpumask}(hj @hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj@ubah}(h]h ]h"]h$]h&] refdomainjpreftypejr reftargetj @modnameN classnameNjvjy)}j|]j? c.bpf_cpumask_any_and_distributeasbuh1hhj?ubj%)}(h h]h }(hj'@hhhNhNubah}(h]h ]j1ah"]h$]h&]uh1j$hj?ubj)}(hjh]h*}(hj5@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubjY)}(hsrc2h]hsrc2}(hjB@hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj?ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj=?ubeh}(h]h ]h"]h$]h&]hhuh1jhj>hhhj>hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj>hhhj>hMubah}(h]j>ah ](jjeh"]h$]h&]jj)jhuh1jhj>hMhj>hhubj)}(hhh]h)}(h5Return a random set CPU from the AND of two cpumasks.h]h5Return a random set CPU from the AND of two cpumasks.}(hjl@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhji@hhubah}(h]h ]h"]h$]h&]uh1jhj>hhhj>hMubeh}(h]h ](jpfunctioneh"]h$]h&]jjpjj@j j@j!j"j#uh1jhhhj#hNhNubj%)}(hXg**Parameters** ``const struct cpumask *src1`` The first cpumask. ``const struct cpumask *src2`` The second cpumask. **Return** * A random set bit within [0, num_cpus) from the AND of two cpumasks, if at least one bit is set. * >= num_cpus if no bit is set. **Description** struct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h)}(h**Parameters**h]j/)}(hj@h]h Parameters}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj@ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj@ubjE)}(hhh](jJ)}(h2``const struct cpumask *src1`` The first cpumask. h](jP)}(h``const struct cpumask *src1``h]h)}(hj@h]hconst struct cpumask *src1}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj@ubjj)}(hhh]h)}(hThe first cpumask.h]hThe first cpumask.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMhj@ubah}(h]h ]h"]h$]h&]uh1jihj@ubeh}(h]h ]h"]h$]h&]uh1jIhj@hMhj@ubjJ)}(h3``const struct cpumask *src2`` The second cpumask. h](jP)}(h``const struct cpumask *src2``h]h)}(hj@h]hconst struct cpumask *src2}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@ubah}(h]h ]h"]h$]h&]uh1jOhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj@ubjj)}(hhh]h)}(hThe second cpumask.h]hThe second cpumask.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMhj@ubah}(h]h ]h"]h$]h&]uh1jihj@ubeh}(h]h ]h"]h$]h&]uh1jIhj@hMhj@ubeh}(h]h ]h"]h$]h&]uh1jDhj@ubh)}(h **Return**h]j/)}(hj!Ah]hReturn}(hj#AhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjAubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj@ubj)}(hhh](j)}(h_A random set bit within [0, num_cpus) from the AND of two cpumasks, if at least one bit is set.h]h)}(h_A random set bit within [0, num_cpus) from the AND of two cpumasks, if at least one bit is set.h]h_A random set bit within [0, num_cpus) from the AND of two cpumasks, if at least one bit is set.}(hj>AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj:Aubah}(h]h ]h"]h$]h&]uh1jhj7Aubj)}(h>= num_cpus if no bit is set. h]h)}(h>= num_cpus if no bit is set.h]h>= num_cpus if no bit is set.}(hjWAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhjSAubah}(h]h ]h"]h$]h&]uh1jhj7Aubeh}(h]h ]h"]h$]h&]jjuh1jhjLAhMhj@ubh)}(h**Description**h]j/)}(hjtAh]h Description}(hjvAhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjrAubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj@ubh)}(hJstruct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h4struct bpf_cpumask pointers may be safely passed to }(hjAhhhNhNubj/)}(h**src1**h]hsrc1}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjAubh and }(hjAhhhNhNubj/)}(h**src2**h]hsrc2}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjAubh.}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj@ubeh}(h]h ] kernelindentah"]h$]h&]uh1j$hj#hhhNhNubj)}(h----h]h}(h]h ]h"]h$]h&]uh1jhhhMlhj#hhubh)}(hX=Some example usages of these querying kfuncs were shown above. We will not replicate those examples here. Note, however, that all of the aforementioned kfuncs are tested in `tools/testing/selftests/bpf/progs/cpumask_success.c`_, so please take a look there if you're looking for more examples of how they can be used.h](hSome example usages of these querying kfuncs were shown above. We will not replicate those examples here. Note, however, that all of the aforementioned kfuncs are tested in }(hjAhhhNhNubh reference)}(h6`tools/testing/selftests/bpf/progs/cpumask_success.c`_h]h3tools/testing/selftests/bpf/progs/cpumask_success.c}(hjAhhhNhNubah}(h]h ]h"]h$]h&]name3tools/testing/selftests/bpf/progs/cpumask_success.crefuriyhttps://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/tools/testing/selftests/bpf/progs/cpumask_success.cuh1jAhjAresolvedKubh\, so please take a look there if you’re looking for more examples of how they can be used.}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMnhj#hhubh)}(h.. _tools/testing/selftests/bpf/progs/cpumask_success.c: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/tools/testing/selftests/bpf/progs/cpumask_success.ch]h}(h]3tools-testing-selftests-bpf-progs-cpumask-success-cah ]h"]3tools/testing/selftests/bpf/progs/cpumask_success.cah$]h&]jAjAuh1hhMthj#hhhh referencedKubeh}(h](querying-cpumasksj#eh ]h"](3.2 querying cpumaskscpumasks-querying-labeleh$]h&]uh1hhj? hhhhhM\expect_referenced_by_name}jBj #sexpect_referenced_by_id}j#j #subeh}(h]cpumask-kfuncsah ]h"]3. cpumask kfuncsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h4. Adding BPF cpumask kfuncsh]h4. Adding BPF cpumask kfuncs}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhMyubh)}(hXThe set of supported BPF cpumask kfuncs are not (yet) a 1-1 match with the cpumask operations in include/linux/cpumask.h. Any of those cpumask operations could easily be encapsulated in a new kfunc if and when required. If you'd like to support a new cpumask operation, please feel free to submit a patch. If you do add a new cpumask kfunc, please document it here, and add any relevant selftest testcases to the cpumask selftest suite.h]hXThe set of supported BPF cpumask kfuncs are not (yet) a 1-1 match with the cpumask operations in include/linux/cpumask.h. Any of those cpumask operations could easily be encapsulated in a new kfunc if and when required. If you’d like to support a new cpumask operation, please feel free to submit a patch. If you do add a new cpumask kfunc, please document it here, and add any relevant selftest testcases to the cpumask selftest suite.}(hj(BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hjBhhubeh}(h]adding-bpf-cpumask-kfuncsah ]h"]4. adding bpf cpumask kfuncsah$]h&]uh1hhhhhhhhMyubeh}(h](bpf-cpumask-kfuncsheh ]h"](bpf cpumask kfuncscpumasks-header-labeleh$]h&]uh1hhhhhhhhKj B}jDBhsj B}hhsubeh}(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_handlerjlBerror_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}3tools/testing/selftests/bpf/progs/cpumask_success.c]jAasrefids}(h]haj#]j #aunameids}(jDBhjCBj@BjDjAj< j9 jjjjj[jXj4 j1 jBjBj j j j j#j#jBj#jBjBjAjAj;Bj8Bu nametypes}(jDBjCBjDj< jjj[j4 jBj j j#jBjBjAj;Buh}(hhj@BhjAhj9 jGjjfjjj jj-j2j5j:jXjj1 jhjBj? j jp j j j j j j j)j.jjj:j?jjj#jj;j@jjj/j4j j j#j#jBj#jH#jM#jB%jG%j<'jA'j*j#*j,j,j.j.j1j1j5j5jE8jJ8jz:j:j<j<j>j>jAjAj8BjBu 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](hsystem_message)}(hhh]h)}(hhh]h;Hyperlink target "cpumasks-header-label" is not referenced.}hjBsbah}(h]h ]h"]h$]h&]uh1hhjBubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1jBubjB)}(hhh]h)}(hhh]h=Hyperlink target "cpumasks-querying-label" is not referenced.}hjBsbah}(h]h ]h"]h$]h&]uh1hhjBubah}(h]h ]h"]h$]h&]levelKtypejBsourcehlineMYuh1jBube transformerN include_log] decorationNhhub.