qp.c (d97099fe53ed9ab8b17d084bed0099feb08a48c1) | qp.c (33023fb85a42b53bf778bc025f9667b582282be4) |
---|---|
1/* 2 * Copyright(c) 2016, 2017 Intel Corporation. 3 * 4 * This file is provided under a dual BSD/GPLv2 license. When using or 5 * redistributing this file, you may do so under either license. 6 * 7 * GPL LICENSE SUMMARY 8 * --- 766 unchanged lines hidden (view full) --- 775 struct ib_qp *ret = ERR_PTR(-ENOMEM); 776 struct rvt_dev_info *rdi = ib_to_rvt(ibpd->device); 777 void *priv = NULL; 778 size_t sqsize; 779 780 if (!rdi) 781 return ERR_PTR(-EINVAL); 782 | 1/* 2 * Copyright(c) 2016, 2017 Intel Corporation. 3 * 4 * This file is provided under a dual BSD/GPLv2 license. When using or 5 * redistributing this file, you may do so under either license. 6 * 7 * GPL LICENSE SUMMARY 8 * --- 766 unchanged lines hidden (view full) --- 775 struct ib_qp *ret = ERR_PTR(-ENOMEM); 776 struct rvt_dev_info *rdi = ib_to_rvt(ibpd->device); 777 void *priv = NULL; 778 size_t sqsize; 779 780 if (!rdi) 781 return ERR_PTR(-EINVAL); 782 |
783 if (init_attr->cap.max_send_sge > rdi->dparms.props.max_sge || | 783 if (init_attr->cap.max_send_sge > rdi->dparms.props.max_send_sge || |
784 init_attr->cap.max_send_wr > rdi->dparms.props.max_qp_wr || 785 init_attr->create_flags) 786 return ERR_PTR(-EINVAL); 787 788 /* Check receive queue parameters if no SRQ is specified. */ 789 if (!init_attr->srq) { | 784 init_attr->cap.max_send_wr > rdi->dparms.props.max_qp_wr || 785 init_attr->create_flags) 786 return ERR_PTR(-EINVAL); 787 788 /* Check receive queue parameters if no SRQ is specified. */ 789 if (!init_attr->srq) { |
790 if (init_attr->cap.max_recv_sge > rdi->dparms.props.max_sge || | 790 if (init_attr->cap.max_recv_sge > 791 rdi->dparms.props.max_recv_sge || |
791 init_attr->cap.max_recv_wr > rdi->dparms.props.max_qp_wr) 792 return ERR_PTR(-EINVAL); 793 794 if (init_attr->cap.max_send_sge + 795 init_attr->cap.max_send_wr + 796 init_attr->cap.max_recv_sge + 797 init_attr->cap.max_recv_wr == 0) 798 return ERR_PTR(-EINVAL); --- 1668 unchanged lines hidden --- | 792 init_attr->cap.max_recv_wr > rdi->dparms.props.max_qp_wr) 793 return ERR_PTR(-EINVAL); 794 795 if (init_attr->cap.max_send_sge + 796 init_attr->cap.max_send_wr + 797 init_attr->cap.max_recv_sge + 798 init_attr->cap.max_recv_wr == 0) 799 return ERR_PTR(-EINVAL); --- 1668 unchanged lines hidden --- |