svn commit: r322166 - in stable/9/sys/ofed: drivers/net/mlx4 include/linux/mlx4
Hans Petter Selasky
hselasky at FreeBSD.org
Mon Aug 7 13:27:37 UTC 2017
Author: hselasky
Date: Mon Aug 7 13:27:35 2017
New Revision: 322166
URL: https://svnweb.freebsd.org/changeset/base/322166
Log:
MFC r321782:
Remove some dead statistics related code and a structure field from the
mlx4en driver which is used by its Linux counterpart, but not under
FreeBSD.
Sponsored by: Mellanox Technologies
Modified:
stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c
stable/9/sys/ofed/drivers/net/mlx4/mlx4_en.h
stable/9/sys/ofed/drivers/net/mlx4/mlx4_stats.h
stable/9/sys/ofed/drivers/net/mlx4/port.c
stable/9/sys/ofed/include/linux/mlx4/device.h
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c
==============================================================================
--- stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Mon Aug 7 13:25:57 2017 (r322165)
+++ stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Mon Aug 7 13:27:35 2017 (r322166)
@@ -1378,8 +1378,6 @@ int mlx4_en_start_port(struct net_device *dev)
/* Schedule multicast task to populate multicast list */
queue_work(mdev->workqueue, &priv->rx_mode_task);
- mlx4_set_stats_bitmap(mdev->dev, priv->stats_bitmap);
-
priv->port_up = true;
/* Enable the queues. */
@@ -2731,28 +2729,6 @@ static void mlx4_en_sysctl_stat(struct mlx4_en_priv *p
SYSCTL_ADD_ULONG(ctx, node_list, OID_AUTO, "rx_gt_1548_bytes_packets", CTLFLAG_RD,
&priv->pkstats.rx_gt_1548_bytes_packets,
"RX Greater Then 1548 bytes Packets");
-
-struct mlx4_en_pkt_stats {
- unsigned long tx_packets;
- unsigned long tx_bytes;
- unsigned long tx_multicast_packets;
- unsigned long tx_broadcast_packets;
- unsigned long tx_errors;
- unsigned long tx_dropped;
- unsigned long tx_lt_64_bytes_packets;
- unsigned long tx_127_bytes_packets;
- unsigned long tx_255_bytes_packets;
- unsigned long tx_511_bytes_packets;
- unsigned long tx_1023_bytes_packets;
- unsigned long tx_1518_bytes_packets;
- unsigned long tx_1522_bytes_packets;
- unsigned long tx_1548_bytes_packets;
- unsigned long tx_gt_1548_bytes_packets;
- unsigned long rx_prio[NUM_PRIORITIES][NUM_PRIORITY_STATS];
- unsigned long tx_prio[NUM_PRIORITIES][NUM_PRIORITY_STATS];
-#define NUM_PKT_STATS 72
-};
-
SYSCTL_ADD_ULONG(ctx, node_list, OID_AUTO, "tx_packets", CTLFLAG_RD,
&priv->pkstats.tx_packets, "TX packets");
Modified: stable/9/sys/ofed/drivers/net/mlx4/mlx4_en.h
==============================================================================
--- stable/9/sys/ofed/drivers/net/mlx4/mlx4_en.h Mon Aug 7 13:25:57 2017 (r322165)
+++ stable/9/sys/ofed/drivers/net/mlx4/mlx4_en.h Mon Aug 7 13:27:35 2017 (r322166)
@@ -571,7 +571,6 @@ struct mlx4_en_priv {
struct mlx4_en_port_stats port_stats;
struct mlx4_en_vport_stats vport_stats;
struct mlx4_en_vf_stats vf_stats;
- DECLARE_BITMAP(stats_bitmap, NUM_ALL_STATS);
struct list_head mc_list;
struct list_head curr_list;
u64 broadcast_id;
Modified: stable/9/sys/ofed/drivers/net/mlx4/mlx4_stats.h
==============================================================================
--- stable/9/sys/ofed/drivers/net/mlx4/mlx4_stats.h Mon Aug 7 13:25:57 2017 (r322165)
+++ stable/9/sys/ofed/drivers/net/mlx4/mlx4_stats.h Mon Aug 7 13:27:35 2017 (r322166)
@@ -82,7 +82,6 @@ struct mlx4_en_pkt_stats {
unsigned long tx_gt_1548_bytes_packets;
unsigned long rx_prio[NUM_PRIORITIES][NUM_PRIORITY_STATS];
unsigned long tx_prio[NUM_PRIORITIES][NUM_PRIORITY_STATS];
-#define NUM_PKT_STATS 72
};
struct mlx4_en_vf_stats {
@@ -97,7 +96,6 @@ struct mlx4_en_vf_stats {
unsigned long tx_multicast_packets;
unsigned long tx_broadcast_packets;
unsigned long tx_errors;
-#define NUM_VF_STATS 11
};
struct mlx4_en_vport_stats {
@@ -116,7 +114,6 @@ struct mlx4_en_vport_stats {
unsigned long tx_broadcast_packets;
unsigned long tx_broadcast_bytes;
unsigned long tx_errors;
-#define NUM_VPORT_STATS 15
};
struct mlx4_en_port_stats {
@@ -129,7 +126,6 @@ struct mlx4_en_port_stats {
unsigned long rx_chksum_good;
unsigned long rx_chksum_none;
unsigned long tx_chksum_offload;
-#define NUM_PORT_STATS 8
};
struct mlx4_en_perf_stats {
@@ -139,7 +135,6 @@ struct mlx4_en_perf_stats {
u16 tx_coal_avg;
u16 rx_coal_avg;
u32 napi_quota;
-#define NUM_PERF_COUNTERS 6
};
struct mlx4_en_flow_stats {
@@ -151,8 +146,6 @@ struct mlx4_en_flow_stats {
u64 tx_pause_transition;
};
#define MLX4_NUM_PRIORITIES 8
-#define NUM_FLOW_PRIORITY_STATS 6
-#define NUM_FLOW_STATS (NUM_FLOW_PRIORITY_STATS*MLX4_NUM_PRIORITIES)
struct mlx4_en_stat_out_flow_control_mbox {
@@ -180,6 +173,4 @@ int mlx4_get_vport_ethtool_stats(struct mlx4_dev *dev,
struct mlx4_en_vport_stats *vport_stats,
int reset);
-#define NUM_ALL_STATS (NUM_PKT_STATS + NUM_FLOW_STATS + NUM_VPORT_STATS + \
- NUM_VF_STATS + NUM_PORT_STATS + NUM_PERF_STATS)
#endif
Modified: stable/9/sys/ofed/drivers/net/mlx4/port.c
==============================================================================
--- stable/9/sys/ofed/drivers/net/mlx4/port.c Mon Aug 7 13:25:57 2017 (r322165)
+++ stable/9/sys/ofed/drivers/net/mlx4/port.c Mon Aug 7 13:27:35 2017 (r322166)
@@ -980,38 +980,6 @@ int mlx4_DUMP_ETH_STATS_wrapper(struct mlx4_dev *dev,
return 0;
}
-void mlx4_set_stats_bitmap(struct mlx4_dev *dev, unsigned long *stats_bitmap)
-{
- int last_i = 0;
-
- bitmap_zero(stats_bitmap, NUM_ALL_STATS);
-
- if (mlx4_is_slave(dev)) {
- last_i = dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN ?
- NUM_PKT_STATS + NUM_FLOW_STATS : NUM_PKT_STATS;
- } else {
- bitmap_set(stats_bitmap, last_i, NUM_PKT_STATS);
- last_i = NUM_PKT_STATS;
-
- if (dev->caps.flags2 &
- MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN) {
- bitmap_set(stats_bitmap, last_i, NUM_FLOW_STATS);
- last_i += NUM_FLOW_STATS;
- }
- }
-
- if (mlx4_is_slave(dev))
- bitmap_set(stats_bitmap, last_i, NUM_VF_STATS);
- last_i += NUM_VF_STATS;
-
- if (mlx4_is_master(dev))
- bitmap_set(stats_bitmap, last_i, NUM_VPORT_STATS);
- last_i += NUM_VPORT_STATS;
-
- bitmap_set(stats_bitmap, last_i, NUM_PORT_STATS);
-}
-EXPORT_SYMBOL(mlx4_set_stats_bitmap);
-
int mlx4_get_slave_from_roce_gid(struct mlx4_dev *dev, int port, u8 *gid, int *slave_id)
{
struct mlx4_priv *priv = mlx4_priv(dev);
Modified: stable/9/sys/ofed/include/linux/mlx4/device.h
==============================================================================
--- stable/9/sys/ofed/include/linux/mlx4/device.h Mon Aug 7 13:25:57 2017 (r322165)
+++ stable/9/sys/ofed/include/linux/mlx4/device.h Mon Aug 7 13:27:35 2017 (r322166)
@@ -1273,7 +1273,6 @@ int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u
void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, u64 mac);
int mlx4_get_base_qpn(struct mlx4_dev *dev, u8 port);
int __mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac);
-void mlx4_set_stats_bitmap(struct mlx4_dev *dev, unsigned long *stats_bitmap);
int mlx4_SET_PORT_general(struct mlx4_dev *dev, u8 port, int mtu,
u8 pptx, u8 pfctx, u8 pprx, u8 pfcrx);
int mlx4_SET_PORT_qpn_calc(struct mlx4_dev *dev, u8 port, u32 base_qpn,
More information about the svn-src-stable-9
mailing list