Message ID | 20230510-dcb-rewr-v3-9-60a766f72e61@microchip.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 19919442f1b147f556b1cb4f79c40f720a6e0cf6 |
Delegated to: | David Ahern |
Headers | show |
Series | Introduce new dcb-rewr subcommand | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
Daniel Machon <daniel.machon@microchip.com> writes: > A symbol, DCB_APP_PCP_MAX, for maximum PCP value, already exists. Lets > add a symbol DCB_APP_DSCP_MAX and update accordingly. > > Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Petr Machata <me@pmachata.org>
diff --git a/dcb/dcb.h b/dcb/dcb.h index ff11a122ba37..b2e8e89f7701 100644 --- a/dcb/dcb.h +++ b/dcb/dcb.h @@ -73,6 +73,7 @@ struct dcb_app_parse_mapping { }; #define DCB_APP_PCP_MAX 15 +#define DCB_APP_DSCP_MAX 63 int dcb_cmd_app(struct dcb *dcb, int argc, char **argv); diff --git a/dcb/dcb_app.c b/dcb/dcb_app.c index 9c2727eff7d8..7040e62cbb47 100644 --- a/dcb/dcb_app.c +++ b/dcb/dcb_app.c @@ -306,7 +306,7 @@ static int dcb_app_parse_mapping_dscp_prio(__u32 key, char *value, void *data) if (get_u8(&prio, value, 0)) return -EINVAL; - return dcb_parse_mapping("DSCP", key, 63, + return dcb_parse_mapping("DSCP", key, DCB_APP_DSCP_MAX, "PRIO", prio, IEEE_8021QAZ_MAX_TCS - 1, dcb_app_parse_mapping_cb, data); } diff --git a/dcb/dcb_rewr.c b/dcb/dcb_rewr.c index facbdbe664a4..5bb649adce24 100644 --- a/dcb/dcb_rewr.c +++ b/dcb/dcb_rewr.c @@ -76,7 +76,7 @@ static int dcb_rewr_parse_mapping_prio_dscp(__u32 key, char *value, void *data) return -EINVAL; return dcb_parse_mapping("PRIO", key, IEEE_8021QAZ_MAX_TCS - 1, - "DSCP", dscp, 63, + "DSCP", dscp, DCB_APP_DSCP_MAX, dcb_rewr_parse_mapping_cb, data); }
A symbol, DCB_APP_PCP_MAX, for maximum PCP value, already exists. Lets add a symbol DCB_APP_DSCP_MAX and update accordingly. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- dcb/dcb.h | 1 + dcb/dcb_app.c | 2 +- dcb/dcb_rewr.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-)