From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CFB60A3160 for ; Fri, 11 Oct 2019 08:39:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9B4C71E92B; Fri, 11 Oct 2019 08:39:32 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id BA40F1E92B for ; Fri, 11 Oct 2019 08:39:31 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Oct 2019 23:39:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,283,1566889200"; d="scan'208";a="194242690" Received: from npg-dpdk-patrickfu-sl1.sh.intel.com ([10.67.117.45]) by fmsmga007.fm.intel.com with ESMTP; 10 Oct 2019 23:39:28 -0700 From: patrick.fu@intel.com To: stable@dpdk.org Cc: bluca@debian.org, ktraynor@redhat.com, maxime.coquelin@redhat.com, zhihong.wang@intel.com, tiwei.bie@intel.com, Patrick Fu Date: Fri, 11 Oct 2019 14:35:42 +0800 Message-Id: <1570775742-413094-1-git-send-email-patrick.fu@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-stable] [PATCH 17.11] net/virtio: init MTU in case no control channel X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Patrick Fu [backport from commit id: 240da8b2143b7be372cf6388f028b26b15f16776] The max_mtu is kept as zero in case no CRTL channel, which leads to failure when calling virtio_mtu_set(). Signed-off-by: Patrick Fu --- 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 e0328f6..c9076ea 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1508,6 +1508,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