mbox series

[V2,net-next,0/2] net: fec: fix TX bandwidth fluctuations

Message ID 20210611095005.3909-1-qiangqing.zhang@nxp.com (mailing list archive)
Headers show
Series net: fec: fix TX bandwidth fluctuations | expand

Message

Joakim Zhang June 11, 2021, 9:50 a.m. UTC
This patch set intends to fix TX bandwidth fluctuations, any feedback would be appreciated.

---
ChangeLogs:
	V1: remove RFC tag, RFC discussions please turn to below:
	    https://lore.kernel.org/lkml/YK0Ce5YxR2WYbrAo@lunn.ch/T/
	V2: change functions to be static in this patch set. And add the
	t-b tag.

Fugang Duan (1):
  net: fec: add ndo_select_queue to fix TX bandwidth fluctuations

Joakim Zhang (1):
  net: fec: add FEC_QUIRK_HAS_MULTI_QUEUES represents i.MX6SX ENET IP

 drivers/net/ethernet/freescale/fec.h      |  5 +++
 drivers/net/ethernet/freescale/fec_main.c | 43 ++++++++++++++++++++---
 2 files changed, 43 insertions(+), 5 deletions(-)

Comments

David Miller June 11, 2021, 8:25 p.m. UTC | #1
From: Joakim Zhang <qiangqing.zhang@nxp.com>
Date: Fri, 11 Jun 2021 17:50:03 +0800

> This patch set intends to fix TX bandwidth fluctuations, any feedback would be appreciated.
> 
> ---
> ChangeLogs:
> 	V1: remove RFC tag, RFC discussions please turn to below:
> 	    https://lore.kernel.org/lkml/YK0Ce5YxR2WYbrAo@lunn.ch/T/
> 	V2: change functions to be static in this patch set. And add the
> 	t-b tag.

Please fix these warnings in patch #2:

https://patchwork.hopto.org/static/nipa/498729/12315211/build_allmodconfig_warn/summary

Thank you.
Joakim Zhang June 15, 2021, 6:46 a.m. UTC | #2
Hi David,

> -----Original Message-----
> From: David Miller <davem@davemloft.net>
> Sent: 2021年6月12日 4:25
> To: Joakim Zhang <qiangqing.zhang@nxp.com>
> Cc: kuba@kernel.org; frieder.schrempf@kontron.de; andrew@lunn.ch;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH V2 net-next 0/2] net: fec: fix TX bandwidth fluctuations
> 
> From: Joakim Zhang <qiangqing.zhang@nxp.com>
> Date: Fri, 11 Jun 2021 17:50:03 +0800
> 
> > This patch set intends to fix TX bandwidth fluctuations, any feedback would
> be appreciated.
> >
> > ---
> > ChangeLogs:
> > 	V1: remove RFC tag, RFC discussions please turn to below:
> >
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.ker
> nel.org%2Flkml%2FYK0Ce5YxR2WYbrAo%40lunn.ch%2FT%2F&amp;data=04%7
> C01%7Cqiangqing.zhang%40nxp.com%7C45b786c85a294b3ea9ec08d92d1709
> 0c%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637590399225645
> 759%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzI
> iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=CFeL4rNWqNs4Xc
> 2NqtBiQxex4%2FXAUhEXWQreftFhnY4%3D&amp;reserved=0
> > 	V2: change functions to be static in this patch set. And add the
> > 	t-b tag.
> 
> Please fix these warnings in patch #2:
> 
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchw
> ork.hopto.org%2Fstatic%2Fnipa%2F498729%2F12315211%2Fbuild_allmodconfi
> g_warn%2Fsummary&amp;data=04%7C01%7Cqiangqing.zhang%40nxp.com%
> 7C45b786c85a294b3ea9ec08d92d17090c%7C686ea1d3bc2b4c6fa92cd99c5c30
> 1635%7C0%7C0%7C637590399225645759%7CUnknown%7CTWFpbGZsb3d8ey
> JWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%
> 7C1000&amp;sdata=eb4Ujx2FKOnu5M41j1RnPLCBoEoGfQiCO%2BO5MzIsXyE
> %3D&amp;reserved=0

I can't reproduce these warnings with " make ARCH=arm64 allmodconfig", could you please show me the command you used? Thanks.

Best Regards,
Joakim Zhang
> Thank you.
Andrew Lunn June 15, 2021, 12:27 p.m. UTC | #3
> I can't reproduce these warnings with " make ARCH=arm64 allmodconfig", could you please show me the command you used? Thanks.

Try adding W=1

    Andrew
Joakim Zhang June 16, 2021, 8:28 a.m. UTC | #4
Hi Andrew, David,

> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: 2021年6月15日 20:28
> To: Joakim Zhang <qiangqing.zhang@nxp.com>
> Cc: David Miller <davem@davemloft.net>; kuba@kernel.org;
> frieder.schrempf@kontron.de; netdev@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH V2 net-next 0/2] net: fec: fix TX bandwidth fluctuations
> 
> > I can't reproduce these warnings with " make ARCH=arm64 allmodconfig",
> could you please show me the command you used? Thanks.
> 
> Try adding W=1

Thanks.

I try below build options, also can't reproduce this issue, so really don't know how to fix it.

make ARCH=arm64 distclean
make ARCH=arm64 allmodconfig
make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=1 / make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=2 / make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=3

I saw many unrelated warnings...

Best Regards,
Joakim Zhang
>     Andrew
Andrew Lunn June 16, 2021, 1:06 p.m. UTC | #5
> I try below build options, also can't reproduce this issue, so really don't know how to fix it.
> 
> make ARCH=arm64 distclean
> make ARCH=arm64 allmodconfig
> make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=1 / make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=2 / make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=3
> 
> I saw many unrelated warnings...

Then it could be sparse. Install sparse and use C=1.

     Andrew
Joakim Zhang June 17, 2021, 11:40 a.m. UTC | #6
Hi Andrew,

> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: 2021年6月16日 21:06
> To: Joakim Zhang <qiangqing.zhang@nxp.com>
> Cc: David Miller <davem@davemloft.net>; kuba@kernel.org;
> frieder.schrempf@kontron.de; netdev@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH V2 net-next 0/2] net: fec: fix TX bandwidth fluctuations
> 
> > I try below build options, also can't reproduce this issue, so really don't know
> how to fix it.
> >
> > make ARCH=arm64 distclean
> > make ARCH=arm64 allmodconfig
> > make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=1 / make -j8
> ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=2 / make -j8
> ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=3
> >
> > I saw many unrelated warnings...
> 
> Then it could be sparse. Install sparse and use C=1.

After applying the patch #2, I tried to use C=1 yesterday, I double check it today, still no warnings. Anything I missing?

$ make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=1,C=1
  CALL    scripts/atomic/check-atomics.sh
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CHK     kernel/kheaders_data.tar.xz
  CC [M]  drivers/net/ethernet/freescale/fec_main.o
  LD [M]  drivers/net/ethernet/freescale/fec.o
  MODPOST modules-only.symvers
  GEN     Module.symvers
  CC [M]  drivers/net/ethernet/freescale/fec.mod.o
  LD [M]  drivers/net/ethernet/freescale/fec.ko

Best Regards,
Joakim Zhang
>      Andrew
Andrew Lunn June 17, 2021, 1:04 p.m. UTC | #7
On Thu, Jun 17, 2021 at 11:40:58AM +0000, Joakim Zhang wrote:
> 
> Hi Andrew,
> 
> > -----Original Message-----
> > From: Andrew Lunn <andrew@lunn.ch>
> > Sent: 2021年6月16日 21:06
> > To: Joakim Zhang <qiangqing.zhang@nxp.com>
> > Cc: David Miller <davem@davemloft.net>; kuba@kernel.org;
> > frieder.schrempf@kontron.de; netdev@vger.kernel.org;
> > linux-kernel@vger.kernel.org
> > Subject: Re: [PATCH V2 net-next 0/2] net: fec: fix TX bandwidth fluctuations
> > 
> > > I try below build options, also can't reproduce this issue, so really don't know
> > how to fix it.
> > >
> > > make ARCH=arm64 distclean
> > > make ARCH=arm64 allmodconfig
> > > make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=1 / make -j8
> > ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=2 / make -j8
> > ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=3
> > >
> > > I saw many unrelated warnings...
> > 
> > Then it could be sparse. Install sparse and use C=1.
> 
> After applying the patch #2, I tried to use C=1 yesterday, I double check it today, still no warnings. Anything I missing?
> 
> $ make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=1,C=1
>   CALL    scripts/atomic/check-atomics.sh
>   CALL    scripts/checksyscalls.sh
>   CHK     include/generated/compile.h
>   CHK     kernel/kheaders_data.tar.xz
>   CC [M]  drivers/net/ethernet/freescale/fec_main.o
>   LD [M]  drivers/net/ethernet/freescale/fec.o
>   MODPOST modules-only.symvers
>   GEN     Module.symvers
>   CC [M]  drivers/net/ethernet/freescale/fec.mod.o
>   LD [M]  drivers/net/ethernet/freescale/fec.ko
> 
> Best Regards,
> Joakim Zhang
> >      Andrew


