iproute2/dcb
Petr Machata e59876ff55 dcb: Generalize dcb_get_attribute()
The function dcb_get_attribute() assumes that the caller knows the exact
size of the looked-for payload. It also assumes that the response comes
wrapped in an DCB_ATTR_IEEE nest. The former assumption does not hold for
the IEEE APP table, which has variable size. The latter one does not hold
for DCBX, which is not IEEE-nested, and also for any CEE attributes, which
would come CEE-nested.

Factor out the payload extractor from the current dcb_get_attribute() code,
and put into a helper. Then rewrite dcb_get_attribute() compatibly in terms
of the new function. Introduce dcb_get_attribute_va() as a thin wrapper for
IEEE-nested access, and dcb_get_attribute_bare() for access to attributes
that are not nested.

Signed-off-by: Petr Machata <me@pmachata.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
2021-01-18 04:09:29 +00:00
..
.gitignore Add dcb/.gitignore 2020-11-29 20:39:47 +00:00
Makefile dcb: Add a subtool for the DCB maxrate object 2020-12-14 16:42:07 +00:00
dcb.c dcb: Generalize dcb_get_attribute() 2021-01-18 04:09:29 +00:00
dcb.h dcb: Generalize dcb_get_attribute() 2021-01-18 04:09:29 +00:00
dcb_buffer.c dcb: Add a subtool for the DCB buffer object 2020-12-14 16:42:03 +00:00
dcb_ets.c dcb: ets: Change the way show parameters are given in synopsis 2020-12-14 16:41:22 +00:00
dcb_maxrate.c dcb: Add a subtool for the DCB maxrate object 2020-12-14 16:42:07 +00:00
dcb_pfc.c dcb: Add a subtool for the DCB PFC object 2020-12-14 16:41:58 +00:00