From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mail.toke.dk (Postfix) with ESMTPS id 8569E97ABD9 for ; Wed, 15 Jun 2022 09:46:08 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=dAFKqcZb DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655279167; 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=9RzS3pDDEh7pZ1lehgT2m7zlQ2WNsg+/EgEepDntIsU=; b=dAFKqcZbElQ6nLsoGXG2GWQh3+yFkMWlobi+FF7ypT+773M9a8+gjIg/mzhz+kwUbYt6gQ uSyTmtIpAmczWk/XU20crxXWErRWC8f9fYgbNTdCPMDReNcQAyVdgImsoXPh7KcZ1307jg JEPZUVlcVdoC0g+9DpAvP2YF1j4ViRU= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-56-JowX8XdnO2uebHP6U_3tKw-1; Wed, 15 Jun 2022 03:46:06 -0400 X-MC-Unique: JowX8XdnO2uebHP6U_3tKw-1 Received: by mail-lj1-f197.google.com with SMTP id g3-20020a2e9cc3000000b00253cc2b5ab5so1682356ljj.19 for ; Wed, 15 Jun 2022 00:46:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:date:mime-version:user-agent:cc :subject:content-language:to:references:in-reply-to :content-transfer-encoding; bh=9RzS3pDDEh7pZ1lehgT2m7zlQ2WNsg+/EgEepDntIsU=; b=Yu/3jszJkWn1q01hWZ54bqp2iqXR9n/6SmofOwY3j6gPRb+747K9ZmDo2oUBejMMyH oEM0nJoho77eYXePzi02RPOKNxV6Ft9LUzmVdZnP2dzjhESyVGZS7wAXN1k7gIoT2/8m RhUqvJUOHsd1WtF+O2Gq2891Mlmh6FfRFthdfRUOuHYZUAMbcSHLEkN1vJIfvSb66vnd EvbJsL69fB9En5m740YgJohQMlCcagv31ICjv2O6url5hC+3yGzr3+oD4CWoRReByihH 0JGuy/nz8h+uY3k5hWoQrV33dWjlzE9ncrz6oxQmBLRQqGvWRCiWV83TgMVb8VExWBya E8/Q== X-Gm-Message-State: AJIora+JszUkHNWRQb2Fs043x7pKf8LQERul+R6aEz8UAJ7nvJ6AR2UH rGSUL9b1OSYGwcRYxVDMa9gbB0wqbwsGhV6KtKXAsa8pbSYmMVx179SmF5FHGdyJP5yZ3WJLryE WT05A+dYgi7MeLRz0yX9W X-Received: by 2002:a05:6512:a86:b0:47d:cb29:c2a2 with SMTP id m6-20020a0565120a8600b0047dcb29c2a2mr5529863lfu.655.1655279164492; Wed, 15 Jun 2022 00:46:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vrCKyb8KXgE0XlrgWu6JhAbYonHhKpkPug+5WaIZor3cCaVnXUbkvr2nkUjuO8Pbddmi9R1Q== X-Received: by 2002:a05:6512:a86:b0:47d:cb29:c2a2 with SMTP id m6-20020a0565120a8600b0047dcb29c2a2mr5529846lfu.655.1655279164150; Wed, 15 Jun 2022 00:46:04 -0700 (PDT) Received: from [192.168.0.50] (87-59-106-155-cable.dk.customer.tdc.net. [87.59.106.155]) by smtp.gmail.com with ESMTPSA id f17-20020a19ae11000000b00478ebc63fa6sm1693675lfc.267.2022.06.15.00.45.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Jun 2022 00:45:57 -0700 (PDT) From: Jesper Dangaard Brouer X-Google-Original-From: Jesper Dangaard Brouer Message-ID: Date: Wed, 15 Jun 2022 09:45:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 To: "Bezdeka, Florian" , "alexandr.lobakin@intel.com" References: <20220516144135.11132-1-alexandr.lobakin@intel.com> In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jbrouer@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: VEIDTCH2B4SBCTPMBWKI23UGD5AFSOXB X-Message-ID-Hash: VEIDTCH2B4SBCTPMBWKI23UGD5AFSOXB X-MailFrom: jbrouer@redhat.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: brouer@redhat.com, "larysa.zaremba@intel.com" , "xdp-hints@xdp-project.net" , "jan.kiszka@siemens.com" , "Deric, Nemanja" , Lorenzo Bianconi 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: 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? 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. 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