netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>,
	netfilter-devel@vger.kernel.org, kaber@trash.net
Subject: Re: [PATCH nft] tests: validate generated netlink instructions
Date: Thu, 13 Aug 2015 16:45:24 +0200	[thread overview]
Message-ID: <20150813144524.GB31166@breakpoint.cc> (raw)
In-Reply-To: <20150813095328.GA4502@salvia>

Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > This will also make "nft add rule bridge filter input ip version 4"
> > work since it adds support for sub-byte sized header elements.
> 
> Are you using bitwise for that?

yes: input ip version 4
 [ payload load 1b @ network header + 0 => reg 1 ]
 [ bitwise reg 1 = (reg=1 & 0x000000f0 ) ^ 0x00000000 ]
 [ cmp eq reg 1 0x00000040 ]

relational_binop_postprocess() is responsible to zap such implicit binops
again when listing a table.

> > I plan to work on the test suite again after I get v1 out (add BE support
> > so we can also check nft on s390 etc).
> > 
> > I haven't thought about it yet, first plan was to record separate traces
> > for LE and BE architectures, think thats better than trying to normalize
> > the endianess in the output (might also mask errors...).
> 
> My concern is that this might replicate the number of files to
> maintain.

Yes, thats true, when adding new rule to test suite one would need to
run nft on both LE and BE system to get the generated instructions for
both...

Not sure if there is a better solution though.

  reply	other threads:[~2015-08-13 14:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17  1:31 [PATCH nft] tests: validate generated netlink instructions Florian Westphal
2015-07-20 12:50 ` Pablo Neira Ayuso
2015-07-20 15:10   ` Florian Westphal
2015-07-20 15:27     ` Pablo Neira Ayuso
2015-07-20 17:05     ` Pablo Neira Ayuso
2015-07-20 18:35       ` Florian Westphal
2015-08-12 17:34         ` Pablo Neira Ayuso
2015-08-12 17:46           ` Florian Westphal
2015-08-13  9:53             ` Pablo Neira Ayuso
2015-08-13 14:45               ` Florian Westphal [this message]
2015-08-16 18:14             ` Patrick McHardy
2015-08-16 18:20               ` Florian Westphal
2015-08-16 18:30                 ` Patrick McHardy
2015-08-19  0:49               ` Pablo Neira Ayuso

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=20150813144524.GB31166@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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).