From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0048.outbound.protection.outlook.com [104.47.41.48]) by dpdk.org (Postfix) with ESMTP id CE36C5B18 for ; Wed, 14 Mar 2018 14:31:15 +0100 (CET) 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=kKy3LeL32CkOfdeJvUYkKN6vsugKs3BN7S6sK5yEY24=; b=JEWU7PewWxNmcQ+bIKA7fxw2vzJkzciSpQdiEBphPtObAw0h5YNZOymhZ11a/CT5cXLU0SX7qXeEvK+UIk4HvHz6JXZreY5NKqCnPqrlXIj75UyAP2Z8Za7zWUDpY7bqeBLTW0QqKoKAd9BUncSM4rhyBf+VHZUReYjQICSsoTw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from ltp-pvn (111.93.218.67) by BN6PR07MB3458.namprd07.prod.outlook.com (10.161.153.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.588.14; Wed, 14 Mar 2018 13:31:10 +0000 Date: Wed, 14 Mar 2018 19:01:04 +0530 From: Pavan Nikhilesh To: Erik Gabriel Carrillo , jerin.jacob@caviumnetworks.com, nipun.gupta@nxp.com, hemant.agrawal@nxp.com Cc: dev@dpdk.org Message-ID: <20180314133103.GB27234@ltp-pvn> References: <1515630074-29020-1-git-send-email-erik.g.carrillo@intel.com> <1520546046-6973-1-git-send-email-erik.g.carrillo@intel.com> <1520546046-6973-6-git-send-email-erik.g.carrillo@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1520546046-6973-6-git-send-email-erik.g.carrillo@intel.com> User-Agent: Mutt/1.9.3 (2018-01-21) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BN6PR11CA0015.namprd11.prod.outlook.com (10.172.17.25) To BN6PR07MB3458.namprd07.prod.outlook.com (10.161.153.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f4aa9fca-3caa-484c-e2ca-08d589afda9f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BN6PR07MB3458; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 3:Hot2svQOy5I+5ePR44R5mu2L+yKeyarEieCtG9fuNQROpZIKqxTf2/X+00yBnwxYrLgeV9Ut5yvYrKwHOuPQIPjgntPkVunWS7Jbz5cMgLZaoDvw6ndOGyg0ZktJgMlja8joDjwRFVlm4XEMvCsCbYo8Tcpx8RQlql+F/eKZECnUxLbYW5MHRShLdNtbLoNsiySabeKEmWp4PKOobq3mgwCoqpr5/QKnE5dJCzlXY8Uk40xLp7SOS0GmRj3nO/1K; 25:qEkOXMRkWN8yPdGxbnx2sQ/7dcoaiuPd9WqUGg6BRODnARWp9abxtQldwlOnWmt8ti86qPr0oB+zpHhw/PoMN6BM2ua3g1222NS4LsfRg/WMGQXQo0AhQbFkwP7/b55LVoAgVVtrW7mrMDxMYbnvAaaqjvFPwT9CztZGidfLRRIo3Y9x941gY5ba5FvkL5uQE0gduDu/jarPTSld58lg0xYgzs+Phdm2HKE59PeEX4sgFDbu6arAs6/jJD9kcxsGl6JrVQLv0u5sk3OmjgRted5jKoYuqB2roGT8QjiJgt35+BgELXofS7MXQI7F0IZ4AOdC8KBq5VunbOQTnBtQsg==; 31:g6OAJgSiT9dKVHs8b6dsoNP7POlGOiWIBhykXuiLo/oO2JAKK4NNrQ893d6j6inXSbxJjEo+FAa0T6bjeeizvh1aiMd0KMexO1PVygoHxwJ0ZcAQ3fjbWCP29SYqlYRxAW7JD2TpqIbXr4BKOe1w8Bwvy/I3K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microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231221)(944501244)(52105095)(93006095)(3002001)(6041310)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:BN6PR07MB3458; BCL:0; PCL:0; RULEID:; SRVR:BN6PR07MB3458; X-Forefront-PRVS: 0611A21987 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(376002)(346002)(39380400002)(396003)(39860400002)(189003)(199004)(2906002)(8656006)(42882007)(8676002)(33716001)(26005)(33896004)(478600001)(9686003)(4326008)(55016002)(2950100002)(305945005)(7736002)(6666003)(81166006)(58126008)(16586007)(72206003)(59450400001)(81156014)(16526019)(386003)(186003)(52116002)(8936002)(76176011)(316002)(6496006)(3846002)(23726003)(97736004)(229853002)(33656002)(105586002)(25786009)(6116002)(106356001)(5660300001)(5009440100003)(47776003)(1076002)(66066001)(53936002)(6246003)(50466002)(68736007)(18370500001)(107986001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3458; H:ltp-pvn; 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-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR07MB3458; 23:YpBxNp+ROxh42XLG/CTwpgSW/qBZMjpwZQ7bgrH67?= =?us-ascii?Q?gF1skqc0XSKCvCsTvI2GfQCojEhrGFU5Zb/uWWihpfynFsEfYxCPtmamlIiJ?= =?us-ascii?Q?bYwUJAyGTtebG/6mBNEedlXtC3uRZ9gqr/hHYQAnwctEJV+2NCi4GkCYTZNM?= =?us-ascii?Q?v8T5d8w8Ma4IpzkehfwnXbWgHHly6DAT1U7nYkgU0U8SPyaCdW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4ZAh80HsO8uanyOw=; 24:oAQuzlnlBNLnyfzHSmge+xND6TODJnI7N/RBjAiSmQ0M96tjfzCmRHXaHmH5S+OF5ziZVl86H3o66T98Rm4fwn6rFZ6xLOdm2ZehAUQWvM4=; 7:AfPLKjwj8Ujau9vtS23N+vOppcRKbXb8AXiHSHqF2V+wv4n0GRh31jTMOfncaINtzlf9uGruz8OZA9Udxf9NdcT23vcWaz/zdTuSiAPk/7m5dd0spXP5Qe5EM2NVXrXAw0Dg1d2w2hyI11S9ICsL2rP/MVCQseqzL9FlMPSUJA3GT3qJrJMEKYBTS5CEAzw8NJCjRX7pD8lKAVjhAJbe4ftvYNp1VRjlNjyAIaJ82WSRFgXM32EZe1LkgFh8yBC5 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2018 13:31:10.3299 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f4aa9fca-3caa-484c-e2ca-08d589afda9f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3458 Subject: Re: [dpdk-dev] [PATCH v7 5/7] test: add event timer adapter auto-test 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, 14 Mar 2018 13:31:16 -0000 Hi Gabriel, Please make sure that the unit tests are generic, I could see that some places it is verifying whether event port is used or service cores are used, but doesn't verify if actually event port/service core are needed i.e. INTERNAL_PORT capability. On Thu, Mar 08, 2018 at 03:54:04PM -0600, Erik Gabriel Carrillo wrote: > Signed-off-by: Erik Gabriel Carrillo > --- > test/test/Makefile | 1 + > test/test/test_event_timer_adapter.c | 1234 ++++++++++++++++++++++++++++++++++ > 2 files changed, 1235 insertions(+) > create mode 100644 test/test/test_event_timer_adapter.c > > + > +/* This port conf callback is used by the max adapter instance creation test. > + * Because that test may be limited by the number of ports available in the > + * event device, this callback allocates just one port and returns it each > + * time a port is requested. > + */ > +static int > +test_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id, > + void *conf_arg) > +{ > + struct rte_eventdev *dev; > + struct rte_event_dev_config dev_conf; > + struct rte_event_port_conf *port_conf, def_port_conf = {0}; > + int started; > + static int port_allocated; > + static uint8_t port_id; > + uint8_t dev_id; > + int ret; > + > + if (port_allocated) { > + *event_port_id = port_id; > + return 0; > + } > + > + RTE_SET_USED(id); > + > + dev = &rte_eventdevs[event_dev_id]; I don't think this is the correct way of accessing event dev information i.e. accessing the global rte_eventdevs structure from a application. > + dev_id = dev->data->dev_id; > + dev_conf = dev->data->dev_conf; > + > + started = dev->data->dev_started; > + if (started) > + rte_event_dev_stop(dev_id); > + > + port_id = dev_conf.nb_event_ports; > + dev_conf.nb_event_ports += 1; > + ret = rte_event_dev_configure(dev_id, &dev_conf); > + if (ret < 0) { > + if (started) > + rte_event_dev_start(dev_id); Shouldn't this be !started ?. The same pattern repeats a few places. > + > + return ret; > + } > + > + if (conf_arg != NULL) > + port_conf = conf_arg; > + else { > + port_conf = &def_port_conf; > + ret = rte_event_port_default_conf_get(dev_id, port_id, > + port_conf); > + if (ret < 0) > + return ret; > + } > + > + ret = rte_event_port_setup(dev_id, port_id, port_conf); > + if (ret < 0) > + return ret; > + > + *event_port_id = port_id; > + > + if (started) > + rte_event_dev_start(dev_id); > + > + port_allocated = 1; > + > + return 0; > +} Thanks, Pavan.