* Access Hardware Timestamp in eBPF Program @ 2019-11-21 21:24 Christoph Kuhr 2019-11-21 23:16 ` Piotr Raczynski 0 siblings, 1 reply; 3+ messages in thread From: Christoph Kuhr @ 2019-11-21 21:24 UTC (permalink / raw) To: xdp-newbies Hi *, in my program I use CMSGs to access hardware arrival timestamps of an Intel I210 rx queue. Is there a way to access such timestamps in a XDP eBPF program? Best regards, Christoph Kuhr ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Access Hardware Timestamp in eBPF Program 2019-11-21 21:24 Access Hardware Timestamp in eBPF Program Christoph Kuhr @ 2019-11-21 23:16 ` Piotr Raczynski 2019-11-22 10:58 ` Toke Høiland-Jørgensen 0 siblings, 1 reply; 3+ messages in thread From: Piotr Raczynski @ 2019-11-21 23:16 UTC (permalink / raw) To: Christoph Kuhr; +Cc: xdp-newbies@vger.kernel.org On Thu, Nov 21, 2019 at 09:24:13PM +0000, Christoph Kuhr wrote: > Hi *, > > in my program I use CMSGs to access hardware arrival timestamps of an > Intel I210 rx queue. Hi Christoph, First of all I210 does not support native XDP. It still means that you can use XDP but in so called generic mode which works for all net devices. However it's not as quick as native implementation in the driver, because it operates after skb is allocated. Actually it's way slower, but it can still be much faster in many cases than regular *sbk* path. > Is there a way to access such timestamps in a XDP eBPF program? Unfortunately, as of now there is no universal way for XDP programs, even in native mode, to access information taken from hardware, e.g. from Rx descriptor. Technically it would be possible, but there are no interfaces now that would allow common scheme for different drivers. Right now it is possible to convey additional information to xdp buff via data_meta field, but now it's strictly driver specific and XDP programs has no direct information into what is in the data_meta section. Given that I210 would only work in generic mode, this would be even more difficult since as I checked, with current implementation when skb is *converted* back to xdp_buff it does not support passing data_meta from skb to XDP. > > Best regards, > Christoph Kuhr ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Access Hardware Timestamp in eBPF Program 2019-11-21 23:16 ` Piotr Raczynski @ 2019-11-22 10:58 ` Toke Høiland-Jørgensen 0 siblings, 0 replies; 3+ messages in thread From: Toke Høiland-Jørgensen @ 2019-11-22 10:58 UTC (permalink / raw) To: Piotr Raczynski, Christoph Kuhr; +Cc: xdp-newbies@vger.kernel.org Piotr Raczynski <piotr.raczynski@intel.com> writes: >> Is there a way to access such timestamps in a XDP eBPF program? > > Unfortunately, as of now there is no universal way for XDP programs, > even in native mode, to access information taken from hardware, > e.g. from Rx descriptor. Technically it would be possible, but there > are no interfaces now that would allow common scheme for different > drivers. Adding this is on the TODO list, though: https://github.com/xdp-project/xdp-project/blob/master/xdp-project.org#metadata-available-to-programs -Toke ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-22 10:58 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-11-21 21:24 Access Hardware Timestamp in eBPF Program Christoph Kuhr 2019-11-21 23:16 ` Piotr Raczynski 2019-11-22 10:58 ` Toke Høiland-Jørgensen
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.