vppctl return code is always 0, regardless of command success or fail.
Example:
vpp unix '{' nodaemon cli-listen /run/vpp/cli.sock '}' dpdk '{' no-pci '}' session '{' evt_qs_memfd_seg '}' socksvr '{' socket-name /run/vpp-api.sock '}' plugins '{' plugin default '{' disable '}' plugin dpdk_plugin.so '{' enable '}' '}' [root@GrizzlyPass14 spdk]# vppctl show version; echo $? vpp v19.04.2-release built by sys_sgci on GrizzlyPass14 at Mon 09 Mar 2020 03:45:41 PM CET 0 [root@GrizzlyPass14 spdk]# vppctl show; echo $? show: unknown input `' 0 [root@GrizzlyPass14 spdk]# vppctl shOOOw; echo $? unknown input `shOOOw' 0 [root@GrizzlyPass14 spdk]# vppctl show interface Name Idx State MTU (L3/IP4/IP6/MPLS) Counter Count host-spdk_tgt_int 1 up 1460/0/0/0 rx packets 10 rx bytes 700 drops 10 ip6 10 local0 0 down 0/0/0/0 [root@GrizzlyPass14 spdk]# vppctl show interface XXXX; echo $? show interface: unknown input `XXXX' 0 [root@GrizzlyPass14 spdk]# vppctl set interface mtu 1500 host-spdk_TGT_int; echo $? set interface mtu: unknown input `1500 host-spdk_TGT_int' 0 [root@GrizzlyPass14 spdk]# vppctl set interface mtu 10 host-spdk_tgt_int; echo $? set interface mtu: Invalid mtu (10): must be >= min pkt bytes (64) 0 [root@GrizzlyPass14 spdk]# vppctl set interface state host-spdk_tgt_int up; echo $? 0 [root@GrizzlyPass14 spdk]# vppctl set interface state host-spdk_tgt_int SomeState; echo $? set interface state: unknown flags `SomeState' 0