From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 4F197F8; Mon, 6 Nov 2017 22:45:05 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 06 Nov 2017 22:45:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=7AExm9BFiZVWyU+IiQIcvqU4PK6pClr9NY1wVO3UVRQ=; b=jjMjB747 PSoaspUexoeuXcXL6616aF7o1sKjVCycJHuYvbKZ9VYCsPF3G7RrY+fQqP7yv36m yOH2FyW1/13QBGB6jP7Lkk05ufJCQe4O9759ZkE17f79mMFCHzrMi9bt6YXz5qNB OIpbheOMF5y7b60/+y+g2xoz8CsKy5JU5Imw8zTGbSCGJ4pEcqtlmCDg2ARSL3Ws PhxwbkJe4jPvRILsz9NMbqWb2llKT4u0dua2sZAW/U6oVJluztb3TMLeHpLPddO9 FiZGeDzpsxsJ19vbo/ODJ7ypeK1FtlRAOYzShzyJ0yjO5qt/ntCKRC7pDoaFvo9j 7U2NBMeoAd5M0w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=7AExm9BFiZVWyU+IiQIcvqU4PK6pC lr9NY1wVO3UVRQ=; b=rG6BBATxOXf/0JSItcatrFy4tQSvLmh11QX9gOW6Qd41r 2jnVP6VvHSpJnUt4JLlsmLFIQqUvlw8cZOqKVlR1Ln+3ailst8+tVH4IE1A0Ou4i StHy2AaLIvCEOIdV05an5PGg59b1sm8eVO+Kk9dZKz/dHPuYqyWGGRRZsRvFt5H0 kWQLy6WMUSRUfNA8X8ZQ1DITILDb/12tKkE/RDGZivVjGdG/CBNTH9s5+bwgC9Fx 2e1yPLk4Xz8QkT+1vdDjJ+r/mi1KzDFkFPfJ5Hfu1jwV5ZcU/v0lOSPT8SrBk154 eexKEKWfqeljYyuQ3j0Slx7ULULhC95UxBSAmCHMw== X-ME-Sender: Received: from yliu-home (unknown [222.64.173.197]) by mail.messagingengine.com (Postfix) with ESMTPA id 05E1C240B2; Mon, 6 Nov 2017 22:45:03 -0500 (EST) Date: Tue, 7 Nov 2017 11:44:59 +0800 From: Yuanhan Liu To: wangzhike Cc: maxime.coquelin@redhat.com, dev@dpdk.org 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 Content-Disposition: inline In-Reply-To: <1508987346-68173-1-git-send-email-wangzhike@jd.com> User-Agent: Mutt/1.5.24 (2015-08-30) 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: Tue, 07 Nov 2017 03:45:06 -0000 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