From patchwork Mon May 18 17:40:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 4783 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 079B5C324; Mon, 18 May 2015 19:40:16 +0200 (CEST) Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) by dpdk.org (Postfix) with ESMTP id BFABAB38D for ; Mon, 18 May 2015 19:40:12 +0200 (CEST) Received: by pdbnk13 with SMTP id nk13so62666559pdb.1 for ; Mon, 18 May 2015 10:40:12 -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=ca97aGOp/uo+V76jM3BSIjAnTrCCfEmPXoJ+V0E26+s=; b=ftTGsahndZRP1d0A8t54rVWhLEMol2YkTfmaxcqWdQB40o/zxCjo+amz7Cs4gdoqKh 6J9GOVsZRamnOu/fn3LAzviNvZnCgENye6ch10pR0HkByFk4skTbj79t7Zjp5RJcr028 6oM5VJjgVwDul8McB88v+atCl+pVogeqYixiOBsCDRpisWrQagR60oQpyBikJN/VAnUS 2T8Gx6u02VnNzzi5MlTHQSvn6duMLfkZ/uPMGVuZxWHGEsCoBwGH9u3GX595+bRQ6RwK WANaSvnKTKeQtb5n5xWzBWYRPPVHA5oMw+X4JcxVfK8Epf+I6bMiUDeTLe38p4f0aIM/ ypHg== X-Gm-Message-State: ALoCoQmrgIbHcK1jM61k4tgWyrAoAXyACbDceh8wYVnTpCMILnXZIaeu2Gxha76kR3CseCwbAnnw X-Received: by 10.66.66.173 with SMTP id g13mr1536146pat.155.1431970812126; Mon, 18 May 2015 10:40:12 -0700 (PDT) Received: from urahara.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id he9sm10655046pbc.7.2015.05.18.10.40.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 May 2015 10:40:11 -0700 (PDT) From: Stephen Hemminger To: cumming.lian@intel.com Date: Mon, 18 May 2015 10:40:10 -0700 Message-Id: <1431970814-25951-2-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1431970814-25951-1-git-send-email-stephen@networkplumber.org> References: <1431970814-25951-1-git-send-email-stephen@networkplumber.org> Cc: dev@dpdk.org Subject: [dpdk-dev] [PATCH 1/5] ethdev: check for rxq interrupt support 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" Not all devices support rxq interrupt yet. It is better to check for interrupt support in driver at configuration time than waiting for later failures. Signed-off-by: Stephen Hemminger --- lib/librte_ether/rte_ethdev.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index cb586ff..ad15837 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -1183,6 +1183,14 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, } /* + * If Receive Queue interrupt is enabled, check that + * the device supports interrupt control. + */ + if (dev_conf->intr_conf.rxq == 1) + FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_intr_enable, + -EINVAL); + + /* * If jumbo frames are enabled, check that the maximum RX packet * length is supported by the configured device. */