const struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev)
{
	const struct net_device_ops *ops = dev->netdev_ops;

	if (ops->ndo_get_stats64)
		return ops->ndo_get_stats64(dev);
	if (ops->ndo_get_stats)
		return (struct rtnl_link_stats64 *)ops->ndo_get_stats(dev);

	dev_txq_stats_fold(dev, &dev->stats);
	return &dev->stats64;
}
const struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev)
{
	const struct net_device_ops *ops = dev->netdev_ops;

	if (ops->ndo_get_stats64)
		return ops->ndo_get_stats64(dev);
	if (ops->ndo_get_stats)
		return (struct rtnl_link_stats64 *)ops->ndo_get_stats(dev);

	dev_txq_stats_fold(dev, &dev->stats);
	return &dev->stats64;
}