Lines Matching refs:ucmd
448 struct mlx4_ib_create_qp *ucmd) in set_user_sq_size() argument
453 if (check_shl_overflow(1, ucmd->log_sq_bb_count, &cnt) || in set_user_sq_size()
456 if (ucmd->log_sq_stride > in set_user_sq_size()
458 ucmd->log_sq_stride < MLX4_IB_MIN_SQ_STRIDE) in set_user_sq_size()
461 qp->sq.wqe_cnt = 1 << ucmd->log_sq_bb_count; in set_user_sq_size()
462 qp->sq.wqe_shift = ucmd->log_sq_stride; in set_user_sq_size()
554 struct mlx4_ib_create_qp_rss *ucmd) in set_qp_rss() argument
559 if ((ucmd->rx_hash_function == MLX4_IB_RX_HASH_FUNC_TOEPLITZ) && in set_qp_rss()
561 memcpy(rss_ctx->rss_key, ucmd->rx_hash_key, in set_qp_rss()
568 if (ucmd->rx_hash_fields_mask & ~(u64)(MLX4_IB_RX_HASH_SRC_IPV4 | in set_qp_rss()
578 ucmd->rx_hash_fields_mask); in set_qp_rss()
582 if ((ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_SRC_IPV4) && in set_qp_rss()
583 (ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_DST_IPV4)) { in set_qp_rss()
585 } else if ((ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_SRC_IPV4) || in set_qp_rss()
586 (ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_DST_IPV4)) { in set_qp_rss()
591 if ((ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_SRC_IPV6) && in set_qp_rss()
592 (ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_DST_IPV6)) { in set_qp_rss()
594 } else if ((ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_SRC_IPV6) || in set_qp_rss()
595 (ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_DST_IPV6)) { in set_qp_rss()
600 if ((ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_SRC_PORT_UDP) && in set_qp_rss()
601 (ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_DST_PORT_UDP)) { in set_qp_rss()
615 } else if ((ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_SRC_PORT_UDP) || in set_qp_rss()
616 (ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_DST_PORT_UDP)) { in set_qp_rss()
621 if ((ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_SRC_PORT_TCP) && in set_qp_rss()
622 (ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_DST_PORT_TCP)) { in set_qp_rss()
631 } else if ((ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_SRC_PORT_TCP) || in set_qp_rss()
632 (ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_DST_PORT_TCP)) { in set_qp_rss()
637 if (ucmd->rx_hash_fields_mask & MLX4_IB_RX_HASH_INNER) { in set_qp_rss()
656 struct mlx4_ib_create_qp_rss *ucmd, in create_qp_rss() argument
692 err = set_qp_rss(dev, qp->rss_ctx, init_attr, ucmd); in create_qp_rss()
714 struct mlx4_ib_create_qp_rss ucmd = {}; in _mlx4_ib_create_qp_rss() local
726 required_cmd_sz = offsetof(typeof(ucmd), reserved1) + in _mlx4_ib_create_qp_rss()
727 sizeof(ucmd.reserved1); in _mlx4_ib_create_qp_rss()
733 if (ib_copy_from_udata(&ucmd, udata, min(sizeof(ucmd), udata->inlen))) { in _mlx4_ib_create_qp_rss()
738 if (memchr_inv(ucmd.reserved, 0, sizeof(ucmd.reserved))) in _mlx4_ib_create_qp_rss()
741 if (ucmd.comp_mask || ucmd.reserved1) in _mlx4_ib_create_qp_rss()
744 if (udata->inlen > sizeof(ucmd) && in _mlx4_ib_create_qp_rss()
745 !ib_is_udata_cleared(udata, sizeof(ucmd), in _mlx4_ib_create_qp_rss()
746 udata->inlen - sizeof(ucmd))) { in _mlx4_ib_create_qp_rss()
770 err = create_qp_rss(to_mdev(pd->device), init_attr, &ucmd, qp); in _mlx4_ib_create_qp_rss()
1067 struct mlx4_ib_create_qp ucmd; in create_qp_common() local
1074 if (ib_copy_from_udata(&ucmd, udata, copy_len)) { in create_qp_common()
1079 qp->inl_recv_sz = ucmd.inl_recv_sz; in create_qp_common()
1097 qp->sq_no_prefetch = ucmd.sq_no_prefetch; in create_qp_common()
1099 err = set_user_sq_size(dev, qp, &ucmd); in create_qp_common()
1104 ib_umem_get(pd->device, ucmd.buf_addr, qp->buf_size, 0); in create_qp_common()
1121 err = mlx4_ib_db_map_user(udata, ucmd.db_addr, &qp->db); in create_qp_common()
4126 struct mlx4_ib_create_wq ucmd; in mlx4_ib_create_wq() local
4132 required_cmd_sz = offsetof(typeof(ucmd), comp_mask) + in mlx4_ib_create_wq()
4133 sizeof(ucmd.comp_mask); in mlx4_ib_create_wq()
4139 if (udata->inlen > sizeof(ucmd) && in mlx4_ib_create_wq()
4140 !ib_is_udata_cleared(udata, sizeof(ucmd), in mlx4_ib_create_wq()
4141 udata->inlen - sizeof(ucmd))) { in mlx4_ib_create_wq()
4264 struct mlx4_ib_modify_wq ucmd = {}; in mlx4_ib_modify_wq() local
4269 required_cmd_sz = offsetof(typeof(ucmd), reserved) + in mlx4_ib_modify_wq()
4270 sizeof(ucmd.reserved); in mlx4_ib_modify_wq()
4274 if (udata->inlen > sizeof(ucmd) && in mlx4_ib_modify_wq()
4275 !ib_is_udata_cleared(udata, sizeof(ucmd), in mlx4_ib_modify_wq()
4276 udata->inlen - sizeof(ucmd))) in mlx4_ib_modify_wq()
4279 if (ib_copy_from_udata(&ucmd, udata, min(sizeof(ucmd), udata->inlen))) in mlx4_ib_modify_wq()
4282 if (ucmd.comp_mask || ucmd.reserved) in mlx4_ib_modify_wq()