All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Jozsef Kadlecsik <kadlec@netfilter.org>, Florian Westphal <fw@strlen.de>
Subject: [PATCH nf-next v4 07/13] netfilter: ipset: remove obsolete data_next stubs
Date: Fri,  4 Sep 2026 20:53:15 +0200	[thread overview]
Message-ID: <20260904185321.30313-8-fw@strlen.de> (raw)
In-Reply-To: <20260904185321.30313-1-fw@strlen.de>

Was used in the generic resize code.  This code is now gone, we only
need this is a few selected set backends for netmask expansion on
insert.

Retain it in those specific helpers and remove all the obsolete/unused
stubs.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 net/netfilter/ipset/ip_set_hash_gen.h        |  4 ----
 net/netfilter/ipset/ip_set_hash_ip.c         |  5 -----
 net/netfilter/ipset/ip_set_hash_ipmac.c      | 13 -------------
 net/netfilter/ipset/ip_set_hash_ipmark.c     |  6 ------
 net/netfilter/ipset/ip_set_hash_ipport.c     |  7 -------
 net/netfilter/ipset/ip_set_hash_ipportip.c   |  7 -------
 net/netfilter/ipset/ip_set_hash_ipportnet.c  |  7 -------
 net/netfilter/ipset/ip_set_hash_mac.c        |  6 ------
 net/netfilter/ipset/ip_set_hash_net.c        |  6 ------
 net/netfilter/ipset/ip_set_hash_netiface.c   |  6 ------
 net/netfilter/ipset/ip_set_hash_netnet.c     |  6 ------
 net/netfilter/ipset/ip_set_hash_netport.c    |  7 -------
 net/netfilter/ipset/ip_set_hash_netportnet.c |  7 -------
 13 files changed, 87 deletions(-)

diff --git a/net/netfilter/ipset/ip_set_hash_gen.h b/net/netfilter/ipset/ip_set_hash_gen.h
index 4d2e1e867606..4efc93333aef 100644
--- a/net/netfilter/ipset/ip_set_hash_gen.h
+++ b/net/netfilter/ipset/ip_set_hash_gen.h
@@ -135,7 +135,6 @@ static const union nf_inet_addr zeromask = {};
 #undef mtype_data_reset_flags
 #undef mtype_data_netmask
 #undef mtype_data_list
-#undef mtype_data_next
 #undef mtype_elem
 
 #undef mtype_rht_elem
@@ -189,7 +188,6 @@ static const union nf_inet_addr zeromask = {};
 #define mtype_data_reset_flags	IPSET_TOKEN(MTYPE, _data_reset_flags)
 #define mtype_data_netmask	IPSET_TOKEN(MTYPE, _data_netmask)
 #define mtype_data_list		IPSET_TOKEN(MTYPE, _data_list)
-#define mtype_data_next		IPSET_TOKEN(MTYPE, _data_next)
 #define mtype_elem		IPSET_TOKEN(MTYPE, _elem)
 
 #define mtype_rht_elem		IPSET_TOKEN(MTYPE, _rht_elem)
@@ -913,8 +911,6 @@ mtype_add(struct ip_set *set, void *value, const struct ip_set_ext *ext,
 	if (ret == -EEXIST)
 		ret = flag_exist ? 0 : -IPSET_ERR_EXIST;
 
-	if (0)	/* to be removed */
-		mtype_data_next(&h->next, d);
 out_rcu_unlock:
 	rcu_read_unlock_bh();
 	return ret;
diff --git a/net/netfilter/ipset/ip_set_hash_ip.c b/net/netfilter/ipset/ip_set_hash_ip.c
index c9f4e3859663..9b82ec5d4037 100644
--- a/net/netfilter/ipset/ip_set_hash_ip.c
+++ b/net/netfilter/ipset/ip_set_hash_ip.c
@@ -198,11 +198,6 @@ hash_ip6_data_list(struct sk_buff *skb, const struct hash_ip6_elem *e)
 	return true;
 }
 
-static void
-hash_ip6_data_next(struct hash_ip6_elem *next, const struct hash_ip6_elem *e)
-{
-}
-
 #undef MTYPE
 #undef HOST_MASK
 
diff --git a/net/netfilter/ipset/ip_set_hash_ipmac.c b/net/netfilter/ipset/ip_set_hash_ipmac.c
index b9a2681e2488..dced4c5f3ca3 100644
--- a/net/netfilter/ipset/ip_set_hash_ipmac.c
+++ b/net/netfilter/ipset/ip_set_hash_ipmac.c
@@ -68,13 +68,6 @@ hash_ipmac4_data_list(struct sk_buff *skb, const struct hash_ipmac4_elem *e)
 	return true;
 }
 
-static void
-hash_ipmac4_data_next(struct hash_ipmac4_elem *next,
-		      const struct hash_ipmac4_elem *e)
-{
-	next->ip = e->ip;
-}
-
 #define MTYPE		hash_ipmac4
 #define PF		4
 #define HOST_MASK	32
@@ -176,12 +169,6 @@ hash_ipmac6_data_list(struct sk_buff *skb, const struct hash_ipmac6_elem *e)
 	return true;
 }
 
