From beef42c6efddfb5686a8618c8e000f2daceaffd1 Mon Sep 17 00:00:00 2001 From: Hugh Cole-Baker Date: Sun, 23 Dec 2018 13:09:56 +0000 Subject: [PATCH] [ odroid xu4 ] use udev rules to set ethernet rps In Debian Stretch, among others, udev's "predictable interface naming" has been adopted, meaning the onboard ethernet is no longer named eth0, instead it's "enx00..(mac address bytes)..". Use a udev rule to apply the RPS settings instead of /sys/class/net/eth0/... which no longer exists. --- config/sources/odroidxu4.conf | 5 +++-- .../bsp/common/usr/lib/armbian/armbian-hardware-optimization | 2 -- packages/bsp/odroid/90-builtin-net-rps.rules | 5 +++++ 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 packages/bsp/odroid/90-builtin-net-rps.rules diff --git a/config/sources/odroidxu4.conf b/config/sources/odroidxu4.conf index 523cfbbe77..cd66a3068d 100644 --- a/config/sources/odroidxu4.conf +++ b/config/sources/odroidxu4.conf @@ -13,7 +13,7 @@ case $BRANCH in KERNELSOURCE='https://github.com/hardkernel/linux' KERNELBRANCH='branch:odroidxu4-4.14.y' KERNELDIR='linux-odroidxu4' - + KERNEL_USE_GCC='> 6.3' ;; @@ -116,8 +116,9 @@ family_tweaks() family_tweaks_bsp() { + mkdir -p $destination/etc/udev/rules.d + cp $SRC/packages/bsp/odroid/90-builtin-net-rps.rules $destination/etc/udev/rules.d if [[ $BRANCH != default ]]; then - mkdir -p $destination/etc/udev/rules.d mkdir -p $destination/usr/local/bin cp $SRC/packages/bsp/rockchip/hdmi.rules $destination/etc/udev/rules.d install -m 755 $SRC/packages/bsp/rockchip/hdmi-hotplug $destination/usr/local/bin diff --git a/packages/bsp/common/usr/lib/armbian/armbian-hardware-optimization b/packages/bsp/common/usr/lib/armbian/armbian-hardware-optimization index f4af9e0133..c296cc0a4b 100755 --- a/packages/bsp/common/usr/lib/armbian/armbian-hardware-optimization +++ b/packages/bsp/common/usr/lib/armbian/armbian-hardware-optimization @@ -123,9 +123,7 @@ prepare_board() { for i in $(awk -F':' '/11800000.mali/{print $1}' /proc/irq/$i/smp_affinity done - echo 7 >/sys/class/net/eth0/queues/rx-0/rps_cpus echo 32768 >/proc/sys/net/core/rps_sock_flow_entries - echo 32768 >/sys/class/net/eth0/queues/rx-0/rps_flow_cnt ;; rockchip) # RK3288: usb1 on cpu1, usb3 (EHCI) on cpu2, eth0 and GPU on cpu3 echo 2 >/proc/irq/$(awk -F":" "/usb1/ {print \$1}"