diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-06-27 10:50:21 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-27 22:48:48 +0300 |
commit | 3238b250b7624a20756667032648263eb3dc1521 (patch) | |
tree | 80adfec0f75b998d5dc746963e4c3865780ccf2e /drivers/net/ethernet/netronome/nfp/flower/main.c | |
parent | 38edbf6f5da4f87741e73b74dc323706827e83e0 (diff) | |
download | linux-3238b250b7624a20756667032648263eb3dc1521.tar.xz |
nfp: make the representor get stats app-independent
Thanks to the fact that all representors will now have an nfp_port,
we can depend on information there to provide a app-independent
.ndo_get_stats64().
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/flower/main.c')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/flower/main.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/flower/main.c b/drivers/net/ethernet/netronome/nfp/flower/main.c index 757bc3d78ea4..2e66d51ec104 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/main.c +++ b/drivers/net/ethernet/netronome/nfp/flower/main.c @@ -104,20 +104,6 @@ nfp_flower_repr_get(struct nfp_app *app, u32 port_id) return reprs->reprs[port]; } -static void -nfp_flower_repr_netdev_get_stats64(struct net_device *netdev, - struct rtnl_link_stats64 *stats) -{ - struct nfp_repr *repr = netdev_priv(netdev); - enum nfp_repr_type type; - u32 port_id; - u8 port = 0; - - port_id = repr->dst->u.port_info.port_id; - type = nfp_flower_repr_get_type_and_port(repr->app, port_id, &port); - nfp_repr_get_stats64(repr->app, type, port, stats); -} - static int nfp_flower_repr_netdev_open(struct net_device *netdev) { int err; @@ -144,7 +130,7 @@ static const struct net_device_ops nfp_flower_repr_netdev_ops = { .ndo_open = nfp_flower_repr_netdev_open, .ndo_stop = nfp_flower_repr_netdev_stop, .ndo_start_xmit = nfp_repr_xmit, - .ndo_get_stats64 = nfp_flower_repr_netdev_get_stats64, + .ndo_get_stats64 = nfp_repr_get_stats64, .ndo_has_offload_stats = nfp_repr_has_offload_stats, .ndo_get_offload_stats = nfp_repr_get_offload_stats, }; |