Netgear R7800 exploration (IPQ8065, QCA9984)

ipq806x cannot cope with those routing throughputs (without the help of its NSS cores, which aren't supported); it's safe up to 350-400 MBit/s (and can maybe achieve up to ~600 MBit/s on a good day, with flow-offloading enabled and sacrificing latency).

For 1 GBit/s lines you're effectively restricted to high-end mvebu or x86_64.

That doesn't make this architecture in general or the mentioned devices in particular a bad choice, they're still very fast top-end contenders, but they're not suited for routing at 1 GBit/s line speed.

still it's incredible that a less powerfull soc have better performance...

Not really given the hardware design/setup...

@chunkeey any news about usb port not working?

Have you really tried:

(the r7800.dts changes you posted look broken, please just do the changes in the ipq8064.dtsi)

ok i can confirm

with this dtsi usb ports works normally... phy outside usb... can't this be fixed by modifying the driver to load the hs and ss phy before everything else?

		stmmac_axi_setup: stmmac-axi-config {
			snps,wr_osr_lmt = <7>;
			snps,rd_osr_lmt = <7>;
			snps,blen = <16 0 0 0 0 0 0>;
		};

		gmac0: ethernet@37000000 {
			compatible = "qcom,ipq806x-gmac";
			reg = <0x37000000 0x200000>;
			interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>;
			interrupt-names = "macirq";

			snps,axi-config = <&stmmac_axi_setup>;
			snps,pbl = <32>;
			snps,aal = <1>;

			qcom,nss-common = <&nss_common>;
			qcom,qsgmii-csr = <&qsgmii_csr>;

			clocks = <&gcc GMAC_CORE1_CLK>;
			clock-names = "stmmaceth";

			resets = <&gcc GMAC_CORE1_RESET>;
			reset-names = "stmmaceth";

			status = "disabled";
		};

		gmac1: ethernet@37200000 {
			compatible = "qcom,ipq806x-gmac";
			reg = <0x37200000 0x200000>;
			interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>;
			interrupt-names = "macirq";

			snps,axi-config = <&stmmac_axi_setup>;
			snps,pbl = <32>;
			snps,aal = <1>;

			qcom,nss-common = <&nss_common>;
			qcom,qsgmii-csr = <&qsgmii_csr>;

			clocks = <&gcc GMAC_CORE2_CLK>;
			clock-names = "stmmaceth";

			resets = <&gcc GMAC_CORE2_RESET>;
			reset-names = "stmmaceth";

			status = "disabled";
		};

		gmac2: ethernet@37400000 {
			compatible = "qcom,ipq806x-gmac";
			reg = <0x37400000 0x200000>;
			interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>;
			interrupt-names = "macirq";

			snps,axi-config = <&stmmac_axi_setup>;
			snps,pbl = <32>;
			snps,aal = <1>;

			qcom,nss-common = <&nss_common>;
			qcom,qsgmii-csr = <&qsgmii_csr>;

			clocks = <&gcc GMAC_CORE3_CLK>;
			clock-names = "stmmaceth";

			resets = <&gcc GMAC_CORE3_RESET>;
			reset-names = "stmmaceth";

			status = "disabled";
		};

		gmac3: ethernet@37600000 {
			compatible = "qcom,ipq806x-gmac";
			reg = <0x37600000 0x200000>;
			interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_HIGH>;
			interrupt-names = "macirq";

			snps,axi-config = <&stmmac_axi_setup>;
			snps,pbl = <32>;
			snps,aal = <1>;

			qcom,nss-common = <&nss_common>;
			qcom,qsgmii-csr = <&qsgmii_csr>;

			clocks = <&gcc GMAC_CORE4_CLK>;
			clock-names = "stmmaceth";

			resets = <&gcc GMAC_CORE4_RESET>;
			reset-names = "stmmaceth";

			status = "disabled";
		};

		/* Temporary fixed regulator */
		vsdcc_fixed: vsdcc-regulator {
			compatible = "regulator-fixed";
			regulator-name = "SDCC Power";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			regulator-always-on;
		};

		sdcc1bam:dma@12402000 {
			compatible = "qcom,bam-v1.3.0";
			reg = <0x12402000 0x8000>;
			interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&gcc SDC1_H_CLK>;
			clock-names = "bam_clk";
			#dma-cells = <1>;
			qcom,ee = <0>;
                };

		sdcc3bam:dma@12182000 {
			compatible = "qcom,bam-v1.3.0";
			reg = <0x12182000 0x8000>;
			interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&gcc SDC3_H_CLK>;
			clock-names = "bam_clk";
			#dma-cells = <1>;
			qcom,ee = <0>;
		};

		amba {
			compatible = "simple-bus";
			#address-cells = <1>;
			#size-cells = <1>;
			ranges;

			sdcc1: sdcc@12400000 {
				status          = "disabled";
				compatible      = "arm,pl18x", "arm,primecell";
				arm,primecell-periphid = <0x00051180>;
				reg             = <0x12400000 0x2000>;
				interrupts      = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
				interrupt-names = "cmd_irq";
				clocks          = <&gcc SDC1_CLK>, <&gcc SDC1_H_CLK>;
				clock-names     = "mclk", "apb_pclk";
				bus-width       = <8>;
				max-frequency   = <96000000>;
				non-removable;
				cap-sd-highspeed;
				cap-mmc-highspeed;
				vmmc-supply = <&vsdcc_fixed>;
				dmas = <&sdcc1bam 2>, <&sdcc1bam 1>;
				dma-names = "tx", "rx";
			};

			sdcc3: sdcc@12180000 {
				compatible      = "arm,pl18x", "arm,primecell";
				arm,primecell-periphid = <0x00051180>;
				status          = "disabled";
				reg             = <0x12180000 0x2000>;
				interrupts      = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
				interrupt-names = "cmd_irq";
				clocks          = <&gcc SDC3_CLK>, <&gcc SDC3_H_CLK>;
				clock-names     = "mclk", "apb_pclk";
				bus-width       = <8>;
				cap-sd-highspeed;
				cap-mmc-highspeed;
				max-frequency   = <192000000>;
				#mmc-ddr-1_8v;
				sd-uhs-sdr104;
				sd-uhs-ddr50;
				vqmmc-supply = <&vsdcc_fixed>;
				dmas = <&sdcc3bam 2>, <&sdcc3bam 1>;
				dma-names = "tx", "rx";
			};
		};
	};

	sfpb_mutex: sfpb-mutex {
		compatible = "qcom,sfpb-mutex";
		syscon = <&sfpb_mutex_block 4 4>;

		#hwlock-cells = <1>;
	};

	smem {
		compatible = "qcom,smem";
		memory-region = <&smem>;
		hwlocks = <&sfpb_mutex 3>;
	};
};

