Skip to content

parser_bison: Less STRING more tokens

Phil Sutter netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 2 repliesIn review

Changes since RFC from the cover letter

- Fix up patches 1 and 2 as per review
- Add Reviewed-by: tags to patches 3 to 5

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6parser_bison: Introduce tokens for monitor eventsinclude/rule.h src/evaluate.c src/parser_bison.y +2 more+25 -330 replies
2/6parser_bison: Introduce tokens for chain typesinclude/rule.h src/parser_bison.y src/rule.c +1 more+20 -340 replies
3/6parser_bison: Introduce tokens for osf ttl valuessrc/parser_bison.y src/scanner.l+12 -180 replies
4/6parser_bison: Introduce tokens for log levelssrc/parser_bison.y src/scanner.l+27 -280 replies
5/6parser_bison: Introduce bytes_unitinclude/datatype.h src/datatype.c src/parser_bison.y +1 more+22 -620 replies
6/6scanner: Introduce SCANSTATE_RATEinclude/datatype.h include/parser.h src/datatype.c +5 more+130 -1102 replies

Reviews trailers per patch

4 of 6 patches have a Reviewed-by or Acked-by.

PatchFlorian Westphal
1/6
2/6
3/6R-b
4/6R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [nft PATCH 0/6] parser_bison: Less STRING more tokens

Introducing new tokens should be harmless as long as they are scoped since it won't break existing rulesets using them for user-defined names.

Leverage this to offload more input parsing to flex/bison, thereby reducing custom code size.

Changes since RFC:
- Fix up patches 1 and 2 as per review
- Add Reviewed-by: tags to patches 3 to 5

Phil Sutter (6):
parser_bison: Introduce tokens for monitor events
parser_bison: Introduce tokens for chain types
parser_bison: Introduce tokens for osf ttl values
parser_bison: Introduce tokens for log levels
parser_bison: Introduce bytes_unit
scanner: Introduce SCANSTATE_RATE

 include/datatype.h           |   7 --
 include/parser.h             |   1 +
 include/rule.h               |  21 ++--
 src/datatype.c               |  61 -----------
 src/evaluate.c               |  22 +---
 src/parser_bison.y           | 204 +++++++++++------------------------
 src/rule.c                   |  23 +---
 src/scanner.l                |  76 ++++++++-----
 tests/py/any/limit.t         |   6 ++
 tests/py/any/limit.t.json    |  70 ++++++++++++
 tests/py/any/limit.t.payload |  20 ++++
 11 files changed, 231 insertions(+), 280 deletions(-)
Signature · 1 line
2.51.0