Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6800312rdb; Fri, 15 Dec 2023 08:37:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGvy0QqsJhe3Rtv08ZPorFrvCRWOs55g+x/GmasJa9111JYAJgclxfSdQLctgttJOqWPSxD X-Received: by 2002:a05:620a:2201:b0:77a:55b2:5dae with SMTP id m1-20020a05620a220100b0077a55b25daemr11346111qkh.53.1702658244781; Fri, 15 Dec 2023 08:37:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702658244; cv=none; d=google.com; s=arc-20160816; b=WRqIluSfdYkmt00X7CdqWw7S/DtRAWQDJAN7Zh7RxHuNl1yyfeTyZZFyBYGWs/4nSP qkaGTwvl3UdtXF84rzfMWtS6/GpGLXmEGL3aiIJuF1lhTGVN0uWMkfwU15sv9+3O3ui8 pWMl81xewahbOmqUUXmPamRc1QTueOuQ8pBvByb11qNpT66H3o0rSGXLzTlI5oqYHMpQ XBv1mnfPDaQPWNHLOkmIIo42+COFPj0rOjC3yNjTs+WaGWZb7h3j2t24SN9AmqdDISV4 HdSsfb2Xhyul3Fm9qGINft4L5AxlLQL2kVxeLdAvrAGaAfrtp5i92VrbCcRkxeX20Pc8 vSzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=aJvYVagYHhoUh6izHlhrfd4VlIqIxeyLW6YH9/IOyR8=; fh=ATP8HtKJBEYib9fIhp9nywdhLlVMt2EJzZntSvZqu6Y=; b=sE+Q1yU1FDbCZSm7JyXAOqP8cXFw2/sKP/MsUBQnrlFyCp1QphJbpbXghA8Z2NnRbn XmmnxT3Wy+AZ3q42VyiNnen9Ja9K1WuPFAoBjsLYl3yftogsnlgJ+6gYLEq3Zb/nCVXL jAFTNR0e0ib8Qkea5U31oFgjGPpzF2o0mTzz2D2bZ9Xc5rZGtSNg2qcm0dXTVaaNJVRk +2B9sADL/yVjyDzfIp+8i/odzyoffzZDJq2OuDRvE+NYATqplz7X4aDdbUR+QZtyc/xe Bf6s7ztlR42IZu/YmbEfNMKpR3LnJGHE7lrvdkm2p2sNi4uKCSkNv5wCmqkAflJ3L7Kz TO9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20230601.gappssmtp.com header.s=20230601 header.b=FMziPy5F; spf=pass (google.com: domain of linux-kernel+bounces-1311-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1311-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=networkplumber.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id de14-20020a05620a370e00b0077d895b15f5si19243747qkb.624.2023.12.15.08.37.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 08:37:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1311-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@networkplumber-org.20230601.gappssmtp.com header.s=20230601 header.b=FMziPy5F; spf=pass (google.com: domain of linux-kernel+bounces-1311-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1311-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=networkplumber.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7AD3D1C23D4A for ; Fri, 15 Dec 2023 16:37:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B1A093FB0F; Fri, 15 Dec 2023 16:36:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b="FMziPy5F" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35F4B3DBA7 for ; Fri, 15 Dec 2023 16:36:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-28b0a9876c8so407440a91.3 for ; Fri, 15 Dec 2023 08:36:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1702658207; x=1703263007; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=aJvYVagYHhoUh6izHlhrfd4VlIqIxeyLW6YH9/IOyR8=; b=FMziPy5F0KuuWbuqia792leGIkEYU7QDEsuclB9QFip9dubN5SF+2PDn8809rmnxjK wMl4/DjHttWumZ8JNKgouE6nNNdjGPJbkUWzvuTrg7izvDguTeO22lhyWP4d5F6NUjjv WEnEVqSnaCtRLYN8UOKJcTytt4fPr0Fz1+SfOKCSELF8j7CNdjAy+ttS3Iu9ENbaJSTR c/WyjxpScQosXyDYH82FyxqAlfLw3qFVra0/rKsTvt07kgX3Oh+qYC1v2wLwcPlTrten Dfzn9qqzinuyvyPsX24hjsF3Meu6uw+htdB5Zs/puf76TwPgA4A0cs+j1hWs8w44Ejcq liBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702658207; x=1703263007; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aJvYVagYHhoUh6izHlhrfd4VlIqIxeyLW6YH9/IOyR8=; b=uJwULuLXgsfo3kMDnDAHpsy/T7lODgYcq1Y6J93Fv1rlgEUVBDkaU7cWsQMlBmxVXe d9j/DdSj67+CLY8aJ/z8LCg5rJMTDi6eLnB1tR4kyFubBY9tYWSdmVUPt+vARcp6oLNf GUOT2HcnF1KCpvu3vxogVaNewh/d1lOWCcHZ7ZH6OrPZqhIzClf6mexWbmHxQEb7eYHt eqbD22DRW4/l2nQxB0Nzf0TQTQCxzh+Jtmls/JB1nPLhzMf88pOamXPOksN8ShXG4BQc TRRj0O38G1VBTdhDKir5ygwVMyNH6/rB0dIdggG3xVpBqGYqjGS1WBaOGS1lq4U2S5Xi oHjQ== X-Gm-Message-State: AOJu0YyH/5ZFhPbR15bTQwTi/22PaJOS0X/xa3xjYXc5GZ14W0jAMAYD aQyGfEhbJ2GyJu/D2m8b8dThog== X-Received: by 2002:a17:90a:4687:b0:28a:efa3:682f with SMTP id z7-20020a17090a468700b0028aefa3682fmr2312037pjf.74.1702658207601; Fri, 15 Dec 2023 08:36:47 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id h5-20020a17090a9c0500b0028ad273525dsm6353303pjp.25.2023.12.15.08.36.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 08:36:47 -0800 (PST) Date: Fri, 15 Dec 2023 08:36:44 -0800 From: Stephen Hemminger To: Akihiko Odaki Cc: Benjamin Tissoires , 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 , Yuri Benditovich , Andrew Melnychenko , Benjamin Tissoires , bpf , "open list:DOCUMENTATION" , kvm@vger.kernel.org, LKML , virtualization@lists.linux-foundation.org, "open list:KERNEL SELFTEST FRAMEWORK" , Network Development Subject: Re: Should I add BPF kfuncs for userspace apps? And how? Message-ID: <20231215083644.4dd9a323@hermes.local> In-Reply-To: <72b8e198-7058-469a-a1e0-17f48330deca@daynix.com> References: <2f33be45-fe11-4b69-8e89-4d2824a0bf01@daynix.com> <0d68722c-9e29-407b-9ef0-331683c995d2@daynix.com> <20231214094042.75f704f6@hermes.local> <72b8e198-7058-469a-a1e0-17f48330deca@daynix.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 15 Dec 2023 14:49:56 +0900 Akihiko Odaki wrote: > >> It is exactly what BPF_PROG_TYPE_SOCKET_FILTER does, but it lacks a > >> mechanism to report hash values so I need to extend it or invent a new > >> method. Extending BPF_PROG_TYPE_SOCKET_FILTER is not a way forward since > >> CO-RE is superior to the context rewrite it relies on. But apparently > >> adopting kfuncs and CO-RE also means to lose the "we don't break user > >> space" contract although I have no intention to expose kernel internals > >> to the eBPF program. > > > > An example is how one part of DPDK recomputes RSS over TAP. > > > > https://git.dpdk.org/dpdk/tree/drivers/net/tap/bpf/tap_bpf_program.c > > > > This feature is likely to be removed, because it is not actively used > > and the changes in BPF program loading broke it on current kernel > > releases. Which brings up the point that since the kernel does > > not have stable API/ABI for BPF program infrastructure, I would > > avoid it for projects that don't want to deal with that. > > It's unfortunate to hear that, but thanks for the information. > I'll consider more about the option not using BPF (plain ioctl and > in-kernel implementation). With libbpf, things are much better. It is just that projects like DPDK have to support wide range of kernels including older versions of RHEL.