Skip to content

Commit

Permalink
qualcommax: ipq60xx: refactor packet steering init
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaY-shi committed Nov 11, 2023
1 parent f87b60a commit 27caa1d
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

packet_steering="$(uci -q get network.@globals[0].packet_steering)"
flow_offloading="$(uci -q get firewall.@defaults[0].flow_offloading)"
flow_offloading_hw="$(uci -q get firewall.@defaults[0].flow_offloading_hw)"

[ "$packet_steering" = 1 ] && {
if [ ${flow_offloading_hw:-0} -gt 0 ]; then
# HW offloading
# Not implemented
:
elif [ ${flow_offloading:-0} -gt 0 ]; then
# SW offloading
:
else
# Default
# LAN
for q in $(ls /sys/class/net/lan*/queues/rx-*/rps_cpus); do echo f > $q; done
for q in $(ls /sys/class/net/lan*/queues/tx-*/xps_cpus); do echo f > $q; done
for q in $(ls /sys/class/net/lan*/queues/rx-*/rps_flow_cnt); do echo 4096 > $q; done
# WAN
for q in $(ls /sys/class/net/wan/queues/rx-*/rps_cpus); do echo f > $q; done
for q in $(ls /sys/class/net/wan/queues/tx-*/xps_cpus); do echo f > $q; done
for q in $(ls /sys/class/net/wan/queues/rx-*/rps_flow_cnt); do echo 4096 > $q; done

echo 32768 > /proc/sys/net/core/rps_sock_flow_entries
fi
}

# Enable threaded network backlog processing
echo 1 > /proc/sys/net/core/backlog_threaded

0 comments on commit 27caa1d

Please sign in to comment.