From: Shaopeng He <shaopeng.he@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v4 3/6] fm10k: remove rx queue interrupts when dev stops
Date: Mon, 21 Dec 2015 18:19:49 +0800 [thread overview]
Message-ID: <1450693192-14500-4-git-send-email-shaopeng.he@intel.com> (raw)
In-Reply-To: <1450693192-14500-1-git-send-email-shaopeng.he@intel.com>
Previous dev_stop function stops the rx/tx queues. This patch adds logic
to disable rx queue interrupt, clean the datapath event and queue/vec map.
Signed-off-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
---
drivers/net/fm10k/fm10k_ethdev.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index a34c5e2..b5b809c 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1125,6 +1125,8 @@ fm10k_dev_start(struct rte_eth_dev *dev)
static void
fm10k_dev_stop(struct rte_eth_dev *dev)
{
+ struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle;
int i;
PMD_INIT_FUNC_TRACE();
@@ -1136,6 +1138,26 @@ fm10k_dev_stop(struct rte_eth_dev *dev)
if (dev->data->rx_queues)
for (i = 0; i < dev->data->nb_rx_queues; i++)
fm10k_dev_rx_queue_stop(dev, i);
+
+ /* Disable datapath event */
+ if (rte_intr_dp_is_en(intr_handle)) {
+ for (i = 0; i < dev->data->nb_rx_queues; i++) {
+ FM10K_WRITE_REG(hw, FM10K_RXINT(i),
+ 3 << FM10K_RXINT_TIMER_SHIFT);
+ if (hw->mac.type == fm10k_mac_pf)
+ FM10K_WRITE_REG(hw, FM10K_ITR(Q2V(dev, i)),
+ FM10K_ITR_MASK_SET);
+ else
+ FM10K_WRITE_REG(hw, FM10K_VFITR(Q2V(dev, i)),
+ FM10K_ITR_MASK_SET);
+ }
+ }
+ /* Clean datapath event and queue/vec mapping */
+ rte_intr_efd_disable(intr_handle);
+ if (intr_handle->intr_vec != NULL) {
+ rte_free(intr_handle->intr_vec);
+ intr_handle->intr_vec = NULL;
+ }
}
static void
--
1.9.3
next prev parent reply other threads:[~2015-12-21 10:20 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-25 5:37 [dpdk-dev] [PATCH 0/5] interrupt mode for fm10k Shaopeng He
2015-09-25 5:37 ` [dpdk-dev] [PATCH 1/5] fm10k: implement rx_descriptor_done function Shaopeng He
2015-09-25 5:37 ` [dpdk-dev] [PATCH 2/5] fm10k: enable Rx queue interrupts for PF and VF Shaopeng He
2015-10-22 6:52 ` Chen, Jing D
2015-09-25 5:37 ` [dpdk-dev] [PATCH 3/5] fm10k: make sure default VID available in dev_init Shaopeng He
2015-09-25 5:37 ` [dpdk-dev] [PATCH 4/5] l3fwd-power: fix a memory leak for non-ip packet Shaopeng He
2015-09-25 7:19 ` De Lara Guarch, Pablo
2015-09-25 9:00 ` He, Shaopeng
2015-09-25 5:37 ` [dpdk-dev] [PATCH 5/5] doc: release note update for fm10k intr mode Shaopeng He
2015-10-26 3:47 ` [dpdk-dev] [PATCH v2 0/7] interrupt mode for fm10k Shaopeng He
2015-10-26 3:47 ` [dpdk-dev] [PATCH v2 1/7] fm10k: implement rx_descriptor_done function Shaopeng He
2015-10-26 3:47 ` [dpdk-dev] [PATCH v2 2/7] fm10k: setup rx queue interrupts for PF and VF Shaopeng He
2015-10-26 3:47 ` [dpdk-dev] [PATCH v2 3/7] fm10k: remove rx queue interrupts when dev stops Shaopeng He
2015-10-26 3:47 ` [dpdk-dev] [PATCH v2 4/7] fm10k: add rx queue interrupt en/dis functions Shaopeng He
2015-10-26 3:47 ` [dpdk-dev] [PATCH v2 5/7] fm10k: make sure default VID available in dev_init Shaopeng He
2015-10-26 3:47 ` [dpdk-dev] [PATCH v2 6/7] l3fwd-power: fix a memory leak for non-ip packet Shaopeng He
2015-10-26 3:47 ` [dpdk-dev] [PATCH v2 7/7] doc: release note update for fm10k intr mode Shaopeng He
2015-12-22 7:00 ` Qiu, Michael
2015-12-22 12:07 ` He, Shaopeng
2015-10-28 7:34 ` [dpdk-dev] [PATCH v2 0/7] interrupt mode for fm10k Chen, Jing D
2015-10-30 10:40 ` He, Shaopeng
2015-10-30 13:54 ` Thomas Monjalon
2015-10-31 3:06 ` He, Shaopeng
2015-11-04 14:52 ` Thomas Monjalon
2015-11-05 5:12 ` [dpdk-dev] [PATCH v3 " Shaopeng He
2015-11-05 5:12 ` [dpdk-dev] [PATCH v3 1/7] fm10k: implement rx_descriptor_done function Shaopeng He
2015-11-05 5:12 ` [dpdk-dev] [PATCH v3 2/7] fm10k: setup rx queue interrupts for PF and VF Shaopeng He
2015-11-05 5:12 ` [dpdk-dev] [PATCH v3 3/7] fm10k: remove rx queue interrupts when dev stops Shaopeng He
2015-11-05 5:12 ` [dpdk-dev] [PATCH v3 4/7] fm10k: add rx queue interrupt en/dis functions Shaopeng He
2015-11-05 5:12 ` [dpdk-dev] [PATCH v3 5/7] fm10k: make sure default VID available in dev_init Shaopeng He
2015-11-05 5:12 ` [dpdk-dev] [PATCH v3 6/7] l3fwd-power: fix a memory leak for non-ip packet Shaopeng He
2015-11-05 5:12 ` [dpdk-dev] [PATCH v3 7/7] doc: release note update for fm10k intr mode Shaopeng He
2015-12-21 10:19 ` [dpdk-dev] [PATCH v4 0/6] interrupt mode for fm10k Shaopeng He
2015-12-21 10:19 ` [dpdk-dev] [PATCH v4 1/6] fm10k: implement rx_descriptor_done function Shaopeng He
2015-12-22 6:50 ` Qiu, Michael
2015-12-22 11:55 ` He, Shaopeng
2015-12-21 10:19 ` [dpdk-dev] [PATCH v4 2/6] fm10k: setup rx queue interrupts for PF and VF Shaopeng He
2015-12-22 7:28 ` Qiu, Michael
2015-12-23 1:57 ` He, Shaopeng
2015-12-21 10:19 ` Shaopeng He [this message]
2015-12-22 6:54 ` [dpdk-dev] [PATCH v4 3/6] fm10k: remove rx queue interrupts when dev stops Qiu, Michael
2015-12-22 12:03 ` He, Shaopeng
2015-12-21 10:19 ` [dpdk-dev] [PATCH v4 4/6] fm10k: add rx queue interrupt en/dis functions Shaopeng He
2015-12-21 10:19 ` [dpdk-dev] [PATCH v4 5/6] fm10k: make sure default VID available in dev_init Shaopeng He
2015-12-21 10:19 ` [dpdk-dev] [PATCH v4 6/6] l3fwd-power: fix a memory leak for non-ip packet Shaopeng He
2015-12-23 7:37 ` [dpdk-dev] [PATCH v5 0/6] interrupt mode for fm10k Shaopeng He
2015-12-23 7:37 ` [dpdk-dev] [PATCH v5 1/6] fm10k: implement rx_descriptor_done function Shaopeng He
2015-12-23 7:37 ` [dpdk-dev] [PATCH v5 2/6] fm10k: setup rx queue interrupts for PF and VF Shaopeng He
2015-12-23 7:37 ` [dpdk-dev] [PATCH v5 3/6] fm10k: remove rx queue interrupts when dev stops Shaopeng He
2015-12-23 7:37 ` [dpdk-dev] [PATCH v5 4/6] fm10k: add rx queue interrupt en/dis functions Shaopeng He
2015-12-23 7:37 ` [dpdk-dev] [PATCH v5 5/6] fm10k: make sure default VID available in dev_init Shaopeng He
2015-12-23 7:37 ` [dpdk-dev] [PATCH v5 6/6] l3fwd-power: fix a memory leak for non-ip packet Shaopeng He
2015-12-24 8:04 ` [dpdk-dev] [PATCH v5 0/6] interrupt mode for fm10k Qiu, Michael
2016-02-05 4:57 ` [dpdk-dev] [PATCH v6 " Shaopeng He
2016-02-05 4:57 ` [dpdk-dev] [PATCH v6 1/6] fm10k: implement rx_descriptor_done function Shaopeng He
2016-02-05 4:57 ` [dpdk-dev] [PATCH v6 2/6] fm10k: setup rx queue interrupts for PF and VF Shaopeng He
2016-02-05 4:57 ` [dpdk-dev] [PATCH v6 3/6] fm10k: remove rx queue interrupts when dev stops Shaopeng He
2016-02-05 4:57 ` [dpdk-dev] [PATCH v6 4/6] fm10k: add rx queue interrupt en/dis functions Shaopeng He
2016-02-05 4:57 ` [dpdk-dev] [PATCH v6 5/6] fm10k: make sure default VID available in dev_init Shaopeng He
2016-02-05 4:57 ` [dpdk-dev] [PATCH v6 6/6] l3fwd-power: fix a memory leak for non-ip packet Shaopeng He
2016-02-05 16:34 ` [dpdk-dev] [PATCH v6 0/6] interrupt mode for fm10k Bruce Richardson
2016-03-03 8:36 ` Liu, Yong
2016-03-03 9:10 ` Thomas Monjalon
2016-03-03 9:19 ` Liu, Yong
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=1450693192-14500-4-git-send-email-shaopeng.he@intel.com \
--to=shaopeng.he@intel.com \
--cc=dev@dpdk.org \
/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).