[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240612173944.05121bf0@kernel.org>
Date: Wed, 12 Jun 2024 17:39:44 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Justin Lai <justinlai0215@...ltek.com>
Cc: <davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>,
<linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>, <andrew@...n.ch>,
<jiri@...nulli.us>, <horms@...nel.org>, <rkannoth@...vell.com>,
<pkshih@...ltek.com>, <larry.chiu@...ltek.com>
Subject: Re: [PATCH net-next v20 08/13] rtase: Implement net_device_ops
On Fri, 7 Jun 2024 16:43:16 +0800 Justin Lai wrote:
> +static void rtase_get_stats64(struct net_device *dev,
> + struct rtnl_link_stats64 *stats)
> +{
> + const struct rtase_private *tp = netdev_priv(dev);
> + const struct rtase_counters *counters;
> +
> + counters = tp->tally_vaddr;
> +
> + if (!counters)
> + return;
Same question about how this can be null as in the ethtool patch..
> + netdev_stats_to_stats64(stats, &dev->stats);
Please dont use this field, there is a comment on it:
struct net_device_stats stats; /* not used by modern drivers */
You can store the fields you need for counters in struct rtase_private
> + dev_fetch_sw_netstats(stats, dev->tstats);
Powered by blists - more mailing lists