From patchwork Tue Sep 14 22:23:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matteo Croce X-Patchwork-Id: 12494971 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61EB2C433F5 for ; Tue, 14 Sep 2021 22:23:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4331B61184 for ; Tue, 14 Sep 2021 22:23:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235319AbhINWYa (ORCPT ); Tue, 14 Sep 2021 18:24:30 -0400 Received: from mail-ej1-f48.google.com ([209.85.218.48]:37478 "EHLO mail-ej1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235609AbhINWY3 (ORCPT ); Tue, 14 Sep 2021 18:24:29 -0400 Received: by mail-ej1-f48.google.com with SMTP id h9so1739068ejs.4; Tue, 14 Sep 2021 15:23:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RLwX7Ft6iVObQeGOv+OOScxnxcJMRCVD4XgxogKw1ZA=; b=JkVMBX+keARH+SdhYxbxhkiUxiLPxOjfmjznQtnkPrPvwr1EVjIBDLeyAoCAfwGPji 1zisozh2JdKnekGoL5OTc0m5OORuUB8R/QV3e7m2mQrP1IU4EG5pagnhV7wGgWy6rki4 KPB4eqVN1Vgkj+Aju2+qhTi9wxtjlLpMNVTl4bTsu8nM1Cdp/xMxdYQbPi7JpE5H1wSl Jpc72MH4/LWf0mOivNwdt8ghxXGxmkxi7CslhaP1pmnoS/gCnKFOrDKujuWc6M5niWdG DA3X7JDz2DM55/k1PPgGgXmy0ft/ijb208yhEWon+2yhNcTKe8NBnPsZnJz7RA0EfwSn 5UKg== X-Gm-Message-State: AOAM530r6A7z4YQWVzmfXZDxfvy5SdktlUcD0CEyC3FOtdlkoa8MAUUd 9HhsD5ximWMn6DnCosWlLHaq6eAv1bOv4A== X-Google-Smtp-Source: ABdhPJw8MgqbISJRtcFOMV+5Ur7oPKTF/sqpV/byQveIK4AB6QMoOI2uZkFhqfxobxWrNYtGLlkW0A== X-Received: by 2002:a17:906:681:: with SMTP id u1mr21164779ejb.499.1631658190223; Tue, 14 Sep 2021 15:23:10 -0700 (PDT) Received: from msft-t490s.teknoraver.net (net-2-34-36-22.cust.vodafonedsl.it. [2.34.36.22]) by smtp.gmail.com with ESMTPSA id w13sm6592017ede.24.2021.09.14.15.23.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 15:23:09 -0700 (PDT) From: Matteo Croce To: bpf@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Subject: [PATCH bpf] bpf: update bpf_get_smp_processor_id() documentation Date: Wed, 15 Sep 2021 00:23:06 +0200 Message-Id: <20210914222306.52522-1-mcroce@linux.microsoft.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net From: Matteo Croce Since commit 1e6c62a88215 ("bpf: Introduce sleepable BPF programs"), BPF programs can sleep if the BPF_F_SLEEPABLE flag is set. Update the documentation accordingly. Fixes: 1e6c62a88215 ("bpf: Introduce sleepable BPF programs") Signed-off-by: Matteo Croce --- include/uapi/linux/bpf.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index d21326558d42..5e3b2fb62d84 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -1629,9 +1629,9 @@ union bpf_attr { * u32 bpf_get_smp_processor_id(void) * Description * Get the SMP (symmetric multiprocessing) processor id. Note that - * all programs run with preemption disabled, which means that the - * SMP processor id is stable during all the execution of the - * program. + * programs run with preemption disabled unless BPF_F_SLEEPABLE is + * set, which means that the SMP processor id is stable during all + * the execution of the program. * Return * The SMP id of the processor running the program. *