diff options
-rw-r--r-- | drivers/infiniband/core/uverbs_cmd.c | 1 | ||||
-rw-r--r-- | drivers/infiniband/hw/amso1100/c2_provider.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_qp.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_qp.c | 5 | ||||
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_provider.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_verbs.c | 3 | ||||
-rw-r--r-- | include/rdma/ib_verbs.h | 5 |
8 files changed, 26 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 495c803fb11d..9e98cec6230f 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c | |||
@@ -1065,6 +1065,7 @@ ssize_t ib_uverbs_create_qp(struct ib_uverbs_file *file, | |||
1065 | attr.srq = srq; | 1065 | attr.srq = srq; |
1066 | attr.sq_sig_type = cmd.sq_sig_all ? IB_SIGNAL_ALL_WR : IB_SIGNAL_REQ_WR; | 1066 | attr.sq_sig_type = cmd.sq_sig_all ? IB_SIGNAL_ALL_WR : IB_SIGNAL_REQ_WR; |
1067 | attr.qp_type = cmd.qp_type; | 1067 | attr.qp_type = cmd.qp_type; |
1068 | attr.create_flags = 0; | ||
1068 | 1069 | ||
1069 | attr.cap.max_send_wr = cmd.max_send_wr; | 1070 | attr.cap.max_send_wr = cmd.max_send_wr; |
1070 | attr.cap.max_recv_wr = cmd.max_recv_wr; | 1071 | attr.cap.max_recv_wr = cmd.max_recv_wr; |
diff --git a/drivers/infiniband/hw/amso1100/c2_provider.c b/drivers/infiniband/hw/amso1100/c2_provider.c index 21fb46d39319..e10d27a6e145 100644 --- a/drivers/infiniband/hw/amso1100/c2_provider.c +++ b/drivers/infiniband/hw/amso1100/c2_provider.c | |||
@@ -245,6 +245,9 @@ static struct ib_qp *c2_create_qp(struct ib_pd *pd, | |||
245 | 245 | ||
246 | pr_debug("%s:%u\n", __func__, __LINE__); | 246 | pr_debug("%s:%u\n", __func__, __LINE__); |
247 | 247 | ||
248 | if (init_attr->create_flags) | ||
249 | return ERR_PTR(-EINVAL); | ||
250 | |||
248 | switch (init_attr->qp_type) { | 251 | switch (init_attr->qp_type) { |
249 | case IB_QPT_RC: | 252 | case IB_QPT_RC: |
250 | qp = kzalloc(sizeof(*qp), GFP_KERNEL); | 253 | qp = kzalloc(sizeof(*qp), GFP_KERNEL); |
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index a9fd419855cb..3eb14a52cbf2 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c | |||
@@ -421,6 +421,9 @@ static struct ehca_qp *internal_create_qp( | |||
421 | u32 swqe_size = 0, rwqe_size = 0, ib_qp_num; | 421 | u32 swqe_size = 0, rwqe_size = 0, ib_qp_num; |
422 | unsigned long flags; | 422 | unsigned long flags; |
423 | 423 | ||
424 | if (init_attr->create_flags) | ||
425 | return ERR_PTR(-EINVAL); | ||
426 | |||
424 | memset(&parms, 0, sizeof(parms)); | 427 | memset(&parms, 0, sizeof(parms)); |
425 | qp_type = init_attr->qp_type; | 428 | qp_type = init_attr->qp_type; |
426 | 429 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_qp.c b/drivers/infiniband/hw/ipath/ipath_qp.c index 6a4a5e3b78ba..812b42c500e1 100644 --- a/drivers/infiniband/hw/ipath/ipath_qp.c +++ b/drivers/infiniband/hw/ipath/ipath_qp.c | |||
@@ -747,6 +747,11 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, | |||
747 | size_t sz; | 747 | size_t sz; |
748 | struct ib_qp *ret; | 748 | struct ib_qp *ret; |
749 | 749 | ||
750 | if (init_attr->create_flags) { | ||
751 | ret = ERR_PTR(-EINVAL); | ||
752 | goto bail; | ||
753 | } | ||
754 | |||
750 | if (init_attr->cap.max_send_sge > ib_ipath_max_sges || | 755 | if (init_attr->cap.max_send_sge > ib_ipath_max_sges || |
751 | init_attr->cap.max_send_wr > ib_ipath_max_qp_wrs) { | 756 | init_attr->cap.max_send_wr > ib_ipath_max_qp_wrs) { |
752 | ret = ERR_PTR(-EINVAL); | 757 | ret = ERR_PTR(-EINVAL); |
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 31b2b5b230bd..320c25fa74b1 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -673,6 +673,9 @@ struct ib_qp *mlx4_ib_create_qp(struct ib_pd *pd, | |||
673 | struct mlx4_ib_qp *qp; | 673 | struct mlx4_ib_qp *qp; |
674 | int err; | 674 | int err; |
675 | 675 | ||
676 | if (init_attr->create_flags) | ||
677 | return ERR_PTR(-EINVAL); | ||
678 | |||
676 | switch (init_attr->qp_type) { | 679 | switch (init_attr->qp_type) { |
677 | case IB_QPT_RC: | 680 | case IB_QPT_RC: |
678 | case IB_QPT_UC: | 681 | case IB_QPT_UC: |
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c index ee9bc1456226..81b257e18bb6 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.c +++ b/drivers/infiniband/hw/mthca/mthca_provider.c | |||
@@ -540,6 +540,9 @@ static struct ib_qp *mthca_create_qp(struct ib_pd *pd, | |||
540 | struct mthca_qp *qp; | 540 | struct mthca_qp *qp; |
541 | int err; | 541 | int err; |
542 | 542 | ||
543 | if (init_attr->create_flags) | ||
544 | return ERR_PTR(-EINVAL); | ||
545 | |||
543 | switch (init_attr->qp_type) { | 546 | switch (init_attr->qp_type) { |
544 | case IB_QPT_RC: | 547 | case IB_QPT_RC: |
545 | case IB_QPT_UC: | 548 | case IB_QPT_UC: |
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 46b3b8ebcc14..7c27420c2240 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c | |||
@@ -1252,6 +1252,9 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd, | |||
1252 | u8 rq_encoded_size; | 1252 | u8 rq_encoded_size; |
1253 | /* int counter; */ | 1253 | /* int counter; */ |
1254 | 1254 | ||
1255 | if (init_attr->create_flags) | ||
1256 | return ERR_PTR(-EINVAL); | ||
1257 | |||
1255 | atomic_inc(&qps_created); | 1258 | atomic_inc(&qps_created); |
1256 | switch (init_attr->qp_type) { | 1259 | switch (init_attr->qp_type) { |
1257 | case IB_QPT_RC: | 1260 | case IB_QPT_RC: |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 40ff51244d19..c3299be41c6f 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -495,6 +495,10 @@ enum ib_qp_type { | |||
495 | IB_QPT_RAW_ETY | 495 | IB_QPT_RAW_ETY |
496 | }; | 496 | }; |
497 | 497 | ||
498 | enum ib_qp_create_flags { | ||
499 | IB_QP_CREATE_IPOIB_UD_LSO = 1 << 0, | ||
500 | }; | ||
501 | |||
498 | struct ib_qp_init_attr { | 502 | struct ib_qp_init_attr { |
499 | void (*event_handler)(struct ib_event *, void *); | 503 | void (*event_handler)(struct ib_event *, void *); |
500 | void *qp_context; | 504 | void *qp_context; |
@@ -504,6 +508,7 @@ struct ib_qp_init_attr { | |||
504 | struct ib_qp_cap cap; | 508 | struct ib_qp_cap cap; |
505 | enum ib_sig_type sq_sig_type; | 509 | enum ib_sig_type sq_sig_type; |
506 | enum ib_qp_type qp_type; | 510 | enum ib_qp_type qp_type; |
511 | enum ib_qp_create_flags create_flags; | ||
507 | u8 port_num; /* special QP types only */ | 512 | u8 port_num; /* special QP types only */ |
508 | }; | 513 | }; |
509 | 514 | ||