- memset(&priv->intr_handle, 0, sizeof(struct rte_intr_handle));
- priv->intr_handle.fd = -1;
- priv->intr_handle.type = RTE_INTR_HANDLE_EXT;
+ priv->intr_handle =
+ rte_intr_instance_alloc(RTE_INTR_INSTANCE_F_SHARED);
+ if (priv->intr_handle == NULL) {
+ RTE_LOG(ERR, EAL, "Fail to allocate intr_handle\n");
+ goto port_error;
+ }
+
+ if (rte_intr_fd_set(priv->intr_handle, -1))
+ goto port_error;
+
+ if (rte_intr_type_set(priv->intr_handle, RTE_INTR_HANDLE_EXT))
+ goto port_error;
+