Re: [PATCH rdma-core] mlx4: Enable WQ creation with IBV_WQ_FLAGS_SCATTER_FCS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/28/2018 1:44 AM, Jason Gunthorpe wrote:
On Tue, Mar 27, 2018 at 12:37:22PM +0300, Yishai Hadas wrote:
From: Guy Levi <guyle@xxxxxxxxxxxx>

Enable WQ creation with the IBV_WQ_FLAGS_SCATTER_FCS flag.

Prior to using this option an application should check whether the
IBV_RAW_PACKET_CAP_SCATTER_FCS capability is set on the device's
raw_packet_caps.

Signed-off-by: Guy Levi <guyle@xxxxxxxxxxxx>
Signed-off-by: Yishai Hadas <yishaih@xxxxxxxxxxxx>

PR was sent:
https://github.com/linux-rdma/rdma-core/pull/314

  providers/mlx4/verbs.c | 8 +++++++-
  1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/providers/mlx4/verbs.c b/providers/mlx4/verbs.c
index 9d8d340..534838b 100644
+++ b/providers/mlx4/verbs.c
@@ -1422,7 +1422,13 @@ struct ibv_wq *mlx4_create_wq(struct ibv_context *context,
  		}
  	}
- if (attr->comp_mask) {
+	if (!check_comp_mask(attr->comp_mask, IBV_WQ_INIT_ATTR_FLAGS)) {
+		errno = ENOTSUP;
+		return NULL;
+	}
+
+	if ((attr->comp_mask & IBV_WQ_INIT_ATTR_FLAGS) &&
+	    (attr->create_flags & ~IBV_WQ_FLAGS_SCATTER_FCS)) {
  		errno = ENOTSUP;
  		return NULL;
  	}

I was looking at this and wondering why we dont have SCATTER_FCS in
include/uapi/rdma at all.


This may be some kernel refactoring to move it as part of other uAPI stuff to include/uapi/rdma. No change is expected in rdma-core as it's part of verbs.h which is used directly by the applications.

Re "comp_mask errno": we should go forward with ENOTSUP/EOPNOTSUPP as was lastly introduced by the ioctl series and followed by that patch.

The patch was merged.
Yishai
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux