When LSC or RMV events are received by the PMD but are not requested by the application, a misleading debugging message implying the PMD does not support them is shown.
Fixes: 6dd7b7056d7f ("net/mlx4: support device removal event") Cc: Gaetan Rivet <gaetan.ri...@6wind.com> Cc: sta...@dpdk.org Signed-off-by: Adrien Mazarguil <adrien.mazarg...@6wind.com> --- drivers/net/mlx4/mlx4_intr.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/net/mlx4/mlx4_intr.c b/drivers/net/mlx4/mlx4_intr.c index e3449ee..d7f1098 100644 --- a/drivers/net/mlx4/mlx4_intr.c +++ b/drivers/net/mlx4/mlx4_intr.c @@ -160,16 +160,21 @@ mlx4_collect_interrupt_events(struct priv *priv, uint32_t *events) for (;;) { if (ibv_get_async_event(priv->ctx, &event)) break; - if ((event.event_type == IBV_EVENT_PORT_ACTIVE || - event.event_type == IBV_EVENT_PORT_ERR) && - intr_conf->lsc) { + switch (event.event_type) { + case IBV_EVENT_PORT_ACTIVE: + case IBV_EVENT_PORT_ERR: + if (!intr_conf->lsc) + break; port_change = 1; ret++; - } else if (event.event_type == IBV_EVENT_DEVICE_FATAL && - intr_conf->rmv) { + break; + case IBV_EVENT_DEVICE_FATAL: + if (!intr_conf->rmv) + break; *events |= (1 << RTE_ETH_EVENT_INTR_RMV); ret++; - } else { + break; + default: DEBUG("event type %d on port %d not handled", event.event_type, event.element.port_num); } -- 2.1.4