From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 11EF29E7 for ; Wed, 15 Feb 2017 07:25:15 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2017 22:25:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,164,1484035200"; d="scan'208";a="1094927672" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by orsmga001.jf.intel.com with ESMTP; 14 Feb 2017 22:25:14 -0800 From: Yuanhan Liu To: Thomas Monjalon Cc: Yuanhan Liu , Andrew Rybchenko , dpdk stable Date: Wed, 15 Feb 2017 14:26:48 +0800 Message-Id: <1487140012-13314-36-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1487140012-13314-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1487140012-13314-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-stable] patch 'net/virtio: fix build without virtio-user' has been queued to stable release 16.11.1 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: , X-List-Received-Date: Wed, 15 Feb 2017 06:25:16 -0000 Hi, FYI, your patch has been queued to stable release 16.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/18/17. So please shout if anyone has objections. Thanks. --yliu --- >>From c3a08e3bece4decbebc93b8a8dc39b7d5262959e Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Tue, 17 Jan 2017 23:13:00 +0100 Subject: [PATCH] net/virtio: fix build without virtio-user [ upstream commit e754c959fca3f15263920789cf69148b9edd646e ] When CONFIG_RTE_VIRTIO_USER is disabled (default on FreeBSD), the virtio driver cannot be compiled: librte_pmd_virtio.a(virtio_ethdev.o): In function `eth_virtio_dev_init': (.text+0x1eba): undefined reference to `virtio_user_ops' Reported-by: Andrew Rybchenko Signed-off-by: Thomas Monjalon --- drivers/net/virtio/virtio_ethdev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 6e5c5d6..4b6e0a1 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1325,9 +1325,12 @@ virtio_remap_pci(struct rte_pci_device *pci_dev, struct virtio_hw *hw) static void virtio_set_vtpci_ops(struct virtio_hw *hw) { +#ifdef RTE_VIRTIO_USER if (hw->virtio_user_dev) VTPCI_OPS(hw) = &virtio_user_ops; - else if (hw->modern) + else +#endif + if (hw->modern) VTPCI_OPS(hw) = &modern_ops; else VTPCI_OPS(hw) = &legacy_ops; -- 1.9.0