qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 08/52] migration/rdma: Fix qemu_rdma_accept() to return failu


From: Markus Armbruster
Subject: Re: [PATCH 08/52] migration/rdma: Fix qemu_rdma_accept() to return failure on errors
Date: Thu, 28 Sep 2023 12:53:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

"Zhijian Li (Fujitsu)" <lizhijian@fujitsu.com> writes:

> On 18/09/2023 22:41, Markus Armbruster wrote:
>> qemu_rdma_accept() returns 0 in some cases even when it didn't
>> complete its job due to errors.  Impact is not obvious.  I figure the
>> caller will soon fail again with a misleading error message.
>> 
>> Fix it to return -1 on any failure.
>> 
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>
> I noticed that ret initialization is also meaningless in qemu_rdma_accept()
>
> 3354 static int qemu_rdma_accept(RDMAContext *rdma)
> 3355 {
> 3356     RDMACapabilities cap;
> 3357     struct rdma_conn_param conn_param = {
> 3358                                             .responder_resources = 2,
> 3359                                             .private_data = &cap,
> 3360                                             .private_data_len = 
> sizeof(cap),
> 3361                                          };
> 3362     RDMAContext *rdma_return_path = NULL;
> 3363     struct rdma_cm_event *cm_event;
> 3364     struct ibv_context *verbs;
> 3365     int ret = -EINVAL;     <<<<< drop it ?
> 3366     int idx;

PATCH 27 will drop it.

> Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>

Thanks!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]