MCPcopy Create free account
hub / github.com/F-Stack/f-stack / i40e_dev_interrupt_handler

Function i40e_dev_interrupt_handler

dpdk/drivers/net/i40e/i40e_ethdev.c:6889–6936  ·  view source on GitHub ↗

* Interrupt handler triggered by NIC for handling * specific interrupt. * * @param handle * Pointer to interrupt handle. * @param param * The address of parameter (struct rte_eth_dev *) registered before. * * @return * void */

Source from the content-addressed store, hash-verified

6887 * void
6888 */
6889static void
6890i40e_dev_interrupt_handler(void *param)
6891{
6892 struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
6893 struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
6894 uint32_t icr0;
6895
6896 /* Disable interrupt */
6897 i40e_pf_disable_irq0(hw);
6898
6899 /* read out interrupt causes */
6900 icr0 = I40E_READ_REG(hw, I40E_PFINT_ICR0);
6901
6902 /* No interrupt event indicated */
6903 if (!(icr0 & I40E_PFINT_ICR0_INTEVENT_MASK)) {
6904 PMD_DRV_LOG(INFO, "No interrupt event");
6905 goto done;
6906 }
6907 if (icr0 & I40E_PFINT_ICR0_ECC_ERR_MASK)
6908 PMD_DRV_LOG(ERR, "ICR0: unrecoverable ECC error");
6909 if (icr0 & I40E_PFINT_ICR0_MAL_DETECT_MASK) {
6910 PMD_DRV_LOG(ERR, "ICR0: malicious programming detected");
6911 i40e_handle_mdd_event(dev);
6912 }
6913 if (icr0 & I40E_PFINT_ICR0_GRST_MASK)
6914 PMD_DRV_LOG(INFO, "ICR0: global reset requested");
6915 if (icr0 & I40E_PFINT_ICR0_PCI_EXCEPTION_MASK)
6916 PMD_DRV_LOG(INFO, "ICR0: PCI exception activated");
6917 if (icr0 & I40E_PFINT_ICR0_STORM_DETECT_MASK)
6918 PMD_DRV_LOG(INFO, "ICR0: a change in the storm control state");
6919 if (icr0 & I40E_PFINT_ICR0_HMC_ERR_MASK)
6920 PMD_DRV_LOG(ERR, "ICR0: HMC error");
6921 if (icr0 & I40E_PFINT_ICR0_PE_CRITERR_MASK)
6922 PMD_DRV_LOG(ERR, "ICR0: protocol engine critical error");
6923
6924 if (icr0 & I40E_PFINT_ICR0_VFLR_MASK) {
6925 PMD_DRV_LOG(INFO, "ICR0: VF reset detected");
6926 i40e_dev_handle_vfr_event(dev);
6927 }
6928 if (icr0 & I40E_PFINT_ICR0_ADMINQ_MASK) {
6929 PMD_DRV_LOG(INFO, "ICR0: adminq event");
6930 i40e_dev_handle_aq_msg(dev);
6931 }
6932
6933done:
6934 /* Enable interrupt */
6935 i40e_pf_enable_irq0(hw);
6936}
6937
6938static void
6939i40e_dev_alarm_handler(void *param)

Callers

nothing calls this directly

Calls 5

i40e_pf_disable_irq0Function · 0.85
i40e_handle_mdd_eventFunction · 0.85
i40e_dev_handle_aq_msgFunction · 0.85
i40e_pf_enable_irq0Function · 0.85

Tested by

no test coverage detected