Interrupt handler triggered by dev for handling specific interrupt. */
| 420 | |
| 421 | /* Interrupt handler triggered by dev for handling specific interrupt. */ |
| 422 | static void |
| 423 | vrb_dev_interrupt_handler(void *cb_arg) |
| 424 | { |
| 425 | struct rte_bbdev *dev = cb_arg; |
| 426 | struct acc_device *acc_dev = dev->data->dev_private; |
| 427 | volatile union acc_info_ring_data *ring_data; |
| 428 | struct acc_deq_intr_details deq_intr_det; |
| 429 | uint16_t vf_id, aq_id, qg_id, int_nb; |
| 430 | |
| 431 | ring_data = acc_dev->info_ring + (acc_dev->info_ring_head & ACC_INFO_RING_MASK); |
| 432 | |
| 433 | while (ring_data->valid) { |
| 434 | vf_id = vf_from_ring(*ring_data, acc_dev->device_variant); |
| 435 | aq_id = aq_from_ring(*ring_data, acc_dev->device_variant); |
| 436 | qg_id = qg_from_ring(*ring_data, acc_dev->device_variant); |
| 437 | int_nb = int_from_ring(*ring_data, acc_dev->device_variant); |
| 438 | if (acc_dev->pf_device) { |
| 439 | rte_bbdev_log_debug( |
| 440 | "PF Interrupt received, Info Ring data: 0x%x -> %d", |
| 441 | ring_data->val, int_nb); |
| 442 | |
| 443 | switch (int_nb) { |
| 444 | case ACC_PF_INT_DMA_DL_DESC_IRQ: |
| 445 | case ACC_PF_INT_DMA_UL_DESC_IRQ: |
| 446 | case ACC_PF_INT_DMA_FFT_DESC_IRQ: |
| 447 | case ACC_PF_INT_DMA_UL5G_DESC_IRQ: |
| 448 | case ACC_PF_INT_DMA_DL5G_DESC_IRQ: |
| 449 | case ACC_PF_INT_DMA_MLD_DESC_IRQ: |
| 450 | deq_intr_det.queue_id = get_queue_id_from_ring_info( |
| 451 | dev->data, *ring_data); |
| 452 | if (deq_intr_det.queue_id == UINT16_MAX) { |
| 453 | rte_bbdev_log(ERR, |
| 454 | "Couldn't find queue: aq_id: %u, qg_id: %u, vf_id: %u", |
| 455 | aq_id, qg_id, vf_id); |
| 456 | return; |
| 457 | } |
| 458 | rte_bbdev_pmd_callback_process(dev, |
| 459 | RTE_BBDEV_EVENT_DEQUEUE, &deq_intr_det); |
| 460 | break; |
| 461 | default: |
| 462 | rte_bbdev_pmd_callback_process(dev, RTE_BBDEV_EVENT_ERROR, NULL); |
| 463 | break; |
| 464 | } |
| 465 | } else { |
| 466 | rte_bbdev_log_debug( |
| 467 | "VRB VF Interrupt received, Info Ring data: 0x%x", |
| 468 | ring_data->val); |
| 469 | switch (int_nb) { |
| 470 | case ACC_VF_INT_DMA_DL_DESC_IRQ: |
| 471 | case ACC_VF_INT_DMA_UL_DESC_IRQ: |
| 472 | case ACC_VF_INT_DMA_FFT_DESC_IRQ: |
| 473 | case ACC_VF_INT_DMA_UL5G_DESC_IRQ: |
| 474 | case ACC_VF_INT_DMA_DL5G_DESC_IRQ: |
| 475 | case ACC_VF_INT_DMA_MLD_DESC_IRQ: |
| 476 | /* VFs are not aware of their vf_id - it's set to 0. */ |
| 477 | set_vf_in_ring(ring_data, acc_dev->device_variant, 0); |
| 478 | deq_intr_det.queue_id = get_queue_id_from_ring_info( |
| 479 | dev->data, *ring_data); |
nothing calls this directly
no test coverage detected