1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-15 03:51:51 +00:00
This commit is contained in:
suyuan 2024-03-28 12:39:25 +08:00
parent e79c99b008
commit 7d503412b8
2 changed files with 36 additions and 1 deletions

View file

@ -1,6 +1,6 @@
.container {
/* container for entire page. fixes bootstrap theme's ridiculously small page width */
max-width: 1044px;
max-width: 1500px;
}
#interface_field {
padding: 12px 20px 20px 20px;
@ -33,6 +33,7 @@
/* Mwan3 ligthed CSS */
#interface_field {
padding: 0px;
max-width: 1200px;
}
#interface_field td {
padding: 0px;

View file

@ -0,0 +1,34 @@
#!/bin/sh
# Come from https://github.com/ofmodemsandmen/RooterSource/blob/main/package/rooter/ext-rooter-basic/files/etc/hotplug.d/net/10-usb
log() {
logger -t "NET" "$@"
}
NP=$(grep -c ^processor /proc/cpuinfo )
if [ "$NP" -gt 1 ]; then
log "hotplug (iface): action='$ACTION' interface='$INTERFACE'"
if [ "$ACTION" = "add" ]; then
IFACE=$(ls /sys/class/net)
for i in ${IFACE}; do
ethtool -K $i gro on 2>/dev/null
if [[ -e /sys/class/net/$i/queues/rx-0/rps_cpus ]]; then
echo f > /sys/class/net/$i/queues/rx-0/rps_cpus
fi
done
INTERRUPT=$(ls /proc/irq/ | sed '/default/d')
USB3_NUMBER=$(grep xhci /proc/interrupts | awk -F: '{print $1}' | sed 's/^ //')
for i in ${INTERRUPT}; do
if [[ $i = ${USB3_NUMBER} ]]; then
echo f > /proc/irq/$i/smp_affinity 2>/dev/null
else
echo e > /proc/irq/$i/smp_affinity 2>/dev/null
fi
done
#inter=$(grep . /sys/class/net/$INTERFACE/queues/?x-0/?ps_cpus)
#log "$inter"
fi
fi