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 5274C5689 for ; Fri, 7 Apr 2017 18:40:44 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D44BF61B8D; Fri, 7 Apr 2017 16:40:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D44BF61B8D Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=maxime.coquelin@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D44BF61B8D Received: from [10.36.112.39] (ovpn-112-39.ams2.redhat.com [10.36.112.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4BC789B90C; Fri, 7 Apr 2017 16:40:41 +0000 (UTC) To: "Tan, Jianfeng" , aconole@redhat.com, sodey@sonusnet.com, yuanhan.liu@linux.intel.com, thomas.monjalon@6wind.com, dev@dpdk.org References: <20170213142820.8964-1-maxime.coquelin@redhat.com> <20170312163406.17714-1-maxime.coquelin@redhat.com> <20170312163406.17714-8-maxime.coquelin@redhat.com> <0e5df10f-c61f-b1cd-a604-148379485ef2@intel.com> <12327337-70fd-168a-d836-026d619089f8@redhat.com> <5f8ae5f8-22a5-ef95-058d-6865b154bef0@intel.com> From: Maxime Coquelin Message-ID: <1e0af6da-cb01-fb91-c0b0-efa08ebd9f21@redhat.com> Date: Fri, 7 Apr 2017 18:40:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <5f8ae5f8-22a5-ef95-058d-6865b154bef0@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 07 Apr 2017 16:40:43 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v3 7/9] net/virtio: Add MTU 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: Fri, 07 Apr 2017 16:40:44 -0000 Hi Jianfeng, On 04/05/2017 04:50 PM, Tan, Jianfeng wrote: > > > On 4/5/2017 9:54 PM, Maxime Coquelin wrote: >> >> >> On 04/05/2017 11:42 AM, Tan, Jianfeng wrote: >>> Hi Maxime, >>> >>> Thank you for replying. >>> >>> On 4/5/2017 3:11 PM, Maxime Coquelin wrote: >>>> Hi Jianfeng, >>>> >>>> On 04/05/2017 06:52 AM, Tan, Jianfeng wrote: >>>>> Hi Maxime, >>>>> >>>>> Have some confusion about this feature. Please help confirm. >>>>> >>>>> (1) With this feature, we only support to advertise MTU value which is >>>>> defined by QEMU to frontend and backend driver separately. (2) But it >>>>> does not allow frontend driver to set a different MTU to QEMU and then >>>>> to vhost backend. >>>>> >>>>> Correct? >>>>> If it's correct, why not MTU works like (2)? >>>> >>>> Because idea is that the hosts advertises the maximum MTU value it >>>> supports. The frontend driver is free to use a smaller value. The goal >>>> of this change is to make possible to set a uniform MTU value across >>>> the infrastructure, the management tools giving a hint to the guests on >>>> the MTU value it should use. >>> >>> Based on that MTU is the maximum packet size that can be sent instead of >>> that can be received: >>> (1) Why vhost (as a device) does not drop any packets which are longer >>> than MTU when dequeue()? >> That's a good point. >> As when MTU value is negotiated, the guest agrees not to send larger >> packets. But we cannot trust the guest, so vhost needs to check the >> packet length. >> >>> (2) See some NICs also use MTU to calculate maximum packet size that can >>> be received, like ixgbe, i40e, shall we also do that? >> Can you give me some pointers to the code? > > Please refer ixgbe_dev_mtu_set(), and i40e_dev_mtu_set(). Thanks. Yes, we could also do that. I can send a patch for this and another one to check the size of the packet respects negotiated MTU value. Or maybe you want to do this? Regards, Maxime