From: bharat@chelsio.com (Potnuri Bharat Teja)
Subject: [PATCH] nvme-tcp: Use protocol specific operations while reading socket
Date: Wed, 24 Jul 2019 11:58:38 +0530 [thread overview]
Message-ID: <20190724062836.GA25058@chelsio.com> (raw)
In-Reply-To: <20190708095200.15921-1-bharat@chelsio.com>
On Monday, July 07/08/19, 2019@15:22:00 +0530, Potnuri Bharat Teja wrote:
> Using socket specific read_sock() calls instead of directly calling
> tcp_read_sock() helps lld module registered handlers if any, to be called
> from nvme-tcp host.
> This patch therefore replaces the tcp_read_sock() with socket specific
> prot_ops.
>
> Signed-off-by: Potnuri Bharat Teja <bharat at chelsio.com>
> Acked-by: Sagi Grimberg <sagi at grimberg.me>
> ---
Hi Sagi/Christoph,
Can this be queued for rc?
Thanks,
Bharat
> drivers/nvme/host/tcp.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
> index 08a2501b9357..6ba667e62b75 100644
> --- a/drivers/nvme/host/tcp.c
> +++ b/drivers/nvme/host/tcp.c
> @@ -1016,14 +1016,15 @@ static int nvme_tcp_try_send(struct nvme_tcp_queue *queue)
>
> static int nvme_tcp_try_recv(struct nvme_tcp_queue *queue)
> {
> - struct sock *sk = queue->sock->sk;
> + struct socket *sock = queue->sock;
> + struct sock *sk = sock->sk;
> read_descriptor_t rd_desc;
> int consumed;
>
> rd_desc.arg.data = queue;
> rd_desc.count = 1;
> lock_sock(sk);
> - consumed = tcp_read_sock(sk, &rd_desc, nvme_tcp_recv_skb);
> + consumed = sock->ops->read_sock(sk, &rd_desc, nvme_tcp_recv_skb);
> release_sock(sk);
> return consumed;
> }
> --
> 2.18.0.232.gb7bd9486b055
>
next prev parent reply other threads:[~2019-07-24 6:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-08 9:52 [PATCH] nvme-tcp: Use protocol specific operations while reading socket Potnuri Bharat Teja
2019-07-24 6:28 ` Potnuri Bharat Teja [this message]
2019-07-24 6:33 ` Christoph Hellwig
2019-07-24 6:58 ` Potnuri Bharat Teja
2019-07-24 7:01 ` Christoph Hellwig
2019-07-24 7:02 ` Potnuri Bharat Teja
2019-07-24 18:16 ` Sagi Grimberg
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=20190724062836.GA25058@chelsio.com \
--to=bharat@chelsio.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox