Re: [PATCH v3] batman-adv: Add flex array to struct batadv_tvlv_tt_data

From: Sven Eckelmann
Date: Sat May 04 2024 - 05:36:00 EST


On Wednesday, 1 May 2024 17:02:42 CEST Erick Archer wrote:
> diff --git a/include/uapi/linux/batadv_packet.h b/include/uapi/linux/batadv_packet.h
> index 6e25753015df..dfbe30536995 100644
> --- a/include/uapi/linux/batadv_packet.h
> +++ b/include/uapi/linux/batadv_packet.h
[...]
> +/**
> + * struct batadv_tvlv_tt_data - tt data propagated through the tt tvlv container
> + * @flags: translation table flags (see batadv_tt_data_flags)
> + * @ttvn: translation table version number
> + * @num_vlan: number of announced VLANs. In the TVLV this struct is followed by
> + * one batadv_tvlv_tt_vlan_data object per announced vlan
> + * @vlan_data: array of batadv_tvlv_tt_vlan_data objects
> + */
> +struct batadv_tvlv_tt_data {
> + __u8 flags;
> + __u8 ttvn;
> + __be16 num_vlan;
> + struct batadv_tvlv_tt_vlan_data vlan_data[] __counted_by_be(num_vlan);
> +};

Thanks for the updates. But I can't accept this at the moment because
__counted_by_be is used in an uapi header without it being defined
include/uapi/linux/stddef.h (and this file is also not included in this
header).

See commit c8248faf3ca2 ("Compiler Attributes: counted_by: Adjust name and
identifier expansion") as an example for the similar __counted_by macro.

Kind regards,
Sven

Attachment: signature.asc
Description: This is a digitally signed message part.