src/dpdk/drivers/net/octeontx/base/octeontx_pkovf.c
static inline
int octeontx_pko_dq_close(uint16_t txq)
{
	unsigned int reg_off;
	uint8_t *vf_bar0;
	uint64_t rtn;
	int res;

	vf_bar0 = octeontx_pko_dq_vf_bar0(txq);
	res = octeontx_pko_dq_gdq(txq);

	if (unlikely(res < 0 || vf_bar0 == NULL))
		return -EINVAL;

	reg_off = PKO_VF_DQ_OP_CLOSE(res);

	rtn = octeontx_reg_ldadd_u64(vf_bar0 + reg_off, 0);

	/* PKO_DQOP_E::CLOSE */
	if (((rtn >> PKO_DQ_OP_BIT) & 0x3) != 0x2)
		return -EIO;

	switch (rtn >> PKO_DQ_STATUS_BIT) {
	case 0xD:	/* DQNOTCREATED */
	case 0x0:	/* PASS */
		break;
	default:
		return -EIO;
	}

	res = rtn & ((1ull << PKO_DQ_OP_BIT) - 1); /* DEPTH */
	return res;
}
/**
 * Close a PKO DQ
 * Flush all packets pending.
 */
Close a PKO DQ
Flush all packets pending.
Close a PKO DQ Flush all packets pending .
static inline
int octeontx_pko_dq_close(uint16_t txq)
{
	unsigned int reg_off;
	uint8_t *vf_bar0;
	uint64_t rtn;
	int res;
	vf_bar0 = octeontx_pko_dq_vf_bar0(txq);
	res = octeontx_pko_dq_gdq(txq);
	if (unlikely(res < 0 || vf_bar0 == NULL))
		return -EINVAL;
	reg_off = PKO_VF_DQ_OP_CLOSE(res);
	rtn = octeontx_reg_ldadd_u64(vf_bar0 + reg_off, 0);
	if (((rtn >> PKO_DQ_OP_BIT) & 0x3) != 0x2)
		return -EIO;
	switch (rtn >> PKO_DQ_STATUS_BIT) {
	case 0xD:	
	case 0x0:	
		break;
	default:
		return -EIO;
	}
	res = rtn & ((1ull << PKO_DQ_OP_BIT) - 1); 
	return res;
}
static inline int octeontx_pko_dq_close ( uint16_t txq ) { unsigned int reg_off ; uint8_t * vf_bar0 ; uint64_t rtn ; int res ; vf_bar0 = octeontx_pko_dq_vf_bar0 ( txq ) ; res = octeontx_pko_dq_gdq ( txq ) ; if ( unlikely ( res < 0 || vf_bar0 == NULL ) ) return - EINVAL ; reg_off = PKO_VF_DQ_OP_CLOSE ( res ) ; rtn = octeontx_reg_ldadd_u64 ( vf_bar0 + reg_off , 0 ) ; if ( ( ( rtn >> PKO_DQ_OP_BIT ) & 0x3 ) != 0x2 ) return - EIO ; switch ( rtn >> PKO_DQ_STATUS_BIT ) { case 0xD : case 0x0 : break ; default : return - EIO ; } res = rtn & ( ( 1ull << PKO_DQ_OP_BIT ) - 1 ) ; return res ; }
Close a PKO DQ
 Flush all packets pending.
Close a PKO DQ Flush all packets pending .
/* PKO_DQOP_E::CLOSE */ /* DQNOTCREATED */ /* PASS */ /* DEPTH */