Subject: Re: [PATCH net-next v5 05/12] virtio_net: Query and set flow filter caps

From: Jakub Kicinski <[email-masked]>
Date: Mon, 20 Oct 2025 16:59:57 -0700

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 */

?
-- 
pw-bot: cr