[v4,06/19] vhost: define postcopy protocol flag

Message ID 20181008152557.14275-7-maxime.coquelin@redhat.com (mailing list archive)
State Superseded, archived
Delegated to: Maxime Coquelin
Headers
Series vhost: add postcopy live-migration support |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK

Commit Message

Maxime Coquelin Oct. 8, 2018, 3:25 p.m. UTC
  Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
---
 lib/librte_vhost/rte_vhost.h | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Tiwei Bie Oct. 9, 2018, 11:41 a.m. UTC | #1
On Mon, Oct 08, 2018 at 05:25:44PM +0200, Maxime Coquelin wrote:
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> Acked-by: Ilya Maximets <i.maximets@samsung.com>
> ---
>  lib/librte_vhost/rte_vhost.h | 4 ++++
>  1 file changed, 4 insertions(+)

Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>

> 
> diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
> index b02673d4a..b3cc6990d 100644
> --- a/lib/librte_vhost/rte_vhost.h
> +++ b/lib/librte_vhost/rte_vhost.h
> @@ -66,6 +66,10 @@ extern "C" {
>  #define VHOST_USER_PROTOCOL_F_HOST_NOTIFIER 11
>  #endif
>  
> +#ifndef VHOST_USER_PROTOCOL_F_PAGEFAULT
> +#define VHOST_USER_PROTOCOL_F_PAGEFAULT 8
> +#endif

Do we want to keep these defines sorted? I.e. define it after
VHOST_USER_PROTOCOL_F_CRYPTO_SESSION (which is defined as 7).

> +
>  /** Indicate whether protocol features negotiation is supported. */
>  #ifndef VHOST_USER_F_PROTOCOL_FEATURES
>  #define VHOST_USER_F_PROTOCOL_FEATURES	30
> -- 
> 2.17.1
>
  
Maxime Coquelin Oct. 9, 2018, 11:47 a.m. UTC | #2
On 10/09/2018 01:41 PM, Tiwei Bie wrote:
> On Mon, Oct 08, 2018 at 05:25:44PM +0200, Maxime Coquelin wrote:
>> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
>> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>> Acked-by: Ilya Maximets <i.maximets@samsung.com>
>> ---
>>   lib/librte_vhost/rte_vhost.h | 4 ++++
>>   1 file changed, 4 insertions(+)
> 
> Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
> 
>>
>> diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
>> index b02673d4a..b3cc6990d 100644
>> --- a/lib/librte_vhost/rte_vhost.h
>> +++ b/lib/librte_vhost/rte_vhost.h
>> @@ -66,6 +66,10 @@ extern "C" {
>>   #define VHOST_USER_PROTOCOL_F_HOST_NOTIFIER 11
>>   #endif
>>   
>> +#ifndef VHOST_USER_PROTOCOL_F_PAGEFAULT
>> +#define VHOST_USER_PROTOCOL_F_PAGEFAULT 8
>> +#endif
> 
> Do we want to keep these defines sorted? I.e. define it after
> VHOST_USER_PROTOCOL_F_CRYPTO_SESSION (which is defined as 7).


Yes, makes sense.

>> +
>>   /** Indicate whether protocol features negotiation is supported. */
>>   #ifndef VHOST_USER_F_PROTOCOL_FEATURES
>>   #define VHOST_USER_F_PROTOCOL_FEATURES	30
>> -- 
>> 2.17.1
>>
  

Patch

diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
index b02673d4a..b3cc6990d 100644
--- a/lib/librte_vhost/rte_vhost.h
+++ b/lib/librte_vhost/rte_vhost.h
@@ -66,6 +66,10 @@  extern "C" {
 #define VHOST_USER_PROTOCOL_F_HOST_NOTIFIER 11
 #endif
 
+#ifndef VHOST_USER_PROTOCOL_F_PAGEFAULT
+#define VHOST_USER_PROTOCOL_F_PAGEFAULT 8
+#endif
+
 /** Indicate whether protocol features negotiation is supported. */
 #ifndef VHOST_USER_F_PROTOCOL_FEATURES
 #define VHOST_USER_F_PROTOCOL_FEATURES	30