src/dpdk/drivers/crypto/openssl/rte_openssl_pmd_ops.c
static struct rte_ring *
openssl_pmd_qp_create_processed_ops_ring(struct openssl_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) {
			OPENSSL_LOG(INFO,
					"Reusing existing ring %s for processed ops",
				 qp->name);
			return r;
		}

		OPENSSL_LOG(ERR,
				"Unable to reuse existing ring %s for processed ops",
			 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 operations on */
Create a ring to place processed operations on
Create a ring to place processed operations on
static struct rte_ring *
openssl_pmd_qp_create_processed_ops_ring(struct openssl_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) {
			OPENSSL_LOG(INFO,
					"Reusing existing ring %s for processed ops",
				 qp->name);
			return r;
		}
		OPENSSL_LOG(ERR,
				"Unable to reuse existing ring %s for processed ops",
			 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 * openssl_pmd_qp_create_processed_ops_ring ( struct openssl_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 ) { OPENSSL_LOG ( INFO , " " , qp -> name ) ; return r ; } OPENSSL_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 operations on
Create a ring to place processed operations on