mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-11-15 22:15:13 +08:00
1b5c7414a4
Currently dcb decodes the response from "dcb app add" and "del" by interpreting the returned attribute as u8. But the value stored there is actually a negative errno value. Additionally, "dcb app" currently shows two sets of messages, one in dcb_set_attribute_attr_cb() where the issue is detected, and another as a result of error return from that function. The current state is as follows: # dcb app add dev swp36 dscp-prio 20:2 Error when attempting to set attribute: Unknown error 239 Attribute write: No such file or directory Fix the "unknown error" issue by correctly decoding the attribute as i8 and negating it. Furthermore, set errno to that value, and let the top-level "attribute write" error message show the correct message. Initialize errno to 0 before the dcb_talk() dispatch, and make the error print conditional on errno != 0. This way the few error messages that are worth describing in the place where they are detected will not cause the second error message to be printed. The fixed reporting looks like this: # dcb app add dev swp36 dscp-prio 20:2 Attribute write: File exists Reported-by: Maksym Yaremchuk <maksymy@nvidia.com> Signed-off-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> |
||
---|---|---|
bash-completion | ||
bridge | ||
dcb | ||
devlink | ||
doc/actions | ||
etc/iproute2 | ||
examples/bpf | ||
genl | ||
include | ||
ip | ||
lib | ||
man | ||
misc | ||
netem | ||
rdma | ||
schema | ||
tc | ||
testsuite | ||
tipc | ||
vdpa | ||
.clang-format | ||
.gitignore | ||
.mailmap | ||
configure | ||
COPYING | ||
Makefile | ||
README | ||
README.devel |
This is a set of utilities for Linux networking. Information: https://wiki.linuxfoundation.org/networking/iproute2 Download: http://www.kernel.org/pub/linux/utils/net/iproute2/ Stable version repository: git://git.kernel.org/pub/scm/network/iproute2/iproute2.git Development repository: git://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git How to compile this. -------------------- 1. libdbm arpd needs to have the berkeleydb development libraries. For Debian users this is the package with a name like libdbX.X-dev. DBM_INCLUDE points to the directory with db_185.h which is the include file used by arpd to get to the old format Berkeley database routines. Often this is in the db-devel package. 2. make The makefile will automatically build a config.mk file which contains definitions of libraries that may or may not be available on the system such as: ATM, ELF, MNL, and SELINUX. 3. include/uapi This package includes matching sanitized kernel headers because the build environment may not have up to date versions. See Makefile if you have special requirements and need to point at different kernel include files. Stephen Hemminger stephen@networkplumber.org Alexey Kuznetsov kuznet@ms2.inr.ac.ru