On 2/3/26 3:02 AM, Paolo Abeni wrote:
> On 2/2/26 6:05 PM, Daniel Jurgens wrote:
>> +/**
>> + * struct virtio_net_ff_selector - Selector mask descriptor
>> + * @type: selector type, one of VIRTIO_NET_FF_MASK_TYPE_* constants
>> + * @flags: selector flags, see VIRTIO_NET_FF_MASK_F_* constants
>> + * @reserved: must be set to 0 by the driver and ignored by the device
>> + * @length: size in bytes of @mask
>> + * @reserved1: must be set to 0 by the driver and ignored by the device
>> + * @mask: variable-length mask payload for @type, length given by @length
>> + *
>> + * A selector describes a header mask that a classifier can apply. The 
>> format
>> + * of @mask depends on @type.
>> + */
>> +struct virtio_net_ff_selector {
>> +    __u8 type;
>> +    __u8 flags;
>> +    __u8 reserved[2];
>> +    __u8 length;
>> +    __u8 reserved1[3];
>> +    __u8 mask[];
> 
> Is a `__counted_by(length)` annotation relevant above?
> 
>> +};
>> +
>> +#define VIRTIO_NET_FF_MASK_TYPE_ETH  1
>> +#define VIRTIO_NET_FF_MASK_TYPE_IPV4 2
>> +#define VIRTIO_NET_FF_MASK_TYPE_IPV6 3
>> +#define VIRTIO_NET_FF_MASK_TYPE_TCP  4
>> +#define VIRTIO_NET_FF_MASK_TYPE_UDP  5
>> +#define VIRTIO_NET_FF_MASK_TYPE_MAX  VIRTIO_NET_FF_MASK_TYPE_UDP
>> +
>> +/**
>> + * 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: packed array of struct virtio_net_ff_selectors.
>> + */
>> +struct virtio_net_ff_cap_mask_data {
>> +    __u8 count;
>> +    __u8 reserved[7];
>> +    __u8 selectors[];
> 
> Similar point here for `selectors[] __counted_by(count)` and `actions[]
> __counted_by(count)` below.
> 
> /P

I can add this.

> 


Reply via email to