netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2-next 0/9] Introduce new dcb-rewr subcommand
@ 2023-05-22 18:41 Daniel Machon
  2023-05-22 18:41 ` [PATCH iproute2-next 1/9] dcb: app: expose dcb-app functions in new header Daniel Machon
                   ` (8 more replies)
  0 siblings, 9 replies; 25+ messages in thread
From: Daniel Machon @ 2023-05-22 18:41 UTC (permalink / raw)
  To: netdev; +Cc: dsahern, stephen, petrm, UNGLinuxDriver, daniel.machon

========================================================================               
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 Exposes dcb-app and dcb-rewr shared functions in a new header
         file dcb_app.h.

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

Patch #3 Modifies existing dcb-app print functions for reuse by
         dcb-rewr.

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

Patch #5 Modifies existing dcb-app function dcb_app_parse_mapping_cb for
         reuse by dcb-rewr.

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

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

Patch #9 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>
---
Daniel Machon (9):
      dcb: app: expose dcb-app functions in new header
      dcb: app: add new dcbnl attribute field
      dcb: app: modify dcb-app print functions for dcb-rewr reuse
      dcb: app: modify dcb_app_table_remove_replaced() for dcb-rewr reuse
      dcb: app: modify dcb_app_parse_mapping_cb for dcb-rewr reuse
      dcb: rewr: add new dcb-rewr subcommand
      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           |  10 +-
 dcb/dcb_app.c       | 165 +++++++++++++-------------
 dcb/dcb_app.h       |  61 ++++++++++
 dcb/dcb_rewr.c      | 332 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 man/man8/dcb-app.8  |  10 +-
 man/man8/dcb-rewr.8 | 206 ++++++++++++++++++++++++++++++++
 man/man8/dcb.8      |   4 +-
 9 files changed, 702 insertions(+), 93 deletions(-)
---
base-commit: 9c7bdc9f3328fb3fd5e7b77eb7b86f6c62538143
change-id: 20230510-dcb-rewr-534b7ab637eb

Best regards,
-- 
Daniel Machon <daniel.machon@microchip.com>


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2023-05-25  7:20 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-22 18:41 [PATCH iproute2-next 0/9] Introduce new dcb-rewr subcommand Daniel Machon
2023-05-22 18:41 ` [PATCH iproute2-next 1/9] dcb: app: expose dcb-app functions in new header Daniel Machon
2023-05-23 11:18   ` Petr Machata
2023-05-24  6:39     ` Daniel.Machon
2023-05-24  9:28       ` Petr Machata
2023-05-22 18:41 ` [PATCH iproute2-next 2/9] dcb: app: add new dcbnl attribute field Daniel Machon
2023-05-22 18:41 ` [PATCH iproute2-next 3/9] dcb: app: modify dcb-app print functions for dcb-rewr reuse Daniel Machon
2023-05-22 21:33   ` Stephen Hemminger
2023-05-25  7:20     ` Daniel Machon
2023-05-23 13:23   ` Petr Machata
2023-05-24  6:47     ` Daniel.Machon
2023-05-24  9:37       ` Petr Machata
2023-05-22 18:41 ` [PATCH iproute2-next 4/9] dcb: app: modify dcb_app_table_remove_replaced() " Daniel Machon
2023-05-23 14:42   ` Petr Machata
2023-05-22 18:41 ` [PATCH iproute2-next 5/9] dcb: app: modify dcb_app_parse_mapping_cb " Daniel Machon
2023-05-23 16:29   ` Petr Machata
2023-05-22 18:41 ` [PATCH iproute2-next 6/9] dcb: rewr: add new dcb-rewr subcommand Daniel Machon
2023-05-23 16:35   ` Petr Machata
2023-05-24  6:51     ` Daniel.Machon
2023-05-22 18:41 ` [PATCH iproute2-next 7/9] man: dcb-rewr: add new manpage for dcb-rewr Daniel Machon
2023-05-23 16:56   ` Petr Machata
2023-05-22 18:41 ` [PATCH iproute2-next 8/9] man: dcb: add additional references under 'SEE ALSO' Daniel Machon
2023-05-22 18:41 ` [PATCH iproute2-next 9/9] man: dcb-app: clean up a few mistakes Daniel Machon
2023-05-23 16:49   ` Petr Machata
2023-05-24  6:56     ` Daniel.Machon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).