Page MenuHomeVyOS Platform

Support configuration of Ethernet SMP affinity in new Python/XML implementation


Difficulty level
Normal (likely a few hours)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

c-po created this task.Sep 21 2019, 7:55 AM
pasik added a subscriber: pasik.Sep 26 2019, 9:50 PM
c-po renamed this task from Support configuration of SMP affinity in new Python impolementation to Support configuration of Ethernet SMP affinity in new Python/XML implementation.Oct 19 2019, 7:03 PM
c-po triaged this task as High priority.
c-po changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).
Dmitry added a subscriber: Dmitry.Dec 31 2019, 9:02 AM
syncer assigned this task to c-po.Mar 16 2020, 12:48 AM
c-po added a comment.Sun, Aug 2, 1:11 PM

I also propose migrating the CLI interface from a bitmask (which IMHO no user understands)

cpo@LR2.wue3# cat /opt/vyatta/share/vyatta-cfg/templates/interfaces/ethernet/node.tag/smp-affinity/node.def
# Configuration template for
# Configure the CPUs that the associated interface will interrupt.
# SMP affinity is configured by a hexidecimal bitmask that specifies the
# CPUs that the system can interrupt.  The SMP affinity bitmask must contain
# at least one bits, and may only contain as many bits as there are CPUs on
# the system.

priority: 319 # Failure barrier only - no ordering constraints

type: txt

help: CPU interrupt affinity mask

val_help: auto; Automatic CPU affinity (default)
val_help: <hex>; Bitmask representing CPUs that this NIC will interrupt
val_help: <hex>,<hex>; Bitmasks representing CPUs for interrupt and receive processing

default: "auto"

syntax:expression: $VAR(@) == "auto" || pattern $VAR(@) "^[0-9a-f]+(|,[0-9a-f]+)$" ;
        "IRQ affinity mask must be hex value or auto"

update: sudo /opt/vyatta/sbin/ $VAR(../@) $VAR(@)

to a multi: node where the user can just say cpu0, cpu1, cpuXX to specify which CPUs should service the NIC.

thomas-mangin added a subscriber: thomas-mangin.EditedMon, Aug 3, 2:12 PM

I would not use cpu<numbe> but just <number> like is used for taskset for example, but it would be a real improvement for users.
An op command should be provided giving the affinity of CPU ( from lscpu ) and the documentation should warn about interrupt crossing numa domains (for the case where a network card is providing multiple interfaces).