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

Function sfc_intr_attach

dpdk/drivers/net/sfc/sfc_intr.c:317–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317int
318sfc_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
346void
347sfc_intr_detach(struct sfc_adapter *sa)

Callers 1

sfc_attachFunction · 0.85

Calls 1

rte_intr_type_getFunction · 0.85

Tested by

no test coverage detected