From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0050.outbound.protection.outlook.com [104.47.36.50]) by dpdk.org (Postfix) with ESMTP id 22D007CCD for ; Fri, 22 Sep 2017 14:12:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=QSPwsssbqGGLoLOOIIsKJW6qoAaD+Ydr7zLXXB2IOiE=; b=FNtBY8/w9nwe+ETNBE9d4sHDBtSY9TVHJGlJIMpC4RrzCenS1IHu+OEqysc95Dat/QrRDqRJSuUkrfKOy+58UJsb9t65bjQpoy2172AYB9eId9VjufNgZ+atb6g9FVf3DKQtckXJ0GKG/O2XPFn1gvgu9BljW3ugva8iOWVBwUE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (122.167.106.177) by CY1PR07MB2522.namprd07.prod.outlook.com (10.167.16.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Fri, 22 Sep 2017 12:12:40 +0000 Date: Fri, 22 Sep 2017 17:42:26 +0530 From: Jerin Jacob To: Nikhil Rao 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 Message-ID: <20170922121225.GA22639@jerin> References: <1506028634-22998-1-git-send-email-nikhil.rao@intel.com> <1506028634-22998-5-git-send-email-nikhil.rao@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1506028634-22998-5-git-send-email-nikhil.rao@intel.com> User-Agent: Mutt/1.9.0 (2017-09-02) X-Originating-IP: [122.167.106.177] X-ClientProxiedBy: BMXPR01CA0001.INDPRD01.PROD.OUTLOOK.COM (10.174.214.139) To CY1PR07MB2522.namprd07.prod.outlook.com (10.167.16.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 371e1c51-0837-40f9-abf9-08d501b33b8d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY1PR07MB2522; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2522; 3:MRMdmEc+Wcef9AL42b3rP3PvCYdez1qJ+WeRaFfluxstgMNhSeP47UXKA2BAzaDp2ZS96AboesF+IGwV1TLOBobzx7emVSlrL4xbyWzqbfJ1wK51nGytJuAu4t+/d0dt1igmd8CUIjvxnwb88vVSXnGrJN6T/uTSlWaLrZQgDm1KZslBd+Jvp/098LR0Yhy4eNbZNu+JXahaCpaAA19SavICt4pRkeOJPqasVlModDSxLlkaf5S3/9vHjjzIsvll; 25:ljn7rw7KLTIv1Sw31fw5MbRKLSMAa58Fm8568q4V3rsu5LGOwr5iVnYs4iV0bSOFF+ValqExD6SN1Fs5MmByE7O/npdIP0cqnr4XO76OFKqmrQY5ApHK2DoQe41zBEqTmrqHE6va9ZSnTPzGgmMzuM+iAJ5Q5XezjMVITrN4BlaNpTd21AT903sMWDKwQM7hTofJP7oj9gz37auAQT08gJPKcotUzkiPUsczNiimhZoLzkf8fbjOBvjYNmXN3WXzEpSnIl3N9OkFReEsR9wccFPVna/eYh6N15uZVQ9nqvHU+vfk6OaxulvUBNs9dQr5al8tYkjoc8EUVbGxdVgROg==; 31:z8zfiOzTfaRpyKcEidq6+395GCa/PN/wwDL5mOaIKlOtxk7KEgtTWhNetBM2DYrPtgmeSriLnrnsb/41kDShOXNPStZLXjKPNeTuva+fdbDKUb0HfcJvQjA0A4qCHACfzimVcWhRbolB58dHjyvx4FjASuSIgJaTOK22hvGeJB0U7altM+bmY/aPZEXcNVhFtBZPFFT5rQQ64AOtDCXoLJtSjubv7joabrT6LN2T76c= X-MS-TrafficTypeDiagnostic: CY1PR07MB2522: X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2522; 20:Rg6cPUYqhZ8aEq2fHs7eMYc79gM0RRowy1GSuTS5TTbXQeh+D90IbHneuE+MvI7ixmzorlVAGcE5wKkR2qeY9gwOYl/5gLG1JUrYHvsp0Z89O0RsTTRlfmQ7+5J03HMqW948/Y7Js5GJ/Ep04Cn37GdcvPVk3aceV/VOuvdsp0vQ1GwIQVOiWTan1cNNUI6vjlTLOC5qNAro6xe8tWwBeRV/A+59/26yYK3zq+BAvgto9e+GuKekV65enKIioNxfmPfnauZiNCcNPKe24F+HTRMUWhn4rY8hdA+TVo7rFNwwFgv1dJrRjs6GV6cBIknGlninYD7+HtciHfTbeEOuZF2/r+gWQloY/jJcjQSAkDQ9ZDeul7IPLooW5LG24c9UdyRF6toZhLrVGuiASQmQTgNIZmWZGHgmjo1YLLZPaelAPD1T1yZTdoJX2rsujiQkC0tpRMsC9F8aPwcd3hMHJiHtgTFJJsebkj/aWB10Zm6+oz+GetQlvAYVmTB1dhcLRci3myHiOiEWlFyZ7zwxy69BTKoNc7Ah2HiXADIrU67ICP31ZpsuLwXgfYzZFUHpA410nGtoxNiLazjcA9ZAuwIHcH7fNuQPZ7FSgHi3zvs= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(3002001)(10201501046)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123558100)(20161123562025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR07MB2522; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR07MB2522; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2522; 4:GxDa7k3YwL3umdOcKg7BXyJ5isFrKkMr4dMG5WCklfyayGVRosSkam2CKYXhMP77kWkntwqjb+76kVX5ZHq5lgLrXnZOZJ1cUJbwhvREgPgdccpmRhuw2PG/0zNIEiZRGMjDLceXoO7n+N6WgHkiF7yldSt/GsH7FKRtxX/YhI0nDEIgLlsWC/WezR7D7wJKwlQ9ZOl6Tp/yzPRD/t8SA+QT7Z+iZUNfaA074gEAHPf+l7hgz0JvVG+BkK5XEMb65UCbsT5KBq+ZTX0puH6TnfTBvuK8ttOGzZ3qPvgKY+w7Zk/Ez84cG4Mr3CSVAvRbf3wXmI9fsbo/rBkL53oXOA== X-Forefront-PRVS: 0438F90F17 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(189002)(13464003)(199003)(478600001)(25786009)(8676002)(101416001)(8936002)(81166006)(16526017)(81156014)(66066001)(50986999)(6246003)(76176999)(54356999)(53936002)(6496005)(33716001)(107886003)(6916009)(72206003)(2950100002)(42882006)(23726003)(4326008)(3846002)(7416002)(47776003)(316002)(1076002)(106356001)(105586002)(6116002)(9686003)(33656002)(68736007)(189998001)(55016002)(50466002)(5660300001)(229853002)(8656003)(2906002)(16586007)(7736002)(6666003)(83506001)(305945005)(97736004)(58126008)(18370500001)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2522; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-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1TOQvJqKCcVFjJKeeuU2PE0ZYVSLhgOQ41w==; 24:Cta9f4/yQewBmmn4IzD0mDApogluYbZPPtZBtI0X5W6HLGCQ7w0F3tXrb9kB2O/CFJpTZF7M0kgrAv5GoEPaQLhMQnRTVYdq8T7p94eC6KE=; 7:ST+QHl+mZ/z17Ebt++TzGTJzgfmqusE/BMMWtIwWZGpeT3qISsiUGGN+kzHsdo1LqiSYjVqCUVs0SvvvRw9crdwsgyyGn0KQY5VSxbXmedroDsv72JGgzCX26h0/1PIe5sP9PnnhkBVVaLUro0VMcQh/Lw4USsFAU/talN795tjQQfGd9GkVlGOaBbj3ca0XKSlKIn/rtpBJ6gXcaDzB7apdFOuxO9+qlgRZlgF8Skw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2017 12:12:40.8019 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2522 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 12:12:48 -0000 -----Original Message----- > Date: Fri, 22 Sep 2017 02:47:14 +0530 > From: Nikhil Rao > 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 > > Signed-off-by: Nikhil Rao > --- > test/test/test_event_eth_rx_adapter.c | 399 ++++++++++++++++++++++++++++++++++ > test/test/Makefile | 1 + > 2 files changed, 400 insertions(+) > create mode 100644 test/test/test_event_eth_rx_adapter.c > > diff --git a/test/test/test_event_eth_rx_adapter.c b/test/test/test_event_eth_rx_adapter.c > new file mode 100644 > index 000000000..5d448dc27 > --- /dev/null > +++ b/test/test/test_event_eth_rx_adapter.c > @@ -0,0 +1,399 @@ > +/*- > + * BSD LICENSE > + * > + * Copyright(c) 2017 Intel Corporation. All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * > + * * Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * * Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in > + * the documentation and/or other materials provided with the > + * distribution. > + * * Neither the name of Intel Corporation nor the names of its > + * contributors may be used to endorse or promote products derived > + * from this software without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + */ > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > + > +#include "test.h" > + > +/* i40e limits max to 64 */ This comment could be removed. > +#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. > + > + 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; > +} > +