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);


Reply via email to