nvme-tcp: Use protocol specific operations while reading socket
PATCH 1/1 nvme-tcp: Use protocol specific operations while reading socket
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.
--- drivers/nvme/host/tcp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/nvme/host/tcp.c +3 -2
@@ -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; }
Signature · 1 line
2.18.0.232.gb7bd9486b055
PATCH 1/1 nvme-tcp: Use protocol specific operations while reading socket
Quoted 9 lines · Potnuri Bharat Teja
Using socket specific
read_sock()calls instead of directly callingtcp_read_sock()helps lld module registered handlers if any, to be called from nvme-tcp host.
This patch therefore replaces thetcp_read_sock()with socket specificprot_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
Quoted 28 lines
drivers/nvme/host/tcp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/nvme/host/tcp.c +3
-2@@ -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; }Signature · 1 line
2.18.0.232.gb7bd9486b055
Christoph Hellwig
maintainerPATCH 1/1 nvme-tcp: Use protocol specific operations while reading socket
Quoted 7 lines · Potnuri Bharat Teja
Quoted 6 lines · Potnuri Bharat Teja
Using socket specific
read_sock()calls instead of directly callingtcp_read_sock()helps lld module registered handlers if any, to be called from nvme-tcp host.
This patch therefore replaces thetcp_read_sock()with socket specificprot_ops.
Quoted 5 lines
Quoted 3 lines
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?
How is this a -rc candidate? I was planning on queuing it up for 5.4444.
PATCH 1/1 nvme-tcp: Use protocol specific operations while reading socket
Quoted 8 lines · Christoph Hellwig
Quoted 7 lines · Potnuri Bharat Teja
Quoted 6 lines · Potnuri Bharat Teja
Using socket specific
read_sock()calls instead of directly callingtcp_read_sock()helps lld module registered handlers if any, to be called from nvme-tcp host.
This patch therefore replaces thetcp_read_sock()with socket specificprot_ops.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
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?How is this a -rc candidate? I was planning on queuing it up for 5.4444.
I believe its a trivial one, so was hoping it could get into immediate rc(rc-2). If you think otherwise I am fine with 5.4 also.
Thanks.
Christoph Hellwig
maintainerPATCH 1/1 nvme-tcp: Use protocol specific operations while reading socket
Quoted 6 lines · Potnuri Bharat Teja
Quoted 4 lines
Quoted 2 lines
Hi Sagi/Christoph,
Can this be queued for rc?How is this a -rc candidate? I was planning on queuing it up for 5.4444.
I believe its a trivial one, so was hoping it could get into immediate rc(rc-2). If you think otherwise I am fine with 5.4 also.
It does look trivial, but that isn't really the criteria for rc time inclusion, the prime criteria is if is an important bug fix.
PATCH 1/1 nvme-tcp: Use protocol specific operations while reading socket
Quoted 10 lines · Christoph Hellwig
Quoted 6 lines · Potnuri Bharat Teja
Quoted 4 lines
Quoted 2 lines
Hi Sagi/Christoph,
Can this be queued for rc?How is this a -rc candidate? I was planning on queuing it up for 5.4444.
I believe its a trivial one, so was hoping it could get into immediate rc(rc-2). If you think otherwise I am fine with 5.4 also.
It does look trivial, but that isn't really the criteria for rc time inclusion, the prime criteria is if is an important bug fix.
Agreed.
Sagi Grimberg
maintainerPATCH 1/1 nvme-tcp: Use protocol specific operations while reading socket
In reply to Christoph HellwigQuoted 10 lines
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Hi Sagi/Christoph,
Can this be queued for rc?How is this a -rc candidate? I was planning on queuing it up for 5.4444.
I believe its a trivial one, so was hoping it could get into immediate rc(rc-2). If you think otherwise I am fine with 5.4 also.
It does look trivial, but that isn't really the criteria for rc time inclusion, the prime criteria is if is an important bug fix.
Yea, this is 5.4 for sure...