test: fix ring PMD initialisation
authorKonstantin Ananyev <konstantin.ananyev@intel.com>
Tue, 26 Oct 2021 11:19:43 +0000 (12:19 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 26 Oct 2021 17:59:26 +0000 (19:59 +0200)
commitb66412f24f17fcba5a248888bf4b3c1f5d6880de
tree5d834f5da2cd8b95c0f0bf7b59ec6730258ff5a6
parent6c390cee976e33b1e9d8562d32c9d3ebe5d9ce94
test: fix ring PMD initialisation

(bitratestats_autotest|latencystats_autotest|pdump_autotest) tests
generate a log of error messages like that:

test_packet_forward() line 104: Error sending packet to port 0
Send pkts Failed

These tests use of app/test/sample_packet_forward.* code.
This code creates a portid from a ring, but doesn't properly
configure/start it.
The fix adds code to configure/start given port before usage.

Fixes: 7a0935239b9e ("ethdev: make fast-path functions to use new flat array")
Fixes: a52966cd48fd ("test: add helpers using ring PMD Rx/Tx")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: David Marchand <david.marchand@redhat.com>
app/test/sample_packet_forward.c
app/test/sample_packet_forward.h
app/test/test_bitratestats.c
app/test/test_latencystats.c
app/test/test_pdump.c