src/dpdk/drivers/net/ixgbe/ixgbe_ethdev.c
static void
ixgbe_dev_interrupt_delayed_handler(void *param)
{
	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
	struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
	struct ixgbe_interrupt *intr =
		IXGBE_DEV_PRIVATE_TO_INTR(dev->data->dev_private);
	struct ixgbe_hw *hw =
		IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
	uint32_t eicr;

	ixgbe_disable_intr(hw);

	eicr = IXGBE_READ_REG(hw, IXGBE_EICR);
	if (eicr & IXGBE_EICR_MAILBOX)
		ixgbe_pf_mbx_process(dev);

	if (intr->flags & IXGBE_FLAG_PHY_INTERRUPT) {
		ixgbe_handle_lasi(hw);
		intr->flags &= ~IXGBE_FLAG_PHY_INTERRUPT;
	}

	if (intr->flags & IXGBE_FLAG_NEED_LINK_UPDATE) {
		ixgbe_dev_link_update(dev, 0);
		intr->flags &= ~IXGBE_FLAG_NEED_LINK_UPDATE;
		ixgbe_dev_link_status_print(dev);
		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
	}

	if (intr->flags & IXGBE_FLAG_MACSEC) {
		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_MACSEC, NULL);
		intr->flags &= ~IXGBE_FLAG_MACSEC;
	}

	/* restore original mask */
	intr->mask = intr->mask_original;
	intr->mask_original = 0;

	PMD_DRV_LOG(DEBUG, "enable intr in delayed handler S[%08x]", eicr);
	ixgbe_enable_intr(dev);
	rte_intr_ack(intr_handle);
}
/**
 * Interrupt handler which shall be registered for alarm callback for delayed
 * handling specific interrupt to wait for the stable nic state. As the
 * NIC interrupt state is not stable for ixgbe after link is just down,
 * it needs to wait 4 seconds to get the stable status.
 *
 * @param handle
 *  Pointer to interrupt handle.
 * @param param
 *  The address of parameter (struct rte_eth_dev *) regsitered before.
 *
 * @return
 *  void
 */
Interrupt handler which shall be registered for alarm callback for delayed
handling specific interrupt to wait for the stable nic state. As the
NIC interrupt state is not stable for ixgbe after link is just down,
it needs to wait 4 seconds to get the stable status.

@param handle
Pointer to interrupt handle.
@param param
The address of parameter (struct rte_eth_dev *) regsitered before.

@return
void
Interrupt handler which shall be registered for alarm callback for delayed handling specific interrupt to wait for the stable nic state . As the NIC interrupt state is not stable for ixgbe after link is just down it needs to wait 4 seconds to get the stable status . @param handle Pointer to interrupt handle . @param param The address of parameter ( struct rte_eth_dev * ) regsitered before . @return void
static void
ixgbe_dev_interrupt_delayed_handler(void *param)
{
	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
	struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
	struct ixgbe_interrupt *intr =
		IXGBE_DEV_PRIVATE_TO_INTR(dev->data->dev_private);
	struct ixgbe_hw *hw =
		IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
	uint32_t eicr;
	ixgbe_disable_intr(hw);
	eicr = IXGBE_READ_REG(hw, IXGBE_EICR);
	if (eicr & IXGBE_EICR_MAILBOX)
		ixgbe_pf_mbx_process(dev);
	if (intr->flags & IXGBE_FLAG_PHY_INTERRUPT) {
		ixgbe_handle_lasi(hw);
		intr->flags &= ~IXGBE_FLAG_PHY_INTERRUPT;
	}
	if (intr->flags & IXGBE_FLAG_NEED_LINK_UPDATE) {
		ixgbe_dev_link_update(dev, 0);
		intr->flags &= ~IXGBE_FLAG_NEED_LINK_UPDATE;
		ixgbe_dev_link_status_print(dev);
		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
	}
	if (intr->flags & IXGBE_FLAG_MACSEC) {
		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_MACSEC, NULL);
		intr->flags &= ~IXGBE_FLAG_MACSEC;
	}
	intr->mask = intr->mask_original;
	intr->mask_original = 0;
	PMD_DRV_LOG(DEBUG, "enable intr in delayed handler S[%08x]", eicr);
	ixgbe_enable_intr(dev);
	rte_intr_ack(intr_handle);
}
static void ixgbe_dev_interrupt_delayed_handler ( void * param ) { struct rte_eth_dev * dev = ( struct rte_eth_dev * ) param ; struct rte_pci_device * pci_dev = RTE_ETH_DEV_TO_PCI ( dev ) ; struct rte_intr_handle * intr_handle = & pci_dev -> intr_handle ; struct ixgbe_interrupt * intr = IXGBE_DEV_PRIVATE_TO_INTR ( dev -> data -> dev_private ) ; struct ixgbe_hw * hw = IXGBE_DEV_PRIVATE_TO_HW ( dev -> data -> dev_private ) ; uint32_t eicr ; ixgbe_disable_intr ( hw ) ; eicr = IXGBE_READ_REG ( hw , IXGBE_EICR ) ; if ( eicr & IXGBE_EICR_MAILBOX ) ixgbe_pf_mbx_process ( dev ) ; if ( intr -> flags & IXGBE_FLAG_PHY_INTERRUPT ) { ixgbe_handle_lasi ( hw ) ; intr -> flags &= ~ IXGBE_FLAG_PHY_INTERRUPT ; } if ( intr -> flags & IXGBE_FLAG_NEED_LINK_UPDATE ) { ixgbe_dev_link_update ( dev , 0 ) ; intr -> flags &= ~ IXGBE_FLAG_NEED_LINK_UPDATE ; ixgbe_dev_link_status_print ( dev ) ; rte_eth_dev_callback_process ( dev , RTE_ETH_EVENT_INTR_LSC , NULL ) ; } if ( intr -> flags & IXGBE_FLAG_MACSEC ) { rte_eth_dev_callback_process ( dev , RTE_ETH_EVENT_MACSEC , NULL ) ; intr -> flags &= ~ IXGBE_FLAG_MACSEC ; } intr -> mask = intr -> mask_original ; intr -> mask_original = 0 ; PMD_DRV_LOG ( DEBUG , " " , eicr ) ; ixgbe_enable_intr ( dev ) ; rte_intr_ack ( intr_handle ) ; }
Interrupt handler which shall be registered for alarm callback for delayed
 handling specific interrupt to wait for the stable nic state.
Interrupt handler which shall be registered for alarm callback for delayed handling specific interrupt to wait for the stable nic state .
/* restore original mask */