hi

On Sun, Sep 27, 2015 at 5:49 PM, Thibaut Collet
<thibaut.col...@6wind.com> wrote:
> Maybe a solution like that is clearer ?
>
> -#define VHOST_USER_PROTOCOL_FEATURE_MASK 0x7ULL
> -#define VHOST_USER_PROTOCOL_F_MQ 0
> -#define VHOST_USER_PROTOCOL_F_LOG_SHMFD 1
> -#define VHOST_USER_PROTOCOL_F_RARP 2
> +typedef enum VhostUserProtocolFeature {
> +VHOST_USER_PROTOCOL_F_MQ = 0,
> +VHOST_USER_PROTOCOL_F_LOG_SHMFD = 1,
> +VHOST_USER_PROTOCOL_F_RARP = 2,
> +VHOST_USER_PROTOCOL_F_MAX
> +} VhostUserProtocolFeature ;
>
> +#define VHOST_USER_PROTOCOL_FEATURE_MASK ((1 << VHOST_USER_PROTOCOL_F_MAX) - 
> 1)


I agree with that, I don't see a good reason to keep the defines.

-- 
Marc-André Lureau

Reply via email to