Lines Matching defs:mdev
755 struct mlx4_ib_dev *mdev = to_mdev(ibdev);
756 struct mlx4_ib_iboe *iboe = &mdev->iboe;
761 int is_bonded = mlx4_is_bonded(mdev->dev);
763 mailbox = mlx4_alloc_cmd_mailbox(mdev->dev);
767 err = mlx4_cmd_box(mdev->dev, 0, mailbox->dma, port, 0,
780 props->gid_tbl_len = mdev->dev->caps.gid_table_len[port];
781 props->max_msg_sz = mdev->dev->caps.max_msg_sz;
782 if (mdev->dev->caps.pkey_table_len[port])
808 mlx4_free_cmd_mailbox(mdev->dev, mailbox);
939 static void mlx4_init_sl2vl_tbl(struct mlx4_ib_dev *mdev)
945 for (i = 1; i <= mdev->dev->caps.num_ports; i++) {
946 if (mdev->dev->caps.port_type[i] == MLX4_PORT_TYPE_ETH)
948 err = mlx4_ib_query_sl2vl(&mdev->ib_dev, i, &sl2vl);
954 atomic64_set(&mdev->sl2vl[i - 1], sl2vl);
1062 struct mlx4_ib_dev *mdev = to_mdev(ibdev);
1063 u8 is_eth = mdev->dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH;
1075 mutex_lock(&mdev->cap_mask_mutex);
1084 err = mlx4_ib_SET_PORT(mdev, port,
1268 struct mlx4_ib_dev *mdev = to_mdev(ibqp->device);
1276 if (mlx4_ib_add_mc(mdev, mqp, gid)) {
1304 int mlx4_ib_add_mc(struct mlx4_ib_dev *mdev, struct mlx4_ib_qp *mqp,
1313 spin_lock_bh(&mdev->iboe.lock);
1314 ndev = mdev->iboe.netdevs[mqp->port - 1];
1316 spin_unlock_bh(&mdev->iboe.lock);
1483 struct mlx4_ib_dev *mdev,
1508 ret = parse_flow_attr(mdev->dev, 0, &ib_spec,
1529 struct mlx4_ib_dev *mdev = to_mdev(qp->device);
1539 if (mlx4_map_sw_to_hw_steering_mode(mdev->dev, flow_type) < 0)
1542 mailbox = mlx4_alloc_cmd_mailbox(mdev->dev);
1548 ctrl->type = mlx4_map_sw_to_hw_steering_mode(mdev->dev, flow_type);
1558 mdev, qp, default_table + default_flow,
1561 mlx4_free_cmd_mailbox(mdev->dev, mailbox);
1567 ret = parse_flow_attr(mdev->dev, qp->qp_num, ib_flow,
1570 mlx4_free_cmd_mailbox(mdev->dev, mailbox);
1577 if (mlx4_is_master(mdev->dev) && flow_type == MLX4_FS_REGULAR &&
1587 ret = mlx4_cmd_imm(mdev->dev, mailbox->dma, reg_id, size >> 2, 0,
1597 mlx4_free_cmd_mailbox(mdev->dev, mailbox);
1816 struct mlx4_ib_dev *mdev = to_mdev(flow_id->qp->device);
1820 err = __mlx4_ib_destroy_flow(mdev->dev, mflow->reg_id[i].id);
1824 err = __mlx4_ib_destroy_flow(mdev->dev,
1839 struct mlx4_ib_dev *mdev = to_mdev(ibqp->device);
1840 struct mlx4_dev *dev = mdev->dev;
1846 if (mdev->dev->caps.steering_mode ==
1853 err = mlx4_multicast_attach(mdev->dev, &mqp->mqp, gid->raw, mqp->port,
1864 err = mlx4_multicast_attach(mdev->dev, &mqp->mqp, gid->raw,
1887 mlx4_multicast_detach(mdev->dev, &mqp->mqp, gid->raw,
1890 mlx4_multicast_detach(mdev->dev, &mqp->mqp, gid->raw,
1917 struct mlx4_ib_dev *mdev = to_mdev(ibqp->device);
1918 struct mlx4_dev *dev = mdev->dev;
1925 if (mdev->dev->caps.steering_mode ==
1945 err = mlx4_multicast_detach(mdev->dev, &mqp->mqp, gid->raw,
1951 err = mlx4_multicast_detach(mdev->dev, &mqp->mqp, gid->raw,
1960 spin_lock_bh(&mdev->iboe.lock);
1961 ndev = ge->added ? mdev->iboe.netdevs[ge->port - 1] : NULL;
1963 spin_unlock_bh(&mdev->iboe.lock);
2479 struct mlx4_ib_dev *mdev = to_mdev(ibdev);
2486 if (mdev->dev->caps.flags & MLX4_DEV_CAP_FLAG_IBOE)
2488 if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_ROCE_V1_V2)
2615 struct mlx4_dev *dev = madev->mdev;
2943 int mlx4_ib_steer_qp_reg(struct mlx4_ib_dev *mdev, struct mlx4_ib_qp *mqp,
2972 return __mlx4_ib_destroy_flow(mdev->dev, mqp->reg_id);
2978 struct mlx4_dev *dev = madev->mdev;
3166 void mlx4_ib_sl2vl_update(struct mlx4_ib_dev *mdev, int port)
3171 err = mlx4_ib_query_sl2vl(&mdev->ib_dev, port, &sl2vl);
3177 atomic64_set(&mdev->sl2vl[port - 1], sl2vl);
3183 struct mlx4_ib_dev *mdev = ew->ib_dev;
3186 mlx4_ib_sl2vl_update(mdev, port);