2017-02-09

<montjoie> the first seems ok
<montjoie> does someone remember a link where tkaiser explain his methodology for benching emac ?

2017-02-08

<montjoie> just a function that need non 0 return code to success
<apritzel> montjoie: awesome! Well done.
<MoeIcenowy> montjoie: congrats!
<montjoie> enabling hardware rx CRC
<montjoie> good news on pine64 I have now the same perf between both emac driver
<montjoie> plaes: thanks I need to suscribe to it
<plaes> montjoie: btw, have you seen this: http://marc.info/?l=linux-netdev&m=148649610912233&w=2 ?
<montjoie> wens: already sent stmmac clean up, will send v2 today
<wens> montjoie: i think you can send some of the stmmac clean up bits to netdev soonish?

2017-02-07

<montjoie> just after "mmcblk2: mmc2:0001 8WPD3R 7.28 GiB"
<montjoie> since the real mmc is mmc1
<montjoie> just see that "mmc2: new DDR MMC card at address 0001" on my bpim2+, does it is the nand ?
<montjoie> OtakuNekoP: sunxi.montjoie.ovh/ethernet/{uImage|sun8i-h3-bananapi-m2-plus.dtb}
<montjoie> MoeIcenowy: uboot config didnt change anything:(
<montjoie> "immediate launch of compilation"
<montjoie> oh diff for uboot sun8i-h3-orangepi-pc-plus vs orangepi_plus_defconfig I see MACPWR=SUNXI_GPD(6)
<montjoie> yes on the sun8i-emac branch
<MoeIcenowy> montjoie: is there any dt patches that enables sun8i-emac on bpi m2+?
<montjoie> it seems I used sun8i-h3-orangepi-pc-plus
<montjoie> good question
<MoeIcenowy> montjoie: which U-Boot config do you use for BPi M2+?
<MoeIcenowy> montjoie: I think he never compiled a mainline kernel.
<montjoie> never compiled a kernel ?
<OtakuNekoP_> montjoie: just tell me how pls :)
<montjoie> OtakuNekoP_: could you test sun8i-emac/dwmac-sun8i on it ?
<OtakuNekoP_> montjoie: the 10s test data, [ 3] 0.0-10.0 sec 904960 KBytes 741222 Kbits/sec, need longer?
<montjoie> I will try
<MoeIcenowy> montjoie: OtakuNekoP got 740Mbps on his BPi M2+ with 3.4 kernel
<wens> montjoie: i have to work out some new bindings for the prcm before any of that happens
<montjoie> I used your uboot tree also
<montjoie> wens: it is already the case
<wens> montjoie: well, there's no pmic support, so you have to enable the related regulators in u-boot
<montjoie> without it, I need to refound where I put your old tree source for it
<montjoie> wens: I vote for A83T support:)
<montjoie> I got also bpim3
<wens> montjoie: what other boards do you have? i just re-did a83t ccu support
<montjoie> and it will be acceptable I think
<montjoie> just I need a minor change
<montjoie> but I found a similar way to do that in intel igb intree
<montjoie> Because I follow NAPI doc from linux-fundation and in fact he dont like that
<KotCzarny> montjoie: why so?
<montjoie> but the napi perf patch got nuked by dmiller:)
<montjoie> waited to retest it on pine64 since it is the only real gigabit board I got
<montjoie> I need to publish last version
<montjoie> perhaps
<montjoie> not tested
<montjoie> randomly get 100 or 180
<montjoie> with sun8i-emac the max TX is 180
<MoeIcenowy> montjoie: even with BSP/sun8i-emac?
<montjoie> gigabit that does 100megabit
<MoeIcenowy> montjoie: ;-)
<montjoie> I hate bpim2+

2017-02-04

<willmore> lurchi_, are yo using the BSP kernel or mainline? montjoie has stopped work on the driver for mainline and is instead working on adapting the existing mainline driver to work on Alwinner chips. You might look to his repo.
<lurchi_> u-boot 2016.11, kernel 4.9.6 + montjoie stmmac patches

