FreeBSD/sys/dev/vnic/nicvf_queues.c
/* Check for errors in the send cmp.queue entry */
Check for errors in the send cmp.queue entry
Check for errors in the send cmp . queue entry
int
nicvf_check_cqe_tx_errs(struct nicvf *nic, struct cmp_queue *cq,
    struct cqe_send_t *cqe_tx)
{
	struct cmp_queue_stats *stats = &cq->stats;
	switch (cqe_tx->send_status) {
	case CQ_TX_ERROP_GOOD:
		stats->tx.good++;
		return (0);
	case CQ_TX_ERROP_DESC_FAULT:
		stats->tx.desc_fault++;
		break;
	case CQ_TX_ERROP_HDR_CONS_ERR:
		stats->tx.hdr_cons_err++;
		break;
	case CQ_TX_ERROP_SUBDC_ERR:
		stats->tx.subdesc_err++;
		break;
	case CQ_TX_ERROP_IMM_SIZE_OFLOW:
		stats->tx.imm_size_oflow++;
		break;
	case CQ_TX_ERROP_DATA_SEQUENCE_ERR:
		stats->tx.data_seq_err++;
		break;
	case CQ_TX_ERROP_MEM_SEQUENCE_ERR:
		stats->tx.mem_seq_err++;
		break;
	case CQ_TX_ERROP_LOCK_VIOL:
		stats->tx.lock_viol++;
		break;
	case CQ_TX_ERROP_DATA_FAULT:
		stats->tx.data_fault++;
		break;
	case CQ_TX_ERROP_TSTMP_CONFLICT:
		stats->tx.tstmp_conflict++;
		break;
	case CQ_TX_ERROP_TSTMP_TIMEOUT:
		stats->tx.tstmp_timeout++;
		break;
	case CQ_TX_ERROP_MEM_FAULT:
		stats->tx.mem_fault++;
		break;
	case CQ_TX_ERROP_CK_OVERLAP:
		stats->tx.csum_overlap++;
		break;
	case CQ_TX_ERROP_CK_OFLOW:
		stats->tx.csum_overflow++;
		break;
	}
	return (1);
}
int nicvf_check_cqe_tx_errs ( struct nicvf * nic , struct cmp_queue * cq , struct cqe_send_t * cqe_tx ) { struct cmp_queue_stats * stats = & cq -> stats ; switch ( cqe_tx -> send_status ) { case CQ_TX_ERROP_GOOD : stats -> tx . good ++ ; return ( 0 ) ; case CQ_TX_ERROP_DESC_FAULT : stats -> tx . desc_fault ++ ; break ; case CQ_TX_ERROP_HDR_CONS_ERR : stats -> tx . hdr_cons_err ++ ; break ; case CQ_TX_ERROP_SUBDC_ERR : stats -> tx . subdesc_err ++ ; break ; case CQ_TX_ERROP_IMM_SIZE_OFLOW : stats -> tx . imm_size_oflow ++ ; break ; case CQ_TX_ERROP_DATA_SEQUENCE_ERR : stats -> tx . data_seq_err ++ ; break ; case CQ_TX_ERROP_MEM_SEQUENCE_ERR : stats -> tx . mem_seq_err ++ ; break ; case CQ_TX_ERROP_LOCK_VIOL : stats -> tx . lock_viol ++ ; break ; case CQ_TX_ERROP_DATA_FAULT : stats -> tx . data_fault ++ ; break ; case CQ_TX_ERROP_TSTMP_CONFLICT : stats -> tx . tstmp_conflict ++ ; break ; case CQ_TX_ERROP_TSTMP_TIMEOUT : stats -> tx . tstmp_timeout ++ ; break ; case CQ_TX_ERROP_MEM_FAULT : stats -> tx . mem_fault ++ ; break ; case CQ_TX_ERROP_CK_OVERLAP : stats -> tx . csum_overlap ++ ; break ; case CQ_TX_ERROP_CK_OFLOW : stats -> tx . csum_overflow ++ ; break ; } return ( 1 ) ; }
Check for errors in the send cmp.queue entry
Check for errors in the send cmp . queue entry