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 5366FC4332F for ; Wed, 5 Oct 2022 01:25:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229676AbiJEBY7 (ORCPT ); Tue, 4 Oct 2022 21:24:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbiJEBY6 (ORCPT ); Tue, 4 Oct 2022 21:24:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E74861260B; Tue, 4 Oct 2022 18:24:55 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 9C499B81C4E; Wed, 5 Oct 2022 01:24:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5989C433C1; Wed, 5 Oct 2022 01:24:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664933093; bh=+SpVYMQRSVDzl8SG19hqiLp1I5AQ70apCqU8oshGPJM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WKQHqRrzQQZJfurmJD6DcH0ziQtGbJ9UW4cQ215XFFo6LsxY7hAqccXqE+XQzHBm7 xjIxcDO03Q/Pjb/hUm8ZFAe4H07i2tkOC+Y5ulwxKrVb1TRvheDp9OaKYVIjlB1VHi VZY6BHdSu8lis6980huPBLROSrk51QjR3SMBGsAfq1jNr/DFSpSBTxINQn12znbtJ1 D0WiJBhDuBva/C7HCkIhi+onA3iwFsrwlFgVtQUkx/SdkwhIC33yvEFkt+pqj+4HOU t1kUwTYvuUBukz2qS0UMOKcOealDb6NhhcIlvaeZanAwFSUIZoSipJ/D3rpOwJDa2Z gEGg1X+Uo3f/w== Date: Tue, 4 Oct 2022 18:24:51 -0700 From: Jakub Kicinski To: Stanislav Fomichev Cc: Martin KaFai Lau , 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 Subject: Re: [PATCH RFCv2 bpf-next 00/18] XDP-hints: XDP gaining access to HW offload hints via BTF Message-ID: <20221004182451.6804b8ca@kernel.org> In-Reply-To: References: <166256538687.1434226.15760041133601409770.stgit@firesoul> <35fcfb25-583a-e923-6eee-e8bbcc19db17@redhat.com> <5ccff6fa-0d50-c436-b891-ab797fe7e3c4@linux.dev> <20221004175952.6e4aade7@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, 4 Oct 2022 18:02:56 -0700 Stanislav Fomichev wrote: > +1, sounds like a good alternative (got your reply while typing) > I'm not too versed in the rx_desc/rx_queue area, but seems like worst > case that bpf_xdp_get_hwtstamp can probably receive a xdp_md ctx and > parse it out from the pre-populated metadata? I'd think so, worst case the driver can put xdp_md into a struct and container_of() to get to its own stack with whatever fields it needs. > Btw, do we also need to think about the redirect case? What happens > when I redirect one frame from a device A with one metadata format to > a device B with another? If there is a program on Tx then it'd be trivial - just do the info <-> descriptor translation in the opposite direction than Rx. TBH I'm not sure how it'd be done in the current approach, either. Now I questioned the BTF way and mentioned the Tx-side program in a single thread, I better stop talking...