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 9A21C5927 for ; Thu, 27 Aug 2015 17:40:49 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 27 Aug 2015 08:40:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,422,1437462000"; d="scan'208";a="756580966" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 27 Aug 2015 08:40:47 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t7RFekjI004305; Thu, 27 Aug 2015 16:40:46 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id t7RFekxu032446; Thu, 27 Aug 2015 16:40:46 +0100 Received: (from bairemon@localhost) by sivswdev01.ir.intel.com with id t7RFekxR032442; Thu, 27 Aug 2015 16:40:46 +0100 From: Bernard Iremonger To: dev@dpdk.org Date: Thu, 27 Aug 2015 16:40:37 +0100 Message-Id: <1440690041-32391-3-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1440690041-32391-1-git-send-email-bernard.iremonger@intel.com> References: <1440690041-32391-1-git-send-email-bernard.iremonger@intel.com> Subject: [dpdk-dev] [RFC PATCH 2/6] librte_ether: handle RTE_ETH_DEV_INTR_LSC for vdevs 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: Thu, 27 Aug 2015 15:40:50 -0000 Signed-off-by: Bernard Iremonger --- lib/librte_ether/rte_ethdev.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 64e5a20..65d552a 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -1153,12 +1153,18 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, * device supports it. */ if (dev_conf->intr_conf.lsc == 1) { - const struct rte_pci_driver *pci_drv = &dev->driver->pci_drv; + if (dev->dev_type == RTE_ETH_DEV_PCI) { + const struct rte_pci_driver *pci_drv = &dev->driver->pci_drv; - if (!(pci_drv->drv_flags & RTE_PCI_DRV_INTR_LSC)) { - PMD_DEBUG_TRACE("driver %s does not support lsc\n", - pci_drv->name); - return -EINVAL; + if (!(pci_drv->drv_flags & RTE_PCI_DRV_INTR_LSC)) { + PMD_DEBUG_TRACE("driver %s does not support lsc\n", + pci_drv->name); + return -EINVAL; + } + } else if (!(dev->dev_flags & RTE_ETH_DEV_INTR_LSC)) { + PMD_DEBUG_TRACE("driver %s does not support lsc\n", + dev->data->name); + return -EINVAL; } } -- 1.9.1