From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by dpdk.org (Postfix) with ESMTP id 14C929AAB for ; Sat, 21 Mar 2015 04:23:47 +0100 (CET) Received: by pacwe9 with SMTP id we9so127452292pac.1 for ; Fri, 20 Mar 2015 20:23:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=npegSs4ww2Vbvz+Bhfo8sHUeJoMfTpswudDkuG5H+uE=; b=P6T9McELAqasPrNX0IEoNZ77iXcXMXXOoZ4nKbkz3bYMYhJ6EeT0pfmm+aCH+EcjTA GmBRQFOWf3Bo4OaPBWrVvaujXJe91pV9ItDoBRncm8Qf0nRqurtdl/smXeI4JCU3fd3F Qsl5yXphDR1wEdLS14qGR0GTBmutihgjGdOOxk+TTOX2waStS6FYjpRHRuUDmmoYIkIY YXLdp9f3r4IdkJSiu4LGa/mQ9jshdmUKy4QxTyhWCGQJ6UFX838U0wD76L6sZVlDdCNj WPvAAu6rFXWzp5tn9YOje3sDGY5qvQqvhwlR6q5IVlP68267+5o+fGIqw/QT7wjbxMZb S/0g== X-Gm-Message-State: ALoCoQltTCqSgKUO1et8oBdCRa/R7QLFDhJXCBk/0WiIu53+y9q+I5ll9Fh2BajL/f9lcRryAV21 X-Received: by 10.66.181.144 with SMTP id dw16mr197909436pac.100.1426908227354; Fri, 20 Mar 2015 20:23:47 -0700 (PDT) Received: from localhost (7c295ef2.i-revonet.jp. [124.41.94.242]) by mx.google.com with ESMTPSA id dh3sm3490956pdb.69.2015.03.20.20.23.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Mar 2015 20:23:46 -0700 (PDT) From: Takuya ASADA To: dev@dpdk.org Date: Sat, 21 Mar 2015 12:23:03 +0900 Message-Id: <1426908185-27940-7-git-send-email-syuu@cloudius-systems.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1426908185-27940-1-git-send-email-syuu@cloudius-systems.com> References: <1426194348-4406-1-git-send-email-syuu@cloudius-systems.com> <1426908185-27940-1-git-send-email-syuu@cloudius-systems.com> Subject: [dpdk-dev] [RFC PATCHv2 6/8] virtio: enable MSI-X on OSv X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Mar 2015 03:23:48 -0000 Add support OSv EAL. Signed-off-by: Takuya ASADA --- lib/librte_pmd_virtio/virtio_ethdev.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c index 603be2d..fed65f3 100644 --- a/lib/librte_pmd_virtio/virtio_ethdev.c +++ b/lib/librte_pmd_virtio/virtio_ethdev.c @@ -1055,7 +1055,20 @@ static int virtio_resource_init(struct rte_pci_device *pci_dev) return virtio_resource_init_by_ioports(pci_dev); } -#else +#elif defined(RTE_EXEC_ENV_OSVAPP) +static int +virtio_has_msix(const struct rte_pci_addr *loc __rte_unused) +{ + /* TODO: ask to OSv this NIC has MSI-X */ + return 1; +} + +static int virtio_resource_init(struct rte_pci_device *pci_dev __rte_unused) +{ + /* no setup required */ + return 0; +} +#else /* BSD */ static int virtio_has_msix(const struct rte_pci_addr *loc __rte_unused) { -- 2.1.0