Re: [PATCH net-next v3 08/11] virtio_net: Implement IPv4 ethtool flow rules
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2025-09-25 21:20:57
Also in:
virtualization
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2025-09-25 21:20:57
Also in:
virtualization
On Thu, Sep 25, 2025 at 04:13:42PM -0500, Dan Jurgens wrote:
On 9/25/25 3:53 PM, Michael S. Tsirkin wrote:quoted
On Tue, Sep 23, 2025 at 09:19:17AM -0500, Daniel Jurgens wrote:quoted
Add support for IP_USER type rules from ethtool. +static +struct virtio_net_ff_selector *next_selector(struct virtio_net_ff_selector *sel) +{ + void *nextsel; + + nextsel = (u8 *)sel + sizeof(struct virtio_net_ff_selector) + + sel->length;you do not need this variable. and cast to void* looks cleaner imho.It's cast to u8* so we do pointer arithmetic in bytes, which is not standard C on void*. GCC doesn't mind, but I thing Clang does. I saw you had a similar comment on a subsequent too.>
it's a known C standard bug. kernel does void* math everywhere. Linus hath spoken on this ;)
quoted
quoted
+ + return nextsel; +} +