[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e8861e2b-6056-48a2-897c-9fa320eb2e80@intel.com>
Date: Wed, 15 Jan 2025 15:24:59 +0100
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: Jakub Kicinski <kuba@...nel.org>, Ido Schimmel <idosch@...dia.com>
CC: <netdev@...r.kernel.org>, <jiri@...nulli.us>,
<anthony.l.nguyen@...el.com>, <edumazet@...gle.com>, <pabeni@...hat.com>,
<andrew+netdev@...n.ch>, <horms@...nel.org>, <jdamato@...tly.com>,
<davem@...emloft.net>
Subject: Re: [PATCH net-next v2 01/11] net: add netdev_lock() /
netdev_unlock() helpers
On 1/15/25 15:08, Jakub Kicinski wrote:
> On Wed, 15 Jan 2025 09:36:11 +0100 Przemek Kitszel wrote:
>>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
>>> index bced03fb349e..891c5bdb894c 100644
>>> --- a/include/linux/netdevice.h
>>> +++ b/include/linux/netdevice.h
>>> @@ -2444,8 +2444,12 @@ struct net_device {
>>> u32 napi_defer_hard_irqs;
>>>
>>> /**
>>> - * @lock: protects @net_shaper_hierarchy, feel free to use for other
>>> - * netdev-scope protection. Ordering: take after rtnl_lock.
>>> + * @lock: netdev-scope lock, protects a small selection of fields.
>>> + * Should always be taken using netdev_lock() / netdev_unlock() helpers.
>>> + * Drivers are free to use it for other protection.
>>
>> As with devl_lock(), would be good to specify the ordering for those who
>> happen to take both. My guess is that devl_lock() is after netdev_lock()
>
> The ordering is transitive, since devl_ is before rtnl_ there is
> no ambiguity. Or so I think :)
>
sure thing, sorry for not checking prior to asking :)
thanks to both you and Ido for answering!
Powered by blists - more mailing lists