Page MenuHomeVyOS Platform

Fault on setting offload RPS with single-core CPU
Closed, ResolvedPublicBUG

Description

On trying to set RPS with a single-core CPU, VyOS CLI returns the following backtrace.

vyos@vyos# set interfaces ethernet eth0 offload rps 
[edit]
vyos@vyos# commit
[ interfaces ethernet eth0 ]
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Make sure you are running the latest version of the code available at
  https://downloads.vyos.io/rolling/current/amd64/vyos-rolling-latest.iso
- Consult the forum to see how to handle this issue
  https://forum.vyos.io
- Join our community on slack where our users exchange help and advice
  https://vyos.slack.com

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your 
  business policy requires it)
- and include all the information presented below

Report Time:      2021-02-07 07:57:53
Image Version:    VyOS 1.4-rolling-202102060218
Release Train:    sagitta

Built by:         autobuild@vyos.net
Built on:         Sat 06 Feb 2021 02:18 UTC
Build UUID:       c6b504e5-ad7c-4033-b55d-3829b88e3762
Build Commit ID:  c4e71fd8f71d10

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:     
Hardware UUID:    128cca00-c75f-4d69-9f32-f94ab86b804a

OSError: [Errno 22] Invalid argument

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 129, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 118, in apply
    e.update(ethernet)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/ethernet.py", line 338, in update
    self.set_rps(dict_search('offload.rps', config) != None)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/ethernet.py", line 259, in set_rps
    return self.set_interface('rps', rps_cpus)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 182, in set_interface
    return self._set_sysfs(self.config, name, value)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 166, in _set_sysfs
    self._sysfs_set[name]['location'].format(**config), value)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 132, in _write_sysfs
    f.write(str(value))
OSError: [Errno 22] Invalid argument

noteworthy:
cmd 'tc qdisc del dev eth0 handle ffff: ingress; tc qdisc del dev eth0 handle 1: root prio'
returned (out):

returned (err):
Error: Cannot find specified qdisc on specified device.
Error: Invalid handle.

[[interfaces ethernet eth0]] failed
Commit failed

Details

Difficulty level
Normal (likely a few hours)
Version
1.4-rolling-202102060218
Why the issue appeared?
Issues in third-party code
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

This comment was removed by jack9603301.

@c-po Why does the RPS setup function call fail, but the mirror error message is displayed?

The root cause of this problem is that VYOS does not use CPU0 and therefore cannot enable RPS on a single-core processor

This is clearly an issue with the Linux Kernel (incompatible ABI change) as the error is not present on 1.3-beta which uses 5.4 kernel series but it exists on 1.4-rolling which uses the 5.10 series.

It affects virtio, e1000 and vmxnet drivers on 5.10 Kernel and can be reproduced as easy as:

$ echo ffffffff,ffffffff,ffffffff,fffffffe > /sys/class/net/eth0/queues/rx-0/rps_cpus

Please investigate what the root-cause is and if this is a known Kernel issue, should be fixed or is beyond fixing. We then can decide what to do.

c-po changed the task status from Open to Confirmed.Feb 11 2021, 6:53 PM
c-po changed Why the issue appeared? from Will be filled on close to Issues in third-party code.

@c-po I would say that it would be better whether to report the problem upstream

Viacheslav claimed this task.