[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230731090305.0c5fe7a1@kernel.org>
Date: Mon, 31 Jul 2023 09:03:05 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Leon Romanovsky <leon@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH net-next] net: make sure we never create ifindex = 0
On Sun, 30 Jul 2023 16:32:19 +0300 Leon Romanovsky wrote:
> > @@ -11271,7 +11272,6 @@ static int __net_init netdev_init(struct net *net)
> > if (net->dev_index_head == NULL)
> > goto err_idx;
> >
> > - net->ifindex = 1;
> > xa_init_flags(&net->dev_by_index, XA_FLAGS_ALLOC);
>
> You don't need to change xa_limit_31b, just change XA_FLAGS_ALLOC to be XA_FLAGS_ALLOC1
> and allocations will start from 1.
Because obviously there is a magic flag for this...
Powered by blists - more mailing lists