Lines Matching defs:fc_stats

390 	struct fc_host_statistics *fc_stats;
392 if (!adapter->fc_stats) {
393 fc_stats = kmalloc(sizeof(*fc_stats), GFP_KERNEL);
394 if (!fc_stats)
396 adapter->fc_stats = fc_stats; /* freed in adapter_release */
398 memset(adapter->fc_stats, 0, sizeof(*adapter->fc_stats));
399 return adapter->fc_stats;
402 static void zfcp_adjust_fc_host_stats(struct fc_host_statistics *fc_stats,
406 fc_stats->seconds_since_last_reset =
408 fc_stats->tx_frames = data->tx_frames - old->tx_frames;
409 fc_stats->tx_words = data->tx_words - old->tx_words;
410 fc_stats->rx_frames = data->rx_frames - old->rx_frames;
411 fc_stats->rx_words = data->rx_words - old->rx_words;
412 fc_stats->lip_count = data->lip - old->lip;
413 fc_stats->nos_count = data->nos - old->nos;
414 fc_stats->error_frames = data->error_frames - old->error_frames;
415 fc_stats->dumped_frames = data->dumped_frames - old->dumped_frames;
416 fc_stats->link_failure_count = data->link_failure - old->link_failure;
417 fc_stats->loss_of_sync_count = data->loss_of_sync - old->loss_of_sync;
418 fc_stats->loss_of_signal_count =
420 fc_stats->prim_seq_protocol_err_count =
422 fc_stats->invalid_tx_word_count =
424 fc_stats->invalid_crc_count = data->invalid_crcs - old->invalid_crcs;
425 fc_stats->fcp_input_requests =
427 fc_stats->fcp_output_requests =
429 fc_stats->fcp_control_requests =
431 fc_stats->fcp_input_megabytes = data->input_mb - old->input_mb;
432 fc_stats->fcp_output_megabytes = data->output_mb - old->output_mb;
435 static void zfcp_set_fc_host_stats(struct fc_host_statistics *fc_stats,
438 fc_stats->seconds_since_last_reset = data->seconds_since_last_reset;
439 fc_stats->tx_frames = data->tx_frames;
440 fc_stats->tx_words = data->tx_words;
441 fc_stats->rx_frames = data->rx_frames;
442 fc_stats->rx_words = data->rx_words;
443 fc_stats->lip_count = data->lip;
444 fc_stats->nos_count = data->nos;
445 fc_stats->error_frames = data->error_frames;
446 fc_stats->dumped_frames = data->dumped_frames;
447 fc_stats->link_failure_count = data->link_failure;
448 fc_stats->loss_of_sync_count = data->loss_of_sync;
449 fc_stats->loss_of_signal_count = data->loss_of_signal;
450 fc_stats->prim_seq_protocol_err_count = data->psp_error_counts;
451 fc_stats->invalid_tx_word_count = data->invalid_tx_words;
452 fc_stats->invalid_crc_count = data->invalid_crcs;
453 fc_stats->fcp_input_requests = data->input_requests;
454 fc_stats->fcp_output_requests = data->output_requests;
455 fc_stats->fcp_control_requests = data->control_requests;
456 fc_stats->fcp_input_megabytes = data->input_mb;
457 fc_stats->fcp_output_megabytes = data->output_mb;
463 struct fc_host_statistics *fc_stats;
468 fc_stats = zfcp_init_fc_host_stats(adapter);
469 if (!fc_stats)
485 zfcp_adjust_fc_host_stats(fc_stats, data,
488 zfcp_set_fc_host_stats(fc_stats, data);
491 return fc_stats;