Skip to content

Commit

Permalink
net: sit: Do not set .ndo_get_stats64
Browse files Browse the repository at this point in the history
If the driver is using the network core allocation mechanism, by setting
NETDEV_PCPU_STAT_TSTATS, as this driver is, then, it doesn't need to set
the dev_get_tstats64() generic .ndo_get_stats64 function pointer. Since
the network core calls it automatically, and .ndo_get_stats64 should
only be set if the driver needs special treatment.

This simplifies the driver, since all the generic statistics is now
handled by core.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Breno Leitao authored and Paolo Abeni committed Feb 29, 2024
1 parent 3e2f544 commit fa0cd90
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,6 @@ static const struct net_device_ops ipip6_netdev_ops = {
.ndo_uninit = ipip6_tunnel_uninit,
.ndo_start_xmit = sit_tunnel_xmit,
.ndo_siocdevprivate = ipip6_tunnel_siocdevprivate,
.ndo_get_stats64 = dev_get_tstats64,
.ndo_get_iflink = ip_tunnel_get_iflink,
.ndo_tunnel_ctl = ipip6_tunnel_ctl,
};
Expand Down

0 comments on commit fa0cd90

Please sign in to comment.