Re: [PATCH RESEND net-next 1/2] dpaa2-eth: send a scatter-gather FD instead of realloc-ing

2020-12-12 Thread Ioana Ciornei
On Sat, Dec 12, 2020 at 04:58:56PM +0100, Jon Nettleton wrote:
> On Fri, Dec 11, 2020 at 5:56 PM Ioana Ciornei  wrote:
> >
> > On Fri, Dec 11, 2020 at 04:29:14PM +, Daniel Thompson wrote:
> > > On Fri, Dec 11, 2020 at 02:01:28PM +, Ioana Ciornei wrote:
> > > > On Thu, Dec 10, 2020 at 08:06:36PM +0200, Ioana Ciornei wrote:
> > > > > [Added also the netdev mailing list, I haven't heard of linux-netdev
> > > > > before but kept it]
> > > > >
> > > > > On Thu, Dec 10, 2020 at 05:31:56PM +, Daniel Thompson wrote:
> > > > > > Hi Ioana
> > > > >
> > > > > Hi Daniel,
> > > > >
> > > > > >
> > > > > > On Mon, Jun 29, 2020 at 06:47:11PM +, Ioana Ciornei wrote:
> > > > > > > Instead of realloc-ing the skb on the Tx path when the provided 
> > > > > > > headroom
> > > > > > > is smaller than the HW requirements, create a Scatter/Gather frame
> > > > > > > descriptor with only one entry.
> > > > > > >
> > > > > > > Remove the '[drv] tx realloc frames' counter exposed previously 
> > > > > > > through
> > > > > > > ethtool since it is no longer used.
> > > > > > >
> > > > > > > Signed-off-by: Ioana Ciornei 
> > > > > > > ---
> > > > > >
> > > > > > I've been chasing down a networking regression on my LX2160A board
> > > > > > (Honeycomb LX2K based on CEx7 LX2160A COM) that first appeared in 
> > > > > > v5.9.
> > > > > >
> > > > > > It makes the board unreliable opening outbound connections meaning
> > > > > > things like `apt update` or `git fetch` often can't open the 
> > > > > > connection.
> > > > > > It does not happen all the time but is sufficient to make the boards
> > > > > > built-in networking useless for workstation use.
> > > > > >
> > > > > > The problem is strongly linked to warnings in the logs so I used the
> > > > > > warnings to bisect down to locate the cause of the regression and it
> > > > > > pinpointed this patch. I have confirmed that in both v5.9 and 
> > > > > > v5.10-rc7
> > > > > > that reverting this patch (and fixing up the merge issues) fixes the
> > > > > > regression and the warnings stop appearing.
> > > > > >
> > > > > > A typical example of the warning is below (io-pgtable-arm.c:281 is 
> > > > > > an
> > > > > > error path that I guess would cause dma_map_page_attrs() to return
> > > > > > an error):
> > > > > >
> > > > > > [  714.464927] WARNING: CPU: 13 PID: 0 at
> > > > > > drivers/iommu/io-pgtable-arm.c:281 __arm_lpae_map+0x2d4/0x30c
> > > > > > [  714.464930] Modules linked in: snd_seq_dummy(E) snd_hrtimer(E)
> > > > > > snd_seq(E) snd_seq_device(E) snd_timer(E) snd(E) soundcore(E) 
> > > > > > bridge(E)
> > > > > > stp(E) llc(E) rfkill(E) caam_jr(E) crypto_engine(E) rng_core(E)
> > > > > > joydev(E) evdev(E) dpaa2_caam(E) caamhash_desc(E) caamalg_desc(E)
> > > > > > authenc(E) libdes(E) dpaa2_console(E) ofpart(E) caam(E) sg(E) 
> > > > > > error(E)
> > > > > > lm90(E) at24(E) spi_nor(E) mtd(E) sbsa_gwdt(E) qoriq_thermal(E)
> > > > > > layerscape_edac_mod(E) qoriq_cpufreq(E) drm(E) fuse(E) configfs(E)
> > > > > > ip_tables(E) x_tables(E) autofs4(E) ext4(E) crc32c_generic(E) 
> > > > > > crc16(E)
> > > > > > mbcache(E) jbd2(E) hid_generic(E) usbhid(E) hid(E) dm_crypt(E) 
> > > > > > dm_mod(E)
> > > > > > sd_mod(E) fsl_dpaa2_ptp(E) ptp_qoriq(E) fsl_dpaa2_eth(E)
> > > > > > xhci_plat_hcd(E) xhci_hcd(E) usbcore(E) aes_ce_blk(E) crypto_simd(E)
> > > > > > cryptd(E) aes_ce_cipher(E) ghash_ce(E) gf128mul(E) at803x(E) 
> > > > > > libaes(E)
> > > > > > fsl_mc_dpio(E) pcs_lynx(E) rtc_pcf2127(E) sha2_ce(E) phylink(E)
> > > > > > xgmac_mdio(E) regmap_spi(E) of_mdio(E) sha256_arm64(E)
> > > > > > i2c_mux_pca954x(E) fixed_phy(E) i2c_mux(E) sha1_ce(E) ptp(E) 
> > > > > > libphy(E)
> > > > > > [  714.465131]  pps_core(E) ahci_qoriq(E) libahci_platform(E) 
> > > > > > nvme(E)
> > > > > > libahci(E) nvme_core(E) t10_pi(E) libata(E) crc_t10dif(E)
> > > > > > crct10dif_generic(E) crct10dif_common(E) dwc3(E) scsi_mod(E) 
> > > > > > udc_core(E)
> > > > > > roles(E) ulpi(E) sdhci_of_esdhc(E) sdhci_pltfm(E) sdhci(E)
> > > > > > spi_nxp_fspi(E) i2c_imx(E) fixed(E)
> > > > > > [  714.465192] CPU: 13 PID: 0 Comm: swapper/13 Tainted: GW  
> > > > > >  E
> > > > > > 5.10.0-rc7-1-gba98d13279ca #52
> > > > > > [  714.465196] Hardware name: SolidRun LX2160A Honeycomb (DT)
> > > > > > [  714.465202] pstate: 6005 (nZCv daif -PAN -UAO -TCO BTYPE=--)
> > > > > > [  714.465207] pc : __arm_lpae_map+0x2d4/0x30c
> > > > > > [  714.465211] lr : __arm_lpae_map+0x114/0x30c
> > > > > > [  714.465215] sp : 80001006b340
> > > > > > [  714.465219] x29: 80001006b340 x28: 002086538003
> > > > > > [  714.465227] x27: 0a20 x26: 1000
> > > > > > [  714.465236] x25: 0f44 x24: 0020adf8d000
> > > > > > [  714.465245] x23: 0001 x22: faeca000
> > > > > > [  714.465253] x21: 0003 x20: 19b60d64d200
> > > > > > [  714.465261] x19: 00ca x18: 
> > > > > > [  714.465270] x17: 000

Re: [PATCH RESEND net-next 1/2] dpaa2-eth: send a scatter-gather FD instead of realloc-ing

2020-12-12 Thread Jon Nettleton
On Fri, Dec 11, 2020 at 5:56 PM Ioana Ciornei  wrote:
>
> On Fri, Dec 11, 2020 at 04:29:14PM +, Daniel Thompson wrote:
> > On Fri, Dec 11, 2020 at 02:01:28PM +, Ioana Ciornei wrote:
> > > On Thu, Dec 10, 2020 at 08:06:36PM +0200, Ioana Ciornei wrote:
> > > > [Added also the netdev mailing list, I haven't heard of linux-netdev
> > > > before but kept it]
> > > >
> > > > On Thu, Dec 10, 2020 at 05:31:56PM +, Daniel Thompson wrote:
> > > > > Hi Ioana
> > > >
> > > > Hi Daniel,
> > > >
> > > > >
> > > > > On Mon, Jun 29, 2020 at 06:47:11PM +, Ioana Ciornei wrote:
> > > > > > Instead of realloc-ing the skb on the Tx path when the provided 
> > > > > > headroom
> > > > > > is smaller than the HW requirements, create a Scatter/Gather frame
> > > > > > descriptor with only one entry.
> > > > > >
> > > > > > Remove the '[drv] tx realloc frames' counter exposed previously 
> > > > > > through
> > > > > > ethtool since it is no longer used.
> > > > > >
> > > > > > Signed-off-by: Ioana Ciornei 
> > > > > > ---
> > > > >
> > > > > I've been chasing down a networking regression on my LX2160A board
> > > > > (Honeycomb LX2K based on CEx7 LX2160A COM) that first appeared in 
> > > > > v5.9.
> > > > >
> > > > > It makes the board unreliable opening outbound connections meaning
> > > > > things like `apt update` or `git fetch` often can't open the 
> > > > > connection.
> > > > > It does not happen all the time but is sufficient to make the boards
> > > > > built-in networking useless for workstation use.
> > > > >
> > > > > The problem is strongly linked to warnings in the logs so I used the
> > > > > warnings to bisect down to locate the cause of the regression and it
> > > > > pinpointed this patch. I have confirmed that in both v5.9 and 
> > > > > v5.10-rc7
> > > > > that reverting this patch (and fixing up the merge issues) fixes the
> > > > > regression and the warnings stop appearing.
> > > > >
> > > > > A typical example of the warning is below (io-pgtable-arm.c:281 is an
> > > > > error path that I guess would cause dma_map_page_attrs() to return
> > > > > an error):
> > > > >
> > > > > [  714.464927] WARNING: CPU: 13 PID: 0 at
> > > > > drivers/iommu/io-pgtable-arm.c:281 __arm_lpae_map+0x2d4/0x30c
> > > > > [  714.464930] Modules linked in: snd_seq_dummy(E) snd_hrtimer(E)
> > > > > snd_seq(E) snd_seq_device(E) snd_timer(E) snd(E) soundcore(E) 
> > > > > bridge(E)
> > > > > stp(E) llc(E) rfkill(E) caam_jr(E) crypto_engine(E) rng_core(E)
> > > > > joydev(E) evdev(E) dpaa2_caam(E) caamhash_desc(E) caamalg_desc(E)
> > > > > authenc(E) libdes(E) dpaa2_console(E) ofpart(E) caam(E) sg(E) error(E)
> > > > > lm90(E) at24(E) spi_nor(E) mtd(E) sbsa_gwdt(E) qoriq_thermal(E)
> > > > > layerscape_edac_mod(E) qoriq_cpufreq(E) drm(E) fuse(E) configfs(E)
> > > > > ip_tables(E) x_tables(E) autofs4(E) ext4(E) crc32c_generic(E) crc16(E)
> > > > > mbcache(E) jbd2(E) hid_generic(E) usbhid(E) hid(E) dm_crypt(E) 
> > > > > dm_mod(E)
> > > > > sd_mod(E) fsl_dpaa2_ptp(E) ptp_qoriq(E) fsl_dpaa2_eth(E)
> > > > > xhci_plat_hcd(E) xhci_hcd(E) usbcore(E) aes_ce_blk(E) crypto_simd(E)
> > > > > cryptd(E) aes_ce_cipher(E) ghash_ce(E) gf128mul(E) at803x(E) libaes(E)
> > > > > fsl_mc_dpio(E) pcs_lynx(E) rtc_pcf2127(E) sha2_ce(E) phylink(E)
> > > > > xgmac_mdio(E) regmap_spi(E) of_mdio(E) sha256_arm64(E)
> > > > > i2c_mux_pca954x(E) fixed_phy(E) i2c_mux(E) sha1_ce(E) ptp(E) libphy(E)
> > > > > [  714.465131]  pps_core(E) ahci_qoriq(E) libahci_platform(E) nvme(E)
> > > > > libahci(E) nvme_core(E) t10_pi(E) libata(E) crc_t10dif(E)
> > > > > crct10dif_generic(E) crct10dif_common(E) dwc3(E) scsi_mod(E) 
> > > > > udc_core(E)
> > > > > roles(E) ulpi(E) sdhci_of_esdhc(E) sdhci_pltfm(E) sdhci(E)
> > > > > spi_nxp_fspi(E) i2c_imx(E) fixed(E)
> > > > > [  714.465192] CPU: 13 PID: 0 Comm: swapper/13 Tainted: GW   E
> > > > > 5.10.0-rc7-1-gba98d13279ca #52
> > > > > [  714.465196] Hardware name: SolidRun LX2160A Honeycomb (DT)
> > > > > [  714.465202] pstate: 6005 (nZCv daif -PAN -UAO -TCO BTYPE=--)
> > > > > [  714.465207] pc : __arm_lpae_map+0x2d4/0x30c
> > > > > [  714.465211] lr : __arm_lpae_map+0x114/0x30c
> > > > > [  714.465215] sp : 80001006b340
> > > > > [  714.465219] x29: 80001006b340 x28: 002086538003
> > > > > [  714.465227] x27: 0a20 x26: 1000
> > > > > [  714.465236] x25: 0f44 x24: 0020adf8d000
> > > > > [  714.465245] x23: 0001 x22: faeca000
> > > > > [  714.465253] x21: 0003 x20: 19b60d64d200
> > > > > [  714.465261] x19: 00ca x18: 
> > > > > [  714.465270] x17:  x16: cccb7cf3ca20
> > > > > [  714.465278] x15:  x14: 
> > > > > [  714.465286] x13: 0003 x12: 0010
> > > > > [  714.465294] x11:  x10: 0002
> > > > > [  714.465302] x9 : cccb7d5b6e78 x8 : 01ff
> > > > > [  714.465311] x7 

Re: [PATCH RESEND net-next 1/2] dpaa2-eth: send a scatter-gather FD instead of realloc-ing

