From: Michael Tremer Date: Tue, 13 Jun 2017 18:25:38 +0000 (+0100) Subject: device_num_queues(): Read correct file for transmit queues X-Git-Tag: 009~219 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e396e74e2e40c5c6d6c72596bf3a6aa1b6d973f7;p=network.git device_num_queues(): Read correct file for transmit queues Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.device b/src/functions/functions.device index ac6ace5b..fc88fecc 100644 --- a/src/functions/functions.device +++ b/src/functions/functions.device @@ -1008,7 +1008,7 @@ device_num_queues() { local device=${1} local type=${2} - assert isoneof type "" rx tx + isset type && assert isoneof type rx tx local i=0 @@ -1036,7 +1036,16 @@ device_queue_get_smp_affinity() { local device=${1} local queue=${2} - local path="${SYS_CLASS_NET}/${device}/queues/${queue}/rps_cpus" + local path="${SYS_CLASS_NET}/${device}/queues/${queue}" + + case "${queue}" in + rx-*) + path="${path}/rps_cpus" + ;; + tx-*) + path="${path}/xps_cpus" + ;; + esac assert [ -r "${path}" ] __bitmap_to_processor_ids $(<${path})