From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <nikhil.rao@intel.com>
Received: from mga01.intel.com (mga01.intel.com [192.55.52.88])
 by dpdk.org (Postfix) with ESMTP id EE01F2C36
 for <dev@dpdk.org>; Sun, 24 Sep 2017 20:24:44 +0200 (CEST)
Received: from orsmga004.jf.intel.com ([10.7.209.38])
 by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 24 Sep 2017 11:24:43 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.42,433,1500966000"; d="scan'208";a="131872933"
Received: from nikhilr-mobl.amr.corp.intel.com (HELO [10.252.72.116])
 ([10.252.72.116])
 by orsmga004.jf.intel.com with ESMTP; 24 Sep 2017 11:24:39 -0700
To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Cc: bruce.richardson@intel.com, gage.eads@intel.com, dev@dpdk.org,
 thomas@monjalon.net, harry.van.haaren@intel.com, hemant.agrawal@nxp.com,
 nipun.gupta@nxp.com, narender.vangati@intel.com, erik.g.carrillo@intel.com,
 abhinandan.gujjar@intel.com, santosh.shukla@caviumnetworks.com
References: <1506028634-22998-1-git-send-email-nikhil.rao@intel.com>
 <1506028634-22998-5-git-send-email-nikhil.rao@intel.com>
 <20170922121225.GA22639@jerin>
From: "Rao, Nikhil" <nikhil.rao@intel.com>
Message-ID: <3e1ca03f-5f83-5fe6-c96e-c3bda149823a@intel.com>
Date: Sun, 24 Sep 2017 23:54:38 +0530
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
 Thunderbird/52.3.0
MIME-Version: 1.0
In-Reply-To: <20170922121225.GA22639@jerin>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Subject: Re: [dpdk-dev] [PATCH v4 4/4] eventdev: Add tests for event eth Rx
	adapter APIs
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Sun, 24 Sep 2017 18:24:45 -0000

On 9/22/2017 5:42 PM, Jerin Jacob wrote:
> -----Original Message-----
>> Date: Fri, 22 Sep 2017 02:47:14 +0530
>> From: Nikhil Rao <nikhil.rao@intel.com>
>> To: jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com
>> CC: gage.eads@intel.com, dev@dpdk.org, thomas@monjalon.net,
>>   harry.van.haaren@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com,
>>   narender.vangati@intel.com, erik.g.carrillo@intel.com,
>>   abhinandan.gujjar@intel.com, santosh.shukla@caviumnetworks.com
>> Subject: [PATCH v4 4/4] eventdev: Add tests for event eth Rx adapter APIs
>> X-Mailer: git-send-email 2.7.4
>>
>> Add unit tests for rte_event_eth_rx_adapter_xxx() APIs
>
<snip>

>> +#include <string.h>
>> +#include <rte_common.h>
>> +#include <rte_mempool.h>
>> +#include <rte_mbuf.h>
>> +#include <rte_ethdev.h>
>> +#include <rte_eventdev.h>
>> +
>> +#include <rte_event_eth_rx_adapter.h>
>> +
>> +#include "test.h"
>> +
>> +/* i40e limits max to 64 */
> 
> This comment could be removed.
> 
OK, I am documenting why the code doesn't just use 
dev_info.max_rx_queues, won't the comment be useful to retain ?

>> +#define MAX_NUM_RX_QUEUE	64
>> +#define NB_MBUFS		(8192 * num_ports * MAX_NUM_RX_QUEUE)
>> +#define MBUF_CACHE_SIZE		512
>> +#define MBUF_PRIV_SIZE		0
>> +
>> +struct event_eth_rx_adapter_test_params {
>> +	struct rte_mempool *mp;
>> +	uint16_t rx_rings, tx_rings;
>> +	uint32_t caps;
>> +};
>> +
>> +static struct event_eth_rx_adapter_test_params default_params;
>> +
>> +static int
>> +testsuite_setup(void)
>> +{
>> +	int err;
>> +	err = init_ports(rte_eth_dev_count());
>> +	TEST_ASSERT(err == 0, "Port initialization failed err %d\n", err);
> 
> I guess, We check rte_event_dev_count() >= 1 before proceeding.

Yes, I can add the same logic as in test_evendev.
> 
>> +
>> +	struct rte_event_dev_config config = {
>> +			.nb_event_queues = 1,
>> +			.nb_event_ports = 1,
>> +			.nb_events_limit  = 4096,
>> +			.nb_event_queue_flows = 1024,
>> +			.nb_event_port_dequeue_depth = 16,
>> +			.nb_event_port_enqueue_depth = 16
>> +	};
>> +
>> +	err = rte_event_dev_configure(0, &config);
>> +	TEST_ASSERT(err == 0, "Event device initialization failed err %d\n",
>> +			err);
>> +
>> +	err = rte_event_eth_rx_adapter_caps_get(0, 0, &default_params.caps);
>> +	TEST_ASSERT(err == 0, "Failed to get adapter cap err %d\n",
>> +			err);
>> +
>> +	return err;
>> +}
>> +
> 
Thanks for the review,
Nikhil