[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200917.165741.1373258900763298684.davem@davemloft.net>
Date: Thu, 17 Sep 2020 16:57:41 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: olteanv@...il.com
Cc: netdev@...r.kernel.org, yangbo.lu@....com,
xiaoliang.yang_1@....com, UNGLinuxDriver@...rochip.com,
claudiu.manoil@....com, alexandre.belloni@...tlin.com,
andrew@...n.ch, vivien.didelot@...il.com, f.fainelli@...il.com,
kuba@...nel.org
Subject: Re: [PATCH net 2/7] net: mscc: ocelot: add locking for the port TX
timestamp ID
From: Vladimir Oltean <olteanv@...il.com>
Date: Fri, 18 Sep 2020 02:43:40 +0300
> On Wed, Sep 16, 2020 at 05:19:26PM -0700, David Miller wrote:
>> From: Vladimir Oltean <olteanv@...il.com>
>> Date: Tue, 15 Sep 2020 21:22:24 +0300
>>
>> > This is a problem because, at least theoretically, another timestampable
>> > skb might use the same ocelot_port->ts_id before that is incremented. So
>> > the logic of using and incrementing the timestamp id should be atomic
>> > per port.
>>
>> Have you actually observed this race in practice?
>>
>> All transmit calls are serialized by the netdev transmit spinlock.
>>
>> Let's not add locking if it is not actually necessary.
>
> It's a bit more complicated.
> This code is also used from DSA, and DSA now declares NETIF_F_LLTX.
Please document that in the commit log message, thank you.
Powered by blists - more mailing lists