All of lore.kernel.org
 help / color / mirror / Atom feed
From: Piotr Raczynski <piotr.raczynski@intel.com>
To: Christoph Kuhr <christoph.kuhr@web.de>
Cc: "xdp-newbies@vger.kernel.org" <xdp-newbies@vger.kernel.org>
Subject: Re: Access Hardware Timestamp in eBPF Program
Date: Fri, 22 Nov 2019 00:16:36 +0100	[thread overview]
Message-ID: <20191121231636.GA5888@DEV.igk.intel.com> (raw)
In-Reply-To: <ce15150c-01e4-5621-0d13-ebe0f7cd2333@web.de>

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

  reply	other threads:[~2019-11-21 23:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21 21:24 Access Hardware Timestamp in eBPF Program Christoph Kuhr
2019-11-21 23:16 ` Piotr Raczynski [this message]
2019-11-22 10:58   ` Toke Høiland-Jørgensen

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

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

  git send-email \
    --in-reply-to=20191121231636.GA5888@DEV.igk.intel.com \
    --to=piotr.raczynski@intel.com \
    --cc=christoph.kuhr@web.de \
    --cc=xdp-newbies@vger.kernel.org \
    /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 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.