XDP Newbie developer discussions
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Eric Leblond <eric@regit.org>
Cc: xdp-newbies@vger.kernel.org
Subject: Re: AF_XDP and packet timestamp
Date: Mon, 17 Jun 2019 13:57:09 +0300	[thread overview]
Message-ID: <20190617105709.GA7734@apalos> (raw)
In-Reply-To: <86f135475a7820adadb05e7ac9a05c71846bebd6.camel@regit.org>

Hi Eric, 

> Hello,
> 
> I did start to work on AF_XDP support for Suricata. API was really easy
> to use via libbpf.
> 
> From Suricata point of view, the current system with default
> configuration is lacking an important information. I don't have access
> to the timestamp of the packet. I'm in particular interested by the
> hardware timestamp as it would allow to do reordering in some capture
> cases.
There's no timestamp available to my knowledge
> 
> Is there a way to get the information via AF_XDP. I've seen the
> discussion on hardware hints but there was no code example I was able
> to find. 
This is an awful hack i did when i needed similar information [1]
Essentially i am copying a software 'timestamp' (in my case rdtsc() since i
needed to measure packet timings from AF_XDP -> userspace), into the meta_data
of XDP.
The way i did it is obviously wrong since it has to be added per driver.
> 
> BR,
> -- 
> Eric Leblond <eric@regit.org>
> 

[1] https://github.com/xdp-project/xdp-project/blob/master/areas/arm64/xdp_for_tsn.org

Cheers
/Ilias

  reply	other threads:[~2019-06-17 10:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17 10:00 AF_XDP and packet timestamp Eric Leblond
2019-06-17 10:57 ` Ilias Apalodimas [this message]
2019-06-17 11:03 ` Toke Høiland-Jørgensen
2019-07-21  6:42   ` Jesper Dangaard Brouer

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=20190617105709.GA7734@apalos \
    --to=ilias.apalodimas@linaro.org \
    --cc=eric@regit.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox