mbox series

[libnftnl,0/3] bitwise: support for passing mask and xor via registers

Message ID 20200224131201.512755-1-jeremy@azazel.net
Headers show
Series bitwise: support for passing mask and xor via registers | expand

Message

Jeremy Sowden Feb. 24, 2020, 1:11 p.m. UTC
The kernel supports passing mask and xor values for bitwise boolean
operations via registers.  These are mutually exclusive with the
existing data attributes: e.g., setting both NFTA_EXPR_BITWISE_MASK and
NFTA_EXPR_BITWISE_MREG is an error.  Add support to libnftnl.

The first patch fixes a typo, the second updates the UAPI header and
the last contains the implementation.

Jeremy Sowden (3):
  tests: bitwise: fix error message.
  include: update nf_tables.h.
  bitwise: add support for passing mask and xor via registers.

 include/libnftnl/expr.h             |  2 +
 include/linux/netfilter/nf_tables.h |  4 ++
 src/expr/bitwise.c                  | 60 ++++++++++++++++++++++---
 tests/nft-expr_bitwise-test.c       | 70 +++++++++++++++++++----------
 4 files changed, 106 insertions(+), 30 deletions(-)

Comments

Pablo Neira Ayuso March 2, 2020, 1:33 p.m. UTC | #1
On Mon, Feb 24, 2020 at 01:11:58PM +0000, Jeremy Sowden wrote:
> The kernel supports passing mask and xor values for bitwise boolean
> operations via registers.  These are mutually exclusive with the
> existing data attributes: e.g., setting both NFTA_EXPR_BITWISE_MASK and
> NFTA_EXPR_BITWISE_MREG is an error.  Add support to libnftnl.
> 
> The first patch fixes a typo, the second updates the UAPI header and
> the last contains the implementation.

Applied, thanks.