| 315 | } |
| 316 | |
| 317 | int |
| 318 | sfc_intr_attach(struct sfc_adapter *sa) |
| 319 | { |
| 320 | struct sfc_intr *intr = &sa->intr; |
| 321 | struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(sa->eth_dev); |
| 322 | |
| 323 | sfc_log_init(sa, "entry"); |
| 324 | |
| 325 | switch (rte_intr_type_get(pci_dev->intr_handle)) { |
| 326 | #ifdef RTE_EXEC_ENV_LINUX |
| 327 | case RTE_INTR_HANDLE_UIO_INTX: |
| 328 | case RTE_INTR_HANDLE_VFIO_LEGACY: |
| 329 | intr->type = EFX_INTR_LINE; |
| 330 | break; |
| 331 | case RTE_INTR_HANDLE_UIO: |
| 332 | case RTE_INTR_HANDLE_VFIO_MSI: |
| 333 | case RTE_INTR_HANDLE_VFIO_MSIX: |
| 334 | intr->type = EFX_INTR_MESSAGE; |
| 335 | break; |
| 336 | #endif |
| 337 | default: |
| 338 | intr->type = EFX_INTR_INVALID; |
| 339 | break; |
| 340 | } |
| 341 | |
| 342 | sfc_log_init(sa, "done"); |
| 343 | return 0; |
| 344 | } |
| 345 | |
| 346 | void |
| 347 | sfc_intr_detach(struct sfc_adapter *sa) |
no test coverage detected