[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f9c45756-b823-7cab-213c-761866230c96@gmail.com>
Date: Wed, 17 Feb 2021 10:00:59 -0700
From: David Ahern <dsahern@...il.com>
To: Or Gerlitz <gerlitz.or@...il.com>
Cc: Boris Pismenny <borisp@...lanox.com>,
Jakub Kicinski <kuba@...nel.org>,
David Miller <davem@...emloft.net>,
Saeed Mahameed <saeedm@...dia.com>,
Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>, axboe@...com,
Keith Busch <kbusch@...nel.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Eric Dumazet <edumazet@...gle.com>, smalin@...vell.com,
boris.pismenny@...il.com, linux-nvme@...ts.infradead.org,
Linux Netdev List <netdev@...r.kernel.org>,
benishay@...dia.com, Or Gerlitz <ogerlitz@...dia.com>,
yorayz@...dia.com, Ben Ben-Ishay <benishay@...lanox.com>,
Or Gerlitz <ogerlitz@...lanox.com>,
Yoray Zack <yorayz@...lanox.com>
Subject: Re: [PATCH v4 net-next 07/21] nvme-tcp: Add DDP data-path
On 2/17/21 7:01 AM, Or Gerlitz wrote:
>>> @@ -1136,6 +1265,10 @@ static int nvme_tcp_try_send_cmd_pdu(struct nvme_tcp_request *req)
>>> else
>>> flags |= MSG_EOR;
>>>
>>> + if (test_bit(NVME_TCP_Q_OFF_DDP, &queue->flags) &&
>>> + blk_rq_nr_phys_segments(rq) && rq_data_dir(rq) == READ)
>>> + nvme_tcp_setup_ddp(queue, pdu->cmd.common.command_id, rq);
>>> +
>>
>> For consistency, shouldn't this be wrapped in the CONFIG_TCP_DDP check too?
>
> We tried to avoid the wrapping in some places where it was
> possible to do without adding confusion, this one is a good
> example IMOH.
>
>
The above (and other locations like it) can easily be put into a helper
that has logic when the CONFIG is enabled and compiles out when not.
Consistency makes for simpler, cleaner code for optional features.
Powered by blists - more mailing lists