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

Function mlx4_intr_install

dpdk/drivers/net/mlx4/mlx4_intr.c:287–312  ·  view source on GitHub ↗

* Install interrupt handler. * * @param priv * Pointer to private structure. * * @return * 0 on success, negative errno value otherwise and rte_errno is set. */

Source from the content-addressed store, hash-verified

285 * 0 on success, negative errno value otherwise and rte_errno is set.
286 */
287int
288mlx4_intr_install(struct mlx4_priv *priv)
289{
290 const struct rte_eth_intr_conf *const intr_conf =
291 &ETH_DEV(priv)->data->dev_conf.intr_conf;
292 int rc;
293
294 mlx4_intr_uninstall(priv);
295 if (intr_conf->lsc | intr_conf->rmv) {
296 if (rte_intr_fd_set(priv->intr_handle, priv->ctx->async_fd))
297 return -rte_errno;
298
299 rc = rte_intr_callback_register(priv->intr_handle,
300 (void (*)(void *))
301 mlx4_interrupt_handler,
302 priv);
303 if (rc < 0) {
304 rte_errno = -rc;
305 goto error;
306 }
307 }
308 return 0;
309error:
310 mlx4_intr_uninstall(priv);
311 return -rte_errno;
312}
313
314/**
315 * DPDK callback for Rx queue interrupt disable.

Callers 1

mlx4_dev_configureFunction · 0.85

Calls 3

mlx4_intr_uninstallFunction · 0.85
rte_intr_fd_setFunction · 0.85

Tested by

no test coverage detected