summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNikhil Rao <nikhil.rao@intel.com>2018-09-25 12:49:05 +0530
committerJerin Jacob <jerin.jacob@caviumnetworks.com>2018-10-01 16:54:47 +0200
commit9b4631be9d8a5bda647d0240b2e965fd8573e6d4 (patch)
tree3d4df80ee5ce16390ca1455e288d6052cfcc7d24 /test
parent83294c61690fee57bfc153bfa7a9a3e9afc09fbe (diff)
downloaddpdk-9b4631be9d8a5bda647d0240b2e965fd8573e6d4.zip
dpdk-9b4631be9d8a5bda647d0240b2e965fd8573e6d4.tar.gz
dpdk-9b4631be9d8a5bda647d0240b2e965fd8573e6d4.tar.xz
test/event: fix Rx adapter intr test for skeleton PMD
Skeleton PMD does not support RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ so make the Rx queue_id = -1 and initialize the event port configuration to zero. Fixes: d65856999dd6 ("test/event: add Rx adapter tests for interrupt driven queues") Cc: stable@dpdk.org Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Diffstat (limited to 'test')
-rw-r--r--test/test/test_event_eth_rx_adapter.c37
1 files changed, 22 insertions, 15 deletions
diff --git a/test/test/test_event_eth_rx_adapter.c b/test/test/test_event_eth_rx_adapter.c
index 1dcc092..1d3be82 100644
--- a/test/test/test_event_eth_rx_adapter.c
+++ b/test/test/test_event_eth_rx_adapter.c
@@ -535,11 +535,13 @@ adapter_intr_queue_add_del(void)
/* weight = 0 => interrupt mode */
queue_config.servicing_weight = 0;
- /* add queue 0 */
- err = rte_event_eth_rx_adapter_queue_add(TEST_INST_ID,
- TEST_ETHDEV_ID, 0,
- &queue_config);
- TEST_ASSERT(err == 0, "Expected 0 got %d", err);
+ if (cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ) {
+ /* add queue 0 */
+ err = rte_event_eth_rx_adapter_queue_add(TEST_INST_ID,
+ TEST_ETHDEV_ID, 0,
+ &queue_config);
+ TEST_ASSERT(err == 0, "Expected 0 got %d", err);
+ }
/* add all queues */
queue_config.servicing_weight = 0;
@@ -549,11 +551,13 @@ adapter_intr_queue_add_del(void)
&queue_config);
TEST_ASSERT(err == 0, "Expected 0 got %d", err);
- /* del queue 0 */
- err = rte_event_eth_rx_adapter_queue_del(TEST_INST_ID,
- TEST_ETHDEV_ID,
- 0);
- TEST_ASSERT(err == 0, "Expected 0 got %d", err);
+ if (cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ) {
+ /* del queue 0 */
+ err = rte_event_eth_rx_adapter_queue_del(TEST_INST_ID,
+ TEST_ETHDEV_ID,
+ 0);
+ TEST_ASSERT(err == 0, "Expected 0 got %d", err);
+ }
/* del remaining queues */
err = rte_event_eth_rx_adapter_queue_del(TEST_INST_ID,
@@ -571,11 +575,14 @@ adapter_intr_queue_add_del(void)
/* intr -> poll mode queue */
queue_config.servicing_weight = 1;
- err = rte_event_eth_rx_adapter_queue_add(TEST_INST_ID,
- TEST_ETHDEV_ID,
- 0,
- &queue_config);
- TEST_ASSERT(err == 0, "Expected 0 got %d", err);
+
+ if (cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ) {
+ err = rte_event_eth_rx_adapter_queue_add(TEST_INST_ID,
+ TEST_ETHDEV_ID,
+ 0,
+ &queue_config);
+ TEST_ASSERT(err == 0, "Expected 0 got %d", err);
+ }
err = rte_event_eth_rx_adapter_queue_add(TEST_INST_ID,
TEST_ETHDEV_ID,