summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_ethdev.c
diff options
context:
space:
mode:
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>2019-03-27 13:15:42 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-03-29 17:25:32 +0100
commitd485cdca01297c626cd4a9cd444fcf6596f167cd (patch)
tree4b3e800b2cd53766ec2ca00968113473cb624152 /drivers/net/mlx5/mlx5_ethdev.c
parent1b782252cb21741fd5adf53068904979cf8189d8 (diff)
downloaddpdk-next-eventdev-d485cdca01297c626cd4a9cd444fcf6596f167cd.zip
dpdk-next-eventdev-d485cdca01297c626cd4a9cd444fcf6596f167cd.tar.gz
dpdk-next-eventdev-d485cdca01297c626cd4a9cd444fcf6596f167cd.tar.xz
net/mlx5: switch to the shared context IB attributes
The code is updated to use the shared IB device attributes, located in the shared IB context. It saves some memory if there are representors created over the single Infiniband device with multiple ports. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_ethdev.c')
-rw-r--r--drivers/net/mlx5/mlx5_ethdev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 0662594..7003c32 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -515,8 +515,8 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
* Since we need one CQ per QP, the limit is the minimum number
* between the two values.
*/
- max = RTE_MIN(priv->device_attr.orig_attr.max_cq,
- priv->device_attr.orig_attr.max_qp);
+ max = RTE_MIN(priv->sh->device_attr.orig_attr.max_cq,
+ priv->sh->device_attr.orig_attr.max_qp);
/* If max >= 65535 then max = 0, max_rx_queues is uint16_t. */
if (max >= 65535)
max = 65535;
@@ -577,7 +577,7 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
int mlx5_fw_version_get(struct rte_eth_dev *dev, char *fw_ver, size_t fw_size)
{
struct mlx5_priv *priv = dev->data->dev_private;
- struct ibv_device_attr *attr = &priv->device_attr.orig_attr;
+ struct ibv_device_attr *attr = &priv->sh->device_attr.orig_attr;
size_t size = strnlen(attr->fw_ver, sizeof(attr->fw_ver)) + 1;
if (fw_size < size)