src/dpdk/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
static struct rte_ring *
aesni_gcm_pmd_qp_create_processed_pkts_ring(struct aesni_gcm_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) {
			AESNI_GCM_LOG(INFO, "Reusing existing ring %s for processed"
				" packets", qp->name);
			return r;
		}
		AESNI_GCM_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 process packets on */
Create a ring to place process packets on
Create a ring to place process packets on
static struct rte_ring *
aesni_gcm_pmd_qp_create_processed_pkts_ring(struct aesni_gcm_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) {
			AESNI_GCM_LOG(INFO, "Reusing existing ring %s for processed"
				" packets", qp->name);
			return r;
		}
		AESNI_GCM_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 * aesni_gcm_pmd_qp_create_processed_pkts_ring ( struct aesni_gcm_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 ) { AESNI_GCM_LOG ( INFO , " " " " , qp -> name ) ; return r ; } AESNI_GCM_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 process packets on
Create a ring to place process packets on