* User configurable initial values for RDMA transport
  * The actual values used may be lower and are limited to hardware capabilities
  */
-/* Default maximum number of SGEs in a RDMA write/read */
+/* Default maximum number of pages in a single RDMA write/read */
 int smbd_max_frmr_depth = 2048;
 
 /* If payload is less than this byte, use RDMA send/recv not read/write */
 {
        int i;
        u32 data_length = 0;
-       struct scatterlist sgl[SMBDIRECT_MAX_SGE];
+       struct scatterlist sgl[SMBDIRECT_MAX_SEND_SGE - 1];
 
-       if (n_vec > SMBDIRECT_MAX_SGE) {
+       if (n_vec > SMBDIRECT_MAX_SEND_SGE - 1) {
                cifs_dbg(VFS, "Can't fit data to SGL, n_vec=%d\n", n_vec);
                return -EINVAL;
        }
        info->max_receive_size = smbd_max_receive_size;
        info->keep_alive_interval = smbd_keep_alive_interval;
 
-       if (info->id->device->attrs.max_send_sge < SMBDIRECT_MAX_SGE) {
+       if (info->id->device->attrs.max_send_sge < SMBDIRECT_MAX_SEND_SGE ||
+           info->id->device->attrs.max_recv_sge < SMBDIRECT_MAX_RECV_SGE) {
                log_rdma_event(ERR,
-                       "warning: device max_send_sge = %d too small\n",
-                       info->id->device->attrs.max_send_sge);
-               log_rdma_event(ERR, "Queue Pair creation may fail\n");
-       }
-       if (info->id->device->attrs.max_recv_sge < SMBDIRECT_MAX_SGE) {
-               log_rdma_event(ERR,
-                       "warning: device max_recv_sge = %d too small\n",
+                       "device %.*s max_send_sge/max_recv_sge = %d/%d too small\n",
+                       IB_DEVICE_NAME_MAX,
+                       info->id->device->name,
+                       info->id->device->attrs.max_send_sge,
                        info->id->device->attrs.max_recv_sge);
-               log_rdma_event(ERR, "Queue Pair creation may fail\n");
+               goto config_failed;
        }
 
        info->send_cq = NULL;
        qp_attr.qp_context = info;
        qp_attr.cap.max_send_wr = info->send_credit_target;
        qp_attr.cap.max_recv_wr = info->receive_credit_max;
-       qp_attr.cap.max_send_sge = SMBDIRECT_MAX_SGE;
-       qp_attr.cap.max_recv_sge = SMBDIRECT_MAX_SGE;
+       qp_attr.cap.max_send_sge = SMBDIRECT_MAX_SEND_SGE;
+       qp_attr.cap.max_recv_sge = SMBDIRECT_MAX_RECV_SGE;
        qp_attr.cap.max_inline_data = 0;
        qp_attr.sq_sig_type = IB_SIGNAL_REQ_WR;
        qp_attr.qp_type = IB_QPT_RC;
 
        /* Memory registrations */
        /* Maximum number of RDMA read/write outstanding on this connection */
        int responder_resources;
-       /* Maximum number of SGEs in a RDMA write/read */
+       /* Maximum number of pages in a single RDMA write/read on this connection */
        int max_frmr_depth;
        /*
         * If payload is less than or equal to the threshold,
        __le32 length;
 } __packed;
 
-/* Default maximum number of SGEs in a RDMA send/recv */
-#define SMBDIRECT_MAX_SGE      16
+/* Maximum number of SGEs used by smbdirect.c in any send work request */
+#define SMBDIRECT_MAX_SEND_SGE 6
+
 /* The context for a SMBD request */
 struct smbd_request {
        struct smbd_connection *info;
        struct ib_cqe cqe;
 
-       /* the SGE entries for this packet */
-       struct ib_sge sge[SMBDIRECT_MAX_SGE];
+       /* the SGE entries for this work request */
+       struct ib_sge sge[SMBDIRECT_MAX_SEND_SGE];
        int num_sge;
 
        /* SMBD packet header follows this structure */
        u8 packet[];
 };
 
+/* Maximum number of SGEs used by smbdirect.c in any receive work request */
+#define SMBDIRECT_MAX_RECV_SGE 1
+
 /* The context for a SMBD response */
 struct smbd_response {
        struct smbd_connection *info;