TCP & Overrrun
I'm gettin overrun on the raspberry pi.
Which ethernet drived does it use? I need to determine if it uses CONFIG_SYS_RX_ETH_BUFFER" from net.h and the "net_rx_packets" buffer pool defined in net/net.c
grep suggests it is not using net_rx_packets.
Here's a list of a grep of the u-boot source directory
rch/mips/mach-au1x00/au1x00_eth.carch/powerpc/cpu/mpc85xx/ether_fcc.cnet/net.cdrivers/usb/gadget/ether.cdrivers/net/ep93xx_eth.cdrivers/net/cs8900.cdrivers/net/ftgmac100.cdrivers/net/ks8851_mll.cdrivers/net/dc2114x.cdrivers/net/dm9000x.cdrivers/net/xilinx_ll_temac_fifo.cdrivers/net/ax88180.cdrivers/net/tsec.cdrivers/net/mcffec.cdrivers/net/dnet.cdrivers/net/ftmac100.cdrivers/net/xilinx_ll_temac_sdma.cdrivers/net/sandbox-raw.cdrivers/net/cpsw.cdrivers/net/sandbox.cdrivers/net/smc911x.cdrivers/net/lan91c96.cdrivers/net/uli526x.cdrivers/net/tsi108_eth.cdrivers/net/mpc8xx_fec.cdrivers/net/at91_emac.cdrivers/net/ethoc.cdrivers/net/fsl_mcdmafec.cdrivers/net/bcm-sf2-eth.cdrivers/net/enc28j60.cdrivers/net/smc91111.cdrivers/net/macb.cdrivers/net/pic32_eth.c
Thanks
Duncan Hare
Hi Duncan,
Quoted 3 lines · Duncan Hare
I'm gettin overrun on the raspberry pi.
Which ethernet drived does it use?
You didn't specify which one you are talking about, but here's how to find out...
Assuming rpi3, find the config first...
configs/rpi_3_defconfig says: CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b" arch/arm/dts/bcm2837-rpi-3-b.dts says: #include "bcm283x-rpi-smsc9514.dtsi"arch/arm/dts/bcm283x-rpi-smsc9514.dtsi says: ethernet:
usbether at 1 { compatible = "usb424,ec00";
grep -rn ec00 drivers/ says: drivers/usb/eth/smsc95xx.c
Cheers,
-Joe
Quoted 49 lines
I need to determine if it
usesCONFIG_SYS_RX_ETH_BUFFER" fromnet.hand the "net_rx_packets" buffer pool defined innet/net.cgrep suggests it is not using
net_rx_packets.Here's a list of a grep of the u-boot source directory
rch/mips/mach-au1x00/au1x00_eth.carch/powerpc/cpu/mpc85xx/ether_fcc.cnet/net.cdrivers/usb/gadget/ether.cdrivers/net/ep93xx_eth.cdrivers/net/cs8900.cdrivers/net/ftgmac100.cdrivers/net/ks8851_mll.cdrivers/net/dc2114x.cdrivers/net/dm9000x.cdrivers/net/xilinx_ll_temac_fifo.cdrivers/net/ax88180.cdrivers/net/tsec.cdrivers/net/mcffec.cdrivers/net/dnet.cdrivers/net/ftmac100.cdrivers/net/xilinx_ll_temac_sdma.cdrivers/net/sandbox-raw.cdrivers/net/cpsw.cdrivers/net/sandbox.cdrivers/net/smc911x.cdrivers/net/lan91c96.cdrivers/net/uli526x.cdrivers/net/tsi108_eth.cdrivers/net/mpc8xx_fec.cdrivers/net/at91_emac.cdrivers/net/ethoc.cdrivers/net/fsl_mcdmafec.cdrivers/net/bcm-sf2-eth.cdrivers/net/enc28j60.cdrivers/net/smc91111.cdrivers/net/macb.cdrivers/net/pic32_eth.cThanks
Duncan Hare
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
Quoted 32 lines · On Thu, 8 Feb 2018 22:15:44 +0000 (UTC) Duncan Hare <[email protected]> wrote:
Duncan Hare
714 931 7952
----- Forwarded Message -----
From: Joe Hershberger <[email protected]>
To: Duncan Hare <[email protected]>
Cc: u-boot <[email protected]>; Joe Hershberger <[email protected]> Sent: Thursday, February 8, 2018 11:40 AM
Subject: Re: [U-Boot] TCP & OverrrunHi Duncan,
Quoted 3 lines · Duncan Hare
I'm gettin overrun on the raspberry pi.
Which ethernet drived does it use?
You didn't specify which one you are talking about, but here's how to find out...
Assuming rpi3, find the config first...
configs/rpi_3_defconfig says:
CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"arch/arm/dts/bcm2837-rpi-3-b.dtssays: #include "bcm283x-rpi-smsc9514.dtsi"arch/arm/dts/bcm283x-rpi-smsc9514.dtsisays: ethernet: usbether at 1 { compatible = "usb424,ec00"; grep -rn ec00drivers/says:drivers/usb/eth/smsc95xx.c
Quoted 15 lines
Cheers,
-JoeQuoted 11 lines
I need to determine if it
usesCONFIG_SYS_RX_ETH_BUFFER" fromnet.hand the "net_rx_packets" buffer pool defined innet/net.cThanks
Duncan Hare
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
Joe
Thanks
It's is more push down stack buffer management than circular. Small change to fix. No more starting at zero.
I like buffer pools with a size of power of 2. Easy to make circular with an & of the power of 2-1 on the index.
Duncan
Quoted 32 lines · On Thu, 8 Feb 2018 22:15:44 +0000 (UTC) Duncan Hare <[email protected]> wrote:
Duncan Hare
714 931 7952
----- Forwarded Message -----
From: Joe Hershberger <[email protected]>
To: Duncan Hare <[email protected]>
Cc: u-boot <[email protected]>; Joe Hershberger <[email protected]> Sent: Thursday, February 8, 2018 11:40 AM
Subject: Re: [U-Boot] TCP & OverrrunHi Duncan,
Quoted 3 lines · Duncan Hare
I'm gettin overrun on the raspberry pi.
Which ethernet drived does it use?
You didn't specify which one you are talking about, but here's how to find out...
Assuming rpi3, find the config first...
configs/rpi_3_defconfig says:
CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"arch/arm/dts/bcm2837-rpi-3-b.dtssays: #include "bcm283x-rpi-smsc9514.dtsi"arch/arm/dts/bcm283x-rpi-smsc9514.dtsisays: ethernet: usbether at 1 { compatible = "usb424,ec00"; grep -rn ec00drivers/says:drivers/usb/eth/smsc95xx.c
Quoted 16 lines
Cheers,
-JoeQuoted 13 lines
I need to determine if it
usesCONFIG_SYS_RX_ETH_BUFFER" fromnet.hand the "net_rx_packets" buffer pool defined innet/net.cgrep suggests it is not using
net_rx_packets.Thanks
Duncan Hare
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
___________________________________________________
Joe
Two solutions:
Option 1.
drivers/usb/eth/smsc95xx.c pulls packet in from the device, single rx buffer, and runs the packet rx code in net.c. Assumption is packets are polled for, thus single
rx buffer is acceptable.
net_rx_packets exists, and can be use, if looking for rx packet call is called frequently though system.
This would work for all existing drivers.
net.c fills net_rx_packets and calls a routine to process packets, and and the tcp system system polls via smsc95xx_recv through the interface structure at places in the code to process fill net_rx_packets as a packet queue.
A TCP window limits the number of packets in process.
Option 2.
The driver is changed to set an interrupt and the interrupt preempts the packet processing, as interrupts do.
But, this requires driver changes to use TCP.
And good hardware documentation.
Quoted 72 lines · Duncan Hare
Quoted 32 lines · On Thu, 8 Feb 2018 22:15:44 +0000 (UTC) Duncan Hare <[email protected]> wrote:
Duncan Hare
714 931 7952
----- Forwarded Message -----
From: Joe Hershberger <[email protected]>
To: Duncan Hare <[email protected]>
Cc: u-boot <[email protected]>; Joe Hershberger <[email protected]> Sent: Thursday, February 8, 2018 11:40 AM
Subject: Re: [U-Boot] TCP & OverrrunHi Duncan,
Quoted 3 lines · Duncan Hare
I'm gettin overrun on the raspberry pi.
Which ethernet drived does it use?
You didn't specify which one you are talking about, but here's how to find out...
Assuming rpi3, find the config first...
configs/rpi_3_defconfig says:
CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"arch/arm/dts/bcm2837-rpi-3-b.dtssays: #include "bcm283x-rpi-smsc9514.dtsi"arch/arm/dts/bcm283x-rpi-smsc9514.dtsi
says: ethernet: usbether at 1 {
compatible = "usb424,ec00"; grep -rn ec00drivers/says:drivers/usb/eth/smsc95xx.cQuoted 16 lines
Cheers,
-JoeQuoted 13 lines
I need to determine if it
usesCONFIG_SYS_RX_ETH_BUFFER" fromnet.hand the "net_rx_packets" buffer pool defined innet/net.cgrep suggests it is not using
net_rx_packets.Thanks
Duncan Hare
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot___________________________________________________
JoeTwo solutions:
Option 1.
drivers/usb/eth/smsc95xx.cpulls packet in from the device, single rx buffer, and runs the packet rx code innet.c. Assumption is packets are polled for, thus single
rx buffer is acceptable.
net_rx_packetsexists, and can be use, if looking for rx packet call is called frequently though system.This would work for all existing drivers.
net.cfillsnet_rx_packetsand calls a routine to process packets, and and the tcp system system polls viasmsc95xx_recvthrough the interface structure at places in the code to process fillnet_rx_packetsas a packet queue.
Quoted 6 lines
A TCP window limits the number of packets in process.
Option 2.
The driver is changed to set an interrupt and the interrupt preempts the packet processing, as interrupts do.
In general, we don't enable interrupts in U-Boot. There have been exceptions, but not when there is a reasonable alternative.
Quoted 4 lines
But, this requires driver changes to use TCP.
And good hardware documentation.
I think option 1 is the way to go.
Thanks,
-Joe
Quoted 70 lines · On Sun, 11 Feb 2018 00:39:05 +0000 (UTC) Duncan Hare <[email protected]> wrote:
Duncan Hare
714 931 7952
----- Forwarded Message -----
From: Joe Hershberger <[email protected]>
To: Duncan Hare <[email protected]>
Cc: Joe Hershberger <[email protected]>; u-boot <[email protected]> Sent: Friday, February 9, 2018 1:11 PM
Subject: Re: [U-Boot] TCP & OverrrunQuoted 57 lines · Duncan Hare
Quoted 33 lines · On Thu, 8 Feb 2018 22:15:44 +0000 (UTC) Duncan Hare <[email protected]> wrote:
Duncan Hare
714 931 7952
----- Forwarded Message -----
From: Joe Hershberger <[email protected]>
To: Duncan Hare <[email protected]>
Cc: u-boot <[email protected]>; Joe Hershberger <[email protected]> Sent: Thursday, February 8, 2018 11:40 AM
Subject: Re: [U-Boot] TCP & OverrrunHi Duncan,
Quoted 3 lines · Duncan Hare
I'm gettin overrun on the raspberry pi.
Which ethernet drived does it use?
You didn't specify which one you are talking about, but here's how to find out...
Assuming rpi3, find the config first...
configs/rpi_3_defconfig says:
CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"arch/arm/dts/bcm2837-rpi-3-b.dtssays: #include "bcm283x-rpi-smsc9514.dtsi"arch/arm/dts/bcm283x-rpi-smsc9514.dtsisays: ethernet: usbether at 1 { compatible = "usb424,ec00"; grep -rn ec00drivers/says:drivers/usb/eth/smsc95xx.cQuoted 16 lines
Cheers,
-JoeQuoted 13 lines
I need to determine if it
usesCONFIG_SYS_RX_ETH_BUFFER" fromnet.hand the
"net_rx_packets" buffer pool defined innet/net.cgrep suggests it is not using
net_rx_packets.Thanks
Duncan Hare
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot___________________________________________________
JoeTwo solutions:
Quoted 7 lines
Quoted 2 lines
Option 1.
I think option 1 is the way to go.
Thanks,
-Joe
Joe
The overruns were caused by printing error messages. The print process is (very) slow compared with packet and computer speeds, and causes overruns.
I turned off all the error messages in tcp.c and the overruns also stopped.
Makes debugging harder.
Duncan
Hi Duncan,
Quoted 81 lines · Duncan Hare
Quoted 70 lines · On Sun, 11 Feb 2018 00:39:05 +0000 (UTC) Duncan Hare <[email protected]> wrote:
Duncan Hare
714 931 7952
----- Forwarded Message -----
From: Joe Hershberger <[email protected]>
To: Duncan Hare <[email protected]>
Cc: Joe Hershberger <[email protected]>; u-boot <[email protected]> Sent: Friday, February 9, 2018 1:11 PM
Subject: Re: [U-Boot] TCP & OverrrunQuoted 57 lines · Duncan Hare
Quoted 33 lines · On Thu, 8 Feb 2018 22:15:44 +0000 (UTC) Duncan Hare <[email protected]> wrote:
Duncan Hare
714 931 7952
----- Forwarded Message -----
From: Joe Hershberger <[email protected]>
To: Duncan Hare <[email protected]>
Cc: u-boot <[email protected]>; Joe Hershberger <[email protected]> Sent: Thursday, February 8, 2018 11:40 AM
Subject: Re: [U-Boot] TCP & OverrrunHi Duncan,
Quoted 3 lines · Duncan Hare
I'm gettin overrun on the raspberry pi.
Which ethernet drived does it use?
You didn't specify which one you are talking about, but here's how to find out...
Assuming rpi3, find the config first...
configs/rpi_3_defconfig says:
CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"arch/arm/dts/bcm2837-rpi-3-b.dtssays: #include "bcm283x-rpi-smsc9514.dtsi"arch/arm/dts/bcm283x-rpi-smsc9514.dtsi
says: ethernet: usbether at 1 {
compatible = "usb424,ec00"; grep -rn ec00drivers/says:drivers/usb/eth/smsc95xx.cQuoted 16 lines
Cheers,
-JoeQuoted 13 lines
I need to determine if it
usesCONFIG_SYS_RX_ETH_BUFFER" fromnet.hand the
"net_rx_packets" buffer pool defined innet/net.cgrep suggests it is not using
net_rx_packets.Thanks
Duncan Hare
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot___________________________________________________
JoeTwo solutions:
Quoted 7 lines
Quoted 2 lines
Option 1.
I think option 1 is the way to go.
Thanks,
-Joe
Quoted 8 lines
Joe
The overruns were caused by printing error messages. The print process is (very) slow compared with packet and computer speeds, and causes overruns.
I turned off all the error messages in
tcp.cand the overruns also stopped.
You could probably make the printing buffered (maybe just turn on such a thing) to speed it up. You can also have different log levels to turn on different traces so you can reduce the load for printing.
Quoted 8 lines
Makes debugging harder.
Duncan
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
[U-Boot] TCP Patch Set
Quoted 23 lines · On Mon, 12 Feb 2018 13:35:11 -0600 Joe Hershberger <[email protected]>…
Quoted 23 lines
Quoted 9 lines
Quoted 9 lines
Quoted 5 lines
Quoted 5 lines
I need to determine if it
usesCONFIG_SYS_RX_ETH_BUFFER" fromnet.hand the
"net_rx_packets" buffer pool defined innet/net.cTwo solutions:
Quoted 7 lines
Quoted 2 lines
Option 1.
I think option 1 is the way to go.
Thanks,
-JoeJoe
The overruns were caused by printing error messages. The print process is (very) slow compared with packet and computer speeds, and causes overruns.
Quoted 5 lines
Quoted 5 lines
I turned off all the error messages in
tcp.cand the overruns also stopped.Duncan
-----------------------------------------------------------------------
Joe
I'm now at the state where I'm satisfied the selective acknowledgment implementation is working well, having re-written the code.
I've transferred 20 4 Mbyte kernels from cloud to desktop without a failure.
How to proceed?
Issue the patch set again? Or just the TCP module?
Then what's the next step?
Regards
Duncan
[U-Boot] TCP Patch Set
Hi Duncan,
Quoted 39 lines · Duncan Hare
Quoted 23 lines · On Mon, 12 Feb 2018 13:35:11 -0600 Joe Hershberger <[email protected]>…
Quoted 23 lines
Quoted 9 lines
Quoted 9 lines
Quoted 5 lines
Quoted 5 lines
I need to determine if it
usesCONFIG_SYS_RX_ETH_BUFFER" fromnet.hand the
"net_rx_packets" buffer pool defined innet/net.cTwo solutions:
Quoted 7 lines
Quoted 2 lines
Option 1.
I think option 1 is the way to go.
Thanks,
-JoeJoe
The overruns were caused by printing error messages. The print process is (very) slow compared with packet and computer speeds, and causes overruns.
Quoted 5 lines
Quoted 5 lines
I turned off all the error messages in
tcp.cand the overruns also stopped.Duncan
-----------------------------------------------------------------------
JoeI'm now at the state where I'm satisfied the selective acknowledgment implementation is working well, having re-written the code.
Quoted 8 lines
I've transferred 20 4 Mbyte kernels from cloud to desktop without a failure.
How to proceed?
Issue the patch set again? Or just the TCP module?
Then what's the next step?
I think the next step is to rework your patch submission process, sending the patches to just yourself, until they meet the standard (
http://www.denx.de/wiki/U-Boot/Patches ) so that all of the tooling I use can work with them. Otherwise I spend lots of time, sometimes hours, trying to shove malformed patches through the process. I really don't have time for that, so I have to ask that you use patman and send properly formatted patches. Once you have that down, I'll re-review what you have at this point and go from there.
Thanks,
-Joe