MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dpaa2_dev_tx_conf

Function dpaa2_dev_tx_conf

dpdk/drivers/net/dpaa2/dpaa2_rxtx.c:1084–1207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1082}
1083
1084uint16_t dpaa2_dev_tx_conf(void *queue)
1085{
1086 /* Function receive frames for a given device and VQ */
1087 struct dpaa2_queue *dpaa2_q = (struct dpaa2_queue *)queue;
1088 struct qbman_result *dq_storage;
1089 uint32_t fqid = dpaa2_q->fqid;
1090 int ret, num_tx_conf = 0, num_pulled;
1091 uint8_t pending, status;
1092 struct qbman_swp *swp;
1093 const struct qbman_fd *fd, *next_fd;
1094 struct qbman_pull_desc pulldesc;
1095 struct qbman_release_desc releasedesc;
1096 uint32_t bpid;
1097 uint64_t buf;
1098#if defined(RTE_LIBRTE_IEEE1588)
1099 struct rte_eth_dev_data *eth_data = dpaa2_q->eth_data;
1100 struct dpaa2_dev_priv *priv = eth_data->dev_private;
1101 struct dpaa2_annot_hdr *annotation;
1102 void *v_addr;
1103 struct rte_mbuf *mbuf;
1104#endif
1105
1106 if (unlikely(!DPAA2_PER_LCORE_DPIO)) {
1107 ret = dpaa2_affine_qbman_swp();
1108 if (ret) {
1109 DPAA2_PMD_ERR(
1110 "Failed to allocate IO portal, tid: %d",
1111 rte_gettid());
1112 return 0;
1113 }
1114 }
1115 swp = DPAA2_PER_LCORE_PORTAL;
1116
1117 do {
1118 dq_storage = dpaa2_q->q_storage->dq_storage[0];
1119 qbman_pull_desc_clear(&pulldesc);
1120 qbman_pull_desc_set_fq(&pulldesc, fqid);
1121 qbman_pull_desc_set_storage(&pulldesc, dq_storage,
1122 (size_t)(DPAA2_VADDR_TO_IOVA(dq_storage)), 1);
1123
1124 qbman_pull_desc_set_numframes(&pulldesc, dpaa2_dqrr_size);
1125
1126 while (1) {
1127 if (qbman_swp_pull(swp, &pulldesc)) {
1128 DPAA2_PMD_DP_DEBUG("VDQ command is not issued."
1129 "QBMAN is busy\n");
1130 /* Portal was busy, try again */
1131 continue;
1132 }
1133 break;
1134 }
1135
1136 rte_prefetch0((void *)((size_t)(dq_storage + 1)));
1137 /* Check if the previous issued command is completed. */
1138 while (!qbman_check_command_complete(dq_storage))
1139 ;
1140
1141 num_pulled = 0;

Callers 2

dpaa2_dev_txFunction · 0.85

Calls 15

dpaa2_affine_qbman_swpFunction · 0.85
rte_gettidFunction · 0.85
qbman_pull_desc_clearFunction · 0.85
qbman_pull_desc_set_fqFunction · 0.85
qbman_swp_pullFunction · 0.85
qbman_check_new_resultFunction · 0.85
qbman_result_DQ_flagsFunction · 0.85
qbman_result_DQ_fdFunction · 0.85

Tested by

no test coverage detected