netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: Ander Juaristi <a@juaristi.eus>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v2] netfilter: nft_meta: support for time matching
Date: Mon, 15 Jul 2019 10:15:45 +0200	[thread overview]
Message-ID: <20190715081545.bzbnoz4swoclbrgk@salvia> (raw)
In-Reply-To: <20190714232808.rb3wc44ij7ixz376@breakpoint.cc>

On Mon, Jul 15, 2019 at 01:28:08AM +0200, Florian Westphal wrote:
> Ander Juaristi <a@juaristi.eus> wrote:
> > This patch introduces meta matches in the kernel for time (a UNIX timestamp),
> > day (a day of week, represented as an integer between 0-6), and
> > hour (an hour in the current day, or: number of seconds since midnight).
> > 
> > All values are taken as unsigned 64-bit integers.
> > 
> > The 'time' keyword is internally converted to nanoseconds by nft in
> > userspace, and hence the timestamp is taken in nanoseconds as well.
> 
> I think this is conceptually fine, thanks Ander.
> 
> Can you run this throuch scripts/checkpatch.pl and fix up the style
> nits?
> 
> > +	case NFT_META_TIME_HOUR:
> > +		len = sizeof(u64);
> 
> As in my other comment, I think this can be u32.

Florian requested changes, so please follow up on this one and send v3.

BTW, I thought you agreed to stick to u32 (second resolution) for this
patch.

If you decide to go for u64, then get_unaligned() is missing in your
patch, just like in nft_byteorder.c.

      reply	other threads:[~2019-07-15  8:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-07 20:57 [PATCH v2] netfilter: nft_meta: support for time matching Ander Juaristi
2019-07-14 23:28 ` Florian Westphal
2019-07-15  8:15   ` Pablo Neira Ayuso [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=20190715081545.bzbnoz4swoclbrgk@salvia \
    --to=pablo@netfilter.org \
    --cc=a@juaristi.eus \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@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).