2017-01-31

<montjoie> happy to have "a second chance" over serial
<montjoie> yes I just find in screen man to do ctrl a ctrl b
<KotCzarny> montjoie: https://lkml.org/lkml/2014/2/3/251 ?
<montjoie> does someone know how to magic sysrq over uart ?

2017-01-28

<montjoie> plaes: I will clean
<montjoie> probably hwrng will never come to mainline
<montjoie> I will update hwrng
<plaes> montjoie: btw, you have two entries there - sunxi-ss and hwrng
<montjoie> plaes: and thanks for using good wiki commit log, I hate people that change something with message "status matrix":)
<montjoie> mirceac: wens has an a83t tree

2017-01-25

<wens> montjoie: op-tee doesn't have much code for the a80, so it's probably equally broken :/
<wens> montjoie: the problem is just setting the core to non-secure does not fully secure the SoC
<montjoie> wens: if you need some help for securing A80, optee support it with some ASM, perhaps it could help you

2017-01-21

<montjoie> MoeIcenowy: I have a fix to push for that
<MoeIcenowy> montjoie: /home/icenowy/git-repos/cryptotest/kernel/cryptotest.c:133:8: error: implicit declaration of function 'crypto_alloc_ablkcipher' [-Werror=implicit-function-declaration]
<MoeIcenowy> montjoie: "sun4i-ss 1c15000.crypto-engine: Die ID 7" is it an expected dmesg output?
<montjoie> MoeIcenowy: with https://github.com/montjoie/cryptotest
<MoeIcenowy> montjoie: do you have a way to test sun4i-ss?
<MoeIcenowy> montjoie: I tried to change phy_mode to rgmii and the internal_phy property in sun8i-emac to RGMII thing.
<MoeIcenowy> montjoie: maybe it put a PHY designed as 1000Mbps there, then tested, but found the performance is much low than 1000Mbps, then named it 100Mbps

2017-01-20

