Re: [PATCH net-next v6 5/9] net: dsa: microchip: add support for different DCB app configurations

From: Vladimir Oltean
Date: Wed Apr 10 2024 - 11:33:00 EST


On Wed, Apr 10, 2024 at 10:05:52AM +0200, Oleksij Rempel wrote:
> diff --git a/drivers/net/dsa/microchip/ksz_dcb.c b/drivers/net/dsa/microchip/ksz_dcb.c
> new file mode 100644
> index 0000000000000..d2122f844c80b
> --- /dev/null
> +++ b/drivers/net/dsa/microchip/ksz_dcb.c
> +/**
> + * ksz_supported_apptrust[] - Supported apptrust selectors and Priority Order
> + * of Internal Priority Value (IPV) sources.
> + *
> + * This array defines the apptrust selectors supported by the hardware, where
> + * the index within the array indicates the priority of the selector - lower
> + * indices correspond to higher priority. This fixed priority scheme is due to
> + * the hardware's design, which does not support configurable priority among
> + * different priority sources.
> + *
> + * The priority sources, including Tail Tag, ACL, VLAN PCP and DSCP are ordered
> + * by the hardware's fixed logic, as detailed below. The order reflects a
> + * non-configurable precedence where certain types of priority information
> + * override others:
> + *
> + * 1. Tail Tag - Highest priority, overrides ACL, VLAN PCP, and DSCP priorities.
> + * 2. ACL - Overrides VLAN PCP and DSCP priorities.
> + * 3. VLAN PCP - Overrides DSCP priority.
> + * 4. DSCP - Lowest priority, does not override any other priority source.
> + *
> + * In this context, the array's lower index (higher priority) for
> + * 'DCB_APP_SEL_PCP' suggests its relative priority over
> + * 'IEEE_8021QAZ_APP_SEL_DSCP' within the system's fixed priority scheme.
> + *
> + * DCB_APP_SEL_PCP - Priority Code Point selector
> + * IEEE_8021QAZ_APP_SEL_DSCP - Differentiated Services Code Point selector
> + */
> +static const u8 ksz_supported_apptrust[] = {
> + DCB_APP_SEL_PCP,
> + IEEE_8021QAZ_APP_SEL_DSCP,
> +};

I've no idea how kernel-doc is supposed to document arrays. But this
generates a scripts/kernel-doc warning:

CHECK ../drivers/net/dsa/microchip/ksz_dcb.c
./drivers/net/dsa/microchip/ksz_dcb.c:81: warning: cannot understand function prototype: 'const u8 ksz_supported_apptrust[] = '

Worst case, it doesn't need to be a kernel-doc?