From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CAF2C636D6 for ; Fri, 17 Feb 2023 17:39:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229674AbjBQRjE (ORCPT ); Fri, 17 Feb 2023 12:39:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbjBQRjD (ORCPT ); Fri, 17 Feb 2023 12:39:03 -0500 Received: from out0.migadu.com (out0.migadu.com [IPv6:2001:41d0:2:267::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B28987149D; Fri, 17 Feb 2023 09:39:01 -0800 (PST) Message-ID: <514bb57b-cc3e-7b7e-c7d4-94cdf52565d6@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1676655539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mUAWCHNiI3huoooaliH6fSRpJWfQfHulzV4uLmvQAiA=; b=gm3Xj59+48hMvxIvopTueKoApxS7bfbXjJxDYzds5jcGQTSyiJekDsk3HDcUqqWvQeRe88 IOht0CBH8f28sNbQL3KuISV9drHMXHAFu8z3qFuE4E780hJK2oIzWiWzwaLXYORtQalLcq P/NhYqPw8OX1W8G/XYgUxKhlAwoSQN8= Date: Fri, 17 Feb 2023 09:38:54 -0800 MIME-Version: 1.0 Subject: Re: [PATCH bpf-next V2] xdp: bpf_xdp_metadata use NODEV for no device support Content-Language: en-US To: Stanislav Fomichev , Jesper Dangaard Brouer Cc: bpf@vger.kernel.org, netdev@vger.kernel.org, martin.lau@kernel.org, ast@kernel.org, daniel@iogearbox.net, alexandr.lobakin@intel.com, larysa.zaremba@intel.com, xdp-hints@xdp-project.net References: <167663589722.1933643.15760680115820248363.stgit@firesoul> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2/17/23 9:32 AM, Stanislav Fomichev wrote: > On 02/17, Jesper Dangaard Brouer wrote: >> With our XDP-hints kfunc approach, where individual drivers overload the >> default implementation, it can be hard for API users to determine >> whether or not the current device driver have this kfunc available. > >> Change the default implementations to use an errno (ENODEV), that >> drivers shouldn't return, to make it possible for BPF runtime to >> determine if bpf kfunc for xdp metadata isn't implemented by driver. > >> This is intended to ease supporting and troubleshooting setups. E.g. >> when users on mailing list report -19 (ENODEV) as an error, then we can >> immediately tell them their device driver is too old. > > I agree with the v1 comments that I'm not sure how it helps. > Why can't we update the doc in the same fashion and say that > the drivers shouldn't return EOPNOTSUPP? > > I'm fine with the change if you think it makes your/users life > easier. Although I don't really understand how. We can, as Toke > mentioned, ask the users to provide jited program dump if it's > mostly about user reports. and there is xdp-features also.