If you look at
https://patchwork.hopto.org/static/nipa/498729/12315211/build_32bit/stdout

you see:

Kernel: arch/x86/boot/bzImage is ready  (#9396)

So it is building for 32 bit x86. So try

make -j8 ARCH=i386 W=1 C=1

Assuming your host is an x86 machine.

	 Andrew
Joakim Zhang June 18, 2021, 8:11 a.m. UTC | #8
Hi Andrew,

> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: 2021年6月17日 21:04
> To: Joakim Zhang <qiangqing.zhang@nxp.com>
> Cc: David Miller <davem@davemloft.net>; kuba@kernel.org;
> frieder.schrempf@kontron.de; netdev@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH V2 net-next 0/2] net: fec: fix TX bandwidth fluctuations
> 
> On Thu, Jun 17, 2021 at 11:40:58AM +0000, Joakim Zhang wrote:
> >
> > Hi Andrew,
> >
> > > -----Original Message-----
> > > From: Andrew Lunn <andrew@lunn.ch>
> > > Sent: 2021年6月16日 21:06
> > > To: Joakim Zhang <qiangqing.zhang@nxp.com>
> > > Cc: David Miller <davem@davemloft.net>; kuba@kernel.org;
> > > frieder.schrempf@kontron.de; netdev@vger.kernel.org;
> > > linux-kernel@vger.kernel.org
> > > Subject: Re: [PATCH V2 net-next 0/2] net: fec: fix TX bandwidth
> > > fluctuations
> > >
> > > > I try below build options, also can't reproduce this issue, so
> > > > really don't know
> > > how to fix it.
> > > >
> > > > make ARCH=arm64 distclean
> > > > make ARCH=arm64 allmodconfig
> > > > make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=1 / make
> > > > -j8
> > > ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=2 / make -j8
> > > ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=3
> > > >
> > > > I saw many unrelated warnings...
> > >
> > > Then it could be sparse. Install sparse and use C=1.
> >
> > After applying the patch #2, I tried to use C=1 yesterday, I double check it
> today, still no warnings. Anything I missing?
> >
> > $ make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- W=1,C=1
> >   CALL    scripts/atomic/check-atomics.sh
> >   CALL    scripts/checksyscalls.sh
> >   CHK     include/generated/compile.h
> >   CHK     kernel/kheaders_data.tar.xz
> >   CC [M]  drivers/net/ethernet/freescale/fec_main.o
> >   LD [M]  drivers/net/ethernet/freescale/fec.o
> >   MODPOST modules-only.symvers
> >   GEN     Module.symvers
> >   CC [M]  drivers/net/ethernet/freescale/fec.mod.o
> >   LD [M]  drivers/net/ethernet/freescale/fec.ko
> >
> > Best Regards,
> > Joakim Zhang
> > >      Andrew
> 
> 
> If you look at
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchw
> ork.hopto.org%2Fstatic%2Fnipa%2F498729%2F12315211%2Fbuild_32bit%2Fst
> dout&amp;data=04%7C01%7Cqiangqing.zhang%40nxp.com%7Ce966882aff15
> 41ed54c108d931906ad2%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0
> %7C637595318610458379%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> wMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;s
> data=0o34i6pkvqBN1hPApz5Ja8CHjtqn8iwQB8whxg0p8Rw%3D&amp;reserved
> =0
> 
> you see:
> 
> Kernel: arch/x86/boot/bzImage is ready  (#9396)
> 
> So it is building for 32 bit x86. So try
> 
> make -j8 ARCH=i386 W=1 C=1
> 
> Assuming your host is an x86 machine.

Much thanks.

$ git am 0002-net-fec-add-ndo_select_queue-to-fix-TX-bandwidth-flu.patch
Applying: net: fec: add ndo_select_queue to fix TX bandwidth fluctuations
$ make -j8 ARCH=i386 W=1,C=1
  CALL    scripts/atomic/check-atomics.sh
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CHK     kernel/kheaders_data.tar.xz
  CC [M]  drivers/net/ethernet/freescale/fec_main.o
  LD [M]  drivers/net/ethernet/freescale/fec.o
  MODPOST modules-only.symvers
Kernel: arch/x86/boot/bzImage is ready  (#1)
  GEN     Module.symvers
  CC [M]  drivers/net/ethernet/freescale/fec.mod.o
  LD [M]  drivers/net/ethernet/freescale/fec.ko

Unfortunately, I still can't see warnings after changing to build x86 image, a strange phenomenon, "W=1 C=1" seems not work, "W=1,C=1" can work.
I also save all of the build logs to double check, there is no build warnings related to FEC driver. 

Best Regards,
Joakim Zhang
> 	 Andrew