On Mon, Mar 06, 2017 at 09:27:35AM +0100, Maxime Coquelin wrote:
> +static int
> +vhost_user_net_set_mtu(struct virtio_net *dev, struct VhostUserMsg *msg)
> +{
> +     if (msg->payload.u64 < VIRTIO_MIN_MTU ||
> +                     msg->payload.u64 > VIRTIO_MAX_MTU) {
> +             RTE_LOG(ERR, VHOST_CONFIG, "Invalid MTU size (%lu)\n",
> +                             msg->payload.u64);

This (%lu) would break the 32-bit OS build.

> +
> +             return -1;
> +     }
> +
> +     dev->mtu = (uint16_t)msg->payload.u64;

Besides, the cast seems unnecessary.

        --yliu

Reply via email to