On 10/20/25 6:59 PM, Jakub Kicinski wrote:
> On Thu, 16 Oct 2025 00:00:48 -0500 Daniel Jurgens wrote:
>> +struct virtio_net_ff_selector {
>> + __u8 type;
>> + __u8 flags;
>> + __u8 reserved[2];
>> + __u8 length;
>> + __u8 reserved1[3];
>> + __u8 mask[];
>> +};
>
>> +/**
>> + * struct virtio_net_ff_cap_mask_data - Supported selector mask formats
>> + * @count: number of entries in @selectors
>> + * @reserved: must be set to 0 by the driver and ignored by the device
>> + * @selectors: array of supported selector descriptors
>> + */
>> +struct virtio_net_ff_cap_mask_data {
>> + __u8 count;
>> + __u8 reserved[7];
>> + struct virtio_net_ff_selector selectors[];
>> +};
>
> sparse complains:
>
> include/uapi/linux/virtio_net_ff.h:73:48: warning: array of flexible
> structures
>
> which seems legit. Since only element 0 can reasonably be accessed
> perhaps make selectors
>
> __u8 selectors[]; /* struct virtio_net_ff_selector */
>
> ?
Yes, it's being used as if it were a u8 * anyway. I'll do that.