ipvs: correctly print the memory size of ip_vs_conn_tab
Subsystems (3)
PATCH v2 1/1 ipvs: correctly print the memory size of ip_vs_conn_tab
The memory size of ip_vs_conn_tab changed after we use hlist instead of list.
---
v2: use pointer dereference instead of struct types
net/netfilter/ipvs/ip_vs_conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/ipvs/ip_vs_conn.c +1 -1
@@ -1495,7 +1495,7 @@ int __init ip_vs_conn_init(void)pr_info ("Connection hash table configured " "(size=%d, memory=%ldKbytes)\n" , ip_vs_conn_tab_size, - (long )(ip_vs_conn_tab_size*sizeof (struct list_head ))/1024 ); + (long )(ip_vs_conn_tab_size*sizeof (*ip_vs_conn_tab))/1024 );IP_VS_DBG (0 ,"Each connection entry needs %zd bytes at least\n" ,sizeof (struct ip_vs_conn ));
Signature · 1 line
1.8.3.1
Hello,
Quoted 6 lines · Pengcheng Yang
The memory size of
ip_vs_conn_tabchanged after we use hlist instead of list.Fixes 731109e78415 ("ipvs: use hlist instead of list")Signed-off-by Pengcheng Yang <[email protected]>---
v2 looks better to me for nf-next, thanks!
Quoted 20 lines
v2: use pointer dereference instead of struct types
net/netfilter/ipvs/ip_vs_conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/netfilter/ipvs/ip_vs_conn.c +1
-1@@ -1495,7 +1495,7 @@ int __init ip_vs_conn_init(void)pr_info ("Connection hash table configured " "(size=%d, memory=%ldKbytes)\n" , ip_vs_conn_tab_size, - (long )(ip_vs_conn_tab_size*sizeof (struct list_head ))/1024 ); + (long )(ip_vs_conn_tab_size*sizeof (*ip_vs_conn_tab))/1024 );IP_VS_DBG (0 ,"Each connection entry needs %zd bytes at least\n" ,sizeof (struct ip_vs_conn ));Signature · 1 line
1.8.3.1
Regards
--
Julian Anastasov <[email protected]>
Quoted 8 lines · Julian Anastasov
Hello,
Quoted 3 lines · Pengcheng Yang
The memory size of
ip_vs_conn_tabchanged after we use hlist instead of list.
Quoted 7 lines
Quoted 3 lines
Fixes 731109e78415 ("ipvs: use hlist instead of list")Signed-off-by Pengcheng Yang <[email protected]>---
v2 looks better to me for nf-next, thanks!
Acked-by Julian Anastasov <[email protected]>
Quoted 26 lines
Quoted 20 lines
v2: use pointer dereference instead of struct types
net/netfilter/ipvs/ip_vs_conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/netfilter/ipvs/ip_vs_conn.c +1
-1@@ -1495,7 +1495,7 @@ int __init ip_vs_conn_init(void)pr_info ("Connection hash table configured " "(size=%d, memory=%ldKbytes)\n" , ip_vs_conn_tab_size, - (long )(ip_vs_conn_tab_size*sizeof (struct list_head ))/1024 ); + (long )(ip_vs_conn_tab_size*sizeof (*ip_vs_conn_tab))/1024 );IP_VS_DBG (0 ,"Each connection entry needs %zd bytes at least\n" ,sizeof (struct ip_vs_conn ));Signature · 1 line
1.8.3.1Regards
--
Julian Anastasov <[email protected]>
Quoted 13 lines · Simon Horman
Quoted 12 lines · Julian Anastasov
Hello,
Quoted 6 lines · Pengcheng Yang
The memory size of
ip_vs_conn_tabchanged after we use hlist instead of list.Fixes 731109e78415 ("ipvs: use hlist instead of list")Signed-off-by Pengcheng Yang <[email protected]>---
Quoted 5 lines
Quoted 3 lines
v2 looks better to me for nf-next, thanks!
Acked-by Julian Anastasov <[email protected]>Acked-by Simon Horman <[email protected]>
Applied to nf.git, thanks