-static void
-hash_ipmac6_data_next(struct hash_ipmac6_elem *next,
-		      const struct hash_ipmac6_elem *e)
-{
-}
-
 #undef MTYPE
 #undef PF
 #undef HOST_MASK
diff --git a/net/netfilter/ipset/ip_set_hash_ipmark.c b/net/netfilter/ipset/ip_set_hash_ipmark.c
index e26ca2a370e3..6196b0112cf9 100644
--- a/net/netfilter/ipset/ip_set_hash_ipmark.c
+++ b/net/netfilter/ipset/ip_set_hash_ipmark.c
@@ -201,12 +201,6 @@ hash_ipmark6_data_list(struct sk_buff *skb,
 	return true;
 }
 
-static void
-hash_ipmark6_data_next(struct hash_ipmark6_elem *next,
-		       const struct hash_ipmark6_elem *d)
-{
-}
-
 #undef MTYPE
 #undef HOST_MASK
 
diff --git a/net/netfilter/ipset/ip_set_hash_ipport.c b/net/netfilter/ipset/ip_set_hash_ipport.c
index 41ca24a22a02..7842ff4ad74f 100644
--- a/net/netfilter/ipset/ip_set_hash_ipport.c
+++ b/net/netfilter/ipset/ip_set_hash_ipport.c
@@ -245,13 +245,6 @@ hash_ipport6_data_list(struct sk_buff *skb,
 	return true;
 }
 
-static void
-hash_ipport6_data_next(struct hash_ipport6_elem *next,
-		       const struct hash_ipport6_elem *d)
-{
-	next->port = d->port;
-}
-
 #undef MTYPE
 #undef HOST_MASK
 
diff --git a/net/netfilter/ipset/ip_set_hash_ipportip.c b/net/netfilter/ipset/ip_set_hash_ipportip.c
index b9ac2efaa15c..b1b24358c810 100644
--- a/net/netfilter/ipset/ip_set_hash_ipportip.c
+++ b/net/netfilter/ipset/ip_set_hash_ipportip.c
@@ -244,13 +244,6 @@ hash_ipportip6_data_list(struct sk_buff *skb,
 	return true;
 }
 
-static void
-hash_ipportip6_data_next(struct hash_ipportip6_elem *next,
-			 const struct hash_ipportip6_elem *d)
-{
-	next->port = d->port;
-}
-
 #undef MTYPE
 #undef HOST_MASK
 
diff --git a/net/netfilter/ipset/ip_set_hash_ipportnet.c b/net/netfilter/ipset/ip_set_hash_ipportnet.c
index 195853a25b06..58a47a0f89f0 100644
--- a/net/netfilter/ipset/ip_set_hash_ipportnet.c
+++ b/net/netfilter/ipset/ip_set_hash_ipportnet.c
@@ -375,13 +375,6 @@ hash_ipportnet6_data_list(struct sk_buff *skb,
 	return true;
 }
 
-static void
-hash_ipportnet6_data_next(struct hash_ipportnet6_elem *next,
-			  const struct hash_ipportnet6_elem *d)
-{
-	next->port = d->port;
-}
-
 #undef MTYPE
 #undef HOST_MASK
 
diff --git a/net/netfilter/ipset/ip_set_hash_mac.c b/net/netfilter/ipset/ip_set_hash_mac.c
index 41a122591fe2..4c195db349f7 100644
--- a/net/netfilter/ipset/ip_set_hash_mac.c
+++ b/net/netfilter/ipset/ip_set_hash_mac.c
@@ -57,12 +57,6 @@ hash_mac4_data_list(struct sk_buff *skb, const struct hash_mac4_elem *e)
 	return true;
 }
 
-static void
-hash_mac4_data_next(struct hash_mac4_elem *next,
-		    const struct hash_mac4_elem *e)
-{
-}
-
 #define MTYPE		hash_mac4
 #define HOST_MASK	32
 #define IP_SET_EMIT_CREATE
diff --git a/net/netfilter/ipset/ip_set_hash_net.c b/net/netfilter/ipset/ip_set_hash_net.c
index 092f3c9281b8..157660674f1d 100644
--- a/net/netfilter/ipset/ip_set_hash_net.c
+++ b/net/netfilter/ipset/ip_set_hash_net.c
@@ -269,12 +269,6 @@ hash_net6_data_list(struct sk_buff *skb, const struct hash_net6_elem *data)
 	return true;
 }
 
-static void
-hash_net6_data_next(struct hash_net6_elem *next,
-		    const struct hash_net6_elem *d)
-{
-}
-
 #undef MTYPE
 #undef HOST_MASK
 
diff --git a/net/netfilter/ipset/ip_set_hash_netiface.c b/net/netfilter/ipset/ip_set_hash_netiface.c
index edadd6307675..82b00337cfef 100644
--- a/net/netfilter/ipset/ip_set_hash_netiface.c
+++ b/net/netfilter/ipset/ip_set_hash_netiface.c
@@ -370,12 +370,6 @@ hash_netiface6_data_list(struct sk_buff *skb,
 	return true;
 }
 
