From: Adrien Mazarguil Date: Tue, 5 Sep 2017 12:56:37 +0000 (+0200) Subject: net/mlx4: fix unhandled event debug message X-Git-Tag: spdx-start~1982 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ebada48456bdaeeec556567ffab9bec5642b1304;p=dpdk.git net/mlx4: fix unhandled event debug message 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: stable@dpdk.org Signed-off-by: Adrien Mazarguil --- diff --git a/drivers/net/mlx4/mlx4_intr.c b/drivers/net/mlx4/mlx4_intr.c index e3449ee268..d7f10989d2 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); }