Merge pull request #1198 from sigmaris/xu4_ethernet_rps

[ odroid xu4 ] use udev rules to set ethernet rps
This commit is contained in:
Igor Pečovnik 2018-12-24 10:08:52 +01:00 committed by GitHub
commit 5c0e21732a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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"