]> git.proxmox.com Git - mirror_iproute2.git/commit
devlink: fix encap mode manupulation
authorJiri Pirko <jiri@mellanox.com>
Sat, 4 Apr 2020 16:16:16 +0000 (18:16 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 6 Apr 2020 17:00:32 +0000 (10:00 -0700)
commit0b1875cdc69f49184445781a62e0bf603bdfc414
tree016d267d0f35763f276a3bd2764218691435f01d
parent90ce848b05fc1883ddafcf57af4c7fcbafd85833
devlink: fix encap mode manupulation

DEVLINK_ATTR_ESWITCH_ENCAP_MODE netlink attribute carries enum. But the
code assumes bool value. Fix this by treating the encap mode in the same
way as other eswitch mode attributes, switching from "enable"/"disable"
to "basic"/"none", according to the enum. Maintain the backward
compatibility to allow user to pass "enable"/"disable" too. Also to be
in-sync with the rest of the "mode" commands, rename to "encap-mode".
Adjust the help and man page accordingly.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
bash-completion/devlink
devlink/devlink.c
man/man8/devlink-dev.8