netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Lukas Wunner <lukas@wunner.de>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
	Jozsef Kadlecsik <kadlec@netfilter.org>,
	Florian Westphal <fw@strlen.de>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Laura Garcia Liebana <nevola@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	coreteam@netfilter.org, netfilter-devel@vger.kernel.org,
	Thomas Graf <tgraf@suug.ch>
Subject: Re: [netfilter-core] [PATCH nft v4] src: Support netdev egress hook
Date: Mon, 25 Jan 2021 14:22:38 +0100	[thread overview]
Message-ID: <20210125132238.GG3158@orbyte.nwl.cc> (raw)
In-Reply-To: <4b3c95a0449591c97f68be15d8d17bda298a7b5e.1611498014.git.lukas@wunner.de>

Hi Lukas,

On Sun, Jan 24, 2021 at 03:25:06PM +0100, Lukas Wunner wrote:
[...]
> diff --git a/tests/py/inet/ip.t.payload.netdev b/tests/py/inet/ip.t.payload.netdev
> index 95be919..38ed0ad 100644
> --- a/tests/py/inet/ip.t.payload.netdev
> +++ b/tests/py/inet/ip.t.payload.netdev
> @@ -12,3 +12,17 @@ netdev test-netdev ingress
>    [ payload load 6b @ link header + 6 => reg 10 ]
>    [ lookup reg 1 set __set%d ]
>  
> +# meta protocol ip ip saddr . ip daddr . ether saddr { 1.1.1.1 . 2.2.2.2 . ca:fe:ca:fe:ca:fe }
> +__set%d test-netdev 3
> +__set%d test-netdev 0
> +	element 01010101 02020202 fecafeca 0000feca  : 0 [end]
> +netdev test-netdev egress 
> +  [ meta load protocol => reg 1 ]
> +  [ cmp eq reg 1 0x00000008 ]
> +  [ meta load iiftype => reg 1 ]
> +  [ cmp eq reg 1 0x00000001 ]
> +  [ payload load 4b @ network header + 12 => reg 1 ]
> +  [ payload load 4b @ network header + 16 => reg 9 ]
> +  [ payload load 6b @ link header + 6 => reg 10 ]
> +  [ lookup reg 1 set __set%d ]
> +

This payload dump is identical to the one which exists in that file
already with the exception of the chain name. AFAIR, nft-test.py checks
only element list and VM code when verifying, deliberately ignoring the
chain name (so a single payload dump serves all tested chains). From my
perspective, you should not need to add any payload dump at all. Could
you please try without them?

Thanks, Phil

  reply	other threads:[~2021-01-25 13:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-24 14:25 [PATCH nft v4] src: Support netdev egress hook Lukas Wunner
2021-01-25 13:22 ` Phil Sutter [this message]
2021-01-25 13:34   ` [netfilter-core] " Florian Westphal
2021-01-25 13:44     ` Phil Sutter
2021-01-25 14:31       ` Pablo Neira Ayuso
2021-01-25 15:02         ` Phil Sutter
2021-01-25 15:53           ` 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=20210125132238.GG3158@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=ast@kernel.org \
    --cc=coreteam@netfilter.org \
    --cc=daniel@iogearbox.net \
    --cc=fw@strlen.de \
    --cc=kadlec@netfilter.org \
    --cc=lukas@wunner.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=nevola@gmail.com \
    --cc=pablo@netfilter.org \
    --cc=tgraf@suug.ch \
    /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).