Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d376ab8 authored by Chuck Lever's avatar Chuck Lever Committed by Greg Kroah-Hartman
Browse files

svcrdma: Reduce max_send_sges



commit f3c1fd0ee294abd4367dfa72d89f016c682202f0 upstream.

There's no need to request a large number of send SGEs because the
inline threshold already constrains the number of SGEs per Send.

Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
Cc: Don Dutile <ddutile@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4dd911f1
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -475,10 +475,12 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)

	/* Qualify the transport resource defaults with the
	 * capabilities of this particular device */
	newxprt->sc_max_send_sges = dev->attrs.max_send_sge;
	/* transport hdr, head iovec, one page list entry, tail iovec */
	if (newxprt->sc_max_send_sges < 4) {
		pr_err("svcrdma: too few Send SGEs available (%d)\n",
	/* Transport header, head iovec, tail iovec */
	newxprt->sc_max_send_sges = 3;
	/* Add one SGE per page list entry */
	newxprt->sc_max_send_sges += svcrdma_max_req_size / PAGE_SIZE;
	if (newxprt->sc_max_send_sges > dev->attrs.max_send_sge) {
		pr_err("svcrdma: too few Send SGEs available (%d needed)\n",
		       newxprt->sc_max_send_sges);
		goto errout;
	}