2020-12-11 Thread Ioana Ciornei
On Fri, Dec 11, 2020 at 04:29:14PM +, Daniel Thompson wrote:
> On Fri, Dec 11, 2020 at 02:01:28PM +, Ioana Ciornei wrote:
> > On Thu, Dec 10, 2020 at 08:06:36PM +0200, Ioana Ciornei wrote:
> > > [Added also the netdev mailing list, I haven't heard of linux-netdev
> > > before but kept it]
> > > 
> > > On Thu, Dec 10, 2020 at 05:31:56PM +, Daniel Thompson wrote:
> > > > Hi Ioana
> > > 
> > > Hi Daniel,
> > > 
> > > > 
> > > > On Mon, Jun 29, 2020 at 06:47:11PM +, Ioana Ciornei wrote:
> > > > > Instead of realloc-ing the skb on the Tx path when the provided 
> > > > > headroom
> > > > > is smaller than the HW requirements, create a Scatter/Gather frame
> > > > > descriptor with only one entry.
> > > > > 
> > > > > Remove the '[drv] tx realloc frames' counter exposed previously 
> > > > > through
> > > > > ethtool since it is no longer used.
> > > > > 
> > > > > Signed-off-by: Ioana Ciornei 
> > > > > ---
> > > > 
> > > > I've been chasing down a networking regression on my LX2160A board
> > > > (Honeycomb LX2K based on CEx7 LX2160A COM) that first appeared in v5.9.
> > > > 
> > > > It makes the board unreliable opening outbound connections meaning
> > > > things like `apt update` or `git fetch` often can't open the connection.
> > > > It does not happen all the time but is sufficient to make the boards
> > > > built-in networking useless for workstation use.
> > > > 
> > > > The problem is strongly linked to warnings in the logs so I used the
> > > > warnings to bisect down to locate the cause of the regression and it
> > > > pinpointed this patch. I have confirmed that in both v5.9 and v5.10-rc7
> > > > that reverting this patch (and fixing up the merge issues) fixes the
> > > > regression and the warnings stop appearing.
> > > > 
> > > > A typical example of the warning is below (io-pgtable-arm.c:281 is an
> > > > error path that I guess would cause dma_map_page_attrs() to return
> > > > an error):
> > > > 
> > > > [  714.464927] WARNING: CPU: 13 PID: 0 at
> > > > drivers/iommu/io-pgtable-arm.c:281 __arm_lpae_map+0x2d4/0x30c
> > > > [  714.464930] Modules linked in: snd_seq_dummy(E) snd_hrtimer(E)
> > > > snd_seq(E) snd_seq_device(E) snd_timer(E) snd(E) soundcore(E) bridge(E)
> > > > stp(E) llc(E) rfkill(E) caam_jr(E) crypto_engine(E) rng_core(E)
> > > > joydev(E) evdev(E) dpaa2_caam(E) caamhash_desc(E) caamalg_desc(E)
> > > > authenc(E) libdes(E) dpaa2_console(E) ofpart(E) caam(E) sg(E) error(E)
> > > > lm90(E) at24(E) spi_nor(E) mtd(E) sbsa_gwdt(E) qoriq_thermal(E)
> > > > layerscape_edac_mod(E) qoriq_cpufreq(E) drm(E) fuse(E) configfs(E)
> > > > ip_tables(E) x_tables(E) autofs4(E) ext4(E) crc32c_generic(E) crc16(E)
> > > > mbcache(E) jbd2(E) hid_generic(E) usbhid(E) hid(E) dm_crypt(E) dm_mod(E)
> > > > sd_mod(E) fsl_dpaa2_ptp(E) ptp_qoriq(E) fsl_dpaa2_eth(E)
> > > > xhci_plat_hcd(E) xhci_hcd(E) usbcore(E) aes_ce_blk(E) crypto_simd(E)
> > > > cryptd(E) aes_ce_cipher(E) ghash_ce(E) gf128mul(E) at803x(E) libaes(E)
> > > > fsl_mc_dpio(E) pcs_lynx(E) rtc_pcf2127(E) sha2_ce(E) phylink(E)
> > > > xgmac_mdio(E) regmap_spi(E) of_mdio(E) sha256_arm64(E)
> > > > i2c_mux_pca954x(E) fixed_phy(E) i2c_mux(E) sha1_ce(E) ptp(E) libphy(E)
> > > > [  714.465131]  pps_core(E) ahci_qoriq(E) libahci_platform(E) nvme(E)
> > > > libahci(E) nvme_core(E) t10_pi(E) libata(E) crc_t10dif(E)
> > > > crct10dif_generic(E) crct10dif_common(E) dwc3(E) scsi_mod(E) udc_core(E)
> > > > roles(E) ulpi(E) sdhci_of_esdhc(E) sdhci_pltfm(E) sdhci(E)
> > > > spi_nxp_fspi(E) i2c_imx(E) fixed(E)
> > > > [  714.465192] CPU: 13 PID: 0 Comm: swapper/13 Tainted: GW   E
> > > > 5.10.0-rc7-1-gba98d13279ca #52
> > > > [  714.465196] Hardware name: SolidRun LX2160A Honeycomb (DT)
> > > > [  714.465202] pstate: 6005 (nZCv daif -PAN -UAO -TCO BTYPE=--)
> > > > [  714.465207] pc : __arm_lpae_map+0x2d4/0x30c
> > > > [  714.465211] lr : __arm_lpae_map+0x114/0x30c
> > > > [  714.465215] sp : 80001006b340
> > > > [  714.465219] x29: 80001006b340 x28: 002086538003 
> > > > [  714.465227] x27: 0a20 x26: 1000 
> > > > [  714.465236] x25: 0f44 x24: 0020adf8d000 
> > > > [  714.465245] x23: 0001 x22: faeca000 
> > > > [  714.465253] x21: 0003 x20: 19b60d64d200 
> > > > [  714.465261] x19: 00ca x18:  
> > > > [  714.465270] x17:  x16: cccb7cf3ca20 
> > > > [  714.465278] x15:  x14:  
> > > > [  714.465286] x13: 0003 x12: 0010 
> > > > [  714.465294] x11:  x10: 0002 
> > > > [  714.465302] x9 : cccb7d5b6e78 x8 : 01ff 
> > > > [  714.465311] x7 : 19b606538650 x6 : 19b606538000 
> > > > [  714.465319] x5 : 0009 x4 : 0f44 
> > > > [  714.465327] x3 : 1000 x2 : 0020adf8d000 
> > > > [  714.465335] x1 : 0002 x0 : 0003 
> > > > [  714.465343]

Re: [PATCH RESEND net-next 1/2] dpaa2-eth: send a scatter-gather FD instead of realloc-ing

