Lines Matching +full:avg +full:- +full:count

5  * SPDX-License-Identifier: Apache-2.0
53 PR("Bytes received : %u\n", data->bytes.received); in print_eth_stats()
54 PR("Bytes sent : %u\n", data->bytes.sent); in print_eth_stats()
55 PR("Packets received : %u\n", data->pkts.rx); in print_eth_stats()
56 PR("Packets sent : %u\n", data->pkts.tx); in print_eth_stats()
57 PR("Bcast received : %u\n", data->broadcast.rx); in print_eth_stats()
58 PR("Bcast sent : %u\n", data->broadcast.tx); in print_eth_stats()
59 PR("Mcast received : %u\n", data->multicast.rx); in print_eth_stats()
60 PR("Mcast sent : %u\n", data->multicast.tx); in print_eth_stats()
62 PR("Send errors : %u\n", data->errors.tx); in print_eth_stats()
63 PR("Receive errors : %u\n", data->errors.rx); in print_eth_stats()
64 PR("Collisions : %u\n", data->collisions); in print_eth_stats()
65 PR("Send Drops : %u\n", data->tx_dropped); in print_eth_stats()
66 PR("Send timeouts : %u\n", data->tx_timeout_count); in print_eth_stats()
67 PR("Send restarts : %u\n", data->tx_restart_queue); in print_eth_stats()
68 PR("Unknown protocol : %u\n", data->unknown_protocol); in print_eth_stats()
71 data->csum.rx_csum_offload_good, in print_eth_stats()
72 data->csum.rx_csum_offload_errors); in print_eth_stats()
74 data->flow_control.rx_flow_control_xon, in print_eth_stats()
75 data->flow_control.rx_flow_control_xoff, in print_eth_stats()
76 data->flow_control.tx_flow_control_xon, in print_eth_stats()
77 data->flow_control.tx_flow_control_xoff); in print_eth_stats()
79 data->error_details.uncorr_ecc_errors, in print_eth_stats()
80 data->error_details.corr_ecc_errors); in print_eth_stats()
82 data->hw_timestamp.rx_hwtstamp_cleared, in print_eth_stats()
83 data->hw_timestamp.tx_hwtstamp_timeouts, in print_eth_stats()
84 data->hw_timestamp.tx_hwtstamp_skipped); in print_eth_stats()
90 data->error_details.rx_length_errors, in print_eth_stats()
91 data->error_details.rx_over_errors, in print_eth_stats()
92 data->error_details.rx_crc_errors, in print_eth_stats()
93 data->error_details.rx_frame_errors, in print_eth_stats()
94 data->error_details.rx_no_buffer_count, in print_eth_stats()
95 data->error_details.rx_missed_errors, in print_eth_stats()
96 data->error_details.rx_long_length_errors, in print_eth_stats()
97 data->error_details.rx_short_length_errors, in print_eth_stats()
98 data->error_details.rx_align_errors, in print_eth_stats()
99 data->error_details.rx_dma_failed, in print_eth_stats()
100 data->error_details.rx_buf_alloc_failed); in print_eth_stats()
104 data->error_details.tx_aborted_errors, in print_eth_stats()
105 data->error_details.tx_carrier_errors, in print_eth_stats()
106 data->error_details.tx_fifo_errors, in print_eth_stats()
107 data->error_details.tx_heartbeat_errors, in print_eth_stats()
108 data->error_details.tx_window_errors, in print_eth_stats()
109 data->error_details.tx_dma_failed); in print_eth_stats()
112 if (data->vendor) { in print_eth_stats()
119 PR("%s : %u\n", data->vendor[i].key, in print_eth_stats()
120 data->vendor[i].value); in print_eth_stats()
122 } while (data->vendor[i].key); in print_eth_stats()
133 PR("Frames recv %u\n", data->pkts.rx); in print_ppp_stats()
134 PR("Frames sent %u\n", data->pkts.tx); in print_ppp_stats()
135 PR("Frames dropped %u\n", data->drop); in print_ppp_stats()
136 PR("Bad FCS %u\n", data->chkerr); in print_ppp_stats()
151 sizeof("->xxxx") * in get_net_pkt_tc_stats_detail()
158 net_stats_t count = 0; in get_net_pkt_tc_stats_detail() local
159 uint32_t avg; in get_net_pkt_tc_stats_detail() local
163 count = GET_STAT(iface, in get_net_pkt_tc_stats_detail()
164 tc.sent[i].tx_time_detail[j].count); in get_net_pkt_tc_stats_detail()
168 count = GET_STAT(iface, in get_net_pkt_tc_stats_detail()
169 tc.recv[i].rx_time_detail[j].count); in get_net_pkt_tc_stats_detail()
173 if (count == 0) { in get_net_pkt_tc_stats_detail()
179 avg = (uint32_t)(GET_STAT(iface, in get_net_pkt_tc_stats_detail()
181 (uint64_t)count); in get_net_pkt_tc_stats_detail()
185 avg = (uint32_t)(GET_STAT(iface, in get_net_pkt_tc_stats_detail()
187 (uint64_t)count); in get_net_pkt_tc_stats_detail()
191 if (avg == 0) { in get_net_pkt_tc_stats_detail()
195 total += avg; in get_net_pkt_tc_stats_detail()
197 pos += snprintk(extra_stats + pos, sizeof(extra_stats) - pos, in get_net_pkt_tc_stats_detail()
198 "->%u", avg); in get_net_pkt_tc_stats_detail()
205 pos += snprintk(extra_stats + pos, sizeof(extra_stats) - pos, in get_net_pkt_tc_stats_detail()
215 static char extra_stats[sizeof("\t[0=xxxx us]") + sizeof("->xxxx") * in get_net_pkt_stats_detail()
222 net_stats_t count; in get_net_pkt_stats_detail() local
223 uint32_t avg; in get_net_pkt_stats_detail() local
227 count = GET_STAT(iface, tx_time_detail[j].count); in get_net_pkt_stats_detail()
231 count = GET_STAT(iface, rx_time_detail[j].count); in get_net_pkt_stats_detail()
235 if (count == 0) { in get_net_pkt_stats_detail()
241 avg = (uint32_t)(GET_STAT(iface, in get_net_pkt_stats_detail()
243 (uint64_t)count); in get_net_pkt_stats_detail()
247 avg = (uint32_t)(GET_STAT(iface, in get_net_pkt_stats_detail()
249 (uint64_t)count); in get_net_pkt_stats_detail()
253 if (avg == 0) { in get_net_pkt_stats_detail()
257 total += avg; in get_net_pkt_stats_detail()
260 sizeof(extra_stats) - pos, in get_net_pkt_stats_detail()
261 "->%u", avg); in get_net_pkt_stats_detail()
268 pos += snprintk(extra_stats + pos, sizeof(extra_stats) - pos, in get_net_pkt_stats_detail()
315 net_stats_t count = GET_STAT(iface, in print_tc_tx_stats() local
316 tc.sent[i].tx_time.count); in print_tc_tx_stats()
317 if (count == 0) { in print_tc_tx_stats()
318 PR("[%d] %s (%d)\t%d\t\t%d\t-\n", i, in print_tc_tx_stats()
331 (uint64_t)count), in print_tc_tx_stats()
350 net_stats_t count = GET_STAT(iface, tx_time.count); in print_tc_tx_stats()
352 if (count != 0) { in print_tc_tx_stats()
353 PR("Avg %s net_pkt (%u) time %" PRIu32 " us%s\n", "TX", count, in print_tc_tx_stats()
354 (uint32_t)(GET_STAT(iface, tx_time.sum) / (uint64_t)count), in print_tc_tx_stats()
374 net_stats_t count = GET_STAT(iface, in print_tc_rx_stats() local
375 tc.recv[i].rx_time.count); in print_tc_rx_stats()
376 if (count == 0) { in print_tc_rx_stats()
377 PR("[%d] %s (%d)\t%d\t\t%d\t-\n", i, in print_tc_rx_stats()
390 (uint64_t)count), in print_tc_rx_stats()
409 net_stats_t count = GET_STAT(iface, rx_time.count); in print_tc_rx_stats()
411 if (count != 0) { in print_tc_rx_stats()
412 PR("Avg %s net_pkt (%u) time %" PRIu32 " us%s\n", "RX", count, in print_tc_rx_stats()
413 (uint32_t)(GET_STAT(iface, rx_time.sum) / (uint64_t)count), in print_tc_rx_stats()
445 const struct shell *sh = data->sh; in net_shell_print_statistics()
643 return -ENOEXEC; in cmd_net_stats_iface()
649 return -ENOEXEC; in cmd_net_stats_iface()
655 return -ENOEXEC; in cmd_net_stats_iface()