All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: [nft PATCH 12/15] include: Use struct nftnl_set_desc
Date: Wed, 24 Nov 2021 18:22:48 +0100	[thread overview]
Message-ID: <20211124172251.11539-13-phil@nwl.cc> (raw)
In-Reply-To: <20211124172251.11539-1-phil@nwl.cc>

Since libnftnl now exports the data structure, use it in struct set.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 include/rule.h | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/include/rule.h b/include/rule.h
index be31695636df4..5e6647f9d6cca 100644
--- a/include/rule.h
+++ b/include/rule.h
@@ -6,6 +6,7 @@
 #include <list.h>
 #include <netinet/in.h>
 #include <libnftnl/object.h>	/* For NFTNL_CTTIMEOUT_ARRAY_MAX. */
+#include <libnftnl/set.h>
 #include <linux/netfilter/nf_tables.h>
 #include <string.h>
 #include <cache.h>
@@ -330,9 +331,7 @@ void rule_stmt_insert_at(struct rule *rule, struct stmt *nstmt,
  * @policy:	set mechanism policy
  * @automerge:	merge adjacents and overlapping elements, if possible
  * @comment:	comment
- * @desc.size:		count of set elements
- * @desc.field_len:	length of single concatenated fields, bytes
- * @desc.field_count:	count of concatenated fields
+ * @desc:	set element meta data
  */
 struct set {
 	struct list_head	list;
@@ -354,11 +353,7 @@ struct set {
 	bool			automerge;
 	bool			key_typeof_valid;
 	const char		*comment;
-	struct {
-		uint32_t	size;
-		uint8_t		field_len[NFT_REG32_COUNT];
-		uint8_t		field_count;
-	} desc;
+	struct nftnl_set_desc	desc;
 };
 
 extern struct set *set_alloc(const struct location *loc);
-- 
2.33.0


  parent reply	other threads:[~2021-11-24 17:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24 17:22 [nft PATCH 00/15] Fix netlink debug output on Big Endian Phil Sutter
2021-11-24 17:22 ` [nft PATCH 01/15] tests/py: Avoid duplicate records in *.got files Phil Sutter
2021-11-24 17:22 ` [nft PATCH 02/15] exthdr: Fix for segfault with unknown exthdr Phil Sutter
2021-11-24 17:22 ` [nft PATCH 03/15] mnl: Fix for missing info in rule dumps Phil Sutter
2021-11-24 17:22 ` [nft PATCH 04/15] src: Fix payload statement mask on Big Endian Phil Sutter
2021-11-24 17:22 ` [nft PATCH 05/15] meta: Fix {g,u}id_type " Phil Sutter
2021-11-24 17:22 ` [nft PATCH 06/15] meta: Fix hour_type size Phil Sutter
2021-11-24 17:22 ` [nft PATCH 07/15] datatype: Fix size of time_type Phil Sutter
2021-11-24 17:22 ` [nft PATCH 08/15] ct: Fix ct label value parser Phil Sutter
2021-11-24 17:22 ` [nft PATCH 09/15] netlink_delinearize: Fix for escaped asterisk strings on Big Endian Phil Sutter
2021-11-24 17:22 ` [nft PATCH 10/15] Make string-based data types " Phil Sutter
2021-11-24 17:22 ` [nft PATCH 11/15] evaluate: Fix key byteorder value in range sets/maps Phil Sutter
2021-11-24 17:22 ` Phil Sutter [this message]
2021-11-24 17:22 ` [nft PATCH 13/15] mnl: Provide libnftnl with set element meta info when dumping Phil Sutter
2021-11-24 17:22 ` [nft PATCH 14/15] tests/py/tools: Add regen_payloads.sh Phil Sutter
2021-11-30 13:47 ` [nft PATCH 00/15] Fix netlink debug output on Big Endian Pablo Neira Ayuso
2021-11-30 13:55   ` Phil Sutter

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=20211124172251.11539-13-phil@nwl.cc \
    --to=phil@nwl.cc \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.