/* If PRC_RXD_DOORBELL_VPn.NEW_QW_CNT is larger or equal to PRC_CFG6_VPn.RXD_SPAT then a leak has occurred. Returns: VXGE_HW_FAIL, if leak has occurred.  */
enum vxge_hw_status vxge_hw_vpath_check_leak(struct __vxge_hw_ring *ring)
/* If PRC_RXD_DOORBELL_VPn.NEW_QW_CNT is larger or equal to PRC_CFG6_VPn.RXD_SPAT then a leak has occurred. Returns: VXGE_HW_FAIL, if leak has occurred.  */
enum vxge_hw_status vxge_hw_vpath_check_leak(struct __vxge_hw_ring *ring)
{
	enum vxge_hw_status status = VXGE_HW_OK;
	u64 rxd_new_count, rxd_spat;
	if (ring == NULL)
		return status;
	rxd_new_count = readl(&ring->vp_reg->prc_rxd_doorbell);
	rxd_spat = readq(&ring->vp_reg->prc_cfg6);
	rxd_spat = VXGE_HW_PRC_CFG6_RXD_SPAT(rxd_spat);
	if (rxd_new_count >= rxd_spat)
		status = VXGE_HW_FAIL;
	return status;
}