Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Korodev <korodev@gmail.com>
Cc: Florian Westphal <fw@strlen.de>, netfilter@vger.kernel.org
Subject: Re: Timestamps, NFLOG, and ULOG
Date: Fri, 22 May 2020 02:21:34 +0200	[thread overview]
Message-ID: <20200522002134.GB26949@breakpoint.cc> (raw)
In-Reply-To: <CAKOsuLopu0VZna9YTK7u-bri7RjodX6ufrqz_n4tLGXHOLNw7w@mail.gmail.com>

Korodev <korodev@gmail.com> wrote:
> On Thu, May 21, 2020 at 6:26 PM Florian Westphal <fw@strlen.de> wrote:
> > Its expected.  If you want rx timestamps you should set
> > SO_TIMESTAMP(NS) socket option,
> 
> Thank you for your reply. My understanding is that SO_TIMESTAMP is a
> socket option I could set for an application that I control, but how
> would I go about enabling that such that IPTables, Netlink, and ULOGd
> are aware?

Setting this option makes the kernel record a timestamp at reception
time for all packets it receives (it won't know the socket the packet
will be delivered to yet, so it can't do this in a fine-grained way).

This is off by default for performance reasons.
Ideally ulogd should have an option to enable this (it doesn't have
one).

> I assumed I would at least get the software timestamp at
> which the kernel received the packet.

No, the kernel does not record a timestamp by default.

      reply	other threads:[~2020-05-22  0:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21 18:44 Timestamps, NFLOG, and ULOG Korodev
2020-05-21 23:26 ` Florian Westphal
2020-05-21 23:58   ` Korodev
2020-05-22  0:21     ` Florian Westphal [this message]

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=20200522002134.GB26949@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=korodev@gmail.com \
    --cc=netfilter@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