[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5c302a4b-3021-1f76-bab7-209672fb9e74@gmail.com>
Date: Wed, 15 Mar 2023 16:14:14 +0000
From: Edward Cree <ecree.xilinx@...il.com>
To: Íñigo Huguet <ihuguet@...hat.com>,
habetsm.xilinx@...il.com, richardcochran@...il.com
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, netdev@...r.kernel.org,
Yalin Li <yalli@...hat.com>
Subject: Re: [PATCH RESEND net-next v4 3/4] sfc: support unicast PTP
On 15/03/2023 08:48, Íñigo Huguet wrote:
> I've never used rhashlist, it would be a good learning exercise. How do you see if I submit that as an optimization in a future patch?
Yep, that'd be fine. (Hence the Ack.)
>> Why does failing to insert one filter mean we need to remove *all*
>> the unicast filters we have? (I'm not even sure it's necessary
>> to remove the new EVENT filter if the GENERAL filter fails.)
>
> Well, my reasoning was that it shouldn't fail in a first place. If it does, it's something very weird. Instead of implementing more complex logic to try checking if the current state is valid or not, just remove all and try to install them again the next time. If it fails again, probably the system is not in a very good state.
I don't think any complex logic is needed - any insertion that fails
will mean that there's no corresponding entry on the list, so next
time we call efx_ptp_filter_exists() it'll return false and we'll
go ahead and insert. I.e. every state is 'valid' as long as the
rxfilters_ucast list matches what's actually in the hardware.
Powered by blists - more mailing lists