All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: olteanv@gmail.com
Cc: netdev@vger.kernel.org, yangbo.lu@nxp.com,
	xiaoliang.yang_1@nxp.com, UNGLinuxDriver@microchip.com,
	claudiu.manoil@nxp.com, alexandre.belloni@bootlin.com,
	andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com,
	kuba@kernel.org
Subject: Re: [PATCH net 2/7] net: mscc: ocelot: add locking for the port TX timestamp ID
Date: Wed, 16 Sep 2020 17:19:26 -0700 (PDT)	[thread overview]
Message-ID: <20200916.171926.383551951466329210.davem@davemloft.net> (raw)
In-Reply-To: <20200915182229.69529-3-olteanv@gmail.com>

From: Vladimir Oltean <olteanv@gmail.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.



  parent reply	other threads:[~2020-09-17  0:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 18:22 [PATCH net 0/7] Bugfixes in Microsemi Ocelot switch driver Vladimir Oltean
2020-09-15 18:22 ` [PATCH net 1/7] net: mscc: ocelot: fix race condition with TX timestamping Vladimir Oltean
2020-09-15 18:22 ` [PATCH net 2/7] net: mscc: ocelot: add locking for the port TX timestamp ID Vladimir Oltean
2020-09-16 11:12   ` Alexandre Belloni
2020-09-16 12:25     ` Vladimir Oltean
2020-09-17  0:19   ` David Miller [this message]
2020-09-17 23:43     ` Vladimir Oltean
2020-09-17 23:57       ` David Miller
2020-09-15 18:22 ` [PATCH net 3/7] net: dsa: seville: fix buffer size of the queue system Vladimir Oltean
2020-09-15 18:22 ` [PATCH net 4/7] net: mscc: ocelot: check for errors on memory allocation of ports Vladimir Oltean
2020-09-17  0:21   ` David Miller
2020-09-15 18:22 ` [PATCH net 5/7] net: mscc: ocelot: error checking when calling ocelot_init() Vladimir Oltean
2020-09-17  0:24   ` David Miller
2020-09-15 18:22 ` [PATCH net 6/7] net: mscc: ocelot: refactor ports parsing code into a dedicated function Vladimir Oltean
2020-09-15 18:22 ` [PATCH net 7/7] net: mscc: ocelot: unregister net devices on unbind Vladimir Oltean
2020-09-15 21:19 ` [PATCH net 0/7] Bugfixes in Microsemi Ocelot switch driver Horatiu Vultur
2020-09-16  9:56 ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200916.171926.383551951466329210.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.com \
    --cc=xiaoliang.yang_1@nxp.com \
    --cc=yangbo.lu@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.