netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2-next v2 0/8] Introduce new dcb-rewr subcommand
@ 2023-05-25 18:10 Daniel Machon
  2023-05-25 18:10 ` [PATCH iproute2-next v2 1/8] dcb: app: add new dcbnl attribute field Daniel Machon
                   ` (7 more replies)
  0 siblings, 8 replies; 25+ messages in thread
From: Daniel Machon @ 2023-05-25 18:10 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 Adds a new field 'attr' to the dcb_app_table struct, which is
         used to distinguish app and rewrite tables.

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

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

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

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

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

Patch #8 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 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 (8):
      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           |  58 +++++++++
 dcb/dcb_app.c       | 167 +++++++++++++-----------
 dcb/dcb_rewr.c      | 355 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 man/man8/dcb-app.8  |  10 +-
 man/man8/dcb-rewr.8 | 206 ++++++++++++++++++++++++++++++
 man/man8/dcb.8      |   4 +-
 8 files changed, 727 insertions(+), 80 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-31 14:28 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-25 18:10 [PATCH iproute2-next v2 0/8] Introduce new dcb-rewr subcommand Daniel Machon
2023-05-25 18:10 ` [PATCH iproute2-next v2 1/8] dcb: app: add new dcbnl attribute field Daniel Machon
2023-05-25 18:10 ` [PATCH iproute2-next v2 2/8] dcb: app: modify dcb-app print functions for dcb-rewr reuse Daniel Machon
2023-05-29 17:09   ` Petr Machata
2023-05-30  8:01     ` Daniel Machon
2023-05-31  8:31     ` Daniel Machon
2023-05-31 11:26       ` Petr Machata
2023-05-31 14:28         ` David Ahern
2023-05-25 18:10 ` [PATCH iproute2-next v2 3/8] dcb: app: modify dcb_app_table_remove_replaced() " Daniel Machon
2023-05-29 17:00   ` Petr Machata
2023-05-30  8:03     ` Daniel Machon
2023-05-30 20:29     ` Petr Machata
2023-05-25 18:10 ` [PATCH iproute2-next v2 4/8] dcb: app: modify dcb_app_parse_mapping_cb " Daniel Machon
2023-05-30 19:50   ` Petr Machata
2023-05-31  8:12     ` Daniel Machon
2023-05-31 11:05       ` Petr Machata
2023-05-25 18:10 ` [PATCH iproute2-next v2 5/8] dcb: rewr: add new dcb-rewr subcommand Daniel Machon
2023-05-30 19:58   ` Petr Machata
2023-05-31  8:14     ` Daniel Machon
2023-05-25 18:10 ` [PATCH iproute2-next v2 6/8] man: dcb-rewr: add new manpage for dcb-rewr Daniel Machon
2023-05-30 19:47   ` Petr Machata
2023-05-25 18:10 ` [PATCH iproute2-next v2 7/8] man: dcb: add additional references under 'SEE ALSO' Daniel Machon
2023-05-30 19:39   ` Petr Machata
2023-05-25 18:10 ` [PATCH iproute2-next v2 8/8] man: dcb-app: clean up a few mistakes Daniel Machon
2023-05-30 19:37   ` Petr Machata

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).