lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 25 Nov 2018 01:13:00 -0800
From:   Sagi Grimberg <sagi@...mberg.me>
To:     Christoph Hellwig <hch@....de>
Cc:     linux-nvme@...ts.infradead.org, linux-block@...r.kernel.org,
        netdev@...r.kernel.org, Keith Busch <keith.busch@...el.com>,
        "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH v3 11/13] nvmet-tcp: add NVMe over TCP target driver


>> +	if (!cmd || queue->state == NVMET_TCP_Q_DISCONNECTING) {
>> +		cmd = nvmet_tcp_fetch_send_command(queue);
>> +		if (unlikely(!cmd))
>> +			return 0;
>> +	}
>> +
>> +	if (cmd->state == NVMET_TCP_SEND_DATA_PDU) {
>> +		ret = nvmet_try_send_data_pdu(cmd);
>> +		if (ret <= 0)
>> +			goto done_send;
>> +	}
>> +
>> +	if (cmd->state == NVMET_TCP_SEND_DATA) {
>> +		ret = nvmet_try_send_data(cmd);
>> +		if (ret <= 0)
>> +			goto done_send;
>> +	}
>> +
>> +	if (cmd->state == NVMET_TCP_SEND_DDGST) {
>> +		ret = nvmet_try_send_ddgst(cmd);
>> +		if (ret <= 0)
>> +			goto done_send;
>> +	}
>> +
>> +	if (cmd->state == NVMET_TCP_SEND_R2T) {
>> +		ret = nvmet_try_send_r2t(cmd, last_in_batch);
>> +		if (ret <= 0)
>> +			goto done_send;
>> +	}
>> +
>> +	if (cmd->state == NVMET_TCP_SEND_RESPONSE)
>> +		ret = nvmet_try_send_response(cmd, last_in_batch);
> 
> Use a switch statement?

The intent would be such that the state would transition with
the progression of the routine...

...

The rest of the comments will be addressed in the next submission..

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