From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 5252A2D13 for ; Wed, 5 Sep 2018 11:38:01 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Sep 2018 02:38:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,333,1531810800"; d="scan'208";a="78119959" Received: from nikhilr-mobl1.amr.corp.intel.com (HELO [10.106.138.18]) ([10.106.138.18]) by FMSMGA003.fm.intel.com with ESMTP; 05 Sep 2018 02:37:56 -0700 To: Pavan Nikhilesh , jerin.jacob@caviumnetworks.com, anoob.joseph@caviumnetworks.com Cc: dev@dpdk.org References: <20180904141223.24216-1-pbhagavatula@caviumnetworks.com> <20180904141223.24216-3-pbhagavatula@caviumnetworks.com> <20180905085434.GA2858@ltp-pvn> From: "Rao, Nikhil" Message-ID: Date: Wed, 5 Sep 2018 15:07:55 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180905085434.GA2858@ltp-pvn> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 3/4] app/test-eventdev: add Tx adapter support 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 09:38:01 -0000 On 9/5/2018 2:24 PM, Pavan Nikhilesh wrote: > On Wed, Sep 05, 2018 at 12:24:18PM +0530, Rao, Nikhil wrote: >> On 9/4/2018 7:42 PM, Pavan Nikhilesh wrote: >>> Convert existing Tx service based pipeline to Tx adapter based APIs and >>> simplify worker functions. >>> >>> Signed-off-by: Pavan Nikhilesh >>> --- >>> app/test-eventdev/test_pipeline_atq.c | 269 ++++++++++++----------- >>> app/test-eventdev/test_pipeline_common.c | 206 +++++------------ >>> app/test-eventdev/test_pipeline_common.h | 62 +++--- >>> app/test-eventdev/test_pipeline_queue.c | 241 ++++++++++---------- >>> 4 files changed, 367 insertions(+), 411 deletions(-) >>> >>> diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c >>> index 832ab8b6e..ab407dbbb 100644 >>> --- a/app/test-eventdev/test_pipeline_common.c >>> +++ b/app/test-eventdev/test_pipeline_common.c >>> @@ -5,58 +5,6 @@ >>> >>> >>> @@ -215,7 +160,6 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt) >>> { >>> uint16_t i; >>> uint8_t nb_queues = 1; >>> - uint8_t mt_state = 0; >>> struct test_pipeline *t = evt_test_priv(test); >>> struct rte_eth_rxconf rx_conf; >>> struct rte_eth_conf port_conf = { >>> @@ -238,13 +182,21 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt) >>> return -ENODEV; >>> } >>> >>> + t->internal_port = 0; >>> RTE_ETH_FOREACH_DEV(i) { >>> struct rte_eth_dev_info dev_info; >>> struct rte_eth_conf local_port_conf = port_conf; >>> + uint32_t caps = 0; >>> + >>> + rte_event_eth_tx_adapter_caps_get(opt->dev_id, i, &caps); >>> + if ((caps & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) { >>> + t->internal_port = 1; >>> + } else if (t->internal_port == 1) { >>> + evt_err("Eventdev can't use %d port", i); >>> + return -EINVAL; >>> + } >>> >> Shouldn't this function also return -EINVAL for the case where >> internal_port = 0 for i = 0, and internal_port = 1 for i = 1 ? > > I think it would be better to force all the ports to use the non-internal cap > mode when we detect that one of the port doesn't have internal port capability > rather than exiting. This was the behaviour previously it will leave room to > support both the pipeline models in future. Agreed. Nikhil