src/dpdk/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
static void
fpga_dev_interrupt_handler(void *cb_arg)
{
	struct rte_bbdev *dev = cb_arg;
	struct fpga_5gnr_fec_device *fpga_dev = dev->data->dev_private;
	struct fpga_queue *q;
	uint64_t ring_head;
	uint64_t q_idx;
	uint16_t queue_id;
	uint8_t i;

	/* Scan queue assigned to this device */
	for (i = 0; i < FPGA_TOTAL_NUM_QUEUES; ++i) {
		q_idx = 1ULL << i;
		if (fpga_dev->q_bound_bit_map & q_idx) {
			queue_id = get_queue_id(dev->data, i);
			if (queue_id == (uint16_t) -1)
				continue;

			/* Check if completion head was changed */
			q = dev->data->queues[queue_id].queue_private;
			ring_head = *q->ring_head_addr;
			if (q->shadow_completion_head != ring_head &&
				q->irq_enable == 1) {
				q->shadow_completion_head = ring_head;
				rte_bbdev_pmd_callback_process(
						dev,
						RTE_BBDEV_EVENT_DEQUEUE,
						&queue_id);
			}
		}
	}
}
/* Interrupt handler triggered by FPGA dev for handling specific interrupt */
Interrupt handler triggered by FPGA dev for handling specific interrupt
Interrupt handler triggered by FPGA dev for handling specific interrupt
static void
fpga_dev_interrupt_handler(void *cb_arg)
{
	struct rte_bbdev *dev = cb_arg;
	struct fpga_5gnr_fec_device *fpga_dev = dev->data->dev_private;
	struct fpga_queue *q;
	uint64_t ring_head;
	uint64_t q_idx;
	uint16_t queue_id;
	uint8_t i;
	for (i = 0; i < FPGA_TOTAL_NUM_QUEUES; ++i) {
		q_idx = 1ULL << i;
		if (fpga_dev->q_bound_bit_map & q_idx) {
			queue_id = get_queue_id(dev->data, i);
			if (queue_id == (uint16_t) -1)
				continue;
			q = dev->data->queues[queue_id].queue_private;
			ring_head = *q->ring_head_addr;
			if (q->shadow_completion_head != ring_head &&
				q->irq_enable == 1) {
				q->shadow_completion_head = ring_head;
				rte_bbdev_pmd_callback_process(
						dev,
						RTE_BBDEV_EVENT_DEQUEUE,
						&queue_id);
			}
		}
	}
}
static void fpga_dev_interrupt_handler ( void * cb_arg ) { struct rte_bbdev * dev = cb_arg ; struct fpga_5gnr_fec_device * fpga_dev = dev -> data -> dev_private ; struct fpga_queue * q ; uint64_t ring_head ; uint64_t q_idx ; uint16_t queue_id ; uint8_t i ; for ( i = 0 ; i < FPGA_TOTAL_NUM_QUEUES ; ++ i ) { q_idx = 1ULL << i ; if ( fpga_dev -> q_bound_bit_map & q_idx ) { queue_id = get_queue_id ( dev -> data , i ) ; if ( queue_id == ( uint16_t ) -1 ) continue ; q = dev -> data -> queues [ queue_id ] . queue_private ; ring_head = * q -> ring_head_addr ; if ( q -> shadow_completion_head != ring_head && q -> irq_enable == 1 ) { q -> shadow_completion_head = ring_head ; rte_bbdev_pmd_callback_process ( dev , RTE_BBDEV_EVENT_DEQUEUE , & queue_id ) ; } } } }
Interrupt handler triggered by FPGA dev for handling specific interrupt
Interrupt handler triggered by FPGA dev for handling specific interrupt
/* Scan queue assigned to this device */ /* Check if completion head was changed */