Re: [PATCH net-next V3 00/16] net: fec: cleanup and fixes
> I think I've already fixed this, but I've only submitted once. > > commit 466cb4a2e5583d2e18470f30d5948edcf4b947f5 > Author: Troy Kisky> Date: Wed Jan 20 12:52:10 2016 -0700 > > net: fec: update dirty_tx even if no skb > > If dirty_tx isn't updated, then dma_unmap_single > will be called twice. > > Signed-off-by: Troy Kisky Thanks! This fixed the issue. Have a Tested-by:
Re: [PATCH net-next V3 00/16] net: fec: cleanup and fixes
On 4/14/2016 3:13 AM, Holger Schurig wrote: > Do you guys that work with the FEC driver ever run with > CONFIG_DMA_API_DEBUG enabled? > > I ask this Because I get this error when it's turned on when I do some > "rsync" transfer to my device: > > [ 58.420980] [ cut here ] > [ 58.425667] WARNING: CPU: 0 PID: 377 at > /home/schurig/d/mkarm/linux-4.5/lib/dma-debug.c:1096 check_unmap+0x9d0/0xab8() > [ 58.436405] fec 2188000.ethernet: DMA-API: device driver tries to free DMA > memory it has not allocated [device address=0x] [size=66 > bytes] > [ 58.450248] Modules linked in: bnep usbhid imx_sdma flexcan btusb btrtl > btbcm btintel smsc95xx usbnet mii bluetooth > [ 58.460882] CPU: 0 PID: 377 Comm: sshd Tainted: GW 4.5.1 #3 > [ 58.467671] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) > [ 58.474199] Backtrace: > [ 58.476675] [] (dump_backtrace) from [] > (show_stack+0x18/0x1c) > [ 58.484244] r6:6113 r5:c05a96c0 r4: r3: > [ 58.489964] [] (show_stack) from [] > (dump_stack+0x9c/0xb0) > [ 58.497197] [] (dump_stack) from [] > (warn_slowpath_common+0x8c/0xbc) > [ 58.505286] r6:c01f9c74 r5:0009 r4:ee9f17f8 r3:c0596da4 > [ 58.511002] [] (warn_slowpath_common) from [] > (warn_slowpath_fmt+0x38/0x40) > [ 58.519698] r8:0042 r7:0001 r6: r5: r4:c050c020 > [ 58.526470] [] (warn_slowpath_fmt) from [] > (check_unmap+0x9d0/0xab8) > [ 58.534559] r3:c0520e6c r2:c050c020 > [ 58.538159] r4: > [ 58.540710] [] (check_unmap) from [] > (debug_dma_unmap_page+0x84/0x8c) > [ 58.548886] r10:ef2ec000 r9:f09e5fa0 r8:ef0ef810 r7:0001 r6: > r5:0042 > [ 58.556780] r4:0001 > [ 58.559336] [] (debug_dma_unmap_page) from [] > (fec_txq+0x140/0x31c) > [ 58.567338] r8:ef0ef810 r7: r6: r5: r4:ef2c6000 > [ 58.574108] [] (fec_txq) from [] > (fec_enet_napi_q1+0x98/0xe8) > [ 58.581589] r10:0800 r9:ef2ec580 r8: r7:0040 r6: > r5:ef2ec000 I think I've already fixed this, but I've only submitted once. commit 466cb4a2e5583d2e18470f30d5948edcf4b947f5 Author: Troy KiskyDate: Wed Jan 20 12:52:10 2016 -0700 net: fec: update dirty_tx even if no skb If dirty_tx isn't updated, then dma_unmap_single will be called twice. Signed-off-by: Troy Kisky diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 452be9c..150a90a 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1243,10 +1243,8 @@ static void fec_txq(struct net_device *ndev, struct fec_enet_priv_tx_q *txq) fec16_to_cpu(bdp->cbd_datlen), DMA_TO_DEVICE); bdp->cbd_bufaddr = cpu_to_fec32(0); - if (!skb) { - bdp = fec_enet_get_nextdesc(bdp, >bd); - continue; - } + if (!skb) + goto skb_done; /* Check for errors. */ if (status & (BD_ENET_TX_HB | BD_ENET_TX_LC | @@ -1285,7 +1283,7 @@ static void fec_txq(struct net_device *ndev, struct fec_enet_priv_tx_q *txq) /* Free the sk buffer associated with this last transmit */ dev_kfree_skb_any(skb); - +skb_done: /* Make sure the update to bdp and tx_skbuff are performed * before dirty_tx */
Re: [PATCH net-next V3 00/16] net: fec: cleanup and fixes
Do you guys that work with the FEC driver ever run with CONFIG_DMA_API_DEBUG enabled? I ask this Because I get this error when it's turned on when I do some "rsync" transfer to my device: [ 58.420980] [ cut here ] [ 58.425667] WARNING: CPU: 0 PID: 377 at /home/schurig/d/mkarm/linux-4.5/lib/dma-debug.c:1096 check_unmap+0x9d0/0xab8() [ 58.436405] fec 2188000.ethernet: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x] [size=66 bytes] [ 58.450248] Modules linked in: bnep usbhid imx_sdma flexcan btusb btrtl btbcm btintel smsc95xx usbnet mii bluetooth [ 58.460882] CPU: 0 PID: 377 Comm: sshd Tainted: GW 4.5.1 #3 [ 58.467671] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 58.474199] Backtrace: [ 58.476675] [] (dump_backtrace) from [] (show_stack+0x18/0x1c) [ 58.484244] r6:6113 r5:c05a96c0 r4: r3: [ 58.489964] [] (show_stack) from [] (dump_stack+0x9c/0xb0) [ 58.497197] [] (dump_stack) from [] (warn_slowpath_common+0x8c/0xbc) [ 58.505286] r6:c01f9c74 r5:0009 r4:ee9f17f8 r3:c0596da4 [ 58.511002] [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x38/0x40) [ 58.519698] r8:0042 r7:0001 r6: r5: r4:c050c020 [ 58.526470] [] (warn_slowpath_fmt) from [] (check_unmap+0x9d0/0xab8) [ 58.534559] r3:c0520e6c r2:c050c020 [ 58.538159] r4: [ 58.540710] [] (check_unmap) from [] (debug_dma_unmap_page+0x84/0x8c) [ 58.548886] r10:ef2ec000 r9:f09e5fa0 r8:ef0ef810 r7:0001 r6: r5:0042 [ 58.556780] r4:0001 [ 58.559336] [] (debug_dma_unmap_page) from [] (fec_txq+0x140/0x31c) [ 58.567338] r8:ef0ef810 r7: r6: r5: r4:ef2c6000 [ 58.574108] [] (fec_txq) from [] (fec_enet_napi_q1+0x98/0xe8) [ 58.581589] r10:0800 r9:ef2ec580 r8: r7:0040 r6: r5:ef2ec000 [ 58.589483] r4:0c008000 [ 58.592042] [] (fec_enet_napi_q1) from [] (net_rx_action+0x1fc/0x2f0) [ 58.600218] r10:ee9f19c0 r9:0040 r8:c059e100 r7:012c r6:a1a3 r5:c02ce25c [ 58.608112] r4:ef2ec580 r3:ee9f19c0 [ 58.611720] [] (net_rx_action) from [] (__do_softirq+0x134/0x254) [ 58.619549] r10:c059e080 r9:4003 r8:0100 r7:ee9f r6:c059e08c r5:0003 [ 58.627445] r4: [ 58.629995] [] (__do_softirq) from [] (irq_exit+0xb8/0x120) [ 58.637303] r10:ee9f1e38 r9:f4001100 r8:ef008000 r7:0001 r6: r5: [ 58.645197] r4:c05970b8 [ 58.647754] [] (irq_exit) from [] (__handle_domain_irq+0x68/0xbc) [ 58.655583] r4:c05970b8 r3:c0064e24 [ 58.659190] [] (__handle_domain_irq) from [] (gic_handle_irq+0x50/0x90) [ 58.667539] r8:f4000100 r7:ee9f1ac8 r6:f400010c r5:c059e7a0 r4:c05a9788 r3:ee9f1ac8 [ 58.675350] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x54) [ 58.682833] Exception stack(0xee9f1ac8 to 0xee9f1b10) [ 58.687887] 1ac0: ee9c0d4c 000c [ 58.696067] 1ae0: ee9f1e38 ee9f1e3c ee9f1e40 edc6ac00 ee9f1e38 ee9f1e1c ee9f1b18 [ 58.704245] 1b00: ee9c0d4c c00df648 6013 [ 58.709295] r9:edc6ac00 r8:ee9f1e40 r7:ee9f1afc r6: r5:6013 r4:c00df648 [ 58.717112] [] (do_select) from [] (core_sys_select+0x144/0x320) [ 58.724854] r10:ee9f1e38 r9:ee9f1e38 r8:000c r7:805af838 r6: r5:805af848 [ 58.732749] r4:0004 [ 58.735300] [] (core_sys_select) from [] (SyS_select+0xd4/0x120) [ 58.743042] r10: r9:000c r8:805af848 r7:805af838 r6: r5:ee9f1f70 [ 58.750936] r4: [ 58.753488] [] (SyS_select) from [] (ret_fast_syscall+0x0/0x34) [ 58.761143] r9:ee9f r8:c000f9c4 r7:008e r6: r5:7f5f77c0 r4: [ 58.768984] ---[ end trace cb88537fdc8fa202 ]--- The amount of data transferred isn't even huge: sent 382,979 bytes received 28,086 bytes 32,885.20 bytes/sec total size is 147,758,955 speedup is 359.45 This happens with: * Kernel 4.5 * Kernel 4.5.1 * Kernel 4.5.1 with the fec-related patches from 4.6-rc3 * Kernel 4.5.1 with the fec-related patches from 4.6-rc3 and Troy's patch series from this thread Should I post an extra e-mail with "BUG" in the subject?
Re: [PATCH net-next V3 00/16] net: fec: cleanup and fixes
On 4/6/2016 8:58 PM, David Miller wrote: > From: Troy Kisky> Date: Wed, 6 Apr 2016 18:09:17 -0700 > >> On 4/6/2016 2:20 PM, David Miller wrote: >>> >>> This is a way too large patch series. >>> >>> Please split it up into smaller, more logical, pieces. >>> >>> Thanks. >>> >> >> If you apply the 1st 3 that have been acked, I'll be at 13. >> >> Would I then send the next 5 for V4, and when that is applied >> send another V4 with the next 8 that have been already been acked? > > What other reasonable option is there? I can't think of any. > A V1 for the next 8 would not be too unreasonable.
Re: [PATCH net-next V3 00/16] net: fec: cleanup and fixes
From: Troy KiskyDate: Wed, 6 Apr 2016 18:09:17 -0700 > On 4/6/2016 2:20 PM, David Miller wrote: >> >> This is a way too large patch series. >> >> Please split it up into smaller, more logical, pieces. >> >> Thanks. >> > > If you apply the 1st 3 that have been acked, I'll be at 13. > > Would I then send the next 5 for V4, and when that is applied > send another V4 with the next 8 that have been already been acked? What other reasonable option is there? I can't think of any.
RE: [PATCH net-next V3 00/16] net: fec: cleanup and fixes
From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Thursday, April 07, 2016 12:43 AM > To: Fugang Duan <fugang.d...@nxp.com>; netdev@vger.kernel.org; > da...@davemloft.net; lzn...@gmail.com > Cc: Fabio Estevam <fabio.este...@nxp.com>; l.st...@pengutronix.de; > and...@lunn.ch; trem...@gmail.com; g...@uclinux.org; linux-arm- > ker...@lists.infradead.org; johan...@sipsolutions.net; > stillcompil...@gmail.com; sergei.shtyl...@cogentembedded.com; > a...@arndb.de > Subject: Re: [PATCH net-next V3 00/16] net: fec: cleanup and fixes > > On 4/6/2016 1:51 AM, Fugang Duan wrote: > > From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Wednesday, > > April 06, 2016 10:26 AM > >> To: netdev@vger.kernel.org; da...@davemloft.net; Fugang Duan > >> <fugang.d...@nxp.com>; lzn...@gmail.com > >> Cc: Fabio Estevam <fabio.este...@nxp.com>; l.st...@pengutronix.de; > >> and...@lunn.ch; trem...@gmail.com; g...@uclinux.org; linux-arm- > >> ker...@lists.infradead.org; johan...@sipsolutions.net; > >> stillcompil...@gmail.com; sergei.shtyl...@cogentembedded.com; > >> a...@arndb.de; Troy Kisky <troy.ki...@boundarydevices.com> > >> Subject: [PATCH net-next V3 00/16] net: fec: cleanup and fixes > >> > >> V3 has > >> > >> 1 dropped patch "net: fec: print more debug info in fec_timeout" > >> 2 new patches > >> 0002-net-fec-remove-unused-interrupt-FEC_ENET_TS_TIMER.patch > >> 0003-net-fec-return-IRQ_HANDLED-if-fec_ptp_check_pps_even.patch > >> > >> 1 combined patch > >> 0004-net-fec-pass-rxq-txq-to-fec_enet_rx-tx_queue-instead.patch > >> > >> The changes are noted on individual patches > >> > >> My measured performance of this series is > >> > >> before patch set > >> 365 Mbits/sec Tx/407 RX > >> > >> after patch set > >> 374 Tx/427 Rx > >> > > > > I doubt the performance data, I validate it on i.MX6q sabresd board on the > latest commit(4da46cebbd3b) in net tree. > > > > I was doing UDP tests, as outlined in my V2 cover letter. Also, my cpu is 1G. > Is > yours 1.2G? > It is also 1GHz. I will double test UDP performance. > > > > > root@imx6qdlsolo:~# uname -a > > Linux imx6qdlsolo 4.6.0-rc1-00318-g4da46ce #180 SMP Wed Apr 6 16:24:09 > > CST 2016 armv7l GNU/Linux > > > This is the V2 patch that I dropped. > > I will force update my local net-next_master branch, to make testing this > series > easier. > Note that my local net-next_master branch has about 19 patches on top of this > series. > so, > > tkisky@office-server2:~/linux-imx6$ git reset --hard HEAD~19 HEAD is now at > a125da7 net: fec: don't set cbd_bufaddr unless no mapping error > I see. > > > > > TCP RX performance is 602Mbps, TX is only 325Mbps, TX path has some > performance issue in net tree. > > I will dig out it. > > > > > > > More testing is always better. Thanks > > > >> > >> Troy Kisky (16): > >> net: fec: only check queue 0 if RXF_0/TXF_0 interrupt is set > >> net: fec: remove unused interrupt FEC_ENET_TS_TIMER > >> net: fec: return IRQ_HANDLED if fec_ptp_check_pps_event handled it > >> net: fec: pass rxq/txq to fec_enet_rx/tx_queue instead of queue_id > >> net: fec: reduce interrupts > >> net: fec: split off napi routine with 3 queues > >> net: fec: don't clear all rx queue bits when just one is being checked > >> net: fec: set cbd_sc without relying on previous value > >> net: fec: eliminate calls to fec_enet_get_prevdesc > >> net: fec: move restart test for efficiency > >> net: fec: clear cbd_sc after transmission to help with debugging > >> net: fec: dump all tx queues in fec_dump > >> net: fec: detect tx int lost > >> net: fec: create subroutine reset_tx_queue > >> net: fec: call dma_unmap_single on mapped tx buffers at restart > >> net: fec: don't set cbd_bufaddr unless no mapping error > >> > >> drivers/net/ethernet/freescale/fec.h | 10 +- > >> drivers/net/ethernet/freescale/fec_main.c | 410 > >> > >> -- > >> 2 files changed, 218 insertions(+), 202 deletions(-) > >> > >> -- > >> 2.5.0 > >
Re: [PATCH net-next V3 00/16] net: fec: cleanup and fixes
On 4/6/2016 2:20 PM, David Miller wrote: > > This is a way too large patch series. > > Please split it up into smaller, more logical, pieces. > > Thanks. > If you apply the 1st 3 that have been acked, I'll be at 13. Would I then send the next 5 for V4, and when that is applied send another V4 with the next 8 that have been already been acked? Thanks Troy
Re: [PATCH net-next V3 00/16] net: fec: cleanup and fixes
This is a way too large patch series. Please split it up into smaller, more logical, pieces. Thanks.
Re: [PATCH net-next V3 00/16] net: fec: cleanup and fixes
On 4/6/2016 9:43 AM, Troy Kisky wrote: > On 4/6/2016 1:51 AM, Fugang Duan wrote: >> From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Wednesday, April 06, >> 2016 10:26 AM >>> To: netdev@vger.kernel.org; da...@davemloft.net; Fugang Duan >>> <fugang.d...@nxp.com>; lzn...@gmail.com >>> Cc: Fabio Estevam <fabio.este...@nxp.com>; l.st...@pengutronix.de; >>> and...@lunn.ch; trem...@gmail.com; g...@uclinux.org; linux-arm- >>> ker...@lists.infradead.org; johan...@sipsolutions.net; >>> stillcompil...@gmail.com; sergei.shtyl...@cogentembedded.com; >>> a...@arndb.de; Troy Kisky <troy.ki...@boundarydevices.com> >>> Subject: [PATCH net-next V3 00/16] net: fec: cleanup and fixes >>> >>> V3 has >>> >>> 1 dropped patch "net: fec: print more debug info in fec_timeout" >>> 2 new patches >>> 0002-net-fec-remove-unused-interrupt-FEC_ENET_TS_TIMER.patch >>> 0003-net-fec-return-IRQ_HANDLED-if-fec_ptp_check_pps_even.patch >>> >>> 1 combined patch >>> 0004-net-fec-pass-rxq-txq-to-fec_enet_rx-tx_queue-instead.patch >>> >>> The changes are noted on individual patches >>> >>> My measured performance of this series is >>> >>> before patch set >>> 365 Mbits/sec Tx/407 RX >>> >>> after patch set >>> 374 Tx/427 Rx >>> >> >> I doubt the performance data, I validate it on i.MX6q sabresd board on the >> latest commit(4da46cebbd3b) in net tree. > > > > I was doing UDP tests, as outlined in my V2 cover letter. Also, my cpu is 1G. > Is yours 1.2G? > > > > >> root@imx6qdlsolo:~# uname -a >> Linux imx6qdlsolo 4.6.0-rc1-00318-g4da46ce #180 SMP Wed Apr 6 16:24:09 CST >> 2016 armv7l GNU/Linux > > > This is the V2 patch that I dropped. Sorry, your right. It is the current head, without this series. > > I will force update my local net-next_master branch, to make testing this > series easier. > Note that my local net-next_master branch has about 19 patches on top of this > series. > so, > > tkisky@office-server2:~/linux-imx6$ git reset --hard HEAD~19 > HEAD is now at a125da7 net: fec: don't set cbd_bufaddr unless no mapping error > > >> >> TCP RX performance is 602Mbps, TX is only 325Mbps, TX path has some >> performance issue in net tree. >> I will dig out it. >> >> > > > More testing is always better. Thanks > > >>> >>> Troy Kisky (16): >>> net: fec: only check queue 0 if RXF_0/TXF_0 interrupt is set >>> net: fec: remove unused interrupt FEC_ENET_TS_TIMER >>> net: fec: return IRQ_HANDLED if fec_ptp_check_pps_event handled it >>> net: fec: pass rxq/txq to fec_enet_rx/tx_queue instead of queue_id >>> net: fec: reduce interrupts >>> net: fec: split off napi routine with 3 queues >>> net: fec: don't clear all rx queue bits when just one is being checked >>> net: fec: set cbd_sc without relying on previous value >>> net: fec: eliminate calls to fec_enet_get_prevdesc >>> net: fec: move restart test for efficiency >>> net: fec: clear cbd_sc after transmission to help with debugging >>> net: fec: dump all tx queues in fec_dump >>> net: fec: detect tx int lost >>> net: fec: create subroutine reset_tx_queue >>> net: fec: call dma_unmap_single on mapped tx buffers at restart >>> net: fec: don't set cbd_bufaddr unless no mapping error >>> >>> drivers/net/ethernet/freescale/fec.h | 10 +- >>> drivers/net/ethernet/freescale/fec_main.c | 410 >>> >>> -- >>> 2 files changed, 218 insertions(+), 202 deletions(-) >>> >>> -- >>> 2.5.0 >>
Re: [PATCH net-next V3 00/16] net: fec: cleanup and fixes
On 4/6/2016 1:51 AM, Fugang Duan wrote: > From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Wednesday, April 06, > 2016 10:26 AM >> To: netdev@vger.kernel.org; da...@davemloft.net; Fugang Duan >> <fugang.d...@nxp.com>; lzn...@gmail.com >> Cc: Fabio Estevam <fabio.este...@nxp.com>; l.st...@pengutronix.de; >> and...@lunn.ch; trem...@gmail.com; g...@uclinux.org; linux-arm- >> ker...@lists.infradead.org; johan...@sipsolutions.net; >> stillcompil...@gmail.com; sergei.shtyl...@cogentembedded.com; >> a...@arndb.de; Troy Kisky <troy.ki...@boundarydevices.com> >> Subject: [PATCH net-next V3 00/16] net: fec: cleanup and fixes >> >> V3 has >> >> 1 dropped patch "net: fec: print more debug info in fec_timeout" >> 2 new patches >> 0002-net-fec-remove-unused-interrupt-FEC_ENET_TS_TIMER.patch >> 0003-net-fec-return-IRQ_HANDLED-if-fec_ptp_check_pps_even.patch >> >> 1 combined patch >> 0004-net-fec-pass-rxq-txq-to-fec_enet_rx-tx_queue-instead.patch >> >> The changes are noted on individual patches >> >> My measured performance of this series is >> >> before patch set >> 365 Mbits/sec Tx/407 RX >> >> after patch set >> 374 Tx/427 Rx >> > > I doubt the performance data, I validate it on i.MX6q sabresd board on the > latest commit(4da46cebbd3b) in net tree. I was doing UDP tests, as outlined in my V2 cover letter. Also, my cpu is 1G. Is yours 1.2G? > root@imx6qdlsolo:~# uname -a > Linux imx6qdlsolo 4.6.0-rc1-00318-g4da46ce #180 SMP Wed Apr 6 16:24:09 CST > 2016 armv7l GNU/Linux This is the V2 patch that I dropped. I will force update my local net-next_master branch, to make testing this series easier. Note that my local net-next_master branch has about 19 patches on top of this series. so, tkisky@office-server2:~/linux-imx6$ git reset --hard HEAD~19 HEAD is now at a125da7 net: fec: don't set cbd_bufaddr unless no mapping error > > TCP RX performance is 602Mbps, TX is only 325Mbps, TX path has some > performance issue in net tree. > I will dig out it. > > More testing is always better. Thanks >> >> Troy Kisky (16): >> net: fec: only check queue 0 if RXF_0/TXF_0 interrupt is set >> net: fec: remove unused interrupt FEC_ENET_TS_TIMER >> net: fec: return IRQ_HANDLED if fec_ptp_check_pps_event handled it >> net: fec: pass rxq/txq to fec_enet_rx/tx_queue instead of queue_id >> net: fec: reduce interrupts >> net: fec: split off napi routine with 3 queues >> net: fec: don't clear all rx queue bits when just one is being checked >> net: fec: set cbd_sc without relying on previous value >> net: fec: eliminate calls to fec_enet_get_prevdesc >> net: fec: move restart test for efficiency >> net: fec: clear cbd_sc after transmission to help with debugging >> net: fec: dump all tx queues in fec_dump >> net: fec: detect tx int lost >> net: fec: create subroutine reset_tx_queue >> net: fec: call dma_unmap_single on mapped tx buffers at restart >> net: fec: don't set cbd_bufaddr unless no mapping error >> >> drivers/net/ethernet/freescale/fec.h | 10 +- >> drivers/net/ethernet/freescale/fec_main.c | 410 >> -- >> 2 files changed, 218 insertions(+), 202 deletions(-) >> >> -- >> 2.5.0 >
RE: [PATCH net-next V3 00/16] net: fec: cleanup and fixes
From: Troy Kisky <troy.ki...@boundarydevices.com> Sent: Wednesday, April 06, 2016 10:26 AM > To: netdev@vger.kernel.org; da...@davemloft.net; Fugang Duan > <fugang.d...@nxp.com>; lzn...@gmail.com > Cc: Fabio Estevam <fabio.este...@nxp.com>; l.st...@pengutronix.de; > and...@lunn.ch; trem...@gmail.com; g...@uclinux.org; linux-arm- > ker...@lists.infradead.org; johan...@sipsolutions.net; > stillcompil...@gmail.com; sergei.shtyl...@cogentembedded.com; > a...@arndb.de; Troy Kisky <troy.ki...@boundarydevices.com> > Subject: [PATCH net-next V3 00/16] net: fec: cleanup and fixes > > V3 has > > 1 dropped patch "net: fec: print more debug info in fec_timeout" > 2 new patches > 0002-net-fec-remove-unused-interrupt-FEC_ENET_TS_TIMER.patch > 0003-net-fec-return-IRQ_HANDLED-if-fec_ptp_check_pps_even.patch > > 1 combined patch > 0004-net-fec-pass-rxq-txq-to-fec_enet_rx-tx_queue-instead.patch > > The changes are noted on individual patches > > My measured performance of this series is > > before patch set > 365 Mbits/sec Tx/407 RX > > after patch set > 374 Tx/427 Rx > I doubt the performance data, I validate it on i.MX6q sabresd board on the latest commit(4da46cebbd3b) in net tree. The test log as below: root@imx6qdlsolo:~# uname -a Linux imx6qdlsolo 4.6.0-rc1-00318-g4da46ce #180 SMP Wed Apr 6 16:24:09 CST 2016 armv7l GNU/Linux root@imx6qdlsolo:~# cat /sys/devices/soc0/soc_id i.MX6Q root@imx6qdlsolo:~# echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor root@imx6qdlsolo:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq 996000 root@imx6qdlsolo:~# iperf -s & [1] 891 root@imx6qdlsolo:~# Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) root@imx6qdlsolo:~# [ 4] local 10.192.242.107 port 5001 connected with 10.192.242.248 port 38409 [ ID] Interval Transfer Bandwidth [ 4] 0.0-20.0 sec 1.40 GBytes 602 Mbits/sec root@imx6qdlsolo:~# iperf -c 10.192.242.248 -t 20 Client connecting to 10.192.242.248, TCP port 5001 TCP window size: 43.8 KByte (default) [ 3] local 10.192.242.107 port 52124 connected with 10.192.242.248 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-20.0 sec 776 MBytes 325 Mbits/sec TCP RX performance is 602Mbps, TX is only 325Mbps, TX path has some performance issue in net tree. I will dig out it. > > Troy Kisky (16): > net: fec: only check queue 0 if RXF_0/TXF_0 interrupt is set > net: fec: remove unused interrupt FEC_ENET_TS_TIMER > net: fec: return IRQ_HANDLED if fec_ptp_check_pps_event handled it > net: fec: pass rxq/txq to fec_enet_rx/tx_queue instead of queue_id > net: fec: reduce interrupts > net: fec: split off napi routine with 3 queues > net: fec: don't clear all rx queue bits when just one is being checked > net: fec: set cbd_sc without relying on previous value > net: fec: eliminate calls to fec_enet_get_prevdesc > net: fec: move restart test for efficiency > net: fec: clear cbd_sc after transmission to help with debugging > net: fec: dump all tx queues in fec_dump > net: fec: detect tx int lost > net: fec: create subroutine reset_tx_queue > net: fec: call dma_unmap_single on mapped tx buffers at restart > net: fec: don't set cbd_bufaddr unless no mapping error > > drivers/net/ethernet/freescale/fec.h | 10 +- > drivers/net/ethernet/freescale/fec_main.c | 410 > -- > 2 files changed, 218 insertions(+), 202 deletions(-) > > -- > 2.5.0
[PATCH net-next V3 00/16] net: fec: cleanup and fixes
V3 has 1 dropped patch "net: fec: print more debug info in fec_timeout" 2 new patches 0002-net-fec-remove-unused-interrupt-FEC_ENET_TS_TIMER.patch 0003-net-fec-return-IRQ_HANDLED-if-fec_ptp_check_pps_even.patch 1 combined patch 0004-net-fec-pass-rxq-txq-to-fec_enet_rx-tx_queue-instead.patch The changes are noted on individual patches My measured performance of this series is before patch set 365 Mbits/sec Tx/407 RX after patch set 374 Tx/427 Rx Troy Kisky (16): net: fec: only check queue 0 if RXF_0/TXF_0 interrupt is set net: fec: remove unused interrupt FEC_ENET_TS_TIMER net: fec: return IRQ_HANDLED if fec_ptp_check_pps_event handled it net: fec: pass rxq/txq to fec_enet_rx/tx_queue instead of queue_id net: fec: reduce interrupts net: fec: split off napi routine with 3 queues net: fec: don't clear all rx queue bits when just one is being checked net: fec: set cbd_sc without relying on previous value net: fec: eliminate calls to fec_enet_get_prevdesc net: fec: move restart test for efficiency net: fec: clear cbd_sc after transmission to help with debugging net: fec: dump all tx queues in fec_dump net: fec: detect tx int lost net: fec: create subroutine reset_tx_queue net: fec: call dma_unmap_single on mapped tx buffers at restart net: fec: don't set cbd_bufaddr unless no mapping error drivers/net/ethernet/freescale/fec.h | 10 +- drivers/net/ethernet/freescale/fec_main.c | 410 -- 2 files changed, 218 insertions(+), 202 deletions(-) -- 2.5.0