XDP hardware hints discussion mail archive
 help / color / mirror / Atom feed
From: "Bezdeka, Florian" <florian.bezdeka@siemens.com>
To: "alexandr.lobakin@intel.com" <alexandr.lobakin@intel.com>,
	"jbrouer@redhat.com" <jbrouer@redhat.com>
Cc: "lorenzo.bianconi@redhat.com" <lorenzo.bianconi@redhat.com>,
	"larysa.zaremba@intel.com" <larysa.zaremba@intel.com>,
	"xdp-hints@xdp-project.net" <xdp-hints@xdp-project.net>,
	"jan.kiszka@siemens.com" <jan.kiszka@siemens.com>,
	"Deric, Nemanja" <nemanja.deric@siemens.com>,
	"brouer@redhat.com" <brouer@redhat.com>
Subject: [xdp-hints] Re: XDP-hints presentation at LLC2022
Date: Mon, 4 Jul 2022 13:07:10 +0000	[thread overview]
Message-ID: <d434ae126372983eec0d82e61f62e0a44aca87cb.camel@siemens.com> (raw)
In-Reply-To: <ad2dc893-f201-e7ab-a3cb-e814159aaeb4@redhat.com>

On Wed, 2022-06-15 at 09:45 +0200, Jesper Dangaard Brouer wrote:
> 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 <jbrouer@redhat.com>
> > > 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?

Yes. Our main use case would be using hardware features like ETF from
AF_XDP applications.

> 
> 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.

I saw the recently posted RFC series but I did not understand all of
the addressed topics yet. Who defines this layout? 

It would be important for us that the underlying hardware is abstracted
away. So changing the NIC (and with that the driver) should never
require updating the AF_XDP based application.

The referenced slides [1] mention that each driver "can" choose its own
BTF layout and that the driver can change the layout per packet. As the
BTF format is self-describing I assume that different drivers will use
different formats and the application must be able to deal with all of
them. Is that right?

> 
> 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.

We would also need RX-timestamps - especially for debugging purposes -
so this sounds like a match. Software timestamps should be enough for
some (simulation) setups where special hardware features are not
available.

In addition to the software timestamps I'm quite sure that we will need
the hardware timestamps as well. As such hardware features are normally
device / driver specific, we would need a driver independent API/
memory layout. 

> 
>   [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.

Same here with focus on i225 due to zero copy support.

> 
> 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

Looking at this one tells me that we might work on the same topics...

According to your investigations the Qdisc layer makes sure that launch
timestamps are valid. As we do not have such a layer when using AF_XDP,
we would need a feedback channel back to the application that the
supplied timestamp was invalid. You listed that as "design question".
Any ideas so far?

> 
> 
> > > > 
> > > > [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
> 


      parent reply	other threads:[~2022-07-04 13:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 13:58 [xdp-hints] " Jesper Dangaard Brouer
2022-05-16 14:41 ` [xdp-hints] " Alexander Lobakin
2022-06-14 10:40   ` Bezdeka, Florian
2022-06-15  7:45     ` Jesper Dangaard Brouer
2022-06-15 10:19       ` Alexander Lobakin
2022-07-04 13:07       ` Bezdeka, Florian [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.xdp-project.net/postorius/lists/xdp-hints.xdp-project.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d434ae126372983eec0d82e61f62e0a44aca87cb.camel@siemens.com \
    --to=florian.bezdeka@siemens.com \
    --cc=alexandr.lobakin@intel.com \
    --cc=brouer@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=jbrouer@redhat.com \
    --cc=larysa.zaremba@intel.com \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nemanja.deric@siemens.com \
    --cc=xdp-hints@xdp-project.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox