src/dpdk/drivers/net/ixgbe/base/ixgbe_x550.c
void ixgbe_restore_mdd_vf_X550(struct ixgbe_hw *hw, u32 vf)
{
	u32 idx, reg, num_qs, start_q, bitmask;

	DEBUGFUNC("ixgbe_restore_mdd_vf_X550");

	/* Map VF to queues */
	reg = IXGBE_READ_REG(hw, IXGBE_MRQC);
	switch (reg & IXGBE_MRQC_MRQE_MASK) {
	case IXGBE_MRQC_VMDQRT8TCEN:
		num_qs = 8;  /* 16 VFs / pools */
		bitmask = 0x000000FF;
		break;
	case IXGBE_MRQC_VMDQRSS32EN:
	case IXGBE_MRQC_VMDQRT4TCEN:
		num_qs = 4;  /* 32 VFs / pools */
		bitmask = 0x0000000F;
		break;
	default:            /* 64 VFs / pools */
		num_qs = 2;
		bitmask = 0x00000003;
		break;
	}
	start_q = vf * num_qs;

	/* Release vf's queues by clearing WQBR_TX and WQBR_RX (RW1C) */
	idx = start_q / 32;
	reg = 0;
	reg |= (bitmask << (start_q % 32));
	IXGBE_WRITE_REG(hw, IXGBE_WQBR_TX(idx), reg);
	IXGBE_WRITE_REG(hw, IXGBE_WQBR_RX(idx), reg);
}
/**
 * ixgbe_restore_mdd_vf_X550
 * @hw: pointer to hardware structure
 * @vf: vf index
 *
 * Restore VF that was disabled during malicious driver detection event
 **/
ixgbe_restore_mdd_vf_X550
@hw: pointer to hardware structure
@vf: vf index

Restore VF that was disabled during malicious driver detection event
ixgbe_restore_mdd_vf_X550 @hw : pointer to hardware structure @vf : vf index Restore VF that was disabled during malicious driver detection event
void ixgbe_restore_mdd_vf_X550(struct ixgbe_hw *hw, u32 vf)
{
	u32 idx, reg, num_qs, start_q, bitmask;
	DEBUGFUNC("ixgbe_restore_mdd_vf_X550");
	reg = IXGBE_READ_REG(hw, IXGBE_MRQC);
	switch (reg & IXGBE_MRQC_MRQE_MASK) {
	case IXGBE_MRQC_VMDQRT8TCEN:
		num_qs = 8;  
		bitmask = 0x000000FF;
		break;
	case IXGBE_MRQC_VMDQRSS32EN:
	case IXGBE_MRQC_VMDQRT4TCEN:
		num_qs = 4;  
		bitmask = 0x0000000F;
		break;
	default:            
		num_qs = 2;
		bitmask = 0x00000003;
		break;
	}
	start_q = vf * num_qs;
	idx = start_q / 32;
	reg = 0;
	reg |= (bitmask << (start_q % 32));
	IXGBE_WRITE_REG(hw, IXGBE_WQBR_TX(idx), reg);
	IXGBE_WRITE_REG(hw, IXGBE_WQBR_RX(idx), reg);
}
void ixgbe_restore_mdd_vf_X550 ( struct ixgbe_hw * hw , u32 vf ) { u32 idx , reg , num_qs , start_q , bitmask ; DEBUGFUNC ( " " ) ; reg = IXGBE_READ_REG ( hw , IXGBE_MRQC ) ; switch ( reg & IXGBE_MRQC_MRQE_MASK ) { case IXGBE_MRQC_VMDQRT8TCEN : num_qs = 8 ; bitmask = 0x000000FF ; break ; case IXGBE_MRQC_VMDQRSS32EN : case IXGBE_MRQC_VMDQRT4TCEN : num_qs = 4 ; bitmask = 0x0000000F ; break ; default : num_qs = 2 ; bitmask = 0x00000003 ; break ; } start_q = vf * num_qs ; idx = start_q / 32 ; reg = 0 ; reg |= ( bitmask << ( start_q % 32 ) ) ; IXGBE_WRITE_REG ( hw , IXGBE_WQBR_TX ( idx ) , reg ) ; IXGBE_WRITE_REG ( hw , IXGBE_WQBR_RX ( idx ) , reg ) ; }
ixgbe_restore_mdd_vf_X550
 @hw: pointer to hardware structure
 @vf: vf index
ixgbe_restore_mdd_vf_X550 @hw : pointer to hardware structure @vf : vf index
/* Map VF to queues */ /* 16 VFs / pools */ /* 32 VFs / pools */ /* 64 VFs / pools */ /* Release vf's queues by clearing WQBR_TX and WQBR_RX (RW1C) */