]> git.ipfire.org Git - thirdparty/iproute2.git/commit
dcb: app: modify dcb_app_print_filtered() for dcb-rewr reuse
authorDaniel Machon <daniel.machon@microchip.com>
Tue, 6 Jun 2023 07:19:40 +0000 (09:19 +0200)
committerDavid Ahern <dsahern@kernel.org>
Fri, 9 Jun 2023 21:43:50 +0000 (15:43 -0600)
commita245bfe1c0c6c05b22c968e82a4cb08689ec6360
tree23d90e847402f850ba1ea9cbcc84bef6f530a213
parentb4a52658a06f484b845eae6b310db60bb2754270
dcb: app: modify dcb_app_print_filtered() for dcb-rewr reuse

Where dcb-app requires protocol to be the printed key, dcb-rewr requires
it to be the priority. Adapt existing dcb-app print functions for this.

dcb_app_print_filtered() has been modified, to take two callbacks; one
for printing the entire string (pid and prio), and one for the pid type
(dec, hex, dscp, pcp). This saves us for making one dedicated function
for each pid type for both app and rewr.

Also, printing the colon is now expected to be handled by the
print_pid_prio() callback.

Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Reviewed-by: Petr Machata <me@pmachata.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
dcb/dcb_app.c