From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by mail.toke.dk (Postfix) with ESMTPS id 3E3A79CC0F4 for ; Wed, 7 Dec 2022 05:29:12 +0100 (CET) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=qKSRoOkK Received: by mail-pl1-x631.google.com with SMTP id y4so15965782plb.2 for ; Tue, 06 Dec 2022 20:29:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=knx8DaVvtyDcuxnveWkSC62UfBFfV/ZPUHXvqeSZbhk=; b=qKSRoOkKZvSi03MYpIH21wqK4csKSh7stYYVO+HWa3D5z8nInC/dnzgsX7p3dfdkUZ XlgO69svgZECoUEGDv5+u18HKvKvapjaSyrXh+TF7g+2Qq4mwFPlAxjwXBMTtjIEFYcm QZSlomcksXTcPzIl52gu3kue++XLSaAr/NZpv5CPnfLWrgi2eRjMRP3AcrjfcqYK4UQ2 0HjVAp5ica1eQi+UNvmAWz5AySZxVqNLmB57I5Zz+TXKrnvdQONisAyVHFm959F0NhhV iUC/fSe80E6lvYRMdPYpl7nyZHDOjzkr8Hf/VaV5YrrMHBMXCsOCQ+14E7gp8yJG1xt0 HZVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=knx8DaVvtyDcuxnveWkSC62UfBFfV/ZPUHXvqeSZbhk=; b=1IPoc8PpYJ4xNJVUBGr1pK13sLhtItkayM92Uw3eWHXSHsg6SKhYMvzOwAK46ntubC NSfe5rLm/4XwT7vZEIHu5pve7nurIksZ1SA5ipyWDtdh96Jw9Li1mEGQd/oy0a0+4q2h iiZ6wppqXU3Vq2O50pzKmY7/lD1kgkA29U1PEdMbV5+G8g6vh1eIP9/EV9A2ipHZ/c+B YgXp7yyX+/7As5vRD63MDDR7yTclIuzmBrlcedXaZ/lysqS4hzcgOKS7fm7kqmnOzJwQ iVDJBREAnEA7GnCwkjXXQfSANyDVBKYnEYOrx/kuEQwCsWg3ykfyXgs747C6vQBHTv8e 4axQ== X-Gm-Message-State: ANoB5pnBXZOqnzfzAul/Cfu0HTtnVx65ehAwZxENgggDxENPSdYxQvLj n3XZCVs+Ge3F2o8g9DPMP1M= X-Google-Smtp-Source: AA0mqf5JPVFdrLMv51rSvIAapBM/PfRj7vwMyIVEmO8Jl0DmI+bSZurPBn++JyBej4o9IFJ9a7pxyw== X-Received: by 2002:a05:6a20:9f43:b0:a9:d06b:ef2 with SMTP id ml3-20020a056a209f4300b000a9d06b0ef2mr678003pzb.36.1670387349972; Tue, 06 Dec 2022 20:29:09 -0800 (PST) Received: from macbook-pro-6.dhcp.thefacebook.com ([2620:10d:c090:400::5:11da]) by smtp.gmail.com with ESMTPSA id x17-20020aa79ad1000000b005736209dc01sm12424279pfp.47.2022.12.06.20.29.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 20:29:09 -0800 (PST) Date: Tue, 6 Dec 2022 20:29:04 -0800 From: Alexei Starovoitov To: Stanislav Fomichev Message-ID: References: <20221206024554.3826186-1-sdf@google.com> <20221206024554.3826186-4-sdf@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221206024554.3826186-4-sdf@google.com> Message-ID-Hash: Y4ZNO7F4LG5VV6JMFAUYSWZU4UFRJAKS X-Message-ID-Hash: Y4ZNO7F4LG5VV6JMFAUYSWZU4UFRJAKS X-MailFrom: alexei.starovoitov@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, haoluo@google.com, jolsa@kernel.org, David Ahern , Jakub Kicinski , Willem de Bruijn , Jesper Dangaard Brouer , Anatoly Burakov , Alexander Lobakin , Magnus Karlsson , Maryam Tahhan , xdp-hints@xdp-project.net, netdev@vger.kernel.org X-Mailman-Version: 3.3.7 Precedence: list Subject: [xdp-hints] Re: [PATCH bpf-next v3 03/12] bpf: XDP metadata RX kfuncs List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, Dec 05, 2022 at 06:45:45PM -0800, Stanislav Fomichev wrote: > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c > index fc4e313a4d2e..00951a59ee26 100644 > --- a/kernel/bpf/verifier.c > +++ b/kernel/bpf/verifier.c > @@ -15323,6 +15323,24 @@ static int fixup_kfunc_call(struct bpf_verifier_env *env, struct bpf_insn *insn, > return -EINVAL; > } > > + *cnt = 0; > + > + if (resolve_prog_type(env->prog) == BPF_PROG_TYPE_XDP) { > + if (bpf_prog_is_offloaded(env->prog->aux)) { > + verbose(env, "no metadata kfuncs offload\n"); > + return -EINVAL; > + } If I'm reading this correctly than this error will trigger for any XDP prog trying to use a kfunc? I was hoping that BPF CI can prove my point, but it failed to build your newly added xdp_hw_metadata.c test.