From: He Peng <xnhp0320@icloud.com>
To: dev@dpdk.org
Subject: [dpdk-dev] *mlx5_get_ifname* should be protected by lock
Date: Mon, 05 Aug 2019 06:50:59 GMT [thread overview]
Message-ID: <55d89397-f2ac-4fee-bb11-d044c2d43113@me.com> (raw)
Hi,
In dpdk 16.11, most of mlnx device APIs except RX/TX are protected by a private lock. In DPDK 18.11, these locks are removed, from the code it seems this is due to all APIs will create a disposable socket and the socket will be used to set/get specific device features, and will be closed at the end of API call.
However, as we observe that in DPDK 1811, many APIs will call *mlx5_get_ifname* which might reuse a pre-created socket as the code shows:
int
mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[IF_NAMESIZE])
{
struct priv *priv = dev->data->dev_private;
unsigned int ifindex =
priv->nl_socket_rdma >= 0 ?
mlx5_nl_ifindex(priv->nl_socket_rdma, priv->ibdev_name) : 0;
So, we think at least the call to mlx5_get_ifname should be protected by a lock, and we do have experienced that the calling to API hangs in our code. Thus we report this to the community and seek if there are some other limitations on the usage of mlx5 APIs.
Thanks.
reply other threads:[~2019-08-05 6:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=55d89397-f2ac-4fee-bb11-d044c2d43113@me.com \
--to=xnhp0320@icloud.com \
--cc=dev@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).