[PATCH 1/5] interrupts: fix number of bytes read for vdev
Stephen Hemminger
stephen at networkplumber.org
Wed Oct 9 06:01:07 CEST 2024
On Mon, 7 Oct 2024 20:33:59 +0530
<skoteshwar at marvell.com> wrote:
> From: Satha Rao <skoteshwar at 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 at dpdk.org
>
> Signed-off-by: Satha Rao <skoteshwar at 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.
More information about the dev
mailing list