Checks PF Info Ring to find the interrupt cause and handles it accordingly */
| 277 | |
| 278 | /* Checks PF Info Ring to find the interrupt cause and handles it accordingly */ |
| 279 | static inline void |
| 280 | acc100_pf_interrupt_handler(struct rte_bbdev *dev) |
| 281 | { |
| 282 | struct acc_device *acc100_dev = dev->data->dev_private; |
| 283 | volatile union acc_info_ring_data *ring_data; |
| 284 | struct acc_deq_intr_details deq_intr_det; |
| 285 | |
| 286 | ring_data = acc100_dev->info_ring + (acc100_dev->info_ring_head & |
| 287 | ACC_INFO_RING_MASK); |
| 288 | |
| 289 | while (ring_data->valid) { |
| 290 | |
| 291 | rte_bbdev_log_debug( |
| 292 | "ACC100 PF Interrupt received, Info Ring data: 0x%x", |
| 293 | ring_data->val); |
| 294 | |
| 295 | switch (ring_data->int_nb) { |
| 296 | case ACC100_PF_INT_DMA_DL_DESC_IRQ: |
| 297 | case ACC100_PF_INT_DMA_UL_DESC_IRQ: |
| 298 | case ACC100_PF_INT_DMA_UL5G_DESC_IRQ: |
| 299 | case ACC100_PF_INT_DMA_DL5G_DESC_IRQ: |
| 300 | deq_intr_det.queue_id = get_queue_id_from_ring_info( |
| 301 | dev->data, *ring_data); |
| 302 | if (deq_intr_det.queue_id == UINT16_MAX) { |
| 303 | rte_bbdev_log(ERR, |
| 304 | "Couldn't find queue: aq_id: %u, qg_id: %u, vf_id: %u", |
| 305 | ring_data->aq_id, |
| 306 | ring_data->qg_id, |
| 307 | ring_data->vf_id); |
| 308 | return; |
| 309 | } |
| 310 | rte_bbdev_pmd_callback_process(dev, |
| 311 | RTE_BBDEV_EVENT_DEQUEUE, &deq_intr_det); |
| 312 | break; |
| 313 | default: |
| 314 | rte_bbdev_pmd_callback_process(dev, |
| 315 | RTE_BBDEV_EVENT_ERROR, NULL); |
| 316 | break; |
| 317 | } |
| 318 | |
| 319 | /* Initialize Info Ring entry and move forward */ |
| 320 | ring_data->val = 0; |
| 321 | ++acc100_dev->info_ring_head; |
| 322 | ring_data = acc100_dev->info_ring + |
| 323 | (acc100_dev->info_ring_head & |
| 324 | ACC_INFO_RING_MASK); |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | /* Checks VF Info Ring to find the interrupt cause and handles it accordingly */ |
| 329 | static inline void |
no test coverage detected