DPDK patches and discussions
 help / color / mirror / Atom feed
From: xiangxia.m.yue@gmail.com
To: beilei.xing@intel.com, wei.dai@intel.com, helin.zhang@intel.com,
	wenzhuo.lu@intel.com
Cc: dev@dpdk.org, Tonghao Zhang <xiangxia.m.yue@gmail.com>
Subject: [dpdk-dev] [PATCH v3 5/5] net/ixgbe: remove the unnecessary call rte_intr_enable.
Date: Sun,  4 Feb 2018 16:51:35 -0800	[thread overview]
Message-ID: <1517791895-3061-6-git-send-email-xiangxia.m.yue@gmail.com> (raw)
In-Reply-To: <1517791895-3061-1-git-send-email-xiangxia.m.yue@gmail.com>

From: Tonghao Zhang <xiangxia.m.yue@gmail.com>

When binding the ixgbe pf or vf to vfio and call the
rte_eth_dev_rx_intr_enable frequently, the interrupt setting
(msi_set_mask_bit) will take more CPU as show below. rte_intr_enable
calls the ioctl to map the fd to interrupts frequently.

perf top:
5.45%  [kernel]   [k] msi_set_mask_bit

It is unnecessary to call the rte_intr_enable in
ixgbe_dev_rx_queue_intr_enable. Because the fds has been mapped to
interrupt and not unmapped in ixgbe_dev_rx_queue_intr_disable.

With the patch, msi_set_mask_bit is not listed in perl anymore.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 7928144..ef01e0c 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4253,7 +4253,7 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
  */
 static int
 ixgbe_dev_interrupt_action(struct rte_eth_dev *dev,
-			   struct rte_intr_handle *intr_handle)
+			   __rte_unused struct rte_intr_handle *intr_handle)
 {
 	struct ixgbe_interrupt *intr =
 		IXGBE_DEV_PRIVATE_TO_INTR(dev->data->dev_private);
@@ -4304,7 +4304,6 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 
 	PMD_DRV_LOG(DEBUG, "enable intr immediately");
 	ixgbe_enable_intr(dev);
-	rte_intr_enable(intr_handle);
 
 	return 0;
 }
@@ -4327,8 +4326,6 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 ixgbe_dev_interrupt_delayed_handler(void *param)
 {
 	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
-	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
-	struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
 	struct ixgbe_interrupt *intr =
 		IXGBE_DEV_PRIVATE_TO_INTR(dev->data->dev_private);
 	struct ixgbe_hw *hw =
@@ -4366,7 +4363,6 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 
 	PMD_DRV_LOG(DEBUG, "enable intr in delayed handler S[%08x]", eicr);
 	ixgbe_enable_intr(dev);
-	rte_intr_enable(intr_handle);
 }
 
 /**
@@ -5607,8 +5603,6 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
 	RTE_SET_USED(queue_id);
 	IXGBE_WRITE_REG(hw, IXGBE_VTEIMS, intr->mask);
 
-	rte_intr_enable(intr_handle);
-
 	return 0;
 }
 
@@ -5635,8 +5629,6 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
 static int
 ixgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
 {
-	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
-	struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
 	uint32_t mask;
 	struct ixgbe_hw *hw =
 		IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -5656,7 +5648,6 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
 		mask &= (1 << (queue_id - 32));
 		IXGBE_WRITE_REG(hw, IXGBE_EIMS_EX(1), mask);
 	}
-	rte_intr_enable(intr_handle);
 
 	return 0;
 }
-- 
1.8.3.1

  parent reply	other threads:[~2018-02-05  0:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-05  0:51 [dpdk-dev] [PATCH v3 0/5] ixgbe: fix bugs or just improve xiangxia.m.yue
2018-02-05  0:51 ` [dpdk-dev] [PATCH v3 1/5] net/ixgbevf: set the inter-interrupt interval for EITR xiangxia.m.yue
2018-02-05  0:51 ` [dpdk-dev] [PATCH v3 2/5] net/ixgbe: set the ITR via configuration xiangxia.m.yue
2018-02-05  0:51 ` [dpdk-dev] [PATCH v3 3/5] net/ixgbe: write disable to ITR counter xiangxia.m.yue
2018-02-05  0:51 ` [dpdk-dev] [PATCH v3 4/5] net/ixgbevf: save IXGBE_VTEIMS to intr->mask for performance xiangxia.m.yue
2018-02-05  0:51 ` xiangxia.m.yue [this message]
2018-03-08 10:56 ` [dpdk-dev] [PATCH v3 0/5] ixgbe: fix bugs or just improve Tonghao Zhang
2018-04-04  2:48   ` Zhang, Qi Z
2018-04-09  0:53     ` Tonghao Zhang
2018-04-11 12:21       ` Zhang, Qi Z
2018-04-12  2:11         ` Tonghao Zhang
2018-04-12  5:21   ` Zhang, Qi Z
2018-04-16  4:19     ` Zhang, Helin
2018-03-22 13:01 xiangxia.m.yue
2018-03-22 13:01 ` [dpdk-dev] [PATCH v3 5/5] net/ixgbe: remove the unnecessary call rte_intr_enable xiangxia.m.yue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1517791895-3061-6-git-send-email-xiangxia.m.yue@gmail.com \
    --to=xiangxia.m.yue@gmail.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=wei.dai@intel.com \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).