diff options
author | Eugenia Emantayev <eugenia@mellanox.com> | 2017-11-08 16:51:06 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2018-01-09 07:40:48 +0200 |
commit | b8a0dbe3a90b2debd72cd9a304eacac55c44e5a4 (patch) | |
tree | 8168e7b3902ecb22958ff02fb5d1abef42af0d2b /drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c | |
parent | c5a9f6f0ab4054082dd5ce9bbdaa8e8ff05cf365 (diff) | |
download | linux-stable-b8a0dbe3a90b2debd72cd9a304eacac55c44e5a4.tar.gz linux-stable-b8a0dbe3a90b2debd72cd9a304eacac55c44e5a4.tar.bz2 linux-stable-b8a0dbe3a90b2debd72cd9a304eacac55c44e5a4.zip |
net/mlx5e: E-switch, Add steering drop counters
Add flow counters to count packets dropped due to drop rules
configured in eswitch egress and ingress ACLs.
These counters will count VFs violations and incoming traffic drops.
Will be presented on hypervisor via standard 'ip -s link show' command.
Example: "ip -s link show dev enp5s0f0"
6: enp5s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 24:8a:07:a5:28:f0 brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 2
TX: bytes packets errors dropped carrier collsns
1406 17 0 0 0 0
vf 0 MAC 00:00:ca:fe:ca:fe, vlan 5, spoof checking off, link-state auto, trust off, query_rss off
RX: bytes packets mcast bcast dropped
1666 29 14 32 0
TX: bytes packets dropped
2880 44 2412
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c index 89d1f8650033..b7ab929d5f8e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c @@ -312,6 +312,12 @@ void mlx5_cleanup_fc_stats(struct mlx5_core_dev *dev) } } +int mlx5_fc_query(struct mlx5_core_dev *dev, u16 id, + u64 *packets, u64 *bytes) +{ + return mlx5_cmd_fc_query(dev, id, packets, bytes); +} + void mlx5_fc_query_cached(struct mlx5_fc *counter, u64 *bytes, u64 *packets, u64 *lastuse) { |