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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




+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.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux