[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SN1PR11MB0446A2B9B9A8782A8223680EECA50@SN1PR11MB0446.namprd11.prod.outlook.com>
Date: Mon, 10 Dec 2018 20:32:50 +0000
From: <Tristram.Ha@...rochip.com>
To: <andrew@...n.ch>
CC: <netdev@...r.kernel.org>, <f.fainelli@...il.com>,
<vivien.didelot@...oirfairelinux.com>, <Woojung.Huh@...rochip.com>,
<UNGLinuxDriver@...rochip.com>, <davem@...emloft.net>,
<marex@...x.de>
Subject: RE: [PATCH 3/5] net: dsa: ksz: Factor out common tag code
> On Fri, Dec 07, 2018 at 07:18:43PM +0100, Marek Vasut wrote:
> > From: Tristram Ha <Tristram.Ha@...rochip.com>
> >
> > Factor out common code from the tag_ksz , so that the code can be used
> > with other KSZ family switches which use differenly sized tags.
>
> I prefer this implementation over what Tristram recently submitted. It
> is also what we suggested a while back. However, since then we have
> had Spectra/meltdown, and we now know a function call through a
> pointer is expensive. This is the hot path, every frame comes through
> here, so it is worth taking the time to optimize this. Could you try
> to remove the ksz_tag_ops structure. xmit looks simple, since it is a
> tail call, so you can do that in ksz9477_xmit. Receive looks a bit
> more complex.
>
> I also think for the moment we need it ignore PTP until we have the
> big picture sorted out. If need be, the code can be refactored yet
> again. But i don't want PTP holding up getting more switches
> supported.
Yes, as you may already know, what Marek submitted was my previous
attempt to support different switches in tag_ksz.c.
So this ksz_tag_ops is still not acceptable? As I understand the kernel is
using this mechanism all over the places.
What is left is a direct copying of the transmit and receive functions for each
new switch tail tag format.
Powered by blists - more mailing lists