[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <363e9a64-730b-4af1-97c0-014324aa45a2@nvidia.com>
Date: Wed, 1 Oct 2025 09:15:30 -0500
From: Dan Jurgens <danielj@...dia.com>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: netdev@...r.kernel.org, jasowang@...hat.com, alex.williamson@...hat.com,
pabeni@...hat.com, virtualization@...ts.linux.dev, parav@...dia.com,
shshitrit@...dia.com, yohadt@...dia.com, xuanzhuo@...ux.alibaba.com,
eperezma@...hat.com, shameerali.kolothum.thodi@...wei.com, jgg@...pe.ca,
kevin.tian@...el.com, kuba@...nel.org, andrew+netdev@...n.ch,
edumazet@...gle.com
Subject: Re: [PATCH net-next v3 08/11] virtio_net: Implement IPv4 ethtool flow
rules
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.
Powered by blists - more mailing lists