src/dpdk/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
static struct rte_ring *
snow3g_pmd_qp_create_processed_ops_ring(struct snow3g_qp *qp,
		unsigned 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) {
			SNOW3G_LOG(INFO, "Reusing existing ring %s"
					" for processed packets",
					 qp->name);
			return r;
		}

		SNOW3G_LOG(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_SP_ENQ | RING_F_SC_DEQ);
}
/** Create a ring to place processed ops on */
Create a ring to place processed ops on
Create a ring to place processed ops on
static struct rte_ring *
snow3g_pmd_qp_create_processed_ops_ring(struct snow3g_qp *qp,
		unsigned 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) {
			SNOW3G_LOG(INFO, "Reusing existing ring %s"
					" for processed packets",
					 qp->name);
			return r;
		}
		SNOW3G_LOG(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_SP_ENQ | RING_F_SC_DEQ);
}
static struct rte_ring * snow3g_pmd_qp_create_processed_ops_ring ( struct snow3g_qp * qp , unsigned 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 ) { SNOW3G_LOG ( INFO , " " " " , qp -> name ) ; return r ; } SNOW3G_LOG ( ERR , " " " " , qp -> name ) ; return NULL ; } return rte_ring_create ( qp -> name , ring_size , socket_id , RING_F_SP_ENQ | RING_F_SC_DEQ ) ; }
Create a ring to place processed ops on
Create a ring to place processed ops on