From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH] net/virtio: init MTU in case no control channel Date: Tue, 7 Nov 2017 11:44:59 +0800 Message-ID: <20171107034453.GL12931@yliu-home> References: <1508987346-68173-1-git-send-email-wangzhike@jd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: maxime.coquelin@redhat.com, dev@dpdk.org To: wangzhike Return-path: Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by dpdk.org (Postfix) with ESMTP id EC9B21B319 for ; Tue, 7 Nov 2017 04:45:05 +0100 (CET) Content-Disposition: inline In-Reply-To: <1508987346-68173-1-git-send-email-wangzhike@jd.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 Wed, Oct 25, 2017 at 08:09:06PM -0700, wangzhike wrote: > The max_mtu is kept as zero in case no CRTL channel, which leads > to failure when calling virtio_mtu_set(). > > Signed-off-by: wangzhike Acked-by: Yuanhan Liu Thanks. --yliu > --- > drivers/net/virtio/virtio_ethdev.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c > index bfbd737..823b3fd 100644 > --- a/drivers/net/virtio/virtio_ethdev.c > +++ b/drivers/net/virtio/virtio_ethdev.c > @@ -1474,6 +1474,8 @@ static int virtio_dev_xstats_get_names(struct rte_eth_dev *dev, > } else { > PMD_INIT_LOG(DEBUG, "config->max_virtqueue_pairs=1"); > hw->max_queue_pairs = 1; > + hw->max_mtu = VIRTIO_MAX_RX_PKTLEN - ETHER_HDR_LEN - > + VLAN_TAG_LEN - hw->vtnet_hdr_size; > } > > ret = virtio_alloc_queues(eth_dev); > -- > 1.8.3.1