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

Function run_decoding

dpdk/examples/bbdev_app/main.c:816–912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

814}
815
816static void
817run_decoding(struct lcore_conf *lcore_conf)
818{
819 uint16_t i;
820 uint16_t port_id, tx_queue_id;
821 uint16_t bbdev_id, bbdev_queue_id;
822 uint16_t nb_recv, nb_enq, nb_deq, nb_tx;
823 uint8_t *llr_temp_buf;
824 struct rte_mbuf *recv_pkts_burst[MAX_PKT_BURST];
825 struct rte_bbdev_dec_op *bbdev_ops_burst[MAX_PKT_BURST];
826 struct lcore_statistics *lcore_stats;
827 struct rte_mempool *bbdev_op_pool;
828 struct rte_ring *enc_to_dec_ring;
829
830 lcore_stats = lcore_conf->lcore_stats;
831 port_id = lcore_conf->port_id;
832 tx_queue_id = lcore_conf->tx_queue_id;
833 bbdev_id = lcore_conf->bbdev_id;
834 bbdev_queue_id = lcore_conf->dec_queue_id;
835 bbdev_op_pool = lcore_conf->bbdev_dec_op_pool;
836 enc_to_dec_ring = lcore_conf->enc_to_dec_ring;
837 llr_temp_buf = lcore_conf->llr_temp_buf;
838
839 /* Dequeue packets from the ring */
840 nb_recv = rte_ring_dequeue_burst(enc_to_dec_ring,
841 (void **)recv_pkts_burst, MAX_PKT_BURST, NULL);
842 if (!nb_recv)
843 return;
844
845 if (unlikely(rte_bbdev_dec_op_alloc_bulk(bbdev_op_pool, bbdev_ops_burst,
846 nb_recv) != 0)) {
847 pktmbuf_input_free_bulk(recv_pkts_burst, nb_recv);
848 lcore_stats->rx_lost_packets += nb_recv;
849 return;
850 }
851
852 transform_enc_out_dec_in(recv_pkts_burst, llr_temp_buf, nb_recv,
853 def_op_dec.cb_params.k);
854
855 for (i = 0; i < nb_recv; i++) {
856 /* set op */
857 bbdev_ops_burst[i]->turbo_dec = def_op_dec;
858
859 bbdev_ops_burst[i]->turbo_dec.input.data = recv_pkts_burst[i];
860 bbdev_ops_burst[i]->turbo_dec.input.offset =
861 sizeof(struct rte_ether_hdr);
862 bbdev_ops_burst[i]->turbo_dec.input.length =
863 rte_pktmbuf_data_len(recv_pkts_burst[i])
864 - sizeof(struct rte_ether_hdr);
865
866 bbdev_ops_burst[i]->turbo_dec.hard_output.data =
867 recv_pkts_burst[i];
868 bbdev_ops_burst[i]->turbo_dec.hard_output.offset =
869 sizeof(struct rte_ether_hdr);
870 }
871
872 /* Enqueue packets on BBDevice */
873 nb_enq = rte_bbdev_enqueue_dec_ops(bbdev_id, bbdev_queue_id,

Callers 1

processing_loopFunction · 0.85

Calls 11

rte_ring_dequeue_burstFunction · 0.85
pktmbuf_input_free_bulkFunction · 0.85
transform_enc_out_dec_inFunction · 0.85
verify_dataFunction · 0.85
rte_pktmbuf_freeFunction · 0.85
mbuf_inputFunction · 0.85
rte_eth_tx_burstFunction · 0.85

Tested by

no test coverage detected