* [PATCH next] net/vmxnet3: add interrupt handling for reset
@ 2023-05-09 2:15 Ronak Doshi
2023-05-18 16:47 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: Ronak Doshi @ 2023-05-09 2:15 UTC (permalink / raw)
To: Jochen Behrens; +Cc: dev, Ronak Doshi
vmxnet3 should call the reset callback when a queue is stopped
by the host. This patch also fixes a logging issue. Currently,
status of only first queue is checked and logged. But status
of all queues should be checked.
Signed-off-by: Ronak Doshi <doshir@vmware.com>
Acked-by: Jochen Behrens <jbehrens@vmware.com>
---
drivers/net/vmxnet3/vmxnet3_ethdev.c | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 41073e9798..76e80e3025 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1833,6 +1833,7 @@ vmxnet3_process_events(struct rte_eth_dev *dev)
{
struct vmxnet3_hw *hw = dev->data->dev_private;
uint32_t events = hw->shared->ecr;
+ int i;
if (!events)
return;
@@ -1857,16 +1858,28 @@ vmxnet3_process_events(struct rte_eth_dev *dev)
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD,
VMXNET3_CMD_GET_QUEUE_STATUS);
- if (hw->tqd_start->status.stopped)
- PMD_DRV_LOG(ERR, "tq error 0x%x",
- hw->tqd_start->status.error);
+ PMD_DRV_LOG(ERR, "queue error event 0x%x for "
+ RTE_ETHER_ADDR_PRT_FMT, events,
+ hw->perm_addr[0], hw->perm_addr[1],
+ hw->perm_addr[2], hw->perm_addr[3],
+ hw->perm_addr[4], hw->perm_addr[5]);
- if (hw->rqd_start->status.stopped)
- PMD_DRV_LOG(ERR, "rq error 0x%x",
- hw->rqd_start->status.error);
+ for (i = 0; i < hw->num_tx_queues; i++) {
+ if (hw->tqd_start[i].status.stopped)
+ PMD_DRV_LOG(ERR, "tq %d error 0x%x",
+ i, hw->tqd_start[i].status.error);
+ }
+ for (i = 0; i < hw->num_rx_queues; i++) {
+ if (hw->rqd_start[i].status.stopped)
+ PMD_DRV_LOG(ERR, "rq %d error 0x%x",
+ i, hw->rqd_start[i].status.error);
+ }
- /* Reset the device */
/* Have to reset the device */
+ /* Notify the application so that it can reset the device */
+ rte_eth_dev_callback_process(dev,
+ RTE_ETH_EVENT_INTR_RESET,
+ NULL);
}
if (events & VMXNET3_ECR_DIC)
--
2.11.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-18 16:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-09 2:15 [PATCH next] net/vmxnet3: add interrupt handling for reset Ronak Doshi
2023-05-18 16:47 ` Ferruh Yigit
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).