aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorEran Ben Elisha <eranbe@mellanox.com>2015-06-15 17:59:07 +0300
committerDavid S. Miller <davem@davemloft.net>2015-06-15 17:23:03 -0700
commit3b766cd832328fcb87db3507e7b98cf42f21689d (patch)
treeb43cde2790d654f5d4a5e0254c7db783c520768c /include/uapi
parentnet/mlx4_en: Show PF own statistics via ethtool (diff)
downloadlinux-dev-3b766cd832328fcb87db3507e7b98cf42f21689d.tar.xz
linux-dev-3b766cd832328fcb87db3507e7b98cf42f21689d.zip
net/core: Add reading VF statistics through the PF netdevice
Add ndo_get_vf_stats where the PF retrieves and fills the VFs traffic statistics. We encode the VF stats in a nested manner to allow for future extensions. Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com> Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/if_link.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 510efb360580..2c7e8e3d3981 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -484,6 +484,7 @@ enum {
IFLA_VF_RSS_QUERY_EN, /* RSS Redirection Table and Hash Key query
* on/off switch
*/
+ IFLA_VF_STATS, /* network device statistics */
__IFLA_VF_MAX,
};
@@ -533,6 +534,18 @@ struct ifla_vf_rss_query_en {
__u32 setting;
};
+enum {
+ IFLA_VF_STATS_RX_PACKETS,
+ IFLA_VF_STATS_TX_PACKETS,
+ IFLA_VF_STATS_RX_BYTES,
+ IFLA_VF_STATS_TX_BYTES,
+ IFLA_VF_STATS_BROADCAST,
+ IFLA_VF_STATS_MULTICAST,
+ __IFLA_VF_STATS_MAX,
+};
+
+#define IFLA_VF_STATS_MAX (__IFLA_VF_STATS_MAX - 1)
+
/* VF ports management section
*
* Nested layout of set/get msg is: