* [PATCH 1/2] event/sw: fix missing flow ID init in selftest
@ 2022-10-14 20:37 Olivier Matz
2022-10-14 20:37 ` [PATCH 2/2] event/sw: fix invalid log " Olivier Matz
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Olivier Matz @ 2022-10-14 20:37 UTC (permalink / raw)
To: dev
Cc: Harry van Haaren, Bruce Richardson, David Hunt, Anatoly Burakov,
Morten Brørup, Andrew Rybchenko, stable
The issue is seen by unit tests:
> root@dpdk-VF-dut247:~/dpdk# MALLOC_PERTURB_=204 \
> DPDK_TEST=eventdev_selftest_sw \
> /root/dpdk/x86_64-native-linuxapp-gcc/app/test/dpdk-test -c 0xff
> (...)
> *** Running XStats ID Reset test...
> 12: 1761: qid_0_port_2_pinned_flows value , expected 1 got 7
> 1778: qid_0_port_2_pinned_flows value incorrect, expected 1 got 7
> ERROR - XStats ID Reset test FAILED.
> SW Eventdev Selftest Failed.
> Test Failed
The flow id is not set in the event, which results in an undefined
flow, whose value depends on what was previously in stack. Having
different flows for the packets makes the test to fail, since only one
flow is expected.
This only happens in -O3, where the same stack area is shared by the
event object and the address of the mbuf allocated in rte_gen_arp().
Fix this by properly initializing the flow id.
Bugzilla ID: 1101
Fixes: e21df4b062b5 ("test/eventdev: add SW xstats tests")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
drivers/event/sw/sw_evdev_selftest.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/event/sw/sw_evdev_selftest.c b/drivers/event/sw/sw_evdev_selftest.c
index ed7ae6a685..4f18d66f36 100644
--- a/drivers/event/sw/sw_evdev_selftest.c
+++ b/drivers/event/sw/sw_evdev_selftest.c
@@ -1489,6 +1489,7 @@ xstats_id_reset_tests(struct test *t)
goto fail;
}
ev.queue_id = t->qid[i];
+ ev.flow_id = 0;
ev.op = RTE_EVENT_OP_NEW;
ev.mbuf = arp;
*rte_event_pmd_selftest_seqn(arp) = i;
--
2.30.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] event/sw: fix invalid log in selftest
2022-10-14 20:37 [PATCH 1/2] event/sw: fix missing flow ID init in selftest Olivier Matz
@ 2022-10-14 20:37 ` Olivier Matz
2022-10-19 14:07 ` Jerin Jacob
2022-10-15 8:25 ` [PATCH 1/2] event/sw: fix missing flow ID init " Morten Brørup
2022-10-17 7:30 ` David Marchand
2 siblings, 1 reply; 5+ messages in thread
From: Olivier Matz @ 2022-10-14 20:37 UTC (permalink / raw)
To: dev
Cc: Harry van Haaren, Bruce Richardson, David Hunt, Anatoly Burakov,
Morten Brørup, Andrew Rybchenko, stable
The log should display the value, not the id.
Fixes: e21df4b062b5 ("test/eventdev: add SW xstats tests")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
drivers/event/sw/sw_evdev_selftest.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/event/sw/sw_evdev_selftest.c b/drivers/event/sw/sw_evdev_selftest.c
index 4f18d66f36..834681dbec 100644
--- a/drivers/event/sw/sw_evdev_selftest.c
+++ b/drivers/event/sw/sw_evdev_selftest.c
@@ -1644,8 +1644,8 @@ xstats_id_reset_tests(struct test *t)
}
if (val != port_expected[i]) {
printf("%d: %s value incorrect, expected %"PRIu64
- " got %d\n", __LINE__, port_names[i],
- port_expected[i], id);
+ " got %"PRIu64"\n", __LINE__, port_names[i],
+ port_expected[i], val);
failed = 1;
}
/* reset to zero */
--
2.30.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH 1/2] event/sw: fix missing flow ID init in selftest
2022-10-14 20:37 [PATCH 1/2] event/sw: fix missing flow ID init in selftest Olivier Matz
2022-10-14 20:37 ` [PATCH 2/2] event/sw: fix invalid log " Olivier Matz
@ 2022-10-15 8:25 ` Morten Brørup
2022-10-17 7:30 ` David Marchand
2 siblings, 0 replies; 5+ messages in thread
From: Morten Brørup @ 2022-10-15 8:25 UTC (permalink / raw)
To: Olivier Matz, dev
Cc: Harry van Haaren, Bruce Richardson, David Hunt, Anatoly Burakov,
Andrew Rybchenko, stable
> From: Olivier Matz [mailto:olivier.matz@6wind.com]
> Sent: Friday, 14 October 2022 22.37
>
> The issue is seen by unit tests:
>
> > root@dpdk-VF-dut247:~/dpdk# MALLOC_PERTURB_=204 \
> > DPDK_TEST=eventdev_selftest_sw \
> > /root/dpdk/x86_64-native-linuxapp-gcc/app/test/dpdk-test -c 0xff
> > (...)
> > *** Running XStats ID Reset test...
> > 12: 1761: qid_0_port_2_pinned_flows value , expected 1 got 7
> > 1778: qid_0_port_2_pinned_flows value incorrect, expected 1 got 7
> > ERROR - XStats ID Reset test FAILED.
> > SW Eventdev Selftest Failed.
> > Test Failed
>
> The flow id is not set in the event, which results in an undefined
> flow, whose value depends on what was previously in stack. Having
> different flows for the packets makes the test to fail, since only one
> flow is expected.
>
> This only happens in -O3, where the same stack area is shared by the
> event object and the address of the mbuf allocated in rte_gen_arp().
>
> Fix this by properly initializing the flow id.
>
> Bugzilla ID: 1101
> Fixes: e21df4b062b5 ("test/eventdev: add SW xstats tests")
> Cc: stable@dpdk.org
>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> ---
Series-Acked-by: Morten Brørup <mb@smartsharesystems.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] event/sw: fix missing flow ID init in selftest
2022-10-14 20:37 [PATCH 1/2] event/sw: fix missing flow ID init in selftest Olivier Matz
2022-10-14 20:37 ` [PATCH 2/2] event/sw: fix invalid log " Olivier Matz
2022-10-15 8:25 ` [PATCH 1/2] event/sw: fix missing flow ID init " Morten Brørup
@ 2022-10-17 7:30 ` David Marchand
2 siblings, 0 replies; 5+ messages in thread
From: David Marchand @ 2022-10-17 7:30 UTC (permalink / raw)
To: Olivier Matz
Cc: dev, Harry van Haaren, Bruce Richardson, David Hunt,
Anatoly Burakov, Morten Brørup, Andrew Rybchenko, stable
On Fri, Oct 14, 2022 at 10:38 PM Olivier Matz <olivier.matz@6wind.com> wrote:
>
> The issue is seen by unit tests:
>
> > root@dpdk-VF-dut247:~/dpdk# MALLOC_PERTURB_=204 \
> > DPDK_TEST=eventdev_selftest_sw \
> > /root/dpdk/x86_64-native-linuxapp-gcc/app/test/dpdk-test -c 0xff
> > (...)
> > *** Running XStats ID Reset test...
> > 12: 1761: qid_0_port_2_pinned_flows value , expected 1 got 7
> > 1778: qid_0_port_2_pinned_flows value incorrect, expected 1 got 7
> > ERROR - XStats ID Reset test FAILED.
> > SW Eventdev Selftest Failed.
> > Test Failed
>
> The flow id is not set in the event, which results in an undefined
> flow, whose value depends on what was previously in stack. Having
> different flows for the packets makes the test to fail, since only one
> flow is expected.
>
> This only happens in -O3, where the same stack area is shared by the
> event object and the address of the mbuf allocated in rte_gen_arp().
Good catch.
That's scary...
>
> Fix this by properly initializing the flow id.
>
> Bugzilla ID: 1101
> Fixes: e21df4b062b5 ("test/eventdev: add SW xstats tests")
> Cc: stable@dpdk.org
>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
--
David Marchand
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] event/sw: fix invalid log in selftest
2022-10-14 20:37 ` [PATCH 2/2] event/sw: fix invalid log " Olivier Matz
@ 2022-10-19 14:07 ` Jerin Jacob
0 siblings, 0 replies; 5+ messages in thread
From: Jerin Jacob @ 2022-10-19 14:07 UTC (permalink / raw)
To: Olivier Matz
Cc: dev, Harry van Haaren, Bruce Richardson, David Hunt,
Anatoly Burakov, Morten Brørup, Andrew Rybchenko, stable
On Sat, Oct 15, 2022 at 2:08 AM Olivier Matz <olivier.matz@6wind.com> wrote:
>
> The log should display the value, not the id.
>
> Fixes: e21df4b062b5 ("test/eventdev: add SW xstats tests")
> Cc: stable@dpdk.org
>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> ---
> drivers/event/sw/sw_evdev_selftest.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/event/sw/sw_evdev_selftest.c b/drivers/event/sw/sw_evdev_selftest.c
> index 4f18d66f36..834681dbec 100644
> --- a/drivers/event/sw/sw_evdev_selftest.c
> +++ b/drivers/event/sw/sw_evdev_selftest.c
> @@ -1644,8 +1644,8 @@ xstats_id_reset_tests(struct test *t)
> }
> if (val != port_expected[i]) {
> printf("%d: %s value incorrect, expected %"PRIu64
> - " got %d\n", __LINE__, port_names[i],
> - port_expected[i], id);
> + " got %"PRIu64"\n", __LINE__, port_names[i],
There was merge conflict due to "eventdev: increase xstats ID width to 64 bits".
I have fixed and Series applied to dpdk-next-net-eventdev/for-main. Thanks
> + port_expected[i], val);
> failed = 1;
> }
> /* reset to zero */
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-10-19 14:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-14 20:37 [PATCH 1/2] event/sw: fix missing flow ID init in selftest Olivier Matz
2022-10-14 20:37 ` [PATCH 2/2] event/sw: fix invalid log " Olivier Matz
2022-10-19 14:07 ` Jerin Jacob
2022-10-15 8:25 ` [PATCH 1/2] event/sw: fix missing flow ID init " Morten Brørup
2022-10-17 7:30 ` David Marchand
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).