FreeBSD/sys/dev/ixl/ixl_pf_main.c
/*
 * Configure queue interrupt cause registers in hardware.
 */
Configure queue interrupt cause registers in hardware.
Configure queue interrupt cause registers in hardware .
void
ixl_configure_queue_intr_msix(struct ixl_pf *pf)
{
	struct i40e_hw	*hw = &pf->hw;
	struct ixl_vsi *vsi = &pf->vsi;
	u32		reg;
	u16		vector = 1;
	for (int i = 0; i < vsi->num_queues; i++, vector++) {
		wr32(hw, I40E_PFINT_DYN_CTLN(i), 0);
		wr32(hw, I40E_PFINT_LNKLSTN(i), i);
		reg = I40E_QINT_RQCTL_CAUSE_ENA_MASK |
		(IXL_RX_ITR << I40E_QINT_RQCTL_ITR_INDX_SHIFT) |
		(vector << I40E_QINT_RQCTL_MSIX_INDX_SHIFT) |
		(i << I40E_QINT_RQCTL_NEXTQ_INDX_SHIFT) |
		(I40E_QUEUE_TYPE_TX << I40E_QINT_RQCTL_NEXTQ_TYPE_SHIFT);
		wr32(hw, I40E_QINT_RQCTL(i), reg);
		reg = I40E_QINT_TQCTL_CAUSE_ENA_MASK |
		(IXL_TX_ITR << I40E_QINT_TQCTL_ITR_INDX_SHIFT) |
		(vector << I40E_QINT_TQCTL_MSIX_INDX_SHIFT) |
		(IXL_QUEUE_EOL << I40E_QINT_TQCTL_NEXTQ_INDX_SHIFT) |
		(I40E_QUEUE_TYPE_RX << I40E_QINT_TQCTL_NEXTQ_TYPE_SHIFT);
		wr32(hw, I40E_QINT_TQCTL(i), reg);
	}
}
void ixl_configure_queue_intr_msix ( struct ixl_pf * pf ) { struct i40e_hw * hw = & pf -> hw ; struct ixl_vsi * vsi = & pf -> vsi ; u32 reg ; u16 vector = 1 ; for ( int i = 0 ; i < vsi -> num_queues ; i ++ , vector ++ ) { wr32 ( hw , I40E_PFINT_DYN_CTLN ( i ) , 0 ) ; wr32 ( hw , I40E_PFINT_LNKLSTN ( i ) , i ) ; reg = I40E_QINT_RQCTL_CAUSE_ENA_MASK | ( IXL_RX_ITR << I40E_QINT_RQCTL_ITR_INDX_SHIFT ) | ( vector << I40E_QINT_RQCTL_MSIX_INDX_SHIFT ) | ( i << I40E_QINT_RQCTL_NEXTQ_INDX_SHIFT ) | ( I40E_QUEUE_TYPE_TX << I40E_QINT_RQCTL_NEXTQ_TYPE_SHIFT ) ; wr32 ( hw , I40E_QINT_RQCTL ( i ) , reg ) ; reg = I40E_QINT_TQCTL_CAUSE_ENA_MASK | ( IXL_TX_ITR << I40E_QINT_TQCTL_ITR_INDX_SHIFT ) | ( vector << I40E_QINT_TQCTL_MSIX_INDX_SHIFT ) | ( IXL_QUEUE_EOL << I40E_QINT_TQCTL_NEXTQ_INDX_SHIFT ) | ( I40E_QUEUE_TYPE_RX << I40E_QINT_TQCTL_NEXTQ_TYPE_SHIFT ) ; wr32 ( hw , I40E_QINT_TQCTL ( i ) , reg ) ; } }
Configure queue interrupt cause registers in hardware.
Configure queue interrupt cause registers in hardware .
/* First queue type is RX / 0 */