Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-12 Thread Mason
On 10/11/2015 20:25, Måns Rullgård wrote: > Mason writes: > >> On 10/11/2015 17:14, Mans Rullgard wrote: >> >>> This adds a driver for the Aurora VLSI NB8800 Ethernet controller. >>> It is an almost complete rewrite of a driver originally found in >>> a Sigma Designs 2.6.22 tree. >>> >>>

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-12 Thread Måns Rullgård
Mason writes: > On 10/11/2015 20:25, Måns Rullgård wrote: > >> Mason writes: >> >>> On 10/11/2015 17:14, Mans Rullgard wrote: >>> This adds a driver for the Aurora VLSI NB8800 Ethernet controller. It is an almost complete rewrite of a driver originally found in

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-12 Thread Måns Rullgård
Mason writes: > [ CCing a few knowledgeable people ] > > Despite the subject, this is about an Atheros 8035 PHY :-) > > On 12/11/2015 15:04, Måns Rullgård wrote: > >> Mason wrote: >> >>> BTW, you're not using the PHY IRQ, right? I think I remember you saying >>> it didn't

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-12 Thread Måns Rullgård
Måns Rullgård writes: > Mason writes: > >> [ CCing a few knowledgeable people ] >> >> Despite the subject, this is about an Atheros 8035 PHY :-) >> >> On 12/11/2015 15:04, Måns Rullgård wrote: >> >>> Mason wrote: >>> BTW, you're not using the PHY IRQ,

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-12 Thread Mason
[ CCing a few knowledgeable people ] Despite the subject, this is about an Atheros 8035 PHY :-) On 12/11/2015 15:04, Måns Rullgård wrote: > Mason wrote: > >> BTW, you're not using the PHY IRQ, right? I think I remember you saying >> it didn't work reliably? > > It doesn't seem to be wired up

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread Måns Rullgård
David Miller writes: > From: Måns Rullgård > Date: Wed, 11 Nov 2015 13:04:07 + > >> Måns Rullgård writes: >> >>> David Miller writes: >>> From: Måns Rullgård Date: Wed, 11 Nov 2015

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread Eric Dumazet
On Wed, 2015-11-11 at 14:15 +, Måns Rullgård wrote: > FWIW, with UDP I get 650 Mbps. Have you tried pktgen ? It should give you raw numbers, without the stack overhead, especially when using the clone operator. (It also has xmit_more support) If the NIC can not get more than 650 Mbps, not

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread David Miller
From: Måns Rullgård Date: Wed, 11 Nov 2015 13:04:07 + > Måns Rullgård writes: > >> David Miller writes: >> >>> From: Måns Rullgård >>> Date: Wed, 11 Nov 2015 00:40:09 + >>> When the DMA complete interrupt

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread Eric Dumazet
On Wed, 2015-11-11 at 13:04 +, Måns Rullgård wrote: > I tried that, and throughput (as measured by iperf3) dropped by 2%. > Maybe I did something wrong. What link speed have you used, what was the throughput you got, and is the receiver using the same NIC ? -- To unsubscribe from this

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread Måns Rullgård
Mason writes: > On 10/11/2015 22:51, Eric Dumazet wrote: > >> On Tue, 2015-11-10 at 21:21 +, Måns Rullgård wrote: >> >>> Even ixgbe uses napi_complete() while netdevice.h says one should >>> "consider using napi_complete_done() instead." Did the author consider >>> it

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread Eric Dumazet
On Wed, 2015-11-11 at 13:54 +, Måns Rullgård wrote: > Mason writes: > > > On 10/11/2015 22:51, Eric Dumazet wrote: > > > >> On Tue, 2015-11-10 at 21:21 +, Måns Rullgård wrote: > >> > >>> Even ixgbe uses napi_complete() while netdevice.h says one should > >>> "consider

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread Måns Rullgård
Eric Dumazet writes: > On Wed, 2015-11-11 at 13:48 +, Måns Rullgård wrote: >> Eric Dumazet writes: >> >> > On Wed, 2015-11-11 at 13:04 +, Måns Rullgård wrote: >> > >> >> I tried that, and throughput (as measured by iperf3) dropped by 2%.

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread Måns Rullgård
Måns Rullgård writes: > Eric Dumazet writes: > >> On Wed, 2015-11-11 at 13:48 +, Måns Rullgård wrote: >>> Eric Dumazet writes: >>> >>> > On Wed, 2015-11-11 at 13:04 +, Måns Rullgård wrote: >>> > >>> >> I tried that, and

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread David Miller
From: Måns Rullgård Date: Wed, 11 Nov 2015 18:25:05 + > If the TX DMA channel is idle when start_xmit is called, it can be > started immediately. Checking the DMA status and starting it if > idle has to be done atomically somehow. ->ndo_start_xmit() is guaranteed to be

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread David Miller
From: Måns Rullgård Date: Wed, 11 Nov 2015 19:35:05 + >> I don't think it's silly at all. > > I'm sure I read somewhere that the time spent spinning on a lock should > be kept as small as possible. > >> And unless you can measure it making a difference, don't knock the

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread Måns Rullgård
David Miller writes: > From: Måns Rullgård > Date: Wed, 11 Nov 2015 18:25:05 + > >> If the TX DMA channel is idle when start_xmit is called, it can be >> started immediately. Checking the DMA status and starting it if >> idle has to be done atomically

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread Måns Rullgård
David Miller writes: > From: Måns Rullgård > Date: Wed, 11 Nov 2015 19:09:19 + > >> David Miller writes: >> >>> From: Måns Rullgård >>> Date: Wed, 11 Nov 2015 18:25:05 + >>> If the TX DMA channel is idle

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread David Miller
From: Måns Rullgård Date: Wed, 11 Nov 2015 19:25:46 + > David Miller writes: > >> From: Måns Rullgård >> Date: Wed, 11 Nov 2015 19:17:07 + >> >>> David Miller writes: >>> From: Måns Rullgård

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread David Miller
From: Måns Rullgård Date: Wed, 11 Nov 2015 19:09:19 + > David Miller writes: > >> From: Måns Rullgård >> Date: Wed, 11 Nov 2015 18:25:05 + >> >>> If the TX DMA channel is idle when start_xmit is called, it can be >>> started

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread David Miller
From: Måns Rullgård Date: Wed, 11 Nov 2015 19:17:07 + > David Miller writes: > >> From: Måns Rullgård >> Date: Wed, 11 Nov 2015 19:09:19 + >> >>> David Miller writes: >>> From: Måns Rullgård

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread Måns Rullgård
David Miller writes: > From: Måns Rullgård > Date: Wed, 11 Nov 2015 19:17:07 + > >> David Miller writes: >> >>> From: Måns Rullgård >>> Date: Wed, 11 Nov 2015 19:09:19 + >>> David Miller

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-11 Thread Måns Rullgård
David Miller writes: > From: Måns Rullgård > Date: Wed, 11 Nov 2015 19:35:05 + > >>> I don't think it's silly at all. >> >> I'm sure I read somewhere that the time spent spinning on a lock should >> be kept as small as possible. >> >>> And unless you

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-10 Thread Måns Rullgård
Eric Dumazet writes: > On Tue, 2015-11-10 at 16:14 +, Mans Rullgard wrote: >> This adds a driver for the Aurora VLSI NB8800 Ethernet controller. >> It is an almost complete rewrite of a driver originally found in >> a Sigma Designs 2.6.22 tree. > > ... > >> + >>

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-10 Thread Mason
On 10/11/2015 17:14, Mans Rullgard wrote: > This adds a driver for the Aurora VLSI NB8800 Ethernet controller. > It is an almost complete rewrite of a driver originally found in > a Sigma Designs 2.6.22 tree. > > Signed-off-by: Mans Rullgard > --- > Changes: > - Refactored mdio

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-10 Thread Måns Rullgård
Eric Dumazet writes: > On Tue, 2015-11-10 at 16:14 +, Mans Rullgard wrote: >> This adds a driver for the Aurora VLSI NB8800 Ethernet controller. >> It is an almost complete rewrite of a driver originally found in >> a Sigma Designs 2.6.22 tree. > > ... > >> + >>

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-10 Thread Måns Rullgård
Mason writes: > On 10/11/2015 17:14, Mans Rullgard wrote: > >> This adds a driver for the Aurora VLSI NB8800 Ethernet controller. >> It is an almost complete rewrite of a driver originally found in >> a Sigma Designs 2.6.22 tree. >> >> Signed-off-by: Mans Rullgard

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-10 Thread Måns Rullgård
David Miller writes: > From: Måns Rullgård > Date: Tue, 10 Nov 2015 18:05:15 + > >> Because I haven't been following the netdev list closely for the last >> five years, and no documentation I read mentioned this function. I can >> certainly change it. >

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-10 Thread David Miller
From: Måns Rullgård Date: Tue, 10 Nov 2015 20:53:19 + > David Miller writes: > >> From: Måns Rullgård >> Date: Tue, 10 Nov 2015 18:05:15 + >> >>> Because I haven't been following the netdev list closely for the last >>> five years,

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-10 Thread David Miller
From: Måns Rullgård Date: Tue, 10 Nov 2015 18:05:15 + > Because I haven't been following the netdev list closely for the last > five years, and no documentation I read mentioned this function. I can > certainly change it. It is always advisable to mimick what other drivers

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-10 Thread Måns Rullgård
David Miller writes: > From: Måns Rullgård > Date: Tue, 10 Nov 2015 20:53:19 + > >> David Miller writes: >> >>> From: Måns Rullgård >>> Date: Tue, 10 Nov 2015 18:05:15 + >>> Because I haven't been

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-10 Thread Eric Dumazet
On Tue, 2015-11-10 at 21:21 +, Måns Rullgård wrote: > Even ixgbe uses napi_complete() while netdevice.h says one should > "consider using napi_complete_done() instead." Did the author consider > it and decide not to, or has the driver simply not been updated? napi_complete_done() is quite

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-10 Thread Måns Rullgård
Andy Shevchenko writes: > On Wed, Nov 11, 2015 at 12:34 AM, Måns Rullgård wrote: >> Andy Shevchenko writes: >> +static inline void nb8800_maskb(struct nb8800_priv *priv, int reg, + u32

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-10 Thread Andy Shevchenko
On Tue, Nov 10, 2015 at 6:14 PM, Mans Rullgard wrote: > This adds a driver for the Aurora VLSI NB8800 Ethernet controller. > It is an almost complete rewrite of a driver originally found in > a Sigma Designs 2.6.22 tree. Few nitpicks below. > > Signed-off-by: Mans Rullgard

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-10 Thread Måns Rullgård
Andy Shevchenko writes: >> +static inline void nb8800_maskb(struct nb8800_priv *priv, int reg, >> + u32 mask, u32 val) >> +{ >> + u32 old = nb8800_readb(priv, reg); >> + u32 new = (old & ~mask) | val; > > Shoudn't be "… | (val

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-10 Thread Andy Shevchenko
On Wed, Nov 11, 2015 at 1:07 AM, Måns Rullgård wrote: > Andy Shevchenko writes: > + nb8800_writel(priv, NB8800_TX_DESC_ADDR, txb->dma_desc); > + wmb(); /* ensure desc addr is written before starting > DMA */

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-10 Thread David Miller
From: Måns Rullgård Date: Wed, 11 Nov 2015 00:40:09 + > When the DMA complete interrupt arrives, the next chain should be > kicked off as quickly as possible, and I don't see why that would > benefit from being done in napi context. NAPI isn't about low latency, it's about

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-10 Thread Måns Rullgård
Francois Romieu writes: > Mans Rullgard : >> diff --git a/drivers/net/ethernet/aurora/nb8800.c >> b/drivers/net/ethernet/aurora/nb8800.c >> new file mode 100644 >> index 000..11cd389 >> --- /dev/null >> +++ b/drivers/net/ethernet/aurora/nb8800.c >