<montjoie> so even opipc could in theory gain some perf beyond 100Mbit/s
<montjoie> like I just said before, it is interesting that the internal phy accept RGMII and negociate gigabit link
<montjoie> in fact I needed to chaneg syscon and reset before probing MDIO
<montjoie> wens: yes, but I believed that the probem would be a priority problem
<wens> montjoie: 0 is kind of like a broadcast address
<wens> montjoie: fyi, the rtl8211e responds to both 0 and the phy address programmed through the phyaddr pins
<montjoie> interesting that the internal phy branded as 100 could negociate 1G
<montjoie> I note "change syscon / reset the board then register MDIO bus"
<montjoie> still bad perf
<MoeIcenowy> montjoie: congrats ;-)
<montjoie> it is the return of great realtek phy:)
<montjoie> mdio_reset should fix that
<montjoie> MoeIcenowy: I think the problem is that stmmac register the mdio before any int/extphy choose, and so libphy probe internal phy and get stuck on it
<montjoie> by EPHY you means internalphy ?
<MoeIcenowy> montjoie: I think you should try to probe the phy id of both internal and external phy with sun8i-emac...
<montjoie> and something in my driver still select internal phy
<montjoie> MoeIcenowy: but certainly the ac200 is the internal phy
<montjoie> just need to boot my opipc
<montjoie> the Id can be printed via phydev->id
<montjoie> I use 0 also
<montjoie> but another problem, I wrongly said that I use reg 1 with stmmac
<montjoie> the phy_print_status do not print it
<montjoie> need to print it
<montjoie> seems weird
<montjoie> physically it can, if only one is powered
<montjoie> yes
<montjoie> multiple phy can be on that bus
<montjoie> EMAC speak on the MDIO bus
<montjoie> and so it is why my "probes just after" give me ac200 for slot 0
<montjoie> but if you probe 1, it become the default
<montjoie> and 0 is the dhcp for phy, so it seems realtek answer first
<montjoie> so two phy wired
<montjoie> with stmmac, in DT I set 1
<montjoie> I think to see the problem, with sun8i-emac the phy slot is 0
<montjoie> I am mad
<montjoie> lol, according to loghost it seems that yesterday I booted with sun8i-emac and realtek phy was here
<montjoie> if it give me random id, what a chance to alsways have the same
<MoeIcenowy> montjoie: seems that it's impossible to be an AC200...
<montjoie> its the phylib that does that
<montjoie> just thinked that I have a loghost for all log, and in august the board has a RTL8211E Gigabit Ethernet
<montjoie> good perf was in the past in my memory
<montjoie> I got the same perf with sun8i-emac now
<montjoie> the furthermore strange thing, is that I am nearly sure to get good perf when working on sun8i-emac on that board
<montjoie> just in case , other RGMII ?
<MoeIcenowy> montjoie: one of my friend in Sinovoip says that it's RTL8211D/E
<montjoie> but the code size is not large
<montjoie> MoeIcenowy: yes more dedicated since dma register are different
<MoeIcenowy> montjoie: I think this glue is the most dedicated glue among stmmac glues?
<montjoie> first I need to send the 15 patch against stmmac I had
<KotCzarny> montjoie: call it efficiency patch
<montjoie> yes it work, but I wanted to test the "speed patch"
<montjoie> MoeIcenowy: you can find it on github, and I wanted to test gigabit on H3
<MoeIcenowy> montjoie: could you at first sort out your sun8i-stmmac driver? ;-)
<montjoie> where do come this ac200 phy
<montjoie> but i want to know the end of this PHY mistery
<KotCzarny> montjoie: at least you can go back to real boards ;)
<montjoie> raaaah I forgot a ++ and now my bpim2+ is stuck scanning phy, and no remote power off:(
<montjoie> and the source dump someone give yesterday show the reset function commented
<montjoie> seems not production safe:)
<montjoie> but their phy driver I try block the phy
<montjoie> verified from BSP sources
<montjoie> 441400
<MoeIcenowy> montjoie: I asked someone from Sinovoip
<montjoie> but the phy id comes from somewhere
<montjoie> didnt check yet
<montjoie> I will add some debug to scan all phy slot
<montjoie> ac200 for sure (phy id)
<MoeIcenowy> montjoie: so what is it? ac200 or rtk phy?
<montjoie> but the trouble fact is that I see a realtek chip on my board
<montjoie> tkaiser: silkprint said banapi v1.1
<montjoie> probably the loss on RX is due to CRC offload disabled
<montjoie> strange, normally TX < RX
<montjoie> ErwinH: 423 is with -R ?
<montjoie> anybody with a running bpim2+ ?
<montjoie> thanks for the test
<ErwinH> montjoie: stmmac works on OrangePi PC2 as well.

2017-01-19

