From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9609E61B9A; Sun, 12 Mar 2017 10:24:38 +0000 (UTC) Received: from [10.36.116.107] (ovpn-116-107.ams2.redhat.com [10.36.116.107]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v2CAOYuS032741 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 12 Mar 2017 06:24:36 -0400 To: Yuanhan Liu References: <20170306082740.5675-1-maxime.coquelin@redhat.com> <20170306082740.5675-3-maxime.coquelin@redhat.com> <20170308023115.GX18844@yliu-dev.sh.intel.com> Cc: aconole@redhat.com, sodey@sonusnet.com, jianfeng.tan@intel.com, dev@dpdk.org From: Maxime Coquelin Message-ID: <5caaa643-4b1b-dc18-a92a-6ff4e7322ee5@redhat.com> Date: Sun, 12 Mar 2017 11:24:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170308023115.GX18844@yliu-dev.sh.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Sun, 12 Mar 2017 10:24:38 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v2 2/7] vhost: vhost-user: Add MTU protocol feature support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 10:24:38 -0000 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