From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by mail.toke.dk (Postfix) with ESMTPS id 2464B9EAD2D for ; Fri, 17 Feb 2023 18:39:00 +0100 (CET) Authentication-Results: mail.toke.dk; dkim=pass (1024-bit key; unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=gm3Xj59+ 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 Content-Language: en-US To: Stanislav Fomichev , Jesper Dangaard Brouer 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 Message-ID-Hash: RYOG43XZ5EHPHWI3ACOY75ABMOMWYTGM X-Message-ID-Hash: RYOG43XZ5EHPHWI3ACOY75ABMOMWYTGM X-MailFrom: martin.lau@linux.dev 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, 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 X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [PATCH bpf-next V2] xdp: bpf_xdp_metadata use NODEV for no device support List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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.