From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH nft,v2 0/8] mark statement support for non-constant expression
Date: Wed, 22 Mar 2023 22:52:55 +0100 [thread overview]
Message-ID: <20230322215303.239763-1-pablo@netfilter.org> (raw)
Hi,
This is v2 of the following patchset:
https://marc.info/?l=netfilter-devel&m=167904710124404&w=2
this takes over the initial effort from Jeremy Sowden to enhance mark
statements support for variable expression.
No kernel updates are required in this batch.
Previous patch #1 in this series has been already applied upstream:
fe623a509492 ("evaluate: insert byte-order conversions for expressions between 9 and 15 bits")
Main change is patch #2 in this series:
("evaluate: support shifts larger than the width of the left operand")
which slightly simplifies the logic to set the maximum shift length
according to the mark statement datatype length (which is 32-bits).
Anything else, no changes.
Jeremy Sowden (4):
netlink_delinearize: correct type and byte-order of shifts
evaluate: don't eval unary arguments
tests: shell: rename and move bitwise test-cases
tests: shell: add test-cases for ct and packet mark payload expressions
Pablo Neira Ayuso (4):
evaluate: support shifts larger than the width of the left operand
evaluate: get length from statement instead of lhs expression
evaluate: relax type-checking for integer arguments in mark statements
tests: py: add test-cases for ct and packet mark payload expressions
src/evaluate.c | 48 ++++++++----
src/netlink_delinearize.c | 17 +++-
tests/py/ip/ct.t | 2 +
tests/py/ip/ct.t.json | 58 ++++++++++++++
tests/py/ip/ct.t.payload | 18 +++++
tests/py/ip/meta.t | 5 ++
tests/py/ip/meta.t.json | 78 +++++++++++++++++++
tests/py/ip/meta.t.payload | 25 ++++++
tests/py/ip6/ct.t | 6 ++
tests/py/ip6/ct.t.payload | 19 +++++
tests/py/ip6/meta.t | 3 +
tests/py/ip6/meta.t.json | 58 ++++++++++++++
tests/py/ip6/meta.t.payload | 20 +++++
.../0040mark_binop_0} | 2 +-
.../0040mark_binop_1} | 2 +-
.../shell/testcases/bitwise/0040mark_binop_2 | 11 +++
.../shell/testcases/bitwise/0040mark_binop_3 | 11 +++
.../shell/testcases/bitwise/0040mark_binop_4 | 11 +++
.../shell/testcases/bitwise/0040mark_binop_5 | 11 +++
.../shell/testcases/bitwise/0040mark_binop_6 | 11 +++
.../shell/testcases/bitwise/0040mark_binop_7 | 11 +++
.../shell/testcases/bitwise/0040mark_binop_8 | 11 +++
.../shell/testcases/bitwise/0040mark_binop_9 | 11 +++
.../dumps/0040mark_binop_0.nft} | 2 +-
.../dumps/0040mark_binop_1.nft} | 2 +-
.../bitwise/dumps/0040mark_binop_2.nft | 6 ++
.../bitwise/dumps/0040mark_binop_3.nft | 6 ++
.../bitwise/dumps/0040mark_binop_4.nft | 6 ++
.../bitwise/dumps/0040mark_binop_5.nft | 6 ++
.../bitwise/dumps/0040mark_binop_6.nft | 6 ++
.../bitwise/dumps/0040mark_binop_7.nft | 6 ++
.../bitwise/dumps/0040mark_binop_8.nft | 6 ++
.../bitwise/dumps/0040mark_binop_9.nft | 6 ++
33 files changed, 478 insertions(+), 23 deletions(-)
create mode 100644 tests/py/ip6/ct.t
create mode 100644 tests/py/ip6/ct.t.payload
rename tests/shell/testcases/{chains/0040mark_shift_0 => bitwise/0040mark_binop_0} (68%)
rename tests/shell/testcases/{chains/0040mark_shift_1 => bitwise/0040mark_binop_1} (70%)
create mode 100755 tests/shell/testcases/bitwise/0040mark_binop_2
create mode 100755 tests/shell/testcases/bitwise/0040mark_binop_3
create mode 100755 tests/shell/testcases/bitwise/0040mark_binop_4
create mode 100755 tests/shell/testcases/bitwise/0040mark_binop_5
create mode 100755 tests/shell/testcases/bitwise/0040mark_binop_6
create mode 100755 tests/shell/testcases/bitwise/0040mark_binop_7
create mode 100755 tests/shell/testcases/bitwise/0040mark_binop_8
create mode 100755 tests/shell/testcases/bitwise/0040mark_binop_9
rename tests/shell/testcases/{chains/dumps/0040mark_shift_0.nft => bitwise/dumps/0040mark_binop_0.nft} (58%)
rename tests/shell/testcases/{chains/dumps/0040mark_shift_1.nft => bitwise/dumps/0040mark_binop_1.nft} (64%)
create mode 100644 tests/shell/testcases/bitwise/dumps/0040mark_binop_2.nft
create mode 100644 tests/shell/testcases/bitwise/dumps/0040mark_binop_3.nft
create mode 100644 tests/shell/testcases/bitwise/dumps/0040mark_binop_4.nft
create mode 100644 tests/shell/testcases/bitwise/dumps/0040mark_binop_5.nft
create mode 100644 tests/shell/testcases/bitwise/dumps/0040mark_binop_6.nft
create mode 100644 tests/shell/testcases/bitwise/dumps/0040mark_binop_7.nft
create mode 100644 tests/shell/testcases/bitwise/dumps/0040mark_binop_8.nft
create mode 100644 tests/shell/testcases/bitwise/dumps/0040mark_binop_9.nft
--
2.30.2
next reply other threads:[~2023-03-22 21:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-22 21:52 Pablo Neira Ayuso [this message]
2023-03-22 21:52 ` [PATCH nft,v2 1/8] netlink_delinearize: correct type and byte-order of shifts Pablo Neira Ayuso
2023-03-22 21:52 ` [PATCH nft,v2 2/8] evaluate: support shifts larger than the width of the left operand Pablo Neira Ayuso
2023-03-22 21:52 ` [PATCH nft,v2 3/8] evaluate: don't eval unary arguments Pablo Neira Ayuso
2023-03-22 21:52 ` [PATCH nft,v2 4/8] evaluate: get length from statement instead of lhs expression Pablo Neira Ayuso
2023-03-22 21:53 ` [PATCH nft,v2 5/8] evaluate: relax type-checking for integer arguments in mark statements Pablo Neira Ayuso
2023-03-22 21:53 ` [PATCH nft,v2 6/8] tests: py: add test-cases for ct and packet mark payload expressions Pablo Neira Ayuso
2023-03-22 21:53 ` [PATCH nft,v2 7/8] tests: shell: rename and move bitwise test-cases Pablo Neira Ayuso
2023-03-22 21:53 ` [PATCH nft,v2 8/8] tests: shell: add test-cases for ct and packet mark payload expressions 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=20230322215303.239763-1-pablo@netfilter.org \
--to=pablo@netfilter.org \
--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