Searched refs:stats (Results 1 - 200 of 1566) sorted by relevance

12345678

/linux-4.1.27/tools/perf/util/
H A Dstat.h6 struct stats struct
12 void update_stats(struct stats *stats, u64 val);
13 double avg_stats(struct stats *stats);
14 double stddev_stats(struct stats *stats);
17 static inline void init_stats(struct stats *stats) init_stats() argument
19 stats->n = 0.0; init_stats()
20 stats->mean = 0.0; init_stats()
21 stats->M2 = 0.0; init_stats()
22 stats->min = (u64) -1; init_stats()
23 stats->max = 0; init_stats()
H A Dstat.c5 void update_stats(struct stats *stats, u64 val) update_stats() argument
9 stats->n++; update_stats()
10 delta = val - stats->mean; update_stats()
11 stats->mean += delta / stats->n; update_stats()
12 stats->M2 += delta*(val - stats->mean); update_stats()
14 if (val > stats->max) update_stats()
15 stats->max = val; update_stats()
17 if (val < stats->min) update_stats()
18 stats->min = val; update_stats()
21 double avg_stats(struct stats *stats) avg_stats() argument
23 return stats->mean; avg_stats()
42 double stddev_stats(struct stats *stats) stddev_stats() argument
46 if (stats->n < 2) stddev_stats()
49 variance = stats->M2 / (stats->n - 1); stddev_stats()
50 variance_mean = variance / stats->n; stddev_stats()
/linux-4.1.27/drivers/cpufreq/
H A Dcpufreq_stats.c33 static int cpufreq_stats_update(struct cpufreq_stats *stats) cpufreq_stats_update() argument
38 stats->time_in_state[stats->last_index] += cur_time - stats->last_time; cpufreq_stats_update()
39 stats->last_time = cur_time; cpufreq_stats_update()
46 return sprintf(buf, "%d\n", policy->stats->total_trans); show_total_trans()
51 struct cpufreq_stats *stats = policy->stats; show_time_in_state() local
55 cpufreq_stats_update(stats); show_time_in_state()
56 for (i = 0; i < stats->state_num; i++) { show_time_in_state()
57 len += sprintf(buf + len, "%u %llu\n", stats->freq_table[i], show_time_in_state()
59 jiffies_64_to_clock_t(stats->time_in_state[i])); show_time_in_state()
67 struct cpufreq_stats *stats = policy->stats; show_trans_table() local
73 for (i = 0; i < stats->state_num; i++) { show_trans_table()
77 stats->freq_table[i]); show_trans_table()
84 for (i = 0; i < stats->state_num; i++) { show_trans_table()
89 stats->freq_table[i]); show_trans_table()
91 for (j = 0; j < stats->state_num; j++) { show_trans_table()
95 stats->trans_table[i*stats->max_state+j]); show_trans_table()
121 .name = "stats"
124 static int freq_table_get_index(struct cpufreq_stats *stats, unsigned int freq) freq_table_get_index() argument
127 for (index = 0; index < stats->max_state; index++) freq_table_get_index()
128 if (stats->freq_table[index] == freq) freq_table_get_index()
135 struct cpufreq_stats *stats = policy->stats; __cpufreq_stats_free_table() local
138 if (!stats) __cpufreq_stats_free_table()
141 pr_debug("%s: Free stats table\n", __func__); __cpufreq_stats_free_table()
144 kfree(stats->time_in_state); __cpufreq_stats_free_table()
145 kfree(stats); __cpufreq_stats_free_table()
146 policy->stats = NULL; __cpufreq_stats_free_table()
165 struct cpufreq_stats *stats; __cpufreq_stats_create_table() local
170 /* We need cpufreq table for creating stats table */ __cpufreq_stats_create_table()
175 /* stats already initialized */ __cpufreq_stats_create_table()
176 if (policy->stats) __cpufreq_stats_create_table()
179 stats = kzalloc(sizeof(*stats), GFP_KERNEL); __cpufreq_stats_create_table()
180 if (!stats) __cpufreq_stats_create_table()
194 stats->time_in_state = kzalloc(alloc_size, GFP_KERNEL); __cpufreq_stats_create_table()
195 if (!stats->time_in_state) __cpufreq_stats_create_table()
198 stats->freq_table = (unsigned int *)(stats->time_in_state + count); __cpufreq_stats_create_table()
201 stats->trans_table = stats->freq_table + count; __cpufreq_stats_create_table()
204 stats->max_state = count; __cpufreq_stats_create_table()
208 if (freq_table_get_index(stats, pos->frequency) == -1) __cpufreq_stats_create_table()
209 stats->freq_table[i++] = pos->frequency; __cpufreq_stats_create_table()
211 stats->state_num = i; __cpufreq_stats_create_table()
212 stats->last_time = get_jiffies_64(); __cpufreq_stats_create_table()
213 stats->last_index = freq_table_get_index(stats, policy->cur); __cpufreq_stats_create_table()
215 policy->stats = stats; __cpufreq_stats_create_table()
221 policy->stats = NULL; __cpufreq_stats_create_table()
222 kfree(stats->time_in_state); __cpufreq_stats_create_table()
224 kfree(stats); __cpufreq_stats_create_table()
265 struct cpufreq_stats *stats; cpufreq_stat_notifier_trans() local
276 if (!policy->stats) { cpufreq_stat_notifier_trans()
277 pr_debug("%s: No stats found\n", __func__); cpufreq_stat_notifier_trans()
281 stats = policy->stats; cpufreq_stat_notifier_trans()
283 old_index = stats->last_index; cpufreq_stat_notifier_trans()
284 new_index = freq_table_get_index(stats, freq->new); cpufreq_stat_notifier_trans()
286 /* We can't do stats->time_in_state[-1]= .. */ cpufreq_stat_notifier_trans()
293 cpufreq_stats_update(stats); cpufreq_stat_notifier_trans()
295 stats->last_index = new_index; cpufreq_stat_notifier_trans()
297 stats->trans_table[old_index * stats->max_state + new_index]++; cpufreq_stat_notifier_trans()
299 stats->total_trans++; cpufreq_stat_notifier_trans()
353 MODULE_DESCRIPTION("Export cpufreq stats via sysfs");
/linux-4.1.27/drivers/infiniband/hw/ocrdma/
H A Docrdma_stats.c44 pr_err("%s: No space in stats buff\n", __func__); ocrdma_add_stat()
63 pr_err("%s: stats mbox allocation failed\n", __func__); ocrdma_alloc_stats_mem()
72 pr_err("%s: stats debugfs mem allocation failed\n", __func__); ocrdma_alloc_stats_mem()
91 char *stats = dev->stats_mem.debugfs_mem, *pcur; ocrdma_resource_stats() local
96 memset(stats, 0, (OCRDMA_MAX_DBGFS_MEM)); ocrdma_resource_stats()
98 pcur = stats; ocrdma_resource_stats()
99 pcur += ocrdma_add_stat(stats, pcur, "active_dpp_pds", ocrdma_resource_stats()
101 pcur += ocrdma_add_stat(stats, pcur, "active_non_dpp_pds", ocrdma_resource_stats()
103 pcur += ocrdma_add_stat(stats, pcur, "active_rc_dpp_qps", ocrdma_resource_stats()
105 pcur += ocrdma_add_stat(stats, pcur, "active_uc_dpp_qps", ocrdma_resource_stats()
107 pcur += ocrdma_add_stat(stats, pcur, "active_ud_dpp_qps", ocrdma_resource_stats()
109 pcur += ocrdma_add_stat(stats, pcur, "active_rc_non_dpp_qps", ocrdma_resource_stats()
111 pcur += ocrdma_add_stat(stats, pcur, "active_uc_non_dpp_qps", ocrdma_resource_stats()
113 pcur += ocrdma_add_stat(stats, pcur, "active_ud_non_dpp_qps", ocrdma_resource_stats()
115 pcur += ocrdma_add_stat(stats, pcur, "active_srqs", ocrdma_resource_stats()
117 pcur += ocrdma_add_stat(stats, pcur, "active_rbqs", ocrdma_resource_stats()
119 pcur += ocrdma_add_stat(stats, pcur, "active_64K_nsmr", ocrdma_resource_stats()
121 pcur += ocrdma_add_stat(stats, pcur, "active_64K_to_2M_nsmr", ocrdma_resource_stats()
123 pcur += ocrdma_add_stat(stats, pcur, "active_2M_to_44M_nsmr", ocrdma_resource_stats()
125 pcur += ocrdma_add_stat(stats, pcur, "active_44M_to_1G_nsmr", ocrdma_resource_stats()
127 pcur += ocrdma_add_stat(stats, pcur, "active_1G_to_4G_nsmr", ocrdma_resource_stats()
129 pcur += ocrdma_add_stat(stats, pcur, "active_nsmr_count_4G_to_32G", ocrdma_resource_stats()
131 pcur += ocrdma_add_stat(stats, pcur, "active_32G_to_64G_nsmr", ocrdma_resource_stats()
133 pcur += ocrdma_add_stat(stats, pcur, "active_64G_to_128G_nsmr", ocrdma_resource_stats()
135 pcur += ocrdma_add_stat(stats, pcur, "active_128G_to_higher_nsmr", ocrdma_resource_stats()
137 pcur += ocrdma_add_stat(stats, pcur, "active_embedded_nsmr", ocrdma_resource_stats()
139 pcur += ocrdma_add_stat(stats, pcur, "active_frmr", ocrdma_resource_stats()
141 pcur += ocrdma_add_stat(stats, pcur, "active_prefetch_qps", ocrdma_resource_stats()
143 pcur += ocrdma_add_stat(stats, pcur, "active_ondemand_qps", ocrdma_resource_stats()
145 pcur += ocrdma_add_stat(stats, pcur, "active_phy_mr", ocrdma_resource_stats()
147 pcur += ocrdma_add_stat(stats, pcur, "active_mw", ocrdma_resource_stats()
150 /* Print the threshold stats */ ocrdma_resource_stats()
153 pcur += ocrdma_add_stat(stats, pcur, "threshold_dpp_pds", ocrdma_resource_stats()
155 pcur += ocrdma_add_stat(stats, pcur, "threshold_non_dpp_pds", ocrdma_resource_stats()
157 pcur += ocrdma_add_stat(stats, pcur, "threshold_rc_dpp_qps", ocrdma_resource_stats()
159 pcur += ocrdma_add_stat(stats, pcur, "threshold_uc_dpp_qps", ocrdma_resource_stats()
161 pcur += ocrdma_add_stat(stats, pcur, "threshold_ud_dpp_qps", ocrdma_resource_stats()
163 pcur += ocrdma_add_stat(stats, pcur, "threshold_rc_non_dpp_qps", ocrdma_resource_stats()
165 pcur += ocrdma_add_stat(stats, pcur, "threshold_uc_non_dpp_qps", ocrdma_resource_stats()
167 pcur += ocrdma_add_stat(stats, pcur, "threshold_ud_non_dpp_qps", ocrdma_resource_stats()
169 pcur += ocrdma_add_stat(stats, pcur, "threshold_srqs", ocrdma_resource_stats()
171 pcur += ocrdma_add_stat(stats, pcur, "threshold_rbqs", ocrdma_resource_stats()
173 pcur += ocrdma_add_stat(stats, pcur, "threshold_64K_nsmr", ocrdma_resource_stats()
175 pcur += ocrdma_add_stat(stats, pcur, "threshold_64K_to_2M_nsmr", ocrdma_resource_stats()
177 pcur += ocrdma_add_stat(stats, pcur, "threshold_2M_to_44M_nsmr", ocrdma_resource_stats()
179 pcur += ocrdma_add_stat(stats, pcur, "threshold_44M_to_1G_nsmr", ocrdma_resource_stats()
181 pcur += ocrdma_add_stat(stats, pcur, "threshold_1G_to_4G_nsmr", ocrdma_resource_stats()
183 pcur += ocrdma_add_stat(stats, pcur, "threshold_nsmr_count_4G_to_32G", ocrdma_resource_stats()
185 pcur += ocrdma_add_stat(stats, pcur, "threshold_32G_to_64G_nsmr", ocrdma_resource_stats()
187 pcur += ocrdma_add_stat(stats, pcur, "threshold_64G_to_128G_nsmr", ocrdma_resource_stats()
189 pcur += ocrdma_add_stat(stats, pcur, "threshold_128G_to_higher_nsmr", ocrdma_resource_stats()
191 pcur += ocrdma_add_stat(stats, pcur, "threshold_embedded_nsmr", ocrdma_resource_stats()
193 pcur += ocrdma_add_stat(stats, pcur, "threshold_frmr", ocrdma_resource_stats()
195 pcur += ocrdma_add_stat(stats, pcur, "threshold_prefetch_qps", ocrdma_resource_stats()
197 pcur += ocrdma_add_stat(stats, pcur, "threshold_ondemand_qps", ocrdma_resource_stats()
199 pcur += ocrdma_add_stat(stats, pcur, "threshold_phy_mr", ocrdma_resource_stats()
201 pcur += ocrdma_add_stat(stats, pcur, "threshold_mw", ocrdma_resource_stats()
203 return stats; ocrdma_resource_stats()
208 char *stats = dev->stats_mem.debugfs_mem, *pcur; ocrdma_rx_stats() local
213 memset(stats, 0, (OCRDMA_MAX_DBGFS_MEM)); ocrdma_rx_stats()
215 pcur = stats; ocrdma_rx_stats()
217 (stats, pcur, "roce_frame_bytes", ocrdma_rx_stats()
220 pcur += ocrdma_add_stat(stats, pcur, "roce_frame_icrc_drops", ocrdma_rx_stats()
222 pcur += ocrdma_add_stat(stats, pcur, "roce_frame_payload_len_drops", ocrdma_rx_stats()
224 pcur += ocrdma_add_stat(stats, pcur, "ud_drops", ocrdma_rx_stats()
226 pcur += ocrdma_add_stat(stats, pcur, "qp1_drops", ocrdma_rx_stats()
228 pcur += ocrdma_add_stat(stats, pcur, "psn_error_request_packets", ocrdma_rx_stats()
230 pcur += ocrdma_add_stat(stats, pcur, "psn_error_resp_packets", ocrdma_rx_stats()
232 pcur += ocrdma_add_stat(stats, pcur, "rnr_nak_timeouts", ocrdma_rx_stats()
234 pcur += ocrdma_add_stat(stats, pcur, "rnr_nak_receives", ocrdma_rx_stats()
236 pcur += ocrdma_add_stat(stats, pcur, "roce_frame_rxmt_drops", ocrdma_rx_stats()
238 pcur += ocrdma_add_stat(stats, pcur, "nak_count_psn_sequence_errors", ocrdma_rx_stats()
240 pcur += ocrdma_add_stat(stats, pcur, "rc_drop_count_lookup_errors", ocrdma_rx_stats()
242 pcur += ocrdma_add_stat(stats, pcur, "rq_rnr_naks", ocrdma_rx_stats()
244 pcur += ocrdma_add_stat(stats, pcur, "srq_rnr_naks", ocrdma_rx_stats()
246 pcur += ocrdma_add_stat(stats, pcur, "roce_frames", ocrdma_rx_stats()
250 return stats; ocrdma_rx_stats()
276 char *stats = dev->stats_mem.debugfs_mem, *pcur; ocrdma_tx_stats() local
281 memset(stats, 0, (OCRDMA_MAX_DBGFS_MEM)); ocrdma_tx_stats()
283 pcur = stats; ocrdma_tx_stats()
284 pcur += ocrdma_add_stat(stats, pcur, "send_pkts", ocrdma_tx_stats()
287 pcur += ocrdma_add_stat(stats, pcur, "write_pkts", ocrdma_tx_stats()
290 pcur += ocrdma_add_stat(stats, pcur, "read_pkts", ocrdma_tx_stats()
293 pcur += ocrdma_add_stat(stats, pcur, "read_rsp_pkts", ocrdma_tx_stats()
296 pcur += ocrdma_add_stat(stats, pcur, "ack_pkts", ocrdma_tx_stats()
299 pcur += ocrdma_add_stat(stats, pcur, "send_bytes", ocrdma_tx_stats()
302 pcur += ocrdma_add_stat(stats, pcur, "write_bytes", ocrdma_tx_stats()
305 pcur += ocrdma_add_stat(stats, pcur, "read_req_bytes", ocrdma_tx_stats()
308 pcur += ocrdma_add_stat(stats, pcur, "read_rsp_bytes", ocrdma_tx_stats()
311 pcur += ocrdma_add_stat(stats, pcur, "ack_timeouts", ocrdma_tx_stats()
314 return stats; ocrdma_tx_stats()
350 char *stats = dev->stats_mem.debugfs_mem, *pcur; ocrdma_wqe_stats() local
355 memset(stats, 0, (OCRDMA_MAX_DBGFS_MEM)); ocrdma_wqe_stats()
357 pcur = stats; ocrdma_wqe_stats()
358 pcur += ocrdma_add_stat(stats, pcur, "large_send_rc_wqes", ocrdma_wqe_stats()
361 pcur += ocrdma_add_stat(stats, pcur, "large_write_rc_wqes", ocrdma_wqe_stats()
364 pcur += ocrdma_add_stat(stats, pcur, "read_wqes", ocrdma_wqe_stats()
367 pcur += ocrdma_add_stat(stats, pcur, "frmr_wqes", ocrdma_wqe_stats()
370 pcur += ocrdma_add_stat(stats, pcur, "mw_bind_wqes", ocrdma_wqe_stats()
373 pcur += ocrdma_add_stat(stats, pcur, "invalidate_wqes", ocrdma_wqe_stats()
376 pcur += ocrdma_add_stat(stats, pcur, "dpp_wqe_drops", ocrdma_wqe_stats()
378 return stats; ocrdma_wqe_stats()
383 char *stats = dev->stats_mem.debugfs_mem, *pcur; ocrdma_db_errstats() local
388 memset(stats, 0, (OCRDMA_MAX_DBGFS_MEM)); ocrdma_db_errstats()
390 pcur = stats; ocrdma_db_errstats()
391 pcur += ocrdma_add_stat(stats, pcur, "sq_doorbell_errors", ocrdma_db_errstats()
393 pcur += ocrdma_add_stat(stats, pcur, "cq_doorbell_errors", ocrdma_db_errstats()
395 pcur += ocrdma_add_stat(stats, pcur, "rq_srq_doorbell_errors", ocrdma_db_errstats()
397 pcur += ocrdma_add_stat(stats, pcur, "cq_overflow_errors", ocrdma_db_errstats()
399 return stats; ocrdma_db_errstats()
404 char *stats = dev->stats_mem.debugfs_mem, *pcur; ocrdma_rxqp_errstats() local
410 memset(stats, 0, (OCRDMA_MAX_DBGFS_MEM)); ocrdma_rxqp_errstats()
412 pcur = stats; ocrdma_rxqp_errstats()
413 pcur += ocrdma_add_stat(stats, pcur, "nak_invalid_requst_errors", ocrdma_rxqp_errstats()
415 pcur += ocrdma_add_stat(stats, pcur, "nak_remote_operation_errors", ocrdma_rxqp_errstats()
417 pcur += ocrdma_add_stat(stats, pcur, "nak_count_remote_access_errors", ocrdma_rxqp_errstats()
419 pcur += ocrdma_add_stat(stats, pcur, "local_length_errors", ocrdma_rxqp_errstats()
421 pcur += ocrdma_add_stat(stats, pcur, "local_protection_errors", ocrdma_rxqp_errstats()
423 pcur += ocrdma_add_stat(stats, pcur, "local_qp_operation_errors", ocrdma_rxqp_errstats()
425 return stats; ocrdma_rxqp_errstats()
430 char *stats = dev->stats_mem.debugfs_mem, *pcur; ocrdma_txqp_errstats() local
436 memset(stats, 0, (OCRDMA_MAX_DBGFS_MEM)); ocrdma_txqp_errstats()
438 pcur = stats; ocrdma_txqp_errstats()
439 pcur += ocrdma_add_stat(stats, pcur, "local_length_errors", ocrdma_txqp_errstats()
441 pcur += ocrdma_add_stat(stats, pcur, "local_protection_errors", ocrdma_txqp_errstats()
443 pcur += ocrdma_add_stat(stats, pcur, "local_qp_operation_errors", ocrdma_txqp_errstats()
445 pcur += ocrdma_add_stat(stats, pcur, "retry_count_exceeded_errors", ocrdma_txqp_errstats()
447 pcur += ocrdma_add_stat(stats, pcur, "rnr_retry_count_exceeded_errors", ocrdma_txqp_errstats()
449 return stats; ocrdma_txqp_errstats()
490 char *stats = dev->stats_mem.debugfs_mem, *pcur; ocrdma_driver_dbg_stats() local
493 memset(stats, 0, (OCRDMA_MAX_DBGFS_MEM)); ocrdma_driver_dbg_stats()
495 pcur = stats; ocrdma_driver_dbg_stats()
496 pcur += ocrdma_add_stat(stats, pcur, "async_cq_err", ocrdma_driver_dbg_stats()
499 pcur += ocrdma_add_stat(stats, pcur, "async_cq_overrun_err", ocrdma_driver_dbg_stats()
502 pcur += ocrdma_add_stat(stats, pcur, "async_cq_qpcat_err", ocrdma_driver_dbg_stats()
505 pcur += ocrdma_add_stat(stats, pcur, "async_qp_access_err", ocrdma_driver_dbg_stats()
508 pcur += ocrdma_add_stat(stats, pcur, "async_qp_commm_est_evt", ocrdma_driver_dbg_stats()
511 pcur += ocrdma_add_stat(stats, pcur, "async_sq_drained_evt", ocrdma_driver_dbg_stats()
514 pcur += ocrdma_add_stat(stats, pcur, "async_dev_fatal_evt", ocrdma_driver_dbg_stats()
517 pcur += ocrdma_add_stat(stats, pcur, "async_srqcat_err", ocrdma_driver_dbg_stats()
520 pcur += ocrdma_add_stat(stats, pcur, "async_srq_limit_evt", ocrdma_driver_dbg_stats()
523 pcur += ocrdma_add_stat(stats, pcur, "async_qp_last_wqe_evt", ocrdma_driver_dbg_stats()
527 pcur += ocrdma_add_stat(stats, pcur, "cqe_loc_len_err", ocrdma_driver_dbg_stats()
530 pcur += ocrdma_add_stat(stats, pcur, "cqe_loc_qp_op_err", ocrdma_driver_dbg_stats()
533 pcur += ocrdma_add_stat(stats, pcur, "cqe_loc_eec_op_err", ocrdma_driver_dbg_stats()
536 pcur += ocrdma_add_stat(stats, pcur, "cqe_loc_prot_err", ocrdma_driver_dbg_stats()
539 pcur += ocrdma_add_stat(stats, pcur, "cqe_wr_flush_err", ocrdma_driver_dbg_stats()
542 pcur += ocrdma_add_stat(stats, pcur, "cqe_mw_bind_err", ocrdma_driver_dbg_stats()
545 pcur += ocrdma_add_stat(stats, pcur, "cqe_bad_resp_err", ocrdma_driver_dbg_stats()
548 pcur += ocrdma_add_stat(stats, pcur, "cqe_loc_access_err", ocrdma_driver_dbg_stats()
551 pcur += ocrdma_add_stat(stats, pcur, "cqe_rem_inv_req_err", ocrdma_driver_dbg_stats()
554 pcur += ocrdma_add_stat(stats, pcur, "cqe_rem_access_err", ocrdma_driver_dbg_stats()
557 pcur += ocrdma_add_stat(stats, pcur, "cqe_rem_op_err", ocrdma_driver_dbg_stats()
560 pcur += ocrdma_add_stat(stats, pcur, "cqe_retry_exc_err", ocrdma_driver_dbg_stats()
563 pcur += ocrdma_add_stat(stats, pcur, "cqe_rnr_retry_exc_err", ocrdma_driver_dbg_stats()
566 pcur += ocrdma_add_stat(stats, pcur, "cqe_loc_rdd_viol_err", ocrdma_driver_dbg_stats()
569 pcur += ocrdma_add_stat(stats, pcur, "cqe_rem_inv_rd_req_err", ocrdma_driver_dbg_stats()
572 pcur += ocrdma_add_stat(stats, pcur, "cqe_rem_abort_err", ocrdma_driver_dbg_stats()
575 pcur += ocrdma_add_stat(stats, pcur, "cqe_inv_eecn_err", ocrdma_driver_dbg_stats()
578 pcur += ocrdma_add_stat(stats, pcur, "cqe_inv_eec_state_err", ocrdma_driver_dbg_stats()
581 pcur += ocrdma_add_stat(stats, pcur, "cqe_fatal_err", ocrdma_driver_dbg_stats()
584 pcur += ocrdma_add_stat(stats, pcur, "cqe_resp_timeout_err", ocrdma_driver_dbg_stats()
587 pcur += ocrdma_add_stat(stats, pcur, "cqe_general_err", ocrdma_driver_dbg_stats()
590 return stats; ocrdma_driver_dbg_stats()
606 pr_err("%s: stats mbox failed with status = %d\n", ocrdma_update_stats()
646 pr_err("Failed to reset stats = %d", status); ocrdma_dbgfs_ops_write()
753 /* Create post stats base dir */ ocrdma_add_port_stats()
826 /* Now create dma_mem for stats mbx command */ ocrdma_add_port_stats()
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmsmac/
H A Ddebug.c112 struct macstat stats; brcms_debugfs_macstat_read() local
116 stats = *(drvr->wlc->core->macstat_snapshot); brcms_debugfs_macstat_read()
119 seq_printf(s, "txallfrm: %d\n", stats.txallfrm); brcms_debugfs_macstat_read()
120 seq_printf(s, "txrtsfrm: %d\n", stats.txrtsfrm); brcms_debugfs_macstat_read()
121 seq_printf(s, "txctsfrm: %d\n", stats.txctsfrm); brcms_debugfs_macstat_read()
122 seq_printf(s, "txackfrm: %d\n", stats.txackfrm); brcms_debugfs_macstat_read()
123 seq_printf(s, "txdnlfrm: %d\n", stats.txdnlfrm); brcms_debugfs_macstat_read()
124 seq_printf(s, "txbcnfrm: %d\n", stats.txbcnfrm); brcms_debugfs_macstat_read()
126 for (i = 0; i < ARRAY_SIZE(stats.txfunfl); i++) brcms_debugfs_macstat_read()
127 seq_printf(s, " %d", stats.txfunfl[i]); brcms_debugfs_macstat_read()
128 seq_printf(s, "\ntxtplunfl: %d\n", stats.txtplunfl); brcms_debugfs_macstat_read()
129 seq_printf(s, "txphyerr: %d\n", stats.txphyerr); brcms_debugfs_macstat_read()
130 seq_printf(s, "pktengrxducast: %d\n", stats.pktengrxducast); brcms_debugfs_macstat_read()
131 seq_printf(s, "pktengrxdmcast: %d\n", stats.pktengrxdmcast); brcms_debugfs_macstat_read()
132 seq_printf(s, "rxfrmtoolong: %d\n", stats.rxfrmtoolong); brcms_debugfs_macstat_read()
133 seq_printf(s, "rxfrmtooshrt: %d\n", stats.rxfrmtooshrt); brcms_debugfs_macstat_read()
134 seq_printf(s, "rxinvmachdr: %d\n", stats.rxinvmachdr); brcms_debugfs_macstat_read()
135 seq_printf(s, "rxbadfcs: %d\n", stats.rxbadfcs); brcms_debugfs_macstat_read()
136 seq_printf(s, "rxbadplcp: %d\n", stats.rxbadplcp); brcms_debugfs_macstat_read()
137 seq_printf(s, "rxcrsglitch: %d\n", stats.rxcrsglitch); brcms_debugfs_macstat_read()
138 seq_printf(s, "rxstrt: %d\n", stats.rxstrt); brcms_debugfs_macstat_read()
139 seq_printf(s, "rxdfrmucastmbss: %d\n", stats.rxdfrmucastmbss); brcms_debugfs_macstat_read()
140 seq_printf(s, "rxmfrmucastmbss: %d\n", stats.rxmfrmucastmbss); brcms_debugfs_macstat_read()
141 seq_printf(s, "rxcfrmucast: %d\n", stats.rxcfrmucast); brcms_debugfs_macstat_read()
142 seq_printf(s, "rxrtsucast: %d\n", stats.rxrtsucast); brcms_debugfs_macstat_read()
143 seq_printf(s, "rxctsucast: %d\n", stats.rxctsucast); brcms_debugfs_macstat_read()
144 seq_printf(s, "rxackucast: %d\n", stats.rxackucast); brcms_debugfs_macstat_read()
145 seq_printf(s, "rxdfrmocast: %d\n", stats.rxdfrmocast); brcms_debugfs_macstat_read()
146 seq_printf(s, "rxmfrmocast: %d\n", stats.rxmfrmocast); brcms_debugfs_macstat_read()
147 seq_printf(s, "rxcfrmocast: %d\n", stats.rxcfrmocast); brcms_debugfs_macstat_read()
148 seq_printf(s, "rxrtsocast: %d\n", stats.rxrtsocast); brcms_debugfs_macstat_read()
149 seq_printf(s, "rxctsocast: %d\n", stats.rxctsocast); brcms_debugfs_macstat_read()
150 seq_printf(s, "rxdfrmmcast: %d\n", stats.rxdfrmmcast); brcms_debugfs_macstat_read()
151 seq_printf(s, "rxmfrmmcast: %d\n", stats.rxmfrmmcast); brcms_debugfs_macstat_read()
152 seq_printf(s, "rxcfrmmcast: %d\n", stats.rxcfrmmcast); brcms_debugfs_macstat_read()
153 seq_printf(s, "rxbeaconmbss: %d\n", stats.rxbeaconmbss); brcms_debugfs_macstat_read()
154 seq_printf(s, "rxdfrmucastobss: %d\n", stats.rxdfrmucastobss); brcms_debugfs_macstat_read()
155 seq_printf(s, "rxbeaconobss: %d\n", stats.rxbeaconobss); brcms_debugfs_macstat_read()
156 seq_printf(s, "rxrsptmout: %d\n", stats.rxrsptmout); brcms_debugfs_macstat_read()
157 seq_printf(s, "bcntxcancl: %d\n", stats.bcntxcancl); brcms_debugfs_macstat_read()
158 seq_printf(s, "rxf0ovfl: %d\n", stats.rxf0ovfl); brcms_debugfs_macstat_read()
159 seq_printf(s, "rxf1ovfl: %d\n", stats.rxf1ovfl); brcms_debugfs_macstat_read()
160 seq_printf(s, "rxf2ovfl: %d\n", stats.rxf2ovfl); brcms_debugfs_macstat_read()
161 seq_printf(s, "txsfovfl: %d\n", stats.txsfovfl); brcms_debugfs_macstat_read()
162 seq_printf(s, "pmqovfl: %d\n", stats.pmqovfl); brcms_debugfs_macstat_read()
163 seq_printf(s, "rxcgprqfrm: %d\n", stats.rxcgprqfrm); brcms_debugfs_macstat_read()
164 seq_printf(s, "rxcgprsqovfl: %d\n", stats.rxcgprsqovfl); brcms_debugfs_macstat_read()
165 seq_printf(s, "txcgprsfail: %d\n", stats.txcgprsfail); brcms_debugfs_macstat_read()
166 seq_printf(s, "txcgprssuc: %d\n", stats.txcgprssuc); brcms_debugfs_macstat_read()
167 seq_printf(s, "prs_timeout: %d\n", stats.prs_timeout); brcms_debugfs_macstat_read()
168 seq_printf(s, "rxnack: %d\n", stats.rxnack); brcms_debugfs_macstat_read()
169 seq_printf(s, "frmscons: %d\n", stats.frmscons); brcms_debugfs_macstat_read()
170 seq_printf(s, "txnack: %d\n", stats.txnack); brcms_debugfs_macstat_read()
171 seq_printf(s, "txglitch_nack: %d\n", stats.txglitch_nack); brcms_debugfs_macstat_read()
172 seq_printf(s, "txburst: %d\n", stats.txburst); brcms_debugfs_macstat_read()
173 seq_printf(s, "bphy_rxcrsglitch: %d\n", stats.bphy_rxcrsglitch); brcms_debugfs_macstat_read()
174 seq_printf(s, "phywatchdog: %d\n", stats.phywatchdog); brcms_debugfs_macstat_read()
175 seq_printf(s, "bphy_badplcp: %d\n", stats.bphy_badplcp); brcms_debugfs_macstat_read()
/linux-4.1.27/kernel/
H A Dtsacct.c31 struct taskstats *stats, struct task_struct *tsk) bacct_add_tsk()
43 stats->ac_etime = delta; bacct_add_tsk()
46 stats->ac_btime = get_seconds() - delta; bacct_add_tsk()
48 stats->ac_exitcode = tsk->exit_code; bacct_add_tsk()
50 stats->ac_flag |= AFORK; bacct_add_tsk()
53 stats->ac_flag |= ASU; bacct_add_tsk()
55 stats->ac_flag |= ACORE; bacct_add_tsk()
57 stats->ac_flag |= AXSIG; bacct_add_tsk()
58 stats->ac_nice = task_nice(tsk); bacct_add_tsk()
59 stats->ac_sched = tsk->policy; bacct_add_tsk()
60 stats->ac_pid = task_pid_nr_ns(tsk, pid_ns); bacct_add_tsk()
63 stats->ac_uid = from_kuid_munged(user_ns, tcred->uid); bacct_add_tsk()
64 stats->ac_gid = from_kgid_munged(user_ns, tcred->gid); bacct_add_tsk()
65 stats->ac_ppid = pid_alive(tsk) ? bacct_add_tsk()
70 stats->ac_utime = cputime_to_usecs(utime); bacct_add_tsk()
71 stats->ac_stime = cputime_to_usecs(stime); bacct_add_tsk()
74 stats->ac_utimescaled = cputime_to_usecs(utimescaled); bacct_add_tsk()
75 stats->ac_stimescaled = cputime_to_usecs(stimescaled); bacct_add_tsk()
77 stats->ac_minflt = tsk->min_flt; bacct_add_tsk()
78 stats->ac_majflt = tsk->maj_flt; bacct_add_tsk()
80 strncpy(stats->ac_comm, tsk->comm, sizeof(stats->ac_comm)); bacct_add_tsk()
92 void xacct_add_tsk(struct taskstats *stats, struct task_struct *p) xacct_add_tsk() argument
97 stats->coremem = p->acct_rss_mem1 * PAGE_SIZE / MB; xacct_add_tsk()
98 stats->virtmem = p->acct_vm_mem1 * PAGE_SIZE / MB; xacct_add_tsk()
102 stats->hiwater_rss = get_mm_hiwater_rss(mm) * PAGE_SIZE / KB; xacct_add_tsk()
103 stats->hiwater_vm = get_mm_hiwater_vm(mm) * PAGE_SIZE / KB; xacct_add_tsk()
106 stats->read_char = p->ioac.rchar & KB_MASK; xacct_add_tsk()
107 stats->write_char = p->ioac.wchar & KB_MASK; xacct_add_tsk()
108 stats->read_syscalls = p->ioac.syscr & KB_MASK; xacct_add_tsk()
109 stats->write_syscalls = p->ioac.syscw & KB_MASK; xacct_add_tsk()
111 stats->read_bytes = p->ioac.read_bytes & KB_MASK; xacct_add_tsk()
112 stats->write_bytes = p->ioac.write_bytes & KB_MASK; xacct_add_tsk()
113 stats->cancelled_write_bytes = p->ioac.cancelled_write_bytes & KB_MASK; xacct_add_tsk()
115 stats->read_bytes = 0; xacct_add_tsk()
116 stats->write_bytes = 0; xacct_add_tsk()
117 stats->cancelled_write_bytes = 0; xacct_add_tsk()
29 bacct_add_tsk(struct user_namespace *user_ns, struct pid_namespace *pid_ns, struct taskstats *stats, struct task_struct *tsk) bacct_add_tsk() argument
H A Dtaskstats.c171 struct task_struct *tsk, struct taskstats *stats) fill_stats()
173 memset(stats, 0, sizeof(*stats)); fill_stats()
178 * per-task-foo(stats, tsk); fill_stats()
181 delayacct_add_tsk(stats, tsk); fill_stats()
184 stats->version = TASKSTATS_VERSION; fill_stats()
185 stats->nvcsw = tsk->nvcsw; fill_stats()
186 stats->nivcsw = tsk->nivcsw; fill_stats()
187 bacct_add_tsk(user_ns, pid_ns, stats, tsk); fill_stats()
190 xacct_add_tsk(stats, tsk); fill_stats()
193 static int fill_stats_for_pid(pid_t pid, struct taskstats *stats) fill_stats_for_pid() argument
204 fill_stats(current_user_ns(), task_active_pid_ns(current), tsk, stats); fill_stats_for_pid()
209 static int fill_stats_for_tgid(pid_t tgid, struct taskstats *stats) fill_stats_for_tgid() argument
216 * Add additional stats from live tasks except zombie thread group fill_stats_for_tgid()
225 if (first->signal->stats) fill_stats_for_tgid()
226 memcpy(stats, first->signal->stats, sizeof(*stats)); fill_stats_for_tgid()
228 memset(stats, 0, sizeof(*stats)); fill_stats_for_tgid()
238 * per-task-foo(stats, tsk); fill_stats_for_tgid()
240 delayacct_add_tsk(stats, tsk); fill_stats_for_tgid()
242 stats->nvcsw += tsk->nvcsw; fill_stats_for_tgid()
243 stats->nivcsw += tsk->nivcsw; fill_stats_for_tgid()
251 stats->version = TASKSTATS_VERSION; fill_stats_for_tgid()
264 if (!tsk->signal->stats) fill_tgid_exit()
269 * accumalate its per-task stats for tsk, into the per-tgid structure fill_tgid_exit()
271 * per-task-foo(tsk->signal->stats, tsk); fill_tgid_exit()
273 delayacct_add_tsk(tsk->signal->stats, tsk); fill_tgid_exit()
420 struct cgroupstats *stats; cgroupstats_user_cmd() local
450 stats = nla_data(na); cgroupstats_user_cmd()
451 memset(stats, 0, sizeof(*stats)); cgroupstats_user_cmd()
453 rc = cgroupstats_build(stats, f.file->f_path.dentry); cgroupstats_user_cmd()
512 struct taskstats *stats; cmd_attr_pid() local
526 stats = mk_reply(rep_skb, TASKSTATS_TYPE_PID, pid); cmd_attr_pid()
527 if (!stats) cmd_attr_pid()
530 rc = fill_stats_for_pid(pid, stats); cmd_attr_pid()
541 struct taskstats *stats; cmd_attr_tgid() local
555 stats = mk_reply(rep_skb, TASKSTATS_TYPE_TGID, tgid); cmd_attr_tgid()
556 if (!stats) cmd_attr_tgid()
559 rc = fill_stats_for_tgid(tgid, stats); cmd_attr_tgid()
585 struct taskstats *stats; taskstats_tgid_alloc() local
587 if (sig->stats || thread_group_empty(tsk)) taskstats_tgid_alloc()
591 stats = kmem_cache_zalloc(taskstats_cache, GFP_KERNEL); taskstats_tgid_alloc()
594 if (!sig->stats) { taskstats_tgid_alloc()
595 sig->stats = stats; taskstats_tgid_alloc()
596 stats = NULL; taskstats_tgid_alloc()
600 if (stats) taskstats_tgid_alloc()
601 kmem_cache_free(taskstats_cache, stats); taskstats_tgid_alloc()
603 return sig->stats; taskstats_tgid_alloc()
611 struct taskstats *stats; taskstats_exit() local
628 /* fill the tsk->signal->stats structure */ taskstats_exit()
640 stats = mk_reply(rep_skb, TASKSTATS_TYPE_PID, taskstats_exit()
642 if (!stats) taskstats_exit()
645 fill_stats(&init_user_ns, &init_pid_ns, tsk, stats); taskstats_exit()
653 stats = mk_reply(rep_skb, TASKSTATS_TYPE_TGID, taskstats_exit()
655 if (!stats) taskstats_exit()
658 memcpy(stats, tsk->signal->stats, sizeof(*stats)); taskstats_exit()
169 fill_stats(struct user_namespace *user_ns, struct pid_namespace *pid_ns, struct task_struct *tsk, struct taskstats *stats) fill_stats() argument
/linux-4.1.27/drivers/net/wireless/rtlwifi/
H A Dstats.c26 #include "stats.h"
101 rtlpriv->stats.pwdb_all_cnt += pstatus->rx_pwdb_all; rtl_process_ui_rssi()
102 rtlpriv->stats.rssi_calculate_cnt++; rtl_process_ui_rssi()
104 if (rtlpriv->stats.ui_rssi.total_num++ >= PHY_RSSI_SLID_WIN_MAX) { rtl_process_ui_rssi()
105 rtlpriv->stats.ui_rssi.total_num = PHY_RSSI_SLID_WIN_MAX; rtl_process_ui_rssi()
106 last_rssi = rtlpriv->stats.ui_rssi.elements[ rtl_process_ui_rssi()
107 rtlpriv->stats.ui_rssi.index]; rtl_process_ui_rssi()
108 rtlpriv->stats.ui_rssi.total_val -= last_rssi; rtl_process_ui_rssi()
110 rtlpriv->stats.ui_rssi.total_val += pstatus->signalstrength; rtl_process_ui_rssi()
111 rtlpriv->stats.ui_rssi.elements[rtlpriv->stats.ui_rssi.index++] = rtl_process_ui_rssi()
113 if (rtlpriv->stats.ui_rssi.index >= PHY_RSSI_SLID_WIN_MAX) rtl_process_ui_rssi()
114 rtlpriv->stats.ui_rssi.index = 0; rtl_process_ui_rssi()
115 tmpval = rtlpriv->stats.ui_rssi.total_val / rtl_process_ui_rssi()
116 rtlpriv->stats.ui_rssi.total_num; rtl_process_ui_rssi()
117 rtlpriv->stats.signal_strength = rtl_translate_todbm(hw, rtl_process_ui_rssi()
119 pstatus->rssi = rtlpriv->stats.signal_strength; rtl_process_ui_rssi()
126 if (rtlpriv->stats.rx_rssi_percentage[rfpath] == 0) { rtl_process_ui_rssi()
127 rtlpriv->stats.rx_rssi_percentage[rfpath] = rtl_process_ui_rssi()
132 rtlpriv->stats.rx_rssi_percentage[rfpath]) { rtl_process_ui_rssi()
133 rtlpriv->stats.rx_rssi_percentage[rfpath] = rtl_process_ui_rssi()
134 ((rtlpriv->stats.rx_rssi_percentage[rfpath] * rtl_process_ui_rssi()
138 rtlpriv->stats.rx_rssi_percentage[rfpath] = rtl_process_ui_rssi()
139 rtlpriv->stats.rx_rssi_percentage[rfpath] + 1; rtl_process_ui_rssi()
141 rtlpriv->stats.rx_rssi_percentage[rfpath] = rtl_process_ui_rssi()
142 ((rtlpriv->stats.rx_rssi_percentage[rfpath] * rtl_process_ui_rssi()
147 rtlpriv->stats.rx_snr_db[rfpath] = pstatus->rx_snr[rfpath]; rtl_process_ui_rssi()
148 rtlpriv->stats.rx_evm_dbm[rfpath] = rtl_process_ui_rssi()
150 rtlpriv->stats.rx_cfo_short[rfpath] = rtl_process_ui_rssi()
152 rtlpriv->stats.rx_cfo_tail[rfpath] = pstatus->cfo_tail[rfpath]; rtl_process_ui_rssi()
162 if (rtlpriv->stats.recv_signal_power == 0) rtl_update_rxsignalstatistics()
163 rtlpriv->stats.recv_signal_power = pstatus->recvsignalpower; rtl_update_rxsignalstatistics()
164 if (pstatus->recvsignalpower > rtlpriv->stats.recv_signal_power) rtl_update_rxsignalstatistics()
166 else if (pstatus->recvsignalpower < rtlpriv->stats.recv_signal_power) rtl_update_rxsignalstatistics()
168 rtlpriv->stats.recv_signal_power = (rtlpriv->stats.recv_signal_power * rtl_update_rxsignalstatistics()
223 if (rtlpriv->stats.ui_link_quality.total_num++ >= rtl_process_ui_link_quality()
225 rtlpriv->stats.ui_link_quality.total_num = rtl_process_ui_link_quality()
227 last_evm = rtlpriv->stats.ui_link_quality.elements[ rtl_process_ui_link_quality()
228 rtlpriv->stats.ui_link_quality.index]; rtl_process_ui_link_quality()
229 rtlpriv->stats.ui_link_quality.total_val -= last_evm; rtl_process_ui_link_quality()
231 rtlpriv->stats.ui_link_quality.total_val += pstatus->signalquality; rtl_process_ui_link_quality()
232 rtlpriv->stats.ui_link_quality.elements[ rtl_process_ui_link_quality()
233 rtlpriv->stats.ui_link_quality.index++] = rtl_process_ui_link_quality()
235 if (rtlpriv->stats.ui_link_quality.index >= rtl_process_ui_link_quality()
237 rtlpriv->stats.ui_link_quality.index = 0; rtl_process_ui_link_quality()
238 tmpval = rtlpriv->stats.ui_link_quality.total_val / rtl_process_ui_link_quality()
239 rtlpriv->stats.ui_link_quality.total_num; rtl_process_ui_link_quality()
240 rtlpriv->stats.signal_quality = tmpval; rtl_process_ui_link_quality()
241 rtlpriv->stats.last_sigstrength_inpercent = tmpval; rtl_process_ui_link_quality()
244 if (rtlpriv->stats.rx_evm_percentage[n_stream] == 0) { rtl_process_ui_link_quality()
245 rtlpriv->stats.rx_evm_percentage[n_stream] = rtl_process_ui_link_quality()
248 rtlpriv->stats.rx_evm_percentage[n_stream] = rtl_process_ui_link_quality()
249 ((rtlpriv->stats.rx_evm_percentage[n_stream] rtl_process_ui_link_quality()
H A DMakefile11 stats.o
/linux-4.1.27/net/wireless/
H A Dwext-proc.c32 /* Get stats from the driver */ wireless_seq_printf_stats()
33 struct iw_statistics *stats = get_wireless_stats(dev); wireless_seq_printf_stats() local
36 /* show device if it's wireless regardless of current stats */ wireless_seq_printf_stats()
37 if (!stats) { wireless_seq_printf_stats()
40 stats = &nullstats; wireless_seq_printf_stats()
44 stats = &nullstats; wireless_seq_printf_stats()
48 if (stats) { wireless_seq_printf_stats()
51 dev->name, stats->status, stats->qual.qual, wireless_seq_printf_stats()
52 stats->qual.updated & IW_QUAL_QUAL_UPDATED wireless_seq_printf_stats()
54 ((__s32) stats->qual.level) - wireless_seq_printf_stats()
55 ((stats->qual.updated & IW_QUAL_DBM) ? 0x100 : 0), wireless_seq_printf_stats()
56 stats->qual.updated & IW_QUAL_LEVEL_UPDATED wireless_seq_printf_stats()
58 ((__s32) stats->qual.noise) - wireless_seq_printf_stats()
59 ((stats->qual.updated & IW_QUAL_DBM) ? 0x100 : 0), wireless_seq_printf_stats()
60 stats->qual.updated & IW_QUAL_NOISE_UPDATED wireless_seq_printf_stats()
62 stats->discard.nwid, stats->discard.code, wireless_seq_printf_stats()
63 stats->discard.fragment, stats->discard.retries, wireless_seq_printf_stats()
64 stats->discard.misc, stats->miss.beacon); wireless_seq_printf_stats()
66 if (stats != &nullstats) wireless_seq_printf_stats()
67 stats->qual.updated &= ~IW_QUAL_ALL_UPDATED; wireless_seq_printf_stats()
/linux-4.1.27/sound/soc/fsl/
H A Dfsl_ssi_dbg.c22 dbg->stats.rfrc++; fsl_ssi_dbg_isr()
25 dbg->stats.tfrc++; fsl_ssi_dbg_isr()
28 dbg->stats.cmdau++; fsl_ssi_dbg_isr()
31 dbg->stats.cmddu++; fsl_ssi_dbg_isr()
34 dbg->stats.rxt++; fsl_ssi_dbg_isr()
37 dbg->stats.rdr1++; fsl_ssi_dbg_isr()
40 dbg->stats.rdr0++; fsl_ssi_dbg_isr()
43 dbg->stats.tde1++; fsl_ssi_dbg_isr()
46 dbg->stats.tde0++; fsl_ssi_dbg_isr()
49 dbg->stats.roe1++; fsl_ssi_dbg_isr()
52 dbg->stats.roe0++; fsl_ssi_dbg_isr()
55 dbg->stats.tue1++; fsl_ssi_dbg_isr()
58 dbg->stats.tue0++; fsl_ssi_dbg_isr()
61 dbg->stats.tfs++; fsl_ssi_dbg_isr()
64 dbg->stats.rfs++; fsl_ssi_dbg_isr()
67 dbg->stats.tls++; fsl_ssi_dbg_isr()
70 dbg->stats.rls++; fsl_ssi_dbg_isr()
73 dbg->stats.rff1++; fsl_ssi_dbg_isr()
76 dbg->stats.rff0++; fsl_ssi_dbg_isr()
79 dbg->stats.tfe1++; fsl_ssi_dbg_isr()
82 dbg->stats.tfe0++; fsl_ssi_dbg_isr()
92 seq_printf(s, #name "=%u\n", ssi_dbg->stats.name); \
149 ssi_dbg->dbg_stats = debugfs_create_file("stats", S_IRUGO, fsl_ssi_debugfs_create()
/linux-4.1.27/drivers/net/wireless/cw1200/
H A Dqueue.c31 struct cw1200_queue_stats *stats = queue->stats; __cw1200_queue_lock() local
35 ieee80211_stop_queue(stats->priv->hw, queue->queue_id); __cw1200_queue_lock()
41 struct cw1200_queue_stats *stats = queue->stats; __cw1200_queue_unlock() local
46 ieee80211_wake_queue(stats->priv->hw, queue->queue_id); __cw1200_queue_unlock()
69 static void cw1200_queue_post_gc(struct cw1200_queue_stats *stats, cw1200_queue_post_gc() argument
76 stats->skb_dtor(stats->priv, item->skb, &item->txpriv); list_for_each_entry_safe()
96 struct cw1200_queue_stats *stats = queue->stats; __cw1200_queue_gc() local
105 spin_lock_bh(&stats->lock); __cw1200_queue_gc()
106 --stats->num_queued; __cw1200_queue_gc()
107 if (!--stats->link_map_cache[item->txpriv.link_id]) __cw1200_queue_gc()
109 spin_unlock_bh(&stats->lock); __cw1200_queue_gc()
110 cw1200_debug_tx_ttl(stats->priv); __cw1200_queue_gc()
117 wake_up(&stats->wait_link_id_empty); __cw1200_queue_gc()
127 cw1200_pm_stay_awake(&stats->priv->pm_state, __cw1200_queue_gc()
142 cw1200_queue_post_gc(queue->stats, &list); cw1200_queue_gc()
145 int cw1200_queue_stats_init(struct cw1200_queue_stats *stats, cw1200_queue_stats_init() argument
150 memset(stats, 0, sizeof(*stats)); cw1200_queue_stats_init()
151 stats->map_capacity = map_capacity; cw1200_queue_stats_init()
152 stats->skb_dtor = skb_dtor; cw1200_queue_stats_init()
153 stats->priv = priv; cw1200_queue_stats_init()
154 spin_lock_init(&stats->lock); cw1200_queue_stats_init()
155 init_waitqueue_head(&stats->wait_link_id_empty); cw1200_queue_stats_init()
157 stats->link_map_cache = kzalloc(sizeof(int) * map_capacity, cw1200_queue_stats_init()
159 if (!stats->link_map_cache) cw1200_queue_stats_init()
166 struct cw1200_queue_stats *stats, cw1200_queue_init()
174 queue->stats = stats; cw1200_queue_init()
189 queue->link_map_cache = kzalloc(sizeof(int) * stats->map_capacity, cw1200_queue_init()
207 struct cw1200_queue_stats *stats = queue->stats; cw1200_queue_clear() local
222 spin_lock_bh(&stats->lock); cw1200_queue_clear()
223 for (i = 0; i < stats->map_capacity; ++i) { cw1200_queue_clear()
224 stats->num_queued -= queue->link_map_cache[i]; cw1200_queue_clear()
225 stats->link_map_cache[i] -= queue->link_map_cache[i]; cw1200_queue_clear()
228 spin_unlock_bh(&stats->lock); cw1200_queue_clear()
234 wake_up(&stats->wait_link_id_empty); cw1200_queue_clear()
235 cw1200_queue_post_gc(stats, &gc_list); cw1200_queue_clear()
239 void cw1200_queue_stats_deinit(struct cw1200_queue_stats *stats) cw1200_queue_stats_deinit() argument
241 kfree(stats->link_map_cache); cw1200_queue_stats_deinit()
242 stats->link_map_cache = NULL; cw1200_queue_stats_deinit()
262 size_t map_capacity = queue->stats->map_capacity; cw1200_queue_get_num_queued()
287 struct cw1200_queue_stats *stats = queue->stats; cw1200_queue_put() local
289 if (txpriv->link_id >= queue->stats->map_capacity) cw1200_queue_put()
311 spin_lock_bh(&stats->lock); cw1200_queue_put()
312 ++stats->num_queued; cw1200_queue_put()
313 ++stats->link_map_cache[txpriv->link_id]; cw1200_queue_put()
314 spin_unlock_bh(&stats->lock); cw1200_queue_put()
341 struct cw1200_queue_stats *stats = queue->stats; cw1200_queue_get() local
362 spin_lock_bh(&stats->lock); cw1200_queue_get()
363 --stats->num_queued; cw1200_queue_get()
364 if (!--stats->link_map_cache[item->txpriv.link_id]) cw1200_queue_get()
366 spin_unlock_bh(&stats->lock); cw1200_queue_get()
370 wake_up(&stats->wait_link_id_empty); cw1200_queue_get()
379 struct cw1200_queue_stats *stats = queue->stats; cw1200_queue_requeue() local
400 spin_lock_bh(&stats->lock); cw1200_queue_requeue()
401 ++stats->num_queued; cw1200_queue_requeue()
402 ++stats->link_map_cache[item->txpriv.link_id]; cw1200_queue_requeue()
403 spin_unlock_bh(&stats->lock); cw1200_queue_requeue()
419 struct cw1200_queue_stats *stats = queue->stats; cw1200_queue_requeue_all() local
426 spin_lock_bh(&stats->lock); cw1200_queue_requeue_all()
427 ++stats->num_queued; cw1200_queue_requeue_all()
428 ++stats->link_map_cache[item->txpriv.link_id]; cw1200_queue_requeue_all()
429 spin_unlock_bh(&stats->lock); cw1200_queue_requeue_all()
448 struct cw1200_queue_stats *stats = queue->stats; cw1200_queue_remove() local
489 stats->skb_dtor(stats->priv, gc_skb, &gc_txpriv); cw1200_queue_remove()
559 bool cw1200_queue_stats_is_empty(struct cw1200_queue_stats *stats, cw1200_queue_stats_is_empty() argument
564 spin_lock_bh(&stats->lock); cw1200_queue_stats_is_empty()
566 empty = stats->num_queued == 0; cw1200_queue_stats_is_empty()
569 for (i = 0; i < stats->map_capacity; ++i) { cw1200_queue_stats_is_empty()
571 if (stats->link_map_cache[i]) { cw1200_queue_stats_is_empty()
578 spin_unlock_bh(&stats->lock); cw1200_queue_stats_is_empty()
165 cw1200_queue_init(struct cw1200_queue *queue, struct cw1200_queue_stats *stats, u8 queue_id, size_t capacity, unsigned long ttl) cw1200_queue_init() argument
H A Dqueue.h30 struct cw1200_queue_stats *stats; member in struct:cw1200_queue
50 spinlock_t lock; /* Protect stats entry */
67 int cw1200_queue_stats_init(struct cw1200_queue_stats *stats,
72 struct cw1200_queue_stats *stats,
77 void cw1200_queue_stats_deinit(struct cw1200_queue_stats *stats);
103 bool cw1200_queue_stats_is_empty(struct cw1200_queue_stats *stats,
/linux-4.1.27/drivers/staging/rtl8192e/rtl8192e/
H A Dr8192E_cmdpkt.c109 priv->stats.txfeedbackok++; cmpk_count_txstatistic()
110 priv->stats.txoktotal++; cmpk_count_txstatistic()
111 priv->stats.txokbytestotal += pstx_fb->pkt_length; cmpk_count_txstatistic()
112 priv->stats.txokinperiod++; cmpk_count_txstatistic()
115 priv->stats.txmulticast++; cmpk_count_txstatistic()
116 priv->stats.txbytesmulticast += pstx_fb->pkt_length; cmpk_count_txstatistic()
118 priv->stats.txbroadcast++; cmpk_count_txstatistic()
119 priv->stats.txbytesbroadcast += pstx_fb->pkt_length; cmpk_count_txstatistic()
121 priv->stats.txunicast++; cmpk_count_txstatistic()
122 priv->stats.txbytesunicast += pstx_fb->pkt_length; cmpk_count_txstatistic()
125 priv->stats.txfeedbackfail++; cmpk_count_txstatistic()
126 priv->stats.txerrtotal++; cmpk_count_txstatistic()
127 priv->stats.txerrbytestotal += pstx_fb->pkt_length; cmpk_count_txstatistic()
130 priv->stats.txerrmulticast++; cmpk_count_txstatistic()
132 priv->stats.txerrbroadcast++; cmpk_count_txstatistic()
134 priv->stats.txerrunicast++; cmpk_count_txstatistic()
137 priv->stats.txretrycount += pstx_fb->retry_cnt; cmpk_count_txstatistic()
138 priv->stats.txfeedbackretry += pstx_fb->retry_cnt; cmpk_count_txstatistic()
146 priv->stats.txfeedback++; cmpk_handle_tx_feedback()
187 priv->stats.txbeaconokint++; cmpk_handle_interrupt_status()
190 priv->stats.txbeaconerr++; cmpk_handle_interrupt_status()
234 priv->stats.txfeedbackok += pstx_status->txok; cmpk_count_tx_status()
235 priv->stats.txoktotal += pstx_status->txok; cmpk_count_tx_status()
237 priv->stats.txfeedbackfail += pstx_status->txfail; cmpk_count_tx_status()
238 priv->stats.txerrtotal += pstx_status->txfail; cmpk_count_tx_status()
240 priv->stats.txretrycount += pstx_status->txretry; cmpk_count_tx_status()
241 priv->stats.txfeedbackretry += pstx_status->txretry; cmpk_count_tx_status()
244 priv->stats.txmulticast += pstx_status->txmcok; cmpk_count_tx_status()
245 priv->stats.txbroadcast += pstx_status->txbcok; cmpk_count_tx_status()
246 priv->stats.txunicast += pstx_status->txucok; cmpk_count_tx_status()
248 priv->stats.txerrmulticast += pstx_status->txmcfail; cmpk_count_tx_status()
249 priv->stats.txerrbroadcast += pstx_status->txbcfail; cmpk_count_tx_status()
250 priv->stats.txerrunicast += pstx_status->txucfail; cmpk_count_tx_status()
252 priv->stats.txbytesmulticast += pstx_status->txmclength; cmpk_count_tx_status()
253 priv->stats.txbytesbroadcast += pstx_status->txbclength; cmpk_count_tx_status()
254 priv->stats.txbytesunicast += pstx_status->txuclength; cmpk_count_tx_status()
256 priv->stats.last_packet_rate = pstx_status->rate; cmpk_count_tx_status()
300 priv->stats.txrate.cck[i] += ptxrate->cck[i]; cmpk_handle_tx_rate_history()
303 priv->stats.txrate.ofdm[i] += ptxrate->ofdm[i]; cmpk_handle_tx_rate_history()
306 priv->stats.txrate.ht_mcs[j][i] += cmpk_handle_tx_rate_history()
H A Dr8192E_dev.c1501 priv->stats.numqry_phystatus++; rtl8192_query_rxphystatus()
1533 priv->stats.numqry_phystatusCCK++; rtl8192_query_rxphystatus()
1608 priv->stats.numqry_phystatusHT++; rtl8192_query_rxphystatus()
1619 priv->stats.rxSNRdB[i] = (long)rx_snrX; rtl8192_query_rxphystatus()
1671 priv->stats.received_bwtype[1+prxsc->rxsc]++; rtl8192_query_rxphystatus()
1673 priv->stats.received_bwtype[0]++; rtl8192_query_rxphystatus()
1716 last_rssi = priv->stats.slide_signal_strength[slide_rssi_index]; rtl8192_process_phyinfo()
1717 priv->stats.slide_rssi_total -= last_rssi; rtl8192_process_phyinfo()
1719 priv->stats.slide_rssi_total += prev_st->SignalStrength; rtl8192_process_phyinfo()
1721 priv->stats.slide_signal_strength[slide_rssi_index++] = rtl8192_process_phyinfo()
1726 tmp_val = priv->stats.slide_rssi_total/slide_rssi_statistics; rtl8192_process_phyinfo()
1727 priv->stats.signal_strength = rtl819x_translate_todbm(priv, rtl8192_process_phyinfo()
1729 curr_st->rssi = priv->stats.signal_strength; rtl8192_process_phyinfo()
1740 priv->stats.num_process_phyinfo++; rtl8192_process_phyinfo()
1749 if (priv->stats.rx_rssi_percentage[rfpath] == 0) { rtl8192_process_phyinfo()
1750 priv->stats.rx_rssi_percentage[rfpath] = rtl8192_process_phyinfo()
1754 priv->stats.rx_rssi_percentage[rfpath]) { rtl8192_process_phyinfo()
1755 priv->stats.rx_rssi_percentage[rfpath] = rtl8192_process_phyinfo()
1756 ((priv->stats.rx_rssi_percentage[rfpath] rtl8192_process_phyinfo()
1760 priv->stats.rx_rssi_percentage[rfpath] = rtl8192_process_phyinfo()
1761 priv->stats.rx_rssi_percentage[rfpath] rtl8192_process_phyinfo()
1764 priv->stats.rx_rssi_percentage[rfpath] = rtl8192_process_phyinfo()
1765 ((priv->stats.rx_rssi_percentage[rfpath] * rtl8192_process_phyinfo()
1772 priv->stats.rx_rssi_percentage[rfpath]); rtl8192_process_phyinfo()
1782 last_beacon_adc_pwdb = priv->stats.Slide_Beacon_pwdb rtl8192_process_phyinfo()
1784 priv->stats.Slide_Beacon_Total -= last_beacon_adc_pwdb; rtl8192_process_phyinfo()
1786 priv->stats.Slide_Beacon_Total += prev_st->RxPWDBAll; rtl8192_process_phyinfo()
1787 priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index] = rtl8192_process_phyinfo()
1792 prev_st->RxPWDBAll = priv->stats.Slide_Beacon_Total / rtl8192_process_phyinfo()
1828 priv->stats.slide_evm[slide_evm_index]; rtl8192_process_phyinfo()
1829 priv->stats.slide_evm_total -= last_evm; rtl8192_process_phyinfo()
1832 priv->stats.slide_evm_total += prev_st->SignalQuality; rtl8192_process_phyinfo()
1834 priv->stats.slide_evm[slide_evm_index++] = rtl8192_process_phyinfo()
1839 tmp_val = priv->stats.slide_evm_total / rtl8192_process_phyinfo()
1841 priv->stats.signal_quality = tmp_val; rtl8192_process_phyinfo()
1842 priv->stats.last_signal_strength_inpercent = tmp_val; rtl8192_process_phyinfo()
1850 if (priv->stats.rx_evm_percentage[ij] == 0) rtl8192_process_phyinfo()
1851 priv->stats.rx_evm_percentage[ij] = rtl8192_process_phyinfo()
1853 priv->stats.rx_evm_percentage[ij] = rtl8192_process_phyinfo()
1854 ((priv->stats.rx_evm_percentage[ij] * rtl8192_process_phyinfo()
1899 priv->stats.numpacket_matchbssid++; rtl8192_TranslateRxSignalStuff()
1901 priv->stats.numpacket_toself++; rtl8192_TranslateRxSignalStuff()
2017 priv->stats.received_preamble_GI[preamble_guardinterval][rateIndex]++; rtl8192_UpdateReceivedRateHistogramStatistics()
2018 priv->stats.received_rate_histogram[0][rateIndex]++; rtl8192_UpdateReceivedRateHistogramStatistics()
2019 priv->stats.received_rate_histogram[rcvType][rateIndex]++; rtl8192_UpdateReceivedRateHistogramStatistics()
2023 struct rtllib_rx_stats *stats, rtl8192_rx_query_status_desc()
2030 stats->bICV = pdesc->ICV; rtl8192_rx_query_status_desc()
2031 stats->bCRC = pdesc->CRC32; rtl8192_rx_query_status_desc()
2032 stats->bHwError = pdesc->CRC32 | pdesc->ICV; rtl8192_rx_query_status_desc()
2034 stats->Length = pdesc->Length; rtl8192_rx_query_status_desc()
2035 if (stats->Length < 24) rtl8192_rx_query_status_desc()
2036 stats->bHwError |= 1; rtl8192_rx_query_status_desc()
2038 if (stats->bHwError) { rtl8192_rx_query_status_desc()
2039 stats->bShift = false; rtl8192_rx_query_status_desc()
2043 priv->stats.rxcrcerrmin++; rtl8192_rx_query_status_desc()
2045 priv->stats.rxcrcerrmax++; rtl8192_rx_query_status_desc()
2047 priv->stats.rxcrcerrmid++; rtl8192_rx_query_status_desc()
2052 stats->RxDrvInfoSize = pdesc->RxDrvInfoSize; rtl8192_rx_query_status_desc()
2053 stats->RxBufShift = ((pdesc->Shift)&0x03); rtl8192_rx_query_status_desc()
2054 stats->Decrypted = !pdesc->SWDec; rtl8192_rx_query_status_desc()
2056 pDrvInfo = (struct rx_fwinfo *)(skb->data + stats->RxBufShift); rtl8192_rx_query_status_desc()
2058 stats->rate = HwRateToMRate90((bool)pDrvInfo->RxHT, rtl8192_rx_query_status_desc()
2060 stats->bShortPreamble = pDrvInfo->SPLCP; rtl8192_rx_query_status_desc()
2062 rtl8192_UpdateReceivedRateHistogramStatistics(dev, stats); rtl8192_rx_query_status_desc()
2064 stats->bIsAMPDU = (pDrvInfo->PartAggr == 1); rtl8192_rx_query_status_desc()
2065 stats->bFirstMPDU = (pDrvInfo->PartAggr == 1) && rtl8192_rx_query_status_desc()
2068 stats->TimeStampLow = pDrvInfo->TSFL; rtl8192_rx_query_status_desc()
2069 stats->TimeStampHigh = read_nic_dword(dev, TSFR+4); rtl8192_rx_query_status_desc()
2071 rtl819x_UpdateRxPktTimeStamp(dev, stats); rtl8192_rx_query_status_desc()
2073 if ((stats->RxBufShift + stats->RxDrvInfoSize) > 0) rtl8192_rx_query_status_desc()
2074 stats->bShift = 1; rtl8192_rx_query_status_desc()
2076 stats->RxIs40MHzPacket = pDrvInfo->BW; rtl8192_rx_query_status_desc()
2078 rtl8192_TranslateRxSignalStuff(dev, skb, stats, pdesc, rtl8192_rx_query_status_desc()
2088 stats->packetlength = stats->Length-4; rtl8192_rx_query_status_desc()
2089 stats->fraglength = stats->packetlength; rtl8192_rx_query_status_desc()
2090 stats->fragoffset = 0; rtl8192_rx_query_status_desc()
2091 stats->ntotalfrag = 1; rtl8192_rx_query_status_desc()
2022 rtl8192_rx_query_status_desc(struct net_device *dev, struct rtllib_rx_stats *stats, struct rx_desc *pdesc, struct sk_buff *skb) rtl8192_rx_query_status_desc() argument
/linux-4.1.27/drivers/staging/lustre/lustre/obdclass/
H A Dlprocfs_status.c228 MODULE_PARM_DESC(lprocfs_no_percpu_stats, "Do not alloc percpu data for lprocfs stats");
606 void lprocfs_stats_collect(struct lprocfs_stats *stats, int idx, lprocfs_stats_collect() argument
616 if (stats == NULL) { lprocfs_stats_collect()
624 num_entry = lprocfs_stats_lock(stats, LPROCFS_GET_NUM_CPU, &flags); lprocfs_stats_collect()
627 if (stats->ls_percpu[i] == NULL) lprocfs_stats_collect()
629 percpu_cntr = lprocfs_stats_counter_get(stats, i, idx); lprocfs_stats_collect()
640 lprocfs_stats_unlock(stats, LPROCFS_GET_NUM_CPU, &flags); lprocfs_stats_collect()
1031 int lprocfs_stats_alloc_one(struct lprocfs_stats *stats, unsigned int cpuid) lprocfs_stats_alloc_one() argument
1039 LASSERT(stats->ls_percpu[cpuid] == NULL); lprocfs_stats_alloc_one()
1040 LASSERT((stats->ls_flags & LPROCFS_STATS_FLAG_NOPERCPU) == 0); lprocfs_stats_alloc_one()
1042 percpusize = lprocfs_stats_counter_size(stats); lprocfs_stats_alloc_one()
1043 LIBCFS_ALLOC_ATOMIC(stats->ls_percpu[cpuid], percpusize); lprocfs_stats_alloc_one()
1044 if (stats->ls_percpu[cpuid] != NULL) { lprocfs_stats_alloc_one()
1046 if (unlikely(stats->ls_biggest_alloc_num <= cpuid)) { lprocfs_stats_alloc_one()
1047 if (stats->ls_flags & LPROCFS_STATS_FLAG_IRQ_SAFE) lprocfs_stats_alloc_one()
1048 spin_lock_irqsave(&stats->ls_lock, flags); lprocfs_stats_alloc_one()
1050 spin_lock(&stats->ls_lock); lprocfs_stats_alloc_one()
1051 if (stats->ls_biggest_alloc_num <= cpuid) lprocfs_stats_alloc_one()
1052 stats->ls_biggest_alloc_num = cpuid + 1; lprocfs_stats_alloc_one()
1053 if (stats->ls_flags & LPROCFS_STATS_FLAG_IRQ_SAFE) lprocfs_stats_alloc_one()
1054 spin_unlock_irqrestore(&stats->ls_lock, flags); lprocfs_stats_alloc_one()
1056 spin_unlock(&stats->ls_lock); lprocfs_stats_alloc_one()
1059 for (i = 0; i < stats->ls_num; ++i) { lprocfs_stats_alloc_one()
1060 cntr = lprocfs_stats_counter_get(stats, cpuid, i); lprocfs_stats_alloc_one()
1071 struct lprocfs_stats *stats; lprocfs_alloc_stats() local
1088 LIBCFS_ALLOC(stats, offsetof(typeof(*stats), ls_percpu[num_entry])); lprocfs_alloc_stats()
1089 if (stats == NULL) lprocfs_alloc_stats()
1092 stats->ls_num = num; lprocfs_alloc_stats()
1093 stats->ls_flags = flags; lprocfs_alloc_stats()
1094 spin_lock_init(&stats->ls_lock); lprocfs_alloc_stats()
1097 LIBCFS_ALLOC(stats->ls_cnt_header, lprocfs_alloc_stats()
1098 stats->ls_num * sizeof(struct lprocfs_counter_header)); lprocfs_alloc_stats()
1099 if (stats->ls_cnt_header == NULL) lprocfs_alloc_stats()
1104 percpusize = lprocfs_stats_counter_size(stats); lprocfs_alloc_stats()
1105 LIBCFS_ALLOC_ATOMIC(stats->ls_percpu[0], percpusize); lprocfs_alloc_stats()
1106 if (stats->ls_percpu[0] == NULL) lprocfs_alloc_stats()
1108 stats->ls_biggest_alloc_num = 1; lprocfs_alloc_stats()
1112 if (lprocfs_stats_alloc_one(stats, i) < 0) lprocfs_alloc_stats()
1116 return stats; lprocfs_alloc_stats()
1119 lprocfs_free_stats(&stats); lprocfs_alloc_stats()
1126 struct lprocfs_stats *stats = *statsh; lprocfs_free_stats() local
1131 if (stats == NULL || stats->ls_num == 0) lprocfs_free_stats()
1135 if (stats->ls_flags & LPROCFS_STATS_FLAG_NOPERCPU) lprocfs_free_stats()
1140 percpusize = lprocfs_stats_counter_size(stats); lprocfs_free_stats()
1142 if (stats->ls_percpu[i] != NULL) lprocfs_free_stats()
1143 LIBCFS_FREE(stats->ls_percpu[i], percpusize); lprocfs_free_stats()
1144 if (stats->ls_cnt_header != NULL) lprocfs_free_stats()
1145 LIBCFS_FREE(stats->ls_cnt_header, stats->ls_num * lprocfs_free_stats()
1147 LIBCFS_FREE(stats, offsetof(typeof(*stats), ls_percpu[num_entry])); lprocfs_free_stats()
1151 void lprocfs_clear_stats(struct lprocfs_stats *stats) lprocfs_clear_stats() argument
1159 num_entry = lprocfs_stats_lock(stats, LPROCFS_GET_NUM_CPU, &flags); lprocfs_clear_stats()
1162 if (stats->ls_percpu[i] == NULL) lprocfs_clear_stats()
1164 for (j = 0; j < stats->ls_num; j++) { lprocfs_clear_stats()
1165 percpu_cntr = lprocfs_stats_counter_get(stats, i, j); lprocfs_clear_stats()
1171 if (stats->ls_flags & LPROCFS_STATS_FLAG_IRQ_SAFE) lprocfs_clear_stats()
1176 lprocfs_stats_unlock(stats, LPROCFS_GET_NUM_CPU, &flags); lprocfs_clear_stats()
1185 struct lprocfs_stats *stats = seq->private; lprocfs_stats_seq_write() local
1187 lprocfs_clear_stats(stats); lprocfs_stats_seq_write()
1194 struct lprocfs_stats *stats = p->private; lprocfs_stats_seq_start() local
1196 return (*pos < stats->ls_num) ? pos : NULL; lprocfs_stats_seq_start()
1212 struct lprocfs_stats *stats = p->private; lprocfs_stats_seq_show() local
1225 hdr = &stats->ls_cnt_header[idx]; lprocfs_stats_seq_show()
1226 lprocfs_stats_collect(stats, idx, &ctr); lprocfs_stats_seq_show()
1275 struct lprocfs_stats *stats) lprocfs_register_stats()
1281 &lprocfs_stats_seq_fops, stats); lprocfs_register_stats()
1289 void lprocfs_counter_init(struct lprocfs_stats *stats, int index, lprocfs_counter_init() argument
1298 LASSERT(stats != NULL); lprocfs_counter_init()
1300 header = &stats->ls_cnt_header[index]; lprocfs_counter_init()
1301 LASSERTF(header != NULL, "Failed to allocate stats header:[%d]%s/%s\n", lprocfs_counter_init()
1308 num_cpu = lprocfs_stats_lock(stats, LPROCFS_GET_NUM_CPU, &flags); lprocfs_counter_init()
1310 if (stats->ls_percpu[i] == NULL) lprocfs_counter_init()
1312 percpu_cntr = lprocfs_stats_counter_get(stats, i, index); lprocfs_counter_init()
1318 if ((stats->ls_flags & LPROCFS_STATS_FLAG_IRQ_SAFE) != 0) lprocfs_counter_init()
1321 lprocfs_stats_unlock(stats, LPROCFS_GET_NUM_CPU, &flags); lprocfs_counter_init()
1325 #define LPROCFS_OBD_OP_INIT(base, stats, op) \
1328 LASSERT(coffset < stats->ls_num); \
1329 lprocfs_counter_init(stats, coffset, 0, #op, "reqs"); \
1332 void lprocfs_init_ops_stats(int num_private_stats, struct lprocfs_stats *stats) lprocfs_init_ops_stats() argument
1334 LPROCFS_OBD_OP_INIT(num_private_stats, stats, iocontrol); lprocfs_init_ops_stats()
1335 LPROCFS_OBD_OP_INIT(num_private_stats, stats, get_info); lprocfs_init_ops_stats()
1336 LPROCFS_OBD_OP_INIT(num_private_stats, stats, set_info_async); lprocfs_init_ops_stats()
1337 LPROCFS_OBD_OP_INIT(num_private_stats, stats, attach); lprocfs_init_ops_stats()
1338 LPROCFS_OBD_OP_INIT(num_private_stats, stats, detach); lprocfs_init_ops_stats()
1339 LPROCFS_OBD_OP_INIT(num_private_stats, stats, setup); lprocfs_init_ops_stats()
1340 LPROCFS_OBD_OP_INIT(num_private_stats, stats, precleanup); lprocfs_init_ops_stats()
1341 LPROCFS_OBD_OP_INIT(num_private_stats, stats, cleanup); lprocfs_init_ops_stats()
1342 LPROCFS_OBD_OP_INIT(num_private_stats, stats, process_config); lprocfs_init_ops_stats()
1343 LPROCFS_OBD_OP_INIT(num_private_stats, stats, postrecov); lprocfs_init_ops_stats()
1344 LPROCFS_OBD_OP_INIT(num_private_stats, stats, add_conn); lprocfs_init_ops_stats()
1345 LPROCFS_OBD_OP_INIT(num_private_stats, stats, del_conn); lprocfs_init_ops_stats()
1346 LPROCFS_OBD_OP_INIT(num_private_stats, stats, connect); lprocfs_init_ops_stats()
1347 LPROCFS_OBD_OP_INIT(num_private_stats, stats, reconnect); lprocfs_init_ops_stats()
1348 LPROCFS_OBD_OP_INIT(num_private_stats, stats, disconnect); lprocfs_init_ops_stats()
1349 LPROCFS_OBD_OP_INIT(num_private_stats, stats, fid_init); lprocfs_init_ops_stats()
1350 LPROCFS_OBD_OP_INIT(num_private_stats, stats, fid_fini); lprocfs_init_ops_stats()
1351 LPROCFS_OBD_OP_INIT(num_private_stats, stats, fid_alloc); lprocfs_init_ops_stats()
1352 LPROCFS_OBD_OP_INIT(num_private_stats, stats, statfs); lprocfs_init_ops_stats()
1353 LPROCFS_OBD_OP_INIT(num_private_stats, stats, statfs_async); lprocfs_init_ops_stats()
1354 LPROCFS_OBD_OP_INIT(num_private_stats, stats, packmd); lprocfs_init_ops_stats()
1355 LPROCFS_OBD_OP_INIT(num_private_stats, stats, unpackmd); lprocfs_init_ops_stats()
1356 LPROCFS_OBD_OP_INIT(num_private_stats, stats, preallocate); lprocfs_init_ops_stats()
1357 LPROCFS_OBD_OP_INIT(num_private_stats, stats, create); lprocfs_init_ops_stats()
1358 LPROCFS_OBD_OP_INIT(num_private_stats, stats, destroy); lprocfs_init_ops_stats()
1359 LPROCFS_OBD_OP_INIT(num_private_stats, stats, setattr); lprocfs_init_ops_stats()
1360 LPROCFS_OBD_OP_INIT(num_private_stats, stats, setattr_async); lprocfs_init_ops_stats()
1361 LPROCFS_OBD_OP_INIT(num_private_stats, stats, getattr); lprocfs_init_ops_stats()
1362 LPROCFS_OBD_OP_INIT(num_private_stats, stats, getattr_async); lprocfs_init_ops_stats()
1363 LPROCFS_OBD_OP_INIT(num_private_stats, stats, adjust_kms); lprocfs_init_ops_stats()
1364 LPROCFS_OBD_OP_INIT(num_private_stats, stats, preprw); lprocfs_init_ops_stats()
1365 LPROCFS_OBD_OP_INIT(num_private_stats, stats, commitrw); lprocfs_init_ops_stats()
1366 LPROCFS_OBD_OP_INIT(num_private_stats, stats, find_cbdata); lprocfs_init_ops_stats()
1367 LPROCFS_OBD_OP_INIT(num_private_stats, stats, init_export); lprocfs_init_ops_stats()
1368 LPROCFS_OBD_OP_INIT(num_private_stats, stats, destroy_export); lprocfs_init_ops_stats()
1369 LPROCFS_OBD_OP_INIT(num_private_stats, stats, import_event); lprocfs_init_ops_stats()
1370 LPROCFS_OBD_OP_INIT(num_private_stats, stats, notify); lprocfs_init_ops_stats()
1371 LPROCFS_OBD_OP_INIT(num_private_stats, stats, health_check); lprocfs_init_ops_stats()
1372 LPROCFS_OBD_OP_INIT(num_private_stats, stats, get_uuid); lprocfs_init_ops_stats()
1373 LPROCFS_OBD_OP_INIT(num_private_stats, stats, quotacheck); lprocfs_init_ops_stats()
1374 LPROCFS_OBD_OP_INIT(num_private_stats, stats, quotactl); lprocfs_init_ops_stats()
1375 LPROCFS_OBD_OP_INIT(num_private_stats, stats, pool_new); lprocfs_init_ops_stats()
1376 LPROCFS_OBD_OP_INIT(num_private_stats, stats, pool_rem); lprocfs_init_ops_stats()
1377 LPROCFS_OBD_OP_INIT(num_private_stats, stats, pool_add); lprocfs_init_ops_stats()
1378 LPROCFS_OBD_OP_INIT(num_private_stats, stats, pool_del); lprocfs_init_ops_stats()
1379 LPROCFS_OBD_OP_INIT(num_private_stats, stats, getref); lprocfs_init_ops_stats()
1380 LPROCFS_OBD_OP_INIT(num_private_stats, stats, putref); lprocfs_init_ops_stats()
1386 struct lprocfs_stats *stats; lprocfs_alloc_obd_stats() local
1396 stats = lprocfs_alloc_stats(num_stats, 0); lprocfs_alloc_obd_stats()
1397 if (stats == NULL) lprocfs_alloc_obd_stats()
1400 lprocfs_init_ops_stats(num_private_stats, stats); lprocfs_alloc_obd_stats()
1408 LASSERTF(stats->ls_cnt_header[i].lc_name != NULL, lprocfs_alloc_obd_stats()
1412 rc = lprocfs_register_stats(obd->obd_proc_entry, "stats", stats); lprocfs_alloc_obd_stats()
1414 lprocfs_free_stats(&stats); lprocfs_alloc_obd_stats()
1416 obd->obd_stats = stats; lprocfs_alloc_obd_stats()
1430 #define LPROCFS_MD_OP_INIT(base, stats, op) \
1433 LASSERT(coffset < stats->ls_num); \
1434 lprocfs_counter_init(stats, coffset, 0, #op, "reqs"); \
1437 void lprocfs_init_mps_stats(int num_private_stats, struct lprocfs_stats *stats) lprocfs_init_mps_stats() argument
1439 LPROCFS_MD_OP_INIT(num_private_stats, stats, getstatus); lprocfs_init_mps_stats()
1440 LPROCFS_MD_OP_INIT(num_private_stats, stats, null_inode); lprocfs_init_mps_stats()
1441 LPROCFS_MD_OP_INIT(num_private_stats, stats, find_cbdata); lprocfs_init_mps_stats()
1442 LPROCFS_MD_OP_INIT(num_private_stats, stats, close); lprocfs_init_mps_stats()
1443 LPROCFS_MD_OP_INIT(num_private_stats, stats, create); lprocfs_init_mps_stats()
1444 LPROCFS_MD_OP_INIT(num_private_stats, stats, done_writing); lprocfs_init_mps_stats()
1445 LPROCFS_MD_OP_INIT(num_private_stats, stats, enqueue); lprocfs_init_mps_stats()
1446 LPROCFS_MD_OP_INIT(num_private_stats, stats, getattr); lprocfs_init_mps_stats()
1447 LPROCFS_MD_OP_INIT(num_private_stats, stats, getattr_name); lprocfs_init_mps_stats()
1448 LPROCFS_MD_OP_INIT(num_private_stats, stats, intent_lock); lprocfs_init_mps_stats()
1449 LPROCFS_MD_OP_INIT(num_private_stats, stats, link); lprocfs_init_mps_stats()
1450 LPROCFS_MD_OP_INIT(num_private_stats, stats, rename); lprocfs_init_mps_stats()
1451 LPROCFS_MD_OP_INIT(num_private_stats, stats, is_subdir); lprocfs_init_mps_stats()
1452 LPROCFS_MD_OP_INIT(num_private_stats, stats, setattr); lprocfs_init_mps_stats()
1453 LPROCFS_MD_OP_INIT(num_private_stats, stats, sync); lprocfs_init_mps_stats()
1454 LPROCFS_MD_OP_INIT(num_private_stats, stats, readpage); lprocfs_init_mps_stats()
1455 LPROCFS_MD_OP_INIT(num_private_stats, stats, unlink); lprocfs_init_mps_stats()
1456 LPROCFS_MD_OP_INIT(num_private_stats, stats, setxattr); lprocfs_init_mps_stats()
1457 LPROCFS_MD_OP_INIT(num_private_stats, stats, getxattr); lprocfs_init_mps_stats()
1458 LPROCFS_MD_OP_INIT(num_private_stats, stats, init_ea_size); lprocfs_init_mps_stats()
1459 LPROCFS_MD_OP_INIT(num_private_stats, stats, get_lustre_md); lprocfs_init_mps_stats()
1460 LPROCFS_MD_OP_INIT(num_private_stats, stats, free_lustre_md); lprocfs_init_mps_stats()
1461 LPROCFS_MD_OP_INIT(num_private_stats, stats, set_open_replay_data); lprocfs_init_mps_stats()
1462 LPROCFS_MD_OP_INIT(num_private_stats, stats, clear_open_replay_data); lprocfs_init_mps_stats()
1463 LPROCFS_MD_OP_INIT(num_private_stats, stats, set_lock_data); lprocfs_init_mps_stats()
1464 LPROCFS_MD_OP_INIT(num_private_stats, stats, lock_match); lprocfs_init_mps_stats()
1465 LPROCFS_MD_OP_INIT(num_private_stats, stats, cancel_unused); lprocfs_init_mps_stats()
1466 LPROCFS_MD_OP_INIT(num_private_stats, stats, renew_capa); lprocfs_init_mps_stats()
1467 LPROCFS_MD_OP_INIT(num_private_stats, stats, unpack_capa); lprocfs_init_mps_stats()
1468 LPROCFS_MD_OP_INIT(num_private_stats, stats, get_remote_perm); lprocfs_init_mps_stats()
1469 LPROCFS_MD_OP_INIT(num_private_stats, stats, intent_getattr_async); lprocfs_init_mps_stats()
1470 LPROCFS_MD_OP_INIT(num_private_stats, stats, revalidate_lock); lprocfs_init_mps_stats()
1477 struct lprocfs_stats *stats; lprocfs_alloc_md_stats() local
1487 stats = lprocfs_alloc_stats(num_stats, 0); lprocfs_alloc_md_stats()
1488 if (stats == NULL) lprocfs_alloc_md_stats()
1491 lprocfs_init_mps_stats(num_private_stats, stats); lprocfs_alloc_md_stats()
1494 if (stats->ls_cnt_header[i].lc_name == NULL) { lprocfs_alloc_md_stats()
1500 rc = lprocfs_register_stats(obd->obd_proc_entry, "md_stats", stats); lprocfs_alloc_md_stats()
1502 lprocfs_free_stats(&stats); lprocfs_alloc_md_stats()
1504 obd->md_stats = stats; lprocfs_alloc_md_stats()
1513 struct lprocfs_stats *stats = obd->md_stats; lprocfs_free_md_stats() local
1515 if (stats != NULL) { lprocfs_free_md_stats()
1518 lprocfs_free_stats(&stats); lprocfs_free_md_stats()
1562 struct nid_stat *stats = (struct nid_stat *)m->private; lproc_exp_uuid_seq_show() local
1563 struct obd_device *obd = stats->nid_obd; lproc_exp_uuid_seq_show()
1565 cfs_hash_for_each_key(obd->obd_nid_hash, &stats->nid, lproc_exp_uuid_seq_show()
1598 struct nid_stat *stats = (struct nid_stat *)m->private; lproc_exp_hash_seq_show() local
1599 struct obd_device *obd = stats->nid_obd; lproc_exp_hash_seq_show()
1605 cfs_hash_for_each_key(obd->obd_nid_hash, &stats->nid, lproc_exp_hash_seq_show()
1615 "Write into this file to clear all nid stats and stale nid entries"); lprocfs_nid_stats_clear_read()
1695 CDEBUG(D_INFO, "Found stats %p for nid %s - ref %d\n", lprocfs_exp_setup()
1699 /* We need to release old stats because lprocfs_exp_cleanup() hasn't lprocfs_exp_setup()
1737 CWARN("Error adding the NID stats file\n"); lprocfs_exp_setup()
1274 lprocfs_register_stats(struct proc_dir_entry *root, const char *name, struct lprocfs_stats *stats) lprocfs_register_stats() argument
H A Dlprocfs_counters.c47 void lprocfs_counter_add(struct lprocfs_stats *stats, int idx, long amount) lprocfs_counter_add() argument
54 if (stats == NULL) lprocfs_counter_add()
57 LASSERTF(0 <= idx && idx < stats->ls_num, lprocfs_counter_add()
58 "idx %d, ls_num %hu\n", idx, stats->ls_num); lprocfs_counter_add()
60 /* With per-client stats, statistics are allocated only for lprocfs_counter_add()
62 smp_id = lprocfs_stats_lock(stats, LPROCFS_GET_SMP_ID, &flags); lprocfs_counter_add()
66 header = &stats->ls_cnt_header[idx]; lprocfs_counter_add()
67 percpu_cntr = lprocfs_stats_counter_get(stats, smp_id, idx); lprocfs_counter_add()
82 (stats->ls_flags & LPROCFS_STATS_FLAG_IRQ_SAFE) != 0) lprocfs_counter_add()
94 lprocfs_stats_unlock(stats, LPROCFS_GET_SMP_ID, &flags); lprocfs_counter_add()
98 void lprocfs_counter_sub(struct lprocfs_stats *stats, int idx, long amount) lprocfs_counter_sub() argument
105 if (stats == NULL) lprocfs_counter_sub()
108 LASSERTF(0 <= idx && idx < stats->ls_num, lprocfs_counter_sub()
109 "idx %d, ls_num %hu\n", idx, stats->ls_num); lprocfs_counter_sub()
111 /* With per-client stats, statistics are allocated only for lprocfs_counter_sub()
113 smp_id = lprocfs_stats_lock(stats, LPROCFS_GET_SMP_ID, &flags); lprocfs_counter_sub()
117 header = &stats->ls_cnt_header[idx]; lprocfs_counter_sub()
118 percpu_cntr = lprocfs_stats_counter_get(stats, smp_id, idx); lprocfs_counter_sub()
132 (stats->ls_flags & LPROCFS_STATS_FLAG_IRQ_SAFE) != 0) lprocfs_counter_sub()
137 lprocfs_stats_unlock(stats, LPROCFS_GET_SMP_ID, &flags); lprocfs_counter_sub()
/linux-4.1.27/drivers/md/bcache/
H A DMakefile5 io.o journal.o movinggc.o request.o stats.o super.o sysfs.o trace.o\
H A Dstats.c2 * bcache stats code
8 #include "stats.h"
135 static void scale_stats(struct cache_stats *stats, unsigned long rescale_at) scale_stats() argument
137 if (++stats->rescale == rescale_at) { scale_stats()
138 stats->rescale = 0; scale_stats()
139 scale_stat(&stats->cache_hits); scale_stats()
140 scale_stat(&stats->cache_misses); scale_stats()
141 scale_stat(&stats->cache_bypass_hits); scale_stats()
142 scale_stat(&stats->cache_bypass_misses); scale_stats()
143 scale_stat(&stats->cache_readaheads); scale_stats()
144 scale_stat(&stats->cache_miss_collisions); scale_stats()
145 scale_stat(&stats->sectors_bypassed); scale_stats()
183 static void mark_cache_stats(struct cache_stat_collector *stats, mark_cache_stats() argument
188 atomic_inc(&stats->cache_hits); mark_cache_stats()
190 atomic_inc(&stats->cache_misses); mark_cache_stats()
193 atomic_inc(&stats->cache_bypass_hits); mark_cache_stats()
195 atomic_inc(&stats->cache_bypass_misses); mark_cache_stats()
H A Dutil.c169 void bch_time_stats_update(struct time_stats *stats, uint64_t start_time) bch_time_stats_update() argument
173 spin_lock(&stats->lock); bch_time_stats_update()
178 last = time_after64(now, stats->last) bch_time_stats_update()
179 ? now - stats->last : 0; bch_time_stats_update()
181 stats->max_duration = max(stats->max_duration, duration); bch_time_stats_update()
183 if (stats->last) { bch_time_stats_update()
184 ewma_add(stats->average_duration, duration, 8, 8); bch_time_stats_update()
186 if (stats->average_frequency) bch_time_stats_update()
187 ewma_add(stats->average_frequency, last, 8, 8); bch_time_stats_update()
189 stats->average_frequency = last << 8; bch_time_stats_update()
191 stats->average_duration = duration << 8; bch_time_stats_update()
194 stats->last = now ?: 1; bch_time_stats_update()
196 spin_unlock(&stats->lock); bch_time_stats_update()
/linux-4.1.27/drivers/oprofile/
H A Doprofile_stats.h25 /* reset all stats to zero */
30 /* create the stats/ dir */
/linux-4.1.27/arch/mips/sibyte/common/
H A Dbus_watcher.c118 struct bw_stats_struct *stats = m->private; bw_proc_show() local
123 stats->l2_cor_d, stats->l2_bad_d); bw_proc_show()
125 stats->l2_cor_t, stats->l2_bad_t); bw_proc_show()
127 stats->mem_cor_d, stats->mem_bad_d); bw_proc_show()
128 seq_printf(m, "IO-err %8ld\n", stats->bus_error); bw_proc_show()
131 (unsigned int)(G_SCD_BERR_TID(stats->status) & 0x3f), bw_proc_show()
132 (int)(G_SCD_BERR_TID(stats->status) >> 6), bw_proc_show()
133 (int)G_SCD_BERR_RID(stats->status), bw_proc_show()
134 (int)G_SCD_BERR_DCODE(stats->status)); bw_proc_show()
135 /* XXXKW indicate multiple errors between printings, or stats bw_proc_show()
137 if (stats->status & M_SCD_BERR_MULTERRS) bw_proc_show()
139 if (stats->status_printed) { bw_proc_show()
142 stats->status_printed = 1; bw_proc_show()
160 static void create_proc_decoder(struct bw_stats_struct *stats) create_proc_decoder() argument
165 &bw_proc_fops, stats); create_proc_decoder()
182 struct bw_stats_struct *stats = data; sibyte_bw_int() local
201 stats->status = csr_in32(IOADDR(A_SCD_BUS_ERR_STATUS)); sibyte_bw_int()
202 stats->status_printed = 0; sibyte_bw_int()
204 stats->l2_err = cntr = csr_in32(IOADDR(A_BUS_L2_ERRORS)); sibyte_bw_int()
205 stats->l2_cor_d += G_SCD_L2ECC_CORR_D(cntr); sibyte_bw_int()
206 stats->l2_bad_d += G_SCD_L2ECC_BAD_D(cntr); sibyte_bw_int()
207 stats->l2_cor_t += G_SCD_L2ECC_CORR_T(cntr); sibyte_bw_int()
208 stats->l2_bad_t += G_SCD_L2ECC_BAD_T(cntr); sibyte_bw_int()
211 stats->memio_err = cntr = csr_in32(IOADDR(A_BUS_MEM_IO_ERRORS)); sibyte_bw_int()
212 stats->mem_cor_d += G_SCD_MEM_ECC_CORR(cntr); sibyte_bw_int()
213 stats->mem_bad_d += G_SCD_MEM_ECC_BAD(cntr); sibyte_bw_int()
214 stats->bus_error += G_SCD_MEM_BUSERR(cntr); sibyte_bw_int()
/linux-4.1.27/tools/perf/tests/
H A Dhists_filter.c149 hists->stats.nr_events[PERF_RECORD_SAMPLE] == 10); evlist__for_each()
153 hists->stats.total_period == 1000); evlist__for_each()
155 hists->stats.nr_events[PERF_RECORD_SAMPLE] == evlist__for_each()
156 hists->stats.nr_non_filtered_samples); evlist__for_each()
160 hists->stats.total_period == evlist__for_each()
161 hists->stats.total_non_filtered_period); evlist__for_each()
172 /* normal stats should be invariant */ evlist__for_each()
174 hists->stats.nr_events[PERF_RECORD_SAMPLE] == 10); evlist__for_each()
178 hists->stats.total_period == 1000); evlist__for_each()
180 /* but filter stats are changed */ evlist__for_each()
182 hists->stats.nr_non_filtered_samples == 4); evlist__for_each()
186 hists->stats.total_non_filtered_period == 400); evlist__for_each()
201 /* normal stats should be invariant */ evlist__for_each()
203 hists->stats.nr_events[PERF_RECORD_SAMPLE] == 10); evlist__for_each()
207 hists->stats.total_period == 1000); evlist__for_each()
209 /* but filter stats are changed */ evlist__for_each()
211 hists->stats.nr_non_filtered_samples == 3); evlist__for_each()
215 hists->stats.total_non_filtered_period == 300); evlist__for_each()
236 /* normal stats should be invariant */ evlist__for_each()
238 hists->stats.nr_events[PERF_RECORD_SAMPLE] == 10); evlist__for_each()
242 hists->stats.total_period == 1000); evlist__for_each()
244 /* but filter stats are changed */ evlist__for_each()
246 hists->stats.nr_non_filtered_samples == 3); evlist__for_each()
250 hists->stats.total_non_filtered_period == 300); evlist__for_each()
263 /* normal stats should be invariant */ evlist__for_each()
265 hists->stats.nr_events[PERF_RECORD_SAMPLE] == 10); evlist__for_each()
269 hists->stats.total_period == 1000); evlist__for_each()
271 /* but filter stats are changed */ evlist__for_each()
273 hists->stats.nr_non_filtered_samples == 2); evlist__for_each()
277 hists->stats.total_non_filtered_period == 200); evlist__for_each()
/linux-4.1.27/drivers/infiniband/hw/cxgb4/
H A Dresource.c114 mutex_lock(&rdev->stats.lock); c4iw_get_cqid()
115 rdev->stats.qid.cur += rdev->qpmask + 1; c4iw_get_cqid()
116 mutex_unlock(&rdev->stats.lock); c4iw_get_cqid()
145 mutex_lock(&rdev->stats.lock); c4iw_get_cqid()
146 if (rdev->stats.qid.cur > rdev->stats.qid.max) c4iw_get_cqid()
147 rdev->stats.qid.max = rdev->stats.qid.cur; c4iw_get_cqid()
148 mutex_unlock(&rdev->stats.lock); c4iw_get_cqid()
183 mutex_lock(&rdev->stats.lock); c4iw_get_qpid()
184 rdev->stats.qid.fail++; c4iw_get_qpid()
185 mutex_unlock(&rdev->stats.lock); c4iw_get_qpid()
188 mutex_lock(&rdev->stats.lock); c4iw_get_qpid()
189 rdev->stats.qid.cur += rdev->qpmask + 1; c4iw_get_qpid()
190 mutex_unlock(&rdev->stats.lock); c4iw_get_qpid()
219 mutex_lock(&rdev->stats.lock); c4iw_get_qpid()
220 if (rdev->stats.qid.cur > rdev->stats.qid.max) c4iw_get_qpid()
221 rdev->stats.qid.max = rdev->stats.qid.cur; c4iw_get_qpid()
222 mutex_unlock(&rdev->stats.lock); c4iw_get_qpid()
258 mutex_lock(&rdev->stats.lock); c4iw_pblpool_alloc()
260 rdev->stats.pbl.cur += roundup(size, 1 << MIN_PBL_SHIFT); c4iw_pblpool_alloc()
261 if (rdev->stats.pbl.cur > rdev->stats.pbl.max) c4iw_pblpool_alloc()
262 rdev->stats.pbl.max = rdev->stats.pbl.cur; c4iw_pblpool_alloc()
264 rdev->stats.pbl.fail++; c4iw_pblpool_alloc()
265 mutex_unlock(&rdev->stats.lock); c4iw_pblpool_alloc()
272 mutex_lock(&rdev->stats.lock); c4iw_pblpool_free()
273 rdev->stats.pbl.cur -= roundup(size, 1 << MIN_PBL_SHIFT); c4iw_pblpool_free()
274 mutex_unlock(&rdev->stats.lock); c4iw_pblpool_free()
331 mutex_lock(&rdev->stats.lock); c4iw_rqtpool_alloc()
333 rdev->stats.rqt.cur += roundup(size << 6, 1 << MIN_RQT_SHIFT); c4iw_rqtpool_alloc()
334 if (rdev->stats.rqt.cur > rdev->stats.rqt.max) c4iw_rqtpool_alloc()
335 rdev->stats.rqt.max = rdev->stats.rqt.cur; c4iw_rqtpool_alloc()
337 rdev->stats.rqt.fail++; c4iw_rqtpool_alloc()
338 mutex_unlock(&rdev->stats.lock); c4iw_rqtpool_alloc()
345 mutex_lock(&rdev->stats.lock); c4iw_rqtpool_free()
346 rdev->stats.rqt.cur -= roundup(size << 6, 1 << MIN_RQT_SHIFT); c4iw_rqtpool_free()
347 mutex_unlock(&rdev->stats.lock); c4iw_rqtpool_free()
399 mutex_lock(&rdev->stats.lock); c4iw_ocqp_pool_alloc()
400 rdev->stats.ocqp.cur += roundup(size, 1 << MIN_OCQP_SHIFT); c4iw_ocqp_pool_alloc()
401 if (rdev->stats.ocqp.cur > rdev->stats.ocqp.max) c4iw_ocqp_pool_alloc()
402 rdev->stats.ocqp.max = rdev->stats.ocqp.cur; c4iw_ocqp_pool_alloc()
403 mutex_unlock(&rdev->stats.lock); c4iw_ocqp_pool_alloc()
411 mutex_lock(&rdev->stats.lock); c4iw_ocqp_pool_free()
412 rdev->stats.ocqp.cur -= roundup(size, 1 << MIN_OCQP_SHIFT); c4iw_ocqp_pool_free()
413 mutex_unlock(&rdev->stats.lock); c4iw_ocqp_pool_free()
H A Ddevice.c464 dev->rdev.stats.pd.total, dev->rdev.stats.pd.cur, stats_show()
465 dev->rdev.stats.pd.max, dev->rdev.stats.pd.fail); stats_show()
467 dev->rdev.stats.qid.total, dev->rdev.stats.qid.cur, stats_show()
468 dev->rdev.stats.qid.max, dev->rdev.stats.qid.fail); stats_show()
470 dev->rdev.stats.stag.total, dev->rdev.stats.stag.cur, stats_show()
471 dev->rdev.stats.stag.max, dev->rdev.stats.stag.fail); stats_show()
473 dev->rdev.stats.pbl.total, dev->rdev.stats.pbl.cur, stats_show()
474 dev->rdev.stats.pbl.max, dev->rdev.stats.pbl.fail); stats_show()
476 dev->rdev.stats.rqt.total, dev->rdev.stats.rqt.cur, stats_show()
477 dev->rdev.stats.rqt.max, dev->rdev.stats.rqt.fail); stats_show()
479 dev->rdev.stats.ocqp.total, dev->rdev.stats.ocqp.cur, stats_show()
480 dev->rdev.stats.ocqp.max, dev->rdev.stats.ocqp.fail); stats_show()
481 seq_printf(seq, " DB FULL: %10llu\n", dev->rdev.stats.db_full); stats_show()
482 seq_printf(seq, " DB EMPTY: %10llu\n", dev->rdev.stats.db_empty); stats_show()
483 seq_printf(seq, " DB DROP: %10llu\n", dev->rdev.stats.db_drop); stats_show()
486 dev->rdev.stats.db_state_transitions, stats_show()
487 dev->rdev.stats.db_fc_interruptions); stats_show()
488 seq_printf(seq, "TCAM_FULL: %10llu\n", dev->rdev.stats.tcam_full); stats_show()
490 dev->rdev.stats.act_ofld_conn_fails); stats_show()
492 dev->rdev.stats.pas_ofld_conn_fails); stats_show()
493 seq_printf(seq, "NEG_ADV_RCVD: %10llu\n", dev->rdev.stats.neg_adv); stats_show()
508 mutex_lock(&dev->rdev.stats.lock); stats_clear()
509 dev->rdev.stats.pd.max = 0; stats_clear()
510 dev->rdev.stats.pd.fail = 0; stats_clear()
511 dev->rdev.stats.qid.max = 0; stats_clear()
512 dev->rdev.stats.qid.fail = 0; stats_clear()
513 dev->rdev.stats.stag.max = 0; stats_clear()
514 dev->rdev.stats.stag.fail = 0; stats_clear()
515 dev->rdev.stats.pbl.max = 0; stats_clear()
516 dev->rdev.stats.pbl.fail = 0; stats_clear()
517 dev->rdev.stats.rqt.max = 0; stats_clear()
518 dev->rdev.stats.rqt.fail = 0; stats_clear()
519 dev->rdev.stats.ocqp.max = 0; stats_clear()
520 dev->rdev.stats.ocqp.fail = 0; stats_clear()
521 dev->rdev.stats.db_full = 0; stats_clear()
522 dev->rdev.stats.db_empty = 0; stats_clear()
523 dev->rdev.stats.db_drop = 0; stats_clear()
524 dev->rdev.stats.db_state_transitions = 0; stats_clear()
525 dev->rdev.stats.tcam_full = 0; stats_clear()
526 dev->rdev.stats.act_ofld_conn_fails = 0; stats_clear()
527 dev->rdev.stats.pas_ofld_conn_fails = 0; stats_clear()
528 mutex_unlock(&dev->rdev.stats.lock); stats_clear()
570 ep->stats.connect_neg_adv, dump_ep()
571 ep->stats.abort_neg_adv, dump_ep()
594 ep->stats.connect_neg_adv, dump_ep()
595 ep->stats.abort_neg_adv, dump_ep()
720 debugfs_create_file_size("stats", S_IWUSR, devp->debugfs_root, setup_debugfs()
745 mutex_lock(&rdev->stats.lock); c4iw_release_dev_ucontext()
746 rdev->stats.qid.cur -= rdev->qpmask + 1; c4iw_release_dev_ucontext()
747 mutex_unlock(&rdev->stats.lock); c4iw_release_dev_ucontext()
832 rdev->stats.pd.total = T4_MAX_NUM_PD; c4iw_rdev_open()
833 rdev->stats.stag.total = rdev->lldi.vr->stag.size; c4iw_rdev_open()
834 rdev->stats.pbl.total = rdev->lldi.vr->pbl.size; c4iw_rdev_open()
835 rdev->stats.rqt.total = rdev->lldi.vr->rq.size; c4iw_rdev_open()
836 rdev->stats.ocqp.total = rdev->lldi.vr->ocq.size; c4iw_rdev_open()
837 rdev->stats.qid.total = rdev->lldi.vr->qp.size; c4iw_rdev_open()
1019 mutex_init(&devp->rdev.stats.lock); c4iw_alloc()
1258 ctx->dev->rdev.stats.db_state_transitions++; stop_queues()
1312 ctx->dev->rdev.stats.db_state_transitions++; resume_queues()
1340 ctx->dev->rdev.stats.db_fc_interruptions++; resume_queues()
1483 ctx->dev->rdev.stats.db_full++; c4iw_uld_control()
1487 mutex_lock(&ctx->dev->rdev.stats.lock); c4iw_uld_control()
1488 ctx->dev->rdev.stats.db_empty++; c4iw_uld_control()
1489 mutex_unlock(&ctx->dev->rdev.stats.lock); c4iw_uld_control()
1493 mutex_lock(&ctx->dev->rdev.stats.lock); c4iw_uld_control()
1494 ctx->dev->rdev.stats.db_drop++; c4iw_uld_control()
1495 mutex_unlock(&ctx->dev->rdev.stats.lock); c4iw_uld_control()
/linux-4.1.27/drivers/net/wireless/rtlwifi/rtl8192de/
H A Dtrx.c228 rtlpriv->stats.rx_snr_db[i] = _rtl92de_query_rxphystatus()
271 if (rtlpriv->stats.rx_rssi_percentage[rfpath] == 0) { rtl92d_loop_over_paths()
272 rtlpriv->stats.rx_rssi_percentage[rfpath] = rtl92d_loop_over_paths()
277 rtlpriv->stats.rx_rssi_percentage[rfpath]) { rtl92d_loop_over_paths()
278 rtlpriv->stats.rx_rssi_percentage[rfpath] = rtl92d_loop_over_paths()
279 ((rtlpriv->stats.rx_rssi_percentage[rfpath] * rtl92d_loop_over_paths()
283 rtlpriv->stats.rx_rssi_percentage[rfpath] = rtl92d_loop_over_paths()
284 rtlpriv->stats.rx_rssi_percentage[rfpath] + 1; rtl92d_loop_over_paths()
286 rtlpriv->stats.rx_rssi_percentage[rfpath] = rtl92d_loop_over_paths()
287 ((rtlpriv->stats.rx_rssi_percentage[rfpath] * rtl92d_loop_over_paths()
302 rtlpriv->stats.rssi_calculate_cnt++; _rtl92de_process_ui_rssi()
303 if (rtlpriv->stats.ui_rssi.total_num++ >= _rtl92de_process_ui_rssi()
305 rtlpriv->stats.ui_rssi.total_num = _rtl92de_process_ui_rssi()
307 last_rssi = rtlpriv->stats.ui_rssi.elements[ _rtl92de_process_ui_rssi()
308 rtlpriv->stats.ui_rssi.index]; _rtl92de_process_ui_rssi()
309 rtlpriv->stats.ui_rssi.total_val -= last_rssi; _rtl92de_process_ui_rssi()
311 rtlpriv->stats.ui_rssi.total_val += pstats->signalstrength; _rtl92de_process_ui_rssi()
312 rtlpriv->stats.ui_rssi.elements _rtl92de_process_ui_rssi()
313 [rtlpriv->stats.ui_rssi.index++] = _rtl92de_process_ui_rssi()
315 if (rtlpriv->stats.ui_rssi.index >= PHY_RSSI_SLID_WIN_MAX) _rtl92de_process_ui_rssi()
316 rtlpriv->stats.ui_rssi.index = 0; _rtl92de_process_ui_rssi()
317 tmpval = rtlpriv->stats.ui_rssi.total_val / _rtl92de_process_ui_rssi()
318 rtlpriv->stats.ui_rssi.total_num; _rtl92de_process_ui_rssi()
319 rtlpriv->stats.signal_strength = _rtl92de_translate_todbm(hw, _rtl92de_process_ui_rssi()
321 pstats->rssi = rtlpriv->stats.signal_strength; _rtl92de_process_ui_rssi()
333 if (rtlpriv->stats.recv_signal_power == 0) _rtl92de_update_rxsignalstatistics()
334 rtlpriv->stats.recv_signal_power = pstats->recvsignalpower; _rtl92de_update_rxsignalstatistics()
335 if (pstats->recvsignalpower > rtlpriv->stats.recv_signal_power) _rtl92de_update_rxsignalstatistics()
337 else if (pstats->recvsignalpower < rtlpriv->stats.recv_signal_power) _rtl92de_update_rxsignalstatistics()
339 rtlpriv->stats.recv_signal_power = (rtlpriv->stats.recv_signal_power * _rtl92de_update_rxsignalstatistics()
382 if (rtlpriv->stats.rx_evm_percentage[stream] == 0) { rtl92d_loop_over_streams()
383 rtlpriv->stats.rx_evm_percentage[stream] = rtl92d_loop_over_streams()
386 rtlpriv->stats.rx_evm_percentage[stream] = rtl92d_loop_over_streams()
387 ((rtlpriv->stats.rx_evm_percentage[stream] rtl92d_loop_over_streams()
404 if (rtlpriv->stats.ui_link_quality.total_num++ >= _rtl92de_process_ui_link_quality()
406 rtlpriv->stats.ui_link_quality.total_num = _rtl92de_process_ui_link_quality()
408 last_evm = rtlpriv->stats.ui_link_quality.elements[ _rtl92de_process_ui_link_quality()
409 rtlpriv->stats.ui_link_quality.index]; _rtl92de_process_ui_link_quality()
410 rtlpriv->stats.ui_link_quality.total_val -= last_evm; _rtl92de_process_ui_link_quality()
412 rtlpriv->stats.ui_link_quality.total_val += _rtl92de_process_ui_link_quality()
414 rtlpriv->stats.ui_link_quality.elements[ _rtl92de_process_ui_link_quality()
415 rtlpriv->stats.ui_link_quality.index++] = _rtl92de_process_ui_link_quality()
417 if (rtlpriv->stats.ui_link_quality.index >= _rtl92de_process_ui_link_quality()
419 rtlpriv->stats.ui_link_quality.index = 0; _rtl92de_process_ui_link_quality()
420 tmpval = rtlpriv->stats.ui_link_quality.total_val / _rtl92de_process_ui_link_quality()
421 rtlpriv->stats.ui_link_quality.total_num; _rtl92de_process_ui_link_quality()
422 rtlpriv->stats.signal_quality = tmpval; _rtl92de_process_ui_link_quality()
423 rtlpriv->stats.last_sigstrength_inpercent = tmpval; _rtl92de_process_ui_link_quality()
479 bool rtl92de_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats, rtl92de_rx_query_desc() argument
487 stats->length = (u16) GET_RX_DESC_PKT_LEN(pdesc); rtl92de_rx_query_desc()
488 stats->rx_drvinfo_size = (u8) GET_RX_DESC_DRV_INFO_SIZE(pdesc) * rtl92de_rx_query_desc()
490 stats->rx_bufshift = (u8) (GET_RX_DESC_SHIFT(pdesc) & 0x03); rtl92de_rx_query_desc()
491 stats->icv = (u16) GET_RX_DESC_ICV(pdesc); rtl92de_rx_query_desc()
492 stats->crc = (u16) GET_RX_DESC_CRC32(pdesc); rtl92de_rx_query_desc()
493 stats->hwerror = (stats->crc | stats->icv); rtl92de_rx_query_desc()
494 stats->decrypted = !GET_RX_DESC_SWDEC(pdesc); rtl92de_rx_query_desc()
495 stats->rate = (u8) GET_RX_DESC_RXMCS(pdesc); rtl92de_rx_query_desc()
496 stats->shortpreamble = (u16) GET_RX_DESC_SPLCP(pdesc); rtl92de_rx_query_desc()
497 stats->isampdu = (bool) (GET_RX_DESC_PAGGR(pdesc) == 1); rtl92de_rx_query_desc()
498 stats->isfirst_ampdu = (bool) ((GET_RX_DESC_PAGGR(pdesc) == 1) rtl92de_rx_query_desc()
500 stats->timestamp_low = GET_RX_DESC_TSFL(pdesc); rtl92de_rx_query_desc()
501 stats->rx_is40Mhzpacket = (bool) GET_RX_DESC_BW(pdesc); rtl92de_rx_query_desc()
502 stats->is_ht = (bool)GET_RX_DESC_RXHT(pdesc); rtl92de_rx_query_desc()
514 if (stats->decrypted) rtl92de_rx_query_desc()
516 rx_status->rate_idx = rtlwifi_rate_mapping(hw, stats->is_ht, rtl92de_rx_query_desc()
517 false, stats->rate); rtl92de_rx_query_desc()
521 stats->rx_bufshift); rtl92de_rx_query_desc()
523 skb, stats, pdesc, rtl92de_rx_query_desc()
526 /*rx_status->qual = stats->signal; */ rtl92de_rx_query_desc()
527 rx_status->signal = stats->recvsignalpower + 10; rtl92de_rx_query_desc()
/linux-4.1.27/Documentation/trace/postprocess/
H A Dtrace-vmscan-postprocess.pl464 my %stats = %$hashref;
466 # Dump per-process stats
482 foreach $process_pid (keys %stats) {
484 if (!$stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[0] &&
485 !$stats{$process_pid}->{HIGH_KSWAPD_LATENCY}[0]) {
491 while (defined $stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index] ||
492 defined $stats{$process_pid}->{HIGH_KSWAPD_LATENCY}[$index]) {
494 if ($stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index]) {
495 printf("%s ", $stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index]) if !$opt_ignorepid;
496 my ($dummy, $latency) = split(/-/, $stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index]);
499 printf("%s ", $stats{$process_pid}->{HIGH_KSWAPD_LATENCY}[$index]) if !$opt_ignorepid;
500 my ($dummy, $latency) = split(/-/, $stats{$process_pid}->{HIGH_KSWAPD_LATENCY}[$index]);
512 foreach $process_pid (keys %stats) {
514 if (!$stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}) {
518 $total_direct_reclaim += $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN};
519 $total_wakeup_kswapd += $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD};
520 $total_direct_nr_scanned += $stats{$process_pid}->{HIGH_NR_SCANNED};
521 $total_direct_nr_file_scanned += $stats{$process_pid}->{HIGH_NR_FILE_SCANNED};
522 $total_direct_nr_anon_scanned += $stats{$process_pid}->{HIGH_NR_ANON_SCANNED};
523 $total_direct_nr_reclaimed += $stats{$process_pid}->{HIGH_NR_RECLAIMED};
524 $total_direct_nr_file_reclaimed += $stats{$process_pid}->{HIGH_NR_FILE_RECLAIMED};
525 $total_direct_nr_anon_reclaimed += $stats{$process_pid}->{HIGH_NR_ANON_RECLAIMED};
526 $total_direct_writepage_file_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC};
527 $total_direct_writepage_anon_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC};
528 $total_direct_writepage_file_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC};
530 $total_direct_writepage_anon_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC};
534 while (defined $stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index]) {
535 my ($dummy, $latency) = split(/-/, $stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index]);
542 $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN},
543 $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD},
544 $stats{$process_pid}->{HIGH_NR_SCANNED},
545 $stats{$process_pid}->{HIGH_NR_FILE_SCANNED},
546 $stats{$process_pid}->{HIGH_NR_ANON_SCANNED},
547 $stats{$process_pid}->{HIGH_NR_RECLAIMED},
548 $stats{$process_pid}->{HIGH_NR_FILE_RECLAIMED},
549 $stats{$process_pid}->{HIGH_NR_ANON_RECLAIMED},
550 $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC},
551 $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC},
554 if ($stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}) {
557 my $count = $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN_PERORDER}[$order];
563 if ($stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}) {
566 my $count = $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD_PERORDER}[$order];
580 foreach $process_pid (keys %stats) {
582 if (!$stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}) {
586 $total_kswapd_wake += $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE};
587 $total_kswapd_nr_scanned += $stats{$process_pid}->{HIGH_NR_SCANNED};
588 $total_kswapd_nr_file_scanned += $stats{$process_pid}->{HIGH_NR_FILE_SCANNED};
589 $total_kswapd_nr_anon_scanned += $stats{$process_pid}->{HIGH_NR_ANON_SCANNED};
590 $total_kswapd_nr_reclaimed += $stats{$process_pid}->{HIGH_NR_RECLAIMED};
591 $total_kswapd_nr_file_reclaimed += $stats{$process_pid}->{HIGH_NR_FILE_RECLAIMED};
592 $total_kswapd_nr_anon_reclaimed += $stats{$process_pid}->{HIGH_NR_ANON_RECLAIMED};
593 $total_kswapd_writepage_file_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC};
594 $total_kswapd_writepage_anon_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC};
595 $total_kswapd_writepage_file_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC};
596 $total_kswapd_writepage_anon_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC};
600 $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE},
601 $stats{$process_pid}->{HIGH_KSWAPD_REWAKEUP},
602 $stats{$process_pid}->{HIGH_NR_SCANNED},
603 $stats{$process_pid}->{HIGH_NR_FILE_SCANNED},
604 $stats{$process_pid}->{HIGH_NR_ANON_SCANNED},
605 $stats{$process_pid}->{HIGH_NR_RECLAIMED},
606 $stats{$process_pid}->{HIGH_NR_FILE_RECLAIMED},
607 $stats{$process_pid}->{HIGH_NR_ANON_RECLAIMED},
608 $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC},
609 $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC});
611 if ($stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}) {
614 my $count = $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE_PERORDER}[$order];
620 if ($stats{$process_pid}->{HIGH_KSWAPD_REWAKEUP}) {
623 my $count = $stats{$process_pid}->{HIGH_KSWAPD_REWAKEUP_PERORDER}[$order];
H A Dtrace-pagealloc-postprocess.pl300 my %stats = %$hashref;
302 # Dump per-process stats
324 foreach $process_pid (keys %stats) {
326 if ($stats{$process_pid}->{STATE_PCPU_PAGES_DRAINED}) {
327 $stats{$process_pid}->{HIGH_PCPU_DRAINS}++;
328 $stats{$process_pid}->{STATE_PCPU_PAGES_DRAINED} = 0;
330 if ($stats{$process_pid}->{STATE_PCPU_PAGES_REFILLED}) {
331 $stats{$process_pid}->{HIGH_PCPU_REFILLS}++;
332 $stats{$process_pid}->{STATE_PCPU_PAGES_REFILLED} = 0;
337 $stats{$process_pid}->{MM_PAGE_ALLOC},
338 $stats{$process_pid}->{MM_PAGE_ALLOC_ZONE_LOCKED},
339 $stats{$process_pid}->{MM_PAGE_FREE},
340 $stats{$process_pid}->{MM_PAGE_FREE_BATCHED},
341 $stats{$process_pid}->{MM_PAGE_PCPU_DRAIN},
342 $stats{$process_pid}->{HIGH_PCPU_DRAINS},
343 $stats{$process_pid}->{HIGH_PCPU_REFILLS},
344 $stats{$process_pid}->{MM_PAGE_ALLOC_EXTFRAG},
345 $stats{$process_pid}->{HIGH_EXT_FRAG},
346 $stats{$process_pid}->{HIGH_EXT_FRAGMENT_CHANGED},
347 $stats{$process_pid}->{HIGH_EXT_FRAGMENT_SEVERE},
348 $stats{$process_pid}->{HIGH_EXT_FRAGMENT_MODERATE},
349 $stats{$process_pid}->{EVENT_UNKNOWN});
/linux-4.1.27/drivers/crypto/nx/
H A Dnx_debugfs.c54 dfs->dfs_root, (u32 *)&drv->stats.aes_ops); nx_debugfs_init()
59 (u32 *)&drv->stats.sha256_ops); nx_debugfs_init()
64 (u32 *)&drv->stats.sha512_ops); nx_debugfs_init()
69 (u64 *)&drv->stats.aes_bytes); nx_debugfs_init()
74 (u64 *)&drv->stats.sha256_bytes); nx_debugfs_init()
79 (u64 *)&drv->stats.sha512_bytes); nx_debugfs_init()
83 dfs->dfs_root, (u32 *)&drv->stats.errors); nx_debugfs_init()
88 (u32 *)&drv->stats.last_error); nx_debugfs_init()
93 (u32 *)&drv->stats.last_error_pid); nx_debugfs_init()
/linux-4.1.27/include/linux/
H A Dtsacct_kern.h15 struct taskstats *stats, struct task_struct *tsk);
19 struct taskstats *stats, struct task_struct *tsk) bacct_add_tsk()
24 extern void xacct_add_tsk(struct taskstats *stats, struct task_struct *p);
29 static inline void xacct_add_tsk(struct taskstats *stats, struct task_struct *p) xacct_add_tsk() argument
17 bacct_add_tsk(struct user_namespace *user_ns, struct pid_namespace *pid_ns, struct taskstats *stats, struct task_struct *tsk) bacct_add_tsk() argument
H A Dtaskstats_kern.h20 if (sig->stats) taskstats_tgid_free()
21 kmem_cache_free(taskstats_cache, sig->stats); taskstats_tgid_free()
H A Du64_stats_sync.h41 * u64_stats_update_begin(&stats->syncp);
42 * stats->bytes64 += len; // non atomic operation
43 * stats->packets64++; // non atomic operation
44 * u64_stats_update_end(&stats->syncp);
53 * start = u64_stats_fetch_begin(&stats->syncp);
54 * tbytes = stats->bytes64; // non atomic operation
55 * tpackets = stats->packets64; // non atomic operation
56 * } while (u64_stats_fetch_retry(&stats->syncp, start));
/linux-4.1.27/include/uapi/linux/nfsd/
H A Dstats.h2 * linux/include/linux/nfsd/stats.h
/linux-4.1.27/fs/fscache/
H A DMakefile16 fscache-$(CONFIG_FSCACHE_STATS) += stats.o
H A Dproc.c29 if (!proc_create("fs/fscache/stats", S_IFREG | 0444, NULL, fscache_proc_init()
57 remove_proc_entry("fs/fscache/stats", NULL); fscache_proc_init()
78 remove_proc_entry("fs/fscache/stats", NULL); fscache_proc_cleanup()
/linux-4.1.27/tools/testing/selftests/powerpc/pmu/ebb/
H A Dpmc56_overflow_test.c25 ebb_state.stats.spurious++; ebb_callee()
29 ebb_state.stats.ebb_count++; ebb_callee()
71 while (ebb_state.stats.ebb_count < 10) pmc56_overflow()
85 FAIL_IF(ebb_state.stats.ebb_count == 0 || pmc56_overflowed != 0); pmc56_overflow()
H A Dback_to_back_ebbs_test.c33 ebb_state.stats.spurious++; ebb_callee()
37 ebb_state.stats.ebb_count++; ebb_callee()
38 trace_log_counter(ebb_state.trace, ebb_state.stats.ebb_count); ebb_callee()
44 if (ebb_state.stats.ebb_count == NUMBER_OF_EBBS) ebb_callee()
86 while (ebb_state.stats.ebb_count < NUMBER_OF_EBBS) back_to_back_ebbs()
98 FAIL_IF(ebb_state.stats.ebb_count != NUMBER_OF_EBBS); back_to_back_ebbs()
H A Debb.c76 count = ebb_state.stats.pmc_count[PMC_INDEX(pmc)]; ebb_check_count()
78 lower = ebb_state.stats.ebb_count * (sample_period - fudge); ebb_check_count()
86 upper = ebb_state.stats.ebb_count * (sample_period + fudge); ebb_check_count()
107 ebb_state.stats.spurious++; standard_ebb_callee()
111 ebb_state.stats.ebb_count++; standard_ebb_callee()
112 trace_log_counter(ebb_state.trace, ebb_state.stats.ebb_count); standard_ebb_callee()
124 ebb_state.stats.no_overflow++; standard_ebb_callee()
162 memset(&ebb_state.stats, 0, sizeof(ebb_state.stats)); clear_ebb_stats()
178 ebb_state.stats.ebb_count, ebb_state.stats.spurious, dump_summary_ebb_state()
179 ebb_state.stats.negative, ebb_state.stats.no_overflow, dump_summary_ebb_state()
180 ebb_state.stats.pmc_count[0], ebb_state.stats.pmc_count[1], dump_summary_ebb_state()
181 ebb_state.stats.pmc_count[2], ebb_state.stats.pmc_count[3], dump_summary_ebb_state()
182 ebb_state.stats.pmc_count[4], ebb_state.stats.pmc_count[5]); dump_summary_ebb_state()
263 ebb_state.stats.negative++; count_pmc()
265 ebb_state.stats.pmc_count[PMC_INDEX(pmc)] += val - start_value; count_pmc()
378 while (ebb_state.stats.ebb_count < 20) { ebb_child()
396 FAIL_IF(ebb_state.stats.ebb_count == 0); ebb_child()
H A Dcycles_with_freeze_test.c32 ebb_state.stats.spurious++; ebb_callee()
36 ebb_state.stats.ebb_count++; ebb_callee()
37 trace_log_counter(ebb_state.trace, ebb_state.stats.ebb_count); ebb_callee()
77 while ((ebb_state.stats.ebb_count < 20 && !fc_cleared) || cycles_with_freeze()
78 ebb_state.stats.ebb_count < 1) cycles_with_freeze()
108 FAIL_IF(ebb_state.stats.ebb_count == 0); cycles_with_freeze()
H A Dcycles_test.c35 while (ebb_state.stats.ebb_count < 10) { cycles()
49 FAIL_IF(ebb_state.stats.ebb_count == 0); cycles()
H A Dpmae_handling_test.c37 ebb_state.stats.spurious++; syscall_ebb_callee()
41 ebb_state.stats.ebb_count++; syscall_ebb_callee()
77 while (ebb_state.stats.ebb_count < 20 && !mmcr0_mismatch) test_body()
92 FAIL_IF(ebb_state.stats.ebb_count == 0); test_body()
H A Dclose_clears_pmcc_test.c35 while (ebb_state.stats.ebb_count < 1) close_clears_pmcc()
41 FAIL_IF(ebb_state.stats.ebb_count == 0); close_clears_pmcc()
H A Dmulti_counter_test.c63 while (ebb_state.stats.ebb_count < 50) { multi_counter()
83 FAIL_IF(ebb_state.stats.ebb_count == 0); multi_counter()
H A Dcycles_with_mmcr2_test.c53 while ((ebb_state.stats.ebb_count < 20 && !bad_mmcr2) || cycles_with_mmcr2()
54 ebb_state.stats.ebb_count < 1) cycles_with_mmcr2()
78 FAIL_IF(ebb_state.stats.ebb_count == 0); cycles_with_mmcr2()
H A Dinstruction_count_test.c45 event->result.value = ebb_state.stats.pmc_count[4-1]; do_count_loop()
55 printf("Took %d EBBs\n", ebb_state.stats.ebb_count); do_count_loop()
96 ebb_state.stats.spurious++; pmc4_ebb_callee()
100 ebb_state.stats.ebb_count++; pmc4_ebb_callee()
H A Debb_on_willing_child_test.c34 while (ebb_state.stats.ebb_count < 20) { victim_child()
45 FAIL_IF(ebb_state.stats.ebb_count == 0); victim_child()
/linux-4.1.27/drivers/net/
H A Dnlmon.c18 struct pcpu_lstats *stats = this_cpu_ptr(dev->lstats); nlmon_xmit() local
20 u64_stats_update_begin(&stats->syncp); nlmon_xmit()
21 stats->bytes += len; nlmon_xmit()
22 stats->packets++; nlmon_xmit()
23 u64_stats_update_end(&stats->syncp); nlmon_xmit()
80 nlmon_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) nlmon_get_stats64() argument
102 stats->rx_packets = packets;
103 stats->tx_packets = 0;
105 stats->rx_bytes = bytes;
106 stats->tx_bytes = 0;
108 return stats;
H A Difb.c97 _dev->stats.tx_dropped++; ri_tasklet()
133 struct rtnl_link_stats64 *stats) ifb_stats64()
140 stats->rx_packets = dp->rx_packets; ifb_stats64()
141 stats->rx_bytes = dp->rx_bytes; ifb_stats64()
147 stats->tx_packets = dp->tx_packets; ifb_stats64()
148 stats->tx_bytes = dp->tx_bytes; ifb_stats64()
152 stats->rx_dropped = dev->stats.rx_dropped; ifb_stats64()
153 stats->tx_dropped = dev->stats.tx_dropped; ifb_stats64()
155 return stats; ifb_stats64()
205 dev->stats.rx_dropped++; ifb_xmit()
132 ifb_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) ifb_stats64() argument
H A Dntb_netdev.c114 ndev->stats.rx_errors++; ntb_netdev_rx_handler()
115 ndev->stats.rx_dropped++; ntb_netdev_rx_handler()
117 ndev->stats.rx_packets++; ntb_netdev_rx_handler()
118 ndev->stats.rx_bytes += len; ntb_netdev_rx_handler()
123 ndev->stats.rx_errors++; ntb_netdev_rx_handler()
124 ndev->stats.rx_frame_errors++; ntb_netdev_rx_handler()
131 ndev->stats.rx_errors++; ntb_netdev_rx_handler()
132 ndev->stats.rx_fifo_errors++; ntb_netdev_rx_handler()
147 ndev->stats.tx_packets++; ntb_netdev_tx_handler()
148 ndev->stats.tx_bytes += skb->len; ntb_netdev_tx_handler()
150 ndev->stats.tx_errors++; ntb_netdev_tx_handler()
151 ndev->stats.tx_aborted_errors++; ntb_netdev_tx_handler()
172 ndev->stats.tx_dropped++; ntb_netdev_start_xmit()
173 ndev->stats.tx_errors++; ntb_netdev_start_xmit()
H A Dloopback.c101 struct rtnl_link_stats64 *stats) loopback_get_stats64()
121 stats->rx_packets = packets;
122 stats->tx_packets = packets;
123 stats->rx_bytes = bytes;
124 stats->tx_bytes = bytes;
125 return stats;
100 loopback_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) loopback_get_stats64() argument
H A Dveth.c91 struct ethtool_stats *stats, u64 *data) veth_get_ethtool_stats()
122 struct pcpu_vstats *stats = this_cpu_ptr(dev->vstats); veth_xmit() local
124 u64_stats_update_begin(&stats->syncp); veth_xmit()
125 stats->bytes += length; veth_xmit()
126 stats->packets++; veth_xmit()
127 u64_stats_update_end(&stats->syncp); veth_xmit()
148 struct pcpu_vstats *stats = per_cpu_ptr(dev->vstats, cpu); for_each_possible_cpu() local
153 start = u64_stats_fetch_begin_irq(&stats->syncp); for_each_possible_cpu()
154 packets = stats->packets; for_each_possible_cpu()
155 bytes = stats->bytes; for_each_possible_cpu()
156 } while (u64_stats_fetch_retry_irq(&stats->syncp, start)); for_each_possible_cpu()
90 veth_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) veth_get_ethtool_stats() argument
/linux-4.1.27/arch/s390/appldata/
H A Dappldata_net_sum.c86 const struct rtnl_link_stats64 *stats; appldata_get_net_sum_data() local
89 stats = dev_get_stats(dev, &temp); appldata_get_net_sum_data()
90 rx_packets += stats->rx_packets; appldata_get_net_sum_data()
91 tx_packets += stats->tx_packets; appldata_get_net_sum_data()
92 rx_bytes += stats->rx_bytes; appldata_get_net_sum_data()
93 tx_bytes += stats->tx_bytes; appldata_get_net_sum_data()
94 rx_errors += stats->rx_errors; appldata_get_net_sum_data()
95 tx_errors += stats->tx_errors; appldata_get_net_sum_data()
96 rx_dropped += stats->rx_dropped; appldata_get_net_sum_data()
97 tx_dropped += stats->tx_dropped; appldata_get_net_sum_data()
98 collisions += stats->collisions; appldata_get_net_sum_data()
/linux-4.1.27/net/core/
H A Dnet-procfs.c80 const struct rtnl_link_stats64 *stats = dev_get_stats(dev, &temp); dev_seq_printf_stats() local
84 dev->name, stats->rx_bytes, stats->rx_packets, dev_seq_printf_stats()
85 stats->rx_errors, dev_seq_printf_stats()
86 stats->rx_dropped + stats->rx_missed_errors, dev_seq_printf_stats()
87 stats->rx_fifo_errors, dev_seq_printf_stats()
88 stats->rx_length_errors + stats->rx_over_errors + dev_seq_printf_stats()
89 stats->rx_crc_errors + stats->rx_frame_errors, dev_seq_printf_stats()
90 stats->rx_compressed, stats->multicast, dev_seq_printf_stats()
91 stats->tx_bytes, stats->tx_packets, dev_seq_printf_stats()
92 stats->tx_errors, stats->tx_dropped, dev_seq_printf_stats()
93 stats->tx_fifo_errors, stats->collisions, dev_seq_printf_stats()
94 stats->tx_carrier_errors + dev_seq_printf_stats()
95 stats->tx_aborted_errors + dev_seq_printf_stats()
96 stats->tx_window_errors + dev_seq_printf_stats()
97 stats->tx_heartbeat_errors, dev_seq_printf_stats()
98 stats->tx_compressed); dev_seq_printf_stats()
/linux-4.1.27/net/sunrpc/
H A Dstats.c2 * linux/net/sunrpc/stats.c
4 * procfs-based user access to generic RPC statistics. The stats files
8 * If you implement an RPC service that has its own stats routine which
9 * appends the generic RPC stats, make sure you don't exceed the PAGE_SIZE
32 * Get RPC client stats
79 * Get RPC server stats
119 struct rpc_iostats *stats; rpc_alloc_iostats() local
122 stats = kcalloc(clnt->cl_maxproc, sizeof(*stats), GFP_KERNEL); rpc_alloc_iostats()
123 if (stats) { rpc_alloc_iostats()
125 spin_lock_init(&stats[i].om_lock); rpc_alloc_iostats()
127 return stats; rpc_alloc_iostats()
133 * @stats: doomed rpc_iostats structure
136 void rpc_free_iostats(struct rpc_iostats *stats) rpc_free_iostats() argument
138 kfree(stats); rpc_free_iostats()
143 * rpc_count_iostats_metrics - tally up per-task stats
145 * @op_metrics: stat structure for OP that will accumulate stats from @task
179 * rpc_count_iostats - tally up per-task stats
181 * @stats: array of stat structures
185 void rpc_count_iostats(const struct rpc_task *task, struct rpc_iostats *stats) rpc_count_iostats() argument
188 &stats[task->tk_msg.rpc_proc->p_statidx]); rpc_count_iostats()
205 struct rpc_iostats *stats = clnt->cl_metrics; rpc_print_iostats() local
209 if (!stats) rpc_print_iostats()
224 struct rpc_iostats *metrics = &stats[op]; rpc_print_iostats()
H A DMakefile19 sunrpc-$(CONFIG_PROC_FS) += stats.o
/linux-4.1.27/drivers/scsi/fnic/
H A Dfnic_trace.c203 * fnic_get_stats_data - Copy fnic stats buffer to a memory file
204 * @fnic_dbgfs_t: pointer to debugfs fnic stats buffer
207 * This routine gathers the fnic stats debugfs data from the fnic_stats struct
215 struct fnic_stats *stats) fnic_get_stats_data()
232 (u64)atomic64_read(&stats->io_stats.active_ios), fnic_get_stats_data()
233 (u64)atomic64_read(&stats->io_stats.max_active_ios), fnic_get_stats_data()
234 (u64)atomic64_read(&stats->io_stats.num_ios), fnic_get_stats_data()
235 (u64)atomic64_read(&stats->io_stats.io_completions), fnic_get_stats_data()
236 (u64)atomic64_read(&stats->io_stats.io_failures), fnic_get_stats_data()
237 (u64)atomic64_read(&stats->io_stats.io_not_found), fnic_get_stats_data()
238 (u64)atomic64_read(&stats->io_stats.alloc_failures), fnic_get_stats_data()
239 (u64)atomic64_read(&stats->io_stats.ioreq_null), fnic_get_stats_data()
240 (u64)atomic64_read(&stats->io_stats.sc_null)); fnic_get_stats_data()
252 (u64)atomic64_read(&stats->abts_stats.aborts), fnic_get_stats_data()
253 (u64)atomic64_read(&stats->abts_stats.abort_failures), fnic_get_stats_data()
254 (u64)atomic64_read(&stats->abts_stats.abort_drv_timeouts), fnic_get_stats_data()
255 (u64)atomic64_read(&stats->abts_stats.abort_fw_timeouts), fnic_get_stats_data()
256 (u64)atomic64_read(&stats->abts_stats.abort_io_not_found)); fnic_get_stats_data()
269 (u64)atomic64_read(&stats->term_stats.terminates), fnic_get_stats_data()
270 (u64)atomic64_read(&stats->term_stats.max_terminates), fnic_get_stats_data()
271 (u64)atomic64_read(&stats->term_stats.terminate_drv_timeouts), fnic_get_stats_data()
272 (u64)atomic64_read(&stats->term_stats.terminate_fw_timeouts), fnic_get_stats_data()
273 (u64)atomic64_read(&stats->term_stats.terminate_io_not_found), fnic_get_stats_data()
274 (u64)atomic64_read(&stats->term_stats.terminate_failures)); fnic_get_stats_data()
293 (u64)atomic64_read(&stats->reset_stats.device_resets), fnic_get_stats_data()
294 (u64)atomic64_read(&stats->reset_stats.device_reset_failures), fnic_get_stats_data()
295 (u64)atomic64_read(&stats->reset_stats.device_reset_aborts), fnic_get_stats_data()
296 (u64)atomic64_read(&stats->reset_stats.device_reset_timeouts), fnic_get_stats_data()
298 &stats->reset_stats.device_reset_terminates), fnic_get_stats_data()
299 (u64)atomic64_read(&stats->reset_stats.fw_resets), fnic_get_stats_data()
300 (u64)atomic64_read(&stats->reset_stats.fw_reset_completions), fnic_get_stats_data()
301 (u64)atomic64_read(&stats->reset_stats.fw_reset_failures), fnic_get_stats_data()
302 (u64)atomic64_read(&stats->reset_stats.fnic_resets), fnic_get_stats_data()
304 &stats->reset_stats.fnic_reset_completions), fnic_get_stats_data()
305 (u64)atomic64_read(&stats->reset_stats.fnic_reset_failures)); fnic_get_stats_data()
317 (u64)atomic64_read(&stats->fw_stats.active_fw_reqs), fnic_get_stats_data()
318 (u64)atomic64_read(&stats->fw_stats.max_fw_reqs), fnic_get_stats_data()
319 (u64)atomic64_read(&stats->fw_stats.fw_out_of_resources), fnic_get_stats_data()
320 (u64)atomic64_read(&stats->fw_stats.io_fw_errs)); fnic_get_stats_data()
332 (u64)atomic64_read(&stats->vlan_stats.vlan_disc_reqs), fnic_get_stats_data()
333 (u64)atomic64_read(&stats->vlan_stats.resp_withno_vlanID), fnic_get_stats_data()
334 (u64)atomic64_read(&stats->vlan_stats.sol_expiry_count), fnic_get_stats_data()
335 (u64)atomic64_read(&stats->vlan_stats.flogi_rejects)); fnic_get_stats_data()
342 jiffies_to_timespec(stats->misc_stats.last_isr_time, &val1); fnic_get_stats_data()
343 jiffies_to_timespec(stats->misc_stats.last_ack_time, &val2); fnic_get_stats_data()
362 (u64)stats->misc_stats.last_isr_time, fnic_get_stats_data()
364 (u64)stats->misc_stats.last_ack_time, fnic_get_stats_data()
366 (u64)atomic64_read(&stats->misc_stats.isr_count), fnic_get_stats_data()
367 (u64)atomic64_read(&stats->misc_stats.max_cq_entries), fnic_get_stats_data()
368 (u64)atomic64_read(&stats->misc_stats.ack_index_out_of_range), fnic_get_stats_data()
369 (u64)atomic64_read(&stats->misc_stats.data_count_mismatch), fnic_get_stats_data()
370 (u64)atomic64_read(&stats->misc_stats.fcpio_timeout), fnic_get_stats_data()
371 (u64)atomic64_read(&stats->misc_stats.fcpio_aborted), fnic_get_stats_data()
372 (u64)atomic64_read(&stats->misc_stats.sgl_invalid), fnic_get_stats_data()
374 &stats->misc_stats.abts_cpwq_alloc_failures), fnic_get_stats_data()
376 &stats->misc_stats.devrst_cpwq_alloc_failures), fnic_get_stats_data()
377 (u64)atomic64_read(&stats->misc_stats.io_cpwq_alloc_failures), fnic_get_stats_data()
378 (u64)atomic64_read(&stats->misc_stats.no_icmnd_itmf_cmpls), fnic_get_stats_data()
379 (u64)atomic64_read(&stats->misc_stats.queue_fulls), fnic_get_stats_data()
380 (u64)atomic64_read(&stats->misc_stats.rport_not_ready), fnic_get_stats_data()
381 (u64)atomic64_read(&stats->misc_stats.frame_errors)); fnic_get_stats_data()
214 fnic_get_stats_data(struct stats_debug_info *debug, struct fnic_stats *stats) fnic_get_stats_data() argument
H A Dfnic_main.c193 struct fc_host_statistics *stats = &lp->host_stats; fnic_get_stats() local
198 return stats; fnic_get_stats()
202 ret = vnic_dev_stats_dump(fnic->vdev, &fnic->stats); fnic_get_stats()
207 "fnic: Get vnic stats failed" fnic_get_stats()
209 return stats; fnic_get_stats()
211 vs = fnic->stats; fnic_get_stats()
212 stats->tx_frames = vs->tx.tx_unicast_frames_ok; fnic_get_stats()
213 stats->tx_words = vs->tx.tx_unicast_bytes_ok / 4; fnic_get_stats()
214 stats->rx_frames = vs->rx.rx_unicast_frames_ok; fnic_get_stats()
215 stats->rx_words = vs->rx.rx_unicast_bytes_ok / 4; fnic_get_stats()
216 stats->error_frames = vs->tx.tx_errors + vs->rx.rx_errors; fnic_get_stats()
217 stats->dumped_frames = vs->tx.tx_drops + vs->rx.rx_drop; fnic_get_stats()
218 stats->invalid_crc_count = vs->rx.rx_crc_errors; fnic_get_stats()
219 stats->seconds_since_last_reset = fnic_get_stats()
221 stats->fcp_input_megabytes = div_u64(fnic->fcp_input_bytes, 1000000); fnic_get_stats()
222 stats->fcp_output_megabytes = div_u64(fnic->fcp_output_bytes, 1000000); fnic_get_stats()
224 return stats; fnic_get_stats()
232 struct fc_host_statistics *stats) fnic_dump_fchost_stats()
236 stats->seconds_since_last_reset); fnic_dump_fchost_stats()
239 stats->tx_frames); fnic_dump_fchost_stats()
242 stats->tx_words); fnic_dump_fchost_stats()
245 stats->rx_frames); fnic_dump_fchost_stats()
248 stats->rx_words); fnic_dump_fchost_stats()
251 stats->lip_count); fnic_dump_fchost_stats()
254 stats->nos_count); fnic_dump_fchost_stats()
257 stats->error_frames); fnic_dump_fchost_stats()
260 stats->dumped_frames); fnic_dump_fchost_stats()
263 stats->link_failure_count); fnic_dump_fchost_stats()
266 stats->loss_of_sync_count); fnic_dump_fchost_stats()
269 stats->loss_of_signal_count); fnic_dump_fchost_stats()
272 stats->prim_seq_protocol_err_count); fnic_dump_fchost_stats()
275 stats->invalid_tx_word_count); fnic_dump_fchost_stats()
278 stats->invalid_crc_count); fnic_dump_fchost_stats()
281 stats->fcp_input_requests); fnic_dump_fchost_stats()
284 stats->fcp_output_requests); fnic_dump_fchost_stats()
287 stats->fcp_control_requests); fnic_dump_fchost_stats()
290 stats->fcp_input_megabytes); fnic_dump_fchost_stats()
293 stats->fcp_output_megabytes); fnic_dump_fchost_stats()
298 * fnic_reset_host_stats : clears host stats
306 struct fc_host_statistics *stats; fnic_reset_host_stats() local
309 /* dump current stats, before clearing them */ fnic_reset_host_stats()
310 stats = fnic_get_stats(host); fnic_reset_host_stats()
311 fnic_dump_fchost_stats(host, stats); fnic_reset_host_stats()
319 "fnic: Reset vnic stats failed" fnic_reset_host_stats()
324 memset(stats, 0, sizeof(*stats)); fnic_reset_host_stats()
575 "Failed to initialize debugfs for stats\n"); fnic_probe()
1043 "for tracing and stats logging\n"); fnic_init_module()
231 fnic_dump_fchost_stats(struct Scsi_Host *host, struct fc_host_statistics *stats) fnic_dump_fchost_stats() argument
H A Dfnic_debugfs.c50 * stats logging.
522 * @file: The file pointer to attach the stats reset flag.
585 * resets cumulative stats of fnic.
596 struct fnic_stats *stats = &fnic->fnic_stats; fnic_reset_stats_write() local
597 u64 *io_stats_p = (u64 *)&stats->io_stats; fnic_reset_stats_write()
598 u64 *fw_stats_p = (u64 *)&stats->fw_stats; fnic_reset_stats_write()
619 * and IO Completions stats. Skip incrementing No IO Compls fnic_reset_stats_write()
620 * for pending active IOs after reset stats fnic_reset_stats_write()
623 atomic64_read(&stats->io_stats.active_ios)); fnic_reset_stats_write()
624 memset(&stats->abts_stats, 0, sizeof(struct abort_stats)); fnic_reset_stats_write()
625 memset(&stats->term_stats, 0, fnic_reset_stats_write()
627 memset(&stats->reset_stats, 0, sizeof(struct reset_stats)); fnic_reset_stats_write()
628 memset(&stats->misc_stats, 0, sizeof(struct misc_stats)); fnic_reset_stats_write()
629 memset(&stats->vlan_stats, 0, sizeof(struct vlan_stats)); fnic_reset_stats_write()
662 * fnic_stats_debugfs_open - Open the stats file for specific host
663 * and get fnic stats.
668 * This routine opens a debugsfs file stats of specific host and print
669 * fnic stats.
768 * fnic_stats_init - Initialize stats struct and create stats file per fnic
771 * When Debugfs is configured this routine sets up the stats file per fnic
772 * It will create file stats and reset_stats under statistics/host# directory
773 * to log per fnic stats.
793 fnic->fnic_stats_debugfs_file = debugfs_create_file("stats", fnic_stats_debugfs_init()
799 printk(KERN_DEBUG "Cannot create host stats file\n"); fnic_stats_debugfs_init()
809 printk(KERN_DEBUG "Cannot create host stats file\n"); fnic_stats_debugfs_init()
817 * fnic_stats_debugfs_remove - Tear down debugfs infrastructure of stats
821 * elements that are specific to fnic stats.
/linux-4.1.27/drivers/net/ethernet/mellanox/mlx4/
H A Den_port.c155 struct net_device_stats *stats = &priv->stats; mlx4_en_DUMP_ETH_STATS() local
174 stats->rx_packets = 0; mlx4_en_DUMP_ETH_STATS()
175 stats->rx_bytes = 0; mlx4_en_DUMP_ETH_STATS()
180 stats->rx_packets += priv->rx_ring[i]->packets; mlx4_en_DUMP_ETH_STATS()
181 stats->rx_bytes += priv->rx_ring[i]->bytes; mlx4_en_DUMP_ETH_STATS()
186 stats->tx_packets = 0; mlx4_en_DUMP_ETH_STATS()
187 stats->tx_bytes = 0; mlx4_en_DUMP_ETH_STATS()
197 stats->tx_packets += ring->packets; mlx4_en_DUMP_ETH_STATS()
198 stats->tx_bytes += ring->bytes; mlx4_en_DUMP_ETH_STATS()
206 /* net device stats */ mlx4_en_DUMP_ETH_STATS()
207 stats->rx_errors = be64_to_cpu(mlx4_en_stats->PCS) + mlx4_en_DUMP_ETH_STATS()
217 stats->tx_errors = en_stats_adder(&mlx4_en_stats->TGIANT_prio_0, mlx4_en_DUMP_ETH_STATS()
220 stats->multicast = en_stats_adder(&mlx4_en_stats->MCAST_prio_0, mlx4_en_DUMP_ETH_STATS()
223 stats->collisions = 0; mlx4_en_DUMP_ETH_STATS()
224 stats->rx_dropped = be32_to_cpu(mlx4_en_stats->RDROP); mlx4_en_DUMP_ETH_STATS()
225 stats->rx_length_errors = be32_to_cpu(mlx4_en_stats->RdropLength); mlx4_en_DUMP_ETH_STATS()
226 stats->rx_over_errors = 0; mlx4_en_DUMP_ETH_STATS()
227 stats->rx_crc_errors = be32_to_cpu(mlx4_en_stats->RCRC); mlx4_en_DUMP_ETH_STATS()
228 stats->rx_frame_errors = 0; mlx4_en_DUMP_ETH_STATS()
229 stats->rx_fifo_errors = be32_to_cpu(mlx4_en_stats->RdropOvflw); mlx4_en_DUMP_ETH_STATS()
230 stats->rx_missed_errors = 0; mlx4_en_DUMP_ETH_STATS()
231 stats->tx_aborted_errors = 0; mlx4_en_DUMP_ETH_STATS()
232 stats->tx_carrier_errors = 0; mlx4_en_DUMP_ETH_STATS()
233 stats->tx_fifo_errors = 0; mlx4_en_DUMP_ETH_STATS()
234 stats->tx_heartbeat_errors = 0; mlx4_en_DUMP_ETH_STATS()
235 stats->tx_window_errors = 0; mlx4_en_DUMP_ETH_STATS()
236 stats->tx_dropped = be32_to_cpu(mlx4_en_stats->TDROP); mlx4_en_DUMP_ETH_STATS()
238 /* RX stats */ mlx4_en_DUMP_ETH_STATS()
239 priv->pkstats.rx_multicast_packets = stats->multicast; mlx4_en_DUMP_ETH_STATS()
250 /* Tx stats */ mlx4_en_DUMP_ETH_STATS()
/linux-4.1.27/fs/ocfs2/
H A Dblockcheck.c250 static void ocfs2_blockcheck_debug_remove(struct ocfs2_blockcheck_stats *stats) ocfs2_blockcheck_debug_remove() argument
252 if (stats) { ocfs2_blockcheck_debug_remove()
253 debugfs_remove(stats->b_debug_check); ocfs2_blockcheck_debug_remove()
254 stats->b_debug_check = NULL; ocfs2_blockcheck_debug_remove()
255 debugfs_remove(stats->b_debug_failure); ocfs2_blockcheck_debug_remove()
256 stats->b_debug_failure = NULL; ocfs2_blockcheck_debug_remove()
257 debugfs_remove(stats->b_debug_recover); ocfs2_blockcheck_debug_remove()
258 stats->b_debug_recover = NULL; ocfs2_blockcheck_debug_remove()
259 debugfs_remove(stats->b_debug_dir); ocfs2_blockcheck_debug_remove()
260 stats->b_debug_dir = NULL; ocfs2_blockcheck_debug_remove()
264 static int ocfs2_blockcheck_debug_install(struct ocfs2_blockcheck_stats *stats, ocfs2_blockcheck_debug_install() argument
269 if (!stats) ocfs2_blockcheck_debug_install()
272 stats->b_debug_dir = debugfs_create_dir("blockcheck", parent); ocfs2_blockcheck_debug_install()
273 if (!stats->b_debug_dir) ocfs2_blockcheck_debug_install()
276 stats->b_debug_check = ocfs2_blockcheck_debug_install()
278 stats->b_debug_dir, ocfs2_blockcheck_debug_install()
279 &stats->b_check_count); ocfs2_blockcheck_debug_install()
281 stats->b_debug_failure = ocfs2_blockcheck_debug_install()
283 stats->b_debug_dir, ocfs2_blockcheck_debug_install()
284 &stats->b_failure_count); ocfs2_blockcheck_debug_install()
286 stats->b_debug_recover = ocfs2_blockcheck_debug_install()
288 stats->b_debug_dir, ocfs2_blockcheck_debug_install()
289 &stats->b_recover_count); ocfs2_blockcheck_debug_install()
290 if (stats->b_debug_check && stats->b_debug_failure && ocfs2_blockcheck_debug_install()
291 stats->b_debug_recover) ocfs2_blockcheck_debug_install()
296 ocfs2_blockcheck_debug_remove(stats); ocfs2_blockcheck_debug_install()
300 static inline int ocfs2_blockcheck_debug_install(struct ocfs2_blockcheck_stats *stats, ocfs2_blockcheck_debug_install() argument
306 static inline void ocfs2_blockcheck_debug_remove(struct ocfs2_blockcheck_stats *stats) ocfs2_blockcheck_debug_remove() argument
312 int ocfs2_blockcheck_stats_debugfs_install(struct ocfs2_blockcheck_stats *stats, ocfs2_blockcheck_stats_debugfs_install() argument
315 return ocfs2_blockcheck_debug_install(stats, parent); ocfs2_blockcheck_stats_debugfs_install()
318 void ocfs2_blockcheck_stats_debugfs_remove(struct ocfs2_blockcheck_stats *stats) ocfs2_blockcheck_stats_debugfs_remove() argument
320 ocfs2_blockcheck_debug_remove(stats); ocfs2_blockcheck_stats_debugfs_remove()
323 static void ocfs2_blockcheck_inc_check(struct ocfs2_blockcheck_stats *stats) ocfs2_blockcheck_inc_check() argument
327 if (!stats) ocfs2_blockcheck_inc_check()
330 spin_lock(&stats->b_lock); ocfs2_blockcheck_inc_check()
331 stats->b_check_count++; ocfs2_blockcheck_inc_check()
332 new_count = stats->b_check_count; ocfs2_blockcheck_inc_check()
333 spin_unlock(&stats->b_lock); ocfs2_blockcheck_inc_check()
339 static void ocfs2_blockcheck_inc_failure(struct ocfs2_blockcheck_stats *stats) ocfs2_blockcheck_inc_failure() argument
343 if (!stats) ocfs2_blockcheck_inc_failure()
346 spin_lock(&stats->b_lock); ocfs2_blockcheck_inc_failure()
347 stats->b_failure_count++; ocfs2_blockcheck_inc_failure()
348 new_count = stats->b_failure_count; ocfs2_blockcheck_inc_failure()
349 spin_unlock(&stats->b_lock); ocfs2_blockcheck_inc_failure()
355 static void ocfs2_blockcheck_inc_recover(struct ocfs2_blockcheck_stats *stats) ocfs2_blockcheck_inc_recover() argument
359 if (!stats) ocfs2_blockcheck_inc_recover()
362 spin_lock(&stats->b_lock); ocfs2_blockcheck_inc_recover()
363 stats->b_recover_count++; ocfs2_blockcheck_inc_recover()
364 new_count = stats->b_recover_count; ocfs2_blockcheck_inc_recover()
365 spin_unlock(&stats->b_lock); ocfs2_blockcheck_inc_recover()
422 struct ocfs2_blockcheck_stats *stats) ocfs2_block_check_validate()
429 ocfs2_blockcheck_inc_check(stats); ocfs2_block_check_validate()
441 ocfs2_blockcheck_inc_failure(stats); ocfs2_block_check_validate()
453 ocfs2_blockcheck_inc_recover(stats); ocfs2_block_check_validate()
529 struct ocfs2_blockcheck_stats *stats) ocfs2_block_check_validate_bhs()
541 ocfs2_blockcheck_inc_check(stats); ocfs2_block_check_validate_bhs()
554 ocfs2_blockcheck_inc_failure(stats); ocfs2_block_check_validate_bhs()
584 ocfs2_blockcheck_inc_recover(stats); ocfs2_block_check_validate_bhs()
420 ocfs2_block_check_validate(void *data, size_t blocksize, struct ocfs2_block_check *bc, struct ocfs2_blockcheck_stats *stats) ocfs2_block_check_validate() argument
527 ocfs2_block_check_validate_bhs(struct buffer_head **bhs, int nr, struct ocfs2_block_check *bc, struct ocfs2_blockcheck_stats *stats) ocfs2_block_check_validate_bhs() argument
H A Dblockcheck.h59 struct ocfs2_blockcheck_stats *stats);
64 struct ocfs2_blockcheck_stats *stats);
67 int ocfs2_blockcheck_stats_debugfs_install(struct ocfs2_blockcheck_stats *stats,
69 void ocfs2_blockcheck_stats_debugfs_remove(struct ocfs2_blockcheck_stats *stats);
/linux-4.1.27/drivers/staging/rtl8192u/
H A Dr819xU_cmdpkt.c104 priv->stats.txfeedbackok++; cmpk_count_txstatistic()
105 priv->stats.txoktotal++; cmpk_count_txstatistic()
106 priv->stats.txokbytestotal += pstx_fb->pkt_length; cmpk_count_txstatistic()
107 priv->stats.txokinperiod++; cmpk_count_txstatistic()
111 priv->stats.txmulticast++; cmpk_count_txstatistic()
112 priv->stats.txbytesmulticast += pstx_fb->pkt_length; cmpk_count_txstatistic()
114 priv->stats.txbroadcast++; cmpk_count_txstatistic()
115 priv->stats.txbytesbroadcast += pstx_fb->pkt_length; cmpk_count_txstatistic()
117 priv->stats.txunicast++; cmpk_count_txstatistic()
118 priv->stats.txbytesunicast += pstx_fb->pkt_length; cmpk_count_txstatistic()
121 priv->stats.txfeedbackfail++; cmpk_count_txstatistic()
122 priv->stats.txerrtotal++; cmpk_count_txstatistic()
123 priv->stats.txerrbytestotal += pstx_fb->pkt_length; cmpk_count_txstatistic()
127 priv->stats.txerrmulticast++; cmpk_count_txstatistic()
129 priv->stats.txerrbroadcast++; cmpk_count_txstatistic()
131 priv->stats.txerrunicast++; cmpk_count_txstatistic()
134 priv->stats.txretrycount += pstx_fb->retry_cnt; cmpk_count_txstatistic()
135 priv->stats.txfeedbackretry += pstx_fb->retry_cnt; cmpk_count_txstatistic()
167 priv->stats.txfeedback++; cmpk_handle_tx_feedback()
256 priv->stats.txbeaconokint++; cmpk_handle_interrupt_status()
259 priv->stats.txbeaconerr++; cmpk_handle_interrupt_status()
352 priv->stats.txfeedbackok += pstx_status->txok; cmpk_count_tx_status()
353 priv->stats.txoktotal += pstx_status->txok; cmpk_count_tx_status()
355 priv->stats.txfeedbackfail += pstx_status->txfail; cmpk_count_tx_status()
356 priv->stats.txerrtotal += pstx_status->txfail; cmpk_count_tx_status()
358 priv->stats.txretrycount += pstx_status->txretry; cmpk_count_tx_status()
359 priv->stats.txfeedbackretry += pstx_status->txretry; cmpk_count_tx_status()
362 priv->stats.txmulticast += pstx_status->txmcok; cmpk_count_tx_status()
363 priv->stats.txbroadcast += pstx_status->txbcok; cmpk_count_tx_status()
364 priv->stats.txunicast += pstx_status->txucok; cmpk_count_tx_status()
366 priv->stats.txerrmulticast += pstx_status->txmcfail; cmpk_count_tx_status()
367 priv->stats.txerrbroadcast += pstx_status->txbcfail; cmpk_count_tx_status()
368 priv->stats.txerrunicast += pstx_status->txucfail; cmpk_count_tx_status()
370 priv->stats.txbytesmulticast += pstx_status->txmclength; cmpk_count_tx_status()
371 priv->stats.txbytesbroadcast += pstx_status->txbclength; cmpk_count_tx_status()
372 priv->stats.txbytesunicast += pstx_status->txuclength; cmpk_count_tx_status()
374 priv->stats.last_packet_rate = pstx_status->rate; cmpk_count_tx_status()
463 priv->stats.txrate.cck[i] += ptxrate->cck[i]; cmpk_handle_tx_rate_history()
467 priv->stats.txrate.ofdm[i] += ptxrate->ofdm[i]; cmpk_handle_tx_rate_history()
470 priv->stats.txrate.ht_mcs[j][i] += ptxrate->ht_mcs[j][i]; cmpk_handle_tx_rate_history()
H A Dr8192U_core.c510 priv->stats.txviokint, proc_get_stats_tx()
511 priv->stats.txvierr, proc_get_stats_tx()
512 priv->stats.txvookint, proc_get_stats_tx()
513 priv->stats.txvoerr, proc_get_stats_tx()
514 priv->stats.txbeokint, proc_get_stats_tx()
515 priv->stats.txbeerr, proc_get_stats_tx()
516 priv->stats.txbkokint, proc_get_stats_tx()
517 priv->stats.txbkerr, proc_get_stats_tx()
518 priv->stats.txmanageokint, proc_get_stats_tx()
519 priv->stats.txmanageerr, proc_get_stats_tx()
520 priv->stats.txbeaconokint, proc_get_stats_tx()
521 priv->stats.txbeaconerr, proc_get_stats_tx()
522 priv->stats.txresumed, proc_get_stats_tx()
524 priv->stats.txoverflow, proc_get_stats_tx()
529 priv->stats.txvidrop, proc_get_stats_tx()
530 priv->stats.txvodrop, proc_get_stats_tx()
531 priv->stats.txbedrop, proc_get_stats_tx()
532 priv->stats.txbkdrop, proc_get_stats_tx()
533 priv->stats.txdatapkt proc_get_stats_tx()
548 priv->stats.rxoktotal, proc_get_stats_rx()
549 priv->stats.rxstaterr, proc_get_stats_rx()
550 priv->stats.rxurberr); proc_get_stats_rx()
588 { "stats-rx", &proc_get_stats_rx },
589 { "stats-tx", &proc_get_stats_tx },
590 { "stats-ap", &proc_get_stats_ap },
885 priv->stats.rxstaterr++; rtl8192_rx_isr()
886 priv->ieee80211->stats.rx_errors++; rtl8192_rx_isr()
1018 priv->stats.txoktotal++; rtl8192_tx_isr()
1020 priv->stats.txbytesunicast += (skb->len - priv->ieee80211->tx_headroom); rtl8192_tx_isr()
1022 priv->ieee80211->stats.tx_errors++; rtl8192_tx_isr()
2525 memset(&(priv->stats), 0, sizeof(struct Stats)); rtl8192_init()
2865 return &priv->ieee80211->stats; rtl8192_stats()
3669 struct ieee80211_rx_stats *stats) UpdateRxPktTimeStamp8190()
3673 if (stats->bIsAMPDU && !stats->bFirstMPDU) { UpdateRxPktTimeStamp8190()
3674 stats->mac_time[0] = priv->LastRxDescTSFLow; UpdateRxPktTimeStamp8190()
3675 stats->mac_time[1] = priv->LastRxDescTSFHigh; UpdateRxPktTimeStamp8190()
3677 priv->LastRxDescTSFLow = stats->mac_time[0]; UpdateRxPktTimeStamp8190()
3678 priv->LastRxDescTSFHigh = stats->mac_time[1]; UpdateRxPktTimeStamp8190()
3733 last_rssi = priv->stats.slide_signal_strength[slide_rssi_index]; rtl8192_process_phyinfo()
3734 priv->stats.slide_rssi_total -= last_rssi; rtl8192_process_phyinfo()
3736 priv->stats.slide_rssi_total += pprevious_stats->SignalStrength; rtl8192_process_phyinfo()
3738 priv->stats.slide_signal_strength[slide_rssi_index++] = pprevious_stats->SignalStrength; rtl8192_process_phyinfo()
3743 tmp_val = priv->stats.slide_rssi_total/slide_rssi_statistics; rtl8192_process_phyinfo()
3744 priv->stats.signal_strength = rtl819x_translate_todbm((u8)tmp_val); rtl8192_process_phyinfo()
3745 pcurrent_stats->rssi = priv->stats.signal_strength; rtl8192_process_phyinfo()
3763 priv->stats.num_process_phyinfo++; rtl8192_process_phyinfo()
3776 if (priv->stats.rx_rssi_percentage[rfpath] == 0) rtl8192_process_phyinfo()
3777 priv->stats.rx_rssi_percentage[rfpath] = pprevious_stats->RxMIMOSignalStrength[rfpath]; rtl8192_process_phyinfo()
3778 if (pprevious_stats->RxMIMOSignalStrength[rfpath] > priv->stats.rx_rssi_percentage[rfpath]) { rtl8192_process_phyinfo()
3779 priv->stats.rx_rssi_percentage[rfpath] = rtl8192_process_phyinfo()
3780 ((priv->stats.rx_rssi_percentage[rfpath]*(Rx_Smooth_Factor-1)) + rtl8192_process_phyinfo()
3782 priv->stats.rx_rssi_percentage[rfpath] = priv->stats.rx_rssi_percentage[rfpath] + 1; rtl8192_process_phyinfo()
3784 priv->stats.rx_rssi_percentage[rfpath] = rtl8192_process_phyinfo()
3785 ((priv->stats.rx_rssi_percentage[rfpath]*(Rx_Smooth_Factor-1)) + rtl8192_process_phyinfo()
3788 RT_TRACE(COMP_DBG, "priv->stats.rx_rssi_percentage[rfPath] = %d \n", priv->stats.rx_rssi_percentage[rfpath]); rtl8192_process_phyinfo()
3804 last_beacon_adc_pwdb = priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index]; rtl8192_process_phyinfo()
3805 priv->stats.Slide_Beacon_Total -= last_beacon_adc_pwdb; rtl8192_process_phyinfo()
3807 priv->stats.Slide_Beacon_Total += pprevious_stats->RxPWDBAll; rtl8192_process_phyinfo()
3808 priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index] = pprevious_stats->RxPWDBAll; rtl8192_process_phyinfo()
3812 pprevious_stats->RxPWDBAll = priv->stats.Slide_Beacon_Total/slide_beacon_adc_pwdb_statistics; rtl8192_process_phyinfo()
3846 last_evm = priv->stats.slide_evm[slide_evm_index]; rtl8192_process_phyinfo()
3847 priv->stats.slide_evm_total -= last_evm; rtl8192_process_phyinfo()
3850 priv->stats.slide_evm_total += pprevious_stats->SignalQuality; rtl8192_process_phyinfo()
3852 priv->stats.slide_evm[slide_evm_index++] = pprevious_stats->SignalQuality; rtl8192_process_phyinfo()
3857 tmp_val = priv->stats.slide_evm_total/slide_evm_statistics; rtl8192_process_phyinfo()
3858 priv->stats.signal_quality = tmp_val; rtl8192_process_phyinfo()
3860 priv->stats.last_signal_strength_inpercent = tmp_val; rtl8192_process_phyinfo()
3867 if (priv->stats.rx_evm_percentage[nspatial_stream] == 0) /* initialize */ rtl8192_process_phyinfo()
3868 priv->stats.rx_evm_percentage[nspatial_stream] = pprevious_stats->RxMIMOSignalQuality[nspatial_stream]; rtl8192_process_phyinfo()
3869 priv->stats.rx_evm_percentage[nspatial_stream] = rtl8192_process_phyinfo()
3870 ((priv->stats.rx_evm_percentage[nspatial_stream]* (Rx_Smooth_Factor-1)) + rtl8192_process_phyinfo()
3996 priv->stats.numqry_phystatus++; rtl8192_query_rxphystatus()
4032 priv->stats.numqry_phystatusCCK++; rtl8192_query_rxphystatus()
4098 priv->stats.numqry_phystatusHT++; rtl8192_query_rxphystatus()
4120 priv->stats.rxSNRdB[i] = (long)rx_snrX; rtl8192_query_rxphystatus()
4172 priv->stats.received_bwtype[1+prxsc->rxsc]++; rtl8192_query_rxphystatus()
4174 priv->stats.received_bwtype[0]++; rtl8192_query_rxphystatus()
4240 priv->stats.numpacket_matchbssid++; TranslateRxSignalStuff819xUsb()
4242 priv->stats.numpacket_toself++; TranslateRxSignalStuff819xUsb()
4260 * struct ieee80211_rx_stats *stats
4264 * (priv->stats.ReceivedRateHistogram[] is updated)
4270 struct ieee80211_rx_stats *stats) UpdateReceivedRateHistogramStatistics8190()
4278 if (stats->bCRC) UpdateReceivedRateHistogramStatistics8190()
4280 else if (stats->bICV) UpdateReceivedRateHistogramStatistics8190()
4283 if (stats->bShortPreamble) UpdateReceivedRateHistogramStatistics8190()
4288 switch (stats->rate) { UpdateReceivedRateHistogramStatistics8190()
4380 priv->stats.received_preamble_GI[preamble_guardinterval][rateIndex]++; UpdateReceivedRateHistogramStatistics8190()
4381 priv->stats.received_rate_histogram[0][rateIndex]++; //total UpdateReceivedRateHistogramStatistics8190()
4382 priv->stats.received_rate_histogram[rcvType][rateIndex]++; UpdateReceivedRateHistogramStatistics8190()
4387 struct ieee80211_rx_stats *stats, query_rxdesc_status()
4400 stats->Length = desc->Length; query_rxdesc_status()
4401 stats->RxDrvInfoSize = desc->RxDrvInfoSize; query_rxdesc_status()
4402 stats->RxBufShift = 0; query_rxdesc_status()
4403 stats->bICV = desc->ICV; query_rxdesc_status()
4404 stats->bCRC = desc->CRC32; query_rxdesc_status()
4405 stats->bHwError = stats->bCRC|stats->bICV; query_rxdesc_status()
4407 stats->Decrypted = !desc->SWDec; query_rxdesc_status()
4410 stats->bHwError = false; query_rxdesc_status()
4412 stats->bHwError = stats->bCRC|stats->bICV; query_rxdesc_status()
4414 if (stats->Length < 24 || stats->Length > MAX_8192U_RX_SIZE) query_rxdesc_status()
4415 stats->bHwError |= 1; query_rxdesc_status()
4421 if (stats->RxDrvInfoSize != 0) { query_rxdesc_status()
4423 stats->RxBufShift); query_rxdesc_status()
4426 if (!stats->bHwError) { query_rxdesc_status()
4433 stats->bHwError = 1; query_rxdesc_status()
4434 stats->rate = MGN_1M; //Set 1M rate by default query_rxdesc_status()
4436 stats->rate = ret_rate; query_rxdesc_status()
4439 stats->rate = 0x02; query_rxdesc_status()
4442 stats->bShortPreamble = driver_info->SPLCP; query_rxdesc_status()
4445 UpdateReceivedRateHistogramStatistics8190(dev, stats); query_rxdesc_status()
4447 stats->bIsAMPDU = (driver_info->PartAggr == 1); query_rxdesc_status()
4448 stats->bFirstMPDU = (driver_info->PartAggr == 1) && (driver_info->FirstAGGR == 1); query_rxdesc_status()
4449 stats->TimeStampLow = driver_info->TSFL; query_rxdesc_status()
4452 UpdateRxPktTimeStamp8190(dev, stats); query_rxdesc_status()
4467 if ((stats->RxBufShift + stats->RxDrvInfoSize) > 0) { query_rxdesc_status()
4468 stats->bShift = 1; query_rxdesc_status()
4469 skb_pull(skb, stats->RxBufShift + stats->RxDrvInfoSize); query_rxdesc_status()
4473 stats->RxIs40MHzPacket = driver_info->BW; query_rxdesc_status()
4474 TranslateRxSignalStuff819xUsb(skb, stats, driver_info); query_rxdesc_status()
4483 struct ieee80211_rx_stats stats = { rtl8192_rx_nomal() local
4496 query_rxdesc_status(skb, &stats, false); rtl8192_rx_nomal()
4514 if (!ieee80211_rx(priv->ieee80211, skb, &stats)) { rtl8192_rx_nomal()
4517 priv->stats.rxoktotal++; rtl8192_rx_nomal()
4519 priv->stats.rxbytesunicast += rx_pkt_len; rtl8192_rx_nomal()
4522 priv->stats.rxurberr++; rtl8192_rx_nomal()
4554 priv->stats.rxframgment++; rtl819xusb_process_received_packet()
4572 struct ieee80211_rx_stats *stats) query_rx_cmdpkt_desc_status()
4579 stats->virtual_address = (u8 *)skb->data; query_rx_cmdpkt_desc_status()
4580 stats->Length = desc->Length; query_rx_cmdpkt_desc_status()
4581 stats->RxDrvInfoSize = 0; query_rx_cmdpkt_desc_status()
4582 stats->RxBufShift = 0; query_rx_cmdpkt_desc_status()
4583 stats->packetlength = stats->Length-scrclng; query_rx_cmdpkt_desc_status()
4584 stats->fraglength = stats->packetlength; query_rx_cmdpkt_desc_status()
4585 stats->fragoffset = 0; query_rx_cmdpkt_desc_status()
4586 stats->ntotalfrag = 1; query_rx_cmdpkt_desc_status()
4595 struct ieee80211_rx_stats stats = { rtl8192_rx_cmd() local
4604 query_rx_cmdpkt_desc_status(skb, &stats); rtl8192_rx_cmd()
4612 rtl819xusb_process_received_packet(dev, &stats); rtl8192_rx_cmd()
3668 UpdateRxPktTimeStamp8190(struct net_device *dev, struct ieee80211_rx_stats *stats) UpdateRxPktTimeStamp8190() argument
4269 UpdateReceivedRateHistogramStatistics8190(struct net_device *dev, struct ieee80211_rx_stats *stats) UpdateReceivedRateHistogramStatistics8190() argument
4386 query_rxdesc_status(struct sk_buff *skb, struct ieee80211_rx_stats *stats, bool bIsRxAggrSubframe) query_rxdesc_status() argument
4571 query_rx_cmdpkt_desc_status(struct sk_buff *skb, struct ieee80211_rx_stats *stats) query_rx_cmdpkt_desc_status() argument
/linux-4.1.27/net/netrom/
H A Dnr_dev.c45 struct net_device_stats *stats = &dev->stats; nr_rx_ip() local
48 stats->rx_dropped++; nr_rx_ip()
52 stats->rx_packets++; nr_rx_ip()
53 stats->rx_bytes += skb->len; nr_rx_ip()
144 struct net_device_stats *stats = &dev->stats; nr_xmit() local
149 stats->tx_errors++; nr_xmit()
153 stats->tx_packets++; nr_xmit()
154 stats->tx_bytes += len; nr_xmit()
/linux-4.1.27/drivers/net/wireless/ath/ath6kl/
H A Dmain.c702 struct target_stats *stats = &vif->target_stats; ath6kl_update_target_stats() local
710 ath6kl_dbg(ATH6KL_DBG_TRC, "updating target stats\n"); ath6kl_update_target_stats()
712 stats->tx_pkt += le32_to_cpu(tgt_stats->stats.tx.pkt); ath6kl_update_target_stats()
713 stats->tx_byte += le32_to_cpu(tgt_stats->stats.tx.byte); ath6kl_update_target_stats()
714 stats->tx_ucast_pkt += le32_to_cpu(tgt_stats->stats.tx.ucast_pkt); ath6kl_update_target_stats()
715 stats->tx_ucast_byte += le32_to_cpu(tgt_stats->stats.tx.ucast_byte); ath6kl_update_target_stats()
716 stats->tx_mcast_pkt += le32_to_cpu(tgt_stats->stats.tx.mcast_pkt); ath6kl_update_target_stats()
717 stats->tx_mcast_byte += le32_to_cpu(tgt_stats->stats.tx.mcast_byte); ath6kl_update_target_stats()
718 stats->tx_bcast_pkt += le32_to_cpu(tgt_stats->stats.tx.bcast_pkt); ath6kl_update_target_stats()
719 stats->tx_bcast_byte += le32_to_cpu(tgt_stats->stats.tx.bcast_byte); ath6kl_update_target_stats()
720 stats->tx_rts_success_cnt += ath6kl_update_target_stats()
721 le32_to_cpu(tgt_stats->stats.tx.rts_success_cnt); ath6kl_update_target_stats()
724 stats->tx_pkt_per_ac[ac] += ath6kl_update_target_stats()
725 le32_to_cpu(tgt_stats->stats.tx.pkt_per_ac[ac]); ath6kl_update_target_stats()
727 stats->tx_err += le32_to_cpu(tgt_stats->stats.tx.err); ath6kl_update_target_stats()
728 stats->tx_fail_cnt += le32_to_cpu(tgt_stats->stats.tx.fail_cnt); ath6kl_update_target_stats()
729 stats->tx_retry_cnt += le32_to_cpu(tgt_stats->stats.tx.retry_cnt); ath6kl_update_target_stats()
730 stats->tx_mult_retry_cnt += ath6kl_update_target_stats()
731 le32_to_cpu(tgt_stats->stats.tx.mult_retry_cnt); ath6kl_update_target_stats()
732 stats->tx_rts_fail_cnt += ath6kl_update_target_stats()
733 le32_to_cpu(tgt_stats->stats.tx.rts_fail_cnt); ath6kl_update_target_stats()
735 rate = a_sle32_to_cpu(tgt_stats->stats.tx.ucast_rate); ath6kl_update_target_stats()
736 stats->tx_ucast_rate = ath6kl_wmi_get_rate(ar->wmi, rate); ath6kl_update_target_stats()
738 stats->rx_pkt += le32_to_cpu(tgt_stats->stats.rx.pkt); ath6kl_update_target_stats()
739 stats->rx_byte += le32_to_cpu(tgt_stats->stats.rx.byte); ath6kl_update_target_stats()
740 stats->rx_ucast_pkt += le32_to_cpu(tgt_stats->stats.rx.ucast_pkt); ath6kl_update_target_stats()
741 stats->rx_ucast_byte += le32_to_cpu(tgt_stats->stats.rx.ucast_byte); ath6kl_update_target_stats()
742 stats->rx_mcast_pkt += le32_to_cpu(tgt_stats->stats.rx.mcast_pkt); ath6kl_update_target_stats()
743 stats->rx_mcast_byte += le32_to_cpu(tgt_stats->stats.rx.mcast_byte); ath6kl_update_target_stats()
744 stats->rx_bcast_pkt += le32_to_cpu(tgt_stats->stats.rx.bcast_pkt); ath6kl_update_target_stats()
745 stats->rx_bcast_byte += le32_to_cpu(tgt_stats->stats.rx.bcast_byte); ath6kl_update_target_stats()
746 stats->rx_frgment_pkt += le32_to_cpu(tgt_stats->stats.rx.frgment_pkt); ath6kl_update_target_stats()
747 stats->rx_err += le32_to_cpu(tgt_stats->stats.rx.err); ath6kl_update_target_stats()
748 stats->rx_crc_err += le32_to_cpu(tgt_stats->stats.rx.crc_err); ath6kl_update_target_stats()
749 stats->rx_key_cache_miss += ath6kl_update_target_stats()
750 le32_to_cpu(tgt_stats->stats.rx.key_cache_miss); ath6kl_update_target_stats()
751 stats->rx_decrypt_err += le32_to_cpu(tgt_stats->stats.rx.decrypt_err); ath6kl_update_target_stats()
752 stats->rx_dupl_frame += le32_to_cpu(tgt_stats->stats.rx.dupl_frame); ath6kl_update_target_stats()
754 rate = a_sle32_to_cpu(tgt_stats->stats.rx.ucast_rate); ath6kl_update_target_stats()
755 stats->rx_ucast_rate = ath6kl_wmi_get_rate(ar->wmi, rate); ath6kl_update_target_stats()
757 ccmp_stats = &tgt_stats->stats.tkip_ccmp_stats; ath6kl_update_target_stats()
759 stats->tkip_local_mic_fail += ath6kl_update_target_stats()
761 stats->tkip_cnter_measures_invoked += ath6kl_update_target_stats()
763 stats->tkip_fmt_err += le32_to_cpu(ccmp_stats->tkip_fmt_err); ath6kl_update_target_stats()
765 stats->ccmp_fmt_err += le32_to_cpu(ccmp_stats->ccmp_fmt_err); ath6kl_update_target_stats()
766 stats->ccmp_replays += le32_to_cpu(ccmp_stats->ccmp_replays); ath6kl_update_target_stats()
768 stats->pwr_save_fail_cnt += ath6kl_update_target_stats()
770 stats->noise_floor_calib = ath6kl_update_target_stats()
773 stats->cs_bmiss_cnt += ath6kl_update_target_stats()
775 stats->cs_low_rssi_cnt += ath6kl_update_target_stats()
777 stats->cs_connect_cnt += ath6kl_update_target_stats()
779 stats->cs_discon_cnt += ath6kl_update_target_stats()
782 stats->cs_ave_beacon_rssi = ath6kl_update_target_stats()
785 stats->cs_last_roam_msec = ath6kl_update_target_stats()
787 stats->cs_snr = tgt_stats->cserv_stats.cs_snr; ath6kl_update_target_stats()
788 stats->cs_rssi = a_sle16_to_cpu(tgt_stats->cserv_stats.cs_rssi); ath6kl_update_target_stats()
790 stats->lq_val = le32_to_cpu(tgt_stats->lq_val); ath6kl_update_target_stats()
792 stats->wow_pkt_dropped += ath6kl_update_target_stats()
794 stats->wow_host_pkt_wakeups += ath6kl_update_target_stats()
796 stats->wow_host_evt_wakeups += ath6kl_update_target_stats()
798 stats->wow_evt_discarded += ath6kl_update_target_stats()
801 stats->arp_received = le32_to_cpu(tgt_stats->arp_stats.arp_received); ath6kl_update_target_stats()
802 stats->arp_replied = le32_to_cpu(tgt_stats->arp_stats.arp_replied); ath6kl_update_target_stats()
803 stats->arp_matched = le32_to_cpu(tgt_stats->arp_stats.arp_matched); ath6kl_update_target_stats()
/linux-4.1.27/net/ipv4/
H A Dip_tunnel_core.c162 /* Often modified stats are per cpu, other are shared (netdev->stats) */ ip_tunnel_get_stats64()
188 tot->multicast = dev->stats.multicast;
190 tot->rx_crc_errors = dev->stats.rx_crc_errors;
191 tot->rx_fifo_errors = dev->stats.rx_fifo_errors;
192 tot->rx_length_errors = dev->stats.rx_length_errors;
193 tot->rx_frame_errors = dev->stats.rx_frame_errors;
194 tot->rx_errors = dev->stats.rx_errors;
196 tot->tx_fifo_errors = dev->stats.tx_fifo_errors;
197 tot->tx_carrier_errors = dev->stats.tx_carrier_errors;
198 tot->tx_dropped = dev->stats.tx_dropped;
199 tot->tx_aborted_errors = dev->stats.tx_aborted_errors;
200 tot->tx_errors = dev->stats.tx_errors;
202 tot->collisions = dev->stats.collisions;
/linux-4.1.27/drivers/net/ethernet/mellanox/mlx5/core/
H A Ddebugfs.c148 struct mlx5_cmd_stats *stats; average_read() local
156 stats = filp->private_data; average_read()
157 spin_lock_irq(&stats->lock); average_read()
158 if (stats->n) average_read()
159 field = div64_u64(stats->sum, stats->n); average_read()
160 spin_unlock_irq(&stats->lock); average_read()
175 struct mlx5_cmd_stats *stats; average_write() local
177 stats = filp->private_data; average_write()
178 spin_lock_irq(&stats->lock); average_write()
179 stats->sum = 0; average_write()
180 stats->n = 0; average_write()
181 spin_unlock_irq(&stats->lock); average_write()
197 struct mlx5_cmd_stats *stats; mlx5_cmdif_debugfs_init() local
211 for (i = 0; i < ARRAY_SIZE(dev->cmd.stats); i++) { mlx5_cmdif_debugfs_init()
212 stats = &dev->cmd.stats[i]; mlx5_cmdif_debugfs_init()
215 stats->root = debugfs_create_dir(namep, *cmd); mlx5_cmdif_debugfs_init()
216 if (!stats->root) { mlx5_cmdif_debugfs_init()
223 stats->avg = debugfs_create_file("average", 0400, mlx5_cmdif_debugfs_init()
224 stats->root, stats, mlx5_cmdif_debugfs_init()
226 if (!stats->avg) { mlx5_cmdif_debugfs_init()
232 stats->count = debugfs_create_u64("n", 0400, mlx5_cmdif_debugfs_init()
233 stats->root, mlx5_cmdif_debugfs_init()
234 &stats->n); mlx5_cmdif_debugfs_init()
235 if (!stats->count) { mlx5_cmdif_debugfs_init()
/linux-4.1.27/drivers/net/wireless/rtlwifi/rtl8192se/
H A Dtrx.c33 #include "../stats.h"
181 rtlpriv->stats.rx_snr_db[i] = _rtl92se_query_rxphystatus()
260 bool rtl92se_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats, rtl92se_rx_query_desc() argument
268 stats->length = (u16)GET_RX_STATUS_DESC_PKT_LEN(pdesc); rtl92se_rx_query_desc()
269 stats->rx_drvinfo_size = (u8)GET_RX_STATUS_DESC_DRVINFO_SIZE(pdesc) * 8; rtl92se_rx_query_desc()
270 stats->rx_bufshift = (u8)(GET_RX_STATUS_DESC_SHIFT(pdesc) & 0x03); rtl92se_rx_query_desc()
271 stats->icv = (u16)GET_RX_STATUS_DESC_ICV(pdesc); rtl92se_rx_query_desc()
272 stats->crc = (u16)GET_RX_STATUS_DESC_CRC32(pdesc); rtl92se_rx_query_desc()
273 stats->hwerror = (u16)(stats->crc | stats->icv); rtl92se_rx_query_desc()
274 stats->decrypted = !GET_RX_STATUS_DESC_SWDEC(pdesc); rtl92se_rx_query_desc()
276 stats->rate = (u8)GET_RX_STATUS_DESC_RX_MCS(pdesc); rtl92se_rx_query_desc()
277 stats->shortpreamble = (u16)GET_RX_STATUS_DESC_SPLCP(pdesc); rtl92se_rx_query_desc()
278 stats->isampdu = (bool)(GET_RX_STATUS_DESC_PAGGR(pdesc) == 1); rtl92se_rx_query_desc()
279 stats->isfirst_ampdu = (bool) ((GET_RX_STATUS_DESC_PAGGR(pdesc) == 1) rtl92se_rx_query_desc()
281 stats->timestamp_low = GET_RX_STATUS_DESC_TSFL(pdesc); rtl92se_rx_query_desc()
282 stats->rx_is40Mhzpacket = (bool)GET_RX_STATUS_DESC_BW(pdesc); rtl92se_rx_query_desc()
283 stats->is_ht = (bool)GET_RX_STATUS_DESC_RX_HT(pdesc); rtl92se_rx_query_desc()
284 stats->is_cck = SE_RX_HAL_IS_CCK_RATE(pdesc); rtl92se_rx_query_desc()
286 if (stats->hwerror) rtl92se_rx_query_desc()
292 if (stats->crc) rtl92se_rx_query_desc()
295 if (stats->rx_is40Mhzpacket) rtl92se_rx_query_desc()
298 if (stats->is_ht) rtl92se_rx_query_desc()
303 /* hw will set stats->decrypted true, if it finds the rtl92se_rx_query_desc()
306 * for IEEE80211w but still set stats->decrypted rtl92se_rx_query_desc()
310 if (stats->decrypted) { rtl92se_rx_query_desc()
312 stats->rx_drvinfo_size + stats->rx_bufshift); rtl92se_rx_query_desc()
321 rx_status->rate_idx = rtlwifi_rate_mapping(hw, stats->is_ht, rtl92se_rx_query_desc()
322 false, stats->rate); rtl92se_rx_query_desc()
324 rx_status->mactime = stats->timestamp_low; rtl92se_rx_query_desc()
327 stats->rx_bufshift); rtl92se_rx_query_desc()
328 _rtl92se_translate_rx_signal_stuff(hw, skb, stats, pdesc, rtl92se_rx_query_desc()
332 /*rx_status->qual = stats->signal; */ rtl92se_rx_query_desc()
333 rx_status->signal = stats->recvsignalpower + 10; rtl92se_rx_query_desc()
/linux-4.1.27/drivers/net/wireless/ath/ath9k/
H A Ddebug.c32 sc->debug.stats.istats.sync_cause_all++; ath9k_debug_sync_cause()
34 sc->debug.stats.istats.sync_rtc_irq++; ath9k_debug_sync_cause()
36 sc->debug.stats.istats.sync_mac_irq++; ath9k_debug_sync_cause()
38 sc->debug.stats.istats.eeprom_illegal_access++; ath9k_debug_sync_cause()
40 sc->debug.stats.istats.apb_timeout++; ath9k_debug_sync_cause()
42 sc->debug.stats.istats.pci_mode_conflict++; ath9k_debug_sync_cause()
44 sc->debug.stats.istats.host1_fatal++; ath9k_debug_sync_cause()
46 sc->debug.stats.istats.host1_perr++; ath9k_debug_sync_cause()
48 sc->debug.stats.istats.trcv_fifo_perr++; ath9k_debug_sync_cause()
50 sc->debug.stats.istats.radm_cpl_ep++; ath9k_debug_sync_cause()
52 sc->debug.stats.istats.radm_cpl_dllp_abort++; ath9k_debug_sync_cause()
54 sc->debug.stats.istats.radm_cpl_tlp_abort++; ath9k_debug_sync_cause()
56 sc->debug.stats.istats.radm_cpl_ecrc_err++; ath9k_debug_sync_cause()
58 sc->debug.stats.istats.radm_cpl_timeout++; ath9k_debug_sync_cause()
60 sc->debug.stats.istats.local_timeout++; ath9k_debug_sync_cause()
62 sc->debug.stats.istats.pm_access++; ath9k_debug_sync_cause()
64 sc->debug.stats.istats.mac_awake++; ath9k_debug_sync_cause()
66 sc->debug.stats.istats.mac_asleep++; ath9k_debug_sync_cause()
68 sc->debug.stats.istats.mac_sleep_access++; ath9k_debug_sync_cause()
147 { "ANI RESET", ah->stats.ast_ani_reset }, read_file_ani()
150 { "SPUR UP", ah->stats.ast_ani_spurup }, read_file_ani()
151 { "SPUR DOWN", ah->stats.ast_ani_spurup }, read_file_ani()
152 { "OFDM WS-DET ON", ah->stats.ast_ani_ofdmon }, read_file_ani()
153 { "OFDM WS-DET OFF", ah->stats.ast_ani_ofdmoff }, read_file_ani()
154 { "MRC-CCK ON", ah->stats.ast_ani_ccklow }, read_file_ani()
155 { "MRC-CCK OFF", ah->stats.ast_ani_cckhigh }, read_file_ani()
156 { "FIR-STEP UP", ah->stats.ast_ani_stepup }, read_file_ani()
157 { "FIR-STEP DOWN", ah->stats.ast_ani_stepdown }, read_file_ani()
158 { "INV LISTENTIME", ah->stats.ast_ani_lneg_or_lzero }, read_file_ani()
159 { "OFDM ERRORS", ah->stats.ast_ani_ofdmerrs }, read_file_ani()
160 { "CCK ERRORS", ah->stats.ast_ani_cckerrs }, read_file_ani()
289 struct ath_antenna_stats *as_main = &sc->debug.stats.ant_stats[ANT_MAIN]; ath9k_debug_stat_ant()
290 struct ath_antenna_stats *as_alt = &sc->debug.stats.ant_stats[ANT_ALT]; ath9k_debug_stat_ant()
306 struct ath_antenna_stats *as_main = &sc->debug.stats.ant_stats[ANT_MAIN]; read_file_antenna_diversity()
307 struct ath_antenna_stats *as_alt = &sc->debug.stats.ant_stats[ANT_ALT]; read_file_antenna_diversity()
477 sc->debug.stats.istats.total++; ath_debug_stat_interrupt()
480 sc->debug.stats.istats.rxlp++; ath_debug_stat_interrupt()
482 sc->debug.stats.istats.rxhp++; ath_debug_stat_interrupt()
484 sc->debug.stats.istats.bb_watchdog++; ath_debug_stat_interrupt()
487 sc->debug.stats.istats.rxok++; ath_debug_stat_interrupt()
490 sc->debug.stats.istats.rxeol++; ath_debug_stat_interrupt()
492 sc->debug.stats.istats.rxorn++; ath_debug_stat_interrupt()
494 sc->debug.stats.istats.txok++; ath_debug_stat_interrupt()
496 sc->debug.stats.istats.txurn++; ath_debug_stat_interrupt()
498 sc->debug.stats.istats.rxphyerr++; ath_debug_stat_interrupt()
500 sc->debug.stats.istats.rx_keycache_miss++; ath_debug_stat_interrupt()
502 sc->debug.stats.istats.swba++; ath_debug_stat_interrupt()
504 sc->debug.stats.istats.bmiss++; ath_debug_stat_interrupt()
506 sc->debug.stats.istats.bnr++; ath_debug_stat_interrupt()
508 sc->debug.stats.istats.cst++; ath_debug_stat_interrupt()
510 sc->debug.stats.istats.gtt++; ath_debug_stat_interrupt()
512 sc->debug.stats.istats.tim++; ath_debug_stat_interrupt()
514 sc->debug.stats.istats.cabend++; ath_debug_stat_interrupt()
516 sc->debug.stats.istats.dtimsync++; ath_debug_stat_interrupt()
518 sc->debug.stats.istats.dtim++; ath_debug_stat_interrupt()
520 sc->debug.stats.istats.tsfoor++; ath_debug_stat_interrupt()
522 sc->debug.stats.istats.mci++; ath_debug_stat_interrupt()
524 sc->debug.stats.istats.gen_timer++; ath_debug_stat_interrupt()
535 sc->debug.stats.istats.s); \ read_file_interrupt()
566 seq_puts(file, "SYNC_CAUSE stats:\n"); read_file_interrupt()
776 sc->debug.stats.reset[i]); read_file_reset()
789 sc->debug.stats.txstats[qnum].tx_bytes_all += bf->bf_mpdu->len; ath_debug_stat_tx()
821 ath9k_cmn_debug_stat_rx(&sc->debug.stats.rxstats, rs); ath_debug_stat_rx()
1176 /* Ethtool support for get-stats */
1235 data[i++] = sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BE)].elem; \
1236 data[i++] = sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BK)].elem; \
1237 data[i++] = sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VI)].elem; \
1238 data[i++] = sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VO)].elem; \
1243 data[i++] = sc->debug.stats.rxstats.elem; \
1248 struct ethtool_stats *stats, u64 *data) ath9k_get_et_stats()
1253 data[i++] = (sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BE)].tx_pkts_all + ath9k_get_et_stats()
1254 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BK)].tx_pkts_all + ath9k_get_et_stats()
1255 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VI)].tx_pkts_all + ath9k_get_et_stats()
1256 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VO)].tx_pkts_all); ath9k_get_et_stats()
1257 data[i++] = (sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BE)].tx_bytes_all + ath9k_get_et_stats()
1258 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BK)].tx_bytes_all + ath9k_get_et_stats()
1259 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VI)].tx_bytes_all + ath9k_get_et_stats()
1260 sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VO)].tx_bytes_all); ath9k_get_et_stats()
1342 ath9k_cmn_debug_recv(sc->debug.debugfs_phy, &sc->debug.stats.rxstats); ath9k_init_debug()
1343 ath9k_cmn_debug_phy_err(sc->debug.debugfs_phy, &sc->debug.stats.rxstats); ath9k_init_debug()
1246 ath9k_get_et_stats(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ethtool_stats *stats, u64 *data) ath9k_get_et_stats() argument
H A Ddfs_debug.h41 /* pulse stats */
51 /* pattern detection stats */
58 #define DFS_STAT_INC(sc, c) (sc->debug.stats.dfs_stats.c++)
H A Ddebug.h28 #define TX_STAT_INC(q, c) sc->debug.stats.txstats[q].c++
29 #define RX_STAT_INC(c) (sc->debug.stats.rxstats.c++)
30 #define RESET_STAT_INC(sc, type) sc->debug.stats.reset[type]++
31 #define ANT_STAT_INC(i, c) sc->debug.stats.ant_stats[i].c++
32 #define ANT_LNA_INC(i, c) sc->debug.stats.ant_stats[i].lna_recv_cnt[c]++;
115 /* Sync-cause stats */
196 #define TXSTATS sc->debug.stats.txstats
246 struct ath_stats stats; member in struct:ath9k_debug
261 struct ethtool_stats *stats, u64 *data);
/linux-4.1.27/include/target/iscsi/
H A Discsi_target_stat.h24 /* iSCSI session error stats */
41 /* iSCSI login stats */
57 /* iSCSI logout stats */
/linux-4.1.27/net/netfilter/ipvs/
H A Dip_vs_est.c61 struct ip_vs_cpu_stats __percpu *stats) ip_vs_read_cpu_stats()
67 struct ip_vs_cpu_stats *s = per_cpu_ptr(stats, i); for_each_possible_cpu()
143 void ip_vs_start_estimator(struct net *net, struct ip_vs_stats *stats) ip_vs_start_estimator() argument
146 struct ip_vs_estimator *est = &stats->est; ip_vs_start_estimator()
155 void ip_vs_stop_estimator(struct net *net, struct ip_vs_stats *stats) ip_vs_stop_estimator() argument
158 struct ip_vs_estimator *est = &stats->est; ip_vs_stop_estimator()
165 void ip_vs_zero_estimator(struct ip_vs_stats *stats) ip_vs_zero_estimator() argument
167 struct ip_vs_estimator *est = &stats->est; ip_vs_zero_estimator()
168 struct ip_vs_kstats *k = &stats->kstats; ip_vs_zero_estimator()
170 /* reset counters, caller must hold the stats->lock lock */ ip_vs_zero_estimator()
184 void ip_vs_read_estimator(struct ip_vs_kstats *dst, struct ip_vs_stats *stats) ip_vs_read_estimator() argument
186 struct ip_vs_estimator *e = &stats->est; ip_vs_read_estimator()
60 ip_vs_read_cpu_stats(struct ip_vs_kstats *sum, struct ip_vs_cpu_stats __percpu *stats) ip_vs_read_cpu_stats() argument
/linux-4.1.27/drivers/md/
H A Ddm-stats.c14 #include "dm-stats.h"
16 #define DM_MSG_PREFIX "stats"
187 void dm_stats_init(struct dm_stats *stats) dm_stats_init() argument
192 mutex_init(&stats->mutex); dm_stats_init()
193 INIT_LIST_HEAD(&stats->list); dm_stats_init()
194 stats->last = alloc_percpu(struct dm_stats_last_position); for_each_possible_cpu()
196 last = per_cpu_ptr(stats->last, cpu); for_each_possible_cpu()
202 void dm_stats_cleanup(struct dm_stats *stats) dm_stats_cleanup() argument
208 while (!list_empty(&stats->list)) { dm_stats_cleanup()
209 s = container_of(stats->list.next, struct dm_stat, list_entry); dm_stats_cleanup()
226 free_percpu(stats->last); dm_stats_cleanup()
229 static int dm_stats_create(struct dm_stats *stats, sector_t start, sector_t end, dm_stats_create() argument
312 mutex_lock(&stats->mutex);
314 list_for_each(l, &stats->list) {
330 mutex_unlock(&stats->mutex);
337 mutex_unlock(&stats->mutex);
344 static struct dm_stat *__dm_stats_find(struct dm_stats *stats, int id) __dm_stats_find() argument
348 list_for_each_entry(s, &stats->list, list_entry) { __dm_stats_find()
358 static int dm_stats_delete(struct dm_stats *stats, int id) dm_stats_delete() argument
363 mutex_lock(&stats->mutex); dm_stats_delete()
365 s = __dm_stats_find(stats, id); dm_stats_delete()
367 mutex_unlock(&stats->mutex); dm_stats_delete()
372 mutex_unlock(&stats->mutex); dm_stats_delete()
391 static int dm_stats_list(struct dm_stats *stats, const char *program, dm_stats_list() argument
403 mutex_lock(&stats->mutex); dm_stats_list()
404 list_for_each_entry(s, &stats->list, list_entry) { dm_stats_list()
415 mutex_unlock(&stats->mutex); dm_stats_list()
533 void dm_stats_account_io(struct dm_stats *stats, unsigned long bi_rw, dm_stats_account_io() argument
551 last = raw_cpu_ptr(stats->last); dm_stats_account_io()
563 list_for_each_entry_rcu(s, &stats->list, list_entry) dm_stats_account_io()
627 static int dm_stats_clear(struct dm_stats *stats, int id) dm_stats_clear() argument
631 mutex_lock(&stats->mutex); dm_stats_clear()
633 s = __dm_stats_find(stats, id); dm_stats_clear()
635 mutex_unlock(&stats->mutex); dm_stats_clear()
641 mutex_unlock(&stats->mutex); dm_stats_clear()
666 static int dm_stats_print(struct dm_stats *stats, int id, dm_stats_print() argument
682 mutex_lock(&stats->mutex); dm_stats_print()
684 s = __dm_stats_find(stats, id); dm_stats_print()
686 mutex_unlock(&stats->mutex); dm_stats_print()
734 mutex_unlock(&stats->mutex); dm_stats_print()
739 static int dm_stats_set_aux(struct dm_stats *stats, int id, const char *aux_data) dm_stats_set_aux() argument
744 mutex_lock(&stats->mutex); dm_stats_set_aux()
746 s = __dm_stats_find(stats, id); dm_stats_set_aux()
748 mutex_unlock(&stats->mutex); dm_stats_set_aux()
754 mutex_unlock(&stats->mutex); dm_stats_set_aux()
761 mutex_unlock(&stats->mutex); dm_stats_set_aux()
959 return 2; /* this wasn't a stats message */ dm_stats_message()
H A Ddm-stats.h31 void dm_stats_account_io(struct dm_stats *stats, unsigned long bi_rw,
/linux-4.1.27/include/uapi/linux/
H A Datm_idt77105.h25 #define IDT77105_GETSTAT _IOW('a',ATMIOC_PHYPRV+2,struct atmif_sioc) /* get stats */
26 #define IDT77105_GETSTATZ _IOW('a',ATMIOC_PHYPRV+3,struct atmif_sioc) /* get stats and zero */
H A Dif_cablemodem.h15 #define SIOCGCMSTATS (SIOCDEVPRIVATE+0) /* get cable modem stats */
/linux-4.1.27/fs/cachefiles/
H A Dbind.c88 struct kstatfs stats; cachefiles_daemon_add_cache() local
146 ret = vfs_statfs(&path, &stats); cachefiles_daemon_add_cache()
151 if (stats.f_bsize <= 0) cachefiles_daemon_add_cache()
155 if (stats.f_bsize > PAGE_SIZE) cachefiles_daemon_add_cache()
158 cache->bsize = stats.f_bsize; cachefiles_daemon_add_cache()
160 if (stats.f_bsize < PAGE_SIZE) cachefiles_daemon_add_cache()
161 cache->bshift = PAGE_SHIFT - ilog2(stats.f_bsize); cachefiles_daemon_add_cache()
167 (unsigned long long) stats.f_blocks, cachefiles_daemon_add_cache()
168 (unsigned long long) stats.f_bavail); cachefiles_daemon_add_cache()
171 do_div(stats.f_files, 100); cachefiles_daemon_add_cache()
172 cache->fstop = stats.f_files * cache->fstop_percent; cachefiles_daemon_add_cache()
173 cache->fcull = stats.f_files * cache->fcull_percent; cachefiles_daemon_add_cache()
174 cache->frun = stats.f_files * cache->frun_percent; cachefiles_daemon_add_cache()
181 stats.f_blocks >>= cache->bshift; cachefiles_daemon_add_cache()
182 do_div(stats.f_blocks, 100); cachefiles_daemon_add_cache()
183 cache->bstop = stats.f_blocks * cache->bstop_percent; cachefiles_daemon_add_cache()
184 cache->bcull = stats.f_blocks * cache->bcull_percent; cachefiles_daemon_add_cache()
185 cache->brun = stats.f_blocks * cache->brun_percent; cachefiles_daemon_add_cache()
H A Ddaemon.c677 struct kstatfs stats; cachefiles_has_space() local
694 memset(&stats, 0, sizeof(stats)); cachefiles_has_space()
696 ret = vfs_statfs(&path, &stats); cachefiles_has_space()
704 stats.f_bavail >>= cache->bshift; cachefiles_has_space()
707 // (unsigned long long) stats.f_ffree, cachefiles_has_space()
708 // (unsigned long long) stats.f_bavail); cachefiles_has_space()
711 if (stats.f_ffree > fnr) cachefiles_has_space()
712 stats.f_ffree -= fnr; cachefiles_has_space()
714 stats.f_ffree = 0; cachefiles_has_space()
716 if (stats.f_bavail > bnr) cachefiles_has_space()
717 stats.f_bavail -= bnr; cachefiles_has_space()
719 stats.f_bavail = 0; cachefiles_has_space()
722 if (stats.f_ffree < cache->fstop || cachefiles_has_space()
723 stats.f_bavail < cache->bstop) cachefiles_has_space()
727 if (stats.f_ffree < cache->fcull || cachefiles_has_space()
728 stats.f_bavail < cache->bcull) cachefiles_has_space()
732 stats.f_ffree >= cache->frun && cachefiles_has_space()
733 stats.f_bavail >= cache->brun && cachefiles_has_space()
/linux-4.1.27/drivers/media/dvb-frontends/
H A Dtc90522.c208 struct dtv_fe_stats *stats; tc90522s_get_frontend() local
248 stats = &c->strength; tc90522s_get_frontend()
249 stats->len = 0; tc90522s_get_frontend()
257 stats = &c->cnr; tc90522s_get_frontend()
258 stats->len = 1; tc90522s_get_frontend()
259 stats->stat[0].scale = FE_SCALE_NOT_AVAILABLE; tc90522s_get_frontend()
284 stats->stat[0].svalue = cn >> 3; tc90522s_get_frontend()
285 stats->stat[0].scale = FE_SCALE_DECIBEL; tc90522s_get_frontend()
289 stats = &c->post_bit_error; tc90522s_get_frontend()
290 memset(stats, 0, sizeof(*stats)); tc90522s_get_frontend()
291 stats->len = layers; tc90522s_get_frontend()
295 stats->stat[i].scale = FE_SCALE_NOT_AVAILABLE; tc90522s_get_frontend()
298 stats->stat[i].scale = FE_SCALE_COUNTER; tc90522s_get_frontend()
299 stats->stat[i].uvalue = val[i * 5] << 16 tc90522s_get_frontend()
303 stats = &c->post_bit_count; tc90522s_get_frontend()
304 memset(stats, 0, sizeof(*stats)); tc90522s_get_frontend()
305 stats->len = layers; tc90522s_get_frontend()
308 stats->stat[i].scale = FE_SCALE_NOT_AVAILABLE; tc90522s_get_frontend()
311 stats->stat[i].scale = FE_SCALE_COUNTER; tc90522s_get_frontend()
312 stats->stat[i].uvalue = tc90522s_get_frontend()
314 stats->stat[i].uvalue *= 204 * 8; tc90522s_get_frontend()
341 struct dtv_fe_stats *stats; tc90522t_get_frontend() local
407 stats = &c->strength; tc90522t_get_frontend()
408 stats->len = 0; tc90522t_get_frontend()
416 stats = &c->cnr; tc90522t_get_frontend()
417 stats->len = 1; tc90522t_get_frontend()
418 stats->stat[0].scale = FE_SCALE_NOT_AVAILABLE; tc90522t_get_frontend()
445 stats->stat[0].svalue = cn >> 3; tc90522t_get_frontend()
446 stats->stat[0].scale = FE_SCALE_DECIBEL; tc90522t_get_frontend()
450 stats = &c->post_bit_error; tc90522t_get_frontend()
451 memset(stats, 0, sizeof(*stats)); tc90522t_get_frontend()
452 stats->len = layers; tc90522t_get_frontend()
456 stats->stat[i].scale = FE_SCALE_NOT_AVAILABLE; tc90522t_get_frontend()
459 stats->stat[i].scale = FE_SCALE_COUNTER; tc90522t_get_frontend()
460 stats->stat[i].uvalue = val[i * 3] << 16 tc90522t_get_frontend()
464 stats = &c->post_bit_count; tc90522t_get_frontend()
465 memset(stats, 0, sizeof(*stats)); tc90522t_get_frontend()
466 stats->len = layers; tc90522t_get_frontend()
469 stats->stat[i].scale = FE_SCALE_NOT_AVAILABLE; tc90522t_get_frontend()
472 stats->stat[i].scale = FE_SCALE_COUNTER; tc90522t_get_frontend()
473 stats->stat[i].uvalue = tc90522t_get_frontend()
475 stats->stat[i].uvalue *= 204 * 8; tc90522t_get_frontend()
/linux-4.1.27/drivers/cpuidle/governors/
H A Dladder.c37 } stats; member in struct:ladder_device_state
56 ldev->states[old_idx].stats.promotion_count = 0; ladder_do_selection()
57 ldev->states[old_idx].stats.demotion_count = 0; ladder_do_selection()
90 last_state->stats.promotion_count++; ladder_select_state()
91 last_state->stats.demotion_count = 0; ladder_select_state()
92 if (last_state->stats.promotion_count >= last_state->threshold.promotion_count) { ladder_select_state()
115 last_state->stats.demotion_count++; ladder_select_state()
116 last_state->stats.promotion_count = 0; ladder_select_state()
117 if (last_state->stats.demotion_count >= last_state->threshold.demotion_count) { ladder_select_state()
146 lstate->stats.promotion_count = 0; ladder_enable_device()
147 lstate->stats.demotion_count = 0; ladder_enable_device()
/linux-4.1.27/drivers/staging/lustre/lustre/include/
H A Dlprocfs_status.h155 * for irq context counter, i.e. stats with
176 LPROCFS_STATS_FLAG_NOPERCPU = 0x0001, /* stats have no percpu
197 /* Lock used when there are no percpu stats areas; For percpu stats,
383 extern int lprocfs_stats_alloc_one(struct lprocfs_stats *stats,
389 static inline int lprocfs_stats_lock(struct lprocfs_stats *stats, int opc, lprocfs_stats_lock() argument
399 if (stats->ls_flags & LPROCFS_STATS_FLAG_NOPERCPU) { lprocfs_stats_lock()
400 if (stats->ls_flags & LPROCFS_STATS_FLAG_IRQ_SAFE) lprocfs_stats_lock()
401 spin_lock_irqsave(&stats->ls_lock, *flags); lprocfs_stats_lock()
403 spin_lock(&stats->ls_lock); lprocfs_stats_lock()
408 if (unlikely(stats->ls_percpu[cpuid] == NULL)) { lprocfs_stats_lock()
409 rc = lprocfs_stats_alloc_one(stats, cpuid); lprocfs_stats_lock()
419 if (stats->ls_flags & LPROCFS_STATS_FLAG_NOPERCPU) { lprocfs_stats_lock()
420 if (stats->ls_flags & LPROCFS_STATS_FLAG_IRQ_SAFE) lprocfs_stats_lock()
421 spin_lock_irqsave(&stats->ls_lock, *flags); lprocfs_stats_lock()
423 spin_lock(&stats->ls_lock); lprocfs_stats_lock()
426 return stats->ls_biggest_alloc_num; lprocfs_stats_lock()
431 static inline void lprocfs_stats_unlock(struct lprocfs_stats *stats, int opc, lprocfs_stats_unlock() argument
439 if (stats->ls_flags & LPROCFS_STATS_FLAG_NOPERCPU) { lprocfs_stats_unlock()
440 if (stats->ls_flags & LPROCFS_STATS_FLAG_IRQ_SAFE) { lprocfs_stats_unlock()
441 spin_unlock_irqrestore(&stats->ls_lock, lprocfs_stats_unlock()
444 spin_unlock(&stats->ls_lock); lprocfs_stats_unlock()
452 if (stats->ls_flags & LPROCFS_STATS_FLAG_NOPERCPU) { lprocfs_stats_unlock()
453 if (stats->ls_flags & LPROCFS_STATS_FLAG_IRQ_SAFE) { lprocfs_stats_unlock()
454 spin_unlock_irqrestore(&stats->ls_lock, lprocfs_stats_unlock()
457 spin_unlock(&stats->ls_lock); lprocfs_stats_unlock()
465 lprocfs_stats_counter_size(struct lprocfs_stats *stats) lprocfs_stats_counter_size() argument
469 percpusize = offsetof(struct lprocfs_percpu, lp_cntr[stats->ls_num]); lprocfs_stats_counter_size()
471 /* irq safe stats need lc_array_sum[1] */ lprocfs_stats_counter_size()
472 if ((stats->ls_flags & LPROCFS_STATS_FLAG_IRQ_SAFE) != 0) lprocfs_stats_counter_size()
473 percpusize += stats->ls_num * sizeof(__s64); lprocfs_stats_counter_size()
475 if ((stats->ls_flags & LPROCFS_STATS_FLAG_NOPERCPU) == 0) lprocfs_stats_counter_size()
482 lprocfs_stats_counter_get(struct lprocfs_stats *stats, unsigned int cpuid, lprocfs_stats_counter_get() argument
487 cntr = &stats->ls_percpu[cpuid]->lp_cntr[index]; lprocfs_stats_counter_get()
489 if ((stats->ls_flags & LPROCFS_STATS_FLAG_IRQ_SAFE) != 0) lprocfs_stats_counter_get()
502 extern void lprocfs_counter_add(struct lprocfs_stats *stats, int idx,
504 extern void lprocfs_counter_sub(struct lprocfs_stats *stats, int idx,
507 #define lprocfs_counter_incr(stats, idx) \
508 lprocfs_counter_add(stats, idx, 1)
509 #define lprocfs_counter_decr(stats, idx) \
510 lprocfs_counter_sub(stats, idx, 1)
516 static inline __u64 lprocfs_stats_collector(struct lprocfs_stats *stats, lprocfs_stats_collector() argument
525 LASSERT(stats != NULL); lprocfs_stats_collector()
527 num_cpu = lprocfs_stats_lock(stats, LPROCFS_GET_NUM_CPU, &flags); lprocfs_stats_collector()
529 if (stats->ls_percpu[i] == NULL) lprocfs_stats_collector()
532 lprocfs_stats_counter_get(stats, i, idx), lprocfs_stats_collector()
533 &stats->ls_cnt_header[idx], stats->ls_flags, lprocfs_stats_collector()
536 lprocfs_stats_unlock(stats, LPROCFS_GET_NUM_CPU, &flags); lprocfs_stats_collector()
542 extern void lprocfs_clear_stats(struct lprocfs_stats *stats);
543 extern void lprocfs_free_stats(struct lprocfs_stats **stats);
545 struct lprocfs_stats *stats);
547 struct lprocfs_stats *stats);
553 extern void lprocfs_counter_init(struct lprocfs_stats *stats, int index,
579 struct lprocfs_stats *stats);
665 void lprocfs_stats_collect(struct lprocfs_stats *stats, int idx,
818 static inline void lprocfs_counter_add(struct lprocfs_stats *stats, lprocfs_counter_add() argument
821 static inline void lprocfs_counter_incr(struct lprocfs_stats *stats, lprocfs_counter_incr() argument
824 static inline void lprocfs_counter_sub(struct lprocfs_stats *stats, lprocfs_counter_sub() argument
827 static inline void lprocfs_counter_decr(struct lprocfs_stats *stats, lprocfs_counter_decr() argument
830 static inline void lprocfs_counter_init(struct lprocfs_stats *stats, lprocfs_counter_init() argument
843 static inline void lprocfs_clear_stats(struct lprocfs_stats *stats) lprocfs_clear_stats() argument
845 static inline void lprocfs_free_stats(struct lprocfs_stats **stats) lprocfs_free_stats() argument
849 struct lprocfs_stats *stats) lprocfs_register_stats()
852 struct lprocfs_stats *stats) lprocfs_init_ops_stats()
855 struct lprocfs_stats *stats) lprocfs_init_mps_stats()
996 void lprocfs_stats_collect(struct lprocfs_stats *stats, int idx, lprocfs_stats_collect() argument
1000 __u64 lprocfs_stats_collector(struct lprocfs_stats *stats, int idx, lprocfs_stats_collector() argument
847 lprocfs_register_stats(struct proc_dir_entry *root, const char *name, struct lprocfs_stats *stats) lprocfs_register_stats() argument
851 lprocfs_init_ops_stats(int num_private_stats, struct lprocfs_stats *stats) lprocfs_init_ops_stats() argument
854 lprocfs_init_mps_stats(int num_private_stats, struct lprocfs_stats *stats) lprocfs_init_mps_stats() argument
/linux-4.1.27/include/trace/events/
H A Djbd2.h235 struct transaction_run_stats_s *stats),
237 TP_ARGS(dev, tid, stats),
256 __entry->wait = stats->rs_wait;
257 __entry->request_delay = stats->rs_request_delay;
258 __entry->running = stats->rs_running;
259 __entry->locked = stats->rs_locked;
260 __entry->flushing = stats->rs_flushing;
261 __entry->logging = stats->rs_logging;
262 __entry->handle_count = stats->rs_handle_count;
263 __entry->blocks = stats->rs_blocks;
264 __entry->blocks_logged = stats->rs_blocks_logged;
283 struct transaction_chp_stats_s *stats),
285 TP_ARGS(dev, tid, stats),
299 __entry->chp_time = stats->cs_chp_time;
300 __entry->forced_to_close= stats->cs_forced_to_close;
301 __entry->written = stats->cs_written;
302 __entry->dropped = stats->cs_dropped;
/linux-4.1.27/kernel/locking/
H A Dlockdep_proc.c367 struct lock_class_stats stats; member in struct:lock_stat_data
372 struct lock_stat_data stats[MAX_LOCKDEP_KEYS]; member in struct:lock_stat_seq
383 nl = dl->stats.read_waittime.nr + dl->stats.write_waittime.nr; lock_stat_cmp()
384 nr = dr->stats.read_waittime.nr + dr->stats.write_waittime.nr; lock_stat_cmp()
430 struct lock_class_stats *stats; seq_stats() local
437 stats = &data->stats; seq_stats()
474 if (stats->write_holdtime.nr) { seq_stats()
475 if (stats->read_holdtime.nr) seq_stats()
480 seq_printf(m, "%14lu ", stats->bounces[bounce_contended_write]); seq_stats()
481 seq_lock_time(m, &stats->write_waittime); seq_stats()
482 seq_printf(m, " %14lu ", stats->bounces[bounce_acquired_write]); seq_stats()
483 seq_lock_time(m, &stats->write_holdtime); seq_stats()
487 if (stats->read_holdtime.nr) { seq_stats()
489 seq_printf(m, "%14lu ", stats->bounces[bounce_contended_read]); seq_stats()
490 seq_lock_time(m, &stats->read_waittime); seq_stats()
491 seq_printf(m, " %14lu ", stats->bounces[bounce_acquired_read]); seq_stats()
492 seq_lock_time(m, &stats->read_holdtime); seq_stats()
496 if (stats->read_waittime.nr + stats->write_waittime.nr == 0) seq_stats()
499 if (stats->read_holdtime.nr) seq_stats()
514 name, stats->contention_point[i], seq_stats()
529 name, stats->contending_point[i], seq_stats()
574 iter = data->stats + (*pos - 1); ls_start()
619 struct lock_stat_data *iter = data->stats; lock_stat_open()
624 iter->stats = lock_stats(class); lock_stat_open()
629 sort(data->stats, data->iter_end - data->stats, lock_stat_open()
/linux-4.1.27/drivers/net/wireless/rtlwifi/rtl8192cu/
H A Dtrx.c305 struct rtl_stats *stats, rtl92cu_rx_query_desc()
313 stats->length = (u16) GET_RX_DESC_PKT_LEN(pdesc); rtl92cu_rx_query_desc()
314 stats->rx_drvinfo_size = (u8)GET_RX_DESC_DRVINFO_SIZE(pdesc) * rtl92cu_rx_query_desc()
316 stats->rx_bufshift = (u8) (GET_RX_DESC_SHIFT(pdesc) & 0x03); rtl92cu_rx_query_desc()
317 stats->icv = (u16) GET_RX_DESC_ICV(pdesc); rtl92cu_rx_query_desc()
318 stats->crc = (u16) GET_RX_DESC_CRC32(pdesc); rtl92cu_rx_query_desc()
319 stats->hwerror = (stats->crc | stats->icv); rtl92cu_rx_query_desc()
320 stats->decrypted = !GET_RX_DESC_SWDEC(pdesc); rtl92cu_rx_query_desc()
321 stats->rate = (u8) GET_RX_DESC_RX_MCS(pdesc); rtl92cu_rx_query_desc()
322 stats->shortpreamble = (u16) GET_RX_DESC_SPLCP(pdesc); rtl92cu_rx_query_desc()
323 stats->isampdu = (bool) (GET_RX_DESC_PAGGR(pdesc) == 1); rtl92cu_rx_query_desc()
324 stats->isampdu = (bool) ((GET_RX_DESC_PAGGR(pdesc) == 1) rtl92cu_rx_query_desc()
326 stats->timestamp_low = GET_RX_DESC_TSFL(pdesc); rtl92cu_rx_query_desc()
327 stats->rx_is40Mhzpacket = (bool) GET_RX_DESC_BW(pdesc); rtl92cu_rx_query_desc()
328 stats->is_ht = (bool)GET_RX_DESC_RX_HT(pdesc); rtl92cu_rx_query_desc()
340 if (stats->decrypted) rtl92cu_rx_query_desc()
342 rx_status->rate_idx = rtlwifi_rate_mapping(hw, stats->is_ht, rtl92cu_rx_query_desc()
343 false, stats->rate); rtl92cu_rx_query_desc()
347 stats->rx_bufshift); rtl92cu_rx_query_desc()
348 rtl92c_translate_rx_signal_stuff(hw, skb, stats, p_desc, rtl92cu_rx_query_desc()
351 /*rx_status->qual = stats->signal; */ rtl92cu_rx_query_desc()
352 rx_status->signal = stats->recvsignalpower + 10; rtl92cu_rx_query_desc()
365 struct rtl_stats stats = { _rtl_rx_process() local
381 stats.length = (u16) GET_RX_DESC_PKT_LEN(rxdesc); _rtl_rx_process()
382 stats.rx_drvinfo_size = (u8)GET_RX_DESC_DRVINFO_SIZE(rxdesc) * _rtl_rx_process()
384 stats.rx_bufshift = (u8) (GET_RX_DESC_SHIFT(rxdesc) & 0x03); _rtl_rx_process()
385 stats.icv = (u16) GET_RX_DESC_ICV(rxdesc); _rtl_rx_process()
386 stats.crc = (u16) GET_RX_DESC_CRC32(rxdesc); _rtl_rx_process()
387 stats.hwerror = (stats.crc | stats.icv); _rtl_rx_process()
388 stats.decrypted = !GET_RX_DESC_SWDEC(rxdesc); _rtl_rx_process()
389 stats.rate = (u8) GET_RX_DESC_RX_MCS(rxdesc); _rtl_rx_process()
390 stats.shortpreamble = (u16) GET_RX_DESC_SPLCP(rxdesc); _rtl_rx_process()
391 stats.isampdu = (bool) ((GET_RX_DESC_PAGGR(rxdesc) == 1) _rtl_rx_process()
393 stats.timestamp_low = GET_RX_DESC_TSFL(rxdesc); _rtl_rx_process()
394 stats.rx_is40Mhzpacket = (bool) GET_RX_DESC_BW(rxdesc); _rtl_rx_process()
395 stats.is_ht = (bool)GET_RX_DESC_RX_HT(rxdesc); _rtl_rx_process()
409 rx_status->rate_idx = rtlwifi_rate_mapping(hw, stats.is_ht, _rtl_rx_process()
410 false, stats.rate); _rtl_rx_process()
414 rtl92c_translate_rx_signal_stuff(hw, skb, &stats, _rtl_rx_process()
304 rtl92cu_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats, struct ieee80211_rx_status *rx_status, u8 *pdesc, struct sk_buff *skb) rtl92cu_rx_query_desc() argument
/linux-4.1.27/net/openvswitch/
H A Dflow.c71 struct flow_stats *stats; ovs_flow_stats_update() local
75 stats = rcu_dereference(flow->stats[node]); ovs_flow_stats_update()
77 /* Check if already have node-specific stats. */ ovs_flow_stats_update()
78 if (likely(stats)) { ovs_flow_stats_update()
79 spin_lock(&stats->lock); ovs_flow_stats_update()
80 /* Mark if we write on the pre-allocated stats. */ ovs_flow_stats_update()
84 stats = rcu_dereference(flow->stats[0]); /* Pre-allocated. */ ovs_flow_stats_update()
85 spin_lock(&stats->lock); ovs_flow_stats_update()
88 * pre-allocated stats keep using them. ovs_flow_stats_update()
92 * stats, so we need to check again. If node-specific ovs_flow_stats_update()
93 * stats were already allocated, we update the pre- ovs_flow_stats_update()
94 * allocated stats as we have already locked them. ovs_flow_stats_update()
97 && likely(!rcu_access_pointer(flow->stats[node]))) { ovs_flow_stats_update()
98 /* Try to allocate node-specific stats. */ ovs_flow_stats_update()
115 rcu_assign_pointer(flow->stats[node], ovs_flow_stats_update()
124 stats->used = jiffies; ovs_flow_stats_update()
125 stats->packet_count++; ovs_flow_stats_update()
126 stats->byte_count += len; ovs_flow_stats_update()
127 stats->tcp_flags |= tcp_flags; ovs_flow_stats_update()
129 spin_unlock(&stats->lock); ovs_flow_stats_update()
144 struct flow_stats *stats = rcu_dereference_ovsl(flow->stats[node]); for_each_node() local
146 if (stats) { for_each_node()
147 /* Local CPU may write on non-local stats, so we must for_each_node()
150 spin_lock_bh(&stats->lock); for_each_node()
151 if (!*used || time_after(stats->used, *used)) for_each_node()
152 *used = stats->used; for_each_node()
153 *tcp_flags |= stats->tcp_flags; for_each_node()
154 ovs_stats->n_packets += stats->packet_count; for_each_node()
155 ovs_stats->n_bytes += stats->byte_count; for_each_node()
156 spin_unlock_bh(&stats->lock); for_each_node()
167 struct flow_stats *stats = ovsl_dereference(flow->stats[node]); for_each_node() local
169 if (stats) { for_each_node()
170 spin_lock_bh(&stats->lock); for_each_node()
171 stats->used = 0; for_each_node()
172 stats->packet_count = 0; for_each_node()
173 stats->byte_count = 0; for_each_node()
174 stats->tcp_flags = 0; for_each_node()
175 spin_unlock_bh(&stats->lock); for_each_node()
459 /* Flags are always used as part of stats */ key_extract()
H A Dvport.c282 * ovs_vport_get_stats - retrieve device stats
284 * @vport: vport from which to retrieve the stats
285 * @stats: location to store stats
287 * Retrieves transmit, receive, and error stats for the given device.
291 void ovs_vport_get_stats(struct vport *vport, struct ovs_vport_stats *stats) ovs_vport_get_stats() argument
295 memset(stats, 0, sizeof(*stats)); ovs_vport_get_stats()
297 /* We potentially have 2 sources of stats that need to be combined: ovs_vport_get_stats()
299 * set_stats() and device error stats from netdev->get_stats() (for ovs_vport_get_stats()
303 * netdev-stats can be directly read over netlink-ioctl. ovs_vport_get_stats()
306 stats->rx_errors = atomic_long_read(&vport->err_stats.rx_errors); ovs_vport_get_stats()
307 stats->tx_errors = atomic_long_read(&vport->err_stats.tx_errors); ovs_vport_get_stats()
308 stats->tx_dropped = atomic_long_read(&vport->err_stats.tx_dropped); ovs_vport_get_stats()
309 stats->rx_dropped = atomic_long_read(&vport->err_stats.rx_dropped); ovs_vport_get_stats()
323 stats->rx_bytes += local_stats.rx_bytes; for_each_possible_cpu()
324 stats->rx_packets += local_stats.rx_packets; for_each_possible_cpu()
325 stats->tx_bytes += local_stats.tx_bytes; for_each_possible_cpu()
326 stats->tx_packets += local_stats.tx_packets; for_each_possible_cpu()
474 struct pcpu_sw_netstats *stats; ovs_vport_receive() local
478 stats = this_cpu_ptr(vport->percpu_stats); ovs_vport_receive()
479 u64_stats_update_begin(&stats->syncp); ovs_vport_receive()
480 stats->rx_packets++; ovs_vport_receive()
481 stats->rx_bytes += skb->len + ovs_vport_receive()
483 u64_stats_update_end(&stats->syncp); ovs_vport_receive()
511 struct pcpu_sw_netstats *stats; ovs_vport_send() local
513 stats = this_cpu_ptr(vport->percpu_stats); ovs_vport_send()
515 u64_stats_update_begin(&stats->syncp); ovs_vport_send()
516 stats->tx_packets++; ovs_vport_send()
517 stats->tx_bytes += sent; ovs_vport_send()
518 u64_stats_update_end(&stats->syncp); ovs_vport_send()
528 * ovs_vport_record_error - indicate device error to generic stats layer
533 * If using the vport generic stats layer indicate that an error of the given
H A Dvport-internal_dev.c48 struct rtnl_link_stats64 *stats) internal_dev_get_stats()
55 /* The tx and rx stats need to be swapped because the internal_dev_get_stats()
57 stats->rx_packets = vport_stats.tx_packets; internal_dev_get_stats()
58 stats->tx_packets = vport_stats.rx_packets; internal_dev_get_stats()
59 stats->rx_bytes = vport_stats.tx_bytes; internal_dev_get_stats()
60 stats->tx_bytes = vport_stats.rx_bytes; internal_dev_get_stats()
61 stats->rx_errors = vport_stats.tx_errors; internal_dev_get_stats()
62 stats->tx_errors = vport_stats.rx_errors; internal_dev_get_stats()
63 stats->rx_dropped = vport_stats.tx_dropped; internal_dev_get_stats()
64 stats->tx_dropped = vport_stats.rx_dropped; internal_dev_get_stats()
66 return stats; internal_dev_get_stats()
47 internal_dev_get_stats(struct net_device *netdev, struct rtnl_link_stats64 *stats) internal_dev_get_stats() argument
/linux-4.1.27/drivers/misc/
H A Dvmw_balloon.c207 struct vmballoon_stats stats; member in struct:vmballoon
228 STATS_INC(b->stats.start); vmballoon_send_start()
235 STATS_INC(b->stats.start_fail); vmballoon_send_start()
266 STATS_INC(b->stats.guest_type); vmballoon_send_guest_id()
272 STATS_INC(b->stats.guest_type_fail); vmballoon_send_guest_id()
299 /* update stats */ vmballoon_send_get_target()
300 STATS_INC(b->stats.target); vmballoon_send_get_target()
309 STATS_INC(b->stats.target_fail); vmballoon_send_get_target()
328 STATS_INC(b->stats.lock); vmballoon_send_lock_page()
335 STATS_INC(b->stats.lock_fail); vmballoon_send_lock_page()
352 STATS_INC(b->stats.unlock); vmballoon_send_unlock_page()
359 STATS_INC(b->stats.unlock_fail); vmballoon_send_unlock_page()
377 STATS_INC(b->stats.free); vmballoon_pop()
420 STATS_INC(b->stats.alloc); vmballoon_reserve_page()
422 STATS_INC(b->stats.sleep_alloc); vmballoon_reserve_page()
427 STATS_INC(b->stats.alloc_fail); vmballoon_reserve_page()
429 STATS_INC(b->stats.sleep_alloc_fail); vmballoon_reserve_page()
436 STATS_INC(b->stats.refused_alloc); vmballoon_reserve_page()
478 STATS_INC(b->stats.free); vmballoon_release_page()
497 STATS_INC(b->stats.refused_free); vmballoon_release_refused_pages()
659 STATS_INC(b->stats.timer); vmballoon_work()
693 struct vmballoon_stats *stats = &b->stats; vmballoon_debug_show() local
722 stats->timer, vmballoon_debug_show()
723 stats->start, stats->start_fail, vmballoon_debug_show()
724 stats->guest_type, stats->guest_type_fail, vmballoon_debug_show()
725 stats->lock, stats->lock_fail, vmballoon_debug_show()
726 stats->unlock, stats->unlock_fail, vmballoon_debug_show()
727 stats->target, stats->target_fail, vmballoon_debug_show()
728 stats->alloc, stats->alloc_fail, vmballoon_debug_show()
729 stats->sleep_alloc, stats->sleep_alloc_fail, vmballoon_debug_show()
730 stats->free, vmballoon_debug_show()
731 stats->refused_alloc, stats->refused_free); vmballoon_debug_show()
/linux-4.1.27/drivers/net/ethernet/arc/
H A Demac_main.c156 struct net_device_stats *stats = &ndev->stats; arc_emac_tx_clean() local
170 stats->tx_errors++; arc_emac_tx_clean()
171 stats->tx_dropped++; arc_emac_tx_clean()
174 stats->tx_carrier_errors++; arc_emac_tx_clean()
177 stats->collisions++; arc_emac_tx_clean()
180 stats->tx_fifo_errors++; arc_emac_tx_clean()
182 stats->tx_packets++; arc_emac_tx_clean()
183 stats->tx_bytes += skb->len; arc_emac_tx_clean()
223 struct net_device_stats *stats = &ndev->stats; arc_emac_rx() local
248 stats->rx_errors++; arc_emac_rx()
249 stats->rx_length_errors++; arc_emac_rx()
254 stats->rx_packets++; arc_emac_rx()
255 stats->rx_bytes += pktlen; arc_emac_rx()
268 stats->rx_errors++; arc_emac_rx()
270 stats->rx_dropped++; arc_emac_rx()
283 stats->rx_errors++; arc_emac_rx()
339 struct net_device_stats *stats = &ndev->stats; arc_emac_intr() local
361 stats->rx_missed_errors += 0x100; arc_emac_intr()
362 stats->rx_errors += 0x100; arc_emac_intr()
366 stats->rx_crc_errors += 0x100; arc_emac_intr()
367 stats->rx_errors += 0x100; arc_emac_intr()
371 stats->rx_frame_errors += 0x100; arc_emac_intr()
372 stats->rx_errors += 0x100; arc_emac_intr()
376 stats->rx_over_errors += 0x100; arc_emac_intr()
377 stats->rx_errors += 0x100; arc_emac_intr()
550 struct net_device_stats *stats = &ndev->stats; arc_emac_stats() local
561 stats->rx_errors += miss; arc_emac_stats()
562 stats->rx_errors += rxcrc + rxfram + rxoflow; arc_emac_stats()
564 stats->rx_over_errors += rxoflow; arc_emac_stats()
565 stats->rx_frame_errors += rxfram; arc_emac_stats()
566 stats->rx_crc_errors += rxcrc; arc_emac_stats()
567 stats->rx_missed_errors += miss; arc_emac_stats()
569 return stats; arc_emac_stats()
586 struct net_device_stats *stats = &ndev->stats; arc_emac_tx() local
605 stats->tx_dropped++; arc_emac_tx()
606 stats->tx_errors++; arc_emac_tx()
/linux-4.1.27/arch/mips/kvm/
H A DMakefile11 interrupt.o stats.o commpage.o \
/linux-4.1.27/net/rds/
H A DMakefile3 recv.o send.o stats.o sysctl.o threads.o transport.o \
H A Dib_stats.c77 struct rds_ib_statistics stats = {0, }; rds_ib_stats_info_copy() local
88 sum = (uint64_t *)&stats; for_each_online_cpu()
89 for (i = 0; i < sizeof(stats) / sizeof(uint64_t); i++) for_each_online_cpu()
93 rds_stats_info_copy(iter, (uint64_t *)&stats, rds_ib_stat_names,
H A Diw_stats.c75 struct rds_iw_statistics stats = {0, }; rds_iw_stats_info_copy() local
86 sum = (uint64_t *)&stats; for_each_online_cpu()
87 for (i = 0; i < sizeof(stats) / sizeof(uint64_t); i++) for_each_online_cpu()
91 rds_stats_info_copy(iter, (uint64_t *)&stats, rds_iw_stat_names,
H A Dtcp_stats.c54 struct rds_tcp_statistics stats = {0, }; rds_tcp_stats_info_copy() local
65 sum = (uint64_t *)&stats; for_each_online_cpu()
66 for (i = 0; i < sizeof(stats) / sizeof(uint64_t); i++) for_each_online_cpu()
70 rds_stats_info_copy(iter, (uint64_t *)&stats, rds_tcp_stat_names,
H A Dstats.c101 * stats that we're exporting. Some are pretty implementation dependent
112 struct rds_statistics stats = {0, }; rds_stats_info() local
128 sum = (uint64_t *)&stats; for_each_online_cpu()
129 for (i = 0; i < sizeof(stats) / sizeof(uint64_t); i++) for_each_online_cpu()
133 rds_stats_info_copy(iter, (uint64_t *)&stats, rds_stat_names,
/linux-4.1.27/drivers/net/team/
H A Dteam_mode_loadbalance.c39 struct lb_stats stats; member in struct:lb_stats_info
57 } stats; member in struct:lb_priv_ex
380 lb_priv->ex->stats.info[hash].opt_inst_info = info; lb_hash_stats_init()
389 ctx->data.bin_val.ptr = &lb_priv->ex->stats.info[hash].stats; lb_hash_stats_get()
409 ctx->data.bin_val.ptr = &lb_port_priv->stats_info.stats; lb_port_stats_get()
416 memcpy(&s_info->last_stats, &s_info->stats, sizeof(struct lb_stats)); __lb_stats_info_refresh_prepare()
417 memset(&s_info->stats, 0, sizeof(struct lb_stats)); __lb_stats_info_refresh_prepare()
423 if (memcmp(&s_info->last_stats, &s_info->stats, __lb_stats_info_refresh_check()
451 struct lb_stats *stats; lb_stats_refresh() local
459 stats.refresh_dw.work); lb_stats_refresh()
465 schedule_delayed_work(&lb_priv_ex->stats.refresh_dw, 0); lb_stats_refresh()
470 s_info = &lb_priv->ex->stats.info[j]; lb_stats_refresh()
474 stats = &pcpu_stats->hash_stats[j]; for_each_possible_cpu()
475 __lb_one_cpu_stats_add(&s_info->stats, stats, for_each_possible_cpu()
488 stats = per_cpu_ptr(lb_port_priv->pcpu_stats, i); for_each_possible_cpu()
489 __lb_one_cpu_stats_add(&s_info->stats, stats, for_each_possible_cpu()
498 schedule_delayed_work(&lb_priv_ex->stats.refresh_dw,
499 (lb_priv_ex->stats.refresh_interval * HZ) / 10);
509 ctx->data.u32_val = lb_priv->ex->stats.refresh_interval; lb_stats_refresh_interval_get()
520 if (lb_priv->ex->stats.refresh_interval == interval) lb_stats_refresh_interval_set()
522 lb_priv->ex->stats.refresh_interval = interval; lb_stats_refresh_interval_set()
524 schedule_delayed_work(&lb_priv->ex->stats.refresh_dw, 0); lb_stats_refresh_interval_set()
526 cancel_delayed_work(&lb_priv->ex->stats.refresh_dw); lb_stats_refresh_interval_set()
602 INIT_DELAYED_WORK(&lb_priv->ex->stats.refresh_dw, lb_stats_refresh);
622 cancel_delayed_work_sync(&lb_priv->ex->stats.refresh_dw); lb_exit()
/linux-4.1.27/drivers/net/wireless/ti/wlcore/
H A Ddebugfs.h77 struct struct_type *stats = wl->stats.fw_stats; \
82 stats->sub.name); \
97 struct struct_type *stats = wl->stats.fw_stats; \
105 buf, i, stats->sub.name[i]); \
117 DEBUGFS_ADD(sub## _ ##name, stats)
/linux-4.1.27/net/tipc/
H A Dnetlink_compat.c414 struct nlattr *prop[], struct nlattr *stats[]) __fill_bc_link_stat()
421 nla_get_u32(stats[TIPC_NLA_STATS_RX_INFO]), __fill_bc_link_stat()
422 nla_get_u32(stats[TIPC_NLA_STATS_RX_FRAGMENTS]), __fill_bc_link_stat()
423 nla_get_u32(stats[TIPC_NLA_STATS_RX_FRAGMENTED]), __fill_bc_link_stat()
424 nla_get_u32(stats[TIPC_NLA_STATS_RX_BUNDLES]), __fill_bc_link_stat()
425 nla_get_u32(stats[TIPC_NLA_STATS_RX_BUNDLED])); __fill_bc_link_stat()
429 nla_get_u32(stats[TIPC_NLA_STATS_TX_INFO]), __fill_bc_link_stat()
430 nla_get_u32(stats[TIPC_NLA_STATS_TX_FRAGMENTS]), __fill_bc_link_stat()
431 nla_get_u32(stats[TIPC_NLA_STATS_TX_FRAGMENTED]), __fill_bc_link_stat()
432 nla_get_u32(stats[TIPC_NLA_STATS_TX_BUNDLES]), __fill_bc_link_stat()
433 nla_get_u32(stats[TIPC_NLA_STATS_TX_BUNDLED])); __fill_bc_link_stat()
436 nla_get_u32(stats[TIPC_NLA_STATS_RX_NACKS]), __fill_bc_link_stat()
437 nla_get_u32(stats[TIPC_NLA_STATS_RX_DEFERRED]), __fill_bc_link_stat()
438 nla_get_u32(stats[TIPC_NLA_STATS_DUPLICATES])); __fill_bc_link_stat()
441 nla_get_u32(stats[TIPC_NLA_STATS_TX_NACKS]), __fill_bc_link_stat()
442 nla_get_u32(stats[TIPC_NLA_STATS_TX_ACKS]), __fill_bc_link_stat()
443 nla_get_u32(stats[TIPC_NLA_STATS_RETRANSMITTED])); __fill_bc_link_stat()
447 nla_get_u32(stats[TIPC_NLA_STATS_LINK_CONGS]), __fill_bc_link_stat()
448 nla_get_u32(stats[TIPC_NLA_STATS_MAX_QUEUE]), __fill_bc_link_stat()
449 nla_get_u32(stats[TIPC_NLA_STATS_AVG_QUEUE])); __fill_bc_link_stat()
458 struct nlattr *stats[TIPC_NLA_STATS_MAX + 1]; tipc_nl_compat_link_stat_dump() local
465 nla_parse_nested(stats, TIPC_NLA_STATS_MAX, link[TIPC_NLA_LINK_STATS], tipc_nl_compat_link_stat_dump()
476 __fill_bc_link_stat(msg, prop, stats); tipc_nl_compat_link_stat_dump()
498 nla_get_u32(stats[TIPC_NLA_STATS_RX_INFO]), tipc_nl_compat_link_stat_dump()
499 nla_get_u32(stats[TIPC_NLA_STATS_RX_FRAGMENTS]), tipc_nl_compat_link_stat_dump()
500 nla_get_u32(stats[TIPC_NLA_STATS_RX_FRAGMENTED]), tipc_nl_compat_link_stat_dump()
501 nla_get_u32(stats[TIPC_NLA_STATS_RX_BUNDLES]), tipc_nl_compat_link_stat_dump()
502 nla_get_u32(stats[TIPC_NLA_STATS_RX_BUNDLED])); tipc_nl_compat_link_stat_dump()
507 nla_get_u32(stats[TIPC_NLA_STATS_TX_INFO]), tipc_nl_compat_link_stat_dump()
508 nla_get_u32(stats[TIPC_NLA_STATS_TX_FRAGMENTS]), tipc_nl_compat_link_stat_dump()
509 nla_get_u32(stats[TIPC_NLA_STATS_TX_FRAGMENTED]), tipc_nl_compat_link_stat_dump()
510 nla_get_u32(stats[TIPC_NLA_STATS_TX_BUNDLES]), tipc_nl_compat_link_stat_dump()
511 nla_get_u32(stats[TIPC_NLA_STATS_TX_BUNDLED])); tipc_nl_compat_link_stat_dump()
515 nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_CNT]), tipc_nl_compat_link_stat_dump()
516 nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_TOT]) / tipc_nl_compat_link_stat_dump()
517 nla_get_u32(stats[TIPC_NLA_STATS_MSG_PROF_TOT])); tipc_nl_compat_link_stat_dump()
521 perc(nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_P0]), tipc_nl_compat_link_stat_dump()
522 nla_get_u32(stats[TIPC_NLA_STATS_MSG_PROF_TOT])), tipc_nl_compat_link_stat_dump()
523 perc(nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_P1]), tipc_nl_compat_link_stat_dump()
524 nla_get_u32(stats[TIPC_NLA_STATS_MSG_PROF_TOT])), tipc_nl_compat_link_stat_dump()
525 perc(nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_P2]), tipc_nl_compat_link_stat_dump()
526 nla_get_u32(stats[TIPC_NLA_STATS_MSG_PROF_TOT])), tipc_nl_compat_link_stat_dump()
527 perc(nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_P3]), tipc_nl_compat_link_stat_dump()
528 nla_get_u32(stats[TIPC_NLA_STATS_MSG_PROF_TOT]))); tipc_nl_compat_link_stat_dump()
531 perc(nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_P4]), tipc_nl_compat_link_stat_dump()
532 nla_get_u32(stats[TIPC_NLA_STATS_MSG_PROF_TOT])), tipc_nl_compat_link_stat_dump()
533 perc(nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_P5]), tipc_nl_compat_link_stat_dump()
534 nla_get_u32(stats[TIPC_NLA_STATS_MSG_PROF_TOT])), tipc_nl_compat_link_stat_dump()
535 perc(nla_get_u32(stats[TIPC_NLA_STATS_MSG_LEN_P6]), tipc_nl_compat_link_stat_dump()
536 nla_get_u32(stats[TIPC_NLA_STATS_MSG_PROF_TOT]))); tipc_nl_compat_link_stat_dump()
540 nla_get_u32(stats[TIPC_NLA_STATS_RX_STATES]), tipc_nl_compat_link_stat_dump()
541 nla_get_u32(stats[TIPC_NLA_STATS_RX_PROBES]), tipc_nl_compat_link_stat_dump()
542 nla_get_u32(stats[TIPC_NLA_STATS_RX_NACKS]), tipc_nl_compat_link_stat_dump()
543 nla_get_u32(stats[TIPC_NLA_STATS_RX_DEFERRED]), tipc_nl_compat_link_stat_dump()
544 nla_get_u32(stats[TIPC_NLA_STATS_DUPLICATES])); tipc_nl_compat_link_stat_dump()
548 nla_get_u32(stats[TIPC_NLA_STATS_TX_STATES]), tipc_nl_compat_link_stat_dump()
549 nla_get_u32(stats[TIPC_NLA_STATS_TX_PROBES]), tipc_nl_compat_link_stat_dump()
550 nla_get_u32(stats[TIPC_NLA_STATS_TX_NACKS]), tipc_nl_compat_link_stat_dump()
551 nla_get_u32(stats[TIPC_NLA_STATS_TX_ACKS]), tipc_nl_compat_link_stat_dump()
552 nla_get_u32(stats[TIPC_NLA_STATS_RETRANSMITTED])); tipc_nl_compat_link_stat_dump()
556 nla_get_u32(stats[TIPC_NLA_STATS_LINK_CONGS]), tipc_nl_compat_link_stat_dump()
557 nla_get_u32(stats[TIPC_NLA_STATS_MAX_QUEUE]), tipc_nl_compat_link_stat_dump()
558 nla_get_u32(stats[TIPC_NLA_STATS_AVG_QUEUE])); tipc_nl_compat_link_stat_dump()
413 __fill_bc_link_stat(struct tipc_nl_compat_msg *msg, struct nlattr *prop[], struct nlattr *stats[]) __fill_bc_link_stat() argument
H A Dbcast.c310 tn->bcl->stats.sent_nacks++; tipc_bclink_update_link_state()
373 bcl->stats.queue_sz_counts++; tipc_bclink_xmit()
374 bcl->stats.accu_queue_sz += len; tipc_bclink_xmit()
408 tn->bcl->stats.recv_info++; bclink_accept_pkt()
417 tn->bcl->stats.sent_acks++; bclink_accept_pkt()
458 bcl->stats.recv_nacks++; tipc_bclink_rcv()
493 bcl->stats.recv_bundles++; tipc_bclink_rcv()
494 bcl->stats.recv_bundled += msg_msgcnt(msg); tipc_bclink_rcv()
512 bcl->stats.recv_fragments++; tipc_bclink_rcv()
514 bcl->stats.recv_fragmented++; tipc_bclink_rcv()
565 bcl->stats.deferred_recv++; tipc_bclink_rcv()
567 bcl->stats.duplicates++; tipc_bclink_rcv()
613 tn->bcl->stats.sent_info++; tipc_bcbearer_send()
725 struct tipc_stats *stats) __tipc_nl_add_bc_link_stat()
736 {TIPC_NLA_STATS_RX_INFO, stats->recv_info}, __tipc_nl_add_bc_link_stat()
737 {TIPC_NLA_STATS_RX_FRAGMENTS, stats->recv_fragments}, __tipc_nl_add_bc_link_stat()
738 {TIPC_NLA_STATS_RX_FRAGMENTED, stats->recv_fragmented}, __tipc_nl_add_bc_link_stat()
739 {TIPC_NLA_STATS_RX_BUNDLES, stats->recv_bundles}, __tipc_nl_add_bc_link_stat()
740 {TIPC_NLA_STATS_RX_BUNDLED, stats->recv_bundled}, __tipc_nl_add_bc_link_stat()
741 {TIPC_NLA_STATS_TX_INFO, stats->sent_info}, __tipc_nl_add_bc_link_stat()
742 {TIPC_NLA_STATS_TX_FRAGMENTS, stats->sent_fragments}, __tipc_nl_add_bc_link_stat()
743 {TIPC_NLA_STATS_TX_FRAGMENTED, stats->sent_fragmented}, __tipc_nl_add_bc_link_stat()
744 {TIPC_NLA_STATS_TX_BUNDLES, stats->sent_bundles}, __tipc_nl_add_bc_link_stat()
745 {TIPC_NLA_STATS_TX_BUNDLED, stats->sent_bundled}, __tipc_nl_add_bc_link_stat()
746 {TIPC_NLA_STATS_RX_NACKS, stats->recv_nacks}, __tipc_nl_add_bc_link_stat()
747 {TIPC_NLA_STATS_RX_DEFERRED, stats->deferred_recv}, __tipc_nl_add_bc_link_stat()
748 {TIPC_NLA_STATS_TX_NACKS, stats->sent_nacks}, __tipc_nl_add_bc_link_stat()
749 {TIPC_NLA_STATS_TX_ACKS, stats->sent_acks}, __tipc_nl_add_bc_link_stat()
750 {TIPC_NLA_STATS_RETRANSMITTED, stats->retransmitted}, __tipc_nl_add_bc_link_stat()
751 {TIPC_NLA_STATS_DUPLICATES, stats->duplicates}, __tipc_nl_add_bc_link_stat()
752 {TIPC_NLA_STATS_LINK_CONGS, stats->link_congs}, __tipc_nl_add_bc_link_stat()
753 {TIPC_NLA_STATS_MAX_QUEUE, stats->max_queue_sz}, __tipc_nl_add_bc_link_stat()
754 {TIPC_NLA_STATS_AVG_QUEUE, stats->queue_sz_counts ? __tipc_nl_add_bc_link_stat()
755 (stats->accu_queue_sz / stats->queue_sz_counts) : 0} __tipc_nl_add_bc_link_stat()
818 err = __tipc_nl_add_bc_link_stat(msg->skb, &bcl->stats); tipc_nl_add_bc_link()
848 memset(&bcl->stats, 0, sizeof(bcl->stats)); tipc_bclink_reset_stats()
724 __tipc_nl_add_bc_link_stat(struct sk_buff *skb, struct tipc_stats *stats) __tipc_nl_add_bc_link_stat() argument
/linux-4.1.27/drivers/net/can/
H A Dvcan.c72 struct net_device_stats *stats = &dev->stats; vcan_rx() local
74 stats->rx_packets++; vcan_rx()
75 stats->rx_bytes += cfd->len; vcan_rx()
87 struct net_device_stats *stats = &dev->stats; vcan_tx() local
93 stats->tx_packets++; vcan_tx()
94 stats->tx_bytes += cfd->len; vcan_tx()
107 stats->rx_packets++; vcan_tx()
108 stats->rx_bytes += cfd->len; vcan_tx()
/linux-4.1.27/drivers/net/fddi/skfp/
H A Dskfddi.c677 /* Fill the bp->stats structure with driver-maintained counters */ skfp_ctl_get_stats()
685 /* Fill the bp->stats structure with the SMT MIB object values */ skfp_ctl_get_stats()
687 memcpy(bp->stats.smt_station_id, &bp->cmd_rsp_virt->smt_mib_get.smt_station_id, sizeof(bp->cmd_rsp_virt->smt_mib_get.smt_station_id)); skfp_ctl_get_stats()
688 bp->stats.smt_op_version_id = bp->cmd_rsp_virt->smt_mib_get.smt_op_version_id; skfp_ctl_get_stats()
689 bp->stats.smt_hi_version_id = bp->cmd_rsp_virt->smt_mib_get.smt_hi_version_id; skfp_ctl_get_stats()
690 bp->stats.smt_lo_version_id = bp->cmd_rsp_virt->smt_mib_get.smt_lo_version_id; skfp_ctl_get_stats()
691 memcpy(bp->stats.smt_user_data, &bp->cmd_rsp_virt->smt_mib_get.smt_user_data, sizeof(bp->cmd_rsp_virt->smt_mib_get.smt_user_data)); skfp_ctl_get_stats()
692 bp->stats.smt_mib_version_id = bp->cmd_rsp_virt->smt_mib_get.smt_mib_version_id; skfp_ctl_get_stats()
693 bp->stats.smt_mac_cts = bp->cmd_rsp_virt->smt_mib_get.smt_mac_ct; skfp_ctl_get_stats()
694 bp->stats.smt_non_master_cts = bp->cmd_rsp_virt->smt_mib_get.smt_non_master_ct; skfp_ctl_get_stats()
695 bp->stats.smt_master_cts = bp->cmd_rsp_virt->smt_mib_get.smt_master_ct; skfp_ctl_get_stats()
696 bp->stats.smt_available_paths = bp->cmd_rsp_virt->smt_mib_get.smt_available_paths; skfp_ctl_get_stats()
697 bp->stats.smt_config_capabilities = bp->cmd_rsp_virt->smt_mib_get.smt_config_capabilities; skfp_ctl_get_stats()
698 bp->stats.smt_config_policy = bp->cmd_rsp_virt->smt_mib_get.smt_config_policy; skfp_ctl_get_stats()
699 bp->stats.smt_connection_policy = bp->cmd_rsp_virt->smt_mib_get.smt_connection_policy; skfp_ctl_get_stats()
700 bp->stats.smt_t_notify = bp->cmd_rsp_virt->smt_mib_get.smt_t_notify; skfp_ctl_get_stats()
701 bp->stats.smt_stat_rpt_policy = bp->cmd_rsp_virt->smt_mib_get.smt_stat_rpt_policy; skfp_ctl_get_stats()
702 bp->stats.smt_trace_max_expiration = bp->cmd_rsp_virt->smt_mib_get.smt_trace_max_expiration; skfp_ctl_get_stats()
703 bp->stats.smt_bypass_present = bp->cmd_rsp_virt->smt_mib_get.smt_bypass_present; skfp_ctl_get_stats()
704 bp->stats.smt_ecm_state = bp->cmd_rsp_virt->smt_mib_get.smt_ecm_state; skfp_ctl_get_stats()
705 bp->stats.smt_cf_state = bp->cmd_rsp_virt->smt_mib_get.smt_cf_state; skfp_ctl_get_stats()
706 bp->stats.smt_remote_disconnect_flag = bp->cmd_rsp_virt->smt_mib_get.smt_remote_disconnect_flag; skfp_ctl_get_stats()
707 bp->stats.smt_station_status = bp->cmd_rsp_virt->smt_mib_get.smt_station_status; skfp_ctl_get_stats()
708 bp->stats.smt_peer_wrap_flag = bp->cmd_rsp_virt->smt_mib_get.smt_peer_wrap_flag; skfp_ctl_get_stats()
709 bp->stats.smt_time_stamp = bp->cmd_rsp_virt->smt_mib_get.smt_msg_time_stamp.ls; skfp_ctl_get_stats()
710 bp->stats.smt_transition_time_stamp = bp->cmd_rsp_virt->smt_mib_get.smt_transition_time_stamp.ls; skfp_ctl_get_stats()
711 bp->stats.mac_frame_status_functions = bp->cmd_rsp_virt->smt_mib_get.mac_frame_status_functions; skfp_ctl_get_stats()
712 bp->stats.mac_t_max_capability = bp->cmd_rsp_virt->smt_mib_get.mac_t_max_capability; skfp_ctl_get_stats()
713 bp->stats.mac_tvx_capability = bp->cmd_rsp_virt->smt_mib_get.mac_tvx_capability; skfp_ctl_get_stats()
714 bp->stats.mac_available_paths = bp->cmd_rsp_virt->smt_mib_get.mac_available_paths; skfp_ctl_get_stats()
715 bp->stats.mac_current_path = bp->cmd_rsp_virt->smt_mib_get.mac_current_path; skfp_ctl_get_stats()
716 memcpy(bp->stats.mac_upstream_nbr, &bp->cmd_rsp_virt->smt_mib_get.mac_upstream_nbr, FDDI_K_ALEN); skfp_ctl_get_stats()
717 memcpy(bp->stats.mac_downstream_nbr, &bp->cmd_rsp_virt->smt_mib_get.mac_downstream_nbr, FDDI_K_ALEN); skfp_ctl_get_stats()
718 memcpy(bp->stats.mac_old_upstream_nbr, &bp->cmd_rsp_virt->smt_mib_get.mac_old_upstream_nbr, FDDI_K_ALEN); skfp_ctl_get_stats()
719 memcpy(bp->stats.mac_old_downstream_nbr, &bp->cmd_rsp_virt->smt_mib_get.mac_old_downstream_nbr, FDDI_K_ALEN); skfp_ctl_get_stats()
720 bp->stats.mac_dup_address_test = bp->cmd_rsp_virt->smt_mib_get.mac_dup_address_test; skfp_ctl_get_stats()
721 bp->stats.mac_requested_paths = bp->cmd_rsp_virt->smt_mib_get.mac_requested_paths; skfp_ctl_get_stats()
722 bp->stats.mac_downstream_port_type = bp->cmd_rsp_virt->smt_mib_get.mac_downstream_port_type; skfp_ctl_get_stats()
723 memcpy(bp->stats.mac_smt_address, &bp->cmd_rsp_virt->smt_mib_get.mac_smt_address, FDDI_K_ALEN); skfp_ctl_get_stats()
724 bp->stats.mac_t_req = bp->cmd_rsp_virt->smt_mib_get.mac_t_req; skfp_ctl_get_stats()
725 bp->stats.mac_t_neg = bp->cmd_rsp_virt->smt_mib_get.mac_t_neg; skfp_ctl_get_stats()
726 bp->stats.mac_t_max = bp->cmd_rsp_virt->smt_mib_get.mac_t_max; skfp_ctl_get_stats()
727 bp->stats.mac_tvx_value = bp->cmd_rsp_virt->smt_mib_get.mac_tvx_value; skfp_ctl_get_stats()
728 bp->stats.mac_frame_error_threshold = bp->cmd_rsp_virt->smt_mib_get.mac_frame_error_threshold; skfp_ctl_get_stats()
729 bp->stats.mac_frame_error_ratio = bp->cmd_rsp_virt->smt_mib_get.mac_frame_error_ratio; skfp_ctl_get_stats()
730 bp->stats.mac_rmt_state = bp->cmd_rsp_virt->smt_mib_get.mac_rmt_state; skfp_ctl_get_stats()
731 bp->stats.mac_da_flag = bp->cmd_rsp_virt->smt_mib_get.mac_da_flag; skfp_ctl_get_stats()
732 bp->stats.mac_una_da_flag = bp->cmd_rsp_virt->smt_mib_get.mac_unda_flag; skfp_ctl_get_stats()
733 bp->stats.mac_frame_error_flag = bp->cmd_rsp_virt->smt_mib_get.mac_frame_error_flag; skfp_ctl_get_stats()
734 bp->stats.mac_ma_unitdata_available = bp->cmd_rsp_virt->smt_mib_get.mac_ma_unitdata_available; skfp_ctl_get_stats()
735 bp->stats.mac_hardware_present = bp->cmd_rsp_virt->smt_mib_get.mac_hardware_present; skfp_ctl_get_stats()
736 bp->stats.mac_ma_unitdata_enable = bp->cmd_rsp_virt->smt_mib_get.mac_ma_unitdata_enable; skfp_ctl_get_stats()
737 bp->stats.path_tvx_lower_bound = bp->cmd_rsp_virt->smt_mib_get.path_tvx_lower_bound; skfp_ctl_get_stats()
738 bp->stats.path_t_max_lower_bound = bp->cmd_rsp_virt->smt_mib_get.path_t_max_lower_bound; skfp_ctl_get_stats()
739 bp->stats.path_max_t_req = bp->cmd_rsp_virt->smt_mib_get.path_max_t_req; skfp_ctl_get_stats()
740 memcpy(bp->stats.path_configuration, &bp->cmd_rsp_virt->smt_mib_get.path_configuration, sizeof(bp->cmd_rsp_virt->smt_mib_get.path_configuration)); skfp_ctl_get_stats()
741 bp->stats.port_my_type[0] = bp->cmd_rsp_virt->smt_mib_get.port_my_type[0]; skfp_ctl_get_stats()
742 bp->stats.port_my_type[1] = bp->cmd_rsp_virt->smt_mib_get.port_my_type[1]; skfp_ctl_get_stats()
743 bp->stats.port_neighbor_type[0] = bp->cmd_rsp_virt->smt_mib_get.port_neighbor_type[0]; skfp_ctl_get_stats()
744 bp->stats.port_neighbor_type[1] = bp->cmd_rsp_virt->smt_mib_get.port_neighbor_type[1]; skfp_ctl_get_stats()
745 bp->stats.port_connection_policies[0] = bp->cmd_rsp_virt->smt_mib_get.port_connection_policies[0]; skfp_ctl_get_stats()
746 bp->stats.port_connection_policies[1] = bp->cmd_rsp_virt->smt_mib_get.port_connection_policies[1]; skfp_ctl_get_stats()
747 bp->stats.port_mac_indicated[0] = bp->cmd_rsp_virt->smt_mib_get.port_mac_indicated[0]; skfp_ctl_get_stats()
748 bp->stats.port_mac_indicated[1] = bp->cmd_rsp_virt->smt_mib_get.port_mac_indicated[1]; skfp_ctl_get_stats()
749 bp->stats.port_current_path[0] = bp->cmd_rsp_virt->smt_mib_get.port_current_path[0]; skfp_ctl_get_stats()
750 bp->stats.port_current_path[1] = bp->cmd_rsp_virt->smt_mib_get.port_current_path[1]; skfp_ctl_get_stats()
751 memcpy(&bp->stats.port_requested_paths[0 * 3], &bp->cmd_rsp_virt->smt_mib_get.port_requested_paths[0], 3); skfp_ctl_get_stats()
752 memcpy(&bp->stats.port_requested_paths[1 * 3], &bp->cmd_rsp_virt->smt_mib_get.port_requested_paths[1], 3); skfp_ctl_get_stats()
753 bp->stats.port_mac_placement[0] = bp->cmd_rsp_virt->smt_mib_get.port_mac_placement[0]; skfp_ctl_get_stats()
754 bp->stats.port_mac_placement[1] = bp->cmd_rsp_virt->smt_mib_get.port_mac_placement[1]; skfp_ctl_get_stats()
755 bp->stats.port_available_paths[0] = bp->cmd_rsp_virt->smt_mib_get.port_available_paths[0]; skfp_ctl_get_stats()
756 bp->stats.port_available_paths[1] = bp->cmd_rsp_virt->smt_mib_get.port_available_paths[1]; skfp_ctl_get_stats()
757 bp->stats.port_pmd_class[0] = bp->cmd_rsp_virt->smt_mib_get.port_pmd_class[0]; skfp_ctl_get_stats()
758 bp->stats.port_pmd_class[1] = bp->cmd_rsp_virt->smt_mib_get.port_pmd_class[1]; skfp_ctl_get_stats()
759 bp->stats.port_connection_capabilities[0] = bp->cmd_rsp_virt->smt_mib_get.port_connection_capabilities[0]; skfp_ctl_get_stats()
760 bp->stats.port_connection_capabilities[1] = bp->cmd_rsp_virt->smt_mib_get.port_connection_capabilities[1]; skfp_ctl_get_stats()
761 bp->stats.port_bs_flag[0] = bp->cmd_rsp_virt->smt_mib_get.port_bs_flag[0]; skfp_ctl_get_stats()
762 bp->stats.port_bs_flag[1] = bp->cmd_rsp_virt->smt_mib_get.port_bs_flag[1]; skfp_ctl_get_stats()
763 bp->stats.port_ler_estimate[0] = bp->cmd_rsp_virt->smt_mib_get.port_ler_estimate[0]; skfp_ctl_get_stats()
764 bp->stats.port_ler_estimate[1] = bp->cmd_rsp_virt->smt_mib_get.port_ler_estimate[1]; skfp_ctl_get_stats()
765 bp->stats.port_ler_cutoff[0] = bp->cmd_rsp_virt->smt_mib_get.port_ler_cutoff[0]; skfp_ctl_get_stats()
766 bp->stats.port_ler_cutoff[1] = bp->cmd_rsp_virt->smt_mib_get.port_ler_cutoff[1]; skfp_ctl_get_stats()
767 bp->stats.port_ler_alarm[0] = bp->cmd_rsp_virt->smt_mib_get.port_ler_alarm[0]; skfp_ctl_get_stats()
768 bp->stats.port_ler_alarm[1] = bp->cmd_rsp_virt->smt_mib_get.port_ler_alarm[1]; skfp_ctl_get_stats()
769 bp->stats.port_connect_state[0] = bp->cmd_rsp_virt->smt_mib_get.port_connect_state[0]; skfp_ctl_get_stats()
770 bp->stats.port_connect_state[1] = bp->cmd_rsp_virt->smt_mib_get.port_connect_state[1]; skfp_ctl_get_stats()
771 bp->stats.port_pcm_state[0] = bp->cmd_rsp_virt->smt_mib_get.port_pcm_state[0]; skfp_ctl_get_stats()
772 bp->stats.port_pcm_state[1] = bp->cmd_rsp_virt->smt_mib_get.port_pcm_state[1]; skfp_ctl_get_stats()
773 bp->stats.port_pc_withhold[0] = bp->cmd_rsp_virt->smt_mib_get.port_pc_withhold[0]; skfp_ctl_get_stats()
774 bp->stats.port_pc_withhold[1] = bp->cmd_rsp_virt->smt_mib_get.port_pc_withhold[1]; skfp_ctl_get_stats()
775 bp->stats.port_ler_flag[0] = bp->cmd_rsp_virt->smt_mib_get.port_ler_flag[0]; skfp_ctl_get_stats()
776 bp->stats.port_ler_flag[1] = bp->cmd_rsp_virt->smt_mib_get.port_ler_flag[1]; skfp_ctl_get_stats()
777 bp->stats.port_hardware_present[0] = bp->cmd_rsp_virt->smt_mib_get.port_hardware_present[0]; skfp_ctl_get_stats()
778 bp->stats.port_hardware_present[1] = bp->cmd_rsp_virt->smt_mib_get.port_hardware_present[1]; skfp_ctl_get_stats()
781 /* Fill the bp->stats structure with the FDDI counter values */ skfp_ctl_get_stats()
783 bp->stats.mac_frame_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.frame_cnt.ls; skfp_ctl_get_stats()
784 bp->stats.mac_copied_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.copied_cnt.ls; skfp_ctl_get_stats()
785 bp->stats.mac_transmit_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.transmit_cnt.ls; skfp_ctl_get_stats()
786 bp->stats.mac_error_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.error_cnt.ls; skfp_ctl_get_stats()
787 bp->stats.mac_lost_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.lost_cnt.ls; skfp_ctl_get_stats()
788 bp->stats.port_lct_fail_cts[0] = bp->cmd_rsp_virt->cntrs_get.cntrs.lct_rejects[0].ls; skfp_ctl_get_stats()
789 bp->stats.port_lct_fail_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.lct_rejects[1].ls; skfp_ctl_get_stats()
790 bp->stats.port_lem_reject_cts[0] = bp->cmd_rsp_virt->cntrs_get.cntrs.lem_rejects[0].ls; skfp_ctl_get_stats()
791 bp->stats.port_lem_reject_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.lem_rejects[1].ls; skfp_ctl_get_stats()
792 bp->stats.port_lem_cts[0] = bp->cmd_rsp_virt->cntrs_get.cntrs.link_errors[0].ls; skfp_ctl_get_stats()
793 bp->stats.port_lem_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.link_errors[1].ls; skfp_ctl_get_stats()
/linux-4.1.27/drivers/net/ethernet/sfc/
H A Dsiena.c504 u64 *stats = nic_data->stats; siena_try_update_nic_stats() local
515 stats, efx->stats_buffer.addr, false); siena_try_update_nic_stats()
523 &stats[SIENA_STAT_rx_nodesc_drop_cnt]); siena_try_update_nic_stats()
524 efx_update_diff_stat(&stats[SIENA_STAT_tx_good_bytes], siena_try_update_nic_stats()
525 stats[SIENA_STAT_tx_bytes] - siena_try_update_nic_stats()
526 stats[SIENA_STAT_tx_bad_bytes]); siena_try_update_nic_stats()
527 stats[SIENA_STAT_tx_collision] = siena_try_update_nic_stats()
528 stats[SIENA_STAT_tx_single_collision] + siena_try_update_nic_stats()
529 stats[SIENA_STAT_tx_multiple_collision] + siena_try_update_nic_stats()
530 stats[SIENA_STAT_tx_excessive_collision] + siena_try_update_nic_stats()
531 stats[SIENA_STAT_tx_late_collision]; siena_try_update_nic_stats()
532 efx_update_diff_stat(&stats[SIENA_STAT_rx_good_bytes], siena_try_update_nic_stats()
533 stats[SIENA_STAT_rx_bytes] - siena_try_update_nic_stats()
534 stats[SIENA_STAT_rx_bad_bytes]); siena_try_update_nic_stats()
535 efx_update_sw_stats(efx, stats); siena_try_update_nic_stats()
543 u64 *stats = nic_data->stats; siena_update_nic_stats() local
555 memcpy(full_stats, stats, sizeof(u64) * SIENA_STAT_COUNT); siena_update_nic_stats()
558 core_stats->rx_packets = stats[SIENA_STAT_rx_packets]; siena_update_nic_stats()
559 core_stats->tx_packets = stats[SIENA_STAT_tx_packets]; siena_update_nic_stats()
560 core_stats->rx_bytes = stats[SIENA_STAT_rx_bytes]; siena_update_nic_stats()
561 core_stats->tx_bytes = stats[SIENA_STAT_tx_bytes]; siena_update_nic_stats()
562 core_stats->rx_dropped = stats[SIENA_STAT_rx_nodesc_drop_cnt] + siena_update_nic_stats()
563 stats[GENERIC_STAT_rx_nodesc_trunc] + siena_update_nic_stats()
564 stats[GENERIC_STAT_rx_noskb_drops]; siena_update_nic_stats()
565 core_stats->multicast = stats[SIENA_STAT_rx_multicast]; siena_update_nic_stats()
566 core_stats->collisions = stats[SIENA_STAT_tx_collision]; siena_update_nic_stats()
568 stats[SIENA_STAT_rx_gtjumbo] + siena_update_nic_stats()
569 stats[SIENA_STAT_rx_length_error]; siena_update_nic_stats()
570 core_stats->rx_crc_errors = stats[SIENA_STAT_rx_bad]; siena_update_nic_stats()
571 core_stats->rx_frame_errors = stats[SIENA_STAT_rx_align_error]; siena_update_nic_stats()
572 core_stats->rx_fifo_errors = stats[SIENA_STAT_rx_overflow]; siena_update_nic_stats()
574 stats[SIENA_STAT_tx_late_collision]; siena_update_nic_stats()
579 stats[SIENA_STAT_rx_symbol_error]); siena_update_nic_stats()
581 stats[SIENA_STAT_tx_bad]); siena_update_nic_stats()
763 nic_data->stats[SIENA_STAT_tx_good_bytes] = 0; siena_mcdi_poll_reboot()
764 nic_data->stats[SIENA_STAT_rx_good_bytes] = 0; siena_mcdi_poll_reboot()
/linux-4.1.27/drivers/net/ethernet/intel/ixgb/
H A Dixgb_main.c1606 return &netdev->stats; ixgb_get_stats()
1659 /* Prevent stats update while adapter is being reset */ ixgb_update_stats()
1671 /* fix up multicast stats by removing broadcasts */ ixgb_update_stats()
1675 adapter->stats.mprcl += (multi & 0xFFFFFFFF); ixgb_update_stats()
1676 adapter->stats.mprch += (multi >> 32); ixgb_update_stats()
1677 adapter->stats.bprcl += bcast_l; ixgb_update_stats()
1678 adapter->stats.bprch += bcast_h; ixgb_update_stats()
1680 adapter->stats.mprcl += IXGB_READ_REG(&adapter->hw, MPRCL); ixgb_update_stats()
1681 adapter->stats.mprch += IXGB_READ_REG(&adapter->hw, MPRCH); ixgb_update_stats()
1682 adapter->stats.bprcl += IXGB_READ_REG(&adapter->hw, BPRCL); ixgb_update_stats()
1683 adapter->stats.bprch += IXGB_READ_REG(&adapter->hw, BPRCH); ixgb_update_stats()
1685 adapter->stats.tprl += IXGB_READ_REG(&adapter->hw, TPRL); ixgb_update_stats()
1686 adapter->stats.tprh += IXGB_READ_REG(&adapter->hw, TPRH); ixgb_update_stats()
1687 adapter->stats.gprcl += IXGB_READ_REG(&adapter->hw, GPRCL); ixgb_update_stats()
1688 adapter->stats.gprch += IXGB_READ_REG(&adapter->hw, GPRCH); ixgb_update_stats()
1689 adapter->stats.uprcl += IXGB_READ_REG(&adapter->hw, UPRCL); ixgb_update_stats()
1690 adapter->stats.uprch += IXGB_READ_REG(&adapter->hw, UPRCH); ixgb_update_stats()
1691 adapter->stats.vprcl += IXGB_READ_REG(&adapter->hw, VPRCL); ixgb_update_stats()
1692 adapter->stats.vprch += IXGB_READ_REG(&adapter->hw, VPRCH); ixgb_update_stats()
1693 adapter->stats.jprcl += IXGB_READ_REG(&adapter->hw, JPRCL); ixgb_update_stats()
1694 adapter->stats.jprch += IXGB_READ_REG(&adapter->hw, JPRCH); ixgb_update_stats()
1695 adapter->stats.gorcl += IXGB_READ_REG(&adapter->hw, GORCL); ixgb_update_stats()
1696 adapter->stats.gorch += IXGB_READ_REG(&adapter->hw, GORCH); ixgb_update_stats()
1697 adapter->stats.torl += IXGB_READ_REG(&adapter->hw, TORL); ixgb_update_stats()
1698 adapter->stats.torh += IXGB_READ_REG(&adapter->hw, TORH); ixgb_update_stats()
1699 adapter->stats.rnbc += IXGB_READ_REG(&adapter->hw, RNBC); ixgb_update_stats()
1700 adapter->stats.ruc += IXGB_READ_REG(&adapter->hw, RUC); ixgb_update_stats()
1701 adapter->stats.roc += IXGB_READ_REG(&adapter->hw, ROC); ixgb_update_stats()
1702 adapter->stats.rlec += IXGB_READ_REG(&adapter->hw, RLEC); ixgb_update_stats()
1703 adapter->stats.crcerrs += IXGB_READ_REG(&adapter->hw, CRCERRS); ixgb_update_stats()
1704 adapter->stats.icbc += IXGB_READ_REG(&adapter->hw, ICBC); ixgb_update_stats()
1705 adapter->stats.ecbc += IXGB_READ_REG(&adapter->hw, ECBC); ixgb_update_stats()
1706 adapter->stats.mpc += IXGB_READ_REG(&adapter->hw, MPC); ixgb_update_stats()
1707 adapter->stats.tptl += IXGB_READ_REG(&adapter->hw, TPTL); ixgb_update_stats()
1708 adapter->stats.tpth += IXGB_READ_REG(&adapter->hw, TPTH); ixgb_update_stats()
1709 adapter->stats.gptcl += IXGB_READ_REG(&adapter->hw, GPTCL); ixgb_update_stats()
1710 adapter->stats.gptch += IXGB_READ_REG(&adapter->hw, GPTCH); ixgb_update_stats()
1711 adapter->stats.bptcl += IXGB_READ_REG(&adapter->hw, BPTCL); ixgb_update_stats()
1712 adapter->stats.bptch += IXGB_READ_REG(&adapter->hw, BPTCH); ixgb_update_stats()
1713 adapter->stats.mptcl += IXGB_READ_REG(&adapter->hw, MPTCL); ixgb_update_stats()
1714 adapter->stats.mptch += IXGB_READ_REG(&adapter->hw, MPTCH); ixgb_update_stats()
1715 adapter->stats.uptcl += IXGB_READ_REG(&adapter->hw, UPTCL); ixgb_update_stats()
1716 adapter->stats.uptch += IXGB_READ_REG(&adapter->hw, UPTCH); ixgb_update_stats()
1717 adapter->stats.vptcl += IXGB_READ_REG(&adapter->hw, VPTCL); ixgb_update_stats()
1718 adapter->stats.vptch += IXGB_READ_REG(&adapter->hw, VPTCH); ixgb_update_stats()
1719 adapter->stats.jptcl += IXGB_READ_REG(&adapter->hw, JPTCL); ixgb_update_stats()
1720 adapter->stats.jptch += IXGB_READ_REG(&adapter->hw, JPTCH); ixgb_update_stats()
1721 adapter->stats.gotcl += IXGB_READ_REG(&adapter->hw, GOTCL); ixgb_update_stats()
1722 adapter->stats.gotch += IXGB_READ_REG(&adapter->hw, GOTCH); ixgb_update_stats()
1723 adapter->stats.totl += IXGB_READ_REG(&adapter->hw, TOTL); ixgb_update_stats()
1724 adapter->stats.toth += IXGB_READ_REG(&adapter->hw, TOTH); ixgb_update_stats()
1725 adapter->stats.dc += IXGB_READ_REG(&adapter->hw, DC); ixgb_update_stats()
1726 adapter->stats.plt64c += IXGB_READ_REG(&adapter->hw, PLT64C); ixgb_update_stats()
1727 adapter->stats.tsctc += IXGB_READ_REG(&adapter->hw, TSCTC); ixgb_update_stats()
1728 adapter->stats.tsctfc += IXGB_READ_REG(&adapter->hw, TSCTFC); ixgb_update_stats()
1729 adapter->stats.ibic += IXGB_READ_REG(&adapter->hw, IBIC); ixgb_update_stats()
1730 adapter->stats.rfc += IXGB_READ_REG(&adapter->hw, RFC); ixgb_update_stats()
1731 adapter->stats.lfc += IXGB_READ_REG(&adapter->hw, LFC); ixgb_update_stats()
1732 adapter->stats.pfrc += IXGB_READ_REG(&adapter->hw, PFRC); ixgb_update_stats()
1733 adapter->stats.pftc += IXGB_READ_REG(&adapter->hw, PFTC); ixgb_update_stats()
1734 adapter->stats.mcfrc += IXGB_READ_REG(&adapter->hw, MCFRC); ixgb_update_stats()
1735 adapter->stats.mcftc += IXGB_READ_REG(&adapter->hw, MCFTC); ixgb_update_stats()
1736 adapter->stats.xonrxc += IXGB_READ_REG(&adapter->hw, XONRXC); ixgb_update_stats()
1737 adapter->stats.xontxc += IXGB_READ_REG(&adapter->hw, XONTXC); ixgb_update_stats()
1738 adapter->stats.xoffrxc += IXGB_READ_REG(&adapter->hw, XOFFRXC); ixgb_update_stats()
1739 adapter->stats.xofftxc += IXGB_READ_REG(&adapter->hw, XOFFTXC); ixgb_update_stats()
1740 adapter->stats.rjc += IXGB_READ_REG(&adapter->hw, RJC); ixgb_update_stats()
1744 netdev->stats.rx_packets = adapter->stats.gprcl; ixgb_update_stats()
1745 netdev->stats.tx_packets = adapter->stats.gptcl; ixgb_update_stats()
1746 netdev->stats.rx_bytes = adapter->stats.gorcl; ixgb_update_stats()
1747 netdev->stats.tx_bytes = adapter->stats.gotcl; ixgb_update_stats()
1748 netdev->stats.multicast = adapter->stats.mprcl; ixgb_update_stats()
1749 netdev->stats.collisions = 0; ixgb_update_stats()
1753 netdev->stats.rx_errors = ixgb_update_stats()
1754 /* adapter->stats.rnbc + */ adapter->stats.crcerrs + ixgb_update_stats()
1755 adapter->stats.ruc + ixgb_update_stats()
1756 adapter->stats.roc /*+ adapter->stats.rlec */ + ixgb_update_stats()
1757 adapter->stats.icbc + ixgb_update_stats()
1758 adapter->stats.ecbc + adapter->stats.mpc; ixgb_update_stats()
1761 * netdev->stats.rx_length_errors = adapter->stats.rlec; ixgb_update_stats()
1764 netdev->stats.rx_crc_errors = adapter->stats.crcerrs; ixgb_update_stats()
1765 netdev->stats.rx_fifo_errors = adapter->stats.mpc; ixgb_update_stats()
1766 netdev->stats.rx_missed_errors = adapter->stats.mpc; ixgb_update_stats()
1767 netdev->stats.rx_over_errors = adapter->stats.mpc; ixgb_update_stats()
1769 netdev->stats.tx_errors = 0; ixgb_update_stats()
1770 netdev->stats.rx_frame_errors = 0; ixgb_update_stats()
1771 netdev->stats.tx_aborted_errors = 0; ixgb_update_stats()
1772 netdev->stats.tx_carrier_errors = 0; ixgb_update_stats()
1773 netdev->stats.tx_fifo_errors = 0; ixgb_update_stats()
1774 netdev->stats.tx_heartbeat_errors = 0; ixgb_update_stats()
1775 netdev->stats.tx_window_errors = 0; ixgb_update_stats()
H A Dixgb_ethtool.c54 {"rx_packets", IXGB_NETDEV_STAT(stats.rx_packets)},
55 {"tx_packets", IXGB_NETDEV_STAT(stats.tx_packets)},
56 {"rx_bytes", IXGB_NETDEV_STAT(stats.rx_bytes)},
57 {"tx_bytes", IXGB_NETDEV_STAT(stats.tx_bytes)},
58 {"rx_errors", IXGB_NETDEV_STAT(stats.rx_errors)},
59 {"tx_errors", IXGB_NETDEV_STAT(stats.tx_errors)},
60 {"rx_dropped", IXGB_NETDEV_STAT(stats.rx_dropped)},
61 {"tx_dropped", IXGB_NETDEV_STAT(stats.tx_dropped)},
62 {"multicast", IXGB_NETDEV_STAT(stats.multicast)},
63 {"collisions", IXGB_NETDEV_STAT(stats.collisions)},
65 /* { "rx_length_errors", IXGB_NETDEV_STAT(stats.rx_length_errors) }, */
66 {"rx_over_errors", IXGB_NETDEV_STAT(stats.rx_over_errors)},
67 {"rx_crc_errors", IXGB_NETDEV_STAT(stats.rx_crc_errors)},
68 {"rx_frame_errors", IXGB_NETDEV_STAT(stats.rx_frame_errors)},
69 {"rx_no_buffer_count", IXGB_STAT(stats.rnbc)},
70 {"rx_fifo_errors", IXGB_NETDEV_STAT(stats.rx_fifo_errors)},
71 {"rx_missed_errors", IXGB_NETDEV_STAT(stats.rx_missed_errors)},
72 {"tx_aborted_errors", IXGB_NETDEV_STAT(stats.tx_aborted_errors)},
73 {"tx_carrier_errors", IXGB_NETDEV_STAT(stats.tx_carrier_errors)},
74 {"tx_fifo_errors", IXGB_NETDEV_STAT(stats.tx_fifo_errors)},
75 {"tx_heartbeat_errors", IXGB_NETDEV_STAT(stats.tx_heartbeat_errors)},
76 {"tx_window_errors", IXGB_NETDEV_STAT(stats.tx_window_errors)},
77 {"tx_deferred_ok", IXGB_STAT(stats.dc)},
80 {"rx_long_length_errors", IXGB_STAT(stats.roc)},
81 {"rx_short_length_errors", IXGB_STAT(stats.ruc)},
82 {"tx_tcp_seg_good", IXGB_STAT(stats.tsctc)},
83 {"tx_tcp_seg_failed", IXGB_STAT(stats.tsctfc)},
84 {"rx_flow_control_xon", IXGB_STAT(stats.xonrxc)},
85 {"rx_flow_control_xoff", IXGB_STAT(stats.xoffrxc)},
86 {"tx_flow_control_xon", IXGB_STAT(stats.xontxc)},
87 {"tx_flow_control_xoff", IXGB_STAT(stats.xofftxc)},
210 #define IXGB_GET_STAT(_A_, _R_) _A_->stats._R_
595 struct ethtool_stats *stats, u64 *data) ixgb_get_ethtool_stats()
594 ixgb_get_ethtool_stats(struct net_device *netdev, struct ethtool_stats *stats, u64 *data) ixgb_get_ethtool_stats() argument
/linux-4.1.27/drivers/net/vmxnet3/
H A Dvmxnet3_ethtool.c36 /* per tq stats maintained by the device */
53 /* per tq stats maintained by the driver */
77 /* per rq stats maintained by the device */
93 /* per rq stats maintained by the driver */
107 /* global stats maintained by the driver */
118 struct rtnl_link_stats64 *stats) vmxnet3_get_stats64()
130 /* Collect the dev stats into the shared area */ vmxnet3_get_stats64()
136 devTxStats = &adapter->tqd_start[i].stats; vmxnet3_get_stats64()
137 drvTxStats = &adapter->tx_queue[i].stats; vmxnet3_get_stats64()
138 stats->tx_packets += devTxStats->ucastPktsTxOK + vmxnet3_get_stats64()
141 stats->tx_bytes += devTxStats->ucastBytesTxOK + vmxnet3_get_stats64()
144 stats->tx_errors += devTxStats->pktsTxError; vmxnet3_get_stats64()
145 stats->tx_dropped += drvTxStats->drop_total; vmxnet3_get_stats64()
149 devRxStats = &adapter->rqd_start[i].stats; vmxnet3_get_stats64()
150 drvRxStats = &adapter->rx_queue[i].stats; vmxnet3_get_stats64()
151 stats->rx_packets += devRxStats->ucastPktsRxOK + vmxnet3_get_stats64()
155 stats->rx_bytes += devRxStats->ucastBytesRxOK + vmxnet3_get_stats64()
159 stats->rx_errors += devRxStats->pktsRxError; vmxnet3_get_stats64()
160 stats->rx_dropped += drvRxStats->drop_total; vmxnet3_get_stats64()
161 stats->multicast += devRxStats->mcastPktsRxOK; vmxnet3_get_stats64()
164 return stats; vmxnet3_get_stats64()
300 struct ethtool_stats *stats, u64 *buf) vmxnet3_get_ethtool_stats()
314 base = (u8 *)&adapter->tqd_start[j].stats; vmxnet3_get_ethtool_stats()
320 base = (u8 *)&adapter->tx_queue[j].stats; vmxnet3_get_ethtool_stats()
327 base = (u8 *)&adapter->rqd_start[j].stats; vmxnet3_get_ethtool_stats()
333 base = (u8 *)&adapter->rx_queue[j].stats; vmxnet3_get_ethtool_stats()
117 vmxnet3_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats) vmxnet3_get_stats64() argument
299 vmxnet3_get_ethtool_stats(struct net_device *netdev, struct ethtool_stats *stats, u64 *buf) vmxnet3_get_ethtool_stats() argument
/linux-4.1.27/drivers/atm/
H A Didt77105.c34 struct idt77105_stats stats; /* link diagnostics */ member in struct:idt77105_priv
79 * kernel's stats are much higher precision. Also, having
80 * a separate copy of the stats allows implementation of
81 * an ioctl which gathers the stats *without* zero'ing them.
87 struct idt77105_stats *stats; idt77105_stats_timer_func() local
93 stats = &walk->stats; idt77105_stats_timer_func()
94 stats->symbol_errors += get_counter(dev, IDT77105_CTRSEL_SEC); idt77105_stats_timer_func()
95 stats->tx_cells += get_counter(dev, IDT77105_CTRSEL_TCC); idt77105_stats_timer_func()
96 stats->rx_cells += get_counter(dev, IDT77105_CTRSEL_RCC); idt77105_stats_timer_func()
97 stats->rx_hec_errors += get_counter(dev, IDT77105_CTRSEL_RHEC); idt77105_stats_timer_func()
144 struct idt77105_stats stats; fetch_stats() local
147 memcpy(&stats, &PRIV(dev)->stats, sizeof(struct idt77105_stats)); fetch_stats()
149 memset(&PRIV(dev)->stats, 0, sizeof(struct idt77105_stats)); fetch_stats()
153 return copy_to_user(arg, &stats, fetch_stats()
252 /* normally don't care - just report in stats */ idt77105_int()
271 memset(&PRIV(dev)->stats,0,sizeof(struct idt77105_stats)); idt77105_start()
/linux-4.1.27/drivers/net/wireless/rtlwifi/rtl8192ce/
H A Dtrx.c33 #include "../stats.h"
242 rtlpriv->stats.rx_snr_db[i] = _rtl92ce_query_rxphystatus()
339 struct rtl_stats *stats, rtl92ce_rx_query_desc()
347 stats->length = (u16) GET_RX_DESC_PKT_LEN(pdesc); rtl92ce_rx_query_desc()
348 stats->rx_drvinfo_size = (u8) GET_RX_DESC_DRV_INFO_SIZE(pdesc) * rtl92ce_rx_query_desc()
350 stats->rx_bufshift = (u8) (GET_RX_DESC_SHIFT(pdesc) & 0x03); rtl92ce_rx_query_desc()
351 stats->icv = (u16) GET_RX_DESC_ICV(pdesc); rtl92ce_rx_query_desc()
352 stats->crc = (u16) GET_RX_DESC_CRC32(pdesc); rtl92ce_rx_query_desc()
353 stats->hwerror = (stats->crc | stats->icv); rtl92ce_rx_query_desc()
354 stats->decrypted = !GET_RX_DESC_SWDEC(pdesc); rtl92ce_rx_query_desc()
355 stats->rate = (u8) GET_RX_DESC_RXMCS(pdesc); rtl92ce_rx_query_desc()
356 stats->shortpreamble = (u16) GET_RX_DESC_SPLCP(pdesc); rtl92ce_rx_query_desc()
357 stats->isampdu = (bool) (GET_RX_DESC_PAGGR(pdesc) == 1); rtl92ce_rx_query_desc()
358 stats->isfirst_ampdu = (bool) ((GET_RX_DESC_PAGGR(pdesc) == 1) rtl92ce_rx_query_desc()
360 stats->timestamp_low = GET_RX_DESC_TSFL(pdesc); rtl92ce_rx_query_desc()
361 stats->rx_is40Mhzpacket = (bool) GET_RX_DESC_BW(pdesc); rtl92ce_rx_query_desc()
362 stats->is_ht = (bool)GET_RX_DESC_RXHT(pdesc); rtl92ce_rx_query_desc()
364 stats->is_cck = RX_HAL_IS_CCK_RATE(pdesc->rxmcs); rtl92ce_rx_query_desc()
369 hdr = (struct ieee80211_hdr *)(skb->data + stats->rx_drvinfo_size rtl92ce_rx_query_desc()
370 + stats->rx_bufshift); rtl92ce_rx_query_desc()
372 if (stats->crc) rtl92ce_rx_query_desc()
375 if (stats->rx_is40Mhzpacket) rtl92ce_rx_query_desc()
378 if (stats->is_ht) rtl92ce_rx_query_desc()
383 /* hw will set stats->decrypted true, if it finds the rtl92ce_rx_query_desc()
391 if (stats->decrypted) { rtl92ce_rx_query_desc()
403 rx_status->rate_idx = rtlwifi_rate_mapping(hw, stats->is_ht, rtl92ce_rx_query_desc()
404 false, stats->rate); rtl92ce_rx_query_desc()
406 rx_status->mactime = stats->timestamp_low; rtl92ce_rx_query_desc()
409 stats->rx_bufshift); rtl92ce_rx_query_desc()
412 skb, stats, pdesc, rtl92ce_rx_query_desc()
416 /*rx_status->qual = stats->signal; */ rtl92ce_rx_query_desc()
417 rx_status->signal = stats->recvsignalpower + 10; rtl92ce_rx_query_desc()
338 rtl92ce_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats, struct ieee80211_rx_status *rx_status, u8 *p_desc, struct sk_buff *skb) rtl92ce_rx_query_desc() argument
/linux-4.1.27/drivers/net/ethernet/intel/igbvf/
H A Dethtool.c51 { "rx_packets", IGBVF_STAT(stats.gprc, stats.base_gprc) },
52 { "tx_packets", IGBVF_STAT(stats.gptc, stats.base_gptc) },
53 { "rx_bytes", IGBVF_STAT(stats.gorc, stats.base_gorc) },
54 { "tx_bytes", IGBVF_STAT(stats.gotc, stats.base_gotc) },
55 { "multicast", IGBVF_STAT(stats.mprc, stats.base_mprc) },
56 { "lbrx_bytes", IGBVF_STAT(stats.gorlbc, stats.base_gorlbc) },
57 { "lbrx_packets", IGBVF_STAT(stats.gprlbc, stats.base_gprlbc) },
59 { "rx_long_byte_count", IGBVF_STAT(stats.gorc, stats.base_gorc) },
396 struct ethtool_stats *stats, igbvf_get_ethtool_stats()
395 igbvf_get_ethtool_stats(struct net_device *netdev, struct ethtool_stats *stats, u64 *data) igbvf_get_ethtool_stats() argument
H A Dmbx.c185 hw->mbx.stats.reqs++; e1000_check_for_msg_vf()
203 hw->mbx.stats.acks++; e1000_check_for_ack_vf()
222 hw->mbx.stats.rsts++; e1000_check_for_rst_vf()
274 /* update stats */ e1000_write_mbx_vf()
275 hw->mbx.stats.msgs_tx++; e1000_write_mbx_vf()
309 /* update stats */ e1000_read_mbx_vf()
310 hw->mbx.stats.msgs_rx++; e1000_read_mbx_vf()
342 mbx->stats.msgs_tx = 0; e1000_init_mbx_params_vf()
343 mbx->stats.msgs_rx = 0; e1000_init_mbx_params_vf()
344 mbx->stats.reqs = 0; e1000_init_mbx_params_vf()
345 mbx->stats.acks = 0; e1000_init_mbx_params_vf()
346 mbx->stats.rsts = 0; e1000_init_mbx_params_vf()
/linux-4.1.27/drivers/net/ethernet/atheros/alx/
H A Dhw.c1056 /* RX stats */ alx_update_hw_stats()
1057 hw->stats.rx_ok += alx_read_mem32(hw, ALX_MIB_RX_OK); alx_update_hw_stats()
1058 hw->stats.rx_bcast += alx_read_mem32(hw, ALX_MIB_RX_BCAST); alx_update_hw_stats()
1059 hw->stats.rx_mcast += alx_read_mem32(hw, ALX_MIB_RX_MCAST); alx_update_hw_stats()
1060 hw->stats.rx_pause += alx_read_mem32(hw, ALX_MIB_RX_PAUSE); alx_update_hw_stats()
1061 hw->stats.rx_ctrl += alx_read_mem32(hw, ALX_MIB_RX_CTRL); alx_update_hw_stats()
1062 hw->stats.rx_fcs_err += alx_read_mem32(hw, ALX_MIB_RX_FCS_ERR); alx_update_hw_stats()
1063 hw->stats.rx_len_err += alx_read_mem32(hw, ALX_MIB_RX_LEN_ERR); alx_update_hw_stats()
1064 hw->stats.rx_byte_cnt += alx_read_mem32(hw, ALX_MIB_RX_BYTE_CNT); alx_update_hw_stats()
1065 hw->stats.rx_runt += alx_read_mem32(hw, ALX_MIB_RX_RUNT); alx_update_hw_stats()
1066 hw->stats.rx_frag += alx_read_mem32(hw, ALX_MIB_RX_FRAG); alx_update_hw_stats()
1067 hw->stats.rx_sz_64B += alx_read_mem32(hw, ALX_MIB_RX_SZ_64B); alx_update_hw_stats()
1068 hw->stats.rx_sz_127B += alx_read_mem32(hw, ALX_MIB_RX_SZ_127B); alx_update_hw_stats()
1069 hw->stats.rx_sz_255B += alx_read_mem32(hw, ALX_MIB_RX_SZ_255B); alx_update_hw_stats()
1070 hw->stats.rx_sz_511B += alx_read_mem32(hw, ALX_MIB_RX_SZ_511B); alx_update_hw_stats()
1071 hw->stats.rx_sz_1023B += alx_read_mem32(hw, ALX_MIB_RX_SZ_1023B); alx_update_hw_stats()
1072 hw->stats.rx_sz_1518B += alx_read_mem32(hw, ALX_MIB_RX_SZ_1518B); alx_update_hw_stats()
1073 hw->stats.rx_sz_max += alx_read_mem32(hw, ALX_MIB_RX_SZ_MAX); alx_update_hw_stats()
1074 hw->stats.rx_ov_sz += alx_read_mem32(hw, ALX_MIB_RX_OV_SZ); alx_update_hw_stats()
1075 hw->stats.rx_ov_rxf += alx_read_mem32(hw, ALX_MIB_RX_OV_RXF); alx_update_hw_stats()
1076 hw->stats.rx_ov_rrd += alx_read_mem32(hw, ALX_MIB_RX_OV_RRD); alx_update_hw_stats()
1077 hw->stats.rx_align_err += alx_read_mem32(hw, ALX_MIB_RX_ALIGN_ERR); alx_update_hw_stats()
1078 hw->stats.rx_bc_byte_cnt += alx_read_mem32(hw, ALX_MIB_RX_BCCNT); alx_update_hw_stats()
1079 hw->stats.rx_mc_byte_cnt += alx_read_mem32(hw, ALX_MIB_RX_MCCNT); alx_update_hw_stats()
1080 hw->stats.rx_err_addr += alx_read_mem32(hw, ALX_MIB_RX_ERRADDR); alx_update_hw_stats()
1082 /* TX stats */ alx_update_hw_stats()
1083 hw->stats.tx_ok += alx_read_mem32(hw, ALX_MIB_TX_OK); alx_update_hw_stats()
1084 hw->stats.tx_bcast += alx_read_mem32(hw, ALX_MIB_TX_BCAST); alx_update_hw_stats()
1085 hw->stats.tx_mcast += alx_read_mem32(hw, ALX_MIB_TX_MCAST); alx_update_hw_stats()
1086 hw->stats.tx_pause += alx_read_mem32(hw, ALX_MIB_TX_PAUSE); alx_update_hw_stats()
1087 hw->stats.tx_exc_defer += alx_read_mem32(hw, ALX_MIB_TX_EXC_DEFER); alx_update_hw_stats()
1088 hw->stats.tx_ctrl += alx_read_mem32(hw, ALX_MIB_TX_CTRL); alx_update_hw_stats()
1089 hw->stats.tx_defer += alx_read_mem32(hw, ALX_MIB_TX_DEFER); alx_update_hw_stats()
1090 hw->stats.tx_byte_cnt += alx_read_mem32(hw, ALX_MIB_TX_BYTE_CNT); alx_update_hw_stats()
1091 hw->stats.tx_sz_64B += alx_read_mem32(hw, ALX_MIB_TX_SZ_64B); alx_update_hw_stats()
1092 hw->stats.tx_sz_127B += alx_read_mem32(hw, ALX_MIB_TX_SZ_127B); alx_update_hw_stats()
1093 hw->stats.tx_sz_255B += alx_read_mem32(hw, ALX_MIB_TX_SZ_255B); alx_update_hw_stats()
1094 hw->stats.tx_sz_511B += alx_read_mem32(hw, ALX_MIB_TX_SZ_511B); alx_update_hw_stats()
1095 hw->stats.tx_sz_1023B += alx_read_mem32(hw, ALX_MIB_TX_SZ_1023B); alx_update_hw_stats()
1096 hw->stats.tx_sz_1518B += alx_read_mem32(hw, ALX_MIB_TX_SZ_1518B); alx_update_hw_stats()
1097 hw->stats.tx_sz_max += alx_read_mem32(hw, ALX_MIB_TX_SZ_MAX); alx_update_hw_stats()
1098 hw->stats.tx_single_col += alx_read_mem32(hw, ALX_MIB_TX_SINGLE_COL); alx_update_hw_stats()
1099 hw->stats.tx_multi_col += alx_read_mem32(hw, ALX_MIB_TX_MULTI_COL); alx_update_hw_stats()
1100 hw->stats.tx_late_col += alx_read_mem32(hw, ALX_MIB_TX_LATE_COL); alx_update_hw_stats()
1101 hw->stats.tx_abort_col += alx_read_mem32(hw, ALX_MIB_TX_ABORT_COL); alx_update_hw_stats()
1102 hw->stats.tx_underrun += alx_read_mem32(hw, ALX_MIB_TX_UNDERRUN); alx_update_hw_stats()
1103 hw->stats.tx_trd_eop += alx_read_mem32(hw, ALX_MIB_TX_TRD_EOP); alx_update_hw_stats()
1104 hw->stats.tx_len_err += alx_read_mem32(hw, ALX_MIB_TX_LEN_ERR); alx_update_hw_stats()
1105 hw->stats.tx_trunc += alx_read_mem32(hw, ALX_MIB_TX_TRUNC); alx_update_hw_stats()
1106 hw->stats.tx_bc_byte_cnt += alx_read_mem32(hw, ALX_MIB_TX_BCCNT); alx_update_hw_stats()
1107 hw->stats.tx_mc_byte_cnt += alx_read_mem32(hw, ALX_MIB_TX_MCCNT); alx_update_hw_stats()
1109 hw->stats.update += alx_read_mem32(hw, ALX_MIB_UPDATE); alx_update_hw_stats()
/linux-4.1.27/net/sched/
H A Dsch_red.c45 struct red_stats stats; member in struct:red_sched_data
79 q->stats.prob_drop++; red_enqueue()
83 q->stats.prob_mark++; red_enqueue()
90 q->stats.forced_drop++; red_enqueue()
94 q->stats.forced_mark++; red_enqueue()
102 q->stats.pdrop++; red_enqueue()
144 q->stats.other++; red_drop()
289 .early = q->stats.prob_drop + q->stats.forced_drop, red_dump_stats()
290 .pdrop = q->stats.pdrop, red_dump_stats()
291 .other = q->stats.other, red_dump_stats()
292 .marked = q->stats.prob_mark + q->stats.forced_mark, red_dump_stats()
H A Dsch_choke.c69 } stats; member in struct:choke_sched_data
296 q->stats.matched++; choke_enqueue()
308 q->stats.forced_drop++; choke_enqueue()
312 q->stats.forced_mark++; choke_enqueue()
320 q->stats.prob_drop++; choke_enqueue()
324 q->stats.prob_mark++; choke_enqueue()
339 q->stats.pdrop++; choke_enqueue()
381 q->stats.other++; choke_drop()
531 .early = q->stats.prob_drop + q->stats.forced_drop, choke_dump_stats()
532 .marked = q->stats.prob_mark + q->stats.forced_mark, choke_dump_stats()
533 .pdrop = q->stats.pdrop, choke_dump_stats()
534 .other = q->stats.other, choke_dump_stats()
535 .matched = q->stats.matched, choke_dump_stats()
H A Dsch_codel.c59 struct codel_stats stats; member in struct:codel_sched_data
80 skb = codel_dequeue(sch, &q->params, &q->vars, &q->stats, dequeue); codel_qdisc_dequeue()
85 if (q->stats.drop_count && sch->q.qlen) { codel_qdisc_dequeue()
86 qdisc_tree_decrease_qlen(sch, q->stats.drop_count); codel_qdisc_dequeue()
87 q->stats.drop_count = 0; codel_qdisc_dequeue()
169 codel_stats_init(&q->stats); codel_init()
216 .maxpacket = q->stats.maxpacket, codel_dump_stats()
222 .ecn_mark = q->stats.ecn_mark, codel_dump_stats()
H A Dsch_sfb.c83 } stats; member in struct:sfb_sched_data
294 q->stats.queuedrop++; sfb_enqueue()
352 q->stats.bucketdrop++; sfb_enqueue()
380 q->stats.penaltydrop++; sfb_enqueue()
395 q->stats.earlydrop++; sfb_enqueue()
400 q->stats.marked++; sfb_enqueue()
402 q->stats.earlydrop++; sfb_enqueue()
413 q->stats.childdrop++; sfb_enqueue()
590 .earlydrop = q->stats.earlydrop, sfb_dump_stats()
591 .penaltydrop = q->stats.penaltydrop, sfb_dump_stats()
592 .bucketdrop = q->stats.bucketdrop, sfb_dump_stats()
593 .queuedrop = q->stats.queuedrop, sfb_dump_stats()
594 .childdrop = q->stats.childdrop, sfb_dump_stats()
595 .marked = q->stats.marked, sfb_dump_stats()
/linux-4.1.27/tools/power/cpupower/utils/
H A Dcpufreq-info.c257 struct cpufreq_stats *stats; debug_output_one() local
357 stats = cpufreq_get_stats(cpu, &total_time); debug_output_one()
358 if (stats) { debug_output_one()
359 printf(_(" cpufreq stats: ")); debug_output_one()
360 while (stats) { debug_output_one()
361 print_speed(stats->frequency); debug_output_one()
362 printf(":%.2f%%", (100.0 * stats->time_in_state) / total_time); debug_output_one()
363 stats = stats->next; debug_output_one()
364 if (stats) debug_output_one()
367 cpufreq_put_stats(stats); debug_output_one()
497 /* --stats / -s */
503 struct cpufreq_stats *stats = cpufreq_get_stats(cpu, &total_time); get_freq_stats() local
504 while (stats) { get_freq_stats()
506 print_speed(stats->frequency); get_freq_stats()
508 (100.0 * stats->time_in_state) / total_time); get_freq_stats()
511 stats->frequency, stats->time_in_state); get_freq_stats()
512 stats = stats->next; get_freq_stats()
513 if (stats) get_freq_stats()
516 cpufreq_put_stats(stats); get_freq_stats()
549 { .name = "stats", .has_arg = no_argument, .flag = NULL, .val = 's'},
/linux-4.1.27/drivers/net/ethernet/toshiba/
H A Dspider_net_ethtool.c143 struct ethtool_stats *stats, u64 *data) spider_net_get_ethtool_stats()
147 data[0] = netdev->stats.tx_packets; spider_net_get_ethtool_stats()
148 data[1] = netdev->stats.tx_bytes; spider_net_get_ethtool_stats()
149 data[2] = netdev->stats.rx_packets; spider_net_get_ethtool_stats()
150 data[3] = netdev->stats.rx_bytes; spider_net_get_ethtool_stats()
151 data[4] = netdev->stats.tx_errors; spider_net_get_ethtool_stats()
152 data[5] = netdev->stats.tx_dropped; spider_net_get_ethtool_stats()
153 data[6] = netdev->stats.rx_dropped; spider_net_get_ethtool_stats()
142 spider_net_get_ethtool_stats(struct net_device *netdev, struct ethtool_stats *stats, u64 *data) spider_net_get_ethtool_stats() argument
/linux-4.1.27/net/dsa/
H A Dtag_trailer.c23 dev->stats.tx_packets++; trailer_xmit()
24 dev->stats.tx_bytes += skb->len; trailer_xmit()
101 skb->dev->stats.rx_packets++; trailer_rcv()
102 skb->dev->stats.rx_bytes += skb->len; trailer_rcv()
/linux-4.1.27/drivers/net/ethernet/sun/
H A Dsunqe.c264 dev->stats.tx_errors++; qe_is_bolixed()
269 dev->stats.tx_errors++; qe_is_bolixed()
270 dev->stats.tx_carrier_errors++; qe_is_bolixed()
275 dev->stats.tx_errors++; qe_is_bolixed()
281 dev->stats.tx_errors++; qe_is_bolixed()
282 dev->stats.collisions++; qe_is_bolixed()
288 dev->stats.tx_errors++; qe_is_bolixed()
301 dev->stats.tx_errors += 256; qe_is_bolixed()
302 dev->stats.collisions += 256; qe_is_bolixed()
307 dev->stats.tx_errors++; qe_is_bolixed()
308 dev->stats.tx_aborted_errors++; qe_is_bolixed()
314 dev->stats.tx_errors++; qe_is_bolixed()
320 dev->stats.tx_errors++; qe_is_bolixed()
321 dev->stats.tx_aborted_errors++; qe_is_bolixed()
327 dev->stats.tx_errors++; qe_is_bolixed()
328 dev->stats.tx_aborted_errors++; qe_is_bolixed()
333 dev->stats.rx_errors += 256; qe_is_bolixed()
334 dev->stats.collisions += 256; qe_is_bolixed()
338 dev->stats.rx_errors += 256; qe_is_bolixed()
339 dev->stats.rx_over_errors += 256; qe_is_bolixed()
343 dev->stats.rx_errors += 256; qe_is_bolixed()
344 dev->stats.rx_missed_errors += 256; qe_is_bolixed()
349 dev->stats.rx_errors++; qe_is_bolixed()
350 dev->stats.rx_over_errors++; qe_is_bolixed()
355 dev->stats.rx_errors++; qe_is_bolixed()
356 dev->stats.collisions++; qe_is_bolixed()
360 dev->stats.rx_errors += 256; qe_is_bolixed()
361 dev->stats.rx_frame_errors += 256; qe_is_bolixed()
365 dev->stats.rx_errors += 256; qe_is_bolixed()
366 dev->stats.rx_crc_errors += 256; qe_is_bolixed()
371 dev->stats.rx_errors++; qe_is_bolixed()
372 dev->stats.rx_dropped++; qe_is_bolixed()
373 dev->stats.rx_missed_errors++; qe_is_bolixed()
378 dev->stats.rx_errors++; qe_is_bolixed()
379 dev->stats.rx_length_errors++; qe_is_bolixed()
384 dev->stats.rx_errors++; qe_is_bolixed()
390 dev->stats.rx_errors++; qe_is_bolixed()
391 dev->stats.rx_missed_errors++; qe_is_bolixed()
397 dev->stats.rx_errors++; qe_is_bolixed()
398 dev->stats.rx_missed_errors++; qe_is_bolixed()
433 dev->stats.rx_errors++; qe_rx()
434 dev->stats.rx_length_errors++; qe_rx()
435 dev->stats.rx_dropped++; qe_rx()
439 dev->stats.rx_dropped++; qe_rx()
447 dev->stats.rx_packets++; qe_rx()
448 dev->stats.rx_bytes += len; qe_rx()
603 dev->stats.tx_packets++; qe_start_xmit()
604 dev->stats.tx_bytes += len; qe_start_xmit()
/linux-4.1.27/fs/nfs/
H A Diostat.h70 static inline void nfs_free_iostats(struct nfs_iostats __percpu *stats) nfs_free_iostats() argument
72 if (stats != NULL) nfs_free_iostats()
73 free_percpu(stats); nfs_free_iostats()
/linux-4.1.27/net/bridge/
H A Dbr_device.c40 struct pcpu_sw_netstats *brstats = this_cpu_ptr(br->stats); br_dev_xmit()
102 br->stats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats); br_dev_init()
103 if (!br->stats) br_dev_init()
108 free_percpu(br->stats); br_dev_init()
149 struct rtnl_link_stats64 *stats) br_get_stats64()
158 = per_cpu_ptr(br->stats, cpu); for_each_possible_cpu()
169 stats->tx_bytes = sum.tx_bytes;
170 stats->tx_packets = sum.tx_packets;
171 stats->rx_bytes = sum.rx_bytes;
172 stats->rx_packets = sum.rx_packets;
174 return stats;
356 free_percpu(br->stats); br_dev_free()
148 br_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) br_get_stats64() argument
/linux-4.1.27/net/l2tp/
H A Dl2tp_debugfs.c152 atomic_long_read(&tunnel->stats.tx_packets), l2tp_dfs_seq_tunnel_show()
153 atomic_long_read(&tunnel->stats.tx_bytes), l2tp_dfs_seq_tunnel_show()
154 atomic_long_read(&tunnel->stats.tx_errors), l2tp_dfs_seq_tunnel_show()
155 atomic_long_read(&tunnel->stats.rx_packets), l2tp_dfs_seq_tunnel_show()
156 atomic_long_read(&tunnel->stats.rx_bytes), l2tp_dfs_seq_tunnel_show()
157 atomic_long_read(&tunnel->stats.rx_errors)); l2tp_dfs_seq_tunnel_show()
209 atomic_long_read(&session->stats.tx_packets), l2tp_dfs_seq_session_show()
210 atomic_long_read(&session->stats.tx_bytes), l2tp_dfs_seq_session_show()
211 atomic_long_read(&session->stats.tx_errors), l2tp_dfs_seq_session_show()
212 atomic_long_read(&session->stats.rx_packets), l2tp_dfs_seq_session_show()
213 atomic_long_read(&session->stats.rx_bytes), l2tp_dfs_seq_session_show()
214 atomic_long_read(&session->stats.rx_errors)); l2tp_dfs_seq_session_show()
H A Dl2tp_ppp.c261 atomic_long_inc(&session->stats.rx_errors); pppol2tp_recv()
987 struct l2tp_stats *stats) pppol2tp_copy_stats()
989 dest->tx_packets = atomic_long_read(&stats->tx_packets); pppol2tp_copy_stats()
990 dest->tx_bytes = atomic_long_read(&stats->tx_bytes); pppol2tp_copy_stats()
991 dest->tx_errors = atomic_long_read(&stats->tx_errors); pppol2tp_copy_stats()
992 dest->rx_packets = atomic_long_read(&stats->rx_packets); pppol2tp_copy_stats()
993 dest->rx_bytes = atomic_long_read(&stats->rx_bytes); pppol2tp_copy_stats()
994 dest->rx_seq_discards = atomic_long_read(&stats->rx_seq_discards); pppol2tp_copy_stats()
995 dest->rx_oos_packets = atomic_long_read(&stats->rx_oos_packets); pppol2tp_copy_stats()
996 dest->rx_errors = atomic_long_read(&stats->rx_errors); pppol2tp_copy_stats()
1010 struct pppol2tp_ioc_stats stats; pppol2tp_session_ioctl() local
1107 memset(&stats, 0, sizeof(stats)); pppol2tp_session_ioctl()
1108 stats.tunnel_id = tunnel->tunnel_id; pppol2tp_session_ioctl()
1109 stats.session_id = session->session_id; pppol2tp_session_ioctl()
1110 pppol2tp_copy_stats(&stats, &session->stats); pppol2tp_session_ioctl()
1111 if (copy_to_user((void __user *) arg, &stats, pppol2tp_session_ioctl()
1112 sizeof(stats))) pppol2tp_session_ioctl()
1114 l2tp_info(session, PPPOL2TP_MSG_CONTROL, "%s: get L2TP stats\n", pppol2tp_session_ioctl()
1133 * application to retrieve session stats via a tunnel socket.
1140 struct pppol2tp_ioc_stats stats; pppol2tp_tunnel_ioctl() local
1155 if (copy_from_user(&stats, (void __user *) arg, pppol2tp_tunnel_ioctl()
1156 sizeof(stats))) { pppol2tp_tunnel_ioctl()
1160 if (stats.session_id != 0) { pppol2tp_tunnel_ioctl()
1163 l2tp_session_find(sock_net(sk), tunnel, stats.session_id); pppol2tp_tunnel_ioctl()
1171 stats.using_ipsec = (sk->sk_policy[0] || sk->sk_policy[1]) ? 1 : 0; pppol2tp_tunnel_ioctl()
1173 pppol2tp_copy_stats(&stats, &tunnel->stats); pppol2tp_tunnel_ioctl()
1174 if (copy_to_user((void __user *) arg, &stats, sizeof(stats))) { pppol2tp_tunnel_ioctl()
1178 l2tp_info(tunnel, PPPOL2TP_MSG_CONTROL, "%s: get L2TP stats\n", pppol2tp_tunnel_ioctl()
1633 atomic_long_read(&tunnel->stats.tx_packets), pppol2tp_seq_tunnel_show()
1634 atomic_long_read(&tunnel->stats.tx_bytes), pppol2tp_seq_tunnel_show()
1635 atomic_long_read(&tunnel->stats.tx_errors), pppol2tp_seq_tunnel_show()
1636 atomic_long_read(&tunnel->stats.rx_packets), pppol2tp_seq_tunnel_show()
1637 atomic_long_read(&tunnel->stats.rx_bytes), pppol2tp_seq_tunnel_show()
1638 atomic_long_read(&tunnel->stats.rx_errors)); pppol2tp_seq_tunnel_show()
1675 atomic_long_read(&session->stats.tx_packets), pppol2tp_seq_session_show()
1676 atomic_long_read(&session->stats.tx_bytes), pppol2tp_seq_session_show()
1677 atomic_long_read(&session->stats.tx_errors), pppol2tp_seq_session_show()
1678 atomic_long_read(&session->stats.rx_packets), pppol2tp_seq_session_show()
1679 atomic_long_read(&session->stats.rx_bytes), pppol2tp_seq_session_show()
1680 atomic_long_read(&session->stats.rx_errors)); pppol2tp_seq_session_show()
986 pppol2tp_copy_stats(struct pppol2tp_ioc_stats *dest, struct l2tp_stats *stats) pppol2tp_copy_stats() argument
H A Dl2tp_eth.c110 struct rtnl_link_stats64 *stats) l2tp_eth_get_stats64()
114 stats->tx_bytes = atomic_long_read(&priv->tx_bytes); l2tp_eth_get_stats64()
115 stats->tx_packets = atomic_long_read(&priv->tx_packets); l2tp_eth_get_stats64()
116 stats->tx_dropped = atomic_long_read(&priv->tx_dropped); l2tp_eth_get_stats64()
117 stats->rx_bytes = atomic_long_read(&priv->rx_bytes); l2tp_eth_get_stats64()
118 stats->rx_packets = atomic_long_read(&priv->rx_packets); l2tp_eth_get_stats64()
119 stats->rx_errors = atomic_long_read(&priv->rx_errors); l2tp_eth_get_stats64()
120 return stats; l2tp_eth_get_stats64()
109 l2tp_eth_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) l2tp_eth_get_stats64() argument
/linux-4.1.27/net/netfilter/
H A Dnf_synproxy_core.c256 return per_cpu_ptr(snet->stats, cpu); synproxy_cpu_seq_start()
271 return per_cpu_ptr(snet->stats, cpu); synproxy_cpu_seq_next()
284 struct synproxy_stats *stats = v; synproxy_cpu_seq_show() local
294 stats->syn_received, synproxy_cpu_seq_show()
295 stats->cookie_invalid, synproxy_cpu_seq_show()
296 stats->cookie_valid, synproxy_cpu_seq_show()
297 stats->cookie_retrans, synproxy_cpu_seq_show()
298 stats->conn_reopened); synproxy_cpu_seq_show()
370 snet->stats = alloc_percpu(struct synproxy_stats); synproxy_net_init()
371 if (snet->stats == NULL) synproxy_net_init()
381 free_percpu(snet->stats); synproxy_net_init()
394 free_percpu(snet->stats); synproxy_net_exit()
H A Dnf_tables_core.c124 struct nft_stats *stats; nft_do_chain() local
209 stats = this_cpu_ptr(rcu_dereference(nft_base_chain(basechain)->stats));
210 u64_stats_update_begin(&stats->syncp);
211 stats->pkts++;
212 stats->bytes += pkt->skb->len;
213 u64_stats_update_end(&stats->syncp);
/linux-4.1.27/net/irda/
H A Dwrapper.c202 * Function async_bump (buf, len, stats)
209 struct net_device_stats *stats, async_bump()
228 stats->rx_dropped++; async_bump()
265 stats->rx_packets++; async_bump()
266 stats->rx_bytes += rx_buff->len; async_bump()
281 struct net_device_stats *stats, async_unwrap_bof()
291 stats->rx_errors++; async_unwrap_bof()
292 stats->rx_missed_errors++; async_unwrap_bof()
321 struct net_device_stats *stats, async_unwrap_eof()
331 stats->rx_errors++; async_unwrap_eof()
332 stats->rx_missed_errors++; async_unwrap_eof()
357 async_bump(dev, stats, rx_buff); async_unwrap_eof()
364 stats->rx_errors++; async_unwrap_eof()
365 stats->rx_crc_errors++; async_unwrap_eof()
379 struct net_device_stats *stats, async_unwrap_ce()
409 struct net_device_stats *stats, async_unwrap_other()
473 struct net_device_stats *stats, async_unwrap_char()
478 async_unwrap_ce(dev, stats, rx_buff, byte); async_unwrap_char()
481 async_unwrap_bof(dev, stats, rx_buff, byte); async_unwrap_char()
484 async_unwrap_eof(dev, stats, rx_buff, byte); async_unwrap_char()
487 async_unwrap_other(dev, stats, rx_buff, byte); async_unwrap_char()
208 async_bump(struct net_device *dev, struct net_device_stats *stats, iobuff_t *rx_buff) async_bump() argument
280 async_unwrap_bof(struct net_device *dev, struct net_device_stats *stats, iobuff_t *rx_buff, __u8 byte) async_unwrap_bof() argument
320 async_unwrap_eof(struct net_device *dev, struct net_device_stats *stats, iobuff_t *rx_buff, __u8 byte) async_unwrap_eof() argument
378 async_unwrap_ce(struct net_device *dev, struct net_device_stats *stats, iobuff_t *rx_buff, __u8 byte) async_unwrap_ce() argument
408 async_unwrap_other(struct net_device *dev, struct net_device_stats *stats, iobuff_t *rx_buff, __u8 byte) async_unwrap_other() argument
472 async_unwrap_char(struct net_device *dev, struct net_device_stats *stats, iobuff_t *rx_buff, __u8 byte) async_unwrap_char() argument
/linux-4.1.27/drivers/net/wireless/mwifiex/
H A Ddebugfs.c128 p += sprintf(p, "num_tx_bytes = %lu\n", priv->stats.tx_bytes); mwifiex_info_read()
129 p += sprintf(p, "num_rx_bytes = %lu\n", priv->stats.rx_bytes); mwifiex_info_read()
130 p += sprintf(p, "num_tx_pkts = %lu\n", priv->stats.tx_packets); mwifiex_info_read()
131 p += sprintf(p, "num_rx_pkts = %lu\n", priv->stats.rx_packets); mwifiex_info_read()
132 p += sprintf(p, "num_tx_pkts_dropped = %lu\n", priv->stats.tx_dropped); mwifiex_info_read()
133 p += sprintf(p, "num_rx_pkts_dropped = %lu\n", priv->stats.rx_dropped); mwifiex_info_read()
134 p += sprintf(p, "num_tx_pkts_err = %lu\n", priv->stats.tx_errors); mwifiex_info_read()
135 p += sprintf(p, "num_rx_pkts_err = %lu\n", priv->stats.rx_errors); mwifiex_info_read()
207 struct mwifiex_ds_get_stats stats; mwifiex_getlog_read() local
212 memset(&stats, 0, sizeof(stats)); mwifiex_getlog_read()
213 ret = mwifiex_get_stats_info(priv, &stats); mwifiex_getlog_read()
236 stats.mcast_tx_frame, mwifiex_getlog_read()
237 stats.failed, mwifiex_getlog_read()
238 stats.retry, mwifiex_getlog_read()
239 stats.multi_retry, mwifiex_getlog_read()
240 stats.frame_dup, mwifiex_getlog_read()
241 stats.rts_success, mwifiex_getlog_read()
242 stats.rts_failure, mwifiex_getlog_read()
243 stats.ack_failure, mwifiex_getlog_read()
244 stats.rx_frag, mwifiex_getlog_read()
245 stats.mcast_rx_frame, mwifiex_getlog_read()
246 stats.fcs_error, mwifiex_getlog_read()
247 stats.tx_frame, mwifiex_getlog_read()
248 stats.wep_icv_error[0], mwifiex_getlog_read()
249 stats.wep_icv_error[1], mwifiex_getlog_read()
250 stats.wep_icv_error[2], mwifiex_getlog_read()
251 stats.wep_icv_error[3], mwifiex_getlog_read()
252 stats.bcn_rcv_cnt, mwifiex_getlog_read()
253 stats.bcn_miss_cnt); mwifiex_getlog_read()
/linux-4.1.27/drivers/net/ethernet/dec/tulip/
H A Dinterrupt.c186 dev->stats.rx_length_errors++; tulip_poll()
193 dev->stats.rx_errors++; /* end of a packet.*/ tulip_poll()
196 dev->stats.rx_length_errors++; tulip_poll()
199 dev->stats.rx_frame_errors++; tulip_poll()
201 dev->stats.rx_crc_errors++; tulip_poll()
203 dev->stats.rx_fifo_errors++; tulip_poll()
253 dev->stats.rx_packets++; tulip_poll()
254 dev->stats.rx_bytes += pkt_len; tulip_poll()
413 dev->stats.rx_length_errors++; tulip_rx()
420 dev->stats.rx_errors++; /* end of a packet.*/ tulip_rx()
423 dev->stats.rx_length_errors++; tulip_rx()
425 dev->stats.rx_frame_errors++; tulip_rx()
427 dev->stats.rx_crc_errors++; tulip_rx()
429 dev->stats.rx_fifo_errors++; tulip_rx()
479 dev->stats.rx_packets++; tulip_rx()
480 dev->stats.rx_bytes += pkt_len; tulip_rx()
614 dev->stats.tx_errors++; tulip_interrupt()
616 dev->stats.tx_aborted_errors++; tulip_interrupt()
618 dev->stats.tx_carrier_errors++; tulip_interrupt()
620 dev->stats.tx_window_errors++; tulip_interrupt()
622 dev->stats.tx_fifo_errors++; tulip_interrupt()
624 dev->stats.tx_heartbeat_errors++; tulip_interrupt()
626 dev->stats.tx_bytes += tulip_interrupt()
628 dev->stats.collisions += (status >> 3) & 15; tulip_interrupt()
629 dev->stats.tx_packets++; tulip_interrupt()
672 dev->stats.tx_errors++; tulip_interrupt()
689 dev->stats.rx_missed_errors += ioread32(ioaddr + CSR8) & 0xffff; tulip_interrupt()
690 dev->stats.rx_errors++; tulip_interrupt()
806 dev->stats.rx_dropped += missed & 0x10000 ? 0x10000 : missed;
/linux-4.1.27/net/rose/
H A Drose_dev.c102 struct net_device_stats *stats = &dev->stats; rose_xmit() local
112 stats->tx_errors++; rose_xmit()
116 stats->tx_packets++; rose_xmit()
117 stats->tx_bytes += len; rose_xmit()
/linux-4.1.27/drivers/net/ethernet/qlogic/qlcnic/
H A Dqlcnic_ethtool.c30 {"xmit_on", QLC_SIZEOF(stats.xmit_on), QLC_OFF(stats.xmit_on)},
31 {"xmit_off", QLC_SIZEOF(stats.xmit_off), QLC_OFF(stats.xmit_off)},
32 {"xmit_called", QLC_SIZEOF(stats.xmitcalled),
33 QLC_OFF(stats.xmitcalled)},
34 {"xmit_finished", QLC_SIZEOF(stats.xmitfinished),
35 QLC_OFF(stats.xmitfinished)},
36 {"tx dma map error", QLC_SIZEOF(stats.tx_dma_map_error),
37 QLC_OFF(stats.tx_dma_map_error)},
38 {"tx_bytes", QLC_SIZEOF(stats.txbytes), QLC_OFF(stats.txbytes)},
39 {"tx_dropped", QLC_SIZEOF(stats.txdropped), QLC_OFF(stats.txdropped)},
40 {"rx dma map error", QLC_SIZEOF(stats.rx_dma_map_error),
41 QLC_OFF(stats.rx_dma_map_error)},
42 {"rx_pkts", QLC_SIZEOF(stats.rx_pkts), QLC_OFF(stats.rx_pkts)},
43 {"rx_bytes", QLC_SIZEOF(stats.rxbytes), QLC_OFF(stats.rxbytes)},
44 {"rx_dropped", QLC_SIZEOF(stats.rxdropped), QLC_OFF(stats.rxdropped)},
45 {"null rxbuf", QLC_SIZEOF(stats.null_rxbuf), QLC_OFF(stats.null_rxbuf)},
46 {"csummed", QLC_SIZEOF(stats.csummed), QLC_OFF(stats.csummed)},
47 {"lro_pkts", QLC_SIZEOF(stats.lro_pkts), QLC_OFF(stats.lro_pkts)},
48 {"lrobytes", QLC_SIZEOF(stats.lrobytes), QLC_OFF(stats.lrobytes)},
49 {"lso_frames", QLC_SIZEOF(stats.lso_frames), QLC_OFF(stats.lso_frames)},
50 {"encap_lso_frames", QLC_SIZEOF(stats.encap_lso_frames),
51 QLC_OFF(stats.encap_lso_frames)},
52 {"encap_tx_csummed", QLC_SIZEOF(stats.encap_tx_csummed),
53 QLC_OFF(stats.encap_tx_csummed)},
54 {"encap_rx_csummed", QLC_SIZEOF(stats.encap_rx_csummed),
55 QLC_OFF(stats.encap_rx_csummed)},
56 {"skb_alloc_failure", QLC_SIZEOF(stats.skb_alloc_failure),
57 QLC_OFF(stats.skb_alloc_failure)},
58 {"mac_filter_limit_overrun", QLC_SIZEOF(stats.mac_filter_limit_overrun),
59 QLC_OFF(stats.mac_filter_limit_overrun)},
60 {"spurious intr", QLC_SIZEOF(stats.spurious_intr),
61 QLC_OFF(stats.spurious_intr)},
1239 static u64 *qlcnic_fill_stats(u64 *data, void *stats, int type) qlcnic_fill_stats() argument
1243 (struct qlcnic_mac_statistics *)stats; qlcnic_fill_stats()
1279 (struct __qlcnic_esw_statistics *)stats; qlcnic_fill_stats()
1307 adapter->stats.xmit_on = tx_stats.xmit_on; qlcnic_update_stats()
1308 adapter->stats.xmit_off = tx_stats.xmit_off; qlcnic_update_stats()
1309 adapter->stats.xmitcalled = tx_stats.xmit_called; qlcnic_update_stats()
1310 adapter->stats.xmitfinished = tx_stats.xmit_finished; qlcnic_update_stats()
1311 adapter->stats.txbytes = tx_stats.tx_bytes; qlcnic_update_stats()
1314 static u64 *qlcnic_fill_tx_queue_stats(u64 *data, void *stats) qlcnic_fill_tx_queue_stats() argument
1318 tx_ring = (struct qlcnic_host_tx_ring *)stats; qlcnic_fill_tx_queue_stats()
1330 struct ethtool_stats *stats, u64 *data) qlcnic_get_ethtool_stats()
1339 memset(data, 0, stats->n_stats * sizeof(u64)); qlcnic_get_ethtool_stats()
1329 qlcnic_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) qlcnic_get_ethtool_stats() argument
H A Dqlcnic_ctx.c1062 struct qlcnic_esw_stats_le *stats; qlcnic_get_port_stats() local
1075 "Not privilege to query stats for func=%d", func); qlcnic_get_port_stats()
1098 stats = stats_addr; qlcnic_get_port_stats()
1099 esw_stats->context_id = le16_to_cpu(stats->context_id); qlcnic_get_port_stats()
1100 esw_stats->version = le16_to_cpu(stats->version); qlcnic_get_port_stats()
1101 esw_stats->size = le16_to_cpu(stats->size); qlcnic_get_port_stats()
1103 le64_to_cpu(stats->multicast_frames); qlcnic_get_port_stats()
1105 le64_to_cpu(stats->broadcast_frames); qlcnic_get_port_stats()
1106 esw_stats->unicast_frames = le64_to_cpu(stats->unicast_frames); qlcnic_get_port_stats()
1107 esw_stats->dropped_frames = le64_to_cpu(stats->dropped_frames); qlcnic_get_port_stats()
1108 esw_stats->local_frames = le64_to_cpu(stats->local_frames); qlcnic_get_port_stats()
1109 esw_stats->errors = le64_to_cpu(stats->errors); qlcnic_get_port_stats()
1110 esw_stats->numbytes = le64_to_cpu(stats->numbytes); qlcnic_get_port_stats()
1125 struct qlcnic_mac_statistics_le *stats; qlcnic_get_mac_stats() local
1149 stats = stats_addr; qlcnic_get_mac_stats()
1150 mac_stats->mac_tx_frames = le64_to_cpu(stats->mac_tx_frames); qlcnic_get_mac_stats()
1151 mac_stats->mac_tx_bytes = le64_to_cpu(stats->mac_tx_bytes); qlcnic_get_mac_stats()
1153 le64_to_cpu(stats->mac_tx_mcast_pkts); qlcnic_get_mac_stats()
1155 le64_to_cpu(stats->mac_tx_bcast_pkts); qlcnic_get_mac_stats()
1156 mac_stats->mac_rx_frames = le64_to_cpu(stats->mac_rx_frames); qlcnic_get_mac_stats()
1157 mac_stats->mac_rx_bytes = le64_to_cpu(stats->mac_rx_bytes); qlcnic_get_mac_stats()
1159 le64_to_cpu(stats->mac_rx_mcast_pkts); qlcnic_get_mac_stats()
1161 le64_to_cpu(stats->mac_rx_length_error); qlcnic_get_mac_stats()
1163 le64_to_cpu(stats->mac_rx_length_small); qlcnic_get_mac_stats()
1165 le64_to_cpu(stats->mac_rx_length_large); qlcnic_get_mac_stats()
1166 mac_stats->mac_rx_jabber = le64_to_cpu(stats->mac_rx_jabber); qlcnic_get_mac_stats()
1167 mac_stats->mac_rx_dropped = le64_to_cpu(stats->mac_rx_dropped); qlcnic_get_mac_stats()
1168 mac_stats->mac_rx_crc_error = le64_to_cpu(stats->mac_rx_crc_error); qlcnic_get_mac_stats()
1171 "%s: Get mac stats failed, err=%d.\n", __func__, err); qlcnic_get_mac_stats()
/linux-4.1.27/include/net/
H A Dcodel.h160 * struct codel_stats - contains codel shared variables and stats
185 static void codel_stats_init(struct codel_stats *stats) codel_stats_init() argument
187 stats->maxpacket = 0; codel_stats_init()
224 struct codel_stats *stats, codel_should_drop()
237 if (unlikely(qdisc_pkt_len(skb) > stats->maxpacket)) codel_should_drop()
238 stats->maxpacket = qdisc_pkt_len(skb); codel_should_drop()
264 struct codel_stats *stats, codel_dequeue()
276 drop = codel_should_drop(skb, sch, vars, params, stats, now); codel_dequeue()
297 stats->ecn_mark++; codel_dequeue()
305 stats->drop_count++; codel_dequeue()
308 vars, params, stats, now)) { codel_dequeue()
324 stats->ecn_mark++; codel_dequeue()
327 stats->drop_count++; codel_dequeue()
331 stats, now); codel_dequeue()
220 codel_should_drop(const struct sk_buff *skb, struct Qdisc *sch, struct codel_vars *vars, struct codel_params *params, struct codel_stats *stats, codel_time_t now) codel_should_drop() argument
261 codel_dequeue(struct Qdisc *sch, struct codel_params *params, struct codel_vars *vars, struct codel_stats *stats, codel_skb_dequeue_t dequeue_func) codel_dequeue() argument
H A Dip6_tunnel.h79 struct net_device_stats *stats = &dev->stats; ip6tunnel_xmit() local
93 stats->tx_errors++; ip6tunnel_xmit()
94 stats->tx_aborted_errors++; ip6tunnel_xmit()
/linux-4.1.27/drivers/media/usb/uvc/
H A Duvc_video.c718 if (stream->stats.stream.nb_frames == 0 && uvc_video_stats_decode()
719 stream->stats.frame.nb_packets == 0) uvc_video_stats_decode()
720 ktime_get_ts(&stream->stats.stream.start_ts); uvc_video_stats_decode()
743 stream->stats.frame.nb_invalid++; uvc_video_stats_decode()
757 if (has_pts && stream->stats.frame.nb_pts) { uvc_video_stats_decode()
758 if (stream->stats.frame.pts != pts) { uvc_video_stats_decode()
759 stream->stats.frame.nb_pts_diffs++; uvc_video_stats_decode()
760 stream->stats.frame.last_pts_diff = uvc_video_stats_decode()
761 stream->stats.frame.nb_packets; uvc_video_stats_decode()
766 stream->stats.frame.nb_pts++; uvc_video_stats_decode()
767 stream->stats.frame.pts = pts; uvc_video_stats_decode()
773 if (stream->stats.frame.size == 0) { uvc_video_stats_decode()
775 stream->stats.frame.has_initial_pts = has_pts; uvc_video_stats_decode()
777 stream->stats.frame.has_early_pts = true; uvc_video_stats_decode()
781 if (has_scr && stream->stats.frame.nb_scr) { uvc_video_stats_decode()
782 if (stream->stats.frame.scr_stc != scr_stc) uvc_video_stats_decode()
783 stream->stats.frame.nb_scr_diffs++; uvc_video_stats_decode()
788 if (stream->stats.stream.nb_frames > 0 || uvc_video_stats_decode()
789 stream->stats.frame.nb_scr > 0) uvc_video_stats_decode()
790 stream->stats.stream.scr_sof_count += uvc_video_stats_decode()
791 (scr_sof - stream->stats.stream.scr_sof) % 2048; uvc_video_stats_decode()
792 stream->stats.stream.scr_sof = scr_sof; uvc_video_stats_decode()
794 stream->stats.frame.nb_scr++; uvc_video_stats_decode()
795 stream->stats.frame.scr_stc = scr_stc; uvc_video_stats_decode()
796 stream->stats.frame.scr_sof = scr_sof; uvc_video_stats_decode()
798 if (scr_sof < stream->stats.stream.min_sof) uvc_video_stats_decode()
799 stream->stats.stream.min_sof = scr_sof; uvc_video_stats_decode()
800 if (scr_sof > stream->stats.stream.max_sof) uvc_video_stats_decode()
801 stream->stats.stream.max_sof = scr_sof; uvc_video_stats_decode()
805 if (stream->stats.frame.size == 0 && len > header_size) uvc_video_stats_decode()
806 stream->stats.frame.first_data = stream->stats.frame.nb_packets; uvc_video_stats_decode()
809 stream->stats.frame.size += len - header_size; uvc_video_stats_decode()
812 stream->stats.frame.nb_packets++; uvc_video_stats_decode()
814 stream->stats.frame.nb_empty++; uvc_video_stats_decode()
817 stream->stats.frame.nb_errors++; uvc_video_stats_decode()
822 struct uvc_stats_frame *frame = &stream->stats.frame; uvc_video_stats_update()
824 uvc_trace(UVC_TRACE_STATS, "frame %u stats: %u/%u/%u packets, " uvc_video_stats_update()
835 stream->stats.stream.nb_frames++; uvc_video_stats_update()
836 stream->stats.stream.nb_packets += stream->stats.frame.nb_packets; uvc_video_stats_update()
837 stream->stats.stream.nb_empty += stream->stats.frame.nb_empty; uvc_video_stats_update()
838 stream->stats.stream.nb_errors += stream->stats.frame.nb_errors; uvc_video_stats_update()
839 stream->stats.stream.nb_invalid += stream->stats.frame.nb_invalid; uvc_video_stats_update()
842 stream->stats.stream.nb_pts_early++; uvc_video_stats_update()
844 stream->stats.stream.nb_pts_initial++; uvc_video_stats_update()
846 stream->stats.stream.nb_pts_constant++; uvc_video_stats_update()
848 stream->stats.stream.nb_scr_count_ok++; uvc_video_stats_update()
850 stream->stats.stream.nb_scr_diffs_ok++; uvc_video_stats_update()
852 memset(&stream->stats.frame, 0, sizeof(stream->stats.frame)); uvc_video_stats_update()
863 ts.tv_sec = stream->stats.stream.stop_ts.tv_sec uvc_video_stats_dump()
864 - stream->stats.stream.start_ts.tv_sec; uvc_video_stats_dump()
865 ts.tv_nsec = stream->stats.stream.stop_ts.tv_nsec uvc_video_stats_dump()
866 - stream->stats.stream.start_ts.tv_nsec; uvc_video_stats_dump()
877 scr_sof_freq = stream->stats.stream.scr_sof_count * 1000 uvc_video_stats_dump()
885 stream->stats.stream.nb_frames, uvc_video_stats_dump()
886 stream->stats.stream.nb_packets, uvc_video_stats_dump()
887 stream->stats.stream.nb_empty, uvc_video_stats_dump()
888 stream->stats.stream.nb_errors, uvc_video_stats_dump()
889 stream->stats.stream.nb_invalid); uvc_video_stats_dump()
892 stream->stats.stream.nb_pts_early, uvc_video_stats_dump()
893 stream->stats.stream.nb_pts_initial, uvc_video_stats_dump()
894 stream->stats.stream.nb_pts_constant); uvc_video_stats_dump()
897 stream->stats.stream.nb_scr_count_ok, uvc_video_stats_dump()
898 stream->stats.stream.nb_scr_diffs_ok); uvc_video_stats_dump()
901 stream->stats.stream.min_sof, uvc_video_stats_dump()
902 stream->stats.stream.max_sof, uvc_video_stats_dump()
910 memset(&stream->stats, 0, sizeof(stream->stats)); uvc_video_stats_start()
911 stream->stats.stream.min_sof = 2048; uvc_video_stats_start()
916 ktime_get_ts(&stream->stats.stream.stop_ts); uvc_video_stats_stop()
969 stream->stats.frame.nb_invalid++; uvc_video_decode_start()
/linux-4.1.27/drivers/net/wireless/ti/wl1251/
H A Ddebugfs.c81 wl->stats.fw_stats->sub.name); \
108 time_after(jiffies, wl->stats.fw_stats_update + wl1251_debugfs_update_stats()
110 wl1251_acx_statistics(wl, wl->stats.fw_stats); wl1251_debugfs_update_stats()
111 wl->stats.fw_stats_update = jiffies; wl1251_debugfs_update_stats()
212 DEBUGFS_READONLY_FILE(retry_count, 20, "%u", wl->stats.retry_count);
214 wl->stats.excessive_retries);
466 if (wl->stats.fw_stats != NULL) wl1251_debugfs_reset()
467 memset(wl->stats.fw_stats, 0, sizeof(*wl->stats.fw_stats)); wl1251_debugfs_reset()
468 wl->stats.retry_count = 0; wl1251_debugfs_reset()
469 wl->stats.excessive_retries = 0; wl1251_debugfs_reset()
493 wl->stats.fw_stats = kzalloc(sizeof(*wl->stats.fw_stats), wl1251_debugfs_init()
496 if (!wl->stats.fw_stats) { wl1251_debugfs_init()
501 wl->stats.fw_stats_update = jiffies; wl1251_debugfs_init()
511 kfree(wl->stats.fw_stats); wl1251_debugfs_init()
512 wl->stats.fw_stats = NULL; wl1251_debugfs_init()
530 kfree(wl->stats.fw_stats); wl1251_debugfs_exit()
531 wl->stats.fw_stats = NULL; wl1251_debugfs_exit()
/linux-4.1.27/drivers/net/ethernet/intel/igb/
H A Digb_ethtool.c53 IGB_STAT("rx_packets", stats.gprc),
54 IGB_STAT("tx_packets", stats.gptc),
55 IGB_STAT("rx_bytes", stats.gorc),
56 IGB_STAT("tx_bytes", stats.gotc),
57 IGB_STAT("rx_broadcast", stats.bprc),
58 IGB_STAT("tx_broadcast", stats.bptc),
59 IGB_STAT("rx_multicast", stats.mprc),
60 IGB_STAT("tx_multicast", stats.mptc),
61 IGB_STAT("multicast", stats.mprc),
62 IGB_STAT("collisions", stats.colc),
63 IGB_STAT("rx_crc_errors", stats.crcerrs),
64 IGB_STAT("rx_no_buffer_count", stats.rnbc),
65 IGB_STAT("rx_missed_errors", stats.mpc),
66 IGB_STAT("tx_aborted_errors", stats.ecol),
67 IGB_STAT("tx_carrier_errors", stats.tncrs),
68 IGB_STAT("tx_window_errors", stats.latecol),
69 IGB_STAT("tx_abort_late_coll", stats.latecol),
70 IGB_STAT("tx_deferred_ok", stats.dc),
71 IGB_STAT("tx_single_coll_ok", stats.scc),
72 IGB_STAT("tx_multi_coll_ok", stats.mcc),
74 IGB_STAT("rx_long_length_errors", stats.roc),
75 IGB_STAT("rx_short_length_errors", stats.ruc),
76 IGB_STAT("rx_align_errors", stats.algnerrc),
77 IGB_STAT("tx_tcp_seg_good", stats.tsctc),
78 IGB_STAT("tx_tcp_seg_failed", stats.tsctfc),
79 IGB_STAT("rx_flow_control_xon", stats.xonrxc),
80 IGB_STAT("rx_flow_control_xoff", stats.xoffrxc),
81 IGB_STAT("tx_flow_control_xon", stats.xontxc),
82 IGB_STAT("tx_flow_control_xoff", stats.xofftxc),
83 IGB_STAT("rx_long_byte_count", stats.gorc),
84 IGB_STAT("tx_dma_out_of_sync", stats.doosync),
85 IGB_STAT("tx_smbus", stats.mgptc),
86 IGB_STAT("rx_smbus", stats.mgprc),
87 IGB_STAT("dropped_smbus", stats.mgpdc),
88 IGB_STAT("os2bmc_rx_by_bmc", stats.o2bgptc),
89 IGB_STAT("os2bmc_tx_by_bmc", stats.b2ospc),
90 IGB_STAT("os2bmc_tx_by_host", stats.o2bspc),
91 IGB_STAT("os2bmc_rx_by_host", stats.b2ogprc),
538 regs_buff[54] = adapter->stats.crcerrs; igb_get_regs()
539 regs_buff[55] = adapter->stats.algnerrc; igb_get_regs()
540 regs_buff[56] = adapter->stats.symerrs; igb_get_regs()
541 regs_buff[57] = adapter->stats.rxerrc; igb_get_regs()
542 regs_buff[58] = adapter->stats.mpc; igb_get_regs()
543 regs_buff[59] = adapter->stats.scc; igb_get_regs()
544 regs_buff[60] = adapter->stats.ecol; igb_get_regs()
545 regs_buff[61] = adapter->stats.mcc; igb_get_regs()
546 regs_buff[62] = adapter->stats.latecol; igb_get_regs()
547 regs_buff[63] = adapter->stats.colc; igb_get_regs()
548 regs_buff[64] = adapter->stats.dc; igb_get_regs()
549 regs_buff[65] = adapter->stats.tncrs; igb_get_regs()
550 regs_buff[66] = adapter->stats.sec; igb_get_regs()
551 regs_buff[67] = adapter->stats.htdpmc; igb_get_regs()
552 regs_buff[68] = adapter->stats.rlec; igb_get_regs()
553 regs_buff[69] = adapter->stats.xonrxc; igb_get_regs()
554 regs_buff[70] = adapter->stats.xontxc; igb_get_regs()
555 regs_buff[71] = adapter->stats.xoffrxc; igb_get_regs()
556 regs_buff[72] = adapter->stats.xofftxc; igb_get_regs()
557 regs_buff[73] = adapter->stats.fcruc; igb_get_regs()
558 regs_buff[74] = adapter->stats.prc64; igb_get_regs()
559 regs_buff[75] = adapter->stats.prc127; igb_get_regs()
560 regs_buff[76] = adapter->stats.prc255; igb_get_regs()
561 regs_buff[77] = adapter->stats.prc511; igb_get_regs()
562 regs_buff[78] = adapter->stats.prc1023; igb_get_regs()
563 regs_buff[79] = adapter->stats.prc1522; igb_get_regs()
564 regs_buff[80] = adapter->stats.gprc; igb_get_regs()
565 regs_buff[81] = adapter->stats.bprc; igb_get_regs()
566 regs_buff[82] = adapter->stats.mprc; igb_get_regs()
567 regs_buff[83] = adapter->stats.gptc; igb_get_regs()
568 regs_buff[84] = adapter->stats.gorc; igb_get_regs()
569 regs_buff[86] = adapter->stats.gotc; igb_get_regs()
570 regs_buff[88] = adapter->stats.rnbc; igb_get_regs()
571 regs_buff[89] = adapter->stats.ruc; igb_get_regs()
572 regs_buff[90] = adapter->stats.rfc; igb_get_regs()
573 regs_buff[91] = adapter->stats.roc; igb_get_regs()
574 regs_buff[92] = adapter->stats.rjc; igb_get_regs()
575 regs_buff[93] = adapter->stats.mgprc; igb_get_regs()
576 regs_buff[94] = adapter->stats.mgpdc; igb_get_regs()
577 regs_buff[95] = adapter->stats.mgptc; igb_get_regs()
578 regs_buff[96] = adapter->stats.tor; igb_get_regs()
579 regs_buff[98] = adapter->stats.tot; igb_get_regs()
580 regs_buff[100] = adapter->stats.tpr; igb_get_regs()
581 regs_buff[101] = adapter->stats.tpt; igb_get_regs()
582 regs_buff[102] = adapter->stats.ptc64; igb_get_regs()
583 regs_buff[103] = adapter->stats.ptc127; igb_get_regs()
584 regs_buff[104] = adapter->stats.ptc255; igb_get_regs()
585 regs_buff[105] = adapter->stats.ptc511; igb_get_regs()
586 regs_buff[106] = adapter->stats.ptc1023; igb_get_regs()
587 regs_buff[107] = adapter->stats.ptc1522; igb_get_regs()
588 regs_buff[108] = adapter->stats.mptc; igb_get_regs()
589 regs_buff[109] = adapter->stats.bptc; igb_get_regs()
590 regs_buff[110] = adapter->stats.tsctc; igb_get_regs()
591 regs_buff[111] = adapter->stats.iac; igb_get_regs()
592 regs_buff[112] = adapter->stats.rpthc; igb_get_regs()
593 regs_buff[113] = adapter->stats.hgptc; igb_get_regs()
594 regs_buff[114] = adapter->stats.hgorc; igb_get_regs()
595 regs_buff[116] = adapter->stats.hgotc; igb_get_regs()
596 regs_buff[118] = adapter->stats.lenerrs; igb_get_regs()
597 regs_buff[119] = adapter->stats.scvpc; igb_get_regs()
598 regs_buff[120] = adapter->stats.hrmpc; igb_get_regs()
666 regs_buff[551] = adapter->stats.o2bgptc; igb_get_regs()
667 regs_buff[552] = adapter->stats.b2ospc; igb_get_regs()
668 regs_buff[553] = adapter->stats.o2bspc; igb_get_regs()
669 regs_buff[554] = adapter->stats.b2ogprc; igb_get_regs()
2253 struct ethtool_stats *stats, u64 *data) igb_get_ethtool_stats()
2252 igb_get_ethtool_stats(struct net_device *netdev, struct ethtool_stats *stats, u64 *data) igb_get_ethtool_stats() argument
/linux-4.1.27/fs/cifs/
H A Dsmb1ops.c625 atomic_set(&tcon->stats.cifs_stats.num_writes, 0); cifs_clear_stats()
626 atomic_set(&tcon->stats.cifs_stats.num_reads, 0); cifs_clear_stats()
627 atomic_set(&tcon->stats.cifs_stats.num_flushes, 0); cifs_clear_stats()
628 atomic_set(&tcon->stats.cifs_stats.num_oplock_brks, 0); cifs_clear_stats()
629 atomic_set(&tcon->stats.cifs_stats.num_opens, 0); cifs_clear_stats()
630 atomic_set(&tcon->stats.cifs_stats.num_posixopens, 0); cifs_clear_stats()
631 atomic_set(&tcon->stats.cifs_stats.num_posixmkdirs, 0); cifs_clear_stats()
632 atomic_set(&tcon->stats.cifs_stats.num_closes, 0); cifs_clear_stats()
633 atomic_set(&tcon->stats.cifs_stats.num_deletes, 0); cifs_clear_stats()
634 atomic_set(&tcon->stats.cifs_stats.num_mkdirs, 0); cifs_clear_stats()
635 atomic_set(&tcon->stats.cifs_stats.num_rmdirs, 0); cifs_clear_stats()
636 atomic_set(&tcon->stats.cifs_stats.num_renames, 0); cifs_clear_stats()
637 atomic_set(&tcon->stats.cifs_stats.num_t2renames, 0); cifs_clear_stats()
638 atomic_set(&tcon->stats.cifs_stats.num_ffirst, 0); cifs_clear_stats()
639 atomic_set(&tcon->stats.cifs_stats.num_fnext, 0); cifs_clear_stats()
640 atomic_set(&tcon->stats.cifs_stats.num_fclose, 0); cifs_clear_stats()
641 atomic_set(&tcon->stats.cifs_stats.num_hardlinks, 0); cifs_clear_stats()
642 atomic_set(&tcon->stats.cifs_stats.num_symlinks, 0); cifs_clear_stats()
643 atomic_set(&tcon->stats.cifs_stats.num_locks, 0); cifs_clear_stats()
644 atomic_set(&tcon->stats.cifs_stats.num_acl_get, 0); cifs_clear_stats()
645 atomic_set(&tcon->stats.cifs_stats.num_acl_set, 0); cifs_clear_stats()
654 atomic_read(&tcon->stats.cifs_stats.num_oplock_brks)); cifs_print_stats()
656 atomic_read(&tcon->stats.cifs_stats.num_reads), cifs_print_stats()
659 atomic_read(&tcon->stats.cifs_stats.num_writes), cifs_print_stats()
662 atomic_read(&tcon->stats.cifs_stats.num_flushes)); cifs_print_stats()
664 atomic_read(&tcon->stats.cifs_stats.num_locks), cifs_print_stats()
665 atomic_read(&tcon->stats.cifs_stats.num_hardlinks), cifs_print_stats()
666 atomic_read(&tcon->stats.cifs_stats.num_symlinks)); cifs_print_stats()
668 atomic_read(&tcon->stats.cifs_stats.num_opens), cifs_print_stats()
669 atomic_read(&tcon->stats.cifs_stats.num_closes), cifs_print_stats()
670 atomic_read(&tcon->stats.cifs_stats.num_deletes)); cifs_print_stats()
672 atomic_read(&tcon->stats.cifs_stats.num_posixopens), cifs_print_stats()
673 atomic_read(&tcon->stats.cifs_stats.num_posixmkdirs)); cifs_print_stats()
675 atomic_read(&tcon->stats.cifs_stats.num_mkdirs), cifs_print_stats()
676 atomic_read(&tcon->stats.cifs_stats.num_rmdirs)); cifs_print_stats()
678 atomic_read(&tcon->stats.cifs_stats.num_renames), cifs_print_stats()
679 atomic_read(&tcon->stats.cifs_stats.num_t2renames)); cifs_print_stats()
681 atomic_read(&tcon->stats.cifs_stats.num_ffirst), cifs_print_stats()
682 atomic_read(&tcon->stats.cifs_stats.num_fnext), cifs_print_stats()
683 atomic_read(&tcon->stats.cifs_stats.num_fclose)); cifs_print_stats()
/linux-4.1.27/drivers/net/caif/
H A Dcaif_virtio.c98 * @stats: Statistics exposed in sysfs
125 struct cfv_stats stats; member in struct:cfv_info
144 ++cfv->stats.tx_kicks; cfv_release_cb()
204 ++cfv->stats.tx_flow_on; cfv_release_used_buf()
300 ++cfv->ndev->stats.rx_dropped; cfv_rx_poll()
302 ++cfv->ndev->stats.rx_packets; cfv_rx_poll()
303 cfv->ndev->stats.rx_bytes += skb_len; cfv_rx_poll()
310 ++cfv->stats.rx_napi_resched; cfv_rx_poll()
316 ++cfv->stats.rx_napi_complete; cfv_rx_poll()
328 ++cfv->stats.rx_nomem; cfv_rx_poll()
338 cfv->ndev->stats.rx_dropped = riov->used - riov->i; cfv_rx_poll()
354 ++cfv->stats.rx_kicks; cfv_recv()
542 cfv->stats.tx_full_ring++; cfv_netdev_tx()
550 cfv->stats.tx_no_mem++; cfv_netdev_tx()
584 cfv->ndev->stats.tx_packets++; cfv_netdev_tx()
585 cfv->ndev->stats.tx_bytes += skb->len; cfv_netdev_tx()
595 cfv->ndev->stats.tx_dropped++; cfv_netdev_tx()
633 &cfv->stats.rx_napi_complete); debugfs_init()
635 &cfv->stats.rx_napi_resched); debugfs_init()
637 &cfv->stats.rx_nomem); debugfs_init()
639 &cfv->stats.rx_kicks); debugfs_init()
641 &cfv->stats.tx_full_ring); debugfs_init()
643 &cfv->stats.tx_no_mem); debugfs_init()
645 &cfv->stats.tx_kicks); debugfs_init()
647 &cfv->stats.tx_flow_on); debugfs_init()
/linux-4.1.27/drivers/net/ethernet/natsemi/
H A Dsonic.c176 lp->stats.tx_errors++; sonic_tx_timeout()
310 lp->stats.tx_packets++; sonic_interrupt()
311 lp->stats.tx_bytes += sonic_tda_get(dev, entry, SONIC_TD_PKTSIZE); sonic_interrupt()
313 lp->stats.tx_errors++; sonic_interrupt()
315 lp->stats.tx_aborted_errors++; sonic_interrupt()
317 lp->stats.tx_carrier_errors++; sonic_interrupt()
319 lp->stats.tx_window_errors++; sonic_interrupt()
321 lp->stats.tx_fifo_errors++; sonic_interrupt()
351 lp->stats.rx_fifo_errors++; sonic_interrupt()
357 lp->stats.rx_dropped++; sonic_interrupt()
363 lp->stats.rx_dropped++; sonic_interrupt()
369 lp->stats.rx_frame_errors += 65536; sonic_interrupt()
373 lp->stats.rx_crc_errors += 65536; sonic_interrupt()
377 lp->stats.rx_missed_errors += 65536; sonic_interrupt()
427 lp->stats.rx_dropped++; sonic_rx()
439 lp->stats.rx_dropped++; sonic_rx()
450 lp->stats.rx_packets++; sonic_rx()
451 lp->stats.rx_bytes += pkt_len; sonic_rx()
463 lp->stats.rx_errors++; sonic_rx()
465 lp->stats.rx_frame_errors++; sonic_rx()
467 lp->stats.rx_crc_errors++; sonic_rx()
513 lp->stats.rx_crc_errors += SONIC_READ(SONIC_CRCT); sonic_get_stats()
515 lp->stats.rx_frame_errors += SONIC_READ(SONIC_FAET); sonic_get_stats()
517 lp->stats.rx_missed_errors += SONIC_READ(SONIC_MPT); sonic_get_stats()
520 return &lp->stats; sonic_get_stats()
/linux-4.1.27/drivers/net/wireless/hostap/
H A Dhostap_80211_tx.c216 iface->stats.tx_dropped++; hostap_data_start_xmit()
222 iface->stats.tx_dropped++; hostap_data_start_xmit()
230 iface->stats.tx_dropped++; hostap_data_start_xmit()
236 iface->stats.tx_dropped++; hostap_data_start_xmit()
248 iface->stats.tx_packets++; hostap_data_start_xmit()
249 iface->stats.tx_bytes += skb->len; hostap_data_start_xmit()
287 iface->stats.tx_packets++; hostap_mgmt_start_xmit()
288 iface->stats.tx_bytes += skb->len; hostap_mgmt_start_xmit()
406 iface->stats.tx_dropped++; hostap_master_start_xmit()
424 iface->stats.tx_dropped++; hostap_master_start_xmit()
451 iface->stats.tx_dropped++; hostap_master_start_xmit()
457 iface->stats.tx_dropped++; hostap_master_start_xmit()
509 iface->stats.tx_dropped++; hostap_master_start_xmit()
529 iface->stats.tx_dropped++; hostap_master_start_xmit()
536 iface->stats.tx_dropped++; hostap_master_start_xmit()
539 iface->stats.tx_packets++; hostap_master_start_xmit()
540 iface->stats.tx_bytes += skb->len; hostap_master_start_xmit()
/linux-4.1.27/arch/powerpc/platforms/cell/spufs/
H A Dfault.c137 ctx->stats.hash_flt++; spufs_handle_class1()
139 ctx->spu->stats.hash_flt++; spufs_handle_class1()
174 ctx->stats.maj_flt++; spufs_handle_class1()
176 ctx->stats.min_flt++; spufs_handle_class1()
179 ctx->spu->stats.maj_flt++; spufs_handle_class1()
181 ctx->spu->stats.min_flt++; spufs_handle_class1()
/linux-4.1.27/drivers/net/ethernet/intel/ixgbevf/
H A Dmbx.c180 hw->mbx.stats.reqs++; ixgbevf_check_for_msg_vf()
198 hw->mbx.stats.acks++; ixgbevf_check_for_ack_vf()
217 hw->mbx.stats.rsts++; ixgbevf_check_for_rst_vf()
269 /* update stats */ ixgbevf_write_mbx_vf()
270 hw->mbx.stats.msgs_tx++; ixgbevf_write_mbx_vf()
304 /* update stats */ ixgbevf_read_mbx_vf()
305 hw->mbx.stats.msgs_rx++; ixgbevf_read_mbx_vf()
329 mbx->stats.msgs_tx = 0; ixgbevf_init_mbx_params_vf()
330 mbx->stats.msgs_rx = 0; ixgbevf_init_mbx_params_vf()
331 mbx->stats.reqs = 0; ixgbevf_init_mbx_params_vf()
332 mbx->stats.acks = 0; ixgbevf_init_mbx_params_vf()
333 mbx->stats.rsts = 0; ixgbevf_init_mbx_params_vf()
H A Dethtool.c70 {"rx_packets", IXGBEVF_STAT(stats.vfgprc, stats.base_vfgprc,
71 stats.saved_reset_vfgprc)},
72 {"tx_packets", IXGBEVF_STAT(stats.vfgptc, stats.base_vfgptc,
73 stats.saved_reset_vfgptc)},
74 {"rx_bytes", IXGBEVF_STAT(stats.vfgorc, stats.base_vfgorc,
75 stats.saved_reset_vfgorc)},
76 {"tx_bytes", IXGBEVF_STAT(stats.vfgotc, stats.base_vfgotc,
77 stats.saved_reset_vfgotc)},
81 {"multicast", IXGBEVF_STAT(stats.vfmprc, stats.base_vfmprc,
82 stats.saved_reset_vfmprc)},
160 #define IXGBE_GET_STAT(_A_, _R_) (_A_->stats._R_)
408 struct ethtool_stats *stats, u64 *data) ixgbevf_get_ethtool_stats()
418 rx_yields += adapter->rx_ring[i]->stats.yields; ixgbevf_get_ethtool_stats()
419 rx_cleaned += adapter->rx_ring[i]->stats.cleaned; ixgbevf_get_ethtool_stats()
420 rx_yields += adapter->rx_ring[i]->stats.yields; ixgbevf_get_ethtool_stats()
424 tx_yields += adapter->tx_ring[i]->stats.yields; ixgbevf_get_ethtool_stats()
425 tx_cleaned += adapter->tx_ring[i]->stats.cleaned; ixgbevf_get_ethtool_stats()
426 tx_yields += adapter->tx_ring[i]->stats.yields; ixgbevf_get_ethtool_stats()
407 ixgbevf_get_ethtool_stats(struct net_device *netdev, struct ethtool_stats *stats, u64 *data) ixgbevf_get_ethtool_stats() argument
/linux-4.1.27/fs/nfsd/
H A Dstats.c19 * plus generic RPC stats (see net/sunrpc/stats.c)
26 #include <linux/sunrpc/stats.h>
/linux-4.1.27/drivers/net/ethernet/stmicro/stmmac/
H A Dnorm_desc.c33 struct net_device_stats *stats = (struct net_device_stats *)data; ndesc_get_tx_status() local
38 stats->tx_fifo_errors++; ndesc_get_tx_status()
42 stats->tx_carrier_errors++; ndesc_get_tx_status()
46 stats->tx_carrier_errors++; ndesc_get_tx_status()
51 stats->collisions += p->des01.tx.collision_count; ndesc_get_tx_status()
77 struct net_device_stats *stats = (struct net_device_stats *)data; ndesc_get_rx_status() local
82 stats->rx_length_errors++; ndesc_get_rx_status()
97 stats->collisions++; ndesc_get_rx_status()
101 stats->rx_crc_errors++; ndesc_get_rx_status()
H A Ddwmac100_dma.c108 struct net_device_stats *stats = (struct net_device_stats *)data; dwmac100_dma_diagnostic_fr() local
113 stats->rx_over_errors += 0x800; dwmac100_dma_diagnostic_fr()
118 stats->rx_over_errors += ove_cntr; dwmac100_dma_diagnostic_fr()
123 stats->rx_missed_errors += 0xffff; dwmac100_dma_diagnostic_fr()
127 stats->rx_missed_errors += miss_f; dwmac100_dma_diagnostic_fr()
H A Denh_desc.c33 struct net_device_stats *stats = (struct net_device_stats *)data; enh_desc_get_tx_status() local
46 stats->tx_carrier_errors++; enh_desc_get_tx_status()
50 stats->tx_carrier_errors++; enh_desc_get_tx_status()
53 stats->collisions += p->des01.etx.collision_count; enh_desc_get_tx_status()
56 stats->collisions += p->des01.etx.collision_count; enh_desc_get_tx_status()
181 struct net_device_stats *stats = (struct net_device_stats *)data; enh_desc_get_rx_status() local
186 stats->rx_length_errors++; enh_desc_get_rx_status()
195 stats->collisions++; enh_desc_get_rx_status()
205 stats->rx_crc_errors++; enh_desc_get_rx_status()
/linux-4.1.27/drivers/scsi/bfa/
H A Dbfa_port.h39 union bfa_port_stats_u *stats; member in struct:bfa_port_s
59 union bfa_port_stats_u *stats,
101 struct bfa_cee_stats_s *stats; member in struct:bfa_cee_s
121 struct bfa_cee_stats_s *stats,
H A Dbfa_port.c28 bfa_port_stats_swap(struct bfa_port_s *port, union bfa_port_stats_u *stats) bfa_port_stats_swap() argument
30 u32 *dip = (u32 *) stats; bfa_port_stats_swap()
100 memcpy(port->stats, port->stats_dma.kva, bfa_port_get_stats_isr()
102 bfa_port_stats_swap(port, port->stats); bfa_port_get_stats_isr()
105 port->stats->fc.secs_reset = tv.tv_sec - port->stats_reset_time; bfa_port_get_stats_isr()
132 * re-initialize time stamp for stats reset bfa_port_clear_stats_isr()
344 bfa_port_get_stats(struct bfa_port_s *port, union bfa_port_stats_u *stats, bfa_port_get_stats() argument
361 port->stats = stats; bfa_port_get_stats()
494 * initialize time stamp for stats reset bfa_port_attach()
556 * @brief CEE ISR for get-stats responses from f/w
573 memcpy(cee->stats, cee->stats_dma.kva, bfa_cee_get_stats_isr()
575 /* swap the cee stats */ bfa_cee_get_stats_isr()
576 buffer = (u32 *)cee->stats; bfa_cee_get_stats_isr()
592 * @brief CEE ISR for reset-stats responses from f/w
645 cee->stats = (struct bfa_cee_stats_s *) (dma_kva + BFA_ROUNDUP( bfa_cee_mem_claim()
701 bfa_cee_get_stats(struct bfa_cee_s *cee, struct bfa_cee_stats_s *stats, bfa_cee_get_stats() argument
718 cee->stats = stats; bfa_cee_get_stats()
/linux-4.1.27/fs/jbd2/
H A Dcommit.c372 struct transaction_stats_s stats; jbd2_journal_commit_transaction() local
443 stats.run.rs_wait = commit_transaction->t_max_wait; jbd2_journal_commit_transaction()
444 stats.run.rs_request_delay = 0; jbd2_journal_commit_transaction()
445 stats.run.rs_locked = jiffies; jbd2_journal_commit_transaction()
447 stats.run.rs_request_delay = jbd2_journal_commit_transaction()
449 stats.run.rs_locked); jbd2_journal_commit_transaction()
450 stats.run.rs_running = jbd2_time_diff(commit_transaction->t_start, jbd2_journal_commit_transaction()
451 stats.run.rs_locked); jbd2_journal_commit_transaction()
536 stats.run.rs_flushing = jiffies; jbd2_journal_commit_transaction()
537 stats.run.rs_locked = jbd2_time_diff(stats.run.rs_locked, jbd2_journal_commit_transaction()
538 stats.run.rs_flushing); jbd2_journal_commit_transaction()
574 stats.run.rs_logging = jiffies; jbd2_journal_commit_transaction()
575 stats.run.rs_flushing = jbd2_time_diff(stats.run.rs_flushing, jbd2_journal_commit_transaction()
576 stats.run.rs_logging); jbd2_journal_commit_transaction()
577 stats.run.rs_blocks = jbd2_journal_commit_transaction()
579 stats.run.rs_blocks_logged = 0; jbd2_journal_commit_transaction()
746 stats.run.rs_blocks_logged += bufs; jbd2_journal_commit_transaction()
1097 stats.run.rs_logging = jbd2_time_diff(stats.run.rs_logging, jbd2_journal_commit_transaction()
1103 stats.ts_tid = commit_transaction->t_tid; jbd2_journal_commit_transaction()
1104 stats.run.rs_handle_count = jbd2_journal_commit_transaction()
1107 commit_transaction->t_tid, &stats.run); jbd2_journal_commit_transaction()
1108 stats.ts_requested = (commit_transaction->t_requested) ? 1 : 0; jbd2_journal_commit_transaction()
1149 * Calculate overall stats jbd2_journal_commit_transaction()
1153 journal->j_stats.ts_requested += stats.ts_requested; jbd2_journal_commit_transaction()
1154 journal->j_stats.run.rs_wait += stats.run.rs_wait; jbd2_journal_commit_transaction()
1155 journal->j_stats.run.rs_request_delay += stats.run.rs_request_delay; jbd2_journal_commit_transaction()
1156 journal->j_stats.run.rs_running += stats.run.rs_running; jbd2_journal_commit_transaction()
1157 journal->j_stats.run.rs_locked += stats.run.rs_locked; jbd2_journal_commit_transaction()
1158 journal->j_stats.run.rs_flushing += stats.run.rs_flushing; jbd2_journal_commit_transaction()
1159 journal->j_stats.run.rs_logging += stats.run.rs_logging; jbd2_journal_commit_transaction()
1160 journal->j_stats.run.rs_handle_count += stats.run.rs_handle_count; jbd2_journal_commit_transaction()
1161 journal->j_stats.run.rs_blocks += stats.run.rs_blocks; jbd2_journal_commit_transaction()
1162 journal->j_stats.run.rs_blocks_logged += stats.run.rs_blocks_logged; jbd2_journal_commit_transaction()
/linux-4.1.27/net/mac802154/
H A Dtx.c65 dev->stats.tx_packets++; ieee802154_xmit_worker()
66 dev->stats.tx_bytes += skb->len; ieee802154_xmit_worker()
106 dev->stats.tx_packets++; ieee802154_tx()
107 dev->stats.tx_bytes += skb->len; ieee802154_tx()
/linux-4.1.27/drivers/net/arcnet/
H A Drfc1201.c124 dev->stats.rx_errors++; type_trans()
125 dev->stats.rx_crc_errors++; type_trans()
175 dev->stats.rx_errors++; rx()
176 dev->stats.rx_missed_errors++; rx()
184 dev->stats.rx_dropped++; rx()
216 dev->stats.rx_crc_errors++; rx()
225 dev->stats.rx_errors++; rx()
226 dev->stats.rx_crc_errors++; rx()
260 dev->stats.rx_errors++; rx()
261 dev->stats.rx_missed_errors++; rx()
272 dev->stats.rx_errors++; rx()
273 dev->stats.rx_missed_errors++; rx()
284 dev->stats.rx_errors++; rx()
285 dev->stats.rx_length_errors++; rx()
293 dev->stats.rx_dropped++; rx()
317 dev->stats.rx_errors++; rx()
318 dev->stats.rx_missed_errors++; rx()
328 dev->stats.rx_errors++; rx()
329 dev->stats.rx_frame_errors++; rx()
339 dev->stats.rx_errors++; rx()
340 dev->stats.rx_missed_errors++; rx()
407 dev->stats.tx_errors++; build_header()
408 dev->stats.tx_aborted_errors++; build_header()
/linux-4.1.27/drivers/net/ethernet/amd/
H A Dariadne.c180 dev->stats.rx_errors++; ariadne_rx()
182 dev->stats.rx_frame_errors++; ariadne_rx()
184 dev->stats.rx_over_errors++; ariadne_rx()
186 dev->stats.rx_crc_errors++; ariadne_rx()
188 dev->stats.rx_fifo_errors++; ariadne_rx()
202 dev->stats.rx_dropped++; ariadne_rx()
222 dev->stats.rx_packets++; ariadne_rx()
223 dev->stats.rx_bytes += pkt_len; ariadne_rx()
233 * If not, we should free one and mark stats->rx_dropped++ ariadne_rx()
320 dev->stats.tx_errors++; ariadne_interrupt()
322 dev->stats.tx_aborted_errors++; ariadne_interrupt()
324 dev->stats.tx_carrier_errors++; ariadne_interrupt()
326 dev->stats.tx_window_errors++; ariadne_interrupt()
329 dev->stats.tx_fifo_errors++; ariadne_interrupt()
338 dev->stats.collisions++; ariadne_interrupt()
339 dev->stats.tx_packets++; ariadne_interrupt()
366 dev->stats.tx_errors++; /* Tx babble */ ariadne_interrupt()
370 dev->stats.rx_errors++; /* Missed a Rx frame */ ariadne_interrupt()
504 dev->stats.rx_missed_errors = swapw(lance->RDP); ariadne_close()
511 dev->stats.rx_missed_errors); ariadne_close()
606 dev->stats.tx_bytes += len; ariadne_start_xmit()
630 dev->stats.rx_missed_errors = swapw(lance->RDP); ariadne_get_stats()
634 return &dev->stats; ariadne_get_stats()
H A Da2065.c275 dev->stats.rx_over_errors++; lance_rx()
276 dev->stats.rx_errors++; lance_rx()
283 dev->stats.rx_fifo_errors++; lance_rx()
285 dev->stats.rx_crc_errors++; lance_rx()
287 dev->stats.rx_over_errors++; lance_rx()
289 dev->stats.rx_frame_errors++; lance_rx()
291 dev->stats.rx_errors++; lance_rx()
297 dev->stats.rx_dropped++; lance_rx()
311 dev->stats.rx_packets++; lance_rx()
312 dev->stats.rx_bytes += len; lance_rx()
347 dev->stats.tx_errors++; lance_tx()
349 dev->stats.tx_aborted_errors++; lance_tx()
351 dev->stats.tx_window_errors++; lance_tx()
354 dev->stats.tx_carrier_errors++; lance_tx()
373 dev->stats.tx_fifo_errors++; lance_tx()
390 dev->stats.collisions++; lance_tx()
394 dev->stats.collisions += 2; lance_tx()
396 dev->stats.tx_packets++; lance_tx()
443 dev->stats.tx_errors++; /* Tx babble. */ lance_interrupt()
445 dev->stats.rx_errors++; /* Missed a Rx frame. */ lance_interrupt()
569 dev->stats.tx_bytes += skblen; lance_start_xmit()
H A D7990.c303 dev->stats.rx_over_errors++; lance_rx()
304 dev->stats.rx_errors++; lance_rx()
311 dev->stats.rx_fifo_errors++; lance_rx()
313 dev->stats.rx_crc_errors++; lance_rx()
315 dev->stats.rx_over_errors++; lance_rx()
317 dev->stats.rx_frame_errors++; lance_rx()
319 dev->stats.rx_errors++; lance_rx()
325 dev->stats.rx_dropped++; lance_rx()
339 dev->stats.rx_packets++; lance_rx()
340 dev->stats.rx_bytes += len; lance_rx()
377 dev->stats.tx_errors++; lance_tx()
379 dev->stats.tx_aborted_errors++; lance_tx()
381 dev->stats.tx_window_errors++; lance_tx()
384 dev->stats.tx_carrier_errors++; lance_tx()
403 dev->stats.tx_fifo_errors++; lance_tx()
423 dev->stats.collisions++; lance_tx()
427 dev->stats.collisions += 2; lance_tx()
429 dev->stats.tx_packets++; lance_tx()
474 dev->stats.tx_errors++; /* Tx babble. */ lance_interrupt()
476 dev->stats.rx_errors++; /* Missed a Rx frame. */ lance_interrupt()
H A Dsunlance.c522 dev->stats.rx_over_errors++; lance_rx_dvma()
523 dev->stats.rx_errors++; lance_rx_dvma()
528 if (bits & LE_R1_BUF) dev->stats.rx_fifo_errors++; lance_rx_dvma()
529 if (bits & LE_R1_CRC) dev->stats.rx_crc_errors++; lance_rx_dvma()
530 if (bits & LE_R1_OFL) dev->stats.rx_over_errors++; lance_rx_dvma()
531 if (bits & LE_R1_FRA) dev->stats.rx_frame_errors++; lance_rx_dvma()
532 if (bits & LE_R1_EOP) dev->stats.rx_errors++; lance_rx_dvma()
538 dev->stats.rx_dropped++; lance_rx_dvma()
545 dev->stats.rx_bytes += len; lance_rx_dvma()
554 dev->stats.rx_packets++; lance_rx_dvma()
586 dev->stats.tx_errors++; lance_tx_dvma()
587 if (status & LE_T3_RTY) dev->stats.tx_aborted_errors++; lance_tx_dvma()
588 if (status & LE_T3_LCOL) dev->stats.tx_window_errors++; lance_tx_dvma()
591 dev->stats.tx_carrier_errors++; lance_tx_dvma()
608 dev->stats.tx_fifo_errors++; lance_tx_dvma()
626 dev->stats.collisions++; lance_tx_dvma()
630 dev->stats.collisions += 2; lance_tx_dvma()
632 dev->stats.tx_packets++; lance_tx_dvma()
692 dev->stats.rx_over_errors++; lance_rx_pio()
693 dev->stats.rx_errors++; lance_rx_pio()
698 if (bits & LE_R1_BUF) dev->stats.rx_fifo_errors++; lance_rx_pio()
699 if (bits & LE_R1_CRC) dev->stats.rx_crc_errors++; lance_rx_pio()
700 if (bits & LE_R1_OFL) dev->stats.rx_over_errors++; lance_rx_pio()
701 if (bits & LE_R1_FRA) dev->stats.rx_frame_errors++; lance_rx_pio()
702 if (bits & LE_R1_EOP) dev->stats.rx_errors++; lance_rx_pio()
708 dev->stats.rx_dropped++; lance_rx_pio()
715 dev->stats.rx_bytes += len; lance_rx_pio()
722 dev->stats.rx_packets++; lance_rx_pio()
754 dev->stats.tx_errors++; lance_tx_pio()
755 if (status & LE_T3_RTY) dev->stats.tx_aborted_errors++; lance_tx_pio()
756 if (status & LE_T3_LCOL) dev->stats.tx_window_errors++; lance_tx_pio()
759 dev->stats.tx_carrier_errors++; lance_tx_pio()
776 dev->stats.tx_fifo_errors++; lance_tx_pio()
794 dev->stats.collisions++; lance_tx_pio()
798 dev->stats.collisions += 2; lance_tx_pio()
800 dev->stats.tx_packets++; lance_tx_pio()
841 dev->stats.tx_errors++; lance_interrupt()
844 dev->stats.rx_errors++; lance_interrupt()
1120 dev->stats.tx_bytes += len; lance_start_xmit()
/linux-4.1.27/drivers/block/zram/
H A Dzram_drv.c63 (u64)atomic64_read(&zram->stats.name)); \
92 atomic64_add(nr_migrated, &zram->stats.num_migrated); compact_store()
126 (u64)(atomic64_read(&zram->stats.pages_stored)) << PAGE_SHIFT); orig_data_size_show()
200 val = atomic_long_read(&zram->stats.max_used_pages); mem_used_max_show()
220 atomic_long_set(&zram->stats.max_used_pages, mem_used_max_store()
464 atomic64_dec(&zram->stats.zero_pages); zram_free_page()
472 &zram->stats.compr_data_size); zram_free_page()
473 atomic64_dec(&zram->stats.pages_stored); zram_free_page()
569 old_max = atomic_long_read(&zram->stats.max_used_pages); update_used_max()
575 &zram->stats.max_used_pages, cur_max, pages); update_used_max()
630 atomic64_inc(&zram->stats.zero_pages); zram_bvec_write()
695 /* Update stats */ zram_bvec_write()
696 atomic64_add(clen, &zram->stats.compr_data_size); zram_bvec_write()
697 atomic64_inc(&zram->stats.pages_stored); zram_bvec_write()
716 atomic64_inc(&zram->stats.num_reads); zram_bvec_rw()
719 atomic64_inc(&zram->stats.num_writes); zram_bvec_rw()
727 atomic64_inc(&zram->stats.failed_reads); zram_bvec_rw()
729 atomic64_inc(&zram->stats.failed_writes); zram_bvec_rw()
768 atomic64_inc(&zram->stats.notify_free); zram_bio_discard()
804 /* Reset stats */ zram_reset_device()
805 memset(&zram->stats, 0, sizeof(zram->stats)); zram_reset_device()
988 atomic64_inc(&zram->stats.invalid_io); zram_make_request()
1013 atomic64_inc(&zram->stats.notify_free); zram_slot_free_notify()
1029 atomic64_inc(&zram->stats.invalid_io); zram_rw_page()
1084 (u64)atomic64_read(&zram->stats.failed_reads), io_stat_show()
1085 (u64)atomic64_read(&zram->stats.failed_writes), io_stat_show()
1086 (u64)atomic64_read(&zram->stats.invalid_io), io_stat_show()
1087 (u64)atomic64_read(&zram->stats.notify_free)); io_stat_show()
1105 orig_size = atomic64_read(&zram->stats.pages_stored); mm_stat_show()
1106 max_used = atomic_long_read(&zram->stats.max_used_pages); mm_stat_show()
1111 (u64)atomic64_read(&zram->stats.compr_data_size), mm_stat_show()
1115 (u64)atomic64_read(&zram->stats.zero_pages), mm_stat_show()
1116 (u64)atomic64_read(&zram->stats.num_migrated)); mm_stat_show()
/linux-4.1.27/drivers/scsi/bnx2i/
H A Dbnx2i_init.c384 struct iscsi_stats_info *stats; bnx2i_get_stats() local
389 stats = (struct iscsi_stats_info *)hba->cnic->stats_addr; bnx2i_get_stats()
391 if (!stats) bnx2i_get_stats()
394 strlcpy(stats->version, DRV_MODULE_VERSION, sizeof(stats->version)); bnx2i_get_stats()
395 memcpy(stats->mac_add1 + 2, hba->cnic->mac_addr, ETH_ALEN); bnx2i_get_stats()
397 stats->max_frame_size = hba->netdev->mtu; bnx2i_get_stats()
398 stats->txq_size = hba->max_sqes; bnx2i_get_stats()
399 stats->rxq_size = hba->max_cqes; bnx2i_get_stats()
401 stats->txq_avg_depth = 0; bnx2i_get_stats()
402 stats->rxq_avg_depth = 0; bnx2i_get_stats()
404 GET_STATS_64(hba, stats, rx_pdus); bnx2i_get_stats()
405 GET_STATS_64(hba, stats, rx_bytes); bnx2i_get_stats()
407 GET_STATS_64(hba, stats, tx_pdus); bnx2i_get_stats()
408 GET_STATS_64(hba, stats, tx_bytes); bnx2i_get_stats()
/linux-4.1.27/drivers/net/ethernet/chelsio/cxgb/
H A Dvsc7326.c565 /* Clear stats */ mac_disable()
570 memset(&mac->stats, 0, sizeof(struct cmac_statistics)); mac_disable()
600 /* Rx stats */ port_stats_update()
614 /* Tx stats (skip collision stats as we are full-duplex only) */ port_stats_update()
623 u64 *stats = (u64 *)&mac->stats; port_stats_update() local
627 rmon_update(mac, CRA(0x4, port, p->reg), stats + p->offset); port_stats_update()
629 rmon_update(mac, REG_TX_OK_BYTES(port), &mac->stats.TxOctetsOK); port_stats_update()
630 rmon_update(mac, REG_RX_OK_BYTES(port), &mac->stats.RxOctetsOK); port_stats_update()
631 rmon_update(mac, REG_RX_BAD_BYTES(port), &mac->stats.RxOctetsBad); port_stats_update()
654 &mac->stats.RxOctetsOK); mac_update_statistics()
656 &mac->stats.RxOctetsBad); mac_update_statistics()
658 &mac->stats.TxOctetsOK); mac_update_statistics()
661 return &mac->stats; mac_update_statistics()
/linux-4.1.27/drivers/net/ethernet/intel/e1000/
H A De1000_main.c2512 hw->tx_packet_delta = adapter->stats.tpt - adapter->tpt_old; e1000_watchdog()
2513 adapter->tpt_old = adapter->stats.tpt; e1000_watchdog()
2514 hw->collision_delta = adapter->stats.colc - adapter->colc_old; e1000_watchdog()
2515 adapter->colc_old = adapter->stats.colc; e1000_watchdog()
2517 adapter->gorcl = adapter->stats.gorcl - adapter->gorcl_old; e1000_watchdog()
2518 adapter->gorcl_old = adapter->stats.gorcl; e1000_watchdog()
2519 adapter->gotcl = adapter->stats.gotcl - adapter->gotcl_old; e1000_watchdog()
2520 adapter->gotcl_old = adapter->stats.gotcl; e1000_watchdog()
3520 /* only return the current stats */ e1000_get_stats()
3521 return &netdev->stats; e1000_get_stats()
3617 /* Prevent stats update while adapter is being reset, or if the pci e1000_update_stats()
3632 adapter->stats.crcerrs += er32(CRCERRS); e1000_update_stats()
3633 adapter->stats.gprc += er32(GPRC); e1000_update_stats()
3634 adapter->stats.gorcl += er32(GORCL); e1000_update_stats()
3635 adapter->stats.gorch += er32(GORCH); e1000_update_stats()
3636 adapter->stats.bprc += er32(BPRC); e1000_update_stats()
3637 adapter->stats.mprc += er32(MPRC); e1000_update_stats()
3638 adapter->stats.roc += er32(ROC); e1000_update_stats()
3640 adapter->stats.prc64 += er32(PRC64); e1000_update_stats()
3641 adapter->stats.prc127 += er32(PRC127); e1000_update_stats()
3642 adapter->stats.prc255 += er32(PRC255); e1000_update_stats()
3643 adapter->stats.prc511 += er32(PRC511); e1000_update_stats()
3644 adapter->stats.prc1023 += er32(PRC1023); e1000_update_stats()
3645 adapter->stats.prc1522 += er32(PRC1522); e1000_update_stats()
3647 adapter->stats.symerrs += er32(SYMERRS); e1000_update_stats()
3648 adapter->stats.mpc += er32(MPC); e1000_update_stats()
3649 adapter->stats.scc += er32(SCC); e1000_update_stats()
3650 adapter->stats.ecol += er32(ECOL); e1000_update_stats()
3651 adapter->stats.mcc += er32(MCC); e1000_update_stats()
3652 adapter->stats.latecol += er32(LATECOL); e1000_update_stats()
3653 adapter->stats.dc += er32(DC); e1000_update_stats()
3654 adapter->stats.sec += er32(SEC); e1000_update_stats()
3655 adapter->stats.rlec += er32(RLEC); e1000_update_stats()
3656 adapter->stats.xonrxc += er32(XONRXC); e1000_update_stats()
3657 adapter->stats.xontxc += er32(XONTXC); e1000_update_stats()
3658 adapter->stats.xoffrxc += er32(XOFFRXC); e1000_update_stats()
3659 adapter->stats.xofftxc += er32(XOFFTXC); e1000_update_stats()
3660 adapter->stats.fcruc += er32(FCRUC); e1000_update_stats()
3661 adapter->stats.gptc += er32(GPTC); e1000_update_stats()
3662 adapter->stats.gotcl += er32(GOTCL); e1000_update_stats()
3663 adapter->stats.gotch += er32(GOTCH); e1000_update_stats()
3664 adapter->stats.rnbc += er32(RNBC); e1000_update_stats()
3665 adapter->stats.ruc += er32(RUC); e1000_update_stats()
3666 adapter->stats.rfc += er32(RFC); e1000_update_stats()
3667 adapter->stats.rjc += er32(RJC); e1000_update_stats()
3668 adapter->stats.torl += er32(TORL); e1000_update_stats()
3669 adapter->stats.torh += er32(TORH); e1000_update_stats()
3670 adapter->stats.totl += er32(TOTL); e1000_update_stats()
3671 adapter->stats.toth += er32(TOTH); e1000_update_stats()
3672 adapter->stats.tpr += er32(TPR); e1000_update_stats()
3674 adapter->stats.ptc64 += er32(PTC64); e1000_update_stats()
3675 adapter->stats.ptc127 += er32(PTC127); e1000_update_stats()
3676 adapter->stats.ptc255 += er32(PTC255); e1000_update_stats()
3677 adapter->stats.ptc511 += er32(PTC511); e1000_update_stats()
3678 adapter->stats.ptc1023 += er32(PTC1023); e1000_update_stats()
3679 adapter->stats.ptc1522 += er32(PTC1522); e1000_update_stats()
3681 adapter->stats.mptc += er32(MPTC); e1000_update_stats()
3682 adapter->stats.bptc += er32(BPTC); e1000_update_stats()
3687 adapter->stats.tpt += hw->tx_packet_delta; e1000_update_stats()
3689 adapter->stats.colc += hw->collision_delta; e1000_update_stats()
3692 adapter->stats.algnerrc += er32(ALGNERRC); e1000_update_stats()
3693 adapter->stats.rxerrc += er32(RXERRC); e1000_update_stats()
3694 adapter->stats.tncrs += er32(TNCRS); e1000_update_stats()
3695 adapter->stats.cexterr += er32(CEXTERR); e1000_update_stats()
3696 adapter->stats.tsctc += er32(TSCTC); e1000_update_stats()
3697 adapter->stats.tsctfc += er32(TSCTFC); e1000_update_stats()
3701 netdev->stats.multicast = adapter->stats.mprc; e1000_update_stats()
3702 netdev->stats.collisions = adapter->stats.colc; e1000_update_stats()
3709 netdev->stats.rx_errors = adapter->stats.rxerrc + e1000_update_stats()
3710 adapter->stats.crcerrs + adapter->stats.algnerrc + e1000_update_stats()
3711 adapter->stats.ruc + adapter->stats.roc + e1000_update_stats()
3712 adapter->stats.cexterr; e1000_update_stats()
3713 adapter->stats.rlerrc = adapter->stats.ruc + adapter->stats.roc; e1000_update_stats()
3714 netdev->stats.rx_length_errors = adapter->stats.rlerrc; e1000_update_stats()
3715 netdev->stats.rx_crc_errors = adapter->stats.crcerrs; e1000_update_stats()
3716 netdev->stats.rx_frame_errors = adapter->stats.algnerrc; e1000_update_stats()
3717 netdev->stats.rx_missed_errors = adapter->stats.mpc; e1000_update_stats()
3720 adapter->stats.txerrc = adapter->stats.ecol + adapter->stats.latecol; e1000_update_stats()
3721 netdev->stats.tx_errors = adapter->stats.txerrc; e1000_update_stats()
3722 netdev->stats.tx_aborted_errors = adapter->stats.ecol; e1000_update_stats()
3723 netdev->stats.tx_window_errors = adapter->stats.latecol; e1000_update_stats()
3724 netdev->stats.tx_carrier_errors = adapter->stats.tncrs; e1000_update_stats()
3727 netdev->stats.tx_carrier_errors = 0; e1000_update_stats()
3728 adapter->stats.tncrs = 0; e1000_update_stats()
3749 adapter->stats.mgptc += er32(MGTPTC); e1000_update_stats()
3750 adapter->stats.mgprc += er32(MGTPRC); e1000_update_stats()
3751 adapter->stats.mgpdc += er32(MGTPDC); e1000_update_stats()
3940 netdev->stats.tx_bytes += total_tx_bytes; e1000_clean_tx_irq()
3941 netdev->stats.tx_packets += total_tx_packets; e1000_clean_tx_irq()
4024 struct e1000_hw_stats *stats, e1000_tbi_adjust_stats()
4036 stats->crcerrs--; e1000_tbi_adjust_stats()
4038 stats->gprc++; e1000_tbi_adjust_stats()
4041 carry_bit = 0x80000000 & stats->gorcl; e1000_tbi_adjust_stats()
4042 stats->gorcl += frame_len; e1000_tbi_adjust_stats()
4050 if (carry_bit && ((stats->gorcl & 0x80000000) == 0)) e1000_tbi_adjust_stats()
4051 stats->gorch++; e1000_tbi_adjust_stats()
4057 stats->bprc++; e1000_tbi_adjust_stats()
4059 stats->mprc++; e1000_tbi_adjust_stats()
4065 if (stats->roc > 0) e1000_tbi_adjust_stats()
4066 stats->roc--; e1000_tbi_adjust_stats()
4073 stats->prc64++; e1000_tbi_adjust_stats()
4074 stats->prc127--; e1000_tbi_adjust_stats()
4076 stats->prc127++; e1000_tbi_adjust_stats()
4077 stats->prc255--; e1000_tbi_adjust_stats()
4079 stats->prc255++; e1000_tbi_adjust_stats()
4080 stats->prc511--; e1000_tbi_adjust_stats()
4082 stats->prc511++; e1000_tbi_adjust_stats()
4083 stats->prc1023--; e1000_tbi_adjust_stats()
4085 stats->prc1023++; e1000_tbi_adjust_stats()
4086 stats->prc1522--; e1000_tbi_adjust_stats()
4088 stats->prc1522++; e1000_tbi_adjust_stats()
4103 e1000_tbi_adjust_stats(hw, &adapter->stats, length, data); e1000_tbi_should_accept()
4316 netdev->stats.rx_bytes += total_rx_bytes; e1000_clean_jumbo_rx_irq()
4317 netdev->stats.rx_packets += total_rx_packets; e1000_clean_jumbo_rx_irq()
4487 netdev->stats.rx_bytes += total_rx_bytes; e1000_clean_rx_irq()
4488 netdev->stats.rx_packets += total_rx_packets; e1000_clean_rx_irq()
4023 e1000_tbi_adjust_stats(struct e1000_hw *hw, struct e1000_hw_stats *stats, u32 frame_len, const u8 *mac_addr) e1000_tbi_adjust_stats() argument
H A De1000_ethtool.c47 { "rx_packets", E1000_STAT(stats.gprc) },
48 { "tx_packets", E1000_STAT(stats.gptc) },
49 { "rx_bytes", E1000_STAT(stats.gorcl) },
50 { "tx_bytes", E1000_STAT(stats.gotcl) },
51 { "rx_broadcast", E1000_STAT(stats.bprc) },
52 { "tx_broadcast", E1000_STAT(stats.bptc) },
53 { "rx_multicast", E1000_STAT(stats.mprc) },
54 { "tx_multicast", E1000_STAT(stats.mptc) },
55 { "rx_errors", E1000_STAT(stats.rxerrc) },
56 { "tx_errors", E1000_STAT(stats.txerrc) },
57 { "tx_dropped", E1000_NETDEV_STAT(stats.tx_dropped) },
58 { "multicast", E1000_STAT(stats.mprc) },
59 { "collisions", E1000_STAT(stats.colc) },
60 { "rx_length_errors", E1000_STAT(stats.rlerrc) },
61 { "rx_over_errors", E1000_NETDEV_STAT(stats.rx_over_errors) },
62 { "rx_crc_errors", E1000_STAT(stats.crcerrs) },
63 { "rx_frame_errors", E1000_NETDEV_STAT(stats.rx_frame_errors) },
64 { "rx_no_buffer_count", E1000_STAT(stats.rnbc) },
65 { "rx_missed_errors", E1000_STAT(stats.mpc) },
66 { "tx_aborted_errors", E1000_STAT(stats.ecol) },
67 { "tx_carrier_errors", E1000_STAT(stats.tncrs) },
68 { "tx_fifo_errors", E1000_NETDEV_STAT(stats.tx_fifo_errors) },
69 { "tx_heartbeat_errors", E1000_NETDEV_STAT(stats.tx_heartbeat_errors) },
70 { "tx_window_errors", E1000_STAT(stats.latecol) },
71 { "tx_abort_late_coll", E1000_STAT(stats.latecol) },
72 { "tx_deferred_ok", E1000_STAT(stats.dc) },
73 { "tx_single_coll_ok", E1000_STAT(stats.scc) },
74 { "tx_multi_coll_ok", E1000_STAT(stats.mcc) },
77 { "rx_long_length_errors", E1000_STAT(stats.roc) },
78 { "rx_short_length_errors", E1000_STAT(stats.ruc) },
79 { "rx_align_errors", E1000_STAT(stats.algnerrc) },
80 { "tx_tcp_seg_good", E1000_STAT(stats.tsctc) },
81 { "tx_tcp_seg_failed", E1000_STAT(stats.tsctfc) },
82 { "rx_flow_control_xon", E1000_STAT(stats.xonrxc) },
83 { "rx_flow_control_xoff", E1000_STAT(stats.xoffrxc) },
84 { "tx_flow_control_xon", E1000_STAT(stats.xontxc) },
85 { "tx_flow_control_xoff", E1000_STAT(stats.xofftxc) },
86 { "rx_long_byte_count", E1000_STAT(stats.gorcl) },
90 { "tx_smbus", E1000_STAT(stats.mgptc) },
91 { "rx_smbus", E1000_STAT(stats.mgprc) },
92 { "dropped_smbus", E1000_STAT(stats.mgpdc) },
1826 struct ethtool_stats *stats, u64 *data) e1000_get_ethtool_stats()
1825 e1000_get_ethtool_stats(struct net_device *netdev, struct ethtool_stats *stats, u64 *data) e1000_get_ethtool_stats() argument
/linux-4.1.27/block/
H A Dcfq-iosched.c292 struct cfqg_stats stats; /* stats for this cfqg */ member in struct:cfq_group
293 struct cfqg_stats dead_stats; /* stats pushed from dead children */
461 /* cfqg stats flags */
469 static inline void cfqg_stats_mark_##name(struct cfqg_stats *stats) \
471 stats->flags |= (1 << CFQG_stats_##name); \
473 static inline void cfqg_stats_clear_##name(struct cfqg_stats *stats) \
475 stats->flags &= ~(1 << CFQG_stats_##name); \
477 static inline int cfqg_stats_##name(struct cfqg_stats *stats) \
479 return (stats->flags & (1 << CFQG_stats_##name)) != 0; \
488 static void cfqg_stats_update_group_wait_time(struct cfqg_stats *stats) cfqg_stats_update_group_wait_time() argument
492 if (!cfqg_stats_waiting(stats)) cfqg_stats_update_group_wait_time()
496 if (time_after64(now, stats->start_group_wait_time)) cfqg_stats_update_group_wait_time()
497 blkg_stat_add(&stats->group_wait_time, cfqg_stats_update_group_wait_time()
498 now - stats->start_group_wait_time); cfqg_stats_update_group_wait_time()
499 cfqg_stats_clear_waiting(stats); cfqg_stats_update_group_wait_time()
506 struct cfqg_stats *stats = &cfqg->stats; cfqg_stats_set_start_group_wait_time() local
508 if (cfqg_stats_waiting(stats)) cfqg_stats_set_start_group_wait_time()
512 stats->start_group_wait_time = sched_clock(); cfqg_stats_set_start_group_wait_time()
513 cfqg_stats_mark_waiting(stats); cfqg_stats_set_start_group_wait_time()
517 static void cfqg_stats_end_empty_time(struct cfqg_stats *stats) cfqg_stats_end_empty_time() argument
521 if (!cfqg_stats_empty(stats)) cfqg_stats_end_empty_time()
525 if (time_after64(now, stats->start_empty_time)) cfqg_stats_end_empty_time()
526 blkg_stat_add(&stats->empty_time, cfqg_stats_end_empty_time()
527 now - stats->start_empty_time); cfqg_stats_end_empty_time()
528 cfqg_stats_clear_empty(stats); cfqg_stats_end_empty_time()
533 blkg_stat_add(&cfqg->stats.dequeue, 1); cfqg_stats_update_dequeue()
538 struct cfqg_stats *stats = &cfqg->stats; cfqg_stats_set_start_empty_time() local
540 if (blkg_rwstat_total(&stats->queued)) cfqg_stats_set_start_empty_time()
548 if (cfqg_stats_empty(stats)) cfqg_stats_set_start_empty_time()
551 stats->start_empty_time = sched_clock(); cfqg_stats_set_start_empty_time()
552 cfqg_stats_mark_empty(stats); cfqg_stats_set_start_empty_time()
557 struct cfqg_stats *stats = &cfqg->stats; cfqg_stats_update_idle_time() local
559 if (cfqg_stats_idling(stats)) { cfqg_stats_update_idle_time()
562 if (time_after64(now, stats->start_idle_time)) cfqg_stats_update_idle_time()
563 blkg_stat_add(&stats->idle_time, cfqg_stats_update_idle_time()
564 now - stats->start_idle_time); cfqg_stats_update_idle_time()
565 cfqg_stats_clear_idling(stats); cfqg_stats_update_idle_time()
571 struct cfqg_stats *stats = &cfqg->stats; cfqg_stats_set_start_idle_time() local
573 BUG_ON(cfqg_stats_idling(stats)); cfqg_stats_set_start_idle_time()
575 stats->start_idle_time = sched_clock(); cfqg_stats_set_start_idle_time()
576 cfqg_stats_mark_idling(stats); cfqg_stats_set_start_idle_time()
581 struct cfqg_stats *stats = &cfqg->stats; cfqg_stats_update_avg_queue_size() local
583 blkg_stat_add(&stats->avg_queue_size_sum, cfqg_stats_update_avg_queue_size()
584 blkg_rwstat_total(&stats->queued)); cfqg_stats_update_avg_queue_size()
585 blkg_stat_add(&stats->avg_queue_size_samples, 1); cfqg_stats_update_avg_queue_size()
586 cfqg_stats_update_group_wait_time(stats); cfqg_stats_update_avg_queue_size()
592 static inline void cfqg_stats_end_empty_time(struct cfqg_stats *stats) { } cfqg_stats_update_dequeue() argument
647 blkg_rwstat_add(&cfqg->stats.queued, rw, 1); cfqg_stats_update_io_add()
648 cfqg_stats_end_empty_time(&cfqg->stats); cfqg_stats_update_io_add()
655 blkg_stat_add(&cfqg->stats.time, time); cfqg_stats_update_timeslice_used()
657 blkg_stat_add(&cfqg->stats.unaccounted_time, unaccounted_time); cfqg_stats_update_timeslice_used()
663 blkg_rwstat_add(&cfqg->stats.queued, rw, -1); cfqg_stats_update_io_remove()
668 blkg_rwstat_add(&cfqg->stats.merged, rw, 1); cfqg_stats_update_io_merged()
674 blkg_stat_add(&cfqg->stats.sectors, bytes >> 9); cfqg_stats_update_dispatch()
675 blkg_rwstat_add(&cfqg->stats.serviced, rw, 1); cfqg_stats_update_dispatch()
676 blkg_rwstat_add(&cfqg->stats.service_bytes, rw, bytes); cfqg_stats_update_dispatch()
682 struct cfqg_stats *stats = &cfqg->stats; cfqg_stats_update_completion() local
686 blkg_rwstat_add(&stats->service_time, rw, now - io_start_time); cfqg_stats_update_completion()
688 blkg_rwstat_add(&stats->wait_time, rw, cfqg_stats_update_completion()
692 /* @stats = 0 */ cfqg_stats_reset()
693 static void cfqg_stats_reset(struct cfqg_stats *stats) cfqg_stats_reset() argument
695 /* queued stats shouldn't be cleared */ cfqg_stats_reset()
696 blkg_rwstat_reset(&stats->service_bytes); cfqg_stats_reset()
697 blkg_rwstat_reset(&stats->serviced); cfqg_stats_reset()
698 blkg_rwstat_reset(&stats->merged); cfqg_stats_reset()
699 blkg_rwstat_reset(&stats->service_time); cfqg_stats_reset()
700 blkg_rwstat_reset(&stats->wait_time); cfqg_stats_reset()
701 blkg_stat_reset(&stats->time); cfqg_stats_reset()
703 blkg_stat_reset(&stats->unaccounted_time); cfqg_stats_reset()
704 blkg_stat_reset(&stats->avg_queue_size_sum); cfqg_stats_reset()
705 blkg_stat_reset(&stats->avg_queue_size_samples); cfqg_stats_reset()
706 blkg_stat_reset(&stats->dequeue); cfqg_stats_reset()
707 blkg_stat_reset(&stats->group_wait_time); cfqg_stats_reset()
708 blkg_stat_reset(&stats->idle_time); cfqg_stats_reset()
709 blkg_stat_reset(&stats->empty_time); cfqg_stats_reset()
716 /* queued stats shouldn't be cleared */ cfqg_stats_merge()
735 * Transfer @cfqg's stats to its parent's dead_stats so that the ancestors'
736 * recursive stats can still account for the amount used by this cfqg after
748 cfqg_stats_merge(&parent->dead_stats, &cfqg->stats); cfqg_stats_xfer_dead()
750 cfqg_stats_reset(&cfqg->stats); cfqg_stats_xfer_dead()
1524 static void cfqg_stats_init(struct cfqg_stats *stats) cfqg_stats_init() argument
1526 blkg_rwstat_init(&stats->service_bytes); cfqg_stats_init()
1527 blkg_rwstat_init(&stats->serviced); cfqg_stats_init()
1528 blkg_rwstat_init(&stats->merged); cfqg_stats_init()
1529 blkg_rwstat_init(&stats->service_time); cfqg_stats_init()
1530 blkg_rwstat_init(&stats->wait_time); cfqg_stats_init()
1531 blkg_rwstat_init(&stats->queued); cfqg_stats_init()
1533 blkg_stat_init(&stats->sectors); cfqg_stats_init()
1534 blkg_stat_init(&stats->time); cfqg_stats_init()
1537 blkg_stat_init(&stats->unaccounted_time); cfqg_stats_init()
1538 blkg_stat_init(&stats->avg_queue_size_sum); cfqg_stats_init()
1539 blkg_stat_init(&stats->avg_queue_size_samples); cfqg_stats_init()
1540 blkg_stat_init(&stats->dequeue); cfqg_stats_init()
1541 blkg_stat_init(&stats->group_wait_time); cfqg_stats_init()
1542 blkg_stat_init(&stats->idle_time); cfqg_stats_init()
1543 blkg_stat_init(&stats->empty_time); cfqg_stats_init()
1554 cfqg_stats_init(&cfqg->stats); cfq_pd_init()
1562 * blkg_[rw]stat_recursive_sum(). Transfer stats to the parent so cfq_pd_offline()
1564 * stats for them will be lost. Oh well... cfq_pd_offline()
1569 /* offset delta from cfqg->stats to cfqg->dead_stats */
1571 offsetof(struct cfq_group, stats);
1573 /* to be used by recursive prfill, sums live and dead stats recursively */ cfqg_stat_pd_recursive_sum()
1599 cfqg_stats_reset(&cfqg->stats); cfq_pd_reset_stats()
1826 u64 samples = blkg_stat_read(&cfqg->stats.avg_queue_size_samples); cfqg_prfill_avg_queue_size()
1830 v = blkg_stat_read(&cfqg->stats.avg_queue_size_sum); cfqg_prfill_avg_queue_size()
1890 .private = offsetof(struct cfq_group, stats.time),
1895 .private = offsetof(struct cfq_group, stats.sectors),
1900 .private = offsetof(struct cfq_group, stats.service_bytes),
1905 .private = offsetof(struct cfq_group, stats.serviced),
1910 .private = offsetof(struct cfq_group, stats.service_time),
1915 .private = offsetof(struct cfq_group, stats.wait_time),
1920 .private = offsetof(struct cfq_group, stats.merged),
1925 .private = offsetof(struct cfq_group, stats.queued),
1932 .private = offsetof(struct cfq_group, stats.time),
1937 .private = offsetof(struct cfq_group, stats.sectors),
1942 .private = offsetof(struct cfq_group, stats.service_bytes),
1947 .private = offsetof(struct cfq_group, stats.serviced),
1952 .private = offsetof(struct cfq_group, stats.service_time),
1957 .private = offsetof(struct cfq_group, stats.wait_time),
1962 .private = offsetof(struct cfq_group, stats.merged),
1967 .private = offsetof(struct cfq_group, stats.queued),
1977 .private = offsetof(struct cfq_group, stats.group_wait_time),
1982 .private = offsetof(struct cfq_group, stats.idle_time),
1987 .private = offsetof(struct cfq_group, stats.empty_time),
1992 .private = offsetof(struct cfq_group, stats.dequeue),
1997 .private = offsetof(struct cfq_group, stats.unaccounted_time),
/linux-4.1.27/drivers/net/ethernet/amd/xgbe/
H A Dxgbe-dev.c2235 struct xgbe_mmc_stats *stats = &pdata->mmc_stats; xgbe_tx_mmc_int() local
2239 stats->txoctetcount_gb += xgbe_tx_mmc_int()
2243 stats->txframecount_gb += xgbe_tx_mmc_int()
2247 stats->txbroadcastframes_g += xgbe_tx_mmc_int()
2251 stats->txmulticastframes_g += xgbe_tx_mmc_int()
2255 stats->tx64octets_gb += xgbe_tx_mmc_int()
2259 stats->tx65to127octets_gb += xgbe_tx_mmc_int()
2263 stats->tx128to255octets_gb += xgbe_tx_mmc_int()
2267 stats->tx256to511octets_gb += xgbe_tx_mmc_int()
2271 stats->tx512to1023octets_gb += xgbe_tx_mmc_int()
2275 stats->tx1024tomaxoctets_gb += xgbe_tx_mmc_int()
2279 stats->txunicastframes_gb += xgbe_tx_mmc_int()
2283 stats->txmulticastframes_gb += xgbe_tx_mmc_int()
2287 stats->txbroadcastframes_g += xgbe_tx_mmc_int()
2291 stats->txunderflowerror += xgbe_tx_mmc_int()
2295 stats->txoctetcount_g += xgbe_tx_mmc_int()
2299 stats->txframecount_g += xgbe_tx_mmc_int()
2303 stats->txpauseframes += xgbe_tx_mmc_int()
2307 stats->txvlanframes_g += xgbe_tx_mmc_int()
2313 struct xgbe_mmc_stats *stats = &pdata->mmc_stats; xgbe_rx_mmc_int() local
2317 stats->rxframecount_gb += xgbe_rx_mmc_int()
2321 stats->rxoctetcount_gb += xgbe_rx_mmc_int()
2325 stats->rxoctetcount_g += xgbe_rx_mmc_int()
2329 stats->rxbroadcastframes_g += xgbe_rx_mmc_int()
2333 stats->rxmulticastframes_g += xgbe_rx_mmc_int()
2337 stats->rxcrcerror += xgbe_rx_mmc_int()
2341 stats->rxrunterror += xgbe_rx_mmc_int()
2345 stats->rxjabbererror += xgbe_rx_mmc_int()
2349 stats->rxundersize_g += xgbe_rx_mmc_int()
2353 stats->rxoversize_g += xgbe_rx_mmc_int()
2357 stats->rx64octets_gb += xgbe_rx_mmc_int()
2361 stats->rx65to127octets_gb += xgbe_rx_mmc_int()
2365 stats->rx128to255octets_gb += xgbe_rx_mmc_int()
2369 stats->rx256to511octets_gb += xgbe_rx_mmc_int()
2373 stats->rx512to1023octets_gb += xgbe_rx_mmc_int()
2377 stats->rx1024tomaxoctets_gb += xgbe_rx_mmc_int()
2381 stats->rxunicastframes_g += xgbe_rx_mmc_int()
2385 stats->rxlengtherror += xgbe_rx_mmc_int()
2389 stats->rxoutofrangetype += xgbe_rx_mmc_int()
2393 stats->rxpauseframes += xgbe_rx_mmc_int()
2397 stats->rxfifooverflow += xgbe_rx_mmc_int()
2401 stats->rxvlanframes_gb += xgbe_rx_mmc_int()
2405 stats->rxwatchdogerror += xgbe_rx_mmc_int()
2411 struct xgbe_mmc_stats *stats = &pdata->mmc_stats; xgbe_read_mmc_stats() local
2416 stats->txoctetcount_gb += xgbe_read_mmc_stats()
2419 stats->txframecount_gb += xgbe_read_mmc_stats()
2422 stats->txbroadcastframes_g += xgbe_read_mmc_stats()
2425 stats->txmulticastframes_g += xgbe_read_mmc_stats()
2428 stats->tx64octets_gb += xgbe_read_mmc_stats()
2431 stats->tx65to127octets_gb += xgbe_read_mmc_stats()
2434 stats->tx128to255octets_gb += xgbe_read_mmc_stats()
2437 stats->tx256to511octets_gb += xgbe_read_mmc_stats()
2440 stats->tx512to1023octets_gb += xgbe_read_mmc_stats()
2443 stats->tx1024tomaxoctets_gb += xgbe_read_mmc_stats()
2446 stats->txunicastframes_gb += xgbe_read_mmc_stats()
2449 stats->txmulticastframes_gb += xgbe_read_mmc_stats()
2452 stats->txbroadcastframes_g += xgbe_read_mmc_stats()
2455 stats->txunderflowerror += xgbe_read_mmc_stats()
2458 stats->txoctetcount_g += xgbe_read_mmc_stats()
2461 stats->txframecount_g += xgbe_read_mmc_stats()
2464 stats->txpauseframes += xgbe_read_mmc_stats()
2467 stats->txvlanframes_g += xgbe_read_mmc_stats()
2470 stats->rxframecount_gb += xgbe_read_mmc_stats()
2473 stats->rxoctetcount_gb += xgbe_read_mmc_stats()
2476 stats->rxoctetcount_g += xgbe_read_mmc_stats()
2479 stats->rxbroadcastframes_g += xgbe_read_mmc_stats()
2482 stats->rxmulticastframes_g += xgbe_read_mmc_stats()
2485 stats->rxcrcerror += xgbe_read_mmc_stats()
2488 stats->rxrunterror += xgbe_read_mmc_stats()
2491 stats->rxjabbererror += xgbe_read_mmc_stats()
2494 stats->rxundersize_g += xgbe_read_mmc_stats()
2497 stats->rxoversize_g += xgbe_read_mmc_stats()
2500 stats->rx64octets_gb += xgbe_read_mmc_stats()
2503 stats->rx65to127octets_gb += xgbe_read_mmc_stats()
2506 stats->rx128to255octets_gb += xgbe_read_mmc_stats()
2509 stats->rx256to511octets_gb += xgbe_read_mmc_stats()
2512 stats->rx512to1023octets_gb += xgbe_read_mmc_stats()
2515 stats->rx1024tomaxoctets_gb += xgbe_read_mmc_stats()
2518 stats->rxunicastframes_g += xgbe_read_mmc_stats()
2521 stats->rxlengtherror += xgbe_read_mmc_stats()
2524 stats->rxoutofrangetype += xgbe_read_mmc_stats()
2527 stats->rxpauseframes += xgbe_read_mmc_stats()
2530 stats->rxfifooverflow += xgbe_read_mmc_stats()
2533 stats->rxvlanframes_gb += xgbe_read_mmc_stats()
2536 stats->rxwatchdogerror += xgbe_read_mmc_stats()
/linux-4.1.27/drivers/net/ethernet/neterion/
H A Ds2io.c887 struct stat_block *stats; free_shared_mem() local
897 stats = mac_control->stats_info; free_shared_mem()
898 swstats = &stats->sw_stat; free_shared_mem()
2373 struct stat_block *stats = mac_control->stats_info; free_tx_buffers() local
2374 struct swStat *swstats = &stats->sw_stat; free_tx_buffers()
2674 struct stat_block *stats = mac_control->stats_info; free_rxd_blk() local
2675 struct swStat *swstats = &stats->sw_stat; free_rxd_blk()
3015 struct stat_block *stats = nic->mac_control.stats_info; tx_intr_handler() local
3016 struct swStat *swstats = &stats->sw_stat; tx_intr_handler()
3248 struct stat_block *stats = sp->mac_control.stats_info; s2io_updt_xpak_counter() local
3249 struct xpakStat *xstats = &stats->xpak_stat; s2io_updt_xpak_counter()
3414 struct stat_block *stats; s2io_reset() local
3468 memset(&sp->stats, 0, sizeof(struct net_device_stats)); s2io_reset()
3470 stats = sp->mac_control.stats_info; s2io_reset()
3471 swstats = &stats->sw_stat; s2io_reset()
3483 memset(stats, 0, sizeof(struct stat_block)); s2io_reset()
3739 struct stat_block *stats = nic->mac_control.stats_info; s2io_enable_msi_x() local
3740 struct swStat *swstats = &stats->sw_stat; s2io_enable_msi_x()
4029 struct stat_block *stats = mac_control->stats_info; s2io_xmit() local
4030 struct swStat *swstats = &stats->sw_stat; s2io_xmit()
4418 struct xpakStat *stats = &sp->mac_control.stats_info->xpak_stat; s2io_handle_errors() local
4430 if (stats->xpak_timer_count < 72000) { s2io_handle_errors()
4432 stats->xpak_timer_count++; s2io_handle_errors()
4436 stats->xpak_timer_count = 0; s2io_handle_errors()
4846 struct stat_block *stats = mac_control->stats_info; s2io_get_stats() local
4854 * system from having the stats zero'ed, the driver keeps a copy of the s2io_get_stats()
4859 delta = ((u64) le32_to_cpu(stats->rmac_vld_frms_oflow) << 32 | s2io_get_stats()
4860 le32_to_cpu(stats->rmac_vld_frms)) - sp->stats.rx_packets; s2io_get_stats()
4861 sp->stats.rx_packets += delta; s2io_get_stats()
4862 dev->stats.rx_packets += delta; s2io_get_stats()
4864 delta = ((u64) le32_to_cpu(stats->tmac_frms_oflow) << 32 | s2io_get_stats()
4865 le32_to_cpu(stats->tmac_frms)) - sp->stats.tx_packets; s2io_get_stats()
4866 sp->stats.tx_packets += delta; s2io_get_stats()
4867 dev->stats.tx_packets += delta; s2io_get_stats()
4869 delta = ((u64) le32_to_cpu(stats->rmac_data_octets_oflow) << 32 | s2io_get_stats()
4870 le32_to_cpu(stats->rmac_data_octets)) - sp->stats.rx_bytes; s2io_get_stats()
4871 sp->stats.rx_bytes += delta; s2io_get_stats()
4872 dev->stats.rx_bytes += delta; s2io_get_stats()
4874 delta = ((u64) le32_to_cpu(stats->tmac_data_octets_oflow) << 32 | s2io_get_stats()
4875 le32_to_cpu(stats->tmac_data_octets)) - sp->stats.tx_bytes; s2io_get_stats()
4876 sp->stats.tx_bytes += delta; s2io_get_stats()
4877 dev->stats.tx_bytes += delta; s2io_get_stats()
4879 delta = le64_to_cpu(stats->rmac_drop_frms) - sp->stats.rx_errors; s2io_get_stats()
4880 sp->stats.rx_errors += delta; s2io_get_stats()
4881 dev->stats.rx_errors += delta; s2io_get_stats()
4883 delta = ((u64) le32_to_cpu(stats->tmac_any_err_frms_oflow) << 32 | s2io_get_stats()
4884 le32_to_cpu(stats->tmac_any_err_frms)) - sp->stats.tx_errors; s2io_get_stats()
4885 sp->stats.tx_errors += delta; s2io_get_stats()
4886 dev->stats.tx_errors += delta; s2io_get_stats()
4888 delta = le64_to_cpu(stats->rmac_drop_frms) - sp->stats.rx_dropped; s2io_get_stats()
4889 sp->stats.rx_dropped += delta; s2io_get_stats()
4890 dev->stats.rx_dropped += delta; s2io_get_stats()
4892 delta = le64_to_cpu(stats->tmac_drop_frms) - sp->stats.tx_dropped; s2io_get_stats()
4893 sp->stats.tx_dropped += delta; s2io_get_stats()
4894 dev->stats.tx_dropped += delta; s2io_get_stats()
4901 delta = (u64) le32_to_cpu(stats->rmac_vld_mcst_frms_oflow) << 32 | s2io_get_stats()
4902 le32_to_cpu(stats->rmac_vld_mcst_frms); s2io_get_stats()
4903 delta -= le64_to_cpu(stats->rmac_pause_ctrl_frms); s2io_get_stats()
4904 delta -= sp->stats.multicast; s2io_get_stats()
4905 sp->stats.multicast += delta; s2io_get_stats()
4906 dev->stats.multicast += delta; s2io_get_stats()
4908 delta = ((u64) le32_to_cpu(stats->rmac_usized_frms_oflow) << 32 | s2io_get_stats()
4909 le32_to_cpu(stats->rmac_usized_frms)) + s2io_get_stats()
4910 le64_to_cpu(stats->rmac_long_frms) - sp->stats.rx_length_errors; s2io_get_stats()
4911 sp->stats.rx_length_errors += delta; s2io_get_stats()
4912 dev->stats.rx_length_errors += delta; s2io_get_stats()
4914 delta = le64_to_cpu(stats->rmac_fcs_err_frms) - sp->stats.rx_crc_errors; s2io_get_stats()
4915 sp->stats.rx_crc_errors += delta; s2io_get_stats()
4916 dev->stats.rx_crc_errors += delta; s2io_get_stats()
4918 return &dev->stats; s2io_get_stats()
6284 struct stat_block *stats = sp->mac_control.stats_info; s2io_get_ethtool_stats() local
6285 struct swStat *swstats = &stats->sw_stat; s2io_get_ethtool_stats()
6286 struct xpakStat *xstats = &stats->xpak_stat; s2io_get_ethtool_stats()
6290 (u64)le32_to_cpu(stats->tmac_frms_oflow) << 32 | s2io_get_ethtool_stats()
6291 le32_to_cpu(stats->tmac_frms); s2io_get_ethtool_stats()
6293 (u64)le32_to_cpu(stats->tmac_data_octets_oflow) << 32 | s2io_get_ethtool_stats()
6294 le32_to_cpu(stats->tmac_data_octets); s2io_get_ethtool_stats()
6295 tmp_stats[i++] = le64_to_cpu(stats->tmac_drop_frms); s2io_get_ethtool_stats()
6297 (u64)le32_to_cpu(stats->tmac_mcst_frms_oflow) << 32 | s2io_get_ethtool_stats()
6298 le32_to_cpu(stats->tmac_mcst_frms); s2io_get_ethtool_stats()
6300 (u64)le32_to_cpu(stats->tmac_bcst_frms_oflow) << 32 | s2io_get_ethtool_stats()
6301 le32_to_cpu(stats->tmac_bcst_frms); s2io_get_ethtool_stats()
6302 tmp_stats[i++] = le64_to_cpu(stats->tmac_pause_ctrl_frms); s2io_get_ethtool_stats()
6304 (u64)le32_to_cpu(stats->tmac_ttl_octets_oflow) << 32 | s2io_get_ethtool_stats()
6305 le32_to_cpu(stats->tmac_ttl_octets); s2io_get_ethtool_stats()
6307 (u64)le32_to_cpu(stats->tmac_ucst_frms_oflow) << 32 | s2io_get_ethtool_stats()
6308 le32_to_cpu(stats->tmac_ucst_frms); s2io_get_ethtool_stats()
6310 (u64)le32_to_cpu(stats->tmac_nucst_frms_oflow) << 32 | s2io_get_ethtool_stats()
6311 le32_to_cpu(stats->tmac_nucst_frms); s2io_get_ethtool_stats()
6313 (u64)le32_to_cpu(stats->tmac_any_err_frms_oflow) << 32 | s2io_get_ethtool_stats()
6314 le32_to_cpu(stats->tmac_any_err_frms); s2io_get_ethtool_stats()
6315 tmp_stats[i++] = le64_to_cpu(stats->tmac_ttl_less_fb_octets); s2io_get_ethtool_stats()
6316 tmp_stats[i++] = le64_to_cpu(stats->tmac_vld_ip_octets); s2io_get_ethtool_stats()
6318 (u64)le32_to_cpu(stats->tmac_vld_ip_oflow) << 32 | s2io_get_ethtool_stats()
6319 le32_to_cpu(stats->tmac_vld_ip); s2io_get_ethtool_stats()
6321 (u64)le32_to_cpu(stats->tmac_drop_ip_oflow) << 32 | s2io_get_ethtool_stats()
6322 le32_to_cpu(stats->tmac_drop_ip); s2io_get_ethtool_stats()
6324 (u64)le32_to_cpu(stats->tmac_icmp_oflow) << 32 | s2io_get_ethtool_stats()
6325 le32_to_cpu(stats->tmac_icmp); s2io_get_ethtool_stats()
6327 (u64)le32_to_cpu(stats->tmac_rst_tcp_oflow) << 32 | s2io_get_ethtool_stats()
6328 le32_to_cpu(stats->tmac_rst_tcp); s2io_get_ethtool_stats()
6329 tmp_stats[i++] = le64_to_cpu(stats->tmac_tcp); s2io_get_ethtool_stats()
6330 tmp_stats[i++] = (u64)le32_to_cpu(stats->tmac_udp_oflow) << 32 | s2io_get_ethtool_stats()
6331 le32_to_cpu(stats->tmac_udp); s2io_get_ethtool_stats()
6333 (u64)le32_to_cpu(stats->rmac_vld_frms_oflow) << 32 | s2io_get_ethtool_stats()
6334 le32_to_cpu(stats->rmac_vld_frms); s2io_get_ethtool_stats()
6336 (u64)le32_to_cpu(stats->rmac_data_octets_oflow) << 32 | s2io_get_ethtool_stats()
6337 le32_to_cpu(stats->rmac_data_octets); s2io_get_ethtool_stats()
6338 tmp_stats[i++] = le64_to_cpu(stats->rmac_fcs_err_frms); s2io_get_ethtool_stats()
6339 tmp_stats[i++] = le64_to_cpu(stats->rmac_drop_frms); s2io_get_ethtool_stats()
6341 (u64)le32_to_cpu(stats->rmac_vld_mcst_frms_oflow) << 32 | s2io_get_ethtool_stats()
6342 le32_to_cpu(stats->rmac_vld_mcst_frms); s2io_get_ethtool_stats()
6344 (u64)le32_to_cpu(stats->rmac_vld_bcst_frms_oflow) << 32 | s2io_get_ethtool_stats()
6345 le32_to_cpu(stats->rmac_vld_bcst_frms); s2io_get_ethtool_stats()
6346 tmp_stats[i++] = le32_to_cpu(stats->rmac_in_rng_len_err_frms); s2io_get_ethtool_stats()
6347 tmp_stats[i++] = le32_to_cpu(stats->rmac_out_rng_len_err_frms); s2io_get_ethtool_stats()
6348 tmp_stats[i++] = le64_to_cpu(stats->rmac_long_frms); s2io_get_ethtool_stats()
6349 tmp_stats[i++] = le64_to_cpu(stats->rmac_pause_ctrl_frms); s2io_get_ethtool_stats()
6350 tmp_stats[i++] = le64_to_cpu(stats->rmac_unsup_ctrl_frms); s2io_get_ethtool_stats()
6352 (u64)le32_to_cpu(stats->rmac_ttl_octets_oflow) << 32 | s2io_get_ethtool_stats()
6353 le32_to_cpu(stats->rmac_ttl_octets); s2io_get_ethtool_stats()
6355 (u64)le32_to_cpu(stats->rmac_accepted_ucst_frms_oflow) << 32 s2io_get_ethtool_stats()
6356 | le32_to_cpu(stats->rmac_accepted_ucst_frms); s2io_get_ethtool_stats()
6358 (u64)le32_to_cpu(stats->rmac_accepted_nucst_frms_oflow) s2io_get_ethtool_stats()
6359 << 32 | le32_to_cpu(stats->rmac_accepted_nucst_frms); s2io_get_ethtool_stats()
6361 (u64)le32_to_cpu(stats->rmac_discarded_frms_oflow) << 32 | s2io_get_ethtool_stats()
6362 le32_to_cpu(stats->rmac_discarded_frms); s2io_get_ethtool_stats()
6364 (u64)le32_to_cpu(stats->rmac_drop_events_oflow) s2io_get_ethtool_stats()
6365 << 32 | le32_to_cpu(stats->rmac_drop_events); s2io_get_ethtool_stats()
6366 tmp_stats[i++] = le64_to_cpu(stats->rmac_ttl_less_fb_octets); s2io_get_ethtool_stats()
6367 tmp_stats[i++] = le64_to_cpu(stats->rmac_ttl_frms); s2io_get_ethtool_stats()
6369 (u64)le32_to_cpu(stats->rmac_usized_frms_oflow) << 32 | s2io_get_ethtool_stats()
6370 le32_to_cpu(stats->rmac_usized_frms); s2io_get_ethtool_stats()
6372 (u64)le32_to_cpu(stats->rmac_osized_frms_oflow) << 32 | s2io_get_ethtool_stats()
6373 le32_to_cpu(stats->rmac_osized_frms); s2io_get_ethtool_stats()
6375 (u64)le32_to_cpu(stats->rmac_frag_frms_oflow) << 32 | s2io_get_ethtool_stats()
6376 le32_to_cpu(stats->rmac_frag_frms); s2io_get_ethtool_stats()
6378 (u64)le32_to_cpu(stats->rmac_jabber_frms_oflow) << 32 | s2io_get_ethtool_stats()
6379 le32_to_cpu(stats->rmac_jabber_frms); s2io_get_ethtool_stats()
6380 tmp_stats[i++] = le64_to_cpu(stats->rmac_ttl_64_frms); s2io_get_ethtool_stats()
6381 tmp_stats[i++] = le64_to_cpu(stats->rmac_ttl_65_127_frms); s2io_get_ethtool_stats()
6382 tmp_stats[i++] = le64_to_cpu(stats->rmac_ttl_128_255_frms); s2io_get_ethtool_stats()
6383 tmp_stats[i++] = le64_to_cpu(stats->rmac_ttl_256_511_frms); s2io_get_ethtool_stats()
6384 tmp_stats[i++] = le64_to_cpu(stats->rmac_ttl_512_1023_frms); s2io_get_ethtool_stats()
6385 tmp_stats[i++] = le64_to_cpu(stats->rmac_ttl_1024_1518_frms); s2io_get_ethtool_stats()
6387 (u64)le32_to_cpu(stats->rmac_ip_oflow) << 32 | s2io_get_ethtool_stats()
6388 le32_to_cpu(stats->rmac_ip); s2io_get_ethtool_stats()
6389 tmp_stats[i++] = le64_to_cpu(stats->rmac_ip_octets); s2io_get_ethtool_stats()
6390 tmp_stats[i++] = le32_to_cpu(stats->rmac_hdr_err_ip); s2io_get_ethtool_stats()
6392 (u64)le32_to_cpu(stats->rmac_drop_ip_oflow) << 32 | s2io_get_ethtool_stats()
6393 le32_to_cpu(stats->rmac_drop_ip); s2io_get_ethtool_stats()
6395 (u64)le32_to_cpu(stats->rmac_icmp_oflow) << 32 | s2io_get_ethtool_stats()
6396 le32_to_cpu(stats->rmac_icmp); s2io_get_ethtool_stats()
6397 tmp_stats[i++] = le64_to_cpu(stats->rmac_tcp); s2io_get_ethtool_stats()
6399 (u64)le32_to_cpu(stats->rmac_udp_oflow) << 32 | s2io_get_ethtool_stats()
6400 le32_to_cpu(stats->rmac_udp); s2io_get_ethtool_stats()
6402 (u64)le32_to_cpu(stats->rmac_err_drp_udp_oflow) << 32 | s2io_get_ethtool_stats()
6403 le32_to_cpu(stats->rmac_err_drp_udp); s2io_get_ethtool_stats()
6404 tmp_stats[i++] = le64_to_cpu(stats->rmac_xgmii_err_sym); s2io_get_ethtool_stats()
6405 tmp_stats[i++] = le64_to_cpu(stats->rmac_frms_q0); s2io_get_ethtool_stats()
6406 tmp_stats[i++] = le64_to_cpu(stats->rmac_frms_q1); s2io_get_ethtool_stats()
6407 tmp_stats[i++] = le64_to_cpu(stats->rmac_frms_q2); s2io_get_ethtool_stats()
6408 tmp_stats[i++] = le64_to_cpu(stats->rmac_frms_q3); s2io_get_ethtool_stats()
6409 tmp_stats[i++] = le64_to_cpu(stats->rmac_frms_q4); s2io_get_ethtool_stats()
6410 tmp_stats[i++] = le64_to_cpu(stats->rmac_frms_q5); s2io_get_ethtool_stats()
6411 tmp_stats[i++] = le64_to_cpu(stats->rmac_frms_q6); s2io_get_ethtool_stats()
6412 tmp_stats[i++] = le64_to_cpu(stats->rmac_frms_q7); s2io_get_ethtool_stats()
6413 tmp_stats[i++] = le16_to_cpu(stats->rmac_full_q0); s2io_get_ethtool_stats()
6414 tmp_stats[i++] = le16_to_cpu(stats->rmac_full_q1); s2io_get_ethtool_stats()
6415 tmp_stats[i++] = le16_to_cpu(stats->rmac_full_q2); s2io_get_ethtool_stats()
6416 tmp_stats[i++] = le16_to_cpu(stats->rmac_full_q3); s2io_get_ethtool_stats()
6417 tmp_stats[i++] = le16_to_cpu(stats->rmac_full_q4); s2io_get_ethtool_stats()
6418 tmp_stats[i++] = le16_to_cpu(stats->rmac_full_q5); s2io_get_ethtool_stats()
6419 tmp_stats[i++] = le16_to_cpu(stats->rmac_full_q6); s2io_get_ethtool_stats()
6420 tmp_stats[i++] = le16_to_cpu(stats->rmac_full_q7); s2io_get_ethtool_stats()
6422 (u64)le32_to_cpu(stats->rmac_pause_cnt_oflow) << 32 | s2io_get_ethtool_stats()
6423 le32_to_cpu(stats->rmac_pause_cnt); s2io_get_ethtool_stats()
6424 tmp_stats[i++] = le64_to_cpu(stats->rmac_xgmii_data_err_cnt); s2io_get_ethtool_stats()
6425 tmp_stats[i++] = le64_to_cpu(stats->rmac_xgmii_ctrl_err_cnt); s2io_get_ethtool_stats()
6427 (u64)le32_to_cpu(stats->rmac_accepted_ip_oflow) << 32 | s2io_get_ethtool_stats()
6428 le32_to_cpu(stats->rmac_accepted_ip); s2io_get_ethtool_stats()
6429 tmp_stats[i++] = le32_to_cpu(stats->rmac_err_tcp); s2io_get_ethtool_stats()
6430 tmp_stats[i++] = le32_to_cpu(stats->rd_req_cnt); s2io_get_ethtool_stats()
6431 tmp_stats[i++] = le32_to_cpu(stats->new_rd_req_cnt); s2io_get_ethtool_stats()
6432 tmp_stats[i++] = le32_to_cpu(stats->new_rd_req_rtry_cnt); s2io_get_ethtool_stats()
6433 tmp_stats[i++] = le32_to_cpu(stats->rd_rtry_cnt); s2io_get_ethtool_stats()
6434 tmp_stats[i++] = le32_to_cpu(stats->wr_rtry_rd_ack_cnt); s2io_get_ethtool_stats()
6435 tmp_stats[i++] = le32_to_cpu(stats->wr_req_cnt); s2io_get_ethtool_stats()
6436 tmp_stats[i++] = le32_to_cpu(stats->new_wr_req_cnt); s2io_get_ethtool_stats()
6437 tmp_stats[i++] = le32_to_cpu(stats->new_wr_req_rtry_cnt); s2io_get_ethtool_stats()
6438 tmp_stats[i++] = le32_to_cpu(stats->wr_rtry_cnt); s2io_get_ethtool_stats()
6439 tmp_stats[i++] = le32_to_cpu(stats->wr_disc_cnt); s2io_get_ethtool_stats()
6440 tmp_stats[i++] = le32_to_cpu(stats->rd_rtry_wr_ack_cnt); s2io_get_ethtool_stats()
6441 tmp_stats[i++] = le32_to_cpu(stats->txp_wr_cnt); s2io_get_ethtool_stats()
6442 tmp_stats[i++] = le32_to_cpu(stats->txd_rd_cnt); s2io_get_ethtool_stats()
6443 tmp_stats[i++] = le32_to_cpu(stats->txd_wr_cnt); s2io_get_ethtool_stats()
6444 tmp_stats[i++] = le32_to_cpu(stats->rxd_rd_cnt); s2io_get_ethtool_stats()
6445 tmp_stats[i++] = le32_to_cpu(stats->rxd_wr_cnt); s2io_get_ethtool_stats()
6446 tmp_stats[i++] = le32_to_cpu(stats->txf_rd_cnt); s2io_get_ethtool_stats()
6447 tmp_stats[i++] = le32_to_cpu(stats->rxf_wr_cnt); s2io_get_ethtool_stats()
6452 le64_to_cpu(stats->rmac_ttl_1519_4095_frms); s2io_get_ethtool_stats()
6454 le64_to_cpu(stats->rmac_ttl_4096_8191_frms); s2io_get_ethtool_stats()
6456 le64_to_cpu(stats->rmac_ttl_8192_max_frms); s2io_get_ethtool_stats()
6457 tmp_stats[i++] = le64_to_cpu(stats->rmac_ttl_gt_max_frms); s2io_get_ethtool_stats()
6458 tmp_stats[i++] = le64_to_cpu(stats->rmac_osized_alt_frms); s2io_get_ethtool_stats()
6459 tmp_stats[i++] = le64_to_cpu(stats->rmac_jabber_alt_frms); s2io_get_ethtool_stats()
6460 tmp_stats[i++] = le64_to_cpu(stats->rmac_gt_max_alt_frms); s2io_get_ethtool_stats()
6461 tmp_stats[i++] = le64_to_cpu(stats->rmac_vlan_frms); s2io_get_ethtool_stats()
6462 tmp_stats[i++] = le32_to_cpu(stats->rmac_len_discard); s2io_get_ethtool_stats()
6463 tmp_stats[i++] = le32_to_cpu(stats->rmac_fcs_discard); s2io_get_ethtool_stats()
6464 tmp_stats[i++] = le32_to_cpu(stats->rmac_pf_discard); s2io_get_ethtool_stats()
6465 tmp_stats[i++] = le32_to_cpu(stats->rmac_da_discard); s2io_get_ethtool_stats()
6466 tmp_stats[i++] = le32_to_cpu(stats->rmac_red_discard); s2io_get_ethtool_stats()
6467 tmp_stats[i++] = le32_to_cpu(stats->rmac_rts_discard); s2io_get_ethtool_stats()
6468 tmp_stats[i++] = le32_to_cpu(stats->rmac_ingm_full_discard); s2io_get_ethtool_stats()
6469 tmp_stats[i++] = le32_to_cpu(stats->link_fault_cnt); s2io_get_ethtool_stats()
6803 struct swStat *stats = &sp->mac_control.stats_info->sw_stat; set_rxd_buffer_pointer() local
6822 stats->mem_alloc_fail_cnt++; set_rxd_buffer_pointer()
6825 stats->mem_allocated += (*skb)->truesize; set_rxd_buffer_pointer()
6852 stats->mem_alloc_fail_cnt++; set_rxd_buffer_pointer()
6855 stats->mem_allocated += (*skb)->truesize; set_rxd_buffer_pointer()
6895 stats->pci_map_fail_cnt++; set_rxd_buffer_pointer()
6896 stats->mem_freed += (*skb)->truesize; set_rxd_buffer_pointer()
7393 dev->stats.rx_crc_errors++; rx_osm_handler()
/linux-4.1.27/drivers/net/ppp/
H A Dppp_deflate.c34 struct compstat stats; member in struct:ppp_deflate_state
57 static void z_comp_stats(void *state, struct compstat *stats);
250 state->stats.comp_bytes += olen; z_compress()
251 state->stats.comp_packets++; z_compress()
253 state->stats.inc_bytes += isize; z_compress()
254 state->stats.inc_packets++; z_compress()
257 state->stats.unc_bytes += isize; z_compress()
258 state->stats.unc_packets++; z_compress()
267 * @stats: pointer to a struct compstat to receive the result.
269 static void z_comp_stats(void *arg, struct compstat *stats) z_comp_stats() argument
273 *stats = state->stats; z_comp_stats()
506 state->stats.unc_bytes += olen; z_decompress()
507 state->stats.unc_packets++; z_decompress()
508 state->stats.comp_bytes += isize; z_decompress()
509 state->stats.comp_packets++; z_decompress()
556 * Update stats. z_incomp()
558 state->stats.inc_bytes += icnt; z_incomp()
559 state->stats.inc_packets++; z_incomp()
560 state->stats.unc_bytes += icnt; z_incomp()
561 state->stats.unc_packets++; z_incomp()
/linux-4.1.27/drivers/net/irda/
H A Dpxaficp_ir.c283 dev->stats.rx_errors++; pxa_irda_sir_irq()
285 dev->stats.rx_frame_errors++; pxa_irda_sir_irq()
287 dev->stats.rx_fifo_errors++; pxa_irda_sir_irq()
289 dev->stats.rx_bytes++; pxa_irda_sir_irq()
290 async_unwrap_char(dev, &dev->stats, pxa_irda_sir_irq()
303 dev->stats.rx_bytes++; pxa_irda_sir_irq()
304 async_unwrap_char(dev, &dev->stats, &si->rx_buff, STRBR); pxa_irda_sir_irq()
316 dev->stats.tx_packets++; pxa_irda_sir_irq()
317 dev->stats.tx_bytes += si->tx_buff.data - si->tx_buff.head; pxa_irda_sir_irq()
368 dev->stats.tx_packets++; pxa_irda_fir_dma_tx_irq()
369 dev->stats.tx_bytes += si->dma_tx_buff_len; pxa_irda_fir_dma_tx_irq()
371 dev->stats.tx_errors++; pxa_irda_fir_dma_tx_irq()
417 dev->stats.rx_errors++; pxa_irda_fir_irq_eif()
420 dev->stats.rx_crc_errors++; pxa_irda_fir_irq_eif()
424 dev->stats.rx_over_errors++; pxa_irda_fir_irq_eif()
440 dev->stats.rx_dropped++; pxa_irda_fir_irq_eif()
447 dev->stats.rx_dropped++; pxa_irda_fir_irq_eif()
462 dev->stats.rx_packets++; pxa_irda_fir_irq_eif()
463 dev->stats.rx_bytes += len; pxa_irda_fir_irq_eif()
482 dev->stats.rx_frame_errors++; pxa_irda_fir_irq()
485 dev->stats.rx_errors++; pxa_irda_fir_irq()
/linux-4.1.27/drivers/net/wireless/ipw2x00/
H A Dlibipw_rx.c413 dev->stats.rx_packets++; libipw_rx()
414 dev->stats.rx_bytes += skb->len; libipw_rx()
521 stats = hostap_get_stats(dev); libipw_rx()
530 stats = hostap_get_stats(dev); libipw_rx()
770 dev->stats.rx_packets++; libipw_rx()
771 dev->stats.rx_bytes += skb->len; libipw_rx()
810 * in our stats. */ libipw_rx()
813 dev->stats.rx_dropped++; libipw_rx()
825 dev->stats.rx_dropped++; libipw_rx()
837 struct sk_buff *skb, struct libipw_rx_stats *stats) libipw_rx_any()
844 if (!libipw_rx(ieee, skb, stats)) libipw_rx_any()
862 libipw_rx_mgt(ieee, hdr, stats); libipw_rx_any()
914 if (!libipw_rx(ieee, skb, stats)) libipw_rx_any()
920 ieee->dev->stats.rx_dropped++; libipw_rx_any()
1329 *frame, struct libipw_rx_stats *stats) libipw_handle_assoc_resp()
1353 if (stats->freq == LIBIPW_52GHZ_BAND) { libipw_handle_assoc_resp()
1355 network->channel = stats->received_channel; libipw_handle_assoc_resp()
1363 (frame->info_element, stats->len - sizeof(*frame), network)) libipw_handle_assoc_resp()
1367 if (stats->freq == LIBIPW_52GHZ_BAND) libipw_handle_assoc_resp()
1376 memcpy(&network->stats, stats, sizeof(network->stats)); libipw_handle_assoc_resp()
1389 struct libipw_rx_stats *stats) libipw_network_init()
1413 if (stats->freq == LIBIPW_52GHZ_BAND) { libipw_network_init()
1415 network->channel = stats->received_channel; libipw_network_init()
1423 (beacon->info_element, stats->len - sizeof(*beacon), network)) libipw_network_init()
1427 if (stats->freq == LIBIPW_52GHZ_BAND) libipw_network_init()
1443 memcpy(&network->stats, stats, sizeof(network->stats)); libipw_network_init()
1471 if (dst->channel == src->stats.received_channel) update_network()
1472 memcpy(&dst->stats, &src->stats, update_network()
1477 dst->channel, src->stats.received_channel); update_network()
1536 *stats) libipw_process_probe_response()
1567 if (libipw_network_init(ieee, beacon, &network, stats)) { libipw_process_probe_response()
1645 struct libipw_rx_stats *stats) libipw_rx_mgt()
1654 header, stats); libipw_rx_mgt()
1672 header, stats); libipw_rx_mgt()
1683 header, stats); libipw_rx_mgt()
1694 header, stats); libipw_rx_mgt()
1719 header, stats); libipw_rx_mgt()
836 libipw_rx_any(struct libipw_device *ieee, struct sk_buff *skb, struct libipw_rx_stats *stats) libipw_rx_any() argument
1328 libipw_handle_assoc_resp(struct libipw_device *ieee, struct libipw_assoc_response *frame, struct libipw_rx_stats *stats) libipw_handle_assoc_resp() argument
1386 libipw_network_init(struct libipw_device *ieee, struct libipw_probe_response *beacon, struct libipw_network *network, struct libipw_rx_stats *stats) libipw_network_init() argument
1532 libipw_process_probe_response(struct libipw_device *ieee, struct libipw_probe_response *beacon, struct libipw_rx_stats *stats) libipw_process_probe_response() argument
1643 libipw_rx_mgt(struct libipw_device *ieee, struct libipw_hdr_4addr *header, struct libipw_rx_stats *stats) libipw_rx_mgt() argument
/linux-4.1.27/drivers/media/usb/pvrusb2/
H A Dpvrusb2-debugifc.c153 struct pvr2_stream_stats stats; pvr2_debugifc_print_status() local
176 pvr2_stream_get_stats(sp, &stats, 0); pvr2_debugifc_print_status()
182 stats.bytes_processed, pvr2_debugifc_print_status()
183 stats.buffers_in_queue, pvr2_debugifc_print_status()
184 stats.buffers_in_idle, pvr2_debugifc_print_status()
185 stats.buffers_in_ready, pvr2_debugifc_print_status()
186 stats.buffers_processed, pvr2_debugifc_print_status()
187 stats.buffers_failed); pvr2_debugifc_print_status()
/linux-4.1.27/drivers/net/wireless/
H A Dray_cs.h51 struct net_device_stats stats; member in struct:ray_dev_t
64 iw_stats wstats; /* Wireless specific stats */
/linux-4.1.27/drivers/net/ethernet/brocade/bna/
H A Dbfa_cee.c35 bfa_cee_stats_swap(struct bfa_cee_stats *stats) bfa_cee_stats_swap() argument
37 u32 *buffer = (u32 *)stats; bfa_cee_stats_swap()
64 * bfa_cee_stats_meminfo - Returns the size of the DMA memory needed by CEE stats
93 * bfa_cee_get_attr_isr - CEE ISR for get-stats responses from f/w
103 memcpy(cee->stats, cee->stats_dma.kva, bfa_cee_get_stats_isr()
105 bfa_cee_stats_swap(cee->stats); bfa_cee_get_stats_isr()
115 * @brief CEE ISR for reset-stats responses from f/w
154 cee->stats = (struct bfa_cee_stats *) bfa_nw_cee_mem_claim()
H A Dbnad.h194 /* Complete driver stats */
352 struct bnad_stats stats; member in struct:bnad
408 struct rtnl_link_stats64 *stats);
410 struct rtnl_link_stats64 *stats);
417 /* To set & get the stats counters */
419 (((_bnad)->stats.drv_stats._ctr)++)
421 #define BNAD_GET_CTR(_bnad, _ctr) ((_bnad)->stats.drv_stats._ctr)
/linux-4.1.27/drivers/block/rsxx/
H A Ddma.c215 q_depth += atomic_read(&card->ctrl[i].stats.hw_q_depth); dma_intr_coal_auto_tune()
244 ctrl->stats.dma_sw_err++; rsxx_complete_dma()
246 ctrl->stats.dma_hw_fault++; rsxx_complete_dma()
248 ctrl->stats.dma_cancelled++; rsxx_complete_dma()
283 ctrl->stats.sw_q_depth++; rsxx_requeue_dma()
300 ctrl->stats.crc_errors++; rsxx_handle_dma_error()
302 ctrl->stats.hard_errors++; rsxx_handle_dma_error()
304 ctrl->stats.soft_errors++; rsxx_handle_dma_error()
312 ctrl->stats.reads_retried++; rsxx_handle_dma_error()
315 ctrl->stats.reads_failed++; rsxx_handle_dma_error()
319 ctrl->stats.reads_failed++; rsxx_handle_dma_error()
327 ctrl->stats.reads_failed++; rsxx_handle_dma_error()
333 ctrl->stats.writes_failed++; rsxx_handle_dma_error()
338 ctrl->stats.discards_failed++; rsxx_handle_dma_error()
362 if (atomic_read(&ctrl->stats.hw_q_depth) == 0 || dma_engine_stalled()
425 ctrl->stats.sw_q_depth--; rsxx_issue_dmas()
486 ctrl->stats.writes_issued++; rsxx_issue_dmas()
488 ctrl->stats.discards_issued++; rsxx_issue_dmas()
490 ctrl->stats.reads_issued++; rsxx_issue_dmas()
495 atomic_add(cmds_pending, &ctrl->stats.hw_q_depth); rsxx_issue_dmas()
558 atomic_dec(&ctrl->stats.hw_q_depth); rsxx_dma_done()
579 if (atomic_read(&ctrl->stats.hw_q_depth) == 0) rsxx_dma_done()
587 if (ctrl->stats.sw_q_depth) rsxx_dma_done()
757 card->ctrl[i].stats.sw_q_depth += dma_cnt[i];
824 memset(&ctrl->stats, 0, sizeof(ctrl->stats)); rsxx_dma_ctrl_init()
988 atomic_dec(&ctrl->stats.hw_q_depth); rsxx_dma_cancel()
1057 card->ctrl[i].stats.writes_issued--; rsxx_eeh_save_issued_dmas()
1059 card->ctrl[i].stats.discards_issued--; rsxx_eeh_save_issued_dmas()
1061 card->ctrl[i].stats.reads_issued--; rsxx_eeh_save_issued_dmas()
1079 atomic_sub(cnt, &card->ctrl[i].stats.hw_q_depth); rsxx_eeh_save_issued_dmas()
1080 card->ctrl[i].stats.sw_q_depth += cnt; rsxx_eeh_save_issued_dmas()
/linux-4.1.27/drivers/net/wireless/iwlegacy/
H A D3945-debug.c38 le32_to_cpu(il->_3945.stats.flag)); il3945_stats_flag()
39 if (le32_to_cpu(il->_3945.stats.flag) & UCODE_STATS_CLEAR_MSK) il3945_stats_flag()
43 (le32_to_cpu(il->_3945.stats.flag) & il3945_stats_flag()
46 (le32_to_cpu(il->_3945.stats.flag) & il3945_stats_flag()
78 * the last stats notification from uCode il3945_ucode_rx_stats_read()
81 ofdm = &il->_3945.stats.rx.ofdm; il3945_ucode_rx_stats_read()
82 cck = &il->_3945.stats.rx.cck; il3945_ucode_rx_stats_read()
83 general = &il->_3945.stats.rx.general; il3945_ucode_rx_stats_read()
338 * the last stats notification from uCode il3945_ucode_tx_stats_read()
341 tx = &il->_3945.stats.tx; il3945_ucode_tx_stats_read()
431 * the last stats notification from uCode il3945_ucode_general_stats_read()
434 general = &il->_3945.stats.general; il3945_ucode_general_stats_read()
435 dbg = &il->_3945.stats.general.dbg; il3945_ucode_general_stats_read()
436 div = &il->_3945.stats.general.div; il3945_ucode_general_stats_read()
/linux-4.1.27/drivers/net/ethernet/3com/
H A D3c515.c800 /* Switch to the stats window, and clear all stats by reading. */ corkscrew_open()
996 dev->stats.tx_errors++; corkscrew_timeout()
997 dev->stats.tx_dropped++; corkscrew_timeout()
1062 dev->stats.tx_bytes += skb->len; corkscrew_start_xmit()
1105 dev->stats.tx_fifo_errors++; corkscrew_start_xmit()
1107 dev->stats.tx_aborted_errors++; corkscrew_start_xmit()
1212 pr_debug("%s: Updating stats.\n", dev->name); corkscrew_interrupt()
1218 pr_notice("%s: Updating stats failed, disabling stats as an interrupt source.\n", corkscrew_interrupt()
1276 if (rx_status & 0x4000) { /* Error, update stats. */ corkscrew_rx()
1281 dev->stats.rx_errors++; corkscrew_rx()
1283 dev->stats.rx_over_errors++; corkscrew_rx()
1285 dev->stats.rx_length_errors++; corkscrew_rx()
1287 dev->stats.rx_frame_errors++; corkscrew_rx()
1289 dev->stats.rx_crc_errors++; corkscrew_rx()
1291 dev->stats.rx_length_errors++; corkscrew_rx()
1310 dev->stats.rx_packets++; corkscrew_rx()
1311 dev->stats.rx_bytes += pkt_len; corkscrew_rx()
1321 dev->stats.rx_dropped++; corkscrew_rx()
1341 if (rx_status & RxDError) { /* Error, update stats. */ boomerang_rx()
1346 dev->stats.rx_errors++; boomerang_rx()
1348 dev->stats.rx_over_errors++; boomerang_rx()
1350 dev->stats.rx_length_errors++; boomerang_rx()
1352 dev->stats.rx_frame_errors++; boomerang_rx()
1354 dev->stats.rx_crc_errors++; boomerang_rx()
1356 dev->stats.rx_length_errors++; boomerang_rx()
1362 dev->stats.rx_bytes += pkt_len; boomerang_rx()
1393 dev->stats.rx_packets++; boomerang_rx()
1426 pr_debug("%s: corkscrew close stats: rx_nocopy %d rx_copy %d tx_queued %d.\n", corkscrew_close()
1432 /* Turn off statistics ASAP. We update lp->stats below. */ corkscrew_close()
1478 return &dev->stats; corkscrew_get_stats()
1490 /* Unlike the 3c5x9 we need not turn off stats updates while reading. */ update_stats()
1491 /* Switch to the stats window, and read everything. */ update_stats()
1493 dev->stats.tx_carrier_errors += inb(ioaddr + 0); update_stats()
1494 dev->stats.tx_heartbeat_errors += inb(ioaddr + 1); update_stats()
1496 dev->stats.collisions += inb(ioaddr + 3); update_stats()
1497 dev->stats.tx_window_errors += inb(ioaddr + 4); update_stats()
1498 dev->stats.rx_fifo_errors += inb(ioaddr + 5); update_stats()
1499 dev->stats.tx_packets += inb(ioaddr + 6); update_stats()
1500 dev->stats.tx_packets += (inb(ioaddr + 9) & 0x30) << 4; update_stats()
/linux-4.1.27/drivers/ipack/devices/
H A Dipoctal.c34 struct ipoctal_stats stats; member in struct:ipoctal_channel
107 static void ipoctal_reset_stats(struct ipoctal_stats *stats) ipoctal_reset_stats() argument
109 stats->tx = 0; ipoctal_reset_stats()
110 stats->rx = 0; ipoctal_reset_stats()
111 stats->rcv_break = 0; ipoctal_reset_stats()
112 stats->framing_err = 0; ipoctal_reset_stats()
113 stats->overrun_err = 0; ipoctal_reset_stats()
114 stats->parity_err = 0; ipoctal_reset_stats()
119 ipoctal_reset_stats(&channel->stats); ipoctal_free_channel()
142 icount->rx = channel->stats.rx; ipoctal_get_icount()
143 icount->tx = channel->stats.tx; ipoctal_get_icount()
144 icount->frame = channel->stats.framing_err; ipoctal_get_icount()
145 icount->parity = channel->stats.parity_err; ipoctal_get_icount()
146 icount->brk = channel->stats.rcv_break; ipoctal_get_icount()
165 channel->stats.overrun_err++; ipoctal_irq_rx()
170 channel->stats.parity_err++; ipoctal_irq_rx()
174 channel->stats.framing_err++; ipoctal_irq_rx()
178 channel->stats.rcv_break++; ipoctal_irq_rx()
206 channel->stats.tx++; ipoctal_irq_tx()
395 ipoctal_reset_stats(&channel->stats); ipoctal_inst_slot()
/linux-4.1.27/drivers/net/wireless/ath/ath5k/
H A Dani.h71 * @last_cc: The &struct ath_cycle_counters (for stats)
72 * @last_listen: Listen time from previous run (for stats)
74 * @last_cck_errors: CCK timing error count from previous run (for stats)
75 * @sum_ofdm_errors: Sum of OFDM timing errors (for stats)
76 * @sum_cck_errors: Sum of all CCK timing errors (for stats)
/linux-4.1.27/drivers/net/wireless/iwlwifi/mvm/
H A Drx.c178 * @stats: status in mac80211's format
185 struct ieee80211_rx_status *stats, iwl_mvm_set_mac80211_rx_flag()
205 stats->flag |= RX_FLAG_DECRYPTED; iwl_mvm_set_mac80211_rx_flag()
221 stats->flag |= RX_FLAG_DECRYPTED; iwl_mvm_set_mac80211_rx_flag()
230 stats->flag |= RX_FLAG_DECRYPTED; iwl_mvm_set_mac80211_rx_flag()
574 struct iwl_notif_statistics_v10 *stats = (void *)&pkt->data; iwl_mvm_handle_rx_statistics() local
579 temperature = le32_to_cpu(stats->general.radio_temperature); iwl_mvm_handle_rx_statistics()
580 data.mac_id = stats->rx.general.mac_id; iwl_mvm_handle_rx_statistics()
582 stats->general.beacon_filter_average_energy; iwl_mvm_handle_rx_statistics()
584 iwl_mvm_update_rx_statistics(mvm, &stats->rx); iwl_mvm_handle_rx_statistics()
586 mvm->radio_stats.rx_time = le64_to_cpu(stats->general.rx_time); iwl_mvm_handle_rx_statistics()
587 mvm->radio_stats.tx_time = le64_to_cpu(stats->general.tx_time); iwl_mvm_handle_rx_statistics()
589 le64_to_cpu(stats->general.on_time_rf); iwl_mvm_handle_rx_statistics()
591 le64_to_cpu(stats->general.on_time_scan); iwl_mvm_handle_rx_statistics()
593 data.general = &stats->general; iwl_mvm_handle_rx_statistics()
595 struct iwl_notif_statistics_v8 *stats = (void *)&pkt->data; iwl_mvm_handle_rx_statistics() local
600 temperature = le32_to_cpu(stats->general.radio_temperature); iwl_mvm_handle_rx_statistics()
601 data.mac_id = stats->rx.general.mac_id; iwl_mvm_handle_rx_statistics()
603 stats->general.beacon_filter_average_energy; iwl_mvm_handle_rx_statistics()
605 iwl_mvm_update_rx_statistics(mvm, &stats->rx); iwl_mvm_handle_rx_statistics()
183 iwl_mvm_set_mac80211_rx_flag(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, struct ieee80211_rx_status *stats, u32 rx_pkt_status, u8 *crypt_len) iwl_mvm_set_mac80211_rx_flag() argument
/linux-4.1.27/drivers/net/ethernet/apple/
H A Dmacmace.c465 dev->stats.tx_packets++; mace_xmit_start()
466 dev->stats.tx_bytes += skb->len; mace_xmit_start()
542 dev->stats.rx_missed_errors += 256; mace_handle_misc_intrs()
543 dev->stats.rx_missed_errors += mb->mpc; /* reading clears it */ mace_handle_misc_intrs()
545 dev->stats.rx_length_errors += 256; mace_handle_misc_intrs()
546 dev->stats.rx_length_errors += mb->rntpc; /* reading clears it */ mace_handle_misc_intrs()
548 ++dev->stats.tx_heartbeat_errors; mace_handle_misc_intrs()
585 /* Update stats */ mace_interrupt()
587 ++dev->stats.tx_errors; mace_interrupt()
589 ++dev->stats.tx_carrier_errors; mace_interrupt()
591 ++dev->stats.tx_aborted_errors; mace_interrupt()
594 dev->stats.tx_fifo_errors++; mace_interrupt()
647 dev->stats.rx_errors++; mace_dma_rx_frame()
650 dev->stats.rx_fifo_errors++; mace_dma_rx_frame()
653 dev->stats.collisions++; mace_dma_rx_frame()
655 dev->stats.rx_frame_errors++; mace_dma_rx_frame()
657 dev->stats.rx_crc_errors++; mace_dma_rx_frame()
663 dev->stats.rx_dropped++; mace_dma_rx_frame()
671 dev->stats.rx_packets++; mace_dma_rx_frame()
672 dev->stats.rx_bytes += frame_length; mace_dma_rx_frame()
/linux-4.1.27/drivers/net/usb/
H A Dcdc-phonet.c92 dev->stats.tx_dropped++; usbpn_xmit()
105 dev->stats.tx_bytes += skb->len; tx_complete()
111 dev->stats.tx_aborted_errors++; tx_complete()
113 dev->stats.tx_errors++; tx_complete()
116 dev->stats.tx_packets++; tx_complete()
187 dev->stats.rx_packets++; rx_complete()
188 dev->stats.rx_bytes += skb->len; rx_complete()
201 dev->stats.rx_over_errors++; rx_complete()
206 dev->stats.rx_crc_errors++; rx_complete()
210 dev->stats.rx_errors++; rx_complete()
/linux-4.1.27/drivers/net/slip/
H A Dslip.c273 dev->stats.tx_dropped++;
283 dev->stats.rx_over_errors++;
338 dev->stats.rx_over_errors++; sl_bump()
358 dev->stats.rx_bytes += count; sl_bump()
363 dev->stats.rx_dropped++; sl_bump()
371 dev->stats.rx_packets++; sl_bump()
382 sl->dev->stats.tx_dropped++; sl_encaps()
436 sl->dev->stats.tx_packets++; slip_transmit()
512 dev->stats.tx_bytes += skb->len; sl_xmit()
575 sl_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) sl_get_stats64() argument
577 struct net_device_stats *devstats = &dev->stats; sl_get_stats64()
582 stats->rx_packets = devstats->rx_packets; sl_get_stats64()
583 stats->tx_packets = devstats->tx_packets; sl_get_stats64()
584 stats->rx_bytes = devstats->rx_bytes; sl_get_stats64()
585 stats->tx_bytes = devstats->tx_bytes; sl_get_stats64()
586 stats->rx_dropped = devstats->rx_dropped; sl_get_stats64()
587 stats->tx_dropped = devstats->tx_dropped; sl_get_stats64()
588 stats->tx_errors = devstats->tx_errors; sl_get_stats64()
589 stats->rx_errors = devstats->rx_errors; sl_get_stats64()
590 stats->rx_over_errors = devstats->rx_over_errors; sl_get_stats64()
595 stats->rx_compressed = comp->sls_i_compressed; sl_get_stats64()
596 stats->tx_compressed = comp->sls_o_compressed; sl_get_stats64()
599 stats->rx_fifo_errors += comp->sls_i_compressed; sl_get_stats64()
600 stats->rx_dropped += comp->sls_i_tossed; sl_get_stats64()
601 stats->tx_fifo_errors += comp->sls_o_compressed; sl_get_stats64()
602 stats->collisions += comp->sls_o_misses; sl_get_stats64()
605 return stats; sl_get_stats64()
696 sl->dev->stats.rx_errors++; slip_receive_buf()
985 sl->dev->stats.rx_over_errors++; slip_unesc()
1061 sl->dev->stats.rx_over_errors++; slip_unesc6()
/linux-4.1.27/drivers/net/fddi/
H A Ddefxx.c2077 /* Fill the bp->stats structure with driver-maintained counters */ dfx_ctl_get_stats()
2079 bp->stats.gen.rx_packets = bp->rcv_total_frames; dfx_ctl_get_stats()
2080 bp->stats.gen.tx_packets = bp->xmt_total_frames; dfx_ctl_get_stats()
2081 bp->stats.gen.rx_bytes = bp->rcv_total_bytes; dfx_ctl_get_stats()
2082 bp->stats.gen.tx_bytes = bp->xmt_total_bytes; dfx_ctl_get_stats()
2083 bp->stats.gen.rx_errors = bp->rcv_crc_errors + dfx_ctl_get_stats()
2086 bp->stats.gen.tx_errors = bp->xmt_length_errors; dfx_ctl_get_stats()
2087 bp->stats.gen.rx_dropped = bp->rcv_discards; dfx_ctl_get_stats()
2088 bp->stats.gen.tx_dropped = bp->xmt_discards; dfx_ctl_get_stats()
2089 bp->stats.gen.multicast = bp->rcv_multicast_frames; dfx_ctl_get_stats()
2090 bp->stats.gen.collisions = 0; /* always zero (0) for FDDI */ dfx_ctl_get_stats()
2096 return (struct net_device_stats *)&bp->stats; dfx_ctl_get_stats()
2098 /* Fill the bp->stats structure with the SMT MIB object values */ dfx_ctl_get_stats()
2100 memcpy(bp->stats.smt_station_id, &bp->cmd_rsp_virt->smt_mib_get.smt_station_id, sizeof(bp->cmd_rsp_virt->smt_mib_get.smt_station_id)); dfx_ctl_get_stats()
2101 bp->stats.smt_op_version_id = bp->cmd_rsp_virt->smt_mib_get.smt_op_version_id; dfx_ctl_get_stats()
2102 bp->stats.smt_hi_version_id = bp->cmd_rsp_virt->smt_mib_get.smt_hi_version_id; dfx_ctl_get_stats()
2103 bp->stats.smt_lo_version_id = bp->cmd_rsp_virt->smt_mib_get.smt_lo_version_id; dfx_ctl_get_stats()
2104 memcpy(bp->stats.smt_user_data, &bp->cmd_rsp_virt->smt_mib_get.smt_user_data, sizeof(bp->cmd_rsp_virt->smt_mib_get.smt_user_data)); dfx_ctl_get_stats()
2105 bp->stats.smt_mib_version_id = bp->cmd_rsp_virt->smt_mib_get.smt_mib_version_id; dfx_ctl_get_stats()
2106 bp->stats.smt_mac_cts = bp->cmd_rsp_virt->smt_mib_get.smt_mac_ct; dfx_ctl_get_stats()
2107 bp->stats.smt_non_master_cts = bp->cmd_rsp_virt->smt_mib_get.smt_non_master_ct; dfx_ctl_get_stats()
2108 bp->stats.smt_master_cts = bp->cmd_rsp_virt->smt_mib_get.smt_master_ct; dfx_ctl_get_stats()
2109 bp->stats.smt_available_paths = bp->cmd_rsp_virt->smt_mib_get.smt_available_paths; dfx_ctl_get_stats()
2110 bp->stats.smt_config_capabilities = bp->cmd_rsp_virt->smt_mib_get.smt_config_capabilities; dfx_ctl_get_stats()
2111 bp->stats.smt_config_policy = bp->cmd_rsp_virt->smt_mib_get.smt_config_policy; dfx_ctl_get_stats()
2112 bp->stats.smt_connection_policy = bp->cmd_rsp_virt->smt_mib_get.smt_connection_policy; dfx_ctl_get_stats()
2113 bp->stats.smt_t_notify = bp->cmd_rsp_virt->smt_mib_get.smt_t_notify; dfx_ctl_get_stats()
2114 bp->stats.smt_stat_rpt_policy = bp->cmd_rsp_virt->smt_mib_get.smt_stat_rpt_policy; dfx_ctl_get_stats()
2115 bp->stats.smt_trace_max_expiration = bp->cmd_rsp_virt->smt_mib_get.smt_trace_max_expiration; dfx_ctl_get_stats()
2116 bp->stats.smt_bypass_present = bp->cmd_rsp_virt->smt_mib_get.smt_bypass_present; dfx_ctl_get_stats()
2117 bp->stats.smt_ecm_state = bp->cmd_rsp_virt->smt_mib_get.smt_ecm_state; dfx_ctl_get_stats()
2118 bp->stats.smt_cf_state = bp->cmd_rsp_virt->smt_mib_get.smt_cf_state; dfx_ctl_get_stats()
2119 bp->stats.smt_remote_disconnect_flag = bp->cmd_rsp_virt->smt_mib_get.smt_remote_disconnect_flag; dfx_ctl_get_stats()
2120 bp->stats.smt_station_status = bp->cmd_rsp_virt->smt_mib_get.smt_station_status; dfx_ctl_get_stats()
2121 bp->stats.smt_peer_wrap_flag = bp->cmd_rsp_virt->smt_mib_get.smt_peer_wrap_flag; dfx_ctl_get_stats()
2122 bp->stats.smt_time_stamp = bp->cmd_rsp_virt->smt_mib_get.smt_msg_time_stamp.ls; dfx_ctl_get_stats()
2123 bp->stats.smt_transition_time_stamp = bp->cmd_rsp_virt->smt_mib_get.smt_transition_time_stamp.ls; dfx_ctl_get_stats()
2124 bp->stats.mac_frame_status_functions = bp->cmd_rsp_virt->smt_mib_get.mac_frame_status_functions; dfx_ctl_get_stats()
2125 bp->stats.mac_t_max_capability = bp->cmd_rsp_virt->smt_mib_get.mac_t_max_capability; dfx_ctl_get_stats()
2126 bp->stats.mac_tvx_capability = bp->cmd_rsp_virt->smt_mib_get.mac_tvx_capability; dfx_ctl_get_stats()
2127 bp->stats.mac_available_paths = bp->cmd_rsp_virt->smt_mib_get.mac_available_paths; dfx_ctl_get_stats()
2128 bp->stats.mac_current_path = bp->cmd_rsp_virt->smt_mib_get.mac_current_path; dfx_ctl_get_stats()
2129 memcpy(bp->stats.mac_upstream_nbr, &bp->cmd_rsp_virt->smt_mib_get.mac_upstream_nbr, FDDI_K_ALEN); dfx_ctl_get_stats()
2130 memcpy(bp->stats.mac_downstream_nbr, &bp->cmd_rsp_virt->smt_mib_get.mac_downstream_nbr, FDDI_K_ALEN); dfx_ctl_get_stats()
2131 memcpy(bp->stats.mac_old_upstream_nbr, &bp->cmd_rsp_virt->smt_mib_get.mac_old_upstream_nbr, FDDI_K_ALEN); dfx_ctl_get_stats()
2132 memcpy(bp->stats.mac_old_downstream_nbr, &bp->cmd_rsp_virt->smt_mib_get.mac_old_downstream_nbr, FDDI_K_ALEN); dfx_ctl_get_stats()
2133 bp->stats.mac_dup_address_test = bp->cmd_rsp_virt->smt_mib_get.mac_dup_address_test; dfx_ctl_get_stats()
2134 bp->stats.mac_requested_paths = bp->cmd_rsp_virt->smt_mib_get.mac_requested_paths; dfx_ctl_get_stats()
2135 bp->stats.mac_downstream_port_type = bp->cmd_rsp_virt->smt_mib_get.mac_downstream_port_type; dfx_ctl_get_stats()
2136 memcpy(bp->stats.mac_smt_address, &bp->cmd_rsp_virt->smt_mib_get.mac_smt_address, FDDI_K_ALEN); dfx_ctl_get_stats()
2137 bp->stats.mac_t_req = bp->cmd_rsp_virt->smt_mib_get.mac_t_req; dfx_ctl_get_stats()
2138 bp->stats.mac_t_neg = bp->cmd_rsp_virt->smt_mib_get.mac_t_neg; dfx_ctl_get_stats()
2139 bp->stats.mac_t_max = bp->cmd_rsp_virt->smt_mib_get.mac_t_max; dfx_ctl_get_stats()
2140 bp->stats.mac_tvx_value = bp->cmd_rsp_virt->smt_mib_get.mac_tvx_value; dfx_ctl_get_stats()
2141 bp->stats.mac_frame_error_threshold = bp->cmd_rsp_virt->smt_mib_get.mac_frame_error_threshold; dfx_ctl_get_stats()
2142 bp->stats.mac_frame_error_ratio = bp->cmd_rsp_virt->smt_mib_get.mac_frame_error_ratio; dfx_ctl_get_stats()
2143 bp->stats.mac_rmt_state = bp->cmd_rsp_virt->smt_mib_get.mac_rmt_state; dfx_ctl_get_stats()
2144 bp->stats.mac_da_flag = bp->cmd_rsp_virt->smt_mib_get.mac_da_flag; dfx_ctl_get_stats()
2145 bp->stats.mac_una_da_flag = bp->cmd_rsp_virt->smt_mib_get.mac_unda_flag; dfx_ctl_get_stats()
2146 bp->stats.mac_frame_error_flag = bp->cmd_rsp_virt->smt_mib_get.mac_frame_error_flag; dfx_ctl_get_stats()
2147 bp->stats.mac_ma_unitdata_available = bp->cmd_rsp_virt->smt_mib_get.mac_ma_unitdata_available; dfx_ctl_get_stats()
2148 bp->stats.mac_hardware_present = bp->cmd_rsp_virt->smt_mib_get.mac_hardware_present; dfx_ctl_get_stats()
2149 bp->stats.mac_ma_unitdata_enable = bp->cmd_rsp_virt->smt_mib_get.mac_ma_unitdata_enable; dfx_ctl_get_stats()
2150 bp->stats.path_tvx_lower_bound = bp->cmd_rsp_virt->smt_mib_get.path_tvx_lower_bound; dfx_ctl_get_stats()
2151 bp->stats.path_t_max_lower_bound = bp->cmd_rsp_virt->smt_mib_get.path_t_max_lower_bound; dfx_ctl_get_stats()
2152 bp->stats.path_max_t_req = bp->cmd_rsp_virt->smt_mib_get.path_max_t_req; dfx_ctl_get_stats()
2153 memcpy(bp->stats.path_configuration, &bp->cmd_rsp_virt->smt_mib_get.path_configuration, sizeof(bp->cmd_rsp_virt->smt_mib_get.path_configuration)); dfx_ctl_get_stats()
2154 bp->stats.port_my_type[0] = bp->cmd_rsp_virt->smt_mib_get.port_my_type[0]; dfx_ctl_get_stats()
2155 bp->stats.port_my_type[1] = bp->cmd_rsp_virt->smt_mib_get.port_my_type[1]; dfx_ctl_get_stats()
2156 bp->stats.port_neighbor_type[0] = bp->cmd_rsp_virt->smt_mib_get.port_neighbor_type[0]; dfx_ctl_get_stats()
2157 bp->stats.port_neighbor_type[1] = bp->cmd_rsp_virt->smt_mib_get.port_neighbor_type[1]; dfx_ctl_get_stats()
2158 bp->stats.port_connection_policies[0] = bp->cmd_rsp_virt->smt_mib_get.port_connection_policies[0]; dfx_ctl_get_stats()
2159 bp->stats.port_connection_policies[1] = bp->cmd_rsp_virt->smt_mib_get.port_connection_policies[1]; dfx_ctl_get_stats()
2160 bp->stats.port_mac_indicated[0] = bp->cmd_rsp_virt->smt_mib_get.port_mac_indicated[0]; dfx_ctl_get_stats()
2161 bp->stats.port_mac_indicated[1] = bp->cmd_rsp_virt->smt_mib_get.port_mac_indicated[1]; dfx_ctl_get_stats()
2162 bp->stats.port_current_path[0] = bp->cmd_rsp_virt->smt_mib_get.port_current_path[0]; dfx_ctl_get_stats()
2163 bp->stats.port_current_path[1] = bp->cmd_rsp_virt->smt_mib_get.port_current_path[1]; dfx_ctl_get_stats()
2164 memcpy(&bp->stats.port_requested_paths[0*3], &bp->cmd_rsp_virt->smt_mib_get.port_requested_paths[0], 3); dfx_ctl_get_stats()
2165 memcpy(&bp->stats.port_requested_paths[1*3], &bp->cmd_rsp_virt->smt_mib_get.port_requested_paths[1], 3); dfx_ctl_get_stats()
2166 bp->stats.port_mac_placement[0] = bp->cmd_rsp_virt->smt_mib_get.port_mac_placement[0]; dfx_ctl_get_stats()
2167 bp->stats.port_mac_placement[1] = bp->cmd_rsp_virt->smt_mib_get.port_mac_placement[1]; dfx_ctl_get_stats()
2168 bp->stats.port_available_paths[0] = bp->cmd_rsp_virt->smt_mib_get.port_available_paths[0]; dfx_ctl_get_stats()
2169 bp->stats.port_available_paths[1] = bp->cmd_rsp_virt->smt_mib_get.port_available_paths[1]; dfx_ctl_get_stats()
2170 bp->stats.port_pmd_class[0] = bp->cmd_rsp_virt->smt_mib_get.port_pmd_class[0]; dfx_ctl_get_stats()
2171 bp->stats.port_pmd_class[1] = bp->cmd_rsp_virt->smt_mib_get.port_pmd_class[1]; dfx_ctl_get_stats()
2172 bp->stats.port_connection_capabilities[0] = bp->cmd_rsp_virt->smt_mib_get.port_connection_capabilities[0]; dfx_ctl_get_stats()
2173 bp->stats.port_connection_capabilities[1] = bp->cmd_rsp_virt->smt_mib_get.port_connection_capabilities[1]; dfx_ctl_get_stats()
2174 bp->stats.port_bs_flag[0] = bp->cmd_rsp_virt->smt_mib_get.port_bs_flag[0]; dfx_ctl_get_stats()
2175 bp->stats.port_bs_flag[1] = bp->cmd_rsp_virt->smt_mib_get.port_bs_flag[1]; dfx_ctl_get_stats()
2176 bp->stats.port_ler_estimate[0] = bp->cmd_rsp_virt->smt_mib_get.port_ler_estimate[0]; dfx_ctl_get_stats()
2177 bp->stats.port_ler_estimate[1] = bp->cmd_rsp_virt->smt_mib_get.port_ler_estimate[1]; dfx_ctl_get_stats()
2178 bp->stats.port_ler_cutoff[0] = bp->cmd_rsp_virt->smt_mib_get.port_ler_cutoff[0]; dfx_ctl_get_stats()
2179 bp->stats.port_ler_cutoff[1] = bp->cmd_rsp_virt->smt_mib_get.port_ler_cutoff[1]; dfx_ctl_get_stats()
2180 bp->stats.port_ler_alarm[0] = bp->cmd_rsp_virt->smt_mib_get.port_ler_alarm[0]; dfx_ctl_get_stats()
2181 bp->stats.port_ler_alarm[1] = bp->cmd_rsp_virt->smt_mib_get.port_ler_alarm[1]; dfx_ctl_get_stats()
2182 bp->stats.port_connect_state[0] = bp->cmd_rsp_virt->smt_mib_get.port_connect_state[0]; dfx_ctl_get_stats()
2183 bp->stats.port_connect_state[1] = bp->cmd_rsp_virt->smt_mib_get.port_connect_state[1]; dfx_ctl_get_stats()
2184 bp->stats.port_pcm_state[0] = bp->cmd_rsp_virt->smt_mib_get.port_pcm_state[0]; dfx_ctl_get_stats()
2185 bp->stats.port_pcm_state[1] = bp->cmd_rsp_virt->smt_mib_get.port_pcm_state[1]; dfx_ctl_get_stats()
2186 bp->stats.port_pc_withhold[0] = bp->cmd_rsp_virt->smt_mib_get.port_pc_withhold[0]; dfx_ctl_get_stats()
2187 bp->stats.port_pc_withhold[1] = bp->cmd_rsp_virt->smt_mib_get.port_pc_withhold[1]; dfx_ctl_get_stats()
2188 bp->stats.port_ler_flag[0] = bp->cmd_rsp_virt->smt_mib_get.port_ler_flag[0]; dfx_ctl_get_stats()
2189 bp->stats.port_ler_flag[1] = bp->cmd_rsp_virt->smt_mib_get.port_ler_flag[1]; dfx_ctl_get_stats()
2190 bp->stats.port_hardware_present[0] = bp->cmd_rsp_virt->smt_mib_get.port_hardware_present[0]; dfx_ctl_get_stats()
2191 bp->stats.port_hardware_present[1] = bp->cmd_rsp_virt->smt_mib_get.port_hardware_present[1]; dfx_ctl_get_stats()
2197 return (struct net_device_stats *)&bp->stats; dfx_ctl_get_stats()
2199 /* Fill the bp->stats structure with the FDDI counter values */ dfx_ctl_get_stats()
2201 bp->stats.mac_frame_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.frame_cnt.ls; dfx_ctl_get_stats()
2202 bp->stats.mac_copied_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.copied_cnt.ls; dfx_ctl_get_stats()
2203 bp->stats.mac_transmit_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.transmit_cnt.ls; dfx_ctl_get_stats()
2204 bp->stats.mac_error_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.error_cnt.ls; dfx_ctl_get_stats()
2205 bp->stats.mac_lost_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.lost_cnt.ls; dfx_ctl_get_stats()
2206 bp->stats.port_lct_fail_cts[0] = bp->cmd_rsp_virt->cntrs_get.cntrs.lct_rejects[0].ls; dfx_ctl_get_stats()
2207 bp->stats.port_lct_fail_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.lct_rejects[1].ls; dfx_ctl_get_stats()
2208 bp->stats.port_lem_reject_cts[0] = bp->cmd_rsp_virt->cntrs_get.cntrs.lem_rejects[0].ls; dfx_ctl_get_stats()
2209 bp->stats.port_lem_reject_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.lem_rejects[1].ls; dfx_ctl_get_stats()
2210 bp->stats.port_lem_cts[0] = bp->cmd_rsp_virt->cntrs_get.cntrs.link_errors[0].ls; dfx_ctl_get_stats()
2211 bp->stats.port_lem_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.link_errors[1].ls; dfx_ctl_get_stats()
2213 return (struct net_device_stats *)&bp->stats; dfx_ctl_get_stats()
/linux-4.1.27/drivers/net/ethernet/cirrus/
H A Dmac89x0.c441 dev->stats.tx_packets++; net_interrupt()
444 dev->stats.tx_errors++; net_interrupt()
446 dev->stats.tx_carrier_errors++; net_interrupt()
448 dev->stats.tx_heartbeat_errors++; net_interrupt()
450 dev->stats.tx_window_errors++; net_interrupt()
452 dev->stats.tx_aborted_errors++; net_interrupt()
471 dev->stats.rx_missed_errors += (status >> 6); net_interrupt()
474 dev->stats.collisions += (status >> 6); net_interrupt()
490 dev->stats.rx_errors++; net_rx()
492 dev->stats.rx_length_errors++; net_rx()
494 dev->stats.rx_length_errors++; net_rx()
498 dev->stats.rx_crc_errors++; net_rx()
500 dev->stats.rx_frame_errors++; net_rx()
509 dev->stats.rx_dropped++; net_rx()
524 dev->stats.rx_packets++; net_rx()
525 dev->stats.rx_bytes += length; net_rx()
557 dev->stats.rx_missed_errors += (readreg(dev, PP_RxMiss) >> 6); net_get_stats()
558 dev->stats.collisions += (readreg(dev, PP_TxCol) >> 6); net_get_stats()
561 return &dev->stats; net_get_stats()
/linux-4.1.27/drivers/net/ethernet/8390/
H A Dlib8390.c132 * processor case other than interrupts (get stats/set multicast list in
261 dev->stats.tx_errors++; __ei_tx_timeout()
273 if (!isr && !dev->stats.tx_packets) { __ei_tx_timeout()
370 dev->stats.tx_errors++; __ei_start_xmit()
408 dev->stats.tx_bytes += send_length; __ei_start_xmit()
478 dev->stats.rx_frame_errors += ei_inb_p(e8390_base + EN0_COUNTER0); __ei_interrupt()
479 dev->stats.rx_crc_errors += ei_inb_p(e8390_base + EN0_COUNTER1); __ei_interrupt()
480 dev->stats.rx_missed_errors += ei_inb_p(e8390_base + EN0_COUNTER2); __ei_interrupt()
559 dev->stats.tx_errors++; ei_tx_err()
561 dev->stats.tx_carrier_errors++; ei_tx_err()
563 dev->stats.tx_heartbeat_errors++; ei_tx_err()
565 dev->stats.tx_window_errors++; ei_tx_err()
624 dev->stats.collisions++; ei_tx_intr()
626 dev->stats.tx_packets++; ei_tx_intr()
628 dev->stats.tx_errors++; ei_tx_intr()
630 dev->stats.tx_aborted_errors++; ei_tx_intr()
631 dev->stats.collisions += 16; ei_tx_intr()
634 dev->stats.tx_carrier_errors++; ei_tx_intr()
636 dev->stats.tx_fifo_errors++; ei_tx_intr()
638 dev->stats.tx_heartbeat_errors++; ei_tx_intr()
640 dev->stats.tx_window_errors++; ei_tx_intr()
709 dev->stats.rx_errors++; ei_receive()
718 dev->stats.rx_errors++; ei_receive()
719 dev->stats.rx_length_errors++; ei_receive()
728 dev->stats.rx_dropped++; ei_receive()
737 dev->stats.rx_packets++; ei_receive()
738 dev->stats.rx_bytes += pkt_len; ei_receive()
740 dev->stats.multicast++; ei_receive()
747 dev->stats.rx_errors++; ei_receive()
750 dev->stats.rx_fifo_errors++; ei_receive()
797 dev->stats.rx_over_errors++; ei_rx_overrun()
847 * Collect the stats. This is called unlocked and from several contexts.
856 /* If the card is stopped, just return the present stats. */ __ei_get_stats()
858 return &dev->stats; __ei_get_stats()
862 dev->stats.rx_frame_errors += ei_inb_p(ioaddr + EN0_COUNTER0); __ei_get_stats()
863 dev->stats.rx_crc_errors += ei_inb_p(ioaddr + EN0_COUNTER1); __ei_get_stats()
864 dev->stats.rx_missed_errors += ei_inb_p(ioaddr + EN0_COUNTER2); __ei_get_stats()
867 return &dev->stats; __ei_get_stats()
/linux-4.1.27/drivers/net/wireless/iwlwifi/dvm/
H A Drx.c475 struct iwl_bt_notif_statistics *stats; iwlagn_rx_statistics() local
476 stats = (void *)&pkt->data; iwlagn_rx_statistics()
477 flag = &stats->flag; iwlagn_rx_statistics()
478 common = &stats->general.common; iwlagn_rx_statistics()
479 rx_non_phy = &stats->rx.general.common; iwlagn_rx_statistics()
480 rx_ofdm = &stats->rx.ofdm; iwlagn_rx_statistics()
481 rx_ofdm_ht = &stats->rx.ofdm_ht; iwlagn_rx_statistics()
482 rx_cck = &stats->rx.cck; iwlagn_rx_statistics()
483 tx = &stats->tx; iwlagn_rx_statistics()
484 bt_activity = &stats->general.activity; iwlagn_rx_statistics()
488 priv->statistics.num_bt_kills = stats->rx.general.num_bt_kills; iwlagn_rx_statistics()
490 le32_to_cpu(stats->rx.general.num_bt_kills)); iwlagn_rx_statistics()
493 struct iwl_notif_statistics *stats; iwlagn_rx_statistics() local
494 stats = (void *)&pkt->data; iwlagn_rx_statistics()
495 flag = &stats->flag; iwlagn_rx_statistics()
496 common = &stats->general.common; iwlagn_rx_statistics()
497 rx_non_phy = &stats->rx.general; iwlagn_rx_statistics()
498 rx_ofdm = &stats->rx.ofdm; iwlagn_rx_statistics()
499 rx_ofdm_ht = &stats->rx.ofdm_ht; iwlagn_rx_statistics()
500 rx_cck = &stats->rx.cck; iwlagn_rx_statistics()
501 tx = &stats->tx; iwlagn_rx_statistics()
562 struct iwl_notif_statistics *stats = (void *)pkt->data; iwlagn_rx_reply_statistics() local
564 if (le32_to_cpu(stats->flag) & UCODE_STATISTICS_CLEAR_MSK) { iwlagn_rx_reply_statistics()
676 struct ieee80211_rx_status *stats) iwlagn_set_decrypted_flag()
712 stats->flag |= RX_FLAG_DECRYPTED; iwlagn_set_decrypted_flag()
727 struct ieee80211_rx_status *stats) iwlagn_pass_packet_to_mac80211()
743 iwlagn_set_decrypted_flag(priv, hdr, ampdu_status, stats)) iwlagn_pass_packet_to_mac80211()
787 memcpy(IEEE80211_SKB_RXCB(skb), stats, sizeof(*stats)); local
673 iwlagn_set_decrypted_flag(struct iwl_priv *priv, struct ieee80211_hdr *hdr, u32 decrypt_res, struct ieee80211_rx_status *stats) iwlagn_set_decrypted_flag() argument
722 iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv, struct ieee80211_hdr *hdr, u16 len, u32 ampdu_status, struct iwl_rx_cmd_buffer *rxb, struct ieee80211_rx_status *stats) iwlagn_pass_packet_to_mac80211() argument
/linux-4.1.27/drivers/staging/netlogic/
H A Dxlr_net.c358 static void xlr_stats(struct net_device *ndev, struct rtnl_link_stats64 *stats) xlr_stats() argument
362 stats->rx_packets = xlr_nae_rdreg(priv->base_addr, RX_PACKET_COUNTER); xlr_stats()
363 stats->tx_packets = xlr_nae_rdreg(priv->base_addr, TX_PACKET_COUNTER); xlr_stats()
364 stats->rx_bytes = xlr_nae_rdreg(priv->base_addr, RX_BYTE_COUNTER); xlr_stats()
365 stats->tx_bytes = xlr_nae_rdreg(priv->base_addr, TX_BYTE_COUNTER); xlr_stats()
366 stats->tx_errors = xlr_nae_rdreg(priv->base_addr, TX_FCS_ERROR_COUNTER); xlr_stats()
367 stats->rx_dropped = xlr_nae_rdreg(priv->base_addr, xlr_stats()
369 stats->tx_dropped = xlr_nae_rdreg(priv->base_addr, xlr_stats()
372 stats->multicast = xlr_nae_rdreg(priv->base_addr, xlr_stats()
374 stats->collisions = xlr_nae_rdreg(priv->base_addr, xlr_stats()
377 stats->rx_length_errors = xlr_nae_rdreg(priv->base_addr, xlr_stats()
379 stats->rx_over_errors = xlr_nae_rdreg(priv->base_addr, xlr_stats()
381 stats->rx_crc_errors = xlr_nae_rdreg(priv->base_addr, xlr_stats()
383 stats->rx_frame_errors = xlr_nae_rdreg(priv->base_addr, xlr_stats()
386 stats->rx_fifo_errors = xlr_nae_rdreg(priv->base_addr, xlr_stats()
388 stats->rx_missed_errors = xlr_nae_rdreg(priv->base_addr, xlr_stats()
391 stats->rx_errors = (stats->rx_over_errors + stats->rx_crc_errors + xlr_stats()
392 stats->rx_frame_errors + stats->rx_fifo_errors + xlr_stats()
393 stats->rx_missed_errors); xlr_stats()
395 stats->tx_aborted_errors = xlr_nae_rdreg(priv->base_addr, xlr_stats()
397 stats->tx_carrier_errors = xlr_nae_rdreg(priv->base_addr, xlr_stats()
399 stats->tx_fifo_errors = xlr_nae_rdreg(priv->base_addr, xlr_stats()
404 struct rtnl_link_stats64 *stats) xlr_get_stats64()
406 xlr_stats(ndev, stats); xlr_get_stats64()
407 return stats; xlr_get_stats64()
994 /* Clear all stats */ xlr_gmac_init()
403 xlr_get_stats64(struct net_device *ndev, struct rtnl_link_stats64 *stats) xlr_get_stats64() argument
/linux-4.1.27/drivers/net/ethernet/intel/i40e/
H A Di40e_ethtool.c68 I40E_VEB_STAT("rx_bytes", stats.rx_bytes),
69 I40E_VEB_STAT("tx_bytes", stats.tx_bytes),
70 I40E_VEB_STAT("rx_unicast", stats.rx_unicast),
71 I40E_VEB_STAT("tx_unicast", stats.tx_unicast),
72 I40E_VEB_STAT("rx_multicast", stats.rx_multicast),
73 I40E_VEB_STAT("tx_multicast", stats.tx_multicast),
74 I40E_VEB_STAT("rx_broadcast", stats.rx_broadcast),
75 I40E_VEB_STAT("tx_broadcast", stats.tx_broadcast),
76 I40E_VEB_STAT("rx_discards", stats.rx_discards),
77 I40E_VEB_STAT("tx_discards", stats.tx_discards),
78 I40E_VEB_STAT("tx_errors", stats.tx_errors),
79 I40E_VEB_STAT("rx_unknown_protocol", stats.rx_unknown_protocol),
102 * The PF_STATs are appended to the netdev stats only when ethtool -S
106 I40E_PF_STAT("rx_bytes", stats.eth.rx_bytes),
107 I40E_PF_STAT("tx_bytes", stats.eth.tx_bytes),
108 I40E_PF_STAT("rx_unicast", stats.eth.rx_unicast),
109 I40E_PF_STAT("tx_unicast", stats.eth.tx_unicast),
110 I40E_PF_STAT("rx_multicast", stats.eth.rx_multicast),
111 I40E_PF_STAT("tx_multicast", stats.eth.tx_multicast),
112 I40E_PF_STAT("rx_broadcast", stats.eth.rx_broadcast),
113 I40E_PF_STAT("tx_broadcast", stats.eth.tx_broadcast),
114 I40E_PF_STAT("tx_errors", stats.eth.tx_errors),
115 I40E_PF_STAT("rx_dropped", stats.eth.rx_discards),
116 I40E_PF_STAT("tx_dropped_link_down", stats.tx_dropped_link_down),
117 I40E_PF_STAT("crc_errors", stats.crc_errors),
118 I40E_PF_STAT("illegal_bytes", stats.illegal_bytes),
119 I40E_PF_STAT("mac_local_faults", stats.mac_local_faults),
120 I40E_PF_STAT("mac_remote_faults", stats.mac_remote_faults),
123 I40E_PF_STAT("rx_length_errors", stats.rx_length_errors),
124 I40E_PF_STAT("link_xon_rx", stats.link_xon_rx),
125 I40E_PF_STAT("link_xoff_rx", stats.link_xoff_rx),
126 I40E_PF_STAT("link_xon_tx", stats.link_xon_tx),
127 I40E_PF_STAT("link_xoff_tx", stats.link_xoff_tx),
128 I40E_PF_STAT("rx_size_64", stats.rx_size_64),
129 I40E_PF_STAT("rx_size_127", stats.rx_size_127),
130 I40E_PF_STAT("rx_size_255", stats.rx_size_255),
131 I40E_PF_STAT("rx_size_511", stats.rx_size_511),
132 I40E_PF_STAT("rx_size_1023", stats.rx_size_1023),
133 I40E_PF_STAT("rx_size_1522", stats.rx_size_1522),
134 I40E_PF_STAT("rx_size_big", stats.rx_size_big),
135 I40E_PF_STAT("tx_size_64", stats.tx_size_64),
136 I40E_PF_STAT("tx_size_127", stats.tx_size_127),
137 I40E_PF_STAT("tx_size_255", stats.tx_size_255),
138 I40E_PF_STAT("tx_size_511", stats.tx_size_511),
139 I40E_PF_STAT("tx_size_1023", stats.tx_size_1023),
140 I40E_PF_STAT("tx_size_1522", stats.tx_size_1522),
141 I40E_PF_STAT("tx_size_big", stats.tx_size_big),
142 I40E_PF_STAT("rx_undersize", stats.rx_undersize),
143 I40E_PF_STAT("rx_fragments", stats.rx_fragments),
144 I40E_PF_STAT("rx_oversize", stats.rx_oversize),
145 I40E_PF_STAT("rx_jabber", stats.rx_jabber),
149 I40E_PF_STAT("fdir_atr_match", stats.fd_atr_match),
150 I40E_PF_STAT("fdir_sb_match", stats.fd_sb_match),
152 /* LPI stats */
153 I40E_PF_STAT("tx_lpi_status", stats.tx_lpi_status),
154 I40E_PF_STAT("rx_lpi_status", stats.rx_lpi_status),
155 I40E_PF_STAT("tx_lpi_count", stats.tx_lpi_count),
156 I40E_PF_STAT("rx_lpi_count", stats.rx_lpi_count),
191 (FIELD_SIZEOF(struct i40e_pf, stats.priority_xoff_rx) + \
192 FIELD_SIZEOF(struct i40e_pf, stats.priority_xon_rx) + \
193 FIELD_SIZEOF(struct i40e_pf, stats.priority_xoff_tx) + \
194 FIELD_SIZEOF(struct i40e_pf, stats.priority_xon_tx) + \
195 FIELD_SIZEOF(struct i40e_pf, stats.priority_xon_2_xoff)) \
1264 struct ethtool_stats *stats, u64 *data) i40e_get_ethtool_stats()
1305 data[i] = tx_ring->stats.packets; i40e_get_ethtool_stats()
1306 data[i + 1] = tx_ring->stats.bytes; i40e_get_ethtool_stats()
1314 data[i] = rx_ring->stats.packets; i40e_get_ethtool_stats()
1315 data[i + 1] = rx_ring->stats.bytes; i40e_get_ethtool_stats()
1338 data[i++] = pf->stats.priority_xon_tx[j]; i40e_get_ethtool_stats()
1339 data[i++] = pf->stats.priority_xoff_tx[j]; i40e_get_ethtool_stats()
1342 data[i++] = pf->stats.priority_xon_rx[j]; i40e_get_ethtool_stats()
1343 data[i++] = pf->stats.priority_xoff_rx[j]; i40e_get_ethtool_stats()
1346 data[i++] = pf->stats.priority_xon_2_xoff[j]; i40e_get_ethtool_stats()
1263 i40e_get_ethtool_stats(struct net_device *netdev, struct ethtool_stats *stats, u64 *data) i40e_get_ethtool_stats() argument
/linux-4.1.27/drivers/net/can/usb/
H A Dkvaser_usb.c702 struct net_device_stats *stats; kvaser_usb_tx_acknowledge() local
724 stats = &priv->netdev->stats; kvaser_usb_tx_acknowledge()
735 stats->rx_packets++; kvaser_usb_tx_acknowledge()
736 stats->rx_bytes += cf->can_dlc; kvaser_usb_tx_acknowledge()
749 stats->tx_packets++; kvaser_usb_tx_acknowledge()
750 stats->tx_bytes += context->dlc; kvaser_usb_tx_acknowledge()
825 struct net_device_stats *stats = &priv->netdev->stats; kvaser_usb_rx_error_update_can_state() local
868 stats->rx_errors++; kvaser_usb_rx_error_update_can_state()
873 stats->tx_errors++; kvaser_usb_rx_error_update_can_state()
875 stats->rx_errors++; kvaser_usb_rx_error_update_can_state()
891 struct net_device_stats *stats; kvaser_usb_rx_error() local
902 stats = &priv->netdev->stats; kvaser_usb_rx_error()
920 stats->rx_dropped++; kvaser_usb_rx_error()
973 stats->rx_packets++; kvaser_usb_rx_error()
974 stats->rx_bytes += cf->can_dlc; kvaser_usb_rx_error()
1101 struct net_device_stats *stats = &priv->netdev->stats; kvaser_usb_rx_can_err() local
1108 stats->rx_errors++; kvaser_usb_rx_can_err()
1113 stats->rx_over_errors++; kvaser_usb_rx_can_err()
1114 stats->rx_errors++; kvaser_usb_rx_can_err()
1118 stats->rx_dropped++; kvaser_usb_rx_can_err()
1125 stats->rx_packets++; kvaser_usb_rx_can_err()
1126 stats->rx_bytes += cf->can_dlc; kvaser_usb_rx_can_err()
1137 struct net_device_stats *stats; kvaser_usb_rx_can_msg() local
1148 stats = &priv->netdev->stats; kvaser_usb_rx_can_msg()
1177 stats->tx_dropped++; kvaser_usb_rx_can_msg()
1215 stats->rx_packets++; kvaser_usb_rx_can_msg()
1216 stats->rx_bytes += cf->can_dlc; kvaser_usb_rx_can_msg()
1653 struct net_device_stats *stats = &netdev->stats; kvaser_usb_start_xmit() local
1669 stats->tx_dropped++; kvaser_usb_start_xmit()
1676 stats->tx_dropped++; kvaser_usb_start_xmit()
1765 stats->tx_dropped++; kvaser_usb_start_xmit()
/linux-4.1.27/drivers/net/can/cc770/
H A Dcc770.c396 struct net_device_stats *stats = &dev->stats; cc770_start_xmit() local
448 stats->tx_bytes += dlc; cc770_start_xmit()
465 struct net_device_stats *stats = &dev->stats; cc770_rx() local
509 stats->rx_packets++; cc770_rx()
510 stats->rx_bytes += cf->can_dlc; cc770_rx()
516 struct net_device_stats *stats = &dev->stats; cc770_err() local
589 stats->rx_packets++; cc770_err()
590 stats->rx_bytes += cf->can_dlc; cc770_err()
616 struct net_device_stats *stats = &dev->stats; cc770_rx_interrupt() local
636 stats->rx_over_errors++; cc770_rx_interrupt()
637 stats->rx_errors++; cc770_rx_interrupt()
681 struct net_device_stats *stats = &dev->stats; cc770_tx_interrupt() local
694 stats->tx_packets++; cc770_tx_interrupt()
/linux-4.1.27/drivers/net/ethernet/qualcomm/
H A Dqca_spi.c238 struct net_device_stats *n_stats = &qca->net_dev->stats; qcaspi_transmit()
254 qca->stats.write_buf_miss++; qcaspi_transmit()
259 qca->stats.write_err++; qcaspi_transmit()
292 struct net_device_stats *n_stats = &net_dev->stats; qcaspi_receive()
303 qca->stats.out_of_mem++; qcaspi_receive()
343 qca->stats.read_err++; qcaspi_receive()
385 qca->stats.out_of_mem++; qcaspi_receive()
425 qca->net_dev->stats.tx_dropped++; qcaspi_flush_tx_ring()
492 qca->stats.trig_reset++; qcaspi_qca7k_sync()
502 qca->stats.reset_timeout++; qcaspi_qca7k_sync()
551 qca->stats.device_reset++; qcaspi_spi_thread()
559 qca->stats.read_buf_err++; qcaspi_spi_thread()
567 qca->stats.write_buf_err++; qcaspi_spi_thread()
675 qca->stats.ring_full++; qcaspi_netdev_xmit()
685 qca->stats.out_of_mem++; qcaspi_netdev_xmit()
719 qca->stats.ring_full++; qcaspi_netdev_xmit()
738 qca->net_dev->stats.tx_errors++; qcaspi_netdev_tx_timeout()
756 memset(&qca->stats, 0, sizeof(struct qcaspi_stats)); qcaspi_netdev_init()
/linux-4.1.27/drivers/usb/gadget/function/
H A Drndis.c173 const struct rtnl_link_stats64 *stats; gen_ndis_query_resp() local
196 stats = dev_get_stats(net, &temp); gen_ndis_query_resp()
360 if (stats) { gen_ndis_query_resp()
361 *outbuf = cpu_to_le32(stats->tx_packets gen_ndis_query_resp()
362 - stats->tx_errors - stats->tx_dropped); gen_ndis_query_resp()
371 if (stats) { gen_ndis_query_resp()
372 *outbuf = cpu_to_le32(stats->rx_packets gen_ndis_query_resp()
373 - stats->rx_errors - stats->rx_dropped); gen_ndis_query_resp()
382 if (stats) { gen_ndis_query_resp()
383 *outbuf = cpu_to_le32(stats->tx_errors); gen_ndis_query_resp()
392 if (stats) { gen_ndis_query_resp()
393 *outbuf = cpu_to_le32(stats->rx_errors); gen_ndis_query_resp()
401 if (stats) { gen_ndis_query_resp()
402 *outbuf = cpu_to_le32(stats->rx_dropped); gen_ndis_query_resp()
460 if (stats) { gen_ndis_query_resp()
461 *outbuf = cpu_to_le32(stats->rx_frame_errors); gen_ndis_query_resp()
/linux-4.1.27/drivers/net/ethernet/aeroflex/
H A Dgreth.c423 dev->stats.tx_errors++; greth_start_xmit()
488 dev->stats.tx_errors++; greth_start_xmit_gbit()
643 dev->stats.tx_errors++; greth_clean_tx()
645 dev->stats.tx_aborted_errors++; greth_clean_tx()
647 dev->stats.tx_fifo_errors++; greth_clean_tx()
649 dev->stats.tx_packets++; greth_clean_tx()
650 dev->stats.tx_bytes += greth->tx_bufs_length[greth->tx_last]; greth_clean_tx()
664 dev->stats.tx_errors++; greth_update_tx_stats()
666 dev->stats.tx_aborted_errors++; greth_update_tx_stats()
668 dev->stats.tx_fifo_errors++; greth_update_tx_stats()
670 dev->stats.tx_aborted_errors++; greth_update_tx_stats()
672 dev->stats.tx_packets++; greth_update_tx_stats()
706 dev->stats.tx_bytes += skb->len; greth_clean_tx_gbit()
770 dev->stats.rx_length_errors++; greth_rx()
774 dev->stats.rx_frame_errors++; greth_rx()
778 dev->stats.rx_crc_errors++; greth_rx()
783 dev->stats.rx_errors++; greth_rx()
796 dev->stats.rx_dropped++; greth_rx()
812 dev->stats.rx_bytes += pkt_len; greth_rx()
813 dev->stats.rx_packets++; greth_rx()
884 dev->stats.rx_length_errors++; greth_rx_gbit()
888 dev->stats.rx_frame_errors++; greth_rx_gbit()
891 dev->stats.rx_crc_errors++; greth_rx_gbit()
926 dev->stats.rx_packets++; greth_rx_gbit()
927 dev->stats.rx_bytes += pkt_len; greth_rx_gbit()
937 dev->stats.rx_dropped++; greth_rx_gbit()
941 dev->stats.rx_dropped++; greth_rx_gbit()
952 dev->stats.rx_dropped++; greth_rx_gbit()
/linux-4.1.27/drivers/net/ethernet/freescale/
H A Dfec_mpc52xx.c97 dev->stats.tx_errors++; mpc52xx_fec_tx_timeout()
403 dev->stats.rx_dropped++; mpc52xx_fec_rx_interrupt()
414 dev->stats.rx_dropped++; mpc52xx_fec_rx_interrupt()
484 struct net_device_stats *stats = &dev->stats; mpc52xx_fec_get_stats() local
487 stats->rx_bytes = in_be32(&fec->rmon_r_octets); mpc52xx_fec_get_stats()
488 stats->rx_packets = in_be32(&fec->rmon_r_packets); mpc52xx_fec_get_stats()
489 stats->rx_errors = in_be32(&fec->rmon_r_crc_align) + mpc52xx_fec_get_stats()
495 stats->tx_bytes = in_be32(&fec->rmon_t_octets); mpc52xx_fec_get_stats()
496 stats->tx_packets = in_be32(&fec->rmon_t_packets); mpc52xx_fec_get_stats()
497 stats->tx_errors = in_be32(&fec->rmon_t_crc_align) + mpc52xx_fec_get_stats()
503 stats->multicast = in_be32(&fec->rmon_r_mc_pkt); mpc52xx_fec_get_stats()
504 stats->collisions = in_be32(&fec->rmon_t_col); mpc52xx_fec_get_stats()
507 stats->rx_length_errors = in_be32(&fec->rmon_r_undersize) mpc52xx_fec_get_stats()
511 stats->rx_over_errors = in_be32(&fec->r_macerr); mpc52xx_fec_get_stats()
512 stats->rx_crc_errors = in_be32(&fec->ieee_r_crc); mpc52xx_fec_get_stats()
513 stats->rx_frame_errors = in_be32(&fec->ieee_r_align); mpc52xx_fec_get_stats()
514 stats->rx_fifo_errors = in_be32(&fec->rmon_r_drop); mpc52xx_fec_get_stats()
515 stats->rx_missed_errors = in_be32(&fec->rmon_r_drop); mpc52xx_fec_get_stats()
518 stats->tx_aborted_errors = 0; mpc52xx_fec_get_stats()
519 stats->tx_carrier_errors = in_be32(&fec->ieee_t_cserr); mpc52xx_fec_get_stats()
520 stats->tx_fifo_errors = in_be32(&fec->rmon_t_drop); mpc52xx_fec_get_stats()
521 stats->tx_heartbeat_errors = in_be32(&fec->ieee_t_sqe); mpc52xx_fec_get_stats()
522 stats->tx_window_errors = in_be32(&fec->ieee_t_lcol); mpc52xx_fec_get_stats()
524 return stats; mpc52xx_fec_get_stats()
529 * then zero all the stats fields in memory
542 memset(&dev->stats, 0, sizeof(dev->stats)); mpc52xx_fec_reset_stats()
/linux-4.1.27/drivers/net/wireless/ath/ath10k/
H A Dhtt.h964 * present - The requested stats have been delivered in full.
965 * This indicates that either the stats information was contained
967 * completes the delivery of the requested stats info that was
969 * partial - The requested stats have been delivered in part.
973 * error - The requested stats could not be delivered, for example due
975 * requested stats.
977 * target is configured to not gather the stats type in question.
979 * series_done - This special value indicates that no further stats info
980 * elements are present within a series of stats info elems
981 * (within a stats upload confirmation message).
995 * to host stats upload confirmation message.
996 * The message contains a cookie echoed from the HTT host->target stats
998 * for, and a series of tag-length-value stats information elements.
999 * The tag-length header for each stats info element also includes a
1004 * the end of the series of stats info elements.
1015 * | stats entry length | reserved | S |stat type|
1018 * | type-specific stats info |
1021 * | stats entry length | reserved | S |stat type|
1024 * | type-specific stats info |
1036 * Purpose: Provide a mechanism to match a target->host stats confirmation
1037 * message with its preceding host->target stats request message.
1041 * Purpose: Provide a mechanism to match a target->host stats confirmation
1042 * message with its preceding host->target stats request message.
1053 * Purpose: indicate whether the requested stats are present
1055 * the completion of the stats entry series
1058 * Purpose: indicate the stats information size
1059 * Value: This field specifies the number of bytes of stats information
1063 * subsequent stats entry header will begin on a 4-byte aligned
/linux-4.1.27/drivers/net/ethernet/silan/
H A Dsc92031.c413 dev->stats.tx_dropped++; _sc92031_tx_clear()
668 dev->stats.tx_bytes += tx_status & 0x1fff; _sc92031_tx_tasklet()
669 dev->stats.tx_packets++; _sc92031_tx_tasklet()
671 dev->stats.collisions += (tx_status >> 22) & 0xf; _sc92031_tx_tasklet()
675 dev->stats.tx_errors++; _sc92031_tx_tasklet()
678 dev->stats.tx_aborted_errors++; _sc92031_tx_tasklet()
681 dev->stats.tx_carrier_errors++; _sc92031_tx_tasklet()
684 dev->stats.tx_window_errors++; _sc92031_tx_tasklet()
688 dev->stats.tx_fifo_errors++; _sc92031_tx_tasklet()
700 dev->stats.rx_errors++; _sc92031_rx_tasklet_error()
701 dev->stats.rx_length_errors++; _sc92031_rx_tasklet_error()
705 dev->stats.rx_errors++; _sc92031_rx_tasklet_error()
708 dev->stats.rx_length_errors++; _sc92031_rx_tasklet_error()
711 dev->stats.rx_frame_errors++; _sc92031_rx_tasklet_error()
714 dev->stats.rx_crc_errors++; _sc92031_rx_tasklet_error()
809 dev->stats.rx_bytes += pkt_size; _sc92031_rx_tasklet()
810 dev->stats.rx_packets++; _sc92031_rx_tasklet()
813 dev->stats.multicast++; _sc92031_rx_tasklet()
830 dev->stats.tx_carrier_errors++; _sc92031_link_tasklet()
855 dev->stats.rx_errors++; sc92031_tasklet()
858 dev->stats.rx_errors++; sc92031_tasklet()
859 dev->stats.rx_length_errors++; sc92031_tasklet()
925 dev->stats.rx_fifo_errors = priv->rx_value; sc92031_get_stats()
927 dev->stats.rx_fifo_errors = temp + priv->rx_value; sc92031_get_stats()
932 return &dev->stats; sc92031_get_stats()
945 dev->stats.tx_dropped++; sc92031_start_xmit()
952 dev->stats.tx_dropped++; sc92031_start_xmit()
1360 struct ethtool_stats *stats, u64 *data) sc92031_ethtool_get_ethtool_stats()
1359 sc92031_ethtool_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) sc92031_ethtool_get_ethtool_stats() argument
/linux-4.1.27/drivers/net/ethernet/ti/
H A Ddavinci_cpdma.c123 struct cpdma_chan_stats stats; member in struct:cpdma_chan
565 struct cpdma_chan_stats *stats) cpdma_chan_get_stats()
571 memcpy(stats, &chan->stats, sizeof(*stats)); cpdma_chan_get_stats()
595 chan->stats.head_enqueue); cpdma_chan_dump()
597 chan->stats.tail_enqueue); cpdma_chan_dump()
599 chan->stats.pad_enqueue); cpdma_chan_dump()
601 chan->stats.misqueued); cpdma_chan_dump()
603 chan->stats.desc_alloc_fail); cpdma_chan_dump()
605 chan->stats.pad_alloc_fail); cpdma_chan_dump()
607 chan->stats.runt_receive_buff); cpdma_chan_dump()
609 chan->stats.runt_transmit_buff); cpdma_chan_dump()
611 chan->stats.empty_dequeue); cpdma_chan_dump()
613 chan->stats.busy_dequeue); cpdma_chan_dump()
615 chan->stats.good_dequeue); cpdma_chan_dump()
617 chan->stats.requeue); cpdma_chan_dump()
619 chan->stats.teardown_dequeue); cpdma_chan_dump()
638 chan->stats.head_enqueue++; __cpdma_chan_submit()
649 chan->stats.tail_enqueue++; __cpdma_chan_submit()
657 chan->stats.misqueued++; __cpdma_chan_submit()
680 chan->stats.desc_alloc_fail++; cpdma_chan_submit()
687 chan->stats.runt_transmit_buff++; cpdma_chan_submit()
778 chan->stats.empty_dequeue++; __cpdma_chan_process()
787 chan->stats.busy_dequeue++; __cpdma_chan_process()
801 chan->stats.good_dequeue++; __cpdma_chan_process()
804 chan->stats.requeue++; __cpdma_chan_process()
916 chan->stats.teardown_dequeue++; cpdma_chan_stop()
564 cpdma_chan_get_stats(struct cpdma_chan *chan, struct cpdma_chan_stats *stats) cpdma_chan_get_stats() argument
/linux-4.1.27/arch/m68k/emu/
H A Dnfeth.c107 dev->stats.rx_errors++; recv_packet()
115 dev->stats.rx_dropped++; recv_packet()
128 dev->stats.rx_packets++; recv_packet()
129 dev->stats.rx_bytes += pktlen; recv_packet()
168 dev->stats.tx_packets++; nfeth_xmit()
169 dev->stats.tx_bytes += len; nfeth_xmit()
177 dev->stats.tx_errors++; nfeth_tx_timeout()
/linux-4.1.27/net/ipv6/
H A Dproc.c249 snmp6_seq_show_item64(seq, idev->stats.ipv6, snmp6_dev_seq_show()
251 snmp6_seq_show_item(seq, NULL, idev->stats.icmpv6dev->mibs, snmp6_dev_seq_show()
253 snmp6_seq_show_icmpv6msg(seq, idev->stats.icmpv6msgdev->mibs); snmp6_dev_seq_show()
288 idev->stats.proc_dir_entry = p; snmp6_register_dev()
297 if (!idev->stats.proc_dir_entry) snmp6_unregister_dev()
299 proc_remove(idev->stats.proc_dir_entry); snmp6_unregister_dev()
300 idev->stats.proc_dir_entry = NULL; snmp6_unregister_dev()
/linux-4.1.27/net/8021q/
H A Dvlanproc.c281 const struct rtnl_link_stats64 *stats; vlandev_seq_show() local
288 stats = dev_get_stats(vlandev, &temp); vlandev_seq_show()
294 seq_printf(seq, fmt64, "total frames received", stats->rx_packets); vlandev_seq_show()
295 seq_printf(seq, fmt64, "total bytes received", stats->rx_bytes); vlandev_seq_show()
296 seq_printf(seq, fmt64, "Broadcast/Multicast Rcvd", stats->multicast); vlandev_seq_show()
298 seq_printf(seq, fmt64, "total frames transmitted", stats->tx_packets); vlandev_seq_show()
299 seq_printf(seq, fmt64, "total bytes transmitted", stats->tx_bytes); vlandev_seq_show()
/linux-4.1.27/net/phonet/
H A Dpep-gprs.c134 dev->stats.rx_packets++; gprs_recv()
135 dev->stats.rx_bytes += skb->len; gprs_recv()
144 dev->stats.rx_dropped++; gprs_recv()
207 dev->stats.tx_aborted_errors++; gprs_xmit()
208 dev->stats.tx_errors++; gprs_xmit()
210 dev->stats.tx_packets++; gprs_xmit()
211 dev->stats.tx_bytes += len; gprs_xmit()

Completed in 7857 milliseconds

12345678