Skip to contentSkip to conversation

netfilter: ipset: fix typo in hash size macro

PATCH In review RubenKelevra 3 participants 4 messages Jun 19, 2025 – Jun 21, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfilter: ipset: fix typo in hash size macro

Rename IPSET_MIMINAL_HASHSIZE → IPSET_MINIMAL_HASHSIZE in ip_set_hash_gen.h, matching the header typo-fix. Keep a backward- compat alias in the header for out-of-tree users.

---
 include/linux/netfilter/ipset/ip_set_hash.h | 4 +++-
 net/netfilter/ipset/ip_set_hash_gen.h       | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)
include/linux/netfilter/ipset/ip_set_hash.h +3 -1
index 838abab672af1..4f7ce4eff5815 100644
@@ -6,7 +6,9 @@
 
 
 #define IPSET_DEFAULT_HASHSIZE		1024
-#define IPSET_MIMINAL_HASHSIZE		64
+#define IPSET_MINIMAL_HASHSIZE		64
+/* Legacy alias for the old typo – keep until v6.1 LTS (EOL: 2027-12-31) */
+#define IPSET_MIMINAL_HASHSIZE		IPSET_MINIMAL_HASHSIZE
 #define IPSET_DEFAULT_MAXELEM		65536
 #define IPSET_DEFAULT_PROBES		4
 #define IPSET_DEFAULT_RESIZE		100
net/netfilter/ipset/ip_set_hash_gen.h +2 -2
index 5251524b96afa..785d109645fed 100644
@@ -1543,8 +1543,8 @@ IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set,
 
 	if (tb[IPSET_ATTR_HASHSIZE]) {
 		hashsize = ip_set_get_h32(tb[IPSET_ATTR_HASHSIZE]);
-		if (hashsize < IPSET_MIMINAL_HASHSIZE)
-			hashsize = IPSET_MIMINAL_HASHSIZE;
+		if (hashsize < IPSET_MINIMAL_HASHSIZE)
+			hashsize = IPSET_MINIMAL_HASHSIZE;
 	}
 
 	if (tb[IPSET_ATTR_MAXELEM])
Signature · 1 line
2.49.0
#1 lore raw

Hi,

Quoted 3 lines · RubenKelevra

Rename IPSET_MIMINAL_HASHSIZE → IPSET_MINIMAL_HASHSIZE in ip_set_hash_gen.h, matching the header typo-fix. Keep a backward- compat alias in the header for out-of-tree users.

I don't think there's any need to keep a backward-comptibility alias: the macro is absolutely internal and don't even used outside of this file.

Could you resend your patch without it?

Best regards,
Jozsef

Quoted 40 lines

---
include/linux/netfilter/ipset/ip_set_hash.h | 4 +++-
net/netfilter/ipset/ip_set_hash_gen.h | 4 ++--

2 files changed, 5 insertions(+), 3 deletions(-)
include/linux/netfilter/ipset/ip_set_hash.h +3 -1
index 838abab672af1..4f7ce4eff5815 100644
@@ -6,7 +6,9 @@
 
 
 #define IPSET_DEFAULT_HASHSIZE		1024
-#define IPSET_MIMINAL_HASHSIZE		64
+#define IPSET_MINIMAL_HASHSIZE		64
+/* Legacy alias for the old typo – keep until v6.1 LTS (EOL: 2027-12-31) */
+#define IPSET_MIMINAL_HASHSIZE		IPSET_MINIMAL_HASHSIZE
 #define IPSET_DEFAULT_MAXELEM		65536
 #define IPSET_DEFAULT_PROBES		4
 #define IPSET_DEFAULT_RESIZE		100
net/netfilter/ipset/ip_set_hash_gen.h +2 -2
index 5251524b96afa..785d109645fed 100644
@@ -1543,8 +1543,8 @@ IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set,
 
 	if (tb[IPSET_ATTR_HASHSIZE]) {
 		hashsize = ip_set_get_h32(tb[IPSET_ATTR_HASHSIZE]);
-		if (hashsize < IPSET_MIMINAL_HASHSIZE)
-			hashsize = IPSET_MIMINAL_HASHSIZE;
+		if (hashsize < IPSET_MINIMAL_HASHSIZE)
+			hashsize = IPSET_MINIMAL_HASHSIZE;
 	}
 
 	if (tb[IPSET_ATTR_MAXELEM])
Signature · 1 line
2.49.0
#2 lore raw

PATCH 1/1 netfilter: ipset: fix typo in hash size macro

In reply to RubenKelevra

Rename IPSET_MIMINAL_HASHSIZE → IPSET_MINIMAL_HASHSIZE in ip_set_hash_gen.h, matching the header typo-fix.

---
 include/linux/netfilter/ipset/ip_set_hash.h | 2 +-
 net/netfilter/ipset/ip_set_hash_gen.h       | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
include/linux/netfilter/ipset/ip_set_hash.h +1 -1
index 838abab672af1..56e883661f857 100644
@@ -6,7 +6,7 @@
 
 
 #define IPSET_DEFAULT_HASHSIZE		1024
-#define IPSET_MIMINAL_HASHSIZE		64
+#define IPSET_MINIMAL_HASHSIZE		64
 #define IPSET_DEFAULT_MAXELEM		65536
 #define IPSET_DEFAULT_PROBES		4
 #define IPSET_DEFAULT_RESIZE		100
net/netfilter/ipset/ip_set_hash_gen.h +2 -2
index 5251524b96afa..785d109645fed 100644
@@ -1543,8 +1543,8 @@ IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set,
 
 	if (tb[IPSET_ATTR_HASHSIZE]) {
 		hashsize = ip_set_get_h32(tb[IPSET_ATTR_HASHSIZE]);
-		if (hashsize < IPSET_MIMINAL_HASHSIZE)
-			hashsize = IPSET_MIMINAL_HASHSIZE;
+		if (hashsize < IPSET_MINIMAL_HASHSIZE)
+			hashsize = IPSET_MINIMAL_HASHSIZE;
 	}
 
 	if (tb[IPSET_ATTR_MAXELEM])
Signature · 1 line
2.49.0
#3 lore raw

Hello,

Quoted 4 lines · RubenKelevra

Rename IPSET_MIMINAL_HASHSIZE → IPSET_MINIMAL_HASHSIZE in ip_set_hash_gen.h, matching the header typo-fix.

Patch is applied in the ipset git tree, thank you.

Best regards,
Jozsef

Quoted 37 lines
---
 include/linux/netfilter/ipset/ip_set_hash.h | 2 +-
 net/netfilter/ipset/ip_set_hash_gen.h       | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
include/linux/netfilter/ipset/ip_set_hash.h +1 -1
index 838abab672af1..56e883661f857 100644
@@ -6,7 +6,7 @@
 
 
 #define IPSET_DEFAULT_HASHSIZE		1024
-#define IPSET_MIMINAL_HASHSIZE		64
+#define IPSET_MINIMAL_HASHSIZE		64
 #define IPSET_DEFAULT_MAXELEM		65536
 #define IPSET_DEFAULT_PROBES		4
 #define IPSET_DEFAULT_RESIZE		100
net/netfilter/ipset/ip_set_hash_gen.h +2 -2
index 5251524b96afa..785d109645fed 100644
@@ -1543,8 +1543,8 @@ IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set,
 
 	if (tb[IPSET_ATTR_HASHSIZE]) {
 		hashsize = ip_set_get_h32(tb[IPSET_ATTR_HASHSIZE]);
-		if (hashsize < IPSET_MIMINAL_HASHSIZE)
-			hashsize = IPSET_MIMINAL_HASHSIZE;
+		if (hashsize < IPSET_MINIMAL_HASHSIZE)
+			hashsize = IPSET_MINIMAL_HASHSIZE;
 	}
 
 	if (tb[IPSET_ATTR_MAXELEM])
Signature · 1 line
2.49.0
Signature · 3 lines
E-mail : [email protected], [email protected], [email protected]
Address: Wigner Research Centre for Physics
         H-1525 Budapest 114, POB. 49, Hungary