* [PATCH 1/5] interrupts: fix number of bytes read for vdev
@ 2024-10-07 15:03 skoteshwar
2024-10-09 4:01 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: skoteshwar @ 2024-10-07 15:03 UTC (permalink / raw)
To: Harman Kalra, Jianfeng Tan; +Cc: dev, Satha Rao, stable
From: Satha Rao <skoteshwar@marvell.com>
Correct the number of bytes to read during vdev interrupt processing.
The driver sets this value, and the rxtx interrupt handling already
performs this correctly.
Fixes: 99998feec90 ("eal/linux: add interrupt type for vdev")
Cc: stable@dpdk.org
Signed-off-by: Satha Rao <skoteshwar@marvell.com>
---
lib/eal/linux/eal_interrupts.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
index 6436f796eb..80eef7ec4b 100644
--- a/lib/eal/linux/eal_interrupts.c
+++ b/lib/eal/linux/eal_interrupts.c
@@ -949,6 +949,10 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)
break;
#endif
case RTE_INTR_HANDLE_VDEV:
+ /* For vdev, number of bytes to read is set by driver */
+ bytes_read = rte_intr_efd_counter_size_get(src->intr_handle);
+ call = true;
+ break;
case RTE_INTR_HANDLE_EXT:
bytes_read = 0;
call = true;
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/5] interrupts: fix number of bytes read for vdev
2024-10-07 15:03 [PATCH 1/5] interrupts: fix number of bytes read for vdev skoteshwar
@ 2024-10-09 4:01 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2024-10-09 4:01 UTC (permalink / raw)
To: skoteshwar; +Cc: Harman Kalra, Jianfeng Tan, dev, stable
On Mon, 7 Oct 2024 20:33:59 +0530
<skoteshwar@marvell.com> wrote:
> From: Satha Rao <skoteshwar@marvell.com>
>
> Correct the number of bytes to read during vdev interrupt processing.
> The driver sets this value, and the rxtx interrupt handling already
> performs this correctly.
>
> Fixes: 99998feec90 ("eal/linux: add interrupt type for vdev")
> Cc: stable@dpdk.org
>
> Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Not sure how this works.
The code in eal_handle_interrupts sits on a epoll_wait() waiting
for next interrupt.
eal_inter_process_interrupts() is called.
The switch you modified decides what needs to be read to clear the interrupt.
If you change RTE_INTR_HANDLE_VDEV to read bytes from the eventfd
by setting bytes_read then the code in this function will read the counter
value from the event fd immediately.
Then when eal_intr_proc_rxtx_intr() is called it will decide to read again.
And since the event is cleared, this read will get EWOULDBLOCK.
What exactly is the issue? How to reproduce it?
Also setting call = true in the switch is wrong.
The code later in eal_intr_process_interrupts that handles bytes_read > 0
already sets call = true if interrupt was cleared from eventfd.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-09 4:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-07 15:03 [PATCH 1/5] interrupts: fix number of bytes read for vdev skoteshwar
2024-10-09 4:01 ` Stephen Hemminger
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).