Re: [PATCH] RDMA/siw: Remove direct link to net_device
From: Jakub Kicinski
Date: Wed Dec 11 2024 - 21:37:11 EST
On Wed, 11 Dec 2024 12:00:55 -0400 Jason Gunthorpe wrote:
> > > ifindex is only stable so long as you are holding a reference on the
> > > netdev..
> >
> > Does not compute. Can you elaborate what you mean, Jason?
>
> I mean you can't replace a netdev pointer with an ifindex, you can't
> reliably get back to the same netdev from ifindex alone.
With the right use of locking and the netdev notifier the ifindex
is as good as a pointer. I just wanted to point out that taking
a reference makes no difference here.