<tkaiser> montjoie: They also sent out broken dev samples to the guys wanting to improve camera drivers. None of the boards sent was able to operate with their own camera (two small hand soldered resistors where on PCB rev 1.0).
<montjoie> I will read tonight, it is remote
<tkaiser> montjoie: What's written on the board as version?
<montjoie> the other boards sent works
<tkaiser> montjoie: At least I'm not surprised that BPi people are that 'smart' to send developers crappy hardware to ensure they can't support the board
<montjoie> smell non production board
<montjoie> the other board with AC200 is the homlet A83T
<tkaiser> montjoie: V1.1 is the one from production batches, also RTL8211E equipped.
<montjoie> it's a sample from foxconn, so perhaps its not a prod one
<montjoie> I will check the hw version
<tkaiser> montjoie: Between RTL chip and H3 it's printed 'BPi M2 Plus V1.0' (the broken version where camera doesn't work)
<tkaiser> montjoie: My BPi M2+ has RTL8211E as usual
<montjoie> and perhaps bad perf due to "handlded as generic phy"
<montjoie> so bpim2+ has an allwinner ac200 PHY, no datasheet
<montjoie> plaes: ok
<plaes> montjoie: please send the notice to mailing list
<montjoie> KotCzarny: not a realtek phy
<montjoie> perhaps
<montjoie> very strange this bpim2+ it is the only one where flow control is enabled
<montjoie> plaes: your mmc fix work
<montjoie> I am sure to has better perf before
<montjoie> very strange
<montjoie> bananapi m2+ have horrible perf 100Mb/s on a gigabit link
<montjoie> june! its old, does he still work on this ?
<igraltist> montjoie: i did it with old kernel like: cat /sys/class/thermal/thermal_zone0/temp
<montjoie> igraltist: you mean via the sun4i_ts ?
<montjoie> thanks
<montjoie> I note your numbers for adding them as example in commitlog
<KotCzarny> montjoie, yeah, 14677 with your patch, 35004 without
<montjoie> as a client
<montjoie> with ly patch the number should be less
<montjoie> you could try to compare number of interupt
<KotCzarny> montjoie: is there specific situation i should try?
<montjoie> KotCzarny: you said yesterday you got only 280Mbit/s
<KotCzarny> montjoie: 910/710 with the patch
<KotCzarny> let's see montjoies patch
<montjoie> terra854: native compiling also in early times, but on NFS
<montjoie> terra854: cross compiling
<montjoie> KotCzarny: or try directly the github repo
<KotCzarny> montjoie: that patch also failed on 4.9.4
<montjoie> plaes: will test

2017-01-18

<plaes> montjoie, jonkerj: could you try the patch I posted on mailinglist on top of current mainline?
<KotCzarny> montjoie: http://pastebin.com/raw/L8EpykpQ
<montjoie> 4.8, too old:)
<wens> montjoie: i meant the whole directory :p
<montjoie> wens: I think the official name will be dwmac-sun8i as the glue file
<montjoie> KotCzarny: yes no need to anything else for testing this patch
<montjoie> just add the patch nothing more is needed
<montjoie_> yes
<montjoie> KotCzarny: could you try my "speed" patch on your bpi ? just in case of:)
<montjoie> KotCzarny: I always enjoyed coding
<KotCzarny> montjoie: you seem to enjoy coding again ;)
<montjoie> https://github.com/montjoie/linux/commit/d9b75d82527af73b4d8365b039cfb334b1193e30 is the speed fix is people want to test it for "legacy stmmac"
<montjoie> pushed:)
<montjoie> ErwinH: yes I will push soon my "speed fix"
<montjoie> when h5 hits git I will add it
<montjoie> ErwinH: if H5 is the same as H3, you could test with the same compatible
<ErwinH> montjoie: If you need me to test the driver on H5, just shout.
<montjoie> in fact perhaps it is not a stmmac at all, but since packet mangement is the same...
<montjoie> but all packet descriptor are the same
<montjoie> only the first register have the same use
<montjoie> dgp: it is a modified version by allwinner
<montjoie> aka "stable"
<montjoie> ErwinH: for the moment sun8i-emac is the best choice
<montjoie> it's that
<montjoie> the hardware works, since it works with sun8i-emac
<willmore> montjoie, does not work in the driver or on the hardware?
<montjoie> for an unknow reason offload of RX CRC does not work
<montjoie> 500M both direction
<montjoie> glorrrrryyyyy
<montjoie> perhaps it could boost perf on other stmmac:D
<montjoie> it seems that I found the bug which made stmmac slow
<montjoie> stmmac use a lock in txclean, I pray it was the bottleneck
<ErwinH> It's the same as with the H5 OrangePi PC2, with the driver/kernel from Xunlong it reaches 450mbit/s but with the driver from montjoie it runs at full speed (950mbit/s)
<montjoie> ok
<montjoie> but still twice as mine
<montjoie> ouch 280:)
<KotCzarny> montjoie: 860mbit when bpi-r1 is a server and 280mbit when its a client
<montjoie> ok
<beeble> montjoie: 928-940 rx/tx pretty much the same
<beeble> montjoie: and sun9i
<montjoie> beeble: ok I could wait
<beeble> montjoie: rk3368, but can only try later today since it's in use right now
<montjoie> it will help me:)
<montjoie> if you could try
<montjoie> cool, what iperf give you ?
<montjoie> but in 100Mbit
<montjoie> (official stmmac, so non-h3/a64)
<montjoie> anybody here with a gigabit stmmac ?
<montjoie> and it fail also on bpi+ if I remember
<montjoie> opipc
<plaes> montjoie: which board did you have?
<montjoie> if someone found the missing patch, it must be sent for 4.10rc
<plaes> montjoie, jonkerj o/
<montjoie> like my cubie2
<montjoie> wens: yes I just need to test one of it on a stmmac nonsun8i
<wens> montjoie: i think you can send out some cleanup patches first

