From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 860F5A00BE; Thu, 28 May 2020 11:13:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 50E901D99E; Thu, 28 May 2020 11:13:50 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 56F411D540 for ; Thu, 28 May 2020 11:13:47 +0200 (CEST) IronPort-SDR: oN1IRgkED8Zb0/e8h+empIJiFEv4o3ay30jihh5fS3/1cuH1WC+qhy+CwxZtHPpeJEoDQKugn5 Shcx4fJgVy2A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2020 02:13:46 -0700 IronPort-SDR: nD+TO//ftKJWyKcA2GB92H27ekX/suLR45Gif8UM1L9NPUR86oCvYNatsgoZZXFJwtl0YdrImC 0FaehHgGis2A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,444,1583222400"; d="scan'208";a="285106507" Received: from silpixa00399498.ir.intel.com (HELO silpixa00399498.ger.corp.intel.com) ([10.237.222.52]) by orsmga002.jf.intel.com with ESMTP; 28 May 2020 02:13:45 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: David Hunt , liang.j.ma@intel.com, reshma.pattan@intel.com Date: Thu, 28 May 2020 10:13:49 +0100 Message-Id: <38add582d2ecbbfee61624029e752d94d0574f6b.1590656906.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 1/3] l3fwd-power: disable interrupts by default X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Currently, interrupts are enabled in telemetry and empty poll modes, but they are not used. Switch to disabling interrupts by default, and only enable interrupts for modes that require them. Signed-off-by: Anatoly Burakov --- examples/l3fwd-power/main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 9db94ce044..2cc5d7b121 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -256,10 +256,7 @@ static struct rte_eth_conf port_conf = { }, .txmode = { .mq_mode = ETH_MQ_TX_NONE, - }, - .intr_conf = { - .rxq = 1, - }, + } }; static struct rte_mempool * pktmbuf_pool[NB_SOCKETS]; @@ -2270,6 +2267,8 @@ main(int argc, char **argv) /* initialize all ports */ RTE_ETH_FOREACH_DEV(portid) { struct rte_eth_conf local_port_conf = port_conf; + /* not all app modes need interrupts */ + bool need_intr = app_mode == APP_MODE_LEGACY; /* skip ports that are not enabled */ if ((enabled_port_mask & (1 << portid)) == 0) { @@ -2303,7 +2302,10 @@ main(int argc, char **argv) nb_rx_queue, (unsigned)n_tx_queue ); /* If number of Rx queue is 0, no need to enable Rx interrupt */ if (nb_rx_queue == 0) - local_port_conf.intr_conf.rxq = 0; + need_intr = false; + + if (need_intr) + local_port_conf.intr_conf.rxq = 1; ret = rte_eth_dev_info_get(portid, &dev_info); if (ret != 0) -- 2.17.1