patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Jiawen Wu <jiawenwu@trustnetic.com>
To: dev@dpdk.org
Cc: Jiawen Wu <jiawenwu@trustnetic.com>, stable@dpdk.org
Subject: [PATCH 16/19] net/txgbe: fix Rx interrupt
Date: Tue, 18 Jun 2024 15:11:47 +0800	[thread overview]
Message-ID: <20240618071150.21564-17-jiawenwu@trustnetic.com> (raw)
In-Reply-To: <20240618071150.21564-1-jiawenwu@trustnetic.com>

Fix Rx interrupt enable failure.

Fixes: a5682d28f134 ("net/txgbe: support Rx interrupt")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c    | 18 +++++++++---------
 drivers/net/txgbe/txgbe_ethdev_vf.c |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 26cf7632c3..700be8f83c 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -3852,13 +3852,13 @@ txgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
 	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
 
 	if (queue_id < 32) {
-		mask = rd32(hw, TXGBE_IMS(0));
-		mask &= (1 << queue_id);
-		wr32(hw, TXGBE_IMS(0), mask);
+		mask = rd32(hw, TXGBE_IMC(0));
+		mask |= (1 << queue_id);
+		wr32(hw, TXGBE_IMC(0), mask);
 	} else if (queue_id < 64) {
-		mask = rd32(hw, TXGBE_IMS(1));
-		mask &= (1 << (queue_id - 32));
-		wr32(hw, TXGBE_IMS(1), mask);
+		mask = rd32(hw, TXGBE_IMC(1));
+		mask |= (1 << (queue_id - 32));
+		wr32(hw, TXGBE_IMC(1), mask);
 	}
 	rte_intr_enable(intr_handle);
 
@@ -3873,11 +3873,11 @@ txgbe_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
 
 	if (queue_id < 32) {
 		mask = rd32(hw, TXGBE_IMS(0));
-		mask &= ~(1 << queue_id);
+		mask |= (1 << queue_id);
 		wr32(hw, TXGBE_IMS(0), mask);
 	} else if (queue_id < 64) {
 		mask = rd32(hw, TXGBE_IMS(1));
-		mask &= ~(1 << (queue_id - 32));
+		mask |= (1 << (queue_id - 32));
 		wr32(hw, TXGBE_IMS(1), mask);
 	}
 
@@ -3911,7 +3911,7 @@ txgbe_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
 		wr32(hw, TXGBE_IVARMISC, tmp);
 	} else {
 		/* rx or tx causes */
-		/* Workaround for ICR lost */
+		msix_vector |= TXGBE_IVAR_VLD; /* Workaround for ICR lost */
 		idx = ((16 * (queue & 1)) + (8 * direction));
 		tmp = rd32(hw, TXGBE_IVAR(queue >> 1));
 		tmp &= ~(0xFF << idx);
diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c
index 87f76673d7..d075f9d232 100644
--- a/drivers/net/txgbe/txgbe_ethdev_vf.c
+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c
@@ -971,7 +971,7 @@ txgbevf_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
 		wr32(hw, TXGBE_VFIVARMISC, tmp);
 	} else {
 		/* rx or tx cause */
-		/* Workaround for ICR lost */
+		msix_vector |= TXGBE_VFIVAR_VLD; /* Workaround for ICR lost */
 		idx = ((16 * (queue & 1)) + (8 * direction));
 		tmp = rd32(hw, TXGBE_VFIVAR(queue >> 1));
 		tmp &= ~(0xFF << idx);
-- 
2.27.0


      parent reply	other threads:[~2024-06-18  7:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240618071150.21564-1-jiawenwu@trustnetic.com>
2024-06-18  7:11 ` [PATCH 01/19] net/txgbe: fix to parse tunnel packets Jiawen Wu
2024-06-18  7:11 ` [PATCH 02/19] net/txgbe: fix flow filters in VT mode Jiawen Wu
2024-06-18  7:11 ` [PATCH 03/19] net/txgbe: fix Tx hang on queue disable Jiawen Wu
2024-06-18  7:11 ` [PATCH 04/19] net/txgbe: restrict the configuration of VLAN strip offload Jiawen Wu
2024-06-18  7:11 ` [PATCH 05/19] net/txgbe: reconfigure more MAC Rx registers Jiawen Wu
2024-06-18  7:11 ` [PATCH 06/19] net/txgbe: fix VF promiscuous and allmulticast Jiawen Wu
2024-06-18  7:11 ` [PATCH 07/19] net/ngbe: special config for YT8531SH-CA PHY Jiawen Wu
2024-06-18  7:11 ` [PATCH 08/19] net/ngbe: keep PHY power down while device probing Jiawen Wu
2024-06-18  7:11 ` [PATCH 10/19] net/txgbe: fix hotplug remove Jiawen Wu
2024-06-18  7:11 ` [PATCH 11/19] net/ngbe: " Jiawen Wu
2024-06-18  7:11 ` [PATCH 12/19] net/txgbe: correct valid MTU range Jiawen Wu
2024-06-18  7:11 ` [PATCH 13/19] net/ngbe: " Jiawen Wu
2024-06-18  7:11 ` [PATCH 14/19] net/txgbe: fix memory leak Jiawen Wu
2024-06-18  7:11 ` [PATCH 15/19] net/ngbe: " Jiawen Wu
2024-06-18  7:11 ` Jiawen Wu [this message]

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=20240618071150.21564-17-jiawenwu@trustnetic.com \
    --to=jiawenwu@trustnetic.com \
    --cc=dev@dpdk.org \
    --cc=stable@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).