[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMFT1=Z042nT4A76W1T-dywrMZUgmvrzmEvyMfWm2K+Ew0_VDA@mail.gmail.com>
Date: Sun, 8 Feb 2026 16:16:00 -0600
From: Ziyi Guo <n7l8m4@...orthwestern.edu>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: Paolo Abeni <pabeni@...hat.com>, Claudiu Manoil <claudiu.manoil@....com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>, UNGLinuxDriver@...rochip.com,
Andrew Lunn <andrew+netdev@...n.ch>, "David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] net: mscc: ocelot: add missing lock protection in ocelot_port_xmit()
On Sun, Feb 8, 2026 at 7:35 AM Vladimir Oltean
<vladimir.oltean@....com> wrote:
>
> The idea is not bad, but I would move one step further.
>
> Refactor the rew_op handling into an ocelot_xmit_timestamp() function as
> a first preparatory patch. The logic will need to be called from two
> places and it's good not to duplicate it.
>
> Then create two separate ocelot_port_xmit_fdma() and ocelot_port_xmit_inj(),
> as a second preparatory patch.
>
> static netdev_tx_t ocelot_port_xmit(struct sk_buff *skb, struct net_device *dev)
> {
> if (static_branch_unlikely(&ocelot_fdma_enabled))
> return ocelot_port_xmit_fdma(skb, dev);
>
> return ocelot_port_xmit_inj(skb, dev);
> }
>
> Now, as the third patch, add the required locking in ocelot_port_xmit_inj().
>
> It's best for the FDMA vs register injection code paths to be as
> separate as possible.
Thanks Vladimir and folks for your time. I'll split it into three
patches as series, and send a v3 version.
Best,
Ziyi
Powered by blists - more mailing lists