Thread (17 messages) 17 messages, 3 authors, 2025-10-21

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

From: Dan Jurgens <hidden>
Date: 2025-10-21 13:26:39
Also in: virtualization

On 10/20/25 6:59 PM, Jakub Kicinski wrote:
On Thu, 16 Oct 2025 00:00:48 -0500 Daniel Jurgens wrote:
quoted
+struct virtio_net_ff_selector {
+	__u8 type;
+	__u8 flags;
+	__u8 reserved[2];
+	__u8 length;
+	__u8 reserved1[3];
+	__u8 mask[];
+};
quoted
+/**
+ * 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help