]> git.ipfire.org Git - thirdparty/iproute2.git/commit
Merge branch 'dcb-rewr-subcmd' into next
authorDavid Ahern <dsahern@kernel.org>
Fri, 9 Jun 2023 21:46:04 +0000 (15:46 -0600)
committerDavid Ahern <dsahern@kernel.org>
Fri, 9 Jun 2023 21:46:04 +0000 (15:46 -0600)
commit1574756b885abe4c195a0a261852226760ca9591
tree9ac1c0547927b05f01ef9f7d898426dbdff31610
parent98b0b0cb67ffbef9d6aa1696e117f98139ca27df
parent05241f06300570bf85e15e54597f3c944b547d18
Merge branch 'dcb-rewr-subcmd' into next

Daniel Machon  says:

====================

========================================================================
Introduction:
========================================================================

This series introduces a new DCB subcommand: rewr, which is used to
configure the in-kernel DCB rewrite table [1].

Rewrite support is added as a separate DCB subcommand, rather than an
APP opt-in flag or similar. This goes in line with what we did to dcbnl,
where rewrite is a separate object.  Obviously this requires a bit more
code to implement the new command, but much of the existing dcb-app code
(especially the bookkeeping code) can be reused. In some cases a little
adaptation is needed.

========================================================================
dcb-rewr parameters:
========================================================================

Initially, I have only made support for the prio-pcp and prio-dscp
parameters, as DSCP and PCP  are the only selectors that currently have
a user [2] and to be honest, I am not even sure it makes sense to add
dgram, stream, ethtype rewrite support - At least the rewriter of Sparx5
does not support this. Any input here is much appreciated!

Examples:

Rewrite DSCP to 63 for packets with priority 1
$ dcb rewr add dev eth0 prio-dscp 1:63

Rewrite PCP 7 and DEI to 1 for packets with priority 1
$ dcb rewr add dev eth0 prio-pcp 1:7de

A new manpage has been added, to cover the new dcb-rewr subcommand, and
its parameters. Also I took the liberty to clean up a few things in the
dcb-app manpage.

========================================================================
Patch overview:
========================================================================

Patch  #1 Adds a new field 'attr' to the dcb_app_table struct, which is
          used to distinguish app and rewrite tables.

Patch  #2 Replaces uses of %d with %u for unsigned int.

Patch  #3 Moves colon out of callback functions.

Patch  #4 Renames protocl print functions from _key to _pid

Patch  #5 Modifies the _print_filtered() function for dcb-rewr reuse, by
          introducing new callbacks.

Patch  #6 Modifies existing dcb-app function dcb_app_table_remove_replaced
          for reuse by dcb-rewr

Patch  #7 Expose dcb-app functions required by dcb-rewr.

Patch  #8 Adds the new dcb-rewr subcommand with initial support for
          prio-pcp and prio-dscp rewrite.

Patch  #9 Introduces symbol for max DSCP value and updates accordingly.

Patch #10 Adds the dcb-rewr.8 manpage
Patch #11 Adds references to dcb-apptrust and dcb-rewr in the dcb.8
          manpage.

Patch #12 Cleans up the dcb-app.8 manpage.

[1] https://elixir.bootlin.com/linux/v6.4-rc1/source/net/dcb/dcbnl.c#L181
[2] https://elixir.bootlin.com/linux/v6.4-rc1/source/drivers/net/ethernet/microchip/sparx5/sparx5_dcb.c#L380

====================

Signed-off-by: David Ahern <dsahern@kernel.org>