netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nf-next v2 00/10] netfilter: nft_bitwise: shift support
@ 2020-01-14 21:29 Jeremy Sowden
  2020-01-14 21:29 ` [PATCH nf-next v2 01/10] netfilter: nf_tables: white-space fixes Jeremy Sowden
                   ` (10 more replies)
  0 siblings, 11 replies; 14+ messages in thread
From: Jeremy Sowden @ 2020-01-14 21:29 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Netfilter Devel

The connmark xtables extension supports bit-shifts.  Add support for
shifts to nft_bitwise in order to allow nftables to do likewise, e.g.:

  nft add rule t c oif lo ct mark set meta mark << 8 | 0xab
  nft add rule t c iif lo meta mark & 0xff 0xab ct mark set meta mark >> 8

Changes since v1:

  * more white-space fixes;
  * move bitwise op enum to UAPI;
  * add NFTA_BITWISE_OP and NFTA_BITWISE_DATA;
  * remove NFTA_BITWISE_LSHIFT and NFTA_BITWISE_RSHIFT;
  * add helpers for initializaing, evaluating and dumping different
    types of operation.

Jeremy Sowden (10):
  netfilter: nf_tables: white-space fixes.
  netfilter: bitwise: remove NULL comparisons from attribute checks.
  netfilter: bitwise: replace gotos with returns.
  netfilter: bitwise: add NFTA_BITWISE_OP netlink attribute.
  netfilter: bitwise: add helper for initializing boolean operations.
  netfilter: bitwise: add helper for evaluating boolean operations.
  netfilter: bitwise: add helper for dumping boolean operations.
  netfilter: bitwise: only offload boolean operations.
  netfilter: bitwise: add NFTA_BITWISE_DATA attribute.
  netfilter: bitwise: add support for shifts.

 include/uapi/linux/netfilter/nf_tables.h |  23 ++-
 net/netfilter/nft_bitwise.c              | 210 ++++++++++++++++++-----
 net/netfilter/nft_set_bitmap.c           |   4 +-
 net/netfilter/nft_set_hash.c             |   2 +-
 4 files changed, 192 insertions(+), 47 deletions(-)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-01-15  9:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14 21:29 [PATCH nf-next v2 00/10] netfilter: nft_bitwise: shift support Jeremy Sowden
2020-01-14 21:29 ` [PATCH nf-next v2 01/10] netfilter: nf_tables: white-space fixes Jeremy Sowden
2020-01-14 21:29 ` [PATCH nf-next v2 02/10] netfilter: bitwise: remove NULL comparisons from attribute checks Jeremy Sowden
2020-01-14 21:29 ` [PATCH nf-next v2 03/10] netfilter: bitwise: replace gotos with returns Jeremy Sowden
2020-01-14 21:29 ` [PATCH nf-next v2 04/10] netfilter: bitwise: add NFTA_BITWISE_OP netlink attribute Jeremy Sowden
2020-01-14 21:29 ` [PATCH nf-next v2 05/10] netfilter: bitwise: add helper for initializing boolean operations Jeremy Sowden
2020-01-14 21:29 ` [PATCH nf-next v2 06/10] netfilter: bitwise: add helper for evaluating " Jeremy Sowden
2020-01-14 21:29 ` [PATCH nf-next v2 07/10] netfilter: bitwise: add helper for dumping " Jeremy Sowden
2020-01-14 21:29 ` [PATCH nf-next v2 08/10] netfilter: bitwise: only offload " Jeremy Sowden
2020-01-14 21:29 ` [PATCH nf-next v2 09/10] netfilter: bitwise: add NFTA_BITWISE_DATA attribute Jeremy Sowden
2020-01-15  9:29   ` Pablo Neira Ayuso
2020-01-15  9:30     ` Jeremy Sowden
2020-01-14 21:29 ` [PATCH nf-next v2 10/10] netfilter: bitwise: add support for shifts Jeremy Sowden
2020-01-15  9:29 ` [PATCH nf-next v2 00/10] netfilter: nft_bitwise: shift support Pablo Neira Ayuso

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).