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 65E53A04F1; Thu, 18 Jun 2020 19:18:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 11E4C1BFC6; Thu, 18 Jun 2020 19:18:51 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 253391BFAD for ; Thu, 18 Jun 2020 19:18:46 +0200 (CEST) IronPort-SDR: bUrUEKiNk1gCfcencVxrKmltBvxbI6vuzAM1uS1Tt3Gt10+WA/37AWmheNDMULXCZFTxf7AYX7 X8ty8Lc+o8cQ== X-IronPort-AV: E=McAfee;i="6000,8403,9656"; a="131064087" X-IronPort-AV: E=Sophos;i="5.75,251,1589266800"; d="scan'208";a="131064087" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2020 10:18:45 -0700 IronPort-SDR: 8He/KNXL5QxVrHe/1yZBgcMFZUDeVhJ76lpxeKQ+MoL/mknpNaZOlIyesIoSe145DEmQOkvFYx uMRmPmZy8QaA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,251,1589266800"; d="scan'208";a="299768416" Received: from silpixa00399498.ir.intel.com (HELO silpixa00399498.ger.corp.intel.com) ([10.237.222.52]) by fmsmga004.fm.intel.com with ESMTP; 18 Jun 2020 10:18:30 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: David Hunt , reshma.pattan@intel.com, hkalra@marvell.com, jerinjacobk@gmail.com, yinan.wang@intel.com Date: Thu, 18 Jun 2020 18:18:23 +0100 Message-Id: <903202f73e4d648cee42f8cd0315272987ac20e7.1592500565.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 v2 1/7] 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