path: root/drivers/net/mlx5/mlx5.h
diff options
authorViacheslav Ovsiienko <>2019-06-06 12:23:01 +0000
committerFerruh Yigit <>2019-06-14 00:01:06 +0900
commite28111ac9864af09e826241a915dfff87a9c00ad (patch)
tree33b8f0ad1b3bf9b2a87501d44791e8cf8af448f3 /drivers/net/mlx5/mlx5.h
parent35c090eac1c6fcb2f2a80c274b519fbb304686d3 (diff)
net/mlx5: fix master device Netlink socket sharing
There is the patch [1] that uses master device Netlink socket to retrieve master device link settings. This is not thread safe because this resource may be in use by other call to the master device itself. Using the same Netlink socket concurrently from the multiple threads causes Netlink requests malfunction and must be eliminated. The patch replaces master Netlink socket with the socket from representor device. [1] Fixes: 0333b2f584d9 ("net/mlx5: inherit master link settings for representors") Cc: Signed-off-by: Viacheslav Ovsiienko <> Acked-by: Shahaf Shuler <>
Diffstat (limited to 'drivers/net/mlx5/mlx5.h')
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index f779b46..a3689c8 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -406,9 +406,15 @@ int mlx5_proc_priv_init(struct rte_eth_dev *dev);
/* mlx5_ethdev.c */
int mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[IF_NAMESIZE]);
+int mlx5_get_ifname_base(const struct rte_eth_dev *base,
+ const struct rte_eth_dev *dev,
+ char (*ifname)[IF_NAMESIZE]);
int mlx5_get_master_ifname(const char *ibdev_path, char (*ifname)[IF_NAMESIZE]);
unsigned int mlx5_ifindex(const struct rte_eth_dev *dev);
int mlx5_ifreq(const struct rte_eth_dev *dev, int req, struct ifreq *ifr);
+int mlx5_ifreq_base(const struct rte_eth_dev *base,
+ const struct rte_eth_dev *dev,
+ int req, struct ifreq *ifr);
int mlx5_get_mtu(struct rte_eth_dev *dev, uint16_t *mtu);
int mlx5_set_flags(struct rte_eth_dev *dev, unsigned int keep,
unsigned int flags);