[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6cb58417-3c5c-4f74-9a04-2bdbc266254b@nvidia.com>
Date: Tue, 21 Oct 2025 08:26:32 -0500
From: Dan Jurgens <danielj@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, mst@...hat.com, jasowang@...hat.com,
alex.williamson@...hat.com, pabeni@...hat.com,
virtualization@...ts.linux.dev, parav@...dia.com, shshitrit@...dia.com,
yohadt@...dia.com, xuanzhuo@...ux.alibaba.com, eperezma@...hat.com,
shameerali.kolothum.thodi@...wei.com, jgg@...pe.ca, kevin.tian@...el.com,
andrew+netdev@...n.ch, edumazet@...gle.com
Subject: Re: [PATCH net-next v5 05/12] virtio_net: Query and set flow filter
caps
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.
Powered by blists - more mailing lists