From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0064.outbound.protection.outlook.com [104.47.32.64]) by dpdk.org (Postfix) with ESMTP id 68EC51DE9E for ; Mon, 11 Jun 2018 12:36:45 +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:X-MS-Exchange-SenderADCheck; bh=wLjnNb/I6RE/ZsSplQXtLrlvnJBZiEoISWPSY/qj6oo=; b=XgZpiXMfy4OKsqbOGFGyeT8KWNNNmV88KydQg2FM045JRYsV0Cvse2aV82s99TOUU1T4RFRQTy2IAmm2zZP+URbJfzcpRRxMfq4cgwZCreHGLFN/qoVWhKZXJOyjxUpJ/Klw7D3cy49ZGH9LKolnM2Xk4fvR+E9QOj5lbWmC3mc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (115.113.156.3) by BN3PR07MB2516.namprd07.prod.outlook.com (2a01:111:e400:7bbf::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.14; Mon, 11 Jun 2018 10:26:07 +0000 Date: Mon, 11 Jun 2018 15:55:51 +0530 From: Jerin Jacob To: Vipin Varghese Cc: dev@dpdk.org, nikhil.rao@intel.com, deepak.k.jain@intel.com Message-ID: <20180611102550.GB5431@jerin> References: <1526910835-186013-1-git-send-email-vipin.varghese@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1526910835-186013-1-git-send-email-vipin.varghese@intel.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: BM1PR01CA0110.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00::26) To BN3PR07MB2516.namprd07.prod.outlook.com (2a01:111:e400:7bbf::13) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BN3PR07MB2516; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2516; 3:vjqxN5MhgfZbaoVgA41+ygrb9QlO5Ggif67e4ZkPxtBJ3buRt79qY5ywhFozy4U/8qehyCR2aOByK39+hCISMykc1Z/Hz/PmVYBCikAlQhpIUiNXTmWrP1yM2dgofW1r3Wu+yKfxIlIa+MD0Mdr5WuH2PEzoXvU16JgeqRIyht/F02J02YO5e5kS+H8LuR2nYeC6V4TcFEDO9hO8/RSSl05V9kMwnbVNXIoFrlBrQdEkUF2l4u8p3rCuubOSeKra; 25:hdiCHjtm6b9hqgXzlxIPEr+21jOpHQayrSQSYZLTQ+cMyqhtstYqkgR5aqrgTUCF5ATPJBlA2LkSuxki3T/zp+D/rb+bB2kaezpC4J5M97iTPpAnL2E6q0A0IzhwxkAwKlgUb4UObRiNevwvqTc4TMojnxqwlEplF8+B61WdQnkBid8AngMbMps8aATY81/LIgVJiSGCbUdse4g3LgIR6K/99dWf05Nfvgsxfb9XiEHM3g2lRkMdsUIp2AnhnutEikCfofhtSzWdjJZgRgnLioNH81cXHFJXLtdTpvGPlzuqcf09UCodL0o4HKg1ruswIKqQb+B3zGU1wyfRCbE3pw==; 31:iCuC5UJjelL4MxO4ZW9Q7Ppyn+ICpYSCO/TKaXY7rc6C8UFcfxDytwkiTei8rMGZiq8ggGRnSwxlpkX1SLPw1ObCbQZxJ4bdpYyuyEbP7MHv1it6ekEOWvQNQRTi7zcFm/jAnLjFoEnNhusj8+YEK5CZHDkSqzZkP6SLjk5lz511Vn3SNrgsA12zTJjtBzdzi1X9epP093r8DAtSXRCRPc6aVRW2v2im/uNM4U8bJsQ= X-MS-TrafficTypeDiagnostic: BN3PR07MB2516: X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2516; 20:QSvSTG5Dne9EhU/eHRwAqLlBseEnG9DCQHFV1DF14wHlFVAKMA/wrZFgWHzM92BvipfcZIC/urpOK2z5yDa5cT40vg8amGEzF88fukycsha1ajH7YdS4X8qQ+fY9EEf6C9RzxhQy1VzK1YCff/DhaSCdL4V/MKL/L9XJoHSn0o10NJwsBfP7gyLpBUrplwbZqg0oE5UZZV5sFEkDeq8ldsNxq28BMScrsbp7uYdK0KcBIeSvJrfjMNZBGhJiBUNaL7/jW71odgzLwPYF2HzKdyVcQ35jA7X/+IZJ24OrV33IslOyMYXngMjPVdFBnpdj3fdxVpsQrUwvsfqt1bY+ZcX6VLfAtiqOgy19QzbJB//Yw5kdFDBnMhcPr1p4i8dulnsMpKC0xI9fOYDlVTNNDJzRACKo/43lOAjNE1aXPf2PWBwhqeD+8Btn6SjE5mn84CDt6+yhCL5KDXYFw/CGQxZrX4m4pR+QdwBxcFn9xQOEv2kyR2O5+Y5NEdwXGLu0+C1IhuTpk74e+sE8fDKEf+bmMmi4iNylUgEistjfGZfS6VpEgt/vNGetY5GKwn3gWH0uVk7XWBzNd4timnvIXtfqfp2NE8lwfp4X7JLRp+o=; 4:4VCw+WZeRXuWP5fo+SbFXjxnxNTmZ39G4GzhC1FoQjHcaQS/k9aF4u3/HZ69LdEfKYliWKhB9yK0APiA1JHAG4BTdiufbwsAMTGnKHpAL0EodPXnR4xxALmefB7yNTvCNsws3eR2NLYThic4YL4gWQckC4Zpzwr0IOBJLnWr0UrZwWt/pB+yFjnySpCKqhCKKspp4J4lbSOcau3DJV7M+Jldjb29ssx8HguMQXDFZ9Eao4mwtdJa1mXW9T/cQwuKA7S2aYeYcNNy49k/uJmhVYyJ7o4qMC9vCrkc7eO7R1WHZFdM1pL6cliraraZGR4f X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231254)(944501410)(52105095)(93006095)(10201501046)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:BN3PR07MB2516; BCL:0; PCL:0; RULEID:; SRVR:BN3PR07MB2516; X-Forefront-PRVS: 070092A9D3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(39380400002)(39850400004)(346002)(376002)(13464003)(189003)(199004)(6666003)(229853002)(33656002)(1076002)(66066001)(186003)(23726003)(16586007)(58126008)(16526019)(6916009)(26005)(3846002)(6116002)(386003)(76176011)(6496006)(52116002)(8936002)(59450400001)(55236004)(33896004)(316002)(8676002)(33716001)(81156014)(81166006)(446003)(50466002)(72206003)(68736007)(7736002)(305945005)(5660300001)(2906002)(486006)(11346002)(44832011)(476003)(956004)(105586002)(106356001)(478600001)(42882007)(47776003)(4326008)(6246003)(25786009)(97736004)(53936002)(55016002)(9686003)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR07MB2516; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR07MB2516; 23:cKkIbP5cBOpZv1L6bYDpJLhcVz1OMdza16esKCDAU?= =?us-ascii?Q?Y4174akTY2uHUYHATHeaMsK+hwq0mAdkqHSLfCSCyCuUiRZF1j7g/BYJt/P5?= =?us-ascii?Q?dNyY3VR/hXipXPlHxadJ4AUrEx/beo9bvnW7U8ZgOY99Fgb0EWLJs+qV0R6T?= =?us-ascii?Q?4WJD8J0XwTTJOcd12nWs2KjD+BL2aE+1E0ROEt9HiDqu5gzz1Yb9/qDrYy4a?= =?us-ascii?Q?0BWkU9PC8YRKqvVYRh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Fg==; 5:vnavibGojv015QsQQBgW4A92n8+Js58u0qlGRdmRdC2FiaJcoF1QNcLn4KsCC6nwlNEa2ifk5oc7uBt2j3T6Q3IOvqlgjGrsQvC/JEjHqkggndMeMBrfnRKk9XVvAE68ZPTPW7szRSQuWrg3+QiTw+I5j6xEBiunRzj/nlQNLKw=; 24:eoFx9Q1eZP6ODvwNydDk9KaZwKjvCQ0wIzaKXsyl8jeqdC/Ujfpvtwx1eHbxlfzfheiHh9qrmADY5+afxteZorM1UrKqa1XI29NG1IGzlbs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2516; 7:DPF8DDngEeMyKLG+yGaJKP32VDXwJoLq+/nSA6a750kOIX27iIuE7NN1RnlOYeOfEZ/4AfbYhYV3cTahMQjesnOJ/JRWDhiOcChD97F5+Kx0qjsiaNNDmCYHYhHyTGAelWqItZUW+Zn9mV6EvYK1FIasZMqIfKGySHx7iBf+Nk/h3EMxA/HI6uXvZ/KZJ7DX8wW/2dp19OAn4Q40KbyF7mO9qr38bj2EhC5UjitEBVxUlLeYfJi4JK/+NYeGXCv6 X-MS-Office365-Filtering-Correlation-Id: 7b95ff3a-15a3-426d-287a-08d5cf85bff8 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2018 10:26:07.8055 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7b95ff3a-15a3-426d-287a-08d5cf85bff8 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2516 Subject: Re: [dpdk-dev] [PATCH v3] test/eventdev: add multi port test to suite 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: Mon, 11 Jun 2018 10:36:45 -0000 -----Original Message----- > Date: Mon, 21 May 2018 19:23:55 +0530 > From: Vipin Varghese > To: dev@dpdk.org, nikhil.rao@intel.com, deepak.k.jain@intel.com > CC: Vipin Varghese > Subject: [dpdk-dev] [PATCH v3] test/eventdev: add multi port test to suite > X-Mailer: git-send-email 2.7.4 > > Add a new test to enhance the test suite, to allow multiple eth ports > rx queue to be added to rx bridge adapter. Update the test function to > reflect change of port index from 8 to 16 bit > > Signed-off-by: Vipin Varghese > Acked-by: Nikhil Rao Acked-by: Jerin Jacob Applied to dpdk-next-eventdev/master. Thanks. > --- > > Changes in V3: > - removed residue code for capabilities - Nikhil Rao > - removed free instance safe guard - Nikhil Rao > > Changes in V2: > - reprhased the variable names for dtiver - Nikhil Rao > - Initialization removed for driver_name - Nikhil Rao > - removed adapter capability instance - Nikhil Rao > - reprhased comment - Nikhil Rao > --- > test/test/test_event_eth_rx_adapter.c | 71 ++++++++++++++++++++++++++++++++++- > 1 file changed, 70 insertions(+), 1 deletion(-) > > diff --git a/test/test/test_event_eth_rx_adapter.c b/test/test/test_event_eth_rx_adapter.c > index dee632b..d432731 100644 > --- a/test/test/test_event_eth_rx_adapter.c > +++ b/test/test/test_event_eth_rx_adapter.c > @@ -110,12 +110,18 @@ init_ports(int num_ports) > uint16_t portid; > int retval; > > - default_params.mp = rte_pktmbuf_pool_create("packet_pool", > + struct rte_mempool *ptr = rte_mempool_lookup("packet_pool"); > + > + if (ptr == NULL) > + default_params.mp = rte_pktmbuf_pool_create("packet_pool", > NB_MBUFS, > MBUF_CACHE_SIZE, > MBUF_PRIV_SIZE, > RTE_MBUF_DEFAULT_BUF_SIZE, > rte_socket_id()); > + else > + default_params.mp = ptr; > + > if (!default_params.mp) > return -ENOMEM; > > @@ -333,6 +339,68 @@ adapter_queue_add_del(void) > } > > static int > +adapter_multi_eth_add_del(void) > +{ > + int err; > + struct rte_event ev; > + > + uint16_t port_index, drv_id = 0; > + char driver_name[50]; > + > + struct rte_event_eth_rx_adapter_queue_conf queue_config; > + > + ev.queue_id = 0; > + ev.sched_type = RTE_SCHED_TYPE_ATOMIC; > + ev.priority = 0; > + > + queue_config.rx_queue_flags = 0; > + queue_config.ev = ev; > + queue_config.servicing_weight = 1; > + > + /* stop eth devices for existing */ > + port_index = 0; > + for (; port_index < rte_eth_dev_count_total(); port_index += 1) > + rte_eth_dev_stop(port_index); > + > + /* add the max port for rx_adapter */ > + port_index = rte_eth_dev_count_total(); > + for (; port_index < RTE_MAX_ETHPORTS; port_index += 1) { > + sprintf(driver_name, "%s%u", "net_null", drv_id); > + err = rte_vdev_init(driver_name, NULL); > + TEST_ASSERT(err == 0, "Failed driver %s got %d", > + driver_name, err); > + drv_id += 1; > + } > + > + err = init_ports(rte_eth_dev_count_total()); > + TEST_ASSERT(err == 0, "Port initialization failed err %d\n", err); > + > + /* creating new instance for all newly added eth devices */ > + adapter_create(); > + > + /* eth_rx_adapter_queue_add for n ports */ > + port_index = 0; > + for (; port_index < rte_eth_dev_count_total(); port_index += 1) { > + err = rte_event_eth_rx_adapter_queue_add(TEST_INST_ID, > + port_index, 0, > + &queue_config); > + TEST_ASSERT(err == 0, "Expected 0 got %d", err); > + } > + > + /* eth_rx_adapter_queue_del n ports */ > + port_index = 0; > + for (; port_index < rte_eth_dev_count_total(); port_index += 1) { > + err = rte_event_eth_rx_adapter_queue_del(TEST_INST_ID, > + port_index, 0); > + TEST_ASSERT(err == 0, "Expected 0 got %d", err); > + } > + > + adapter_free(); > + > + return TEST_SUCCESS; > +} > + > +static int > adapter_start_stop(void) > { > int err; > @@ -410,6 +478,7 @@ static struct unit_test_suite service_tests = { > TEST_CASE_ST(NULL, NULL, adapter_create_free), > TEST_CASE_ST(adapter_create, adapter_free, > adapter_queue_add_del), > + TEST_CASE_ST(NULL, NULL, adapter_multi_eth_add_del), > TEST_CASE_ST(adapter_create, adapter_free, adapter_start_stop), > TEST_CASE_ST(adapter_create, adapter_free, adapter_stats), > TEST_CASES_END() /**< NULL terminate unit test array */ > -- > 2.7.4 >