Thread (37 messages) 37 messages, 6 authors, 2018-11-21

Re: [PATCH v2 14/14] nvme-tcp: add NVMe over TCP host driver

From: Sagi Grimberg <sagi@grimberg.me>
Date: 2018-11-21 22:27:21
Also in: linux-nvme, netdev

quoted
+struct nvme_tcp_send_ctx {
+	struct bio		*curr_bio;
+	struct iov_iter		iter;
+	size_t			offset;
+	size_t			data_sent;
+	enum nvme_tcp_send_state state;
+};
+
+struct nvme_tcp_recv_ctx {
+	struct iov_iter		iter;
+	struct bio		*curr_bio;
+};
I don't understand these structures.  There should only be
a bio to be send or receive, not both.  Why do we need two
curr_bio pointers?
We don't really need both...
To me it seems like both structures should just go away and
move into nvme_tcp_request ala:


	struct bio		*curr_bio;

	/* send state */
	struct iov_iter		send_iter;
	size_t			send_offset;
	enum nvme_tcp_send_state send_state;
	size_t			data_sent;

	/* receive state */
	struct iov_iter		recv_iter;
Sure, will move this.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help