From patchwork Thu Mar 12 21:05:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takuya ASADA X-Patchwork-Id: 4007 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id E08A49AAC; Thu, 12 Mar 2015 22:06:17 +0100 (CET) Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by dpdk.org (Postfix) with ESMTP id 12DDF9AAB for ; Thu, 12 Mar 2015 22:06:17 +0100 (CET) Received: by pdbnh10 with SMTP id nh10so23075877pdb.3 for ; Thu, 12 Mar 2015 14:06:16 -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=Uwd9OuyIgVIpgUMo2pxJc7zQI5Q4LTY9NyPJZRHW6hfSVePu/rsoFA8UB8lipfXZUj ngg8KrN1OQVuMUOHRWXxyjNwmJqFubaqpIBJwJFa4MadfA5pklmM9bwnqtQWuDWpTscu r3Un4+caVOoyDuwoOdlG5QnMXY4AlyLn2ZRdFMrnHTs4Mjb5U6tzzbR6jskaHUiFd71O X+O0Y+DjXHfCABXk7t+JPh+p3pzVIVhkoceuY2Tk3si9kNGTbFICqA/CE4n0TmAqpWTO DcIid17iqEzC/Gu8Z2Z35GNh85EFDbNOAUGnAkuD0PZ2SCa5H2H1B93OeRHu0mBka22n w+Cg== X-Gm-Message-State: ALoCoQlosyMWWUTxA8uekNRDemHUzygX3oAxkJQD/uCMY6Pu7YW8zvSxiSAJiesBeX37xhUH8Dqp X-Received: by 10.70.48.5 with SMTP id h5mr56516474pdn.58.1426194376482; Thu, 12 Mar 2015 14:06:16 -0700 (PDT) Received: from localhost (7c295ef2.i-revonet.jp. [124.41.94.242]) by mx.google.com with ESMTPSA id ms7sm25821pdb.8.2015.03.12.14.06.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Mar 2015 14:06:15 -0700 (PDT) From: Takuya ASADA To: dev@dpdk.org Date: Fri, 13 Mar 2015 06:05:47 +0900 Message-Id: <1426194348-4406-7-git-send-email-syuu@cloudius-systems.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1426194348-4406-1-git-send-email-syuu@cloudius-systems.com> References: <1426194348-4406-1-git-send-email-syuu@cloudius-systems.com> Subject: [dpdk-dev] [RFC PATCH 6/7] 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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) {