2020-12-11 Thread Daniel Thompson
On Fri, Dec 11, 2020 at 02:01:28PM +, Ioana Ciornei wrote:
> On Thu, Dec 10, 2020 at 08:06:36PM +0200, Ioana Ciornei wrote:
> > [Added also the netdev mailing list, I haven't heard of linux-netdev
> > before but kept it]
> > 
> > On Thu, Dec 10, 2020 at 05:31:56PM +, Daniel Thompson wrote:
> > > Hi Ioana
> > 
> > Hi Daniel,
> > 
> > > 
> > > On Mon, Jun 29, 2020 at 06:47:11PM +, Ioana Ciornei wrote:
> > > > Instead of realloc-ing the skb on the Tx path when the provided headroom
> > > > is smaller than the HW requirements, create a Scatter/Gather frame
> > > > descriptor with only one entry.
> > > > 
> > > > Remove the '[drv] tx realloc frames' counter exposed previously through
> > > > ethtool since it is no longer used.
> > > > 
> > > > Signed-off-by: Ioana Ciornei 
> > > > ---
> > > 
> > > I've been chasing down a networking regression on my LX2160A board
> > > (Honeycomb LX2K based on CEx7 LX2160A COM) that first appeared in v5.9.
> > > 
> > > It makes the board unreliable opening outbound connections meaning
> > > things like `apt update` or `git fetch` often can't open the connection.
> > > It does not happen all the time but is sufficient to make the boards
> > > built-in networking useless for workstation use.
> > > 
> > > The problem is strongly linked to warnings in the logs so I used the
> > > warnings to bisect down to locate the cause of the regression and it
> > > pinpointed this patch. I have confirmed that in both v5.9 and v5.10-rc7
> > > that reverting this patch (and fixing up the merge issues) fixes the
> > > regression and the warnings stop appearing.
> > > 
> > > A typical example of the warning is below (io-pgtable-arm.c:281 is an
> > > error path that I guess would cause dma_map_page_attrs() to return
> > > an error):
> > > 
> > > [  714.464927] WARNING: CPU: 13 PID: 0 at
> > > drivers/iommu/io-pgtable-arm.c:281 __arm_lpae_map+0x2d4/0x30c
> > > [  714.464930] Modules linked in: snd_seq_dummy(E) snd_hrtimer(E)
> > > snd_seq(E) snd_seq_device(E) snd_timer(E) snd(E) soundcore(E) bridge(E)
> > > stp(E) llc(E) rfkill(E) caam_jr(E) crypto_engine(E) rng_core(E)
> > > joydev(E) evdev(E) dpaa2_caam(E) caamhash_desc(E) caamalg_desc(E)
> > > authenc(E) libdes(E) dpaa2_console(E) ofpart(E) caam(E) sg(E) error(E)
> > > lm90(E) at24(E) spi_nor(E) mtd(E) sbsa_gwdt(E) qoriq_thermal(E)
> > > layerscape_edac_mod(E) qoriq_cpufreq(E) drm(E) fuse(E) configfs(E)
> > > ip_tables(E) x_tables(E) autofs4(E) ext4(E) crc32c_generic(E) crc16(E)
> > > mbcache(E) jbd2(E) hid_generic(E) usbhid(E) hid(E) dm_crypt(E) dm_mod(E)
> > > sd_mod(E) fsl_dpaa2_ptp(E) ptp_qoriq(E) fsl_dpaa2_eth(E)
> > > xhci_plat_hcd(E) xhci_hcd(E) usbcore(E) aes_ce_blk(E) crypto_simd(E)
> > > cryptd(E) aes_ce_cipher(E) ghash_ce(E) gf128mul(E) at803x(E) libaes(E)
> > > fsl_mc_dpio(E) pcs_lynx(E) rtc_pcf2127(E) sha2_ce(E) phylink(E)
> > > xgmac_mdio(E) regmap_spi(E) of_mdio(E) sha256_arm64(E)
> > > i2c_mux_pca954x(E) fixed_phy(E) i2c_mux(E) sha1_ce(E) ptp(E) libphy(E)
> > > [  714.465131]  pps_core(E) ahci_qoriq(E) libahci_platform(E) nvme(E)
> > > libahci(E) nvme_core(E) t10_pi(E) libata(E) crc_t10dif(E)
> > > crct10dif_generic(E) crct10dif_common(E) dwc3(E) scsi_mod(E) udc_core(E)
> > > roles(E) ulpi(E) sdhci_of_esdhc(E) sdhci_pltfm(E) sdhci(E)
> > > spi_nxp_fspi(E) i2c_imx(E) fixed(E)
> > > [  714.465192] CPU: 13 PID: 0 Comm: swapper/13 Tainted: GW   E
> > > 5.10.0-rc7-1-gba98d13279ca #52
> > > [  714.465196] Hardware name: SolidRun LX2160A Honeycomb (DT)
> > > [  714.465202] pstate: 6005 (nZCv daif -PAN -UAO -TCO BTYPE=--)
> > > [  714.465207] pc : __arm_lpae_map+0x2d4/0x30c
> > > [  714.465211] lr : __arm_lpae_map+0x114/0x30c
> > > [  714.465215] sp : 80001006b340
> > > [  714.465219] x29: 80001006b340 x28: 002086538003 
> > > [  714.465227] x27: 0a20 x26: 1000 
> > > [  714.465236] x25: 0f44 x24: 0020adf8d000 
> > > [  714.465245] x23: 0001 x22: faeca000 
> > > [  714.465253] x21: 0003 x20: 19b60d64d200 
> > > [  714.465261] x19: 00ca x18:  
> > > [  714.465270] x17:  x16: cccb7cf3ca20 
> > > [  714.465278] x15:  x14:  
> > > [  714.465286] x13: 0003 x12: 0010 
> > > [  714.465294] x11:  x10: 0002 
> > > [  714.465302] x9 : cccb7d5b6e78 x8 : 01ff 
> > > [  714.465311] x7 : 19b606538650 x6 : 19b606538000 
> > > [  714.465319] x5 : 0009 x4 : 0f44 
> > > [  714.465327] x3 : 1000 x2 : 0020adf8d000 
> > > [  714.465335] x1 : 0002 x0 : 0003 
> > > [  714.465343] Call trace:
> > > [  714.465348]  __arm_lpae_map+0x2d4/0x30c
> > > [  714.465353]  __arm_lpae_map+0x114/0x30c
> > > [  714.465357]  __arm_lpae_map+0x114/0x30c
> > > [  714.465362]  __arm_lpae_map+0x114/0x30c
> > > [  714.465366]  arm_lpae_map+0xf4/0x180
> 

Re: [PATCH RESEND net-next 1/2] dpaa2-eth: send a scatter-gather FD instead of realloc-ing

