| 622 | } |
| 623 | |
| 624 | static void |
| 625 | dump_err_pkts(struct dpaa2_queue *dpaa2_q) |
| 626 | { |
| 627 | /* Function receive frames for a given device and VQ */ |
| 628 | struct qbman_result *dq_storage; |
| 629 | uint32_t fqid = dpaa2_q->fqid; |
| 630 | int ret, num_rx = 0; |
| 631 | uint8_t pending, status; |
| 632 | struct qbman_swp *swp; |
| 633 | const struct qbman_fd *fd; |
| 634 | struct qbman_pull_desc pulldesc; |
| 635 | struct rte_eth_dev_data *eth_data = dpaa2_q->eth_data; |
| 636 | uint32_t lcore_id = rte_lcore_id(); |
| 637 | void *v_addr, *hw_annot_addr; |
| 638 | struct dpaa2_fas *fas; |
| 639 | |
| 640 | if (unlikely(!DPAA2_PER_LCORE_DPIO)) { |
| 641 | ret = dpaa2_affine_qbman_swp(); |
| 642 | if (ret) { |
| 643 | DPAA2_PMD_ERR("Failed to allocate IO portal, tid: %d", |
| 644 | rte_gettid()); |
| 645 | return; |
| 646 | } |
| 647 | } |
| 648 | swp = DPAA2_PER_LCORE_PORTAL; |
| 649 | |
| 650 | dq_storage = dpaa2_q->q_storage[lcore_id].dq_storage[0]; |
| 651 | qbman_pull_desc_clear(&pulldesc); |
| 652 | qbman_pull_desc_set_fq(&pulldesc, fqid); |
| 653 | qbman_pull_desc_set_storage(&pulldesc, dq_storage, |
| 654 | (size_t)(DPAA2_VADDR_TO_IOVA(dq_storage)), 1); |
| 655 | qbman_pull_desc_set_numframes(&pulldesc, dpaa2_dqrr_size); |
| 656 | |
| 657 | while (1) { |
| 658 | if (qbman_swp_pull(swp, &pulldesc)) { |
| 659 | DPAA2_PMD_DP_DEBUG("VDQ command is not issued.QBMAN is busy\n"); |
| 660 | /* Portal was busy, try again */ |
| 661 | continue; |
| 662 | } |
| 663 | break; |
| 664 | } |
| 665 | |
| 666 | /* Check if the previous issued command is completed. */ |
| 667 | while (!qbman_check_command_complete(dq_storage)) |
| 668 | ; |
| 669 | |
| 670 | pending = 1; |
| 671 | do { |
| 672 | /* Loop until the dq_storage is updated with |
| 673 | * new token by QBMAN |
| 674 | */ |
| 675 | while (!qbman_check_new_result(dq_storage)) |
| 676 | ; |
| 677 | |
| 678 | /* Check whether Last Pull command is Expired and |
| 679 | * setting Condition for Loop termination |
| 680 | */ |
| 681 | if (qbman_result_DQ_is_pull_complete(dq_storage)) { |
no test coverage detected