From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 55F0BF11 for ; Wed, 5 Sep 2018 15:54:00 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Sep 2018 06:53:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,333,1531810800"; d="scan'208";a="83242319" Received: from unknown (HELO localhost.localdomain.localdomain) ([10.224.122.193]) by fmsmga002.fm.intel.com with ESMTP; 05 Sep 2018 06:53:43 -0700 From: Nikhil Rao To: jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org, Nikhil Rao Date: Wed, 5 Sep 2018 19:21:06 +0530 Message-Id: <1536155466-154216-2-git-send-email-nikhil.rao@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1536155466-154216-1-git-send-email-nikhil.rao@intel.com> References: <1536149012-47081-1-git-send-email-nikhil.rao@intel.com> <1536155466-154216-1-git-send-email-nikhil.rao@intel.com> Subject: [dpdk-dev] [PATCH v2 2/2] test/event: fix Rx adapter intr autotest for skeleton PMD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2018 13:54:00 -0000 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: nikhil.rao@intel.com Signed-off-by: Nikhil Rao --- test/test/test_event_eth_rx_adapter.c | 37 +++++++++++++++++++++-------------- 1 file 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 29d0ff5..937a49e 100644 --- a/test/test/test_event_eth_rx_adapter.c +++ b/test/test/test_event_eth_rx_adapter.c @@ -547,11 +547,13 @@ struct event_eth_rx_adapter_test_params { /* 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; @@ -561,11 +563,13 @@ struct event_eth_rx_adapter_test_params { &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, @@ -583,11 +587,14 @@ struct event_eth_rx_adapter_test_params { /* 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, -- 1.8.3.1