2020-12-11 Thread Ioana Ciornei
On Thu, Dec 10, 2020 at 08:06:36PM +0200, Ioana Ciornei wrote:
> [Added also the netdev mailing list, I haven't heard of linux-netdev
> before but kept it]
> 
> On Thu, Dec 10, 2020 at 05:31:56PM +, Daniel Thompson wrote:
> > Hi Ioana
> 
> Hi Daniel,
> 
> > 
> > On Mon, Jun 29, 2020 at 06:47:11PM +, Ioana Ciornei wrote:
> > > Instead of realloc-ing the skb on the Tx path when the provided headroom
> > > is smaller than the HW requirements, create a Scatter/Gather frame
> > > descriptor with only one entry.
> > > 
> > > Remove the '[drv] tx realloc frames' counter exposed previously through
> > > ethtool since it is no longer used.
> > > 
> > > Signed-off-by: Ioana Ciornei 
> > > ---
> > 
> > I've been chasing down a networking regression on my LX2160A board
> > (Honeycomb LX2K based on CEx7 LX2160A COM) that first appeared in v5.9.
> > 
> > It makes the board unreliable opening outbound connections meaning
> > things like `apt update` or `git fetch` often can't open the connection.
> > It does not happen all the time but is sufficient to make the boards
> > built-in networking useless for workstation use.
> > 
> > The problem is strongly linked to warnings in the logs so I used the
> > warnings to bisect down to locate the cause of the regression and it
> > pinpointed this patch. I have confirmed that in both v5.9 and v5.10-rc7
> > that reverting this patch (and fixing up the merge issues) fixes the
> > regression and the warnings stop appearing.
> > 
> > A typical example of the warning is below (io-pgtable-arm.c:281 is an
> > error path that I guess would cause dma_map_page_attrs() to return
> > an error):
> > 
> > [  714.464927] WARNING: CPU: 13 PID: 0 at
> > drivers/iommu/io-pgtable-arm.c:281 __arm_lpae_map+0x2d4/0x30c
> > [  714.464930] Modules linked in: snd_seq_dummy(E) snd_hrtimer(E)
> > snd_seq(E) snd_seq_device(E) snd_timer(E) snd(E) soundcore(E) bridge(E)
> > stp(E) llc(E) rfkill(E) caam_jr(E) crypto_engine(E) rng_core(E)
> > joydev(E) evdev(E) dpaa2_caam(E) caamhash_desc(E) caamalg_desc(E)
> > authenc(E) libdes(E) dpaa2_console(E) ofpart(E) caam(E) sg(E) error(E)
> > lm90(E) at24(E) spi_nor(E) mtd(E) sbsa_gwdt(E) qoriq_thermal(E)
> > layerscape_edac_mod(E) qoriq_cpufreq(E) drm(E) fuse(E) configfs(E)
> > ip_tables(E) x_tables(E) autofs4(E) ext4(E) crc32c_generic(E) crc16(E)
> > mbcache(E) jbd2(E) hid_generic(E) usbhid(E) hid(E) dm_crypt(E) dm_mod(E)
> > sd_mod(E) fsl_dpaa2_ptp(E) ptp_qoriq(E) fsl_dpaa2_eth(E)
> > xhci_plat_hcd(E) xhci_hcd(E) usbcore(E) aes_ce_blk(E) crypto_simd(E)
> > cryptd(E) aes_ce_cipher(E) ghash_ce(E) gf128mul(E) at803x(E) libaes(E)
> > fsl_mc_dpio(E) pcs_lynx(E) rtc_pcf2127(E) sha2_ce(E) phylink(E)
> > xgmac_mdio(E) regmap_spi(E) of_mdio(E) sha256_arm64(E)
> > i2c_mux_pca954x(E) fixed_phy(E) i2c_mux(E) sha1_ce(E) ptp(E) libphy(E)
> > [  714.465131]  pps_core(E) ahci_qoriq(E) libahci_platform(E) nvme(E)
> > libahci(E) nvme_core(E) t10_pi(E) libata(E) crc_t10dif(E)
> > crct10dif_generic(E) crct10dif_common(E) dwc3(E) scsi_mod(E) udc_core(E)
> > roles(E) ulpi(E) sdhci_of_esdhc(E) sdhci_pltfm(E) sdhci(E)
> > spi_nxp_fspi(E) i2c_imx(E) fixed(E)
> > [  714.465192] CPU: 13 PID: 0 Comm: swapper/13 Tainted: GW   E
> > 5.10.0-rc7-1-gba98d13279ca #52
> > [  714.465196] Hardware name: SolidRun LX2160A Honeycomb (DT)
> > [  714.465202] pstate: 6005 (nZCv daif -PAN -UAO -TCO BTYPE=--)
> > [  714.465207] pc : __arm_lpae_map+0x2d4/0x30c
> > [  714.465211] lr : __arm_lpae_map+0x114/0x30c
> > [  714.465215] sp : 80001006b340
> > [  714.465219] x29: 80001006b340 x28: 002086538003 
> > [  714.465227] x27: 0a20 x26: 1000 
> > [  714.465236] x25: 0f44 x24: 0020adf8d000 
> > [  714.465245] x23: 0001 x22: faeca000 
> > [  714.465253] x21: 0003 x20: 19b60d64d200 
> > [  714.465261] x19: 00ca x18:  
> > [  714.465270] x17:  x16: cccb7cf3ca20 
> > [  714.465278] x15:  x14:  
> > [  714.465286] x13: 0003 x12: 0010 
> > [  714.465294] x11:  x10: 0002 
> > [  714.465302] x9 : cccb7d5b6e78 x8 : 01ff 
> > [  714.465311] x7 : 19b606538650 x6 : 19b606538000 
> > [  714.465319] x5 : 0009 x4 : 0f44 
> > [  714.465327] x3 : 1000 x2 : 0020adf8d000 
> > [  714.465335] x1 : 0002 x0 : 0003 
> > [  714.465343] Call trace:
> > [  714.465348]  __arm_lpae_map+0x2d4/0x30c
> > [  714.465353]  __arm_lpae_map+0x114/0x30c
> > [  714.465357]  __arm_lpae_map+0x114/0x30c
> > [  714.465362]  __arm_lpae_map+0x114/0x30c
> > [  714.465366]  arm_lpae_map+0xf4/0x180
> > [  714.465373]  arm_smmu_map+0x4c/0xc0
> > [  714.465379]  __iommu_map+0x100/0x2bc
> > [  714.465385]  iommu_map_atomic+0x20/0x30
> > [  714.465391]  __iommu_dma_map+0xb0/0x110
> > [  714.465397]  iommu_dma_map_page+0xb8/0x120
> > [  714.4

RE: [PATCH RESEND net-next 1/2] dpaa2-eth: send a scatter-gather FD instead of realloc-ing

2020-12-11 Thread David Laight
From: Ioana Ciornei
> Sent: 11 December 2020 09:39
> 
> On Fri, Dec 11, 2020 at 09:30:43AM +, David Laight wrote:
> > From: Daniel Thompson
> > > Sent: 10 December 2020 17:32
> > >
> > > On Mon, Jun 29, 2020 at 06:47:11PM +, Ioana Ciornei wrote:
> > > > Instead of realloc-ing the skb on the Tx path when the provided headroom
> > > > is smaller than the HW requirements, create a Scatter/Gather frame
> > > > descriptor with only one entry.
> >
> > Is it worth simplifying the code by permanently allocating (and dma-mapping)
> > the extra structure for every ring entry.
> > It is (probably) only one page and 1 iommu entry.
> 
> 
> That is exactly what I was thinking. At the moment the SGT structure is
> pre-allocated but not pre-mapped.
> 
> I'll let you know how it goes.

How much does the dma-map actually cost?
For short fragments it is probably worth copying into a pre-allocated
pre-mapped transmit buffer area.
You'd want to do aligned full-word copies and use separate cache lines
for each frame.
It does make tx setup more error prone - since you need the space in
the tx buffer area as well as in the tx ring.

For one OS (not sun's) on a sparc mbus+sbus system one of my colleagues
measured a cutoff point of about 1k.

The copy to tx buffer path also helps with the pathological skb that
are 1500 bytes in 1 byte fragments.
(Maybe skb can't get that bad, but I've seen that on other OS.)

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, 
UK
Registration No: 1397386 (Wales)



Re: [PATCH RESEND net-next 1/2] dpaa2-eth: send a scatter-gather FD instead of realloc-ing

2020-12-11 Thread Ioana Ciornei
On Fri, Dec 11, 2020 at 09:30:43AM +, David Laight wrote:
> From: Daniel Thompson
> > Sent: 10 December 2020 17:32
> > 
> > On Mon, Jun 29, 2020 at 06:47:11PM +, Ioana Ciornei wrote:
> > > Instead of realloc-ing the skb on the Tx path when the provided headroom
> > > is smaller than the HW requirements, create a Scatter/Gather frame
> > > descriptor with only one entry.
> 
> Is it worth simplifying the code by permanently allocating (and dma-mapping)
> the extra structure for every ring entry.
> It is (probably) only one page and 1 iommu entry.


That is exactly what I was thinking. At the moment the SGT structure is
pre-allocated but not pre-mapped.

I'll let you know how it goes.

Ioana

RE: [PATCH RESEND net-next 1/2] dpaa2-eth: send a scatter-gather FD instead of realloc-ing

2020-12-11 Thread David Laight
From: Daniel Thompson
> Sent: 10 December 2020 17:32
> 
> On Mon, Jun 29, 2020 at 06:47:11PM +, Ioana Ciornei wrote:
> > Instead of realloc-ing the skb on the Tx path when the provided headroom
> > is smaller than the HW requirements, create a Scatter/Gather frame
> > descriptor with only one entry.

Is it worth simplifying the code by permanently allocating (and dma-mapping)
the extra structure for every ring entry.
It is (probably) only one page and 1 iommu entry.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, 
UK
Registration No: 1397386 (Wales)



Re: [PATCH RESEND net-next 1/2] dpaa2-eth: send a scatter-gather FD instead of realloc-ing

2020-12-10 Thread Jon Nettleton
On Thu, Dec 10, 2020 at 7:08 PM Ioana Ciornei  wrote:
>
> [Added also the netdev mailing list, I haven't heard of linux-netdev
> before but kept it]
>
> On Thu, Dec 10, 2020 at 05:31:56PM +, Daniel Thompson wrote:
> > Hi Ioana
>
> Hi Daniel,
>
> >
> > On Mon, Jun 29, 2020 at 06:47:11PM +, Ioana Ciornei wrote:
> > > Instead of realloc-ing the skb on the Tx path when the provided headroom
> > > is smaller than the HW requirements, create a Scatter/Gather frame
> > > descriptor with only one entry.
> > >
> > > Remove the '[drv] tx realloc frames' counter exposed previously through
> > > ethtool since it is no longer used.
> > >
> > > Signed-off-by: Ioana Ciornei 
> > > ---
> >
> > I've been chasing down a networking regression on my LX2160A board
> > (Honeycomb LX2K based on CEx7 LX2160A COM) that first appeared in v5.9.
> >
> > It makes the board unreliable opening outbound connections meaning
> > things like `apt update` or `git fetch` often can't open the connection.
> > It does not happen all the time but is sufficient to make the boards
> > built-in networking useless for workstation use.
> >
> > The problem is strongly linked to warnings in the logs so I used the
> > warnings to bisect down to locate the cause of the regression and it
> > pinpointed this patch. I have confirmed that in both v5.9 and v5.10-rc7
> > that reverting this patch (and fixing up the merge issues) fixes the
> > regression and the warnings stop appearing.
> >
> > A typical example of the warning is below (io-pgtable-arm.c:281 is an
> > error path that I guess would cause dma_map_page_attrs() to return
> > an error):
> >
> > [  714.464927] WARNING: CPU: 13 PID: 0 at
> > drivers/iommu/io-pgtable-arm.c:281 __arm_lpae_map+0x2d4/0x30c
> > [  714.464930] Modules linked in: snd_seq_dummy(E) snd_hrtimer(E)
> > snd_seq(E) snd_seq_device(E) snd_timer(E) snd(E) soundcore(E) bridge(E)
> > stp(E) llc(E) rfkill(E) caam_jr(E) crypto_engine(E) rng_core(E)
> > joydev(E) evdev(E) dpaa2_caam(E) caamhash_desc(E) caamalg_desc(E)
> > authenc(E) libdes(E) dpaa2_console(E) ofpart(E) caam(E) sg(E) error(E)
> > lm90(E) at24(E) spi_nor(E) mtd(E) sbsa_gwdt(E) qoriq_thermal(E)
> > layerscape_edac_mod(E) qoriq_cpufreq(E) drm(E) fuse(E) configfs(E)
> > ip_tables(E) x_tables(E) autofs4(E) ext4(E) crc32c_generic(E) crc16(E)
> > mbcache(E) jbd2(E) hid_generic(E) usbhid(E) hid(E) dm_crypt(E) dm_mod(E)
> > sd_mod(E) fsl_dpaa2_ptp(E) ptp_qoriq(E) fsl_dpaa2_eth(E)
> > xhci_plat_hcd(E) xhci_hcd(E) usbcore(E) aes_ce_blk(E) crypto_simd(E)
> > cryptd(E) aes_ce_cipher(E) ghash_ce(E) gf128mul(E) at803x(E) libaes(E)
> > fsl_mc_dpio(E) pcs_lynx(E) rtc_pcf2127(E) sha2_ce(E) phylink(E)
> > xgmac_mdio(E) regmap_spi(E) of_mdio(E) sha256_arm64(E)
> > i2c_mux_pca954x(E) fixed_phy(E) i2c_mux(E) sha1_ce(E) ptp(E) libphy(E)
> > [  714.465131]  pps_core(E) ahci_qoriq(E) libahci_platform(E) nvme(E)
> > libahci(E) nvme_core(E) t10_pi(E) libata(E) crc_t10dif(E)
> > crct10dif_generic(E) crct10dif_common(E) dwc3(E) scsi_mod(E) udc_core(E)
> > roles(E) ulpi(E) sdhci_of_esdhc(E) sdhci_pltfm(E) sdhci(E)
> > spi_nxp_fspi(E) i2c_imx(E) fixed(E)
> > [  714.465192] CPU: 13 PID: 0 Comm: swapper/13 Tainted: GW   E
> > 5.10.0-rc7-1-gba98d13279ca #52
> > [  714.465196] Hardware name: SolidRun LX2160A Honeycomb (DT)
> > [  714.465202] pstate: 6005 (nZCv daif -PAN -UAO -TCO BTYPE=--)
> > [  714.465207] pc : __arm_lpae_map+0x2d4/0x30c
> > [  714.465211] lr : __arm_lpae_map+0x114/0x30c
> > [  714.465215] sp : 80001006b340
> > [  714.465219] x29: 80001006b340 x28: 002086538003
> > [  714.465227] x27: 0a20 x26: 1000
> > [  714.465236] x25: 0f44 x24: 0020adf8d000
> > [  714.465245] x23: 0001 x22: faeca000
> > [  714.465253] x21: 0003 x20: 19b60d64d200
> > [  714.465261] x19: 00ca x18: 
> > [  714.465270] x17:  x16: cccb7cf3ca20
> > [  714.465278] x15:  x14: 
> > [  714.465286] x13: 0003 x12: 0010
> > [  714.465294] x11:  x10: 0002
> > [  714.465302] x9 : cccb7d5b6e78 x8 : 01ff
> > [  714.465311] x7 : 19b606538650 x6 : 19b606538000
> > [  714.465319] x5 : 0009 x4 : 0f44
> > [  714.465327] x3 : 1000 x2 : 0020adf8d000
> > [  714.465335] x1 : 0002 x0 : 0003
> > [  714.465343] Call trace:
> > [  714.465348]  __arm_lpae_map+0x2d4/0x30c
> > [  714.465353]  __arm_lpae_map+0x114/0x30c
> > [  714.465357]  __arm_lpae_map+0x114/0x30c
> > [  714.465362]  __arm_lpae_map+0x114/0x30c
> > [  714.465366]  arm_lpae_map+0xf4/0x180
> > [  714.465373]  arm_smmu_map+0x4c/0xc0
> > [  714.465379]  __iommu_map+0x100/0x2bc
> > [  714.465385]  iommu_map_atomic+0x20/0x30
> > [  714.465391]  __iommu_dma_map+0xb0/0x110
> > [  714.465397]  iommu_dma_map_page+0xb8/0x120
> > [  714.465404]  dma_map_page_attrs+0x1a8/

Re: [PATCH RESEND net-next 1/2] dpaa2-eth: send a scatter-gather FD instead of realloc-ing

2020-12-10 Thread Ioana Ciornei
[Added also the netdev mailing list, I haven't heard of linux-netdev
before but kept it]

On Thu, Dec 10, 2020 at 05:31:56PM +, Daniel Thompson wrote:
> Hi Ioana

Hi Daniel,

> 
> On Mon, Jun 29, 2020 at 06:47:11PM +, Ioana Ciornei wrote:
> > Instead of realloc-ing the skb on the Tx path when the provided headroom
> > is smaller than the HW requirements, create a Scatter/Gather frame
> > descriptor with only one entry.
> > 
> > Remove the '[drv] tx realloc frames' counter exposed previously through
> > ethtool since it is no longer used.
> > 
> > Signed-off-by: Ioana Ciornei 
> > ---
> 
> I've been chasing down a networking regression on my LX2160A board
> (Honeycomb LX2K based on CEx7 LX2160A COM) that first appeared in v5.9.
> 
> It makes the board unreliable opening outbound connections meaning
> things like `apt update` or `git fetch` often can't open the connection.
> It does not happen all the time but is sufficient to make the boards
> built-in networking useless for workstation use.
> 
> The problem is strongly linked to warnings in the logs so I used the
> warnings to bisect down to locate the cause of the regression and it
> pinpointed this patch. I have confirmed that in both v5.9 and v5.10-rc7
> that reverting this patch (and fixing up the merge issues) fixes the
> regression and the warnings stop appearing.
> 
> A typical example of the warning is below (io-pgtable-arm.c:281 is an
> error path that I guess would cause dma_map_page_attrs() to return
> an error):
> 
> [  714.464927] WARNING: CPU: 13 PID: 0 at
> drivers/iommu/io-pgtable-arm.c:281 __arm_lpae_map+0x2d4/0x30c
> [  714.464930] Modules linked in: snd_seq_dummy(E) snd_hrtimer(E)
> snd_seq(E) snd_seq_device(E) snd_timer(E) snd(E) soundcore(E) bridge(E)
> stp(E) llc(E) rfkill(E) caam_jr(E) crypto_engine(E) rng_core(E)
> joydev(E) evdev(E) dpaa2_caam(E) caamhash_desc(E) caamalg_desc(E)
> authenc(E) libdes(E) dpaa2_console(E) ofpart(E) caam(E) sg(E) error(E)
> lm90(E) at24(E) spi_nor(E) mtd(E) sbsa_gwdt(E) qoriq_thermal(E)
> layerscape_edac_mod(E) qoriq_cpufreq(E) drm(E) fuse(E) configfs(E)
> ip_tables(E) x_tables(E) autofs4(E) ext4(E) crc32c_generic(E) crc16(E)
> mbcache(E) jbd2(E) hid_generic(E) usbhid(E) hid(E) dm_crypt(E) dm_mod(E)
> sd_mod(E) fsl_dpaa2_ptp(E) ptp_qoriq(E) fsl_dpaa2_eth(E)
> xhci_plat_hcd(E) xhci_hcd(E) usbcore(E) aes_ce_blk(E) crypto_simd(E)
> cryptd(E) aes_ce_cipher(E) ghash_ce(E) gf128mul(E) at803x(E) libaes(E)
> fsl_mc_dpio(E) pcs_lynx(E) rtc_pcf2127(E) sha2_ce(E) phylink(E)
> xgmac_mdio(E) regmap_spi(E) of_mdio(E) sha256_arm64(E)
> i2c_mux_pca954x(E) fixed_phy(E) i2c_mux(E) sha1_ce(E) ptp(E) libphy(E)
> [  714.465131]  pps_core(E) ahci_qoriq(E) libahci_platform(E) nvme(E)
> libahci(E) nvme_core(E) t10_pi(E) libata(E) crc_t10dif(E)
> crct10dif_generic(E) crct10dif_common(E) dwc3(E) scsi_mod(E) udc_core(E)
> roles(E) ulpi(E) sdhci_of_esdhc(E) sdhci_pltfm(E) sdhci(E)
> spi_nxp_fspi(E) i2c_imx(E) fixed(E)
> [  714.465192] CPU: 13 PID: 0 Comm: swapper/13 Tainted: GW   E
> 5.10.0-rc7-1-gba98d13279ca #52
> [  714.465196] Hardware name: SolidRun LX2160A Honeycomb (DT)
> [  714.465202] pstate: 6005 (nZCv daif -PAN -UAO -TCO BTYPE=--)
> [  714.465207] pc : __arm_lpae_map+0x2d4/0x30c
> [  714.465211] lr : __arm_lpae_map+0x114/0x30c
> [  714.465215] sp : 80001006b340
> [  714.465219] x29: 80001006b340 x28: 002086538003 
> [  714.465227] x27: 0a20 x26: 1000 
> [  714.465236] x25: 0f44 x24: 0020adf8d000 
> [  714.465245] x23: 0001 x22: faeca000 
> [  714.465253] x21: 0003 x20: 19b60d64d200 
> [  714.465261] x19: 00ca x18:  
> [  714.465270] x17:  x16: cccb7cf3ca20 
> [  714.465278] x15:  x14:  
> [  714.465286] x13: 0003 x12: 0010 
> [  714.465294] x11:  x10: 0002 
> [  714.465302] x9 : cccb7d5b6e78 x8 : 01ff 
> [  714.465311] x7 : 19b606538650 x6 : 19b606538000 
> [  714.465319] x5 : 0009 x4 : 0f44 
> [  714.465327] x3 : 1000 x2 : 0020adf8d000 
> [  714.465335] x1 : 0002 x0 : 0003 
> [  714.465343] Call trace:
> [  714.465348]  __arm_lpae_map+0x2d4/0x30c
> [  714.465353]  __arm_lpae_map+0x114/0x30c
> [  714.465357]  __arm_lpae_map+0x114/0x30c
> [  714.465362]  __arm_lpae_map+0x114/0x30c
> [  714.465366]  arm_lpae_map+0xf4/0x180
> [  714.465373]  arm_smmu_map+0x4c/0xc0
> [  714.465379]  __iommu_map+0x100/0x2bc
> [  714.465385]  iommu_map_atomic+0x20/0x30
> [  714.465391]  __iommu_dma_map+0xb0/0x110
> [  714.465397]  iommu_dma_map_page+0xb8/0x120
> [  714.465404]  dma_map_page_attrs+0x1a8/0x210
> [  714.465413]  __dpaa2_eth_tx+0x384/0xbd0 [fsl_dpaa2_eth]
> [  714.465421]  dpaa2_eth_tx+0x84/0x134 [fsl_dpaa2_eth]
> [  714.465427]  dev_hard_start_xmit+0x10c/0x2b0
> [  714.465433]  sch_direct_xmit+0x1a0/0x5

Re: [PATCH RESEND net-next 1/2] dpaa2-eth: send a scatter-gather FD instead of realloc-ing

2020-12-10 Thread Daniel Thompson
Hi Ioana

On Mon, Jun 29, 2020 at 06:47:11PM +, Ioana Ciornei wrote:
> Instead of realloc-ing the skb on the Tx path when the provided headroom
> is smaller than the HW requirements, create a Scatter/Gather frame
> descriptor with only one entry.
> 
> Remove the '[drv] tx realloc frames' counter exposed previously through
> ethtool since it is no longer used.
> 
> Signed-off-by: Ioana Ciornei 
> ---

I've been chasing down a networking regression on my LX2160A board
(Honeycomb LX2K based on CEx7 LX2160A COM) that first appeared in v5.9.

It makes the board unreliable opening outbound connections meaning
things like `apt update` or `git fetch` often can't open the connection.
It does not happen all the time but is sufficient to make the boards
built-in networking useless for workstation use.

The problem is strongly linked to warnings in the logs so I used the
warnings to bisect down to locate the cause of the regression and it
pinpointed this patch. I have confirmed that in both v5.9 and v5.10-rc7
that reverting this patch (and fixing up the merge issues) fixes the
regression and the warnings stop appearing.

A typical example of the warning is below (io-pgtable-arm.c:281 is an
error path that I guess would cause dma_map_page_attrs() to return
an error):

[  714.464927] WARNING: CPU: 13 PID: 0 at
drivers/iommu/io-pgtable-arm.c:281 __arm_lpae_map+0x2d4/0x30c
[  714.464930] Modules linked in: snd_seq_dummy(E) snd_hrtimer(E)
snd_seq(E) snd_seq_device(E) snd_timer(E) snd(E) soundcore(E) bridge(E)
stp(E) llc(E) rfkill(E) caam_jr(E) crypto_engine(E) rng_core(E)
joydev(E) evdev(E) dpaa2_caam(E) caamhash_desc(E) caamalg_desc(E)
authenc(E) libdes(E) dpaa2_console(E) ofpart(E) caam(E) sg(E) error(E)
lm90(E) at24(E) spi_nor(E) mtd(E) sbsa_gwdt(E) qoriq_thermal(E)
layerscape_edac_mod(E) qoriq_cpufreq(E) drm(E) fuse(E) configfs(E)
ip_tables(E) x_tables(E) autofs4(E) ext4(E) crc32c_generic(E) crc16(E)
mbcache(E) jbd2(E) hid_generic(E) usbhid(E) hid(E) dm_crypt(E) dm_mod(E)
sd_mod(E) fsl_dpaa2_ptp(E) ptp_qoriq(E) fsl_dpaa2_eth(E)
xhci_plat_hcd(E) xhci_hcd(E) usbcore(E) aes_ce_blk(E) crypto_simd(E)
cryptd(E) aes_ce_cipher(E) ghash_ce(E) gf128mul(E) at803x(E) libaes(E)
fsl_mc_dpio(E) pcs_lynx(E) rtc_pcf2127(E) sha2_ce(E) phylink(E)
xgmac_mdio(E) regmap_spi(E) of_mdio(E) sha256_arm64(E)
i2c_mux_pca954x(E) fixed_phy(E) i2c_mux(E) sha1_ce(E) ptp(E) libphy(E)
[  714.465131]  pps_core(E) ahci_qoriq(E) libahci_platform(E) nvme(E)
libahci(E) nvme_core(E) t10_pi(E) libata(E) crc_t10dif(E)
crct10dif_generic(E) crct10dif_common(E) dwc3(E) scsi_mod(E) udc_core(E)
roles(E) ulpi(E) sdhci_of_esdhc(E) sdhci_pltfm(E) sdhci(E)
spi_nxp_fspi(E) i2c_imx(E) fixed(E)
[  714.465192] CPU: 13 PID: 0 Comm: swapper/13 Tainted: GW   E
5.10.0-rc7-1-gba98d13279ca #52
[  714.465196] Hardware name: SolidRun LX2160A Honeycomb (DT)
[  714.465202] pstate: 6005 (nZCv daif -PAN -UAO -TCO BTYPE=--)
[  714.465207] pc : __arm_lpae_map+0x2d4/0x30c
[  714.465211] lr : __arm_lpae_map+0x114/0x30c
[  714.465215] sp : 80001006b340
[  714.465219] x29: 80001006b340 x28: 002086538003 
[  714.465227] x27: 0a20 x26: 1000 
[  714.465236] x25: 0f44 x24: 0020adf8d000 
[  714.465245] x23: 0001 x22: faeca000 
[  714.465253] x21: 0003 x20: 19b60d64d200 
[  714.465261] x19: 00ca x18:  
[  714.465270] x17:  x16: cccb7cf3ca20 
[  714.465278] x15:  x14:  
[  714.465286] x13: 0003 x12: 0010 
[  714.465294] x11:  x10: 0002 
[  714.465302] x9 : cccb7d5b6e78 x8 : 01ff 
[  714.465311] x7 : 19b606538650 x6 : 19b606538000 
[  714.465319] x5 : 0009 x4 : 0f44 
[  714.465327] x3 : 1000 x2 : 0020adf8d000 
[  714.465335] x1 : 0002 x0 : 0003 
[  714.465343] Call trace:
[  714.465348]  __arm_lpae_map+0x2d4/0x30c
[  714.465353]  __arm_lpae_map+0x114/0x30c
[  714.465357]  __arm_lpae_map+0x114/0x30c
[  714.465362]  __arm_lpae_map+0x114/0x30c
[  714.465366]  arm_lpae_map+0xf4/0x180
[  714.465373]  arm_smmu_map+0x4c/0xc0
[  714.465379]  __iommu_map+0x100/0x2bc
[  714.465385]  iommu_map_atomic+0x20/0x30
[  714.465391]  __iommu_dma_map+0xb0/0x110
[  714.465397]  iommu_dma_map_page+0xb8/0x120
[  714.465404]  dma_map_page_attrs+0x1a8/0x210
[  714.465413]  __dpaa2_eth_tx+0x384/0xbd0 [fsl_dpaa2_eth]
[  714.465421]  dpaa2_eth_tx+0x84/0x134 [fsl_dpaa2_eth]
[  714.465427]  dev_hard_start_xmit+0x10c/0x2b0
[  714.465433]  sch_direct_xmit+0x1a0/0x550
[  714.465438]  __qdisc_run+0x140/0x670
[  714.465443]  __dev_queue_xmit+0x6c4/0xa74
[  714.465449]  dev_queue_xmit+0x20/0x2c
[  714.465463]  br_dev_queue_push_xmit+0xc4/0x1a0 [bridge]
[  714.465476]  br_forward_finish+0xdc/0xf0 [bridge]
[  714.465489]  __br_forward+0x160/0x1c0 [bridge]
[  714.465502]  br_forward+0x13c/0x160 [bridge]
[  714.4655