* [PATCH nf,v2] ipvs: correctly print the memory size of ip_vs_conn_tab
@ 2022-04-12 11:05 Pengcheng Yang
2022-04-15 13:22 ` Julian Anastasov
0 siblings, 1 reply; 4+ messages in thread
From: Pengcheng Yang @ 2022-04-12 11:05 UTC (permalink / raw)
To: Simon Horman, Julian Anastasov, lvs-devel
Cc: Pablo Neira Ayuso, Florian Westphal, Jozsef Kadlecsik,
netfilter-devel, Pengcheng Yang
The memory size of ip_vs_conn_tab changed after we use hlist
instead of list.
Fixes: 731109e78415 ("ipvs: use hlist instead of list")
Signed-off-by: Pengcheng Yang <yangpc@wangsu.com>
---
v2: use pointer dereference instead of struct types
net/netfilter/ipvs/ip_vs_conn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index 2c467c4..fb67f1c 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -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));
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH nf,v2] ipvs: correctly print the memory size of ip_vs_conn_tab
2022-04-12 11:05 [PATCH nf,v2] ipvs: correctly print the memory size of ip_vs_conn_tab Pengcheng Yang
@ 2022-04-15 13:22 ` Julian Anastasov
2022-04-19 8:57 ` Simon Horman
0 siblings, 1 reply; 4+ messages in thread
From: Julian Anastasov @ 2022-04-15 13:22 UTC (permalink / raw)
To: Pengcheng Yang
Cc: Simon Horman, lvs-devel, Pablo Neira Ayuso, Florian Westphal,
Jozsef Kadlecsik, netfilter-devel
Hello,
On Tue, 12 Apr 2022, Pengcheng Yang wrote:
> The memory size of ip_vs_conn_tab changed after we use hlist
> instead of list.
>
> Fixes: 731109e78415 ("ipvs: use hlist instead of list")
> Signed-off-by: Pengcheng Yang <yangpc@wangsu.com>
> ---
v2 looks better to me for nf-next, thanks!
Acked-by: Julian Anastasov <ja@ssi.bg>
> v2: use pointer dereference instead of struct types
>
> net/netfilter/ipvs/ip_vs_conn.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
> index 2c467c4..fb67f1c 100644
> --- a/net/netfilter/ipvs/ip_vs_conn.c
> +++ b/net/netfilter/ipvs/ip_vs_conn.c
> @@ -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));
>
> --
> 1.8.3.1
Regards
--
Julian Anastasov <ja@ssi.bg>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH nf,v2] ipvs: correctly print the memory size of ip_vs_conn_tab
2022-04-15 13:22 ` Julian Anastasov
@ 2022-04-19 8:57 ` Simon Horman
2022-04-19 9:04 ` Pablo Neira Ayuso
0 siblings, 1 reply; 4+ messages in thread
From: Simon Horman @ 2022-04-19 8:57 UTC (permalink / raw)
To: Julian Anastasov
Cc: Pengcheng Yang, lvs-devel, Pablo Neira Ayuso, Florian Westphal,
Jozsef Kadlecsik, netfilter-devel
On Fri, Apr 15, 2022 at 04:22:47PM +0300, Julian Anastasov wrote:
>
> Hello,
>
> On Tue, 12 Apr 2022, Pengcheng Yang wrote:
>
> > The memory size of ip_vs_conn_tab changed after we use hlist
> > instead of list.
> >
> > Fixes: 731109e78415 ("ipvs: use hlist instead of list")
> > Signed-off-by: Pengcheng Yang <yangpc@wangsu.com>
> > ---
>
> v2 looks better to me for nf-next, thanks!
>
> Acked-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Simon Horman <horms@verge.net.au>
> > v2: use pointer dereference instead of struct types
> >
> > net/netfilter/ipvs/ip_vs_conn.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
> > index 2c467c4..fb67f1c 100644
> > --- a/net/netfilter/ipvs/ip_vs_conn.c
> > +++ b/net/netfilter/ipvs/ip_vs_conn.c
> > @@ -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));
> >
> > --
> > 1.8.3.1
>
> Regards
>
> --
> Julian Anastasov <ja@ssi.bg>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH nf,v2] ipvs: correctly print the memory size of ip_vs_conn_tab
2022-04-19 8:57 ` Simon Horman
@ 2022-04-19 9:04 ` Pablo Neira Ayuso
0 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2022-04-19 9:04 UTC (permalink / raw)
To: Simon Horman
Cc: Julian Anastasov, Pengcheng Yang, lvs-devel, Florian Westphal,
Jozsef Kadlecsik, netfilter-devel
On Tue, Apr 19, 2022 at 10:57:31AM +0200, Simon Horman wrote:
> On Fri, Apr 15, 2022 at 04:22:47PM +0300, Julian Anastasov wrote:
> >
> > Hello,
> >
> > On Tue, 12 Apr 2022, Pengcheng Yang wrote:
> >
> > > The memory size of ip_vs_conn_tab changed after we use hlist
> > > instead of list.
> > >
> > > Fixes: 731109e78415 ("ipvs: use hlist instead of list")
> > > Signed-off-by: Pengcheng Yang <yangpc@wangsu.com>
> > > ---
> >
> > v2 looks better to me for nf-next, thanks!
> >
> > Acked-by: Julian Anastasov <ja@ssi.bg>
>
> Acked-by: Simon Horman <horms@verge.net.au>
Applied to nf.git, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-19 9:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-12 11:05 [PATCH nf,v2] ipvs: correctly print the memory size of ip_vs_conn_tab Pengcheng Yang
2022-04-15 13:22 ` Julian Anastasov
2022-04-19 8:57 ` Simon Horman
2022-04-19 9:04 ` Pablo Neira Ayuso
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.