Subject: Re: [PATCH iproute2-next 1/2] dcb: add new pcp-prio parameter to dcb app

From: Petr Machata <[email-masked]>
Date: Thu, 24 Nov 2022 17:11:43 +0100

Petr Machata <[email-masked]> writes:

> This looks good to me overall, I just have a few nits.
>
> Daniel Machon <[email-masked]> writes:
>
>> Add new pcp-prio parameter to the app subcommand, which can be used to
>> classify traffic based on PCP and DEI from the VLAN header. PCP and DEI
>> is specified in a combination of numerical and symbolic form, where 'de'
>> (as specified in the PCP Encoding Table, 802.1Q) means DEI=1.
>>
>> Map PCP 1 and DEI 0 to priority 1 $ dcb app add dev eth0 pcp-prio 1:1
>>
>> Map PCP 1 and DEI 1 to priority 1 $ dcb app add dev eth0 pcp-prio 1de:1
>>
>> Internally, PCP and DEI is encoded in the protocol field of the dcb_app
>> struct. Each combination of PCP and DEI maps to a priority, thus needing
>> a range of  0-15. A well formed dcb_app entry for PCP/DEI
>> prioritization, could look like:
>>
>>     struct dcb_app pcp = {
>>         .selector = DCB_APP_SEL_PCP,
>> 	.priority = 7,
>>         .protocol = 15
>>     }
>>
>> For mapping PCP=7 and DEI=1 to Prio=7.
>>
>> Also, two helper functions for translating between std and non-std APP
>> selectors, have been added to dcb_app.c and exposed through dcb.h.
>
> Could you include an example or two of how PCP is configured? E.g. the
> following was part of the dcb-app submission:
>
>     # dcb app add dev eni1np1 dscp-prio 0:0 CS3:3 CS6:6
>     # dcb app show dev eni1np1
>     dscp-prio 0:0 CS3:3 CS6:6

I just noticed you have the examples up there. Maybe just reformat them
a bit so that they stand out.