[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251118173847-mutt-send-email-mst@kernel.org>
Date: Tue, 18 Nov 2025 17:39:52 -0500
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Daniel Jurgens <danielj@...dia.com>
Cc: netdev@...r.kernel.org, jasowang@...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, jgg@...pe.ca, kevin.tian@...el.com,
kuba@...nel.org, andrew+netdev@...n.ch, edumazet@...gle.com
Subject: Re: [PATCH net-next v11 12/12] virtio_net: Add get ethtool flow
rules ops
On Tue, Nov 18, 2025 at 08:39:02AM -0600, Daniel Jurgens wrote:
> @@ -5665,6 +5672,28 @@ static u32 virtnet_get_rx_ring_count(struct net_device *dev)
> return vi->curr_queue_pairs;
> }
>
> +static int virtnet_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info, u32 *rule_locs)
> +{
> + struct virtnet_info *vi = netdev_priv(dev);
> + int rc = 0;
not sure you should do this btw - it is set on all paths,
and if you do not set it here then compiler will warn if
we add a clause and forget to set rc.
> +
> + switch (info->cmd) {
> + case ETHTOOL_GRXCLSRLCNT:
> + rc = virtnet_ethtool_get_flow_count(&vi->ff, info);
> + break;
> + case ETHTOOL_GRXCLSRULE:
> + rc = virtnet_ethtool_get_flow(&vi->ff, info);
> + break;
> + case ETHTOOL_GRXCLSRLALL:
> + rc = virtnet_ethtool_get_all_flows(&vi->ff, info, rule_locs);
> + break;
> + default:
> + rc = -EOPNOTSUPP;
> + }
> +
> + return rc;
> +}
> +
> static int virtnet_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info)
> {
> struct virtnet_info *vi = netdev_priv(dev);
Powered by blists - more mailing lists