From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mail.toke.dk (Postfix) with ESMTPS id 0420997AD4F for ; Wed, 15 Jun 2022 12:21:02 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=FkeWVQQS DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655288463; x=1686824463; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7R2f5eT+QIjQ2DPZNr3NhWZeOGsq4TBUCeCjYpI+3eE=; b=FkeWVQQSYMCWsEXwzlVf14g6DPUQPxdJEbyaKnai1cljkK2zevRJDhWr 6NksxZY2fc5eaJGXA7v9/5NkCDHfHGHMlw92qwdhR9GUPY6awWf1zrn98 b2UGrSehjvHH5h5xwFZOkwFZXgkZf51Zu5EL4j8zc8WUKLKCBW7Bmf7CJ bF7uBDm8V24uP7K5Nof9VznDAys3HVzefAdHE5VO8yVEKg6bm5p8TbUWM +CUYOZaFJk6+HcXoMLnfVE39JQF0o+nV8Qp5olv1ft0juT6q3bJbuAZWl vgfANXbitQb3uuGsyU6pSXOxofQIolHYsn0Hr4yEMGbV/Dt2lncqC01xE g==; X-IronPort-AV: E=McAfee;i="6400,9594,10378"; a="342870837" X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="342870837" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2022 03:20:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="583141184" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by orsmga007.jf.intel.com with ESMTP; 15 Jun 2022 03:20:56 -0700 Received: from newjersey.igk.intel.com (newjersey.igk.intel.com [10.102.20.203]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 25FAKt6p031042; Wed, 15 Jun 2022 11:20:55 +0100 From: Alexander Lobakin To: Jesper Dangaard Brouer Date: Wed, 15 Jun 2022 12:19:16 +0200 Message-Id: <20220615101916.1259592-1-alexandr.lobakin@intel.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: References: <20220516144135.11132-1-alexandr.lobakin@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Message-ID-Hash: W5BEVG3IW6UFY2ZCKJO6ZIF762XGABK4 X-Message-ID-Hash: W5BEVG3IW6UFY2ZCKJO6ZIF762XGABK4 X-MailFrom: alexandr.lobakin@intel.com 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: "Bezdeka, Florian" , "alexandr.lobakin@intel.com" , brouer@redhat.com, "larysa.zaremba@intel.com" , "xdp-hints@xdp-project.net" , "jan.kiszka@siemens.com" , "Deric, Nemanja" , Lorenzo Bianconi , Maciej Fijalkowski X-Mailman-Version: 3.3.5 Precedence: list Subject: [xdp-hints] Re: XDP-hints presentation at LLC2022 List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Jesper Dangaard Brouer Date: Wed, 15 Jun 2022 09:45:49 +0200 > On 14/06/2022 12.40, Bezdeka, Florian wrote: > > > > On Mon, 2022-05-16 at 16:41 +0200, Alexander Lobakin wrote: > >> From: Jesper Dangaard Brouer > >> Date: Mon, 16 May 2022 15:58:06 +0200 > >> > >>> Hi XDP-hints community, > >> > >> Hey! > > Happy to see you Florian joining the XDP-hints community mailing-list. > > >>> > >>> Gave this talk[1] on Friday (13 May) "XDP hints via BPF" at Lund Linux > >>> Con. In the talk we are proposing several *possible* solutions, with > >>> "pros" and "cons". We are open to new ideas, proposals and critique. > >>> > >>> I will play with implementing some of these ideas and to see if they > >>> pan-out. I want to acknowledge that Alexander Lobakin (+ co-authors) > >>> also have started coding on solutions here[3]. Lets see if we can > >>> collaborate and find a solution we can all agree on. > >> > >> Nice catch about "it makes it possible to make NIC driver L2 > >> only" -- it's not present in the current code, but we're thinking > >> of this for some time already :) > >> Re collaborate -- I'm expecting the first RFC to hit internal review > >> in 2-3 weeks, hope it will get posted to LKML soon after that. GH > >> tree should be finalized this week, so you could start playing. > > > > Is there something already available that would allow us to start > > playing with xdp hints? (to Florian) Yes, we have[0] complete tree with core and Rx parts, with Generic/skb path supporting Hints as well as the ice driver, and cpumap consuming Hints. Please watch out a bit if you use GCC < 10 as it suffers from one silly bug, which a worked around already locally, but didn't pushed yet. > > I have some working kernel-side code (that Lorenzo is doing internal > review of), but I've been sick so I've not had time to cleanup and send > on the (bpf-kernel) list. I'll try to get an RFC out tomorrow. (to Jesper) I'm not sure what's the point of sending it since you're aware of our tree and that it's almost done, you were watching it and IIRC we sorta agreed in the past that anything should be sent as follow ups :) It's currently on internal review as 50+ patches are not something to review in one hour (it will be split onto several series series later on, but I want to give a full picture at first). > > Is your use-case AF_XDP related? > > For AF_XDP we/you also need to decode the BTF-format in userspace, to > interpret what layout the kernel or XDP BPF-prog are providing in the > metadata area XDP-hints. > > We have a simple BTF-format decoder in this bpf-example[0] what was > developed in collaboration with a large Wind-Turbine producers use-case. > The example doesn't rely on any kernel changes, as we only depend on > the XDP BPF-prog to provide BTF-info and software RX-timestamps. Thus, > this is a "software only" solution, and we need my mentioned kernel > changes to get access to the hardware (XDP) hints. This is something you > can "start playing with" right now. > > [0] > https://github.com/xdp-project/bpf-examples/tree/master/AF_XDP-interaction > > > > The main focus for us would be forwarding meta information like TX/RX > > hardware timestamps from/into the AF_XDP application. The slides > > mention that already, so it seems to be "in scope". > > > > In addition I would like to learn which drivers you are primarily > > targeting. Especially if drivers for Intel i210 (igb) and i225 (igc) > > cards are on your radar. > > Yes, Intel i210 (driver igb) and i225 (driver igc) are very much on my > radar and in my testlab. The mentioned embedded project were > investigating these as part of the hardware evaluation. > > We need to land RX-side of XDP-hints *first*, but the longer term plan > is to support TX-side hints. Specifically I've looked into hardware > LaunchTime features supported by chips i210 and i225. I've documented > the low-level register differences here[4], which shows we need some > translation layer as driver level (as e.g. bits and granularity differ > between chips for same "perceived" feature). > > [4] > https://github.com/xdp-project/xdp-project/blob/master/areas/tsn/code01_follow_qdisc_TSN_offload.org > > > >>> > >>> [1] Slide PDF: > >>> https://github.com/xdp-project/xdp-project/blob/master/conference/LLC2022/xdp_hints_hw_metadata-final.pdf > >>> > >>> [2] Slide source: > >>> https://github.com/xdp-project/xdp-project/tree/master/conference/LLC2022 > >>> > >>> [3] https://github.com/alobakin/linux/commits/xdp_hints > > --Jesper [0] https://github.com/alobakin/linux/commits/xdp_hints Thanks, Olek