From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM05-BY2-obe.outbound.protection.outlook.com (mail-by2nam05hn0234.outbound.protection.outlook.com [104.47.50.234]) by dpdk.org (Postfix) with ESMTP id 135DE1B53 for ; Sun, 22 Jul 2018 13:33:11 +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=Cfx9vi1RWAUA7M0pJHygwaAhO5uoE9/wesK41RH+qTM=; b=LICJqcFWZKBZLzkee7TbGbbYpaIJV7VFezWY6OMreA2hurIj0g+rev/pRoBO7u6HseG7/lGWi5htni2lhkc1SOV0y929pSGjWqqezVP/4EuADeQTvYgM1f+IUWuT/z/Rm4R5h97Ib67DUgjy9NswtsrEOGYFeHzGRpfyUS8EUlw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (122.178.198.214) by DM6PR07MB5004.namprd07.prod.outlook.com (2603:10b6:5:25::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Sun, 22 Jul 2018 11:33:06 +0000 Date: Sun, 22 Jul 2018 17:02:56 +0530 From: Jerin Jacob To: Mattias =?iso-8859-1?Q?R=F6nnblom?= Cc: dev@dpdk.org, bruce.richardson@intel.com Message-ID: <20180722113254.GA30026@jerin> References: <20180711210844.5467-1-mattias.ronnblom@ericsson.com> <20180711210844.5467-2-mattias.ronnblom@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180711210844.5467-2-mattias.ronnblom@ericsson.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [122.178.198.214] X-ClientProxiedBy: SG2PR02CA0031.apcprd02.prod.outlook.com (2603:1096:3:18::19) To DM6PR07MB5004.namprd07.prod.outlook.com (2603:10b6:5:25::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 045131e9-c58e-4403-9959-08d5efc6e629 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600073)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:DM6PR07MB5004; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5004; 3:Tz6078EXWeLOW84cLFeLcliGU6UDHjCPjhY3j4WtdHSQhvOqXpwPMPiCmdOxO2XTUZVtB3qM7UPPu6yJgu8LjnNOjSKCfw0tS+mqa0QyqtA98RsKpfnvl7uzh//fK5mJ6IJk7GCPG17mA/iZXK6YXVyljHjsRiR8vfR+dEMIX+6hdsKquZWLq0MhFjQn/zJ3vrZo8lAwaaAbVdWGppJiknM+g/uDLdd7le23a+rPAIoc6dqtjIFhuASfr6OnzDR9; 25:eS9ET6XhVAW5xD6XdjpFIRBNz2mqpv5cqCs0zw3Jnl9tSpdgH61kmaxEnImaU4fzQMtHPopPqKYWwyx9zUR40q4rL3AfoMD8JhZO0ZVWY8k++8ucrP0khI710RthxIb3MnJuCaCbw++4HLH4Sd1/OWJXB786c7zJbkvLuOlIvFaRj0Q+eVT0M/eQEoz5oMJEQTuJ01Gze5deZ6e2q1wM7oReiYCuKu9zDjL80hfwPwOH6UIVJxQ97IVwL4Ty5GnPt4YiKiSqBz7mgbqS44Ehgbqrhrsb1G7VsXSvFgEgwN+67L8ArT4RfdZGl6BJmcCCtu/wwLbUglKZ7UgKjGkeAA==; 31:3CgCcPMZdNrcGyZlJNXe9jFh8/KzkpmiR7g53snZQgZSPYrLSUIQ4xdWn2B/xRZiXk1HnRkE3YAK5HsBk9yZ6F7Voejzr617ZoRn+ETS1c5TCDvxman863iWZ1tciBc+qxQo+4x9afucPJun8TmhMQ/yckPp4rCjVCWeFzqNn7/Bx2N5D/CiC6robwA3GQIyD0y0fiG60k3BrKZMVoHt0HmIuj22dg1RvIOki5uGa8s= X-MS-TrafficTypeDiagnostic: DM6PR07MB5004: X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5004; 20:y5SdqVsDMPWXb9CD/07OwpMNn8O4wP7m8pdZsnD2tN2GAtprKBrlTiNgoiE+EUYNDAqosVCtekmzTHwgL9UgCJZEh0r8GJ5/Ecgx++eE6VShK/k6pGbMHlKkXLNXcQGspPLlOu9unq6nv5UNvgA9lc+/NyFWPKponIi3aFT8YxjOhhuRSeDesK7UZ9v6IM1Af02YvTjnepcFxxDq19a4CwcQGL9RPfHmvWpQmwpTaYBhMdoD/5KvUXFEiWsgjm5Wez44+/79wPJanObVJovi8nEAFrRTJ7iYqSiMuOmFMfPLgNKkvZpfOr1tTBt+3IuyjfcUPfcWaRk1quJWEpuflQkGULnzhRn17Ec9F2auscndRxmHwEc9Uqp9+78ggrraGo6BrtitK3cOyQpjrk/QXAGPBTGii2+39ex3dCvmkMwj+2/FJqbn3L72HKrw1DGLF53ZKmv41Z2LGHbHajtZKZFqt665BYYiaDfz1zgaVnwKLpi1uAozX6D6C+D4u4TImnIQKIM9Y6jD/Eso9xx/NxoZDPtA6NwOaygMM1qjND2059mC0pUeKAafP+oq+5jC85MXizMQTs1GZlfV5Lje5+2U9e5jXZfpvXNx6VYS9Ws= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(37575265505322)(66839620246622)(248295561703944)(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(3002001)(3231311)(2232096)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:DM6PR07MB5004; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB5004; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5004; 4:tCA81r+KxiEeaKKpKnLo0Xlb+d+4zfLdAuchnwAEUzAoE0otSL3kvVe0AgszB+Uy8ot4cDOmKklGZyPSMYQGer0gmzgE+0TqOw71izZo0YssmeY2Mawl1Ti4ZgupFACw6zZ1b7B5nT60yTWGlw0nd+3GH0LbXNoqC4JupDfB7eokSMA/4S/gxhx02xCRU89k2tBnfJSUnU7DTuD1yeK5Bw7wEh/J46BKuFJFD1C1PlW7huxIBZIqyRZw63sl9KVoBle8T7BWosVkmc6NTBg14cc+Cq94p0vPHpLe88CUlCqWJd+/LQ+oU23ezbrX/EagjSRzMCfF8xsUTbHh7q/oZXnjsdLsoqmhL9FTObjczoDlctE4AEoYzEr3EpGHUUkpuyhqvNxWxbwwamTnTR+FoB66lzOFnHpi06YU0cDIq6s= X-Forefront-PRVS: 0741C77572 X-Forefront-Antispam-Report: SFV:SPM; SFS:(10009020)(376002)(346002)(136003)(396003)(39860400002)(366004)(199004)(13464003)(189003)(58126008)(81156014)(97736004)(6246003)(81166006)(2870700001)(8936002)(316002)(68736007)(476003)(44832011)(53936002)(3846002)(446003)(6116002)(4326008)(2906002)(478600001)(486006)(8676002)(186003)(52146003)(2486003)(6666003)(6916009)(47776003)(229853002)(305945005)(7736002)(956004)(50466002)(6496006)(25786009)(76176011)(5660300001)(42882007)(23676004)(9686003)(105586002)(106356001)(55016002)(33716001)(33896004)(33656002)(1076002)(26005)(52116002)(72206003)(386003)(11346002)(66066001)(16526019)(14444005)(59010400001)(18370500001); DIR:OUT; SFP:1501; SCL:5; SRVR:DM6PR07MB5004; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTZQUjA3TUI1MDA0OzIzOmRnVFBySUg4MTRpbkVBbUFtTzQ2WlF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B0e6OkS3bhuZ8zXw77UDvEwGQJLRqhkD82p3SM+HB0rwWBpvVYEHj1Hk/PY0O5cxQpsTcac/VGU/jV14oN9BPZltj2dVtYy1fawPxAYwHiOrbWcaqrcJckknoEsGK76FaCLOqYshVJIft4RF9MCn7jxsSyMimZJimQvN1et3E81ePScnlchIMgM06lovleM3KSkOrJkWplUbui/h/lJgM2d8+emCtnITnxo+RnGA/JP/85nv8+8uegSD4vozjetEZAT8uv61Olr/53QnVf9qMAlkDvD5qklLE8yDxky06MJ67zBwYdVrQ1nl9B+q7q90//Pmq6aUzjjnAGsH1CjLyLynN4IwgNKfNrvPCHzJheMuQ51F80Ar9y3vdCAwOG1709aJcMBKxBmy07; 5:CseheIVvwi1NSWCwx88bBG02DxkJUJY37er1jpu30VwXPw3Ig1E3sl5DsdWSJh2T3kaOkS8Kzu60ycmHkSARgGWyLCrA+Q/QT0g67AflMbgs8mDEnTgFa+ZRvrLfrOCoIRvdIkwGHAmEokCcNeXJyBs6+OvxX6ocvTkxVgXHZjE=; 7:BPevORfeIfcFEsci7j7qI3OXoCqnY0GUbICd/lidt7webKaDC6iWDM8+sorVEvSdOKRy3qqjFEs6F3a+1FJynZuCmDiN2l8SenkCngkAf3lUopmzGw6MqqiWPl3yIGYvGeOHjgAL6RZlKIyVv8bhEnyy7rrUmgtmXwT8CsJ2v7wUylngNifM0XHnJf+C8eTmWnt7nD9f4RVvKTty4gp8/ZhVJZy9DAWR1GJJFkjbiePvXK9G6UbjB7I11npZwii1 SpamDiagnosticOutput: 1:22 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2018 11:33:06.9810 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 045131e9-c58e-4403-9959-08d5efc6e629 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB5004 Subject: Re: [dpdk-dev] [RFC 1/1] eventdev: add distributed software (DSW) event device 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: Sun, 22 Jul 2018 11:33:12 -0000 -----Original Message----- > Date: Wed, 11 Jul 2018 23:08:44 +0200 > From: Mattias Rönnblom > To: dev@dpdk.org > CC: jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com, Mattias > Rönnblom > Subject: [RFC 1/1] eventdev: add distributed software (DSW) event device > X-Mailer: git-send-email 2.17.1 > > > Signed-off-by: Mattias Rönnblom Thanks Mattias for a yet another eventdev driver. Since it can work as distributed scheduler, it is complementary to existing SW scheduler. A few comments: 1) There is compilation error in my setup /export/dpdk-next-eventdev/drivers/event/dsw/dsw_event.c: In function ‘dsw_port_consider_migration’: /export/dpdk-next-eventdev/drivers/event/dsw/dsw_event.c:346:39: error: ‘current_burst’ may be used uninitialized in this function [-Werror=maybe-uninitialized] ((int)((((_qf)->queue_id)<<16)|((_qf)->flow_hash))) 2) Please split the patch as more logical one.s You see the git history of driver/event/sw to get idea on the patch split. 3) Please update the documentation @ doc/guides/eventdevs/ > --- > config/common_base | 5 + > drivers/event/Makefile | 1 + meson build support is missing. > drivers/event/dsw/Makefile | 28 + > drivers/event/dsw/dsw_evdev.c | 361 +++++ > drivers/event/dsw/dsw_evdev.h | 296 ++++ > drivers/event/dsw/dsw_event.c | 1285 +++++++++++++++++ > drivers/event/dsw/dsw_sort.h | 47 + > drivers/event/dsw/dsw_xstats.c | 284 ++++ > .../event/dsw/rte_pmd_evdev_dsw_version.map | 3 + > mk/rte.app.mk | 1 + > 10 files changed, 2311 insertions(+) > index 000000000..39008f7eb > --- /dev/null > +++ b/drivers/event/dsw/dsw_evdev.c > @@ -0,0 +1,361 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2018 Ericsson AB > + */ > + > +#include > +#include > +#include > +#include sort it in alphabetical order. > + > +#include "dsw_evdev.h" > + > +static int > +dsw_start(struct rte_eventdev *dev) > +{ > + struct dsw_evdev *dsw = dsw_pmd_priv(dev); > + uint16_t i; > + uint64_t now; > + > + rte_atomic32_init(&dsw->credits_on_loan); > + > + initial_flow_to_port_assignment(dsw); > + > + now = rte_get_timer_cycles(); > + for (i = 0; i < dsw->num_ports; i++) { > + dsw->ports[i].measurement_start = now; > + dsw->ports[i].busy_start = now; > + } > + > + return 0; > +} > + > +static void > +dsw_stop(struct rte_eventdev *dev __rte_unused) > +{ You may implement, eventdev_stop_flush_t callback to free up the outstanding events in the eventdev. > +} > + > +static int > +dsw_close(struct rte_eventdev *dev) > +{ > + struct dsw_evdev *dsw = dsw_pmd_priv(dev); > + > + dsw->num_ports = 0; > + dsw->num_queues = 0; > + > + return 0; > +} > + > +static struct rte_eventdev_ops dsw_evdev_ops = { > + .dev_infos_get = dsw_info_get, > + .dev_configure = dsw_configure, > + .dev_start = dsw_start, > + .dev_stop = dsw_stop, > + .dev_close = dsw_close, > + .port_setup = dsw_port_setup, > + .port_def_conf = dsw_port_def_conf, > + .port_release = dsw_port_release, > + .queue_setup = dsw_queue_setup, > + .queue_def_conf = dsw_queue_def_conf, > + .queue_release = dsw_queue_release, > + .port_link = dsw_port_link, > + .port_unlink = dsw_port_unlink, > +#ifdef DSW_XSTATS Instead of creating a lot of "DSW_XSTATS" defines in this file, How about creating NOP version of xstats functions when ifndef DSW_XSTATS as different file? So that #ifdef clutter will go way. > + .xstats_get = dsw_xstats_get, > + .xstats_get_names = dsw_xstats_get_names, > + .xstats_get_by_name = dsw_xstats_get_by_name > +#endif > +}; > + > +static int > +dsw_probe(struct rte_vdev_device *vdev) > +{ > + const char *name; > + struct rte_eventdev *dev; > + struct dsw_evdev *dsw; > + > + name = rte_vdev_device_name(vdev); > + Please add secondary process check. See SW driver. > +RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_DSW_PMD, evdev_dsw_pmd_drv); > diff --git a/drivers/event/dsw/dsw_evdev.h b/drivers/event/dsw/dsw_evdev.h > new file mode 100644 > index 000000000..e6b34c013 > --- /dev/null > +++ b/drivers/event/dsw/dsw_evdev.h > @@ -0,0 +1,296 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2018 Ericsson AB > + */ > + > +#ifndef _DSW_EVDEV_H_ > +#define _DSW_EVDEV_H_ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include sort it in alphabetical order. > + > +#define DSW_PMD_NAME RTE_STR(event_dsw) > + > + > +/* Only one outstanding migration per port is allowed */ > +#define DSW_MAX_PAUSED_FLOWS (DSW_MAX_PORTS) > + > +/* Enough room for paus request/confirm and unpaus request/confirm for > + * all possible senders. > + */ > +#define DSW_CTL_IN_RING_SIZE ((DSW_MAX_PORTS-1)*4) > + > +/* Statistics is configurable at this point, mostly to make it easy to > + * measure their performance impact. > + */ > +#define DSW_XSTATS It can be moved to main config area. > + > +/* With DSW_SORT_DEQUEUED enabled, the scheduler will, at the point of > + * dequeue(), arrange events so that events with the same flow id on > + * the same queue forms a back-to-back "burst", and also so that such > + * bursts of different flow ids, but on the same queue, also come > + * consecutively. All this in an attempt to improve data and > + * instruction cache usage for the application, at the cost of a > + * scheduler overhead increase. > + */ > + > +//#define DSW_SORT_DEQUEUED Checkpatch will complain about cpp style of comments. > + > +struct dsw_queue_flow { > + uint8_t queue_id; > + uint16_t flow_hash; > +}; > + > +enum dsw_migration_state { > + DSW_MIGRATION_STATE_IDLE = 0, zero assignment is unnecessary. > + DSW_MIGRATION_STATE_PAUSING, > + DSW_MIGRATION_STATE_FORWARDING, > + DSW_MIGRATION_STATE_UNPAUSING > +}; > + > + > + if (!dsw_select_migration_target(dsw, source_port, bursts, num_bursts, > + port_loads, > + DSW_MIN_SOURCE_LOAD_FOR_MIGRATION, > + &source_port->migration_target_qf, > + &source_port->migration_target_port_id) > + && > + !dsw_select_migration_target(dsw, source_port, bursts, num_bursts, > + port_loads, > + DSW_MAX_TARGET_LOAD_FOR_MIGRATION, > + &source_port->migration_target_qf, > + &source_port->migration_target_port_id)) > + return; > + > + DSW_LOG_DP_PORT(DEBUG, source_port->id, "Migrating queue_id %d " > + "flow_hash %d from port %d to port %d.\n", > + source_port->migration_target_qf.queue_id, > + source_port->migration_target_qf.flow_hash, > + source_port->id, source_port->migration_target_port_id); > +#if 0 Spotted #if 0 > +#endif > diff --git a/drivers/event/dsw/rte_pmd_evdev_dsw_version.map b/drivers/event/dsw/rte_pmd_evdev_dsw_version.map > new file mode 100644 > index 000000000..ad6e191e4 > --- /dev/null > +++ b/drivers/event/dsw/rte_pmd_evdev_dsw_version.map > @@ -0,0 +1,3 @@ > +DPDK_18.08 { 18.11