All of lore.kernel.org
 help / color / mirror / Atom feed
  • * Re: AF_XDP metadata/hints
           [not found]         ` <DM4PR11MB5422FE9618B3692D48FCE4EA84549@DM4PR11MB5422.namprd11.prod.outlook.com>
           [not found]           ` <20210510185029.1ca6f872@carbon>
    @ 2021-06-05  0:32           ` Desouza, Ederson
      2021-06-11 19:25             ` Alexander Lobakin
      1 sibling, 1 reply; 18+ messages in thread
    From: Desouza, Ederson @ 2021-06-05  0:32 UTC (permalink / raw)
      To: Lobakin, Alexandr, brouer
      Cc: bpf, Raczynski, Piotr, Zhang, Jessica, Kubiak, Marcin, Joseph,
    	Jithu, xdp-hints, Maloor, Kishen, Gomes, Vinicius, Brandeburg,
    	Jesse, Swiatkowski, Michal, Plantykow, Marta A, Ong, Boon Leong,
    	Czapnik, Lukasz, Song, Yoong Siang
    
    On Mon, 2021-05-10 at 15:49 +0000, Lobakin, Alexandr wrote:
    > Hi,
    > 
    > So here it is: https://github.com/alobakin/linux/branches
    
    Quick question: are you planning any update here (like incorporating
    the CO-RE feedback)? 
    
    I'm thinking of igc, and wondering if you have something in your
    pipeline already that I could reuse for some tests =D
    
    > 
    > Default branch is just merged with v5.13-rc1 without any testing, don't expect much from it. I'll fix it a bit later.
    > 
    > Al
    > 
    > -----Original Message-----
    > From: Jesper Dangaard Brouer <brouer@redhat.com> 
    > Sent: Friday, May 7, 2021 1:11 PM
    > To: Lobakin, Alexandr <alexandr.lobakin@intel.com>
    > Cc: Kubiak, Marcin <marcin.kubiak@intel.com>; Ong, Boon Leong <boon.leong.ong@intel.com>; Brandeburg, Jesse <jesse.brandeburg@intel.com>; Desouza, Ederson <ederson.desouza@intel.com>; Swiatkowski, Michal <michal.swiatkowski@intel.com>; Gomes, Vinicius <vinicius.gomes@intel.com>; Maloor, Kishen <kishen.maloor@intel.com>; Zhang, Jessica <jessica.zhang@intel.com>; Joseph, Jithu <jithu.joseph@intel.com>; Plantykow, Marta A <marta.a.plantykow@intel.com>; Czapnik, Lukasz <lukasz.czapnik@intel.com>; Raczynski, Piotr <piotr.raczynski@intel.com>; Song, Yoong Siang <yoong.siang.song@intel.com>; brouer@redhat.com
    > Subject: Re: AF_XDP metadata/hints
    > 
    > (Answer inlined below)
    > 
    > On Fri, 7 May 2021 10:08:51 +0000
    > "Lobakin, Alexandr" <alexandr.lobakin@intel.com> wrote:
    > 
    > > + Jesper.
    > 
    > Thanks for including me!  Just see me as a resource that can help out on this project, both coding and (performance) testing.  I have a customer use-case related to LaunchTime mode using AF_XDP, which is one of the more tricky cases (due to XDP lacking a proper TX layer, that can pushback if TX-queue is full/paused).
    > 
    > 
    > > So long story short: driver advertises the XDP hints it supports (Rx:
    > > RSS hash, csum status or complete csum, C/S-VLAN tag if stripped etc., 
    > > Tx: csum offload etc.) on netdev probing so BPF prog could request for 
    > > them.
    > 
    > Yes exactly and veth and devmap also want to consume these e.g. RSS hash + csum status when they create an SKB based on an xdp_frame.
    > 
    > (Note David Ahern and I have patches placing the csum status bits in xdp_frame to transfer that info (xdp_frame is located in memory top).
    > note performance analysis here[1])
    > [1] https://github.com/xdp-project/xdp-project/blob/master/areas/core/xdp_frame01_checksum.org
    > 
    > 
    > > There's a plan to provide 2 types of hints: generic ones (that almost 
    > > every NIC is capable to provide) and custom ones (up to 
    > > vendor/developers). Drivers that don't want to support hints at all 
    > > could opt out from the generic ones just by setting their 
    > > xdp.data_meta to xdp.data + 1, just how it's now done in the mainline.
    > 
    > I agree the NIC need to support different types.  And different types per packet as e.g. PTP timestamps might not be in every packet.
    > 
    > > XDP Hints will be obviously stored in metadata,
    > 
    > I have considered[2] storing XDP hints in xdp_frame area (top of memory), but I'm more and more convinced is should be stored in metadata area... mostly because this will allow future hardware to write this data for us.
    > 
    > [2] https://people.netfilter.org/hawk/presentations/KernelRecipes2019/xdp-netstack-concert.pdf
    > 
    > I think there is a small performance problem when writing into metadata area.  Because this is a cacheline that might be (semi)cold.  Hint we prefetch xdp_frame area and we could do the same for metadata, but I still see a slowdown when converting xdp_buff to xdp_frame.
    > 
    > XDP is extremely performance sensitive.  Even if metadata area is in L1 cache it will still cost a couple of nanosec to update the fields.
    > This will be measureable in an XDP_DROP test.  The easiest workaround I see is: that we allow the config interface for XDP-hints to allow disabling this feature.
    > 
    > 
    > > the layout is not written in stone yet.
    > 
    > Exactly, the main reason/motivation for this work is to allow NIC vendors to invent new hardware hints without having to wait for the Linux kernel to adopt these.  Instead they are instant available via BPF and BTF-info that describe this layout.
    > 
    >  
    > > I'll be preparing an open repo with our drafts today, let you know 
    > > once it will be ready and available so you could take a look, review, 
    > > fork and go forth with playing with it.
    > 
    > Great!!! :-)))
    > 
    > > Any of you can also share any bits of code or thoughts that you have 
    > > and may want to share.
    > > 
    > > Thanks,
    > > Al
    > > 
    > > -----Original Message-----
    > > From: Kubiak, Marcin <marcin.kubiak@intel.com>
    > > Sent: Friday, May 7, 2021 9:35 AM
    > > To: Ong, Boon Leong <boon.leong.ong@intel.com>; Brandeburg, Jesse 
    > > <jesse.brandeburg@intel.com>; Desouza, Ederson 
    > > <ederson.desouza@intel.com>; Lobakin, Alexandr 
    > > <alexandr.lobakin@intel.com>; Swiatkowski, Michal 
    > > <michal.swiatkowski@intel.com>
    > > Cc: Gomes, Vinicius <vinicius.gomes@intel.com>; Maloor, Kishen 
    > > <kishen.maloor@intel.com>; Zhang, Jessica <jessica.zhang@intel.com>; 
    > > Joseph, Jithu <jithu.joseph@intel.com>; Plantykow, Marta A 
    > > <marta.a.plantykow@intel.com>; Lobakin, Alexandr 
    > > <alexandr.lobakin@intel.com>; Czapnik, Lukasz 
    > > <lukasz.czapnik@intel.com>; Raczynski, Piotr 
    > > <piotr.raczynski@intel.com>; Song, Yoong Siang 
    > > <yoong.siang.song@intel.com>
    > > Subject: RE: AF_XDP metadata/hints
    > > 
    > > + @Swiatkowski, Michal
    > > 
    > > -----Original Message-----
    > > From: Ong, Boon Leong <boon.leong.ong@intel.com>
    > > Sent: Friday, May 7, 2021 3:13 AM
    > > To: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Desouza, Ederson 
    > > <ederson.desouza@intel.com>; Lobakin, Alexandr 
    > > <alexandr.lobakin@intel.com>
    > > Cc: Gomes, Vinicius <vinicius.gomes@intel.com>; Maloor, Kishen 
    > > <kishen.maloor@intel.com>; Zhang, Jessica <jessica.zhang@intel.com>; 
    > > Joseph, Jithu <jithu.joseph@intel.com>; Plantykow, Marta A 
    > > <marta.a.plantykow@intel.com>; Lobakin, Alexandr 
    > > <alexandr.lobakin@intel.com>; Czapnik, Lukasz 
    > > <lukasz.czapnik@intel.com>; Raczynski, Piotr 
    > > <piotr.raczynski@intel.com>; Kubiak, Marcin <marcin.kubiak@intel.com>; 
    > > Song, Yoong Siang <yoong.siang.song@intel.com>
    > > Subject: RE: AF_XDP metadata/hints
    > > 
    > > + Yoong Siang
    > > 
    > > > -----Original Message-----
    > > > From: Brandeburg, Jesse <jesse.brandeburg@intel.com>
    > > > Sent: Friday, May 7, 2021 8:32 AM
    > > > To: Desouza, Ederson <ederson.desouza@intel.com>; Lobakin, Alexandr 
    > > > <alexandr.lobakin@intel.com>; Ong, Boon Leong 
    > > > <boon.leong.ong@intel.com>
    > > > Cc: Gomes, Vinicius <vinicius.gomes@intel.com>; Maloor, Kishen 
    > > > <kishen.maloor@intel.com>; Zhang, Jessica <jessica.zhang@intel.com>; 
    > > > Joseph, Jithu <jithu.joseph@intel.com>; Plantykow, Marta A 
    > > > <marta.a.plantykow@intel.com>; Lobakin, Alexandr 
    > > > <alexandr.lobakin@intel.com>; Czapnik, Lukasz 
    > > > <lukasz.czapnik@intel.com>; Raczynski, Piotr 
    > > > <piotr.raczynski@intel.com>; Kubiak, Marcin <marcin.kubiak@intel.com>
    > > > Subject: RE: AF_XDP metadata/hints
    > > > 
    > > > I think our XDP team is on this, and I'll let them answer in detail. 
    > > > Yes, I'm a goof for top posting using outlook....
    > > >  
    > > > > So, I'd like to ask some questions:
    > > > >  - Are you guys also interested in AF_XDP support, or do you care 
    > > > > about XDP only?
    > > > 
    > > > Yes! Both.  
    > > 
    > > For us (BL and Siang) in Penang, Since, we have 3 time-zones and I don't think it is effective for us to run 3 time zone discussion. So, please carry on without us. 
    > > 
    > > However, we would like to follow the RFC and POC so that we can help to implement the stmmac driver part and help test.
    > > 
    > > BL
    > > >  
    > > > >  - Did you already start the work? Could you describe how you 
    > > > > handle the metadata? Can we see some preview? We're planning to 
    > > > > start next week, so not much to show[*].
    > > > >  - I believe there may be opportunities to collaborate here - how 
    > > > > can we help?
    > > > 
    > > > Please folks, get together and talk. Ederson, this team is in Poland 
    > > > so is +9 hours from PST. Keep me informed on what's up, but I don't 
    > > > need to be in the day to day, but you're welcome to consult me anytime.
    > > > 
    > > > -Jesse
    > > > 
    > > > -----Original Message-----
    > > > From: Desouza, Ederson <ederson.desouza@intel.com>
    > > > Sent: Thursday, May 6, 2021 5:08 PM
    > > > To: Lobakin, Alexandr <alexandr.lobakin@intel.com>; Ong, Boon Leong 
    > > > <boon.leong.ong@intel.com>; Brandeburg, Jesse 
    > > > <jesse.brandeburg@intel.com>
    > > > Cc: Gomes, Vinicius <vinicius.gomes@intel.com>; Maloor, Kishen 
    > > > <kishen.maloor@intel.com>; Zhang, Jessica <jessica.zhang@intel.com>; 
    > > > Joseph, Jithu <jithu.joseph@intel.com>
    > > > Subject: Re: AF_XDP metadata/hints
    > > > 
    > > > +Jessica
    > > > 
    > > > Gentle ping to check if anyone's interested =D
    > > > 
    > > > On Fri, 2021-04-30 at 19:24 -0700, Ederson de Souza wrote:  
    > > > > Hi folks,
    > > > > 
    > > > > I've noticed that you are some Intel people that mentioned (on a 
    > > > > thread with the community) interest and some development regarding 
    > > > > XDP metadata (for RX/TX timestamp and SO_TXTIME support). And my 
    > > > > team, on IAGS/SSE, is also working on that for the i225 igc driver.
    > > > > 
    > > > > As there's some overlap in this work, I'd like to figure it out 
    > > > > what is the state of these developments and align what we're doing.
    > > > > 
    > > > > I'll talk about our ideas and ask some questions to help in this 
    > > > > alignment.
    > > > > 
    > > > > We want the "SO_TXTIME" support for AF_XDP ZC. Right now, we're 
    > > > > thinking about working on top of Saeed's work that enables BTF for XDP.
    > > > > Our idea is to use BTF and the XDP metadata area (that headroom 
    > > > > area just before the frame data starts) to store the timestamp.
    > > > > 
    > > > > For this to work, we're thinking of adding some new API to 
    > > > > `tools/lib/bpf/xsk.h` to allow userspace application to manipulate 
    > > > > that area and add the metadata (without explicitly subtracting 
    > > > > pointers and such).
    > > > > 
    > > > > Then, add support on both igc driver to extract this metadata and 
    > > > > set the launch time and the generic AF_XDP socket (for copy mode
    > > > > compatibility) to extract and add it to the skb sent down the stack.
    > > > > 
    > > > > Of course, the issue here is how to make this generic enough. 
    > > > > Saeed's work kinda expects a metadata struct per driver, IIUC.
    > > > > 
    > > > > So, I'd like to ask some questions:
    > > > >  - Are you guys also interested in AF_XDP support, or do you care 
    > > > > about XDP only?
    > > > >  - Did you already start the work? Could you describe how you 
    > > > > handle the metadata? Can we see some preview? We're planning to 
    > > > > start next week, so not much to show[*].
    > > > >  - I believe there may be opportunities to collaborate here - how 
    > > > > can we help?
    > > > > 
    > > > > Cheers!
    > > > > 
    > > > > [*] In fact, we're using BTF metadata to get HW RX/TX timestamps 
    > > > > for some internal latency measurements we're doing. It's fairly 
    > > > > hackish (and ugly) at this point, but if you are interested, we 
    > > > > could share what we've done.
    > > 
    > > 
    > > > >  
    > > > 
    > > >  
    > > 
    > 
    > 
    > 
    > --
    > Best regards,
    >   Jesper Dangaard Brouer
    >   MSc.CS, Principal Kernel Engineer at Red Hat
    >   LinkedIn: http://www.linkedin.com/in/brouer
    > 
    
    
    ^ permalink raw reply	[flat|nested] 18+ messages in thread

  • end of thread, other threads:[~2021-06-11 19:27 UTC | newest]
    
    Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
    -- links below jump to the message on this page --
         [not found] <dc2c38cdccfa5eca925cfc9d59b0674e208c9c9d.camel@intel.com>
         [not found] ` <2226aeaab7a4ca8e4f26413514bf54ab2c81ea36.camel@intel.com>
         [not found] ` <DM6PR11MB2780A8C5410ECB3C9700EAB5CA579@DM6PR11MB2780.namprd11.prod.outlook.com>
         [not found]   ` <PH0PR11MB487034313697F395BB5BA3C5E4579@PH0PR11MB4870.namprd11.prod.outlook.com>
         [not found]     ` <DM4PR11MB5422733A87913EFF8904C17184579@DM4PR11MB5422.namprd11.prod.outlook.com>
         [not found]       ` <20210507131034.5a62ce56@carbon>
         [not found]         ` <DM4PR11MB5422FE9618B3692D48FCE4EA84549@DM4PR11MB5422.namprd11.prod.outlook.com>
         [not found]           ` <20210510185029.1ca6f872@carbon>
         [not found]             ` <DM4PR11MB54227C25DFD4E882CB03BD3884539@DM4PR11MB5422.namprd11.prod.outlook.com>
         [not found]               ` <20210512102546.5c098483@carbon>
         [not found]                 ` <DM4PR11MB542273C9D8BF63505DC6E21784519@DM4PR11MB5422.namprd11.prod.outlook.com>
         [not found]                   ` <7b347a985e590e2a422f837971b30bd83f9c7ac3.camel@nvidia.com>
         [not found]                     ` <DM4PR11MB5422762E82C0531B92BDF09A842B9@DM4PR11MB5422.namprd11.prod.outlook.com>
         [not found]                       ` <DM4PR11MB5422269F6113268172B9E26A842A9@DM4PR11MB5422.namprd11.prod.outlook.com>
         [not found]                         ` <DM4PR11MB54224769926B06EE76635A6484299@DM4PR11MB5422.namprd11.prod.outlook.com>
    2021-05-21 13:31                           ` AF_XDP metadata/hints Jesper Dangaard Brouer
    2021-05-21 17:53                             ` Saeed Mahameed
    2021-05-23 11:54                               ` Toke Høiland-Jørgensen
    2021-05-25 14:20                                 ` Alexander Lobakin
    2021-05-26  4:51                                   ` John Fastabend
    2021-05-26 11:49                                     ` Jesper Dangaard Brouer
    2021-05-26 13:06                                       ` Toke Høiland-Jørgensen
    2021-05-26 15:35                                         ` John Fastabend
    2021-05-26 15:41                                           ` John Fastabend
    2021-05-26 15:54                                           ` Alexander Lobakin
    2021-05-26 16:33                                             ` John Fastabend
    2021-05-26 18:44                                               ` Jesper Dangaard Brouer
    2021-05-26 16:41                                             ` Alexei Starovoitov
    2021-05-26 17:01                                               ` John Fastabend
    2021-05-26 17:38                                           ` Jesper Dangaard Brouer
    2021-05-26 14:49                                   ` Jesper Dangaard Brouer
    2021-06-05  0:32           ` Desouza, Ederson
    2021-06-11 19:25             ` Alexander Lobakin
    

    This is an external index of several public inboxes,
    see mirroring instructions on how to clone and mirror
    all data and code used by this external index.