From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by mail.toke.dk (Postfix) with ESMTPS id ECF8D9A7A85 for ; Wed, 5 Oct 2022 02:59:56 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=iF2dUj+J Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 22EAD61511; Wed, 5 Oct 2022 00:59:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F14C9C433C1; Wed, 5 Oct 2022 00:59:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664931593; bh=weXEoa4zuD6c+WpyuzGGQenyv9+MCN+1y8tcJharYS8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iF2dUj+JWaJuxy8Zqp39w37CM6lFKa7jPhRpdq7JFq3MsmK9T0aSbDQdFalCpr5NQ 4AJmNa7cHT3L9pOByg9k9YwHArxsHmz00ejPc5+LLDAyv+bX1hTP+3F8zpGuP5bLVC 5bZfWoJmXwD1MiqTzgDqQPg5WnS7P+eYgdMTP24FO/t1ERssK+pk4UE+zGdnxHtWWO C4edyTXWIgbea1dKZeMQAW4EE3dNEwWo8MGt+4k1gmE5QGNSKWCLtTIFtLE0y+i4Nq IuuyoLXPZQYTIGNErO6bKMbrs28I+4ovz8b8GYOuDG9cs1UhCEc40IY6trIZXV33oA VoQoBJ3emj73g== Date: Tue, 4 Oct 2022 17:59:52 -0700 From: Jakub Kicinski To: Martin KaFai Lau Message-ID: <20221004175952.6e4aade7@kernel.org> In-Reply-To: <5ccff6fa-0d50-c436-b891-ab797fe7e3c4@linux.dev> References: <166256538687.1434226.15760041133601409770.stgit@firesoul> <35fcfb25-583a-e923-6eee-e8bbcc19db17@redhat.com> <5ccff6fa-0d50-c436-b891-ab797fe7e3c4@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: 6LQHO5ZWK4EHZXSBVKQHELQSR4YMZZRG X-Message-ID-Hash: 6LQHO5ZWK4EHZXSBVKQHELQSR4YMZZRG X-MailFrom: kuba@kernel.org 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: Stanislav Fomichev , Jesper Dangaard Brouer , brouer@redhat.com, bpf@vger.kernel.org, netdev@vger.kernel.org, xdp-hints@xdp-project.net, larysa.zaremba@intel.com, memxor@gmail.com, Lorenzo Bianconi , mtahhan@redhat.com, Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , dave@dtucker.co.uk, Magnus Karlsson , bjorn@kernel.org X-Mailman-Version: 3.3.5 Precedence: list Subject: [xdp-hints] Re: [PATCH RFCv2 bpf-next 00/18] XDP-hints: XDP gaining access to HW offload hints via BTF List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, 4 Oct 2022 17:25:51 -0700 Martin KaFai Lau wrote: > A intentionally wild question, what does it take for the driver to return the > hints. Is the rx_desc and rx_queue enough? When the xdp prog is calling a > kfunc/bpf-helper, like 'hwtstamp = bpf_xdp_get_hwtstamp()', can the driver > replace it with some inline bpf code (like how the inline code is generated for > the map_lookup helper). The xdp prog can then store the hwstamp in the meta > area in any layout it wants. Since you mentioned it... FWIW that was always my preference rather than the BTF magic :) The jited image would have to be per-driver like we do for BPF offload but that's easy to do from the technical perspective (I doubt many deployments bind the same prog to multiple HW devices)..