Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4132873rdb; Mon, 11 Dec 2023 09:41:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJJQRZSfP8RH4F3ymFemQBnvEAtvXY1k14dWbv663UwKzV8KE+j0/yo8jIWnvQZSsA5Oc0 X-Received: by 2002:a05:6358:e49b:b0:16e:2856:f70b with SMTP id by27-20020a056358e49b00b0016e2856f70bmr3023744rwb.14.1702316493372; Mon, 11 Dec 2023 09:41:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702316493; cv=none; d=google.com; s=arc-20160816; b=APxz+S1K2HvAREFYtiB+PTx5fyv+pa1rqMDUiwMykgOU67Yc2YmPWOf5q9OH9ALhxJ O4DDdkGyhPTyExxEnNAeLuFC6+i99RVRJAfi0Kx+PrMwCcIdWFTiCYh/zgaqPx25ECfb bx9n6cRs+1ftEgpkFKlyC7lBq+K1lox2sAPgmaKNdrJSyzRWYzYQiY1jBr9tX0MQXflD alA1plezbryl+/J0u5PizUvb4DV3OD8EbTSHqWZmRpTFSGIr9VIbobueyBMN/66wobzj tAxjecNlzR1MqTZ0mCayEhSxzR8ZgibD+zwZgHfQavgSrm5ZzSgg4GQ29yeOlzXkBvi4 5yyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=hOU4jYl2zjD7dm4WiF388gDlJNEcYLRmL4FrrPgk5yA=; fh=k14T+ltQmYxY47rXINDOvNpSCjIbeWJPI0i5dqbdmVc=; b=cIYLOx7aAnrzg4H+qHCK/KHVY8qX5BykLuq5cka2gJAVaJMKJxexz5nx7UPTQezvDu cO8qhENiT8VRmc3yRjY2McemC24ErNpYYDWW1K9hB8N4Jl/gG0arO8guB7CjHgFO8NlS 7Q1RB1A7sqO31pf4vjGAqVQ7nXcwFOsKD3k860D3w7QOlKcAjTlMGwtJ0W4udb5Xw95o ZGhwULwd9dh/T+tTAm7sHdSJKXpQU9B45S/1shpia9HNzP7VaLlafDTHzTZYUEFTgJn5 EAzsqqW3SZXh3PZjXyoyck+9WRojSNfX1yzOLF3/MVuwF6y/j1NyBjiPNBxvRyNm5K3Q Ssng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ILT7ZiPQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id c37-20020a634e25000000b005c682e0ced3si6432846pgb.97.2023.12.11.09.41.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 09:41:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ILT7ZiPQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 19F55804BB6E; Mon, 11 Dec 2023 09:41:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344944AbjLKRkb (ORCPT + 99 others); Mon, 11 Dec 2023 12:40:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344964AbjLKRkV (ORCPT ); Mon, 11 Dec 2023 12:40:21 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 361AB118 for ; Mon, 11 Dec 2023 09:40:24 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28A99C433C8; Mon, 11 Dec 2023 17:40:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702316424; bh=hOU4jYl2zjD7dm4WiF388gDlJNEcYLRmL4FrrPgk5yA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ILT7ZiPQGYhBDRi5b3lf2uIdYB4fRbuh2WtUGL5lqBhOSH9SQvJlRI4vIBz2v17S+ blGaty3kzjUowjXu+vwC+cpgSyt00WKM35hBVSFNoLhiDqRYp1qNOKsm9iz9+8yiST Q7K6KPtg6FMORGKJpZx3r5qFsWADIKZ7z27AI70Za4hAoGh4qLSigaBPpfhbzDtG4B WegId6wDnidKSJcRZAEmY6Gsyb2qXOjKSyhqb3S+T2soCbbL8ZCGJnTGo/vdm3VtFH 5din7ZlxT5L0DDzybGDn3dJwXQ4AqFpESE3FPPogtTM2eGc+sDPJnDgua4TycmkKSN p4xYROwwpkw+g== Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-50bef9b7a67so5378236e87.1; Mon, 11 Dec 2023 09:40:24 -0800 (PST) X-Gm-Message-State: AOJu0YzJcd3YEJQ+ACZdrqlHk0GTTyqjPJZRsUdvkqqPNe2zlYKaxz51 2qxhxzSHuFpFiIVtjJjx7ryxgkkPkIYrvW+S2VY= X-Received: by 2002:a2e:b046:0:b0:2ca:34cd:77e4 with SMTP id d6-20020a2eb046000000b002ca34cd77e4mr1895908ljl.103.1702316422374; Mon, 11 Dec 2023 09:40:22 -0800 (PST) MIME-Version: 1.0 References: <20231015141644.260646-1-akihiko.odaki@daynix.com> <2594bb24-74dc-4785-b46d-e1bffcc3e7ed@daynix.com> <9a4853ad-5ef4-4b15-a49e-9edb5ae4468e@daynix.com> <6253fb6b-9a53-484a-9be5-8facd46c051e@daynix.com> <664003d3-aadb-4938-80f6-67fab1c9dcdd@daynix.com> <49a5b971-ae97-4118-ae20-f651ad14bed7@daynix.com> In-Reply-To: <49a5b971-ae97-4118-ae20-f651ad14bed7@daynix.com> From: Song Liu Date: Mon, 11 Dec 2023 09:40:10 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v2 1/7] bpf: Introduce BPF_PROG_TYPE_VNET_HASH To: Akihiko Odaki Cc: Alexei Starovoitov , Jason Wang , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Jonathan Corbet , Willem de Bruijn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Xuan Zhuo , Mykola Lysenko , Shuah Khan , bpf , "open list:DOCUMENTATION" , LKML , Network Development , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, "open list:KERNEL SELFTEST FRAMEWORK" , Yuri Benditovich , Andrew Melnychenko Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 11 Dec 2023 09:41:30 -0800 (PST) On Sun, Dec 10, 2023 at 9:04=E2=80=AFPM Akihiko Odaki wrote: > [...] > > > > I don't think we can provide stability guarantees before seeing somethi= ng > > being used in the field. How do we know it will be useful forever? If a > > couple years later, there is only one person using it somewhere in the > > world, why should we keep supporting it? If there are millions of virtu= al > > machines using it, why would you worry about it being removed? > > I have a different opinion about providing stability guarantees; I > believe it is safe to provide such a guarantee without actual use in a > field. We develop features expecting there are real uses, and if it > turns out otherwise, we can break the stated guarantee since there is no > real use cases anyway. It is fine even breaking UAPIs in such a case, > which is stated in Documentation/admin-guide/reporting-regressions.rst. > > So I rather feel easy about guaranteeing UAPI stability; we can just > guarantee the UAPI-level stability for a particular kfunc and use it > from QEMU expecting the stability. If the feature is found not useful, > QEMU and the kernel can just remove it. It appears that we more or less agree that this feature may not be something we will support forever. > I'm more concerned about the other case, which means that there will be > wide uses of this feature. A kernel developer may assume the stability > of the interface is like one of kernel internal APIs > (Documentation/bpf/kfuncs.rst says kfuncs are like EXPORT_SYMBOL_GPL) > and decide to change it, breaking old QEMU binaries and that's something > I would like to avoid. > > Regarding the breakage scenario, I think we can avoid the kfuncs removal > just by saying "we won't remove them". I'm more worried the case that a > change in the BPF kfunc infrastucture requires to recompile the binary. > > So, in short, I don't think we can say "kfuncs are like > EXPORT_SYMBOL_GPL" and "you can freely use kfuncs in a normal userspace > application like QEMU" at the same time. > > > [...] > > > > > I would recommend you give option 2 a try and share the code. This is > > probably the best way to move the discussion forward. > > I'd like to add a documentation change to say the added kfuncs are > exceptional cases that are not like EXPORT_SYMBOL_GPL in that case. Will > it work? It will not. The BPF community had a lot of discussions about the stability of BPF APIs,= for example in [1]. Therefore, this is not a light decision. AFAICT, what is being proposed in this RFC is way less stable than many kfu= ncs we added recently. We are not changing the stability guarantee for this. Le= t's invest our time wisely and work on more meaningful things, for example, a prototype that may actually get accepted. Thanks, Song [1] https://lore.kernel.org/bpf/20221207205537.860248-1-joannelkoong@gmail.= com/