2017-01-17

<montjoie> so anybody here tried optee on AW stuff ?
<montjoie> the hard work is done
<willmore> montjoie, good luck!
<montjoie> yeah still some gaps I need to fullfill
<montjoie> perhaps some function are missing:)
<montjoie> and -d just segfault:D
<montjoie> nothing that can help to identify for -S
<montjoie> but I need to recheck
<montjoie> so perhaps not a gmac4
<montjoie> and get 0
<montjoie> it try to read sysnopsys_id
<montjoie> ETOOHACKEDBYALLWINNER
<montjoie> dont know
<willmore> montjoie, I was think of the the H3/H5/A64
<montjoie> you means all other glued driver in stmmac dir ?
<montjoie> these ?
<willmore> montjoie, what generation of GMAC is on these chips?
<montjoie> all stmmac driver use non-chainmode
<willmore> montjoie, do all existing drivers use ring buffer mode instead of chain mode? chain mode is popular in Intel NICs, IIRC.
<willmore> Unless montjoie feels that the framework of the driver will never allow full performance. Then there's room for arguement.
<willmore> I think montjoie is on the right path. Get the existing driver to support the new hardware. Then improve that driver to make all hardware work better.
<montjoie> KotCzarny: there are a dozen of glue to stmmac, porting them without hardware should be hard
<KotCzarny> montjoie: maybe do the other thing, ie port stmmac to your driver?
<montjoie> since chain_mode is an optionnal argument, perhaps nobody use it and so bad perf
<montjoie> willmore: I need to, on pine64 the perf of stmmac is awful
<willmore> montjoie, now do you port the improvements from the emac driver to the stmmac driver?
<montjoie> jonkerj: bisected to a mripard commit in pinctrl BUT the last two kernel produce kernel crash and not mmc timeout
<jonkerj> montjoie: did you manage to find the cause of the MMC error when running very recent kernel?
<montjoie> plaes: fix uploaded
<montjoie> jonkerj: sun8i-emac is in fact a modified dwmac and so the driver become a glue to the mainline stmmac driver
<montjoie> :)
<plaes> montjoie: last commit, you can now remove Ethernet Phy from the todo :P
<montjoie> apritzel, if you want to test
<montjoie> glued to stmmac
<montjoie> the ethernet driver for A64/H3/A83T/H5/etc...
<montjoie> ouch sun8i-stmmac perf:( (450 vs 756 and 140 vs 500)
<montjoie> yeah pine64 booted with stmmac
<montjoie> kristina: you can read the datasheet, SMC and SMTA is documented
<montjoie> it detect only half the device without error
<montjoie> raaah stmmac load on pine64, but never call open

2017-01-16

<montjoie> perhaps I could start sent it for review within a month
<montjoie> just finished sun8i-stmmac support for internal phy, will push code soon

2017-01-15

<montjoie> so it is why all people with gigabit ethernet didnt see this issue
<montjoie> ooooh just added internal phy clk/rsr and boum, mmc timeout
<montjoie> apritzel: and anybodey with the mmc timeout, linux-next work on opipc so 4.10 is missing a patch