Message ID | 20230510-dcb-rewr-v3-0-60a766f72e61@microchip.com (mailing list archive) |
---|---|
Headers | show |
Series | Introduce new dcb-rewr subcommand | expand |
Hello: This series was applied to iproute2/iproute2-next.git (main) by David Ahern <dsahern@kernel.org>: On Tue, 6 Jun 2023 09:19:35 +0200 you wrote: > ======================================================================== > Introduction: > ======================================================================== > > This series introduces a new DCB subcommand: rewr, which is used to > configure the in-kernel DCB rewrite table [1]. > > [...] Here is the summary with links: - [iproute2-next,v3,01/12] dcb: app: add new dcbnl attribute field https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=1b276ffad53d - [iproute2-next,v3,02/12] dcb: app: replace occurrences of %d with %u for printing unsigned int https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=503e150007a1 - [iproute2-next,v3,03/12] dcb: app: move colon printing out of callbacks https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=00d59f4013b8 - [iproute2-next,v3,04/12] dcb: app: rename dcb_app_print_key_*() functions https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=b4a52658a06f - [iproute2-next,v3,05/12] dcb: app: modify dcb_app_print_filtered() for dcb-rewr reuse https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=a245bfe1c0c6 - [iproute2-next,v3,06/12] dcb: app: modify dcb_app_table_remove_replaced() for dcb-rewr reuse https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=369a2df62a0d - [iproute2-next,v3,07/12] dcb: app: expose functions required by dcb-rewr https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=1be8ab537824 - [iproute2-next,v3,08/12] dcb: rewr: add new dcb-rewr subcommand https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=1b2680f4696b - [iproute2-next,v3,09/12] dcb: rewr: add symbol for max DSCP value https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=19919442f1b1 - [iproute2-next,v3,10/12] man: dcb-rewr: add new manpage for dcb-rewr https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=e97dcb5b150d - [iproute2-next,v3,11/12] man: dcb: add additional references under 'SEE ALSO' https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=9a3b4f7a5dee - [iproute2-next,v3,12/12] man: dcb-app: clean up a few mistakes https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=05241f063005 You are awesome, thank you!
======================================================================== 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: Daniel Machon <daniel.machon@microchip.com> --- Changes in v3: - Split #2 into four patches (%d->%u, :, renaming, prototype change). - Moved publication of functions in #3 to patches where they are used. - Added new patch #7 that exposes dcb-app functions required by dcb-rewr. - Got rid of #4 and copied over dcb_app_parse_mapping_cb to dcb-rewr instead. - Added new patch #9 for DCB_APP_MAX_DSCP - Link to v2: https://lore.kernel.org/r/20230510-dcb-rewr-v2-0-9f38e688117e@microchip.com Changes in v2: - Got rid of patch #1 that introduced dcb_app.h - expose in individual patches. - Changed to callbacks for printing APP and rewrite entries. Also fixed %d to be %u. - Changed to callbacks for removing replaced table entries for APP and rewrite. - Changed to callbacks for pushing APP and rewrite entries to the table. - Got rid of extra spaces in dcb-rewr helps, and reordered some parameters for dcb_parse_mapping. - Rephrased 'that that' sentence in dcb-app.8 and dcb-rewr.8 - Link to v1: https://lore.kernel.org/r/20230510-dcb-rewr-v1-0-83adc1f93356@microchip.com --- Daniel Machon (12): dcb: app: add new dcbnl attribute field dcb: app: replace occurrences of %d with %u for printing unsigned int dcb: app: move colon printing out of callbacks dcb: app: rename dcb_app_print_key_*() functions dcb: app: modify dcb_app_print_filtered() for dcb-rewr reuse dcb: app: modify dcb_app_table_remove_replaced() for dcb-rewr reuse dcb: app: expose functions required by dcb-rewr dcb: rewr: add new dcb-rewr subcommand dcb: rewr: add symbol for max DSCP value man: dcb-rewr: add new manpage for dcb-rewr man: dcb: add additional references under 'SEE ALSO' man: dcb-app: clean up a few mistakes dcb/Makefile | 3 +- dcb/dcb.c | 4 +- dcb/dcb.h | 54 ++++++++ dcb/dcb_app.c | 154 +++++++++++----------- dcb/dcb_rewr.c | 363 ++++++++++++++++++++++++++++++++++++++++++++++++++++ man/man8/dcb-app.8 | 10 +- man/man8/dcb-rewr.8 | 206 +++++++++++++++++++++++++++++ man/man8/dcb.8 | 4 +- 8 files changed, 718 insertions(+), 80 deletions(-) --- base-commit: e0c7a04f1dfd7ca05e0725663489c6406d169b9c change-id: 20230510-dcb-rewr-534b7ab637eb Best regards,