Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4757367rwe; Mon, 17 Apr 2023 18:45:27 -0700 (PDT) X-Google-Smtp-Source: AKy350YukZfoSMxiXE1bntw4QcEHGCE+ghu41bRgw4YKUhqCr+oMAwAXbxjAE2fPkGJzQEM8ucbS X-Received: by 2002:a17:902:cec5:b0:19b:dae0:c97d with SMTP id d5-20020a170902cec500b0019bdae0c97dmr614889plg.32.1681782326925; Mon, 17 Apr 2023 18:45:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681782326; cv=none; d=google.com; s=arc-20160816; b=rTS/thFJia2NQAkbX2GaynptovJRj7NDMfQWAF7qwPWaVYkrWq5i0/gkn/b7F9TWjm ssCUztRXwtaya/ICO4QSp7caijZV26Ew83J6RrKzuJvffyht+J08LeEVb6Lp2JvoIyVv mUAWTm4zaIAg543xpdvUrdzoxlo7aCgE0iU3elQta7Nc9LvXnGvp5R70qNrRMyxdmijH Ul14cZwsYTDORtErvNSEZ1uIE/RAvJejQlg4sODsUmnXhizlqLCDqIESbOSgxdQD0AFJ rkqOvj1BFDzWghhVb1RsRzD89l1gWAdiXG15wT4VViUX4wr1FMonVQ/abVk+5LHdlfHn uZBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=tnG7XRDx2oVnxRfx5yqwQBjNsF82L1FllZqCFSzhSvk=; b=RiXBhV5jjn1LPU3PWkBEYwlWBbNZ7IbgbgE7LCQetI68HPVFI1bBeCD+DxMIHp6a6x QRKh4frspJJHbO8JT0tS+feIChVlyA1JW+smaBuDbT3n6RqQZVqXd2waal2mbOyN8M/Y 8IuvvzoRKzYbnE8Mn10OCtYLT6znMgmTxk44bILnOrtcSvq9V8EXpwEHqDjgvBSBEjXj mNqnx0xFUUetjcluKREax9bli8eoj0S0HYwdMVWC65Nt/M/MBZB1FfeZBaCHB03/yIep 6NmOmfX4OA6A1+a0HN5BCNutzPN22RLRWL1VfJOwN97aTeDjfZ6SaAcAa4W+A2X5lF+i 6zkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=SkI3OL7X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x18-20020a170902b41200b001a6fe422891si736830plr.205.2023.04.17.18.45.13; Mon, 17 Apr 2023 18:45:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=SkI3OL7X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230453AbjDRBoi (ORCPT + 99 others); Mon, 17 Apr 2023 21:44:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230459AbjDRBnb (ORCPT ); Mon, 17 Apr 2023 21:43:31 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37EEC4222 for ; Mon, 17 Apr 2023 18:42:13 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-552e3233b26so32077457b3.9 for ; Mon, 17 Apr 2023 18:42:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1681782112; x=1684374112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=tnG7XRDx2oVnxRfx5yqwQBjNsF82L1FllZqCFSzhSvk=; b=SkI3OL7Xwcb2D8buNw1xsFgokzhAAQBXqENLcRBKEhMxZBceAdT76zRqhUKaAlZRib aI6PlfHc5n4ddtN3+6mjTW4Cs8BBdyXGjyExSVPyeQf5XRY0Liaw+CyvPQArNpVYYnib TGm738pcBWjnR5XstajeRfCSTCqIp9dGcgPyzLhYYauS/Ba9DT/7Oo4iwDdfQ5MeXhvv m9omEapvVlOwz2XNsPXLPYl6qDc4wN5t+WJMQ3+JHgRWz6iur0twsD7zOIFKKeIe51D7 dw3h5jHufm+Ui9oRM1TAW/H897y1hff2PlchumkhwBxLImVetPWMILw+PxvkA+8WTkDa ztcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681782112; x=1684374112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tnG7XRDx2oVnxRfx5yqwQBjNsF82L1FllZqCFSzhSvk=; b=UmUaHr4w5L5GZYziru10QtrCT0OKF7qY/s+orrKY849RmRJB9kmZLtxc8esWSARW6/ Yh491LKjw8lYATDgl59HYiHqeEGNvxP3VvDd6OqAOvfmmkrc7BfXl67gcOwZsbhjbRP6 GClHnyj19FiW55GJJpReSDpsIO0FgEyHrzLxWEZ7FNw7pUOXyYGxTtBrbUdPgK946ljB KI7P1dx6Q+jVW7Nb/GYi4Y/gwD/OLP9F19lGrOwn+eIMvCGFTEW5rgOhlg35AbU8b1o/ JBEiBcq2qajUZHyl8mq1Pq/WvhsEsx8xxYrBRWJuxNd3ASLE8wrYFG4uLEGZ0TlruvNR 3/+Q== X-Gm-Message-State: AAQBX9e0mAbPGThWmQaTCYTluGEScSJanXRKVnPkfpvLhdzYdOMSqWst kNgMwdz5mWE0KviJA3oVmlLxTFDoxjY= X-Received: from drosen.mtv.corp.google.com ([2620:15c:211:201:e67a:98b0:942d:86aa]) (user=drosen job=sendgmr) by 2002:a81:e503:0:b0:54f:40fe:10cc with SMTP id s3-20020a81e503000000b0054f40fe10ccmr10636927ywl.9.1681782112257; Mon, 17 Apr 2023 18:41:52 -0700 (PDT) Date: Mon, 17 Apr 2023 18:40:27 -0700 In-Reply-To: <20230418014037.2412394-1-drosen@google.com> Mime-Version: 1.0 References: <20230418014037.2412394-1-drosen@google.com> X-Mailer: git-send-email 2.40.0.634.g4ca3ef3211-goog Message-ID: <20230418014037.2412394-28-drosen@google.com> Subject: [RFC PATCH v3 27/37] fuse-bpf: Add fuse-bpf constants From: Daniel Rosenberg To: Miklos Szeredi , bpf@vger.kernel.org, Alexei Starovoitov Cc: Amir Goldstein , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org, Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan , Jonathan Corbet , Joanne Koong , Mykola Lysenko , kernel-team@android.com, Daniel Rosenberg Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds constants that fuse_op programs will rely on for communicating what action fuse should take next. Signed-off-by: Daniel Rosenberg --- include/uapi/linux/bpf.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 4b20a7269bee..6521c40875c7 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -7155,4 +7155,16 @@ struct bpf_iter_num { __u64 __opaque[1]; } __attribute__((aligned(8))); +/* Return Codes for Fuse BPF struct_op programs */ +#define BPF_FUSE_CONTINUE 0 +#define BPF_FUSE_USER 1 +#define BPF_FUSE_USER_PREFILTER 2 +#define BPF_FUSE_POSTFILTER 3 +#define BPF_FUSE_USER_POSTFILTER 4 + +/* Op Code Filter values for BPF Programs */ +#define FUSE_OPCODE_FILTER 0x0ffff +#define FUSE_PREFILTER 0x10000 +#define FUSE_POSTFILTER 0x20000 + #endif /* _UAPI__LINUX_BPF_H__ */ -- 2.40.0.634.g4ca3ef3211-goog