Lines Matching +full:treset +full:- +full:ns

1 // SPDX-License-Identifier: GPL-2.0-only
34 * fnic_trace_get_buf - Give buffer pointer to user to fill up trace information
81 * fnic_get_trace_data - Copy trace buffer to a memory file
117 sprint_symbol(str, tbp->fnaddr.low); in fnic_get_trace_data()
118 jiffies_to_timespec64(tbp->timestamp.low, &val); in fnic_get_trace_data()
120 sprint_symbol(str, tbp->fnaddr.val); in fnic_get_trace_data()
121 jiffies_to_timespec64(tbp->timestamp.val, &val); in fnic_get_trace_data()
127 len += scnprintf(fnic_dbgfs_prt->buffer + len, in fnic_get_trace_data()
128 (trace_max_pages * PAGE_SIZE * 3) - len, in fnic_get_trace_data()
129 "%16llu.%09lu %-50s %8x %8x %16llx %16llx " in fnic_get_trace_data()
131 val.tv_nsec, str, tbp->host_no, tbp->tag, in fnic_get_trace_data()
132 tbp->data[0], tbp->data[1], tbp->data[2], in fnic_get_trace_data()
133 tbp->data[3], tbp->data[4]); in fnic_get_trace_data()
139 if (rd_idx > (fnic_max_trace_entries-1)) in fnic_get_trace_data()
159 sprint_symbol(str, tbp->fnaddr.low); in fnic_get_trace_data()
160 jiffies_to_timespec64(tbp->timestamp.low, &val); in fnic_get_trace_data()
162 sprint_symbol(str, tbp->fnaddr.val); in fnic_get_trace_data()
163 jiffies_to_timespec64(tbp->timestamp.val, &val); in fnic_get_trace_data()
169 len += scnprintf(fnic_dbgfs_prt->buffer + len, in fnic_get_trace_data()
170 (trace_max_pages * PAGE_SIZE * 3) - len, in fnic_get_trace_data()
171 "%16llu.%09lu %-50s %8x %8x %16llx %16llx " in fnic_get_trace_data()
173 val.tv_nsec, str, tbp->host_no, tbp->tag, in fnic_get_trace_data()
174 tbp->data[0], tbp->data[1], tbp->data[2], in fnic_get_trace_data()
175 tbp->data[3], tbp->data[4]); in fnic_get_trace_data()
190 * fnic_get_stats_data - Copy fnic stats buffer to a memory file
205 int buf_size = debug->buf_size; in fnic_get_stats_data()
210 len = scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
211 "------------------------------------------\n" in fnic_get_stats_data()
213 "------------------------------------------\n"); in fnic_get_stats_data()
215 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
222 (s64)stats->stats_timestamps.last_reset_time.tv_sec, in fnic_get_stats_data()
223 stats->stats_timestamps.last_reset_time.tv_nsec, in fnic_get_stats_data()
224 (s64)stats->stats_timestamps.last_read_time.tv_sec, in fnic_get_stats_data()
225 stats->stats_timestamps.last_read_time.tv_nsec, in fnic_get_stats_data()
226 (s64)timespec64_sub(val1, stats->stats_timestamps.last_reset_time).tv_sec, in fnic_get_stats_data()
227 timespec64_sub(val1, stats->stats_timestamps.last_reset_time).tv_nsec, in fnic_get_stats_data()
228 (s64)timespec64_sub(val1, stats->stats_timestamps.last_read_time).tv_sec, in fnic_get_stats_data()
229 timespec64_sub(val1, stats->stats_timestamps.last_read_time).tv_nsec); in fnic_get_stats_data()
231 stats->stats_timestamps.last_read_time = val1; in fnic_get_stats_data()
233 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
234 "------------------------------------------\n" in fnic_get_stats_data()
236 "------------------------------------------\n"); in fnic_get_stats_data()
237 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
247 " 10 ms - 100 ms : %lld\n" in fnic_get_stats_data()
248 " 100 ms - 500 ms : %lld\n" in fnic_get_stats_data()
249 " 500 ms - 5 sec: %lld\n" in fnic_get_stats_data()
250 " 5 sec - 10 sec: %lld\n" in fnic_get_stats_data()
251 " 10 sec - 30 sec: %lld\n" in fnic_get_stats_data()
253 (u64)atomic64_read(&stats->io_stats.active_ios), in fnic_get_stats_data()
254 (u64)atomic64_read(&stats->io_stats.max_active_ios), in fnic_get_stats_data()
255 (u64)atomic64_read(&stats->io_stats.num_ios), in fnic_get_stats_data()
256 (u64)atomic64_read(&stats->io_stats.io_completions), in fnic_get_stats_data()
257 (u64)atomic64_read(&stats->io_stats.io_failures), in fnic_get_stats_data()
258 (u64)atomic64_read(&stats->io_stats.io_not_found), in fnic_get_stats_data()
259 (u64)atomic64_read(&stats->io_stats.alloc_failures), in fnic_get_stats_data()
260 (u64)atomic64_read(&stats->io_stats.ioreq_null), in fnic_get_stats_data()
261 (u64)atomic64_read(&stats->io_stats.sc_null), in fnic_get_stats_data()
262 (u64)atomic64_read(&stats->io_stats.io_btw_0_to_10_msec), in fnic_get_stats_data()
263 (u64)atomic64_read(&stats->io_stats.io_btw_10_to_100_msec), in fnic_get_stats_data()
264 (u64)atomic64_read(&stats->io_stats.io_btw_100_to_500_msec), in fnic_get_stats_data()
265 (u64)atomic64_read(&stats->io_stats.io_btw_500_to_5000_msec), in fnic_get_stats_data()
266 (u64)atomic64_read(&stats->io_stats.io_btw_5000_to_10000_msec), in fnic_get_stats_data()
267 (u64)atomic64_read(&stats->io_stats.io_btw_10000_to_30000_msec), in fnic_get_stats_data()
268 (u64)atomic64_read(&stats->io_stats.io_greater_than_30000_msec)); in fnic_get_stats_data()
270 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
271 "------------------------------------------\n" in fnic_get_stats_data()
273 "------------------------------------------\n"); in fnic_get_stats_data()
276 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
277 "Q:%d -> %lld\n", i, (u64)atomic64_read(&stats->io_stats.ios[i])); in fnic_get_stats_data()
280 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
282 (u64)atomic64_read(&stats->io_stats.current_max_io_time)); in fnic_get_stats_data()
284 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
285 "\n------------------------------------------\n" in fnic_get_stats_data()
287 "------------------------------------------\n"); in fnic_get_stats_data()
289 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
298 " 6 sec - 20 sec : %lld\n" in fnic_get_stats_data()
299 " 20 sec - 30 sec : %lld\n" in fnic_get_stats_data()
300 " 30 sec - 40 sec : %lld\n" in fnic_get_stats_data()
301 " 40 sec - 50 sec : %lld\n" in fnic_get_stats_data()
302 " 50 sec - 60 sec : %lld\n" in fnic_get_stats_data()
305 (u64)atomic64_read(&stats->abts_stats.aborts), in fnic_get_stats_data()
306 (u64)atomic64_read(&stats->abts_stats.abort_failures), in fnic_get_stats_data()
307 (u64)atomic64_read(&stats->abts_stats.abort_drv_timeouts), in fnic_get_stats_data()
308 (u64)atomic64_read(&stats->abts_stats.abort_fw_timeouts), in fnic_get_stats_data()
309 (u64)atomic64_read(&stats->abts_stats.abort_io_not_found), in fnic_get_stats_data()
310 (u64)atomic64_read(&stats->abts_stats.abort_issued_btw_0_to_6_sec), in fnic_get_stats_data()
311 (u64)atomic64_read(&stats->abts_stats.abort_issued_btw_6_to_20_sec), in fnic_get_stats_data()
312 (u64)atomic64_read(&stats->abts_stats.abort_issued_btw_20_to_30_sec), in fnic_get_stats_data()
313 (u64)atomic64_read(&stats->abts_stats.abort_issued_btw_30_to_40_sec), in fnic_get_stats_data()
314 (u64)atomic64_read(&stats->abts_stats.abort_issued_btw_40_to_50_sec), in fnic_get_stats_data()
315 (u64)atomic64_read(&stats->abts_stats.abort_issued_btw_50_to_60_sec), in fnic_get_stats_data()
316 (u64)atomic64_read(&stats->abts_stats.abort_issued_greater_than_60_sec)); in fnic_get_stats_data()
318 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
319 "\n------------------------------------------\n" in fnic_get_stats_data()
321 "------------------------------------------\n"); in fnic_get_stats_data()
323 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
330 (u64)atomic64_read(&stats->term_stats.terminates), in fnic_get_stats_data()
331 (u64)atomic64_read(&stats->term_stats.max_terminates), in fnic_get_stats_data()
332 (u64)atomic64_read(&stats->term_stats.terminate_drv_timeouts), in fnic_get_stats_data()
333 (u64)atomic64_read(&stats->term_stats.terminate_fw_timeouts), in fnic_get_stats_data()
334 (u64)atomic64_read(&stats->term_stats.terminate_io_not_found), in fnic_get_stats_data()
335 (u64)atomic64_read(&stats->term_stats.terminate_failures)); in fnic_get_stats_data()
337 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
338 "\n------------------------------------------\n" in fnic_get_stats_data()
339 "\t\tReset Statistics\n" in fnic_get_stats_data()
340 "------------------------------------------\n"); in fnic_get_stats_data()
342 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
354 (u64)atomic64_read(&stats->reset_stats.device_resets), in fnic_get_stats_data()
355 (u64)atomic64_read(&stats->reset_stats.device_reset_failures), in fnic_get_stats_data()
356 (u64)atomic64_read(&stats->reset_stats.device_reset_aborts), in fnic_get_stats_data()
357 (u64)atomic64_read(&stats->reset_stats.device_reset_timeouts), in fnic_get_stats_data()
359 &stats->reset_stats.device_reset_terminates), in fnic_get_stats_data()
360 (u64)atomic64_read(&stats->reset_stats.fw_resets), in fnic_get_stats_data()
361 (u64)atomic64_read(&stats->reset_stats.fw_reset_completions), in fnic_get_stats_data()
362 (u64)atomic64_read(&stats->reset_stats.fw_reset_failures), in fnic_get_stats_data()
363 (u64)atomic64_read(&stats->reset_stats.fnic_resets), in fnic_get_stats_data()
365 &stats->reset_stats.fnic_reset_completions), in fnic_get_stats_data()
366 (u64)atomic64_read(&stats->reset_stats.fnic_reset_failures)); in fnic_get_stats_data()
368 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
369 "\n------------------------------------------\n" in fnic_get_stats_data()
371 "------------------------------------------\n"); in fnic_get_stats_data()
373 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
378 (u64)atomic64_read(&stats->fw_stats.active_fw_reqs), in fnic_get_stats_data()
379 (u64)atomic64_read(&stats->fw_stats.max_fw_reqs), in fnic_get_stats_data()
380 (u64)atomic64_read(&stats->fw_stats.fw_out_of_resources), in fnic_get_stats_data()
381 (u64)atomic64_read(&stats->fw_stats.io_fw_errs)); in fnic_get_stats_data()
383 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
384 "\n------------------------------------------\n" in fnic_get_stats_data()
386 "------------------------------------------\n"); in fnic_get_stats_data()
388 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
393 (u64)atomic64_read(&stats->vlan_stats.vlan_disc_reqs), in fnic_get_stats_data()
394 (u64)atomic64_read(&stats->vlan_stats.resp_withno_vlanID), in fnic_get_stats_data()
395 (u64)atomic64_read(&stats->vlan_stats.sol_expiry_count), in fnic_get_stats_data()
396 (u64)atomic64_read(&stats->vlan_stats.flogi_rejects)); in fnic_get_stats_data()
398 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
399 "\n------------------------------------------\n" in fnic_get_stats_data()
401 "------------------------------------------\n"); in fnic_get_stats_data()
403 jiffies_to_timespec64(stats->misc_stats.last_isr_time, &val1); in fnic_get_stats_data()
404 jiffies_to_timespec64(stats->misc_stats.last_ack_time, &val2); in fnic_get_stats_data()
406 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
427 (u64)stats->misc_stats.last_isr_time, in fnic_get_stats_data()
429 (u64)stats->misc_stats.last_ack_time, in fnic_get_stats_data()
431 (u64)atomic64_read(&stats->misc_stats.max_isr_jiffies), in fnic_get_stats_data()
432 (u64)atomic64_read(&stats->misc_stats.max_isr_time_ms), in fnic_get_stats_data()
433 (u64)atomic64_read(&stats->misc_stats.corr_work_done), in fnic_get_stats_data()
434 (u64)atomic64_read(&stats->misc_stats.isr_count), in fnic_get_stats_data()
435 (u64)atomic64_read(&stats->misc_stats.max_cq_entries), in fnic_get_stats_data()
436 (u64)atomic64_read(&stats->misc_stats.ack_index_out_of_range), in fnic_get_stats_data()
437 (u64)atomic64_read(&stats->misc_stats.data_count_mismatch), in fnic_get_stats_data()
438 (u64)atomic64_read(&stats->misc_stats.fcpio_timeout), in fnic_get_stats_data()
439 (u64)atomic64_read(&stats->misc_stats.fcpio_aborted), in fnic_get_stats_data()
440 (u64)atomic64_read(&stats->misc_stats.sgl_invalid), in fnic_get_stats_data()
442 &stats->misc_stats.abts_cpwq_alloc_failures), in fnic_get_stats_data()
444 &stats->misc_stats.devrst_cpwq_alloc_failures), in fnic_get_stats_data()
445 (u64)atomic64_read(&stats->misc_stats.io_cpwq_alloc_failures), in fnic_get_stats_data()
446 (u64)atomic64_read(&stats->misc_stats.no_icmnd_itmf_cmpls), in fnic_get_stats_data()
447 (u64)atomic64_read(&stats->misc_stats.check_condition), in fnic_get_stats_data()
448 (u64)atomic64_read(&stats->misc_stats.queue_fulls), in fnic_get_stats_data()
449 (u64)atomic64_read(&stats->misc_stats.rport_not_ready), in fnic_get_stats_data()
450 (u64)atomic64_read(&stats->misc_stats.frame_errors)); in fnic_get_stats_data()
452 len += scnprintf(debug->debug_buffer + len, buf_size - len, in fnic_get_stats_data()
455 &stats->misc_stats.current_port_speed)); in fnic_get_stats_data()
462 * fnic_trace_buf_init - Initialize fnic trace buffer logging facility
483 err = -ENOMEM; in fnic_trace_buf_init()
497 err = -ENOMEM; in fnic_trace_buf_init()
523 * fnic_trace_free - Free memory of fnic trace data structures.
541 * fnic_fc_ctlr_trace_buf_init -
567 err = -ENOMEM; in fnic_fc_trace_init()
585 err = -ENOMEM; in fnic_fc_trace_init()
611 * Fnic_fc_ctlr_trace_free - Free memory of fnic_fc_ctlr trace data structures.
643 * It will return 0 for success or -1 for failure
680 ktime_get_real_ts64(&fc_buf->time_stamp); in fnic_fc_trace_set_data()
681 fc_buf->host_no = host_no; in fnic_fc_trace_set_data()
682 fc_buf->frame_type = frame_type; in fnic_fc_trace_set_data()
696 (u8)(FC_TRC_SIZE_BYTES - FC_TRC_HEADER_SIZE in fnic_fc_trace_set_data()
697 - eth_fcoe_hdr_len))); in fnic_fc_trace_set_data()
701 (u8)(FC_TRC_SIZE_BYTES - FC_TRC_HEADER_SIZE))); in fnic_fc_trace_set_data()
705 fc_buf->frame_len = fc_trc_frame_len; in fnic_fc_trace_set_data()
742 len += scnprintf(fnic_dbgfs_prt->buffer + len, in fnic_fc_trace_get_data()
743 (fnic_fc_trace_max_pages * PAGE_SIZE * 3) - len, in fnic_fc_trace_get_data()
762 len += scnprintf(fnic_dbgfs_prt->buffer + len, in fnic_fc_trace_get_data()
764 - len, "%02x", fc_trace[j] & 0xff); in fnic_fc_trace_get_data()
766 len += scnprintf(fnic_dbgfs_prt->buffer + len, in fnic_fc_trace_get_data()
767 (fnic_fc_trace_max_pages * PAGE_SIZE * 3) - len, in fnic_fc_trace_get_data()
771 if (rd_idx > (fc_trace_max_entries - 1)) in fnic_fc_trace_get_data()
796 int ethhdr_len = sizeof(struct ethhdr) - 1; in copy_and_format_trace_data()
802 tdata->frame_type = tdata->frame_type & 0x7F; in copy_and_format_trace_data()
806 len += scnprintf(fnic_dbgfs_prt->buffer + len, max_size - len, in copy_and_format_trace_data()
807 "%ptTs.%09lu ns%8x %c%8x\t", in copy_and_format_trace_data()
808 &tdata->time_stamp.tv_sec, tdata->time_stamp.tv_nsec, in copy_and_format_trace_data()
809 tdata->host_no, tdata->frame_type, tdata->frame_len); in copy_and_format_trace_data()
813 for (j = 0; j < min_t(u8, tdata->frame_len, in copy_and_format_trace_data()
814 (u8)(FC_TRC_SIZE_BYTES - FC_TRC_HEADER_SIZE)); j++) { in copy_and_format_trace_data()
815 if (tdata->frame_type == FNIC_FC_LE) { in copy_and_format_trace_data()
816 len += scnprintf(fnic_dbgfs_prt->buffer + len, in copy_and_format_trace_data()
817 max_size - len, "%c", fc_trace[j]); in copy_and_format_trace_data()
819 len += scnprintf(fnic_dbgfs_prt->buffer + len, in copy_and_format_trace_data()
820 max_size - len, "%02x", fc_trace[j] & 0xff); in copy_and_format_trace_data()
821 len += scnprintf(fnic_dbgfs_prt->buffer + len, in copy_and_format_trace_data()
822 max_size - len, " "); in copy_and_format_trace_data()
827 len += scnprintf(fnic_dbgfs_prt->buffer in copy_and_format_trace_data()
828 + len, max_size - len, in copy_and_format_trace_data()
834 len += scnprintf(fnic_dbgfs_prt->buffer + len, in copy_and_format_trace_data()
835 max_size - len, "\n"); in copy_and_format_trace_data()