On 9/25/25 3:53 PM, Michael S. Tsirkin wrote:
> On Tue, Sep 23, 2025 at 09:19:17AM -0500, Daniel Jurgens wrote:
>> Add support for IP_USER type rules from ethtool.

>> +static bool validate_ip4_mask(const struct virtnet_ff *ff,
>> +                          const struct virtio_net_ff_selector *sel,
>> +                          const struct virtio_net_ff_selector *sel_cap)
> 
> I'd prefer that all functions have virtnet prefix,
> avoid polluting the global namespace.
> 
How do static functions pollute the global namespace?


>>  
>> +static void parse_ip4(struct iphdr *mask, struct iphdr *key,
>> +                  const struct ethtool_rx_flow_spec *fs)

>> +    key->daddr = l3_val->ip4dst;
>> +
>> +    if (mask->protocol) {
>> +            mask->protocol = l3_mask->proto;
> 
> Is this right? You just checked mask->protocol and are
> now overriding it?
> 

Right, should be l3_mask->protocol. Our controller was setting based on
types so this wasn't exposed as a bug.



Reply via email to