[ 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.
This commit is contained in:
Hugh Cole-Baker 2018-12-23 13:09:56 +00:00
parent 05d4708e61
commit beef42c6ef
3 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -123,9 +123,7 @@ prepare_board() {
for i in $(awk -F':' '/11800000.mali/{print $1}' </proc/interrupts | sed 's/\ //g'); do
echo 64 >/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}" </proc/interrupts | sed 's/\ //g')/smp_affinity

View File

@ -0,0 +1,5 @@
# Set up receive packet steering for builtin ethernet
ACTION=="add", SUBSYSTEMS=="usb", SUBSYSTEM=="net", \
ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="8153", \
ATTR{queues/rx-0/rps_cpus}="7", ATTR{queues/rx-0/rps_flow_cnt}="32768"