src/dpdk/drivers/compress/octeontx/otx_zip_pmd.c
static struct rte_ring *
zip_pmd_qp_create_processed_pkts_ring(struct zipvf_qp *qp,
		unsigned int ring_size, int socket_id)
{
	struct rte_ring *r;

	r = rte_ring_lookup(qp->name);
	if (r) {
		if (rte_ring_get_size(r) >= ring_size) {
			ZIP_PMD_INFO("Reusing existing ring %s for processed"
					" packets", qp->name);
			return r;
		}

		ZIP_PMD_ERR("Unable to reuse existing ring %s for processed"
				" packets", qp->name);
		return NULL;
	}

	return rte_ring_create(qp->name, ring_size, socket_id,
						RING_F_EXACT_SZ);
}
/** Create a ring to place process packets on */
Create a ring to place process packets on
Create a ring to place process packets on
static struct rte_ring *
zip_pmd_qp_create_processed_pkts_ring(struct zipvf_qp *qp,
		unsigned int ring_size, int socket_id)
{
	struct rte_ring *r;
	r = rte_ring_lookup(qp->name);
	if (r) {
		if (rte_ring_get_size(r) >= ring_size) {
			ZIP_PMD_INFO("Reusing existing ring %s for processed"
					" packets", qp->name);
			return r;
		}
		ZIP_PMD_ERR("Unable to reuse existing ring %s for processed"
				" packets", qp->name);
		return NULL;
	}
	return rte_ring_create(qp->name, ring_size, socket_id,
						RING_F_EXACT_SZ);
}
static struct rte_ring * zip_pmd_qp_create_processed_pkts_ring ( struct zipvf_qp * qp , unsigned int ring_size , int socket_id ) { struct rte_ring * r ; r = rte_ring_lookup ( qp -> name ) ; if ( r ) { if ( rte_ring_get_size ( r ) >= ring_size ) { ZIP_PMD_INFO ( " " " " , qp -> name ) ; return r ; } ZIP_PMD_ERR ( " " " " , qp -> name ) ; return NULL ; } return rte_ring_create ( qp -> name , ring_size , socket_id , RING_F_EXACT_SZ ) ; }
Create a ring to place process packets on
Create a ring to place process packets on