Message ID | 1439741133-30145-3-git-send-email-eranbe@mellanox.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On Sun, Aug 16, 2015 at 07:05:28PM +0300, Eran Ben Elisha wrote: > - if (attr.create_flags) { > + if (attr.create_flags & ~IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK) { > ret = -EINVAL; > goto err_put; Shouldn't EINVAL still happen if the driver doesn't support this feature? Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Aug 17, 2015 at 7:47 PM, Jason Gunthorpe <jgunthorpe@obsidianresearch.com> wrote: > On Sun, Aug 16, 2015 at 07:05:28PM +0300, Eran Ben Elisha wrote: > >> - if (attr.create_flags) { >> + if (attr.create_flags & ~IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK) { >> ret = -EINVAL; >> goto err_put; > > Shouldn't EINVAL still happen if the driver doesn't support this > feature? > > Jason I expect the same behavior as if ib_create_qp was called with IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK in the create_flags. This is not a new flag, and driver should fail the command if not supported. Eran. > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 2bac2f1..f3ea3ed 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -1823,7 +1823,7 @@ static int create_qp(struct ib_uverbs_file *file, sizeof(cmd->create_flags)) attr.create_flags = cmd->create_flags; - if (attr.create_flags) { + if (attr.create_flags & ~IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK) { ret = -EINVAL; goto err_put; }
Allow setting IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK at create_flags in ib_uverbs_create_qp_ex. Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com> --- drivers/infiniband/core/uverbs_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)