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

Function ionic_pci_configure_intr

dpdk/drivers/net/ionic/ionic_dev_pci.c:155–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155static int
156ionic_pci_configure_intr(struct ionic_adapter *adapter)
157{
158 struct rte_pci_device *pci_dev =
159 (struct rte_pci_device *)(adapter->bus_dev);
160 struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
161 int err;
162
163 IONIC_PRINT(ERR, "Configuring %u intrs", adapter->nintrs);
164
165 if (rte_intr_efd_enable(intr_handle, adapter->nintrs)) {
166 IONIC_PRINT(ERR, "Fail to create eventfd");
167 return -1;
168 }
169
170 if (rte_intr_dp_is_en(intr_handle)) {
171 IONIC_PRINT(NOTICE,
172 "Packet I/O interrupt on datapath is enabled");
173 if (rte_intr_vec_list_alloc(intr_handle, "intr_vec",
174 adapter->nintrs)) {
175 IONIC_PRINT(ERR, "Failed to allocate %u vectors",
176 adapter->nintrs);
177 return -ENOMEM;
178 }
179 }
180
181 err = rte_intr_callback_register(intr_handle,
182 ionic_dev_interrupt_handler,
183 adapter);
184 if (err) {
185 IONIC_PRINT(ERR,
186 "Failure registering interrupts handler (%d)", err);
187 return err;
188 }
189
190 /* enable intr mapping */
191 err = rte_intr_enable(intr_handle);
192 if (err) {
193 IONIC_PRINT(ERR, "Failure enabling interrupts (%d)", err);
194 return err;
195 }
196
197 return 0;
198}
199
200static void
201ionic_pci_unconfigure_intr(struct ionic_adapter *adapter)

Callers

nothing calls this directly

Calls 5

rte_intr_vec_list_allocFunction · 0.85
rte_intr_efd_enableFunction · 0.50
rte_intr_dp_is_enFunction · 0.50
rte_intr_enableFunction · 0.50

Tested by

no test coverage detected