void oct_tx_process_hw_work(cvmx_wqe_t *work, uint32_t outport) { uint64_t queue = cvmx_pko_get_base_queue(outport); cvmx_pko_send_packet_prepare(outport, queue, CVMX_PKO_LOCK_CMD_QUEUE); /* Build a PKO pointer to this packet */ cvmx_pko_command_word0_t pko_command; pko_command.u64 = 0; pko_command.s.segs = work->word2.s.bufs; pko_command.s.total_bytes = cvmx_wqe_get_len(work); /* Send the packet */ cvmx_pko_return_value_t send_status = cvmx_pko_send_packet_finish(outport, queue, pko_command, work->packet_ptr, CVMX_PKO_LOCK_CMD_QUEUE); if (send_status != CVMX_PKO_SUCCESS) { printf("Failed to send packet using cvmx_pko_send_packet2\n"); cvmx_helper_free_packet_data(work); STAT_TX_HW_SEND_ERR; } else { STAT_TX_SEND_OVER; } cvmx_fpa_free(work, wqe_pool, 0); }
void octeon_se_fastpath_fragc_uninit(SeFastpathCoreContext core, SeFastpath fastpath, SeFastpathFragmentContext fragc) { if (cvmx_likely(fragc->pc)) { cvmx_helper_free_packet_data(fragc->pc->wqe); cvmx_fpa_free(fragc->pc->wqe, CVMX_FPA_WQE_POOL, 0); fragc->pc->wqe = NULL; } }