[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6e6236db-9e36-527e-eaef-591a20a9c3d2@katalix.com>
Date: Thu, 1 Aug 2024 08:18:12 +0100
From: James Chapman <jchapman@...alix.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org,
Simon Horman <horms@...nel.org>
Subject: Re: [PATCH v2 net-next 1/6] l2tp: Don't assign net->gen->ptr[] for
pppol2tp_net_ops.
On 31/07/2024 21:07, Kuniyuki Iwashima wrote:
> Commit fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and
> ppp parts") converted net->gen->ptr[pppol2tp_net_id] in l2tp_ppp.c to
> net->gen->ptr[l2tp_net_id] in l2tp_core.c.
>
> Now the leftover wastes one entry of net->gen->ptr[] in each netns.
>
> Let's avoid the unwanted allocation.
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
> Reviewed-by: Simon Horman <horms@...nel.org>
Reviewed-by: James Chapman <jchapman@...alix.com>
> ---
> net/l2tp/l2tp_ppp.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
> index 3596290047b2..246089b17910 100644
> --- a/net/l2tp/l2tp_ppp.c
> +++ b/net/l2tp/l2tp_ppp.c
> @@ -1406,8 +1406,6 @@ static int pppol2tp_getsockopt(struct socket *sock, int level, int optname,
> * L2TPv2, we dump only L2TPv2 tunnels and sessions here.
> *****************************************************************************/
>
> -static unsigned int pppol2tp_net_id;
> -
> #ifdef CONFIG_PROC_FS
>
> struct pppol2tp_seq_data {
> @@ -1641,7 +1639,6 @@ static __net_exit void pppol2tp_exit_net(struct net *net)
> static struct pernet_operations pppol2tp_net_ops = {
> .init = pppol2tp_init_net,
> .exit = pppol2tp_exit_net,
> - .id = &pppol2tp_net_id,
> };
>
> /*****************************************************************************
Powered by blists - more mailing lists