From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 0B0792B9B for ; Mon, 10 Apr 2017 08:48:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491806921; x=1523342921; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=nQr0ABHvhA6F1CHaSKMdf2odiA+2l0oLUhg9I1UzC3U=; b=oYEN5dFYg1T3FxE3mBEjo9urciWmv3eeklC2BPeKsWkFHJJbFDGmqEn2 KHsUzP1y/5h3dGoK7jSzLujTYy1P4Q==; Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Apr 2017 23:48:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,181,1488873600"; d="scan'208";a="71910095" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga002.jf.intel.com with ESMTP; 09 Apr 2017 23:48:39 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 9 Apr 2017 23:48:38 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.117]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0319.002; Mon, 10 Apr 2017 14:48:37 +0800 From: "Tan, Jianfeng" To: Maxime Coquelin , "aconole@redhat.com" , "sodey@sonusnet.com" , "yuanhan.liu@linux.intel.com" , "thomas.monjalon@6wind.com" , "dev@dpdk.org" Thread-Topic: [PATCH v3 7/9] net/virtio: Add MTU feature support Thread-Index: AQHSm06OgwI+OdV4zkKJECLkabujvqG2Wj8A//+gnwCAALBygP//wB0AgACWAwCAAr03gIAEl3Cw Date: Mon, 10 Apr 2017 06:48:36 +0000 Message-ID: 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> <1e0af6da-cb01-fb91-c0b0-efa08ebd9f21@redhat.com> In-Reply-To: <1e0af6da-cb01-fb91-c0b0-efa08ebd9f21@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Mon, 10 Apr 2017 06:48:41 -0000 > -----Original Message----- > From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com] > Sent: Saturday, April 8, 2017 12:41 AM > To: Tan, Jianfeng; aconole@redhat.com; sodey@sonusnet.com; > yuanhan.liu@linux.intel.com; thomas.monjalon@6wind.com; dev@dpdk.org > Subject: Re: [PATCH v3 7/9] net/virtio: Add MTU feature support >=20 > Hi Jianfeng, >=20 > 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 go= al > >>>> 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 longe= r > >>> 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(). >=20 > Thanks. Yes, we could also do that. >=20 > 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? I'll help review then. Thanks, Jianfeng