From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: Re: [PATCH v2 2/7] vhost: vhost-user: Add MTU protocol feature support Date: Sun, 12 Mar 2017 11:24:32 +0100 Message-ID: <5caaa643-4b1b-dc18-a92a-6ff4e7322ee5@redhat.com> References: <20170306082740.5675-1-maxime.coquelin@redhat.com> <20170306082740.5675-3-maxime.coquelin@redhat.com> <20170308023115.GX18844@yliu-dev.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: aconole@redhat.com, sodey@sonusnet.com, jianfeng.tan@intel.com, dev@dpdk.org To: Yuanhan Liu Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 3226769C6 for ; Sun, 12 Mar 2017 11:24:38 +0100 (CET) In-Reply-To: <20170308023115.GX18844@yliu-dev.sh.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 03/08/2017 03:31 AM, Yuanhan Liu wrote: > 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. Right. Changed to %"PRIu64". > >> + >> + return -1; >> + } >> + >> + dev->mtu = (uint16_t)msg->payload.u64; > > Besides, the cast seems unnecessary. Indeed. Thanks; Maxime