xdp-newbies.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Federico Parola <fede.parola@hotmail.it>,
	"xdp-newbies@vger.kernel.org" <xdp-newbies@vger.kernel.org>
Subject: Re: Lightweight packet timestamping
Date: Fri, 5 Jun 2020 17:34:53 -0600	[thread overview]
Message-ID: <b712de09-fd35-1d5e-1842-31bb3b2e163d@gmail.com> (raw)
In-Reply-To: <DB7PR08MB3130BA2C0F90E0819577C5289E890@DB7PR08MB3130.eurprd08.prod.outlook.com>

On 6/4/20 7:30 AM, Federico Parola wrote:
> Hello everybody,
> I'm implementing a token bucket algorithm to apply rate limit to traffic and I need the timestamp of packets to update the bucket. To get this information I'm using the bpf_ktime_get_ns() helper but I've discovered it has a non negligible impact on performance. I've seen there is work in progress to make hardware timestamps available to XDP programs, but I don't know if this feature is already available. Is there a faster way to retrieve this information?
> Thanks for your attention.
> 

bpf_ktime_get_ns should be fairly light. What kind of performance loss
are you seeing with it?

XDP does not support access to h/w timestamps at the moment.

  reply	other threads:[~2020-06-05 23:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <DB7PR08MB3130BDD01387627E7FAD775F9E890@DB7PR08MB3130.eurprd08.prod.outlook.com>
     [not found] ` <DB7PR08MB3130C02AB04133E07146F40D9E890@DB7PR08MB3130.eurprd08.prod.outlook.com>
2020-06-04 13:30   ` Lightweight packet timestamping Federico Parola
2020-06-05 23:34     ` David Ahern [this message]
2020-06-10 14:48       ` Federico Parola
2020-06-10 21:09         ` Toke Høiland-Jørgensen
2020-06-16 16:00           ` Jesper Dangaard Brouer
2020-06-16 16:07             ` David Ahern
2020-06-17  9:47               ` Federico Parola

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=b712de09-fd35-1d5e-1842-31bb3b2e163d@gmail.com \
    --to=dsahern@gmail.com \
    --cc=fede.parola@hotmail.it \
    --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;
as well as URLs for NNTP newsgroup(s).