[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6711898d-915b-b799-e9dd-2b1c1ee3ec34@grimberg.me>
Date: Sun, 13 Aug 2023 16:49:18 +0300
From: Sagi Grimberg <sagi@...mberg.me>
To: Aurelien Aptel <aaptel@...dia.com>, linux-nvme@...ts.infradead.org,
netdev@...r.kernel.org, hch@....de, kbusch@...nel.org, axboe@...com,
chaitanyak@...dia.com, davem@...emloft.net, kuba@...nel.org
Cc: Yoray Zack <yorayz@...dia.com>, aurelien.aptel@...il.com,
smalin@...dia.com, malin1024@...il.com, ogerlitz@...dia.com,
borisp@...dia.com, galshalom@...dia.com, mgurtovoy@...dia.com
Subject: Re: [PATCH v12 09/26] nvme-tcp: RX DDGST offload
On 8/10/23 17:48, Aurelien Aptel wrote:
> Sagi Grimberg <sagi@...mberg.me> writes:
>> grr.. wondering if this is something we want to support (crc without
>> ddp).
>
> We agree, we don't want to support it. We will remove it and check it
> doesn't happen in is_netdev_offload_active().
>
>>> + req->ddp.sg_table.sgl = req->ddp.first_sgl;
>> Why is this assignment needed? why not pass req->ddp.first_sgl ?
>
> Correct, this assignment is not needed we will remove it.
>
>>> static void nvme_tcp_error_recovery(struct nvme_ctrl *ctrl)
>>> @@ -1047,7 +1126,8 @@ static int nvme_tcp_recv_pdu(struct nvme_tcp_queue *queue, struct sk_buff *skb,
>>> size_t rcv_len = min_t(size_t, *len, queue->pdu_remaining);
>>> int ret;
>>>
>>> - if (test_bit(NVME_TCP_Q_OFF_DDP, &queue->flags))
>>> + if (test_bit(NVME_TCP_Q_OFF_DDP, &queue->flags) ||
>>> + test_bit(NVME_TCP_Q_OFF_DDGST_RX, &queue->flags))
>>
>> This now becomes two atomic bitops to check for each capability, where
>> its more likely that neighther are on...
>>
>> Is this really racing with anything? maybe just check with bitwise AND?
>> or a local variable (or struct member)
>> I don't think that we should add any more overhead for the normal path
>> than we already have.
>
> Are you sure test_bit() is atomic? The underlying definitions seems
> non-atomic (constant_test_bit or const_test_bit), are we missing
> anything?
Hmm, no you're right.
This makes me wonder if we have some places to convert test_bit to
test_bit_acquire where we must not make forward progress.
This particular condition is fine I think...
Powered by blists - more mailing lists