[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170929121201.GD19710@lunn.ch>
Date: Fri, 29 Sep 2017 14:12:01 +0200
From: Andrew Lunn <andrew@...n.ch>
To: David Laight <David.Laight@...LAB.COM>
Cc: "Tristram.Ha@...rochip.com" <Tristram.Ha@...rochip.com>,
"muvarov@...il.com" <muvarov@...il.com>,
"pavel@....cz" <pavel@....cz>,
"nathan.leigh.conrad@...il.com" <nathan.leigh.conrad@...il.com>,
"vivien.didelot@...oirfairelinux.com"
<vivien.didelot@...oirfairelinux.com>,
"f.fainelli@...il.com" <f.fainelli@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Woojung.Huh@...rochip.com" <Woojung.Huh@...rochip.com>
Subject: Re: [PATCH RFC 3/5] Add KSZ8795 switch driver
On Fri, Sep 29, 2017 at 09:14:26AM +0000, David Laight wrote:
> From: Andrew Lunn
> > Sent: 28 September 2017 20:34
> ...
> > > There are 34 counters. In normal case using generic bus I/O or PCI to read them
> > > is very quick, but the switch is mostly accessed using SPI, or even I2C. As the SPI
> > > access is very slow.
> >
> > How slow is it? The Marvell switches all use MDIO. It is probably a
> > bit faster than I2C, but it is a lot slower than MMIO or PCI.
> >
> > ethtool -S lan0 takes about 25ms.
>
> Is the SPI access software bit-banged?
That will depend on the board design. I've used mdio bit banging, and
that was painfully slow for stats.
But we should primarily think about average hardware. It is going to
have hardware SPI or I2C. If statistics reading with hardware I2C is
reasonable, i would avoid caching, and just ensure other accesses are
permitted between individual statistic reads.
It also requires Microchip also post new code. They have been very
silent for quite a while....
Andrew
Powered by blists - more mailing lists