VPP interfaces are not returned to the original dataplane if partly commit was applied, but another part is not applied
Original driver:
vyos@r16:~$ sudo ethtool -i eth1 driver: virtio_net version: 1.0.0
To reproduce:
set vpp settings interface eth1 driver dpdk set vpp settings interface eth1 rx-mode adaptive commit
commit:
vyos@r16# commit
[ vpp ]
WARNING: offload option in eth1 settings is not supported by VPP interfaces. It will be ignored.
Traceback (most recent call last):
File "/usr/libexec/vyos/services/vyos-configd", line 139, in run_script
script.apply(c)
File "/usr/libexec/vyos//conf_mode/vpp.py", line 560, in apply
vpp_control.iface_rxmode(iface, rx_mode)
File "/usr/lib/python3/dist-packages/vyos/vpp/control_vpp.py", line 81, in check_retval_wrapper
raise VPPValueError(f'VPP API call failed: {return_value.retval}')
vpp_papi.vpp_papi.VPPValueError: VPP API call failed: -9
[[vpp]] failed
Commit failed
[edit]
vyos@r16#In this step vpp attached the interface eth1 to vpp dataplane
vyos@r16# sudo vppctl show int
Name Idx State MTU (L3/IP4/IP6/MPLS) Counter Count
eth1 1 down 9000/0/0/0 tx-error 1
local0 0 down 0/0/0/0
tap1 2 up 9000/0/0/0 rx packets 1
rx bytes 90
drops 1
ip6 1
[edit]
vyos@r16#Delete vpp
vyos@r16# compare
+ vpp {
+ settings {
+ interface eth1 {
+ driver "dpdk"
+ rx-mode "adaptive"
+ }
+ }
+ }
[edit]
vyos@r16# delete vpp
[edit]
vyos@r16# commit
[edit]
vyos@r16#In this step it does nothing and eth1 still in the vpp dataplane
vyos@r16# sudo ethtool -i eth1
driver: tun
vyos@r16# sudo vppctl show int
Name Idx State MTU (L3/IP4/IP6/MPLS) Counter Count
eth1 1 down 9000/0/0/0 tx-error 1
local0 0 down 0/0/0/0
tap1 2 up 9000/0/0/0 rx packets 1
rx bytes 90
drops 1
ip6 1
[edit]
vyos@r16#Of course we cannot attach this interface again to the VPP dataplane
vyos@r16# set vpp settings interface eth1 driver dpdk
[edit]
vyos@r16# commit
[ vpp ]
WARNING: offload option in eth1 settings is not supported by VPP interfaces. It will be ignored.
Traceback (most recent call last):
File "/usr/libexec/vyos/services/vyos-configd", line 137, in run_script
script.verify(c)
File "/usr/libexec/vyos//conf_mode/vpp.py", line 330, in verify
if not verify_dev_driver(iface, iface_config['driver']):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/vyos/vpp/config_verify.py", line 149, in verify_dev_driver
driver: str = get_eth_driver(iface_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/vyos/vpp/control_host.py", line 271, in get_eth_driver
raise FileNotFoundError(f'PCI device {iface} not found in ethernet interfaces')
FileNotFoundError: PCI device eth1 not found in ethernet interfaces
[[vpp]] failed
Commit failed
[edit]
vyos@r16#Only reboot can help in this case