diff options
author | Eli Cohen <eli@dev.mellanox.co.il> | 2008-04-17 00:09:27 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-17 00:09:27 -0400 |
commit | b846f25aa2a353355aec5202fe4dbdc6674dfc64 (patch) | |
tree | 2daf137a2974c1ced5363020e88057c802cea5a5 /drivers/infiniband/hw/ipath/ipath_qp.c | |
parent | d84e0b28d3a0b41fc574ea50d60522ae0fba75f4 (diff) |
IB/core: Add creation flags to struct ib_qp_init_attr
Add a create_flags member to struct ib_qp_init_attr that will allow a
kernel verbs consumer to create a pass special flags when creating a QP.
Add a flag value for telling low-level drivers that a QP will be used
for IPoIB UD LSO. The create_flags member will also be useful for XRC
and ehca low-latency QP support.
Since no create_flags handling is implemented yet, add code to all
low-level drivers to return -EINVAL if create_flags is non-zero.
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_qp.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_qp.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); |