DPDK patches and discussions
 help / color / mirror / Atom feed
From: beilei.xing@intel.com
To: dev@dpdk.org
Cc: jia.guo@intel.com, Beilei Xing <beilei.xing@intel.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v2] net/i40e: fix global register recovery
Date: Fri, 20 Nov 2020 16:49:47 +0800
Message-ID: <20201120084947.40064-1-beilei.xing@intel.com> (raw)
In-Reply-To: <20201119061616.37482-1-beilei.xing@intel.com>

From: Beilei Xing <beilei.xing@intel.com>

PMD configures the global register I40E_GLINT_CTL during
device initialization to work around the Rx write back
issue. But when a device is bound from DPDK to kernel,
the global register is not recovered to the original
state, it will cause kernel driver performance drop issue.
This patch fixes this issue.

Fixes: be6c228d4da3 ("i40e: support Rx interrupt")
Fixes: 4ab831449a1c ("net/i40e: fix interrupt conflict with multi-driver")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>

v2 change:
 - refine commit log

 drivers/net/i40e/i40e_ethdev.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index f54769c29d..2cb18ecc03 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -763,6 +763,21 @@ static inline void i40e_config_automask(struct i40e_pf *pf)
 	I40E_WRITE_REG(hw, I40E_GLINT_CTL, val);
+static inline void i40e_clear_automask(struct i40e_pf *pf)
+	struct i40e_hw *hw = I40E_PF_TO_HW(pf);
+	uint32_t val;
+	val = I40E_READ_REG(hw, I40E_GLINT_CTL);
+	if (!pf->support_multi_driver)
+	I40E_WRITE_REG(hw, I40E_GLINT_CTL, val);
 #define I40E_FLOW_CONTROL_ETHERTYPE  0x8808
@@ -2741,6 +2756,8 @@ i40e_dev_close(struct rte_eth_dev *dev)
 	/* Remove all Traffic Manager configuration */
+	i40e_clear_automask(pf);
 	hw->adapter_closed = 1;
 	return ret;

  parent reply	other threads:[~2020-11-19  8:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19  6:16 [dpdk-dev] [PATCH] net/i40e: fix conflict with multi-driver beilei.xing
2020-11-19  6:24 ` Guo, Jia
2020-11-20  8:49 ` beilei.xing [this message]
2020-11-24  5:56   ` [dpdk-dev] [PATCH v2] net/i40e: fix global register recovery Guo, Jia
2020-12-11  2:23     ` Zhang, Qi Z

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:

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

  git send-email \
    --in-reply-to=20201120084947.40064-1-beilei.xing@intel.com \
    --to=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jia.guo@intel.com \
    --cc=stable@dpdk.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git