DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shahaf Shuler <shahafs@mellanox.com>
To: nelio.laranjeiro@6wind.com, adrien.mazarguil@6wind.com,
	yskoh@mellanox.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2] net/mlx5: fix link status initialization
Date: Tue, 10 Apr 2018 09:13:36 +0300	[thread overview]
Message-ID: <20180410061336.49844-1-shahafs@mellanox.com> (raw)
In-Reply-To: <20180403044817.27457-1-shahafs@mellanox.com>

Following commit 7ba5320baa32 ("net/mlx5: fix link status behavior")
The initial link status is no longer set as part of the port start.

When LSC interrupts are enabled, ethdev layer reads the link status
directly from the device data instead of using the PMD callback.
This may cause application to query the link as down while in fact it was
already up before the DPDK application start (and no interrupt to fix
it).

Fixes: 7ba5320baa32 ("net/mlx5: fix link status behavior")
Cc: nelio.laranjeiro@6wind.com

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---

On v2:
 - Reworded commit log.
 - Cleared the wait_to_complete on the link update call.

---
 drivers/net/mlx5/mlx5.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index cfab558979..3d222df707 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -991,6 +991,12 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 		DRV_LOG(DEBUG, "port %u forcing Ethernet interface up",
 			eth_dev->data->port_id);
 		mlx5_set_link_up(eth_dev);
+		/*
+		 * Even though the interrupt handler is not installed yet,
+		 * interrupts will still trigger on the asyn_fd from
+		 * Verbs context returned by ibv_open_device().
+		 */
+		mlx5_link_update(eth_dev, 0);
 		/* Store device configuration on private structure. */
 		priv->config = config;
 		continue;
-- 
2.12.0

  parent reply	other threads:[~2018-04-10  6:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03  4:48 [dpdk-dev] [PATCH] " Shahaf Shuler
2018-04-04  7:30 ` Nélio Laranjeiro
2018-04-04  9:58   ` Shahaf Shuler
2018-04-04 12:10     ` Nélio Laranjeiro
2018-04-05  5:35       ` Shahaf Shuler
2018-04-05  6:51         ` Nélio Laranjeiro
2018-04-08 13:09           ` Shahaf Shuler
2018-04-09  8:27             ` Nélio Laranjeiro
2018-04-09 12:28               ` Shahaf Shuler
2018-04-09 13:26                 ` Nélio Laranjeiro
2018-04-09 14:07                   ` Nélio Laranjeiro
2018-04-10  6:13 ` Shahaf Shuler [this message]
2018-04-10  8:17   ` [dpdk-dev] [PATCH v2] " Nélio Laranjeiro
2018-04-11  9:05     ` Shahaf Shuler

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=20180410061336.49844-1-shahafs@mellanox.com \
    --to=shahafs@mellanox.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=nelio.laranjeiro@6wind.com \
    --cc=yskoh@mellanox.com \
    /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).