lkml.org 
[lkml]   [2022]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 31/78] ipvs: correctly print the memory size of ip_vs_conn_tab
    Date
    From: Pengcheng Yang <yangpc@wangsu.com>

    [ Upstream commit eba1a872cb73314280d5448d934935b23e30b7ca ]

    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>
    Acked-by: Julian Anastasov <ja@ssi.bg>
    Acked-by: Simon Horman <horms@verge.net.au>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    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 620c865c230b..1ecce76bc266 100644
    --- a/net/netfilter/ipvs/ip_vs_conn.c
    +++ b/net/netfilter/ipvs/ip_vs_conn.c
    @@ -1432,7 +1432,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));

    --
    2.35.1


    \
     
     \ /
      Last update: 2022-05-10 15:25    [W:8.282 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site