mlx4_link_update(dev, 0);
if (((link->link_speed == 0) && link->link_status) ||
((link->link_speed != 0) && !link->link_status)) {
- if (!priv->pending_alarm) {
+ if (!priv->intr_alarm) {
/* Inconsistent status, check again later. */
- priv->pending_alarm = 1;
- rte_eal_alarm_set(MLX4_ALARM_TIMEOUT_US,
+ priv->intr_alarm = 1;
+ rte_eal_alarm_set(MLX4_INTR_ALARM_TIMEOUT,
mlx4_dev_link_status_handler,
dev);
}
uint32_t events;
int ret;
- assert(priv->pending_alarm == 1);
- priv->pending_alarm = 0;
+ assert(priv->intr_alarm == 1);
+ priv->intr_alarm = 0;
ret = priv_dev_status_handler(priv, dev, &events);
if (ret > 0 && events & (1 << RTE_ETH_EVENT_INTR_LSC))
_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
if (ret)
return ret;
}
- if (priv->pending_alarm)
+ if (priv->intr_alarm)
if (rte_eal_alarm_cancel(mlx4_dev_link_status_handler,
dev)) {
ERROR("rte_eal_alarm_cancel failed "
" (rte_errno: %s)", strerror(rte_errno));
return -rte_errno;
}
- priv->pending_alarm = 0;
+ priv->intr_alarm = 0;
return 0;
}
#define MLX4_PMD_TX_MP_CACHE 8
#endif
-/* Alarm timeout. */
-#define MLX4_ALARM_TIMEOUT_US 100000
+/* Interrupt alarm timeout value in microseconds. */
+#define MLX4_INTR_ALARM_TIMEOUT 100000
/* Port parameter. */
#define MLX4_PMD_PORT_KVARG "port"
uint8_t port; /* Physical port number. */
unsigned int started:1; /* Device started, flows enabled. */
unsigned int vf:1; /* This is a VF device. */
- unsigned int pending_alarm:1; /* An alarm is pending. */
+ unsigned int intr_alarm:1; /* An interrupt alarm is scheduled. */
unsigned int isolated:1; /* Toggle isolated mode. */
/* RX/TX queues. */
unsigned int rxqs_n; /* RX queues array size. */