DPDK patches and discussions
 help / color / mirror / Atom feed
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Gaetan Rivet <gaetan.rivet@6wind.com>, Matan Azrad <matan@mellanox.com>
Cc: dev@dpdk.org, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v1 1/3] net/mlx4: fix unhandled event debug message
Date: Tue,  5 Sep 2017 14:56:37 +0200	[thread overview]
Message-ID: <e23efe1b99c66247c3476c1b1517277958df1a1d.1504614801.git.adrien.mazarguil@6wind.com> (raw)
In-Reply-To: <cover.1504614801.git.adrien.mazarguil@6wind.com>

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.rivet@6wind.com>
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@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

  reply	other threads:[~2017-09-05 12:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05 12:56 [dpdk-dev] [PATCH v1 0/3] net/mlx4: additional interrupt handling fixes Adrien Mazarguil
2017-09-05 12:56 ` Adrien Mazarguil [this message]
2017-09-05 12:56 ` [dpdk-dev] [PATCH v1 2/3] net/mlx4: fix rescheduled link status check Adrien Mazarguil
2017-09-05 12:56 ` [dpdk-dev] [PATCH v1 3/3] net/mlx4: merge interrupt collector function Adrien Mazarguil
2017-09-05 13:29   ` Gaëtan Rivet
2017-09-05 13:28 ` [dpdk-dev] [PATCH v1 0/3] net/mlx4: additional interrupt handling fixes Gaëtan Rivet
2017-09-08  9:10 ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e23efe1b99c66247c3476c1b1517277958df1a1d.1504614801.git.adrien.mazarguil@6wind.com \
    --to=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=gaetan.rivet@6wind.com \
    --cc=matan@mellanox.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).