Thread (58 messages) 58 messages, 7 authors, 2025-10-01

Re: [PATCH net-next v3 04/11] virtio_net: Query and set flow filter caps

From: Dan Jurgens <hidden>
Date: 2025-09-26 04:54:14
Also in: virtualization

On 9/25/25 4:16 PM, Michael S. Tsirkin wrote:
On Tue, Sep 23, 2025 at 09:19:13AM -0500, Daniel Jurgens wrote:
quoted
When probing a virtnet device, attempt to read the flow filter
capabilities. In order to use the feature the caps must also
be set. For now setting what was read is sufficient.
+	ff_mask_size = sizeof(struct virtio_net_ff_cap_mask_data);
+	sel = &ff->ff_mask->selectors[0];
+
+	for (int i = 0; i < ff->ff_mask->count; i++) {
i think kernel prefers variables at beginning of the block
i was already declared. Removed this.
quoted
+		ff_mask_size += sizeof(struct virtio_net_ff_selector) + sel->length;
do we know this will not overflow?
length is u8, ff_mask_size is size_t, so probably not, but I added a
check of length against the max length we expect.
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help