Normally? As in 4.14/4.9/4.4 times? If so, well this is sort of bad. Because this hints that something is missing in either the phy driver or (less likely) in the dwc3 glue. I really hate that.

normally = device get recognized and partition gets created and are accessible... should i test write and read speed?

yeah. Do you know the 4.4 / 4.9 values? Because the 66 MiB/s-ish I get on 4.14 seem kinda low. It's slower than the ipq4019 currently (on vanilla openwrt, not that 4.19 branch)

think in 4.19 is even slower... with wifi i got 26MB

any hint on how to test usb speed?

Just read performance?

hdparm -t /dev/sda

will test on usb stick... should be faster than hard disk

@chunkeey interesting...

root@No-More-Lag-Router:~# hdparm -t /dev/sda

/dev/sda:
 Timing buffered disk reads: 262 MB in  3.02 seconds =  86.81 MB/sec
root@No-More-Lag-Router:~# hdparm -t /dev/sdb

/dev/sdb:
 Timing buffered disk reads: 208 MB in  3.02 seconds =  68.81 MB/sec
root@No-More-Lag-Router:~# hdparm -t /dev/sda

/dev/sda:
 Timing buffered disk reads: 282 MB in  3.02 seconds =  93.46 MB/sec
root@No-More-Lag-Router:~# hdparm -t /dev/sda

/dev/sda:
 Timing buffered disk reads: 290 MB in  3.01 seconds =  96.45 MB/sec
root@No-More-Lag-Router:~# hdparm -t /dev/sdb

/dev/sdb:
 Timing buffered disk reads: 206 MB in  3.01 seconds =  68.48 MB/sec
root@No-More-Lag-Router:~# hdparm -t /dev/sdb

/dev/sdb:
 Timing buffered disk reads: 228 MB in  3.02 seconds =  75.54 MB/sec

2 different hard disk

from usb stick

root@No-More-Lag-Router:~# hdparm -t /dev/sda

/dev/sda:
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 14 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 Timing buffered disk reads: 420 MB in  3.01 seconds = 139.47 MB/sec
root@No-More-Lag-Router:~# hdparm -t /dev/sda

/dev/sda:
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 14 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 Timing buffered disk reads: 428 MB in  3.01 seconds = 142.15 MB/sec

hm?!

can you do a timed sha256sum (or crc32/md5sum if the sha256sum is too much) of that stick and compare the result to what a normal PC can do? I've slightly suspicious of these too-good to be true values.

yep notice that too... that speed looks too much...
anyway doing a
time md5sum /dev/sda


output from modem

root@No-More-Lag-Router:~# time md5sum /dev/sda
9ac4f0c5abb7188988ce9c240cea5ead  /dev/sda
real    8m 10.37s
user    4m 51.51s
sys     2m 13.90s

@chunkeey

with live ubuntu disto

root@ubuntu:/home/ubuntu# time md5sum /dev/sda
3724a538db9175bf6162146a1253fd8b  /dev/sda

real	4m31.523s
user	1m45.738s
sys	0m14.034s

What do you think?

That
9ac4f0c5abb7188988ce9c240cea5ead is not 3724a538db9175bf6162146a1253fd8b

is ubuntu automouting the fs (and changeing something) or is the value correct if you force it to be usb 2.0 (via a usb-2.0 extension cable)?

think is ubuntu that changed something (as i used the same usb to load the live disto)

Try testing unbuffered reads.

tested again with the router and same result (different md5 )

root@No-More-Lag-Router:~# time md5sum /dev/sda
c9ac3cf180fff57ed95974734ac9d483  /dev/sda
real    8m 4.02s
user    4m 52.74s
sys     2m 7.07s

Noticed a SPECTRE countermeasures in QSDK, I think it will be useful to you
https://source.codeaurora.org/quic/qsdk/oss/kernel/linux-msm/commit/?h=eggplant&id=6479300ccb33354dc1d7760c6817a93ce81fd7e7