From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 7FDE48E01 for ; Fri, 5 Jan 2018 03:11:11 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jan 2018 18:11:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,316,1511856000"; d="scan'208";a="17628551" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga003.jf.intel.com with ESMTP; 04 Jan 2018 18:11:09 -0800 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 4 Jan 2018 18:11:09 -0800 Received: from bgsmsx152.gar.corp.intel.com (10.224.48.50) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 4 Jan 2018 18:11:09 -0800 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.245]) by BGSMSX152.gar.corp.intel.com ([169.254.6.92]) with mapi id 14.03.0319.002; Fri, 5 Jan 2018 07:41:06 +0530 From: "Yang, Zhiyong" To: zhike wang , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/virtio: init MTU in case no control channel Thread-Index: AQHThb/SEuBITq31MUeb1TspJGH4L6NkiIYw Date: Fri, 5 Jan 2018 02:11:06 +0000 Message-ID: References: <1515113654-2738-1-git-send-email-wangzhike@jd.com> In-Reply-To: <1515113654-2738-1-git-send-email-wangzhike@jd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/virtio: init MTU in case no control channel 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, 05 Jan 2018 02:11:11 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of zhike wang > Sent: Friday, January 5, 2018 8:54 AM > To: dev@dpdk.org > Cc: zhike wang > Subject: [dpdk-dev] [PATCH] net/virtio: init MTU in case no control chann= el >=20 > The max_mtu is kept as zero in case no CRTL channel, which leads to failu= re > when calling virtio_mtu_set(). >=20 > Signed-off-by: zhike wang > --- > drivers/net/virtio/virtio_ethdev.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virt= io_ethdev.c > index 21f2131..b7b3364 100644 > --- a/drivers/net/virtio/virtio_ethdev.c > +++ b/drivers/net/virtio/virtio_ethdev.c > @@ -1479,6 +1479,8 @@ static int virtio_dev_xstats_get_names(struct > rte_eth_dev *dev, > } else { > PMD_INIT_LOG(DEBUG, "config->max_virtqueue_pairs=3D1"); > hw->max_queue_pairs =3D 1; > + hw->max_mtu =3D VIRTIO_MAX_RX_PKTLEN - ETHER_HDR_LEN - > + VLAN_TAG_LEN - hw->vtnet_hdr_size; Good catch! It looks good to me. Acked-by: Zhiyong Yang Thanks Zhiyong