[PATCH v4 07/18] migration/rdma: add rdma field into multifd send/recv param

Chuan Zheng posted 18 patches 5 years ago
Maintainers: "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Juan Quintela <quintela@redhat.com>
[PATCH v4 07/18] migration/rdma: add rdma field into multifd send/recv param
Posted by Chuan Zheng 5 years ago
Note we do want to export any rdma struct, take void * instead.

Signed-off-by: Chuan Zheng <zhengchuan@huawei.com>
---
 migration/multifd.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/migration/multifd.h b/migration/multifd.h
index d57756c..b17a2c1 100644
--- a/migration/multifd.h
+++ b/migration/multifd.h
@@ -108,6 +108,10 @@ typedef struct {
     QemuSemaphore sem_sync;
     /* used for compression methods */
     void *data;
+    /* used for multifd rdma */
+    void *rdma;
+    /* communication channel */
+    QEMUFile *file;
 }  MultiFDSendParams;
 
 typedef struct {
@@ -147,6 +151,10 @@ typedef struct {
     QemuSemaphore sem_sync;
     /* used for de-compression methods */
     void *data;
+    /* used for multifd rdma */
+    void *rdma;
+    /* communication channel */
+    QEMUFile *file;
 } MultiFDRecvParams;
 
 typedef struct {
-- 
1.8.3.1


Re: [PATCH v4 07/18] migration/rdma: add rdma field into multifd send/recv param
Posted by Dr. David Alan Gilbert 5 years ago
* Chuan Zheng (zhengchuan@huawei.com) wrote:
> Note we do want to export any rdma struct, take void * instead.

You don't need to make this a void *; add a typedef struct RDMAContext
into include/qemu/typedefs.h  and then you can use the right type here
without actually exporting the interesting contents of the type or
being dependent on rdma being built.

Dave

> Signed-off-by: Chuan Zheng <zhengchuan@huawei.com>
> ---
>  migration/multifd.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/migration/multifd.h b/migration/multifd.h
> index d57756c..b17a2c1 100644
> --- a/migration/multifd.h
> +++ b/migration/multifd.h
> @@ -108,6 +108,10 @@ typedef struct {
>      QemuSemaphore sem_sync;
>      /* used for compression methods */
>      void *data;
> +    /* used for multifd rdma */
> +    void *rdma;
> +    /* communication channel */
> +    QEMUFile *file;
>  }  MultiFDSendParams;
>  
>  typedef struct {
> @@ -147,6 +151,10 @@ typedef struct {
>      QemuSemaphore sem_sync;
>      /* used for de-compression methods */
>      void *data;
> +    /* used for multifd rdma */
> +    void *rdma;
> +    /* communication channel */
> +    QEMUFile *file;
>  } MultiFDRecvParams;
>  
>  typedef struct {
> -- 
> 1.8.3.1
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


Re: [PATCH v4 07/18] migration/rdma: add rdma field into multifd send/recv param
Posted by Zheng Chuan 4 years, 11 months ago

On 2021/2/4 2:32, Dr. David Alan Gilbert wrote:
> * Chuan Zheng (zhengchuan@huawei.com) wrote:
>> Note we do want to export any rdma struct, take void * instead.
> 
> You don't need to make this a void *; add a typedef struct RDMAContext
> into include/qemu/typedefs.h  and then you can use the right type here
> without actually exporting the interesting contents of the type or
> being dependent on rdma being built.
> 
> Dave
>

OK, good to know it, will do it in v5.

>> Signed-off-by: Chuan Zheng <zhengchuan@huawei.com>
>> ---
>>  migration/multifd.h | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/migration/multifd.h b/migration/multifd.h
>> index d57756c..b17a2c1 100644
>> --- a/migration/multifd.h
>> +++ b/migration/multifd.h
>> @@ -108,6 +108,10 @@ typedef struct {
>>      QemuSemaphore sem_sync;
>>      /* used for compression methods */
>>      void *data;
>> +    /* used for multifd rdma */
>> +    void *rdma;
>> +    /* communication channel */
>> +    QEMUFile *file;
>>  }  MultiFDSendParams;
>>  
>>  typedef struct {
>> @@ -147,6 +151,10 @@ typedef struct {
>>      QemuSemaphore sem_sync;
>>      /* used for de-compression methods */
>>      void *data;
>> +    /* used for multifd rdma */
>> +    void *rdma;
>> +    /* communication channel */
>> +    QEMUFile *file;
>>  } MultiFDRecvParams;
>>  
>>  typedef struct {
>> -- 
>> 1.8.3.1
>>

-- 
Regards.
Chuan