DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] *mlx5_get_ifname* should be protected by lock
@ 2019-08-05  6:50 He Peng
  0 siblings, 0 replies; only message in thread
From: He Peng @ 2019-08-05  6:50 UTC (permalink / raw)
  To: dev

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-08-05  6:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-05  6:50 [dpdk-dev] *mlx5_get_ifname* should be protected by lock He Peng

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).