-static void
-hash_netiface6_data_next(struct hash_netiface6_elem *next,
-			 const struct hash_netiface6_elem *d)
-{
-}
-
 #undef MTYPE
 #undef HOST_MASK
 
diff --git a/net/netfilter/ipset/ip_set_hash_netnet.c b/net/netfilter/ipset/ip_set_hash_netnet.c
index f7c8a1cc30fc..4e77e40ebc2c 100644
--- a/net/netfilter/ipset/ip_set_hash_netnet.c
+++ b/net/netfilter/ipset/ip_set_hash_netnet.c
@@ -359,12 +359,6 @@ hash_netnet6_data_list(struct sk_buff *skb,
 	return true;
 }
 
-static void
-hash_netnet6_data_next(struct hash_netnet6_elem *next,
-		       const struct hash_netnet6_elem *d)
-{
-}
-
 #undef MTYPE
 #undef HOST_MASK
 
diff --git a/net/netfilter/ipset/ip_set_hash_netport.c b/net/netfilter/ipset/ip_set_hash_netport.c
index 5de4b511de76..dfe8f995abbe 100644
--- a/net/netfilter/ipset/ip_set_hash_netport.c
+++ b/net/netfilter/ipset/ip_set_hash_netport.c
@@ -330,13 +330,6 @@ hash_netport6_data_list(struct sk_buff *skb,
 	return true;
 }
 
-static void
-hash_netport6_data_next(struct hash_netport6_elem *next,
-			const struct hash_netport6_elem *d)
-{
-	next->port = d->port;
-}
-
 #undef MTYPE
 #undef HOST_MASK
 
diff --git a/net/netfilter/ipset/ip_set_hash_netportnet.c b/net/netfilter/ipset/ip_set_hash_netportnet.c
index 61af1ce27127..0dc79d37beac 100644
--- a/net/netfilter/ipset/ip_set_hash_netportnet.c
+++ b/net/netfilter/ipset/ip_set_hash_netportnet.c
@@ -421,13 +421,6 @@ hash_netportnet6_data_list(struct sk_buff *skb,
 	return true;
 }
 
-static void
-hash_netportnet6_data_next(struct hash_netportnet6_elem *next,
-			   const struct hash_netportnet6_elem *d)
-{
-	next->port = d->port;
-}
-
 #undef MTYPE
 #undef HOST_MASK
 
-- 
2.55.0


  parent reply	other threads:[~2026-09-04 18:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 18:53 [PATCH nf-next v4 00/13] ipset: replace internal hash table with rhashtable Florian Westphal
2026-09-04 18:53 ` [PATCH nf-next v4 01/13] rhashtable: add rhashtable_flush_and_free helper Florian Westphal
2026-09-04 19:29   ` Florian Westphal
2026-09-08  5:12   ` Herbert Xu
2026-09-08  5:30     ` Florian Westphal
2026-09-08  9:04       ` Herbert Xu
2026-09-08  9:56         ` Florian Westphal
2026-09-08 12:39           ` Herbert Xu
2026-09-08 13:25             ` Florian Westphal
2026-09-09  3:49               ` Herbert Xu
2026-09-09  4:17   ` Herbert Xu
2026-09-09 14:45     ` Florian Westphal
2026-09-10  9:11       ` Herbert Xu
2026-09-10 10:41         ` Florian Westphal
2026-09-11 11:56           ` Herbert Xu
2026-09-11 12:54             ` Florian Westphal
2026-09-04 18:53 ` [PATCH nf-next v4 02/13] netfilter: ipset: add rhashtable boilerplate stubs Florian Westphal
2026-09-04 18:53 ` [PATCH nf-next v4 03/13] netfilter: ipset: add rhltable " Florian Westphal
2026-09-04 18:53 ` [PATCH nf-next v4 04/13] netfilter: ipset: replace internal hash table with rhashtable Florian Westphal
2026-09-04 18:53 ` [PATCH nf-next v4 05/13] netfilter: ipset: re-add forceadd support Florian Westphal
2026-09-04 18:53 ` [PATCH nf-next v4 06/13] netfilter: ipset: also report mem size for cidr storage to userspace Florian Westphal
2026-09-04 18:53 ` Florian Westphal [this message]
2026-09-04 18:53 ` [PATCH nf-next v4 08/13] netfilter: ipset: remove last region lock usage Florian Westphal
2026-09-04 18:53 ` [PATCH nf-next v4 09/13] netfilter: ipset: remove multi-flag Florian Westphal
2026-09-04 18:53 ` [PATCH nf-next v4 10/13] netfilter: ipset: remove resize completely Florian Westphal
2026-09-04 18:53 ` [PATCH nf-next v4 11/13] netfilter: ipset: remove trivial kvfree wrapper Florian Westphal
2026-09-04 18:53 ` [PATCH nf-next v4 12/13] netfilter: ipset: use plain rcu_read_lock Florian Westphal
2026-09-04 18:53 ` [PATCH nf-next v4 13/13] netfilter: ipset: improve lockdep coverage Florian Westphal

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=20260904185321.30313-8-fw@strlen.de \
    --to=fw@strlen.de \
    --cc=kadlec@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 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.