Linux 3.16 LTS Kernel for Odroid C2

Moderators: odroid, mdrjr

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby t.moreau » Tue Apr 03, 2018 11:33 pm

Thanks for 3.16.56.

Success for kernel upgrade in Ubuntu and also ArcLinux (https://archlinuxarm.org/platforms/armv8/amlogic/odroid-c2).

Compiled with GCC 7.3, booted from SD device.

Not a great validation of kernel features, but the clone-configure-build-install-boot process went smoothly.

Regards,

- T.
t.moreau
 
Posts: 4
Joined: Wed Mar 28, 2018 3:40 am
languages_spoken: french, english
ODROIDs: C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby odroid » Wed Apr 04, 2018 7:59 am

Glad to hear ArchLinux also runs alive 3.16 LTS with the recent GCC version.
User avatar
odroid
Site Admin
 
Posts: 27713
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby jesusrp » Fri Apr 20, 2018 5:11 am

Are there plans to release this kernel in the official update chanel, I mean "sudo apt-get upgrade" or "sudo apt-get dist-upgrade"?
jesusrp
 
Posts: 90
Joined: Mon May 02, 2016 9:55 pm
languages_spoken: english

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby meveric » Fri Apr 20, 2018 5:33 am

Already done so for Debian Jessie, Debian Stretch and DietPi.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 8625
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Firestorm » Tue Apr 24, 2018 3:29 am

I’ve been using the Ubuntu Mate image on my Odroid C2 for the past year with the 3.14 kernel that I use as my home router – the onboard gigabit Ethernet (eth0) is used for my LAN and I use a USB 3.0 Ethernet adapter (eth1) to connect to my cable modem and ISP. It has been working flawlessly and I love it. Over the weekend I decided to cross-compile the 3.16 kernel on a PC desktop running Ubuntu using https://github.com/hardkernel/linux.git. I encountered no problems building the kernel and after installing it and booting up everything seemed to work great.

However, a few hours later I lost internet connectivity. I executed “ifdown eth1 && ifup eth1” and it restored my connectivity until it stopped again a few hours later. I have gone back to my 3.14 SD card for now and would be happy to provide additional information upon request. Here’s what I see in syslog – it repeats like this over and over again:

Apr 22 18:32:01 jackson kernel: [19160.446989] r8152 1-1.4:1.0 eth1: Tx timeout
Apr 22 18:32:01 jackson kernel: [19160.447041] WARN::urb_dequeue:780: urb->hcpriv == NULL! urb = ffffffc058d203c0 status=-104
Apr 22 18:32:01 jackson kernel: [19160.447041]
Apr 22 18:32:01 jackson kernel: [19160.447066] WARN::urb_dequeue:780: urb->hcpriv == NULL! urb = ffffffc058d20c00 status=-104
Apr 22 18:32:01 jackson kernel: [19160.447066]
Apr 22 18:32:01 jackson kernel: [19160.447088] WARN::urb_dequeue:780: urb->hcpriv == NULL! urb = ffffffc058d20300 status=-104
Apr 22 18:32:01 jackson kernel: [19160.447088]
Apr 22 18:32:01 jackson kernel: [19160.447098] WARN::urb_dequeue:780: urb->hcpriv == NULL! urb = ffffffc058d20a80 status=-104
Apr 22 18:32:01 jackson kernel: [19160.447098]
Apr 22 18:32:01 jackson kernel: [19160.447119] WARN::urb_dequeue:780: urb->hcpriv == NULL! urb = ffffffc058d20240 status=-104
Apr 22 18:32:01 jackson kernel: [19160.447119]
Apr 22 18:32:01 jackson kernel: [19160.447173] net_ratelimit: 47 callbacks suppressed
Apr 22 18:32:01 jackson kernel: [19160.447181] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 22 18:32:01 jackson kernel: [19160.447186] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 22 18:32:01 jackson kernel: [19160.447192] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 22 18:32:01 jackson kernel: [19160.447197] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 22 18:32:01 jackson kernel: [19160.447203] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 22 18:32:01 jackson kernel: [19160.447208] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 22 18:32:01 jackson kernel: [19160.447213] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 22 18:32:01 jackson kernel: [19160.447218] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 22 18:32:01 jackson kernel: [19160.447224] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 22 18:32:01 jackson kernel: [19160.447229] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 22 18:32:02 jackson kernel: [19161.446948] r8152 1-1.4:1.0 eth1: Tx timeout
Firestorm
 
Posts: 26
Joined: Sun Apr 08, 2018 4:19 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby odroid » Tue Apr 24, 2018 8:47 am

@Firestorm,

Thank you for the feedback. We didn't test any USB-Ethernet bridge device on Kernel 3.16.
Did you use "ondemand" governor? or "performance"?
User avatar
odroid
Site Admin
 
Posts: 27713
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Firestorm » Tue Apr 24, 2018 9:41 am

I haven't specified a governor in any context (you'd have to offer direction if you'd like me to set it), but here's what I see on my system running under the different kernels:

v3.14.79-116 $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
interactive

v3.16.56+ $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand
Last edited by Firestorm on Tue May 01, 2018 2:17 pm, edited 1 time in total.
Firestorm
 
Posts: 26
Joined: Sun Apr 08, 2018 4:19 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Firestorm » Tue Apr 24, 2018 10:00 am

I booted off v3.16 and tried to set the governor:

echo performance > /sys/devices/system/cpu/cpo0/cpufreq/scaling_governor

I'll see what happens.
Firestorm
 
Posts: 26
Joined: Sun Apr 08, 2018 4:19 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby odroid » Tue Apr 24, 2018 10:31 am

If your system changes the governor to "interactive" or "ondemand" randomly, try this command to keep the "performance" governor.
Code: Select all
echo 'GOVERNOR="performance"' | sudo tee /etc/default/cpufrequtils; sudo update-rc.d ondemand disable; systemctl mask ondemand;
User avatar
odroid
Site Admin
 
Posts: 27713
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Firestorm » Tue Apr 24, 2018 11:21 am

I just lost internet connectivity and I see the same thing in syslog as before. The CPU governor was set to 'performance'.
Firestorm
 
Posts: 26
Joined: Sun Apr 08, 2018 4:19 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby odroid » Tue Apr 24, 2018 11:31 am

Can you check the governor again?
Did it keep "peformance" over one hour?

Please also try to assign some heavy USB IRQs to other CPU cores with a simple script file.
Code: Select all
echo 2 > /proc/irq/40/smp_affinity   # eth0
echo 4 > /proc/irq/63/smp_affinity   # dwc_otg, dwc_otg_hcd:usb1
echo 8 > /proc/irq/62/smp_affinity   # dwc_otg, dwc_otg_hcd:usb2, dwc_otg_pcd

And check cat /proc/interrupts output.
User avatar
odroid
Site Admin
 
Posts: 27713
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Firestorm » Tue Apr 24, 2018 1:04 pm

I previously lost connectivity within 15 minutes after applying the commands you offered to keep the ‘performance’ governor setting – it was still set to ‘performance’ after I noticed the problem. I rebooted and it was already set to ‘performance’ and I’ll keep an eye on the uptime if/when it happens again.

Here are the contents of /proc/interrupts after setting the heavy USB IRQs:
Code: Select all
           CPU0       CPU1       CPU2       CPU3
 25:          0          0          0          0       GIC  25  vgic
 35:      37246          0          0          0       GIC  35  osd_vsync, vsync
 38:      62420          0          0          0       GIC  38  timerC
 40:       1308       6988          0          0       GIC  40  eth0
 58:          0          0          0          0       GIC  58  meson_uart
 62:          0          0          0          0       GIC  62  dwc_otg, dwc_otg_hcd:usb2, dwc_otg_pcd
 63:     628162          0    4390886          0       GIC  63  dwc_otg, dwc_otg_hcd:usb1
 78:          0          0          0          0       GIC  78  deinterlace
 89:          2          0          0          0       GIC  89  hdmitx
 92:      40730          0          0          0       GIC  92  MESON TIMER-F
 93:          0     118004          0          0       GIC  93  MESON TIMER-G
 94:          0          0      93439          0       GIC  94  MESON TIMER-H
 95:          0          0          0      17851       GIC  95  MESON TIMER-I
 99:          1          0          0          0       GIC  99  sd_emmc_mmc_in
101:          1          0          0          0       GIC 101  sd_emmc_mmc_out
121:      37245          0          0          0       GIC 121  rdma, osd_rdma
182:          0          0          0          0       GIC 182  ge2d
192:          0          0          0          0       GIC 192  Mali_GP
193:          0          0          0          0       GIC 193  Mali_GP_MMU
194:          0          0          0          0       GIC 194  Mali_PP_Broadcast
196:          0          0          0          0       GIC 196  Mali_PP0
197:          0          0          0          0       GIC 197  Mali_PP0_MMU
198:          0          0          0          0       GIC 198  Mali_PP1
199:          0          0          0          0       GIC 199  Mali_PP1_MMU
200:          0          0          0          0       GIC 200  Mali_PP2
201:          0          0          0          0       GIC 201  Mali_PP2_MMU
225:         49          0          0          0       GIC 225  meson_uart
228:          1          0          0          0       GIC 228  ir-meson
231:          4          0          0          0       GIC 231  hdmi_aocec
241:        636          0          0          0       GIC 241
242:          3          0          0          0       GIC 242
249:       6982          0          0          0       GIC 249  sd_emmc
250:          4          0          0          0       GIC 250  sd_emmc
IPI0:     26785      23494      23738      33083       Rescheduling interrupts
IPI1:         9         16         14         16       Function call interrupts
IPI2:       239          4          3        110       Single function call interrupts
IPI3:         0          0          0          0       CPU stop interrupts
IPI4:         0          0          0          0       Timer broadcast interrupts
IPI5:         0          0          0          0       IRQ work interrupts
Err:          0
Firestorm
 
Posts: 26
Joined: Sun Apr 08, 2018 4:19 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Firestorm » Tue Apr 24, 2018 1:15 pm

Here is syslog output when the problem occurs (from earlier today)
Code: Select all
Apr 23 21:06:19 jackson kernel: [ 4195.920474] ------------[ cut here ]------------
Apr 23 21:06:19 jackson kernel: [ 4195.920522] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:264 dev_watchdog+0x278/0x284()
Apr 23 21:06:19 jackson kernel: [ 4195.920538] NETDEV WATCHDOG: eth1 (r8152): transmit queue 0 timed out
Apr 23 21:06:19 jackson kernel: [ 4195.920544] Modules linked in: bridge stp llc tun fuse xt_TCPMSS xt_nat xt_multiport ipt_MASQUERADE xt_iprange xt_LOG xt_limit xt_recent ip6t_rt ip6t_REJECT xt_
conntrack ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack ip6table_filter ip6_tables iptable_filter ip_table
s ir_lirc_codec ir_mce_kbd_decoder lirc_dev ir_sony_decoder ir_jvc_decoder ir_sanyo_decoder ir_rc6_decoder ir_rc5_decoder ir_nec_decoder meson_ir zram lz4_decompress lz4_compress rtl8192cu rtl_us
b rtlwifi rtl8192c_common mac80211 cfg80211 r8152 gxbb_wdt meson_gpiomem ipv6 autofs4
Apr 23 21:06:19 jackson kernel: [ 4195.920698] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.16.56+ #1
Apr 23 21:06:19 jackson kernel: [ 4195.920703] Call trace:
Apr 23 21:06:19 jackson kernel: [ 4195.920713] [<ffffffc001088db0>] dump_backtrace+0x0/0x144
Apr 23 21:06:19 jackson kernel: [ 4195.920718] [<ffffffc001088f14>] show_stack+0x20/0x28
Apr 23 21:06:19 jackson kernel: [ 4195.920725] [<ffffffc00187bb08>] dump_stack+0x80/0xa4
Apr 23 21:06:19 jackson kernel: [ 4195.920732] [<ffffffc0010aaf48>] warn_slowpath_common+0x9c/0xc0
Apr 23 21:06:19 jackson kernel: [ 4195.920737] [<ffffffc0010aafe4>] warn_slowpath_fmt+0x78/0x88
Apr 23 21:06:19 jackson kernel: [ 4195.920742] [<ffffffc00176ce28>] dev_watchdog+0x278/0x284
Apr 23 21:06:19 jackson kernel: [ 4195.920750] [<ffffffc0010b904c>] call_timer_fn+0x60/0x1b8
Apr 23 21:06:19 jackson kernel: [ 4195.920756] [<ffffffc0010b9abc>] run_timer_softirq+0x214/0x30c
Apr 23 21:06:19 jackson kernel: [ 4195.920761] [<ffffffc0010b060c>] __do_softirq+0xd8/0x36c
Apr 23 21:06:19 jackson kernel: [ 4195.920766] [<ffffffc0010b0b60>] irq_exit+0x98/0xc8
Apr 23 21:06:19 jackson kernel: [ 4195.920771] [<ffffffc0010848d4>] handle_IRQ+0x78/0xe8
Apr 23 21:06:19 jackson kernel: [ 4195.920776] [<ffffffc001081474>] gic_handle_irq+0x48/0x8c
Apr 23 21:06:19 jackson kernel: [ 4195.920781] Exception stack(0xffffffc001c7fdd0 to 0xffffffc001c7fef0)
Apr 23 21:06:19 jackson kernel: [ 4195.920786] fdc0:                                     01c7c000 ffffffc0 01d56000 ffffffc0
Apr 23 21:06:19 jackson kernel: [ 4195.920793] fde0: 01c7ff10 ffffffc0 01085340 ffffffc0 010f1f3c ffffffc0 01ab4420 ffffffc0
Apr 23 21:06:19 jackson kernel: [ 4195.920799] fe00: 01c7fea0 ffffffc0 00000001 00000000 00000014 00000000 00000418 00000000
Apr 23 21:06:19 jackson kernel: [ 4195.920805] fe20: 25c17d03 00000002 1be43e11 00000000 00000015 00000000 01c7fe60 ffffffc0
Apr 23 21:06:19 jackson kernel: [ 4195.920811] fe40: 00000400 00000000 00000400 00000000 00000000 00000000 00000000 00000000
Apr 23 21:06:19 jackson kernel: [ 4195.920817] fe60: 00000000 00000000 00000004 00000000 011ed2c0 ffffffc0 b1b3b988 0000007f
Apr 23 21:06:19 jackson kernel: [ 4195.920823] fe80: 00000000 00000000 01c7c000 ffffffc0 01d56000 ffffffc0 01890000 ffffffc0
Apr 23 21:06:19 jackson kernel: [ 4195.920830] fea0: 01d614e0 ffffffc0 01b15ed0 ffffffc0 01d553a4 ffffffc0 01a9ff30 ffffffc0
Apr 23 21:06:19 jackson kernel: [ 4195.920836] fec0: 00000001 00000000 01080478 ffffffc0 00000000 00000040 01c7ff10 ffffffc0
Apr 23 21:06:19 jackson kernel: [ 4195.920841] fee0: 0108533c ffffffc0 01c7ff10 ffffffc0
Apr 23 21:06:19 jackson kernel: [ 4195.920846] [<ffffffc001083da4>] el1_irq+0x64/0xd0
Apr 23 21:06:19 jackson kernel: [ 4195.920854] [<ffffffc0010f1f3c>] cpu_startup_entry+0x1b0/0x274
Apr 23 21:06:19 jackson kernel: [ 4195.920859] [<ffffffc001878ff4>] rest_init+0x8c/0x94
Apr 23 21:06:19 jackson kernel: [ 4195.920866] [<ffffffc001b95944>] start_kernel+0x38c/0x3a0
Apr 23 21:06:19 jackson kernel: [ 4195.920875] ---[ end trace 6b529cc6857ee91c ]---
Apr 23 21:06:19 jackson kernel: [ 4195.920886] r8152 1-1.4:1.0 eth1: Tx timeout
Apr 23 21:06:19 jackson kernel: [ 4195.920898] WARN::urb_dequeue:780: urb->hcpriv == NULL! urb = ffffffc073a64b40 status=-104
Apr 23 21:06:19 jackson kernel: [ 4195.920898]
Apr 23 21:06:19 jackson kernel: [ 4195.920908] WARN::urb_dequeue:780: urb->hcpriv == NULL! urb = ffffffc073a64600 status=-104
Apr 23 21:06:19 jackson kernel: [ 4195.920908]
Apr 23 21:06:19 jackson kernel: [ 4195.920917] WARN::urb_dequeue:780: urb->hcpriv == NULL! urb = ffffffc073a649c0 status=-104
Apr 23 21:06:19 jackson kernel: [ 4195.920917]
Apr 23 21:06:19 jackson kernel: [ 4195.920926] WARN::urb_dequeue:780: urb->hcpriv == NULL! urb = ffffffc073a64c00 status=-104
Apr 23 21:06:19 jackson kernel: [ 4195.920926]
Apr 23 21:06:19 jackson kernel: [ 4195.920935] WARN::urb_dequeue:780: urb->hcpriv == NULL! urb = ffffffc073a64cc0 status=-104
Apr 23 21:06:19 jackson kernel: [ 4195.920935]
Apr 23 21:06:19 jackson kernel: [ 4195.920944] WARN::urb_dequeue:780: urb->hcpriv == NULL! urb = ffffffc073a640c0 status=-104
Apr 23 21:06:19 jackson kernel: [ 4195.920944]
Apr 23 21:06:19 jackson kernel: [ 4195.920952] WARN::urb_dequeue:780: urb->hcpriv == NULL! urb = ffffffc073a64240 status=-104
Apr 23 21:06:19 jackson kernel: [ 4195.920952]
Apr 23 21:06:19 jackson kernel: [ 4195.920965] WARN::urb_dequeue:780: urb->hcpriv == NULL! urb = ffffffc073a64f00 status=-104
Apr 23 21:06:19 jackson kernel: [ 4195.920965]
Apr 23 21:06:19 jackson kernel: [ 4195.920974] WARN::urb_dequeue:780: urb->hcpriv == NULL! urb = ffffffc073a64840 status=-104
Apr 23 21:06:19 jackson kernel: [ 4195.920974]
Apr 23 21:06:19 jackson kernel: [ 4195.920983] WARN::urb_dequeue:780: urb->hcpriv == NULL! urb = ffffffc073a64a80 status=-104
Apr 23 21:06:19 jackson kernel: [ 4195.920983]
Apr 23 21:06:19 jackson kernel: [ 4195.921088] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 23 21:06:19 jackson kernel: [ 4195.921094] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 23 21:06:19 jackson kernel: [ 4195.921100] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 23 21:06:19 jackson kernel: [ 4195.921105] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 23 21:06:19 jackson kernel: [ 4195.921110] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 23 21:06:19 jackson kernel: [ 4195.921115] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 23 21:06:19 jackson kernel: [ 4195.921120] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 23 21:06:19 jackson kernel: [ 4195.921125] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 23 21:06:19 jackson kernel: [ 4195.921130] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 23 21:06:19 jackson kernel: [ 4195.921135] r8152 1-1.4:1.0 eth1: Tx status -104
Apr 23 21:06:19 jackson rsyslogd-2007: action 'action 9' suspended, next retry is Mon Apr 23 21:07:49 2018 [v8.16.0 try http://www.rsyslog.com/e/2007 ]
Apr 23 21:06:20 jackson kernel: [ 4196.920464] r8152 1-1.4:1.0 eth1: Tx timeout

Firestorm
 
Posts: 26
Joined: Sun Apr 08, 2018 4:19 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby odroid » Tue Apr 24, 2018 1:26 pm

Right. The IRQ from the USB Ethernet dongle seems to be a root cause of the crash, according to your log file. I hope the IRQ tweaking will help the stability.

BTW, what do you do with two Ethernet ports?
User avatar
odroid
Site Admin
 
Posts: 27713
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Firestorm » Tue Apr 24, 2018 2:08 pm

I imagine that most people use their cable modems or a third party router to provide them with a home network with internet and wifi access for their machines and devices. I use my Odroid C2 that is connected to my home network (eth0) and my Comcast cable modem (eth1 via USB) which is set to bridge mode with wifi disabled so I can manage my own network services with my own hardware. My C2 provides me with with a Comcast IPv4 address and IPv6 subnet and it offers a firewall, DNS caching, DHCP, and IP masquerading to my home network (I don't run DHCP on my wifi access points - all clients use my C2). I have a WiFi dongle so I can easily switch to my phone as a hotspot if I lose cable access as a backup. It's configured with a bridge and I can enable OpenVPN if I need to (it's currently not - not allowed on my corporate laptop). My setup has evolved over the years, starting with a Slackware CD and a 486 with an on-demand dial-up modem to serve a PC and a Mac (the Odroid C2 is a wonderful solution in terms of small size and low power consumption - perhaps more powerful than some of my earliest setups). More information here: https://forum.odroid.com/viewtopic.php?f=139&t=30699&p=220932#p220932
Firestorm
 
Posts: 26
Joined: Sun Apr 08, 2018 4:19 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby odroid » Tue Apr 24, 2018 2:21 pm

Understood. Glad to hear how C2 has nicely worked as an affordable network management system.
User avatar
odroid
Site Admin
 
Posts: 27713
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby mad_ady » Tue Apr 24, 2018 3:07 pm

I'll have a try as well on 3.16. @Firestorm, do you use any type of special traffic? I will run a continuous iperf and see what happens...

Edit:
Ok, I'm using a ax88179_178a, USB3 adapter which reports a 1G link speed on a C2 running 3.16.56. I'm running iperf and blasting it with 600Mbps UDP traffic from my PC. Only about 230Mbps make it to the Odroid and networking has reached congestion already. System load is low (0.4). I'm running conservative governor, and I have a bunch of interrupts on CPU0:
Code: Select all
 62:          0          0          0          0       GIC  62  dwc_otg, dwc_otg_hcd:usb2, dwc_otg_pcd
 63:   14364175          0          0          0       GIC  63  dwc_otg, dwc_otg_hcd:usb1

We'll see how it goes.
User avatar
mad_ady
 
Posts: 3649
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby moon.linux » Tue Apr 24, 2018 3:42 pm

@Firestorm consider patching the r182 driver form
http://www.realtek.com/downloads/downlo ... wn=false#2
to make this device work.
moon.linux
 
Posts: 1056
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby mad_ady » Tue Apr 24, 2018 4:58 pm

I've ran iperf/udp for an hour and everything was fine:
Code: Select all
[  3]  0.0-3600.3 sec  87.9 GBytes   210 Mbits/sec  15.598 ms 116484914/180676893 (64%)

I'm doing another hour with TCP now.

Edit: An hour of TCP traffic and everything is ok:
Code: Select all
[  3]  0.0-3600.0 sec  88.6 GBytes   211 Mbits/sec


I'll leave it overnight just in case, but I can't seem to reproduce the issue.
User avatar
mad_ady
 
Posts: 3649
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby crashoverride » Tue Apr 24, 2018 11:01 pm

The USB port being used also matters. The GB ethernet adapter should be the only device connected to the OTG port using an adapter cable. Connecting it to the 4 port hub will cause "split transactions" that generate more interrupts and require more processing.

I seem to recall that the 3.14 kernel had various USB patches and tweaks. This may explain the differences in behavior.

Another suggestion is to limit the GB ethernet adapter to 100Mbs operation. This will ensure that it can not saturate the USB port and will help isolate the problem.
crashoverride
 
Posts: 3467
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby mad_ady » Tue Apr 24, 2018 11:19 pm

I agree, but I was hoping to create a worse case scenario. I also have a wifi dongle working as access point in the 4-port hub. I 'm also doing "downloads" to generate as many interrupts as possible. Hmm. I shouldn't use iperf, but use a syn flood to drive interrupts higher...
User avatar
mad_ady
 
Posts: 3649
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Firestorm » Wed Apr 25, 2018 12:12 am

@odroid, my eth1 connection stayed up for more than an hour, but similarly lost connectivity overnight with the heavy USB IRQs applied.

@mad_ady, I'm not aware of any special traffic. My network supports IPv4 and IPv6.

@moon.linux, thank you for the suggestion, but I'm not sure how to proceed. I tried to update my kernel source with the updated Realtek driver, but that didn't work (wasn’t sure what to do with the original and new Makefiles that conflicted). I built the module standalone on my PC (C2 doesn't have 3.16.56+ headers because I didn’t build it there and they aren’t available via apt-get) and transferred it to my C2 and tried to update the module on disk and execute ‘sudo update-initramfs –u –k 3.16.56+’, but now eth1 isn’t loaded at all on startup. I’ll restore my backed up 3.16.56+ image to an SD card again tonight (and re-apply the 'performance' governor) and see if there are any new suggestions.

@crashoverride – interesting suggestion to use the OTG port with an adapter cable. I purchased a cable from Amazon and it should arrive on Thursday.

I appreciate you folks digging in to this - thank you!
Firestorm
 
Posts: 26
Joined: Sun Apr 08, 2018 4:19 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Firestorm » Wed Apr 25, 2018 12:29 pm

I managed to cross-compile and successfully boot a 3.16.56+ kernel with the v2.10.00 Realtek RTL8152/RTL8153 Based USB Ethernet Adapter driver. I'm running it now and will report back my experience. I had to make the following addition to include/uapi/linux/mii.h to address a compilation error:
Code: Select all
#define BMCR_SPEED10            0x0000  /* Select 10Mbps               */
Firestorm
 
Posts: 26
Joined: Sun Apr 08, 2018 4:19 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby mad_ady » Wed Apr 25, 2018 6:05 pm

No problem after 10h of iperf traffic:
Code: Select all
[  3]  0.0-36000.0 sec   888 GBytes   212 Mbits/sec
User avatar
mad_ady
 
Posts: 3649
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Firestorm » Thu Apr 26, 2018 11:42 am

I’ve experienced no problems over the past day running the 3.16.56+ kernel with a patched v2.10.00 r8152.ko (hooray!). I’m using the performance governor and I have set the heavy USB IRQs. I'll continue to use this configuration (no reason yet not to) and report any issues. Will keep the performance governor and will try without setting the IRQs next.

Is it permissible to upgrade the Realtek r8152 kernel module for hardkernel’s odroidc2-v3.16.y?

FWIW, my device is a TechRise USB 3.0 to RJ45 Gigabit Ethernet LAN Network Adapter.
Firestorm
 
Posts: 26
Joined: Sun Apr 08, 2018 4:19 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby odroid » Thu Apr 26, 2018 12:14 pm

Thank you for the report.
If there is no issue for a few more days, we will update the rtl815x driver.
Please give us a green signal in early next week.
A pull-request to our github will be great.
User avatar
odroid
Site Admin
 
Posts: 27713
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Firestorm » Sun Apr 29, 2018 6:23 am

I've collected iperf numbers using kernel v3.14 with r8152 v1.04 and kernel v3.16 with r8152 v2.10 using the OTG host port and the 4 USB port. I tried to collect numbers using kernel v3.16 with r8152 v1.04 but it wasn't stable enough for a single trial.

Code: Select all
Trial    3.14.79-116       3.16.56+   
        r8152 v1.04.0   r8152 v2.10.00   
         OTG    4 USB    OTG    4 USB
                 Mbits / sec
1        281     280     297     293
2        282     280     298     293
3        282     281     300     293
4        281     280     298     292
5        282     281     300     292
6        281     280     299     293
7        282     281     300     293
8        282     281     300     293
9        281     280     299     293
10       281     280     299     295
Average  282     280     299     293

The numbers illustrate two points:

    1) Kernel v3.16 with the new driver is faster than v3.14 with the old driver

    2) Faster speeds can be achieved using the OTG Host port instead of the 4 USB port, and it seems more prominent using the newer driver. I would expect reduced bandwidth when other attached USB devices are using the shared bus.

I will definitely continue to use the OTG Host port with my USB Ethernet adapter. All internet traffic in my home (I have two teenagers) has been going through the USB Ethernet adapter on my Odroid C2 and it continues to be stable with kernel v3.16 and the new r8152 driver.
Last edited by Firestorm on Sun Apr 29, 2018 1:09 pm, edited 1 time in total.
Firestorm
 
Posts: 26
Joined: Sun Apr 08, 2018 4:19 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby odroid » Sun Apr 29, 2018 9:16 am

Thank you for sharing the test result of r8152 v2.10 driver.
We will merge it.
User avatar
odroid
Site Admin
 
Posts: 27713
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Firestorm » Sun Apr 29, 2018 11:36 am

I've submitted a pull request - thanks!
Firestorm
 
Posts: 26
Joined: Sun Apr 08, 2018 4:19 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby odroid » Wed May 02, 2018 11:59 am

User avatar
odroid
Site Admin
 
Posts: 27713
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby rooted » Wed May 02, 2018 12:18 pm

odroid wrote:Ok. It has been merged.
https://github.com/hardkernel/linux/com ... c2-v3.16.y
I've commented on this at GitHub, I don't think it should be done in that way.

You have to keep the full history of changes for kernel sanity, also I don't think compatibility.h should have been renamed.

Other than that it's nice to see the update :)
User avatar
rooted
 
Posts: 4712
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby tobetter » Wed May 02, 2018 12:26 pm

rooted wrote:
odroid wrote:Ok. It has been merged.
https://github.com/hardkernel/linux/com ... c2-v3.16.y
I've commented on this at GitHub, I don't think it should be done in that way.

You have to keep the full history of changes for kernel sanity, also I don't think compatibility.h should have been renamed.

Other than that it's nice to see the update :)

Technically I agree with you, we could see if the change is stable enough to mitigate the stability as 'Firestorm' mentioned then we could fix it later and apply for other branches as well. :lol:
tobetter
 
Posts: 2159
Joined: Mon Feb 25, 2013 10:55 am
Location: Kitchener, ON, Canada
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Firestorm » Wed May 02, 2018 12:46 pm

Please do what you feel is right. This was my first attempt at "kernel development" so I'm not surprised it didn't go without a hitch. FWIW, I was concerned that some other driver might have their own compatibility.h down the road and since this was specific to the r8152 driver it made sense to me to rename it. I don't understand the comment about "the history of this edit is missing" - please enlighten me since I thought that git maintains the history and the deltas.
Firestorm
 
Posts: 26
Joined: Sun Apr 08, 2018 4:19 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby rooted » Wed May 02, 2018 12:50 pm

tobetter wrote:
rooted wrote:
odroid wrote:Ok. It has been merged.
https://github.com/hardkernel/linux/com ... c2-v3.16.y
I've commented on this at GitHub, I don't think it should be done in that way.

You have to keep the full history of changes for kernel sanity, also I don't think compatibility.h should have been renamed.

Other than that it's nice to see the update :)

Technically I agree with you, we could see if the change is stable enough to mitigate the stability as 'Firestorm' mentioned then we could fix it later and apply for other branches as well. [emoji38]
I have been running it on the XU4 for a couple of weeks and it has been fully stable, I generate a lot of network traffic due to tvheadend mpeg2 streams.
User avatar
rooted
 
Posts: 4712
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby rooted » Wed May 02, 2018 1:00 pm

Firestorm wrote:I don't understand the comment about "the history of this edit is missing" - please enlighten me since I thought that git maintains the history and the deltas.


You edited r8152.c to reflect renaming compatibility.h, perhaps it is in history but I didn't see it.

Don't be discouraged at all, contributing is awesome. It just needs to be clean for future maintainability.

(Example) Realtek releases another update but you don't generate a new pull request, if something you did was missing in the previous history it makes it difficult for someone else to follow-up.

I wasn't trying to be hard on you, I appreciate what you did.
User avatar
rooted
 
Posts: 4712
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Firestorm » Wed May 02, 2018 1:25 pm

I get what you're saying: 1) I could have renamed compatibility.h in a second commit to illustrate the change in history; 2) Renaming it requires changes for subsequent r8192 driver upgrades. Both good points and I would choose not to rename it now - thank you for the good feedback. Regardless, I'm happy with the contribution and a 3.16.y kernel that I and others can use with the devices this driver supports. Would be happy to correct it, depending on how you might want to proceed.
Firestorm
 
Posts: 26
Joined: Sun Apr 08, 2018 4:19 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby rooted » Wed May 02, 2018 1:35 pm

I'm just an innocent bystander, if mdrjr wants to change it he can.

I was just putting out my opinion.

I agree in the here and now it's great to have a new, seemingly more stable driver. I'm still waiting on more feedback on the XU4 and hopefully we can get it implemented there as well.

It's great when someone such as yourself not only takes the initiative to find and fix an issue but goes that extra mile to document and share it. Kudos ;)
User avatar
rooted
 
Posts: 4712
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby tobetter » Wed May 02, 2018 1:36 pm

rooted wrote:
Firestorm wrote:I don't understand the comment about "the history of this edit is missing" - please enlighten me since I thought that git maintains the history and the deltas.


You edited r8152.c to reflect renaming compatibility.h, perhaps it is in history but I didn't see it.

Don't be discouraged at all, contributing is awesome. It just needs to be clean for future maintainability.

(Example) Realtek releases another update but you don't generate a new pull request, if something you did was missing in the previous history it makes it difficult for someone else to follow-up.

I wasn't trying to be hard on you, I appreciate what you did.

How do you think these three patches? :lol:
[1] https://github.com/tobetter/linux/commi ... 49cd38db1b
[2] https://github.com/tobetter/linux/commi ... 460186c37f
[3] https://github.com/tobetter/linux/commi ... 8c4c507a72
tobetter
 
Posts: 2159
Joined: Mon Feb 25, 2013 10:55 am
Location: Kitchener, ON, Canada
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby rooted » Wed May 02, 2018 1:39 pm

Looks good.
User avatar
rooted
 
Posts: 4712
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Firestorm » Sun May 13, 2018 5:30 am

I found an Amazon Basics USB 3.0 Ethernet adapter that uses the ax88179 driver. Under the latest 3.16.56+ kernel I collected iperf stats of about 216 Mbit/sec. I downloaded the latest AX88179_178A_LINUX_DRIVER_v1.19.0_SOURCE and built a new kernel with that driver and I am now collecting iperf stats of about 336 Mbit/sec. This is faster than my other USB 3.0 Ethernet adapter that uses the r8152 driver and although I won’t be able to pull more than 125 Mbit/sec from my internet provider, I have still switched to the new adapter. It seems stable and continued use will be telling.

There is no problem with the older ax88179 driver that is currently included with the latest 3.16.56+ kernel aside from it being significantly slower. Would a driver upgrade for the latest kernel be entertained or would there have to be a problem for it to be considered?
Firestorm
 
Posts: 26
Joined: Sun Apr 08, 2018 4:19 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby mad_ady » Sun May 13, 2018 12:10 pm

Nice finding! I'd like to see the new driver as well.
User avatar
mad_ady
 
Posts: 3649
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Firestorm » Sun May 13, 2018 2:03 pm

I created a pull request that I expect will go smoother. :D
Firestorm
 
Posts: 26
Joined: Sun Apr 08, 2018 4:19 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby rooted » Sun May 13, 2018 2:41 pm

Firestorm wrote:I created a pull request that I expect will go smoother. :D
If you have a link I have time to criticize it :)

Kidding of course.
User avatar
rooted
 
Posts: 4712
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby tobetter » Sun May 13, 2018 11:26 pm

rooted wrote:
Firestorm wrote:I created a pull request that I expect will go smoother. :D
If you have a link I have time to criticize it :)

Kidding of course.

I am waiting for your code review, rooted. :) Basically, it looks ok to merge.
https://github.com/hardkernel/linux/pull/353
tobetter
 
Posts: 2159
Joined: Mon Feb 25, 2013 10:55 am
Location: Kitchener, ON, Canada
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby rooted » Mon May 14, 2018 1:12 am

It's a direct replacement, looks good to me ;)

Interesting that the performance is that much better, apparently their USB code is different in some way vs the Realtek.
User avatar
rooted
 
Posts: 4712
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby t.moreau » Tue May 22, 2018 10:37 am

Hi!

Someone sent me a private message -- which I am not authorized to reply -- about compiling details for this 3.16 LTS kernel for C2 / ArchLinux.

I used gcc version 7.3 and I retrofitted the build kernel in two different Linux distributions, ArchLinux and Crux-Arm64.

See the document http://www.connotech.com/crux_arm64_odroidc2.html.

Enjoy!

- Thierry
t.moreau
 
Posts: 4
Joined: Wed Mar 28, 2018 3:40 am
languages_spoken: french, english
ODROIDs: C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby mad_ady » Tue May 22, 2018 1:56 pm

Your 5th post will unlock the PM reply feature.
User avatar
mad_ady
 
Posts: 3649
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Previous

Return to Projects

Who is online

Users browsing this forum: No registered users and 0 guests