LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Long Li <longli@microsoft.com>
Cc: Steve French <sfrench@samba.org>,
	CIFS <linux-cifs@vger.kernel.org>,
	samba-technical <samba-technical@lists.samba.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] cifs:smbd Use the correct DMA direction when sending data
Date: Tue, 14 May 2019 23:16:06 -0500	[thread overview]
Message-ID: <CAH2r5ms4vU9PXceAemvzw2mQ1feTaKB_DbUHc72VZ8-Gb+X46A@mail.gmail.com> (raw)
In-Reply-To: <1557806489-11272-2-git-send-email-longli@linuxonhyperv.com>

merged both patches into cifs-2.6.git for-next

On Mon, May 13, 2019 at 11:02 PM <longli@linuxonhyperv.com> wrote:
>
> From: Long Li <longli@microsoft.com>
>
> When sending data, use the DMA_TO_DEVICE to map buffers. Also log the number
> of requests in a compounding request from upper layer.
>
> Signed-off-by: Long Li <longli@microsoft.com>
> ---
>  fs/cifs/smbdirect.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/fs/cifs/smbdirect.c b/fs/cifs/smbdirect.c
> index 251ef1223206..caac37b1de8c 100644
> --- a/fs/cifs/smbdirect.c
> +++ b/fs/cifs/smbdirect.c
> @@ -903,7 +903,7 @@ static int smbd_create_header(struct smbd_connection *info,
>         request->sge[0].addr = ib_dma_map_single(info->id->device,
>                                                  (void *)packet,
>                                                  header_length,
> -                                                DMA_BIDIRECTIONAL);
> +                                                DMA_TO_DEVICE);
>         if (ib_dma_mapping_error(info->id->device, request->sge[0].addr)) {
>                 mempool_free(request, info->request_mempool);
>                 rc = -EIO;
> @@ -1005,7 +1005,7 @@ static int smbd_post_send_sgl(struct smbd_connection *info,
>         for_each_sg(sgl, sg, num_sgs, i) {
>                 request->sge[i+1].addr =
>                         ib_dma_map_page(info->id->device, sg_page(sg),
> -                              sg->offset, sg->length, DMA_BIDIRECTIONAL);
> +                              sg->offset, sg->length, DMA_TO_DEVICE);
>                 if (ib_dma_mapping_error(
>                                 info->id->device, request->sge[i+1].addr)) {
>                         rc = -EIO;
> @@ -2110,8 +2110,10 @@ int smbd_send(struct TCP_Server_Info *server,
>                 goto done;
>         }
>
> -       rqst_idx = 0;
> +       log_write(INFO, "num_rqst=%d total length=%u\n",
> +                       num_rqst, remaining_data_length);
>
> +       rqst_idx = 0;
>  next_rqst:
>         rqst = &rqst_array[rqst_idx];
>         iov = rqst->rq_iov;
> --
> 2.17.1
>


-- 
Thanks,

Steve

  parent reply	other threads:[~2019-05-15  4:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-14  4:01 [PATCH 1/2] cifs:smbd When reconnecting to server, call smbd_destroy() after all MIDs have been called longli
2019-05-14  4:01 ` [PATCH 2/2] cifs:smbd Use the correct DMA direction when sending data longli
2019-05-14 21:41   ` Pavel Shilovsky
2019-05-15  4:16   ` Steve French [this message]
2019-05-14 21:11 ` [PATCH 1/2] cifs:smbd When reconnecting to server, call smbd_destroy() after all MIDs have been called Pavel Shilovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH2r5ms4vU9PXceAemvzw2mQ1feTaKB_DbUHc72VZ8-Gb+X46A@mail.gmail.com \
    --to=smfrench@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    --subject='Re: [PATCH 2/2] cifs:smbd Use the correct DMA direction when sending data' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).