From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0086.outbound.protection.outlook.com [104.47.33.86]) by dpdk.org (Postfix) with ESMTP id 2FDF298 for ; Sun, 19 Aug 2018 08:12:12 +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=D4cZGNGtKxqblWoCkuVNITWLxrsVDNBlgfLB0uYzXkI=; b=dJA/pbJ5+8nFq5lYb+MrP0ktNMsPnKcrSr8Buv1aw9gvxO0YWlU8P123osLKvoM0VfT23lkDsmkrZg3z9Pvmi39XpnPhgyhg7Q5ES0OcVUHb7CVQ/2y7EZviZxICd0jSPL/yGTr7qVZ0WfrTGrqAG5etPfTKC0qQ1b4y7So3Lp8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (106.200.237.61) by BL0PR07MB4994.namprd07.prod.outlook.com (2603:10b6:208:49::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.20; Sun, 19 Aug 2018 06:12:05 +0000 Date: Sun, 19 Aug 2018 11:41:50 +0530 From: Jerin Jacob To: Mattias =?iso-8859-1?Q?R=F6nnblom?= Cc: dev@dpdk.org, bruce.richardson@intel.com Message-ID: <20180819061148.GA31779@jerin> References: <20180711210844.5467-1-mattias.ronnblom@ericsson.com> <20180711210844.5467-2-mattias.ronnblom@ericsson.com> <20180722113254.GA30026@jerin> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180722113254.GA30026@jerin> User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [106.200.237.61] X-ClientProxiedBy: SG2PR06CA0214.apcprd06.prod.outlook.com (2603:1096:4:68::22) To BL0PR07MB4994.namprd07.prod.outlook.com (2603:10b6:208:49::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 597717af-b7f7-483d-5ebf-08d6059ab1d2 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(5600074)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:BL0PR07MB4994; X-Microsoft-Exchange-Diagnostics: 1; BL0PR07MB4994; 3:Tf3x5cNec0JOxl8E/xdu0TP4OwQZAK4lDkwMSX2m9hxiA/X3dzoXY2UflXdc7EgBMfmEXKT+8fGgD4pLjKmztrdn45pO0CCqZZ74hVmuxDOh8zPR7EhdSBPMbDrEYU8U3h9pshiFV4i14/b+IgIvShjXWH5IR5uu2bncO9sKAqP8mkz4re+4aP0NHybWhDMVdO+gQBX2sNw8TjMVvOoqOo6k4C7RdSzLSiMlFICx+esaOcZLzz/lgBIYLySIhCKO; 25:s1yhuwJCCKjhmSCbjPlLXrEvF4p9Vc2XejUUtStKvhYtl2caO9XqyLYt2HAM5qLkqjeL2zCSL47s2cuNTcC0y7RAaBajwq9tYew47zQHms5BBCsINr2v0m+LEi3xh6Czd60GGKu9IuZqH6Z9oD/hekHk789oEzqHBIL+F6H2CQr4hMC0HmsF6NRHMd1NVOz55HqX6uJnRGxmj+gBQLE0GKKhw6uRnWdZ//LPBiG5wcbjFP1niHRd3GJqpX4jk2d+7NFq1UIYAtZKLCc+julLzfl5XxkpX33tjIyXpTMbAkl8G2Pm/vNosfAZIhMeCRkK8j3YJgjCAAgFfd+1KT3x4w==; 31:0LqXbFeTWgaBUPyl1doD/YnOgyfW19jNTXkGvkBzuPXltxsS1i+XfTWb4M5rVRfnVbQvCaCOkO3taMGOEAmXmfW4HPuqwXDXEgre25lEXx+PXqegjVLD4S7YN4eJG54WIVpnXOjAwPZtaMuQHcMjKYVkM0t5e3r9IrkJYYoGsdsC5eoAgbTmKZ6To6dzO/xsbbaLSbHbXeKbg5xWZMNwzmK+c9lb3eAR1tQb0oBoppI= X-MS-TrafficTypeDiagnostic: BL0PR07MB4994: X-Microsoft-Exchange-Diagnostics: 1; BL0PR07MB4994; 20:D79Bi0TCnndT5lwaWj3r8a/uldKVIkUKW4cv43X3hKT/BFOUuQAR0mRhigBFdgXZis2otlWl7E1rL26xceF9rMPPxAY7LUh3o7jDevZ997wLBQkW1Hi4/7zTTxvx2RgxIukRnRJC1a2k8ymIlhXZjme3hcPjiy+1sWRDc8PHlmTy7FfQZ/K1SkfkrG+7JzG7X+J5HJNTSiqphGFCCjDRR5d2ngP19wLYjxl6t81uWj1B9/j9VtlcFmAzsVG1pheI5F09ClFDkkwP2BQGNtuUk/gTL5pb+hqxFm/tdQyWHwpGaE6k1yTwo+jCTtCcC5wu6dJAZDxn0hS2tGOfYIX95XmXYsSGu4kVKgC5VWIChwtJ6VQaEIRf8Ucm0QccoUbyhGZEDZO/Dci/DIeNxQzPpJyBMQumXh4QBKiVIvfeTfI4Tv+QP8QKtX3oeka+abtTUb9wNjJB9SOdIfWgegm//Bstv2z41OiCe3BHDUq7Pp1MDY39pVqrKHXtqtPwUO1EJSbd3txa/+3xRMTu2s76+FzzSZqQN+oaHafslRrDzFR7eSaTSgwrab3UbK7HI7XbvEMljx9HWCJpxrFUhDBTYhPiDWINPJx6vW5aRHivF6c= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(37575265505322)(248295561703944)(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231311)(944501410)(52105095)(93006095)(3002001)(149027)(150027)(6041310)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(201708071742011)(7699016); SRVR:BL0PR07MB4994; BCL:0; PCL:0; RULEID:; SRVR:BL0PR07MB4994; X-Microsoft-Exchange-Diagnostics: 1; BL0PR07MB4994; 4:AFzt9dyGfU57j5EajixQd1Qwn1X7W+Jp5OMjAU6zGcyoUcpjhcSV76cKU+x60rimLKAj5H0vOoYJZE6TKBf4S0F3MKwIJyVNU5IwEcMorX0Vb9YS0UIDoe9vqytjNtb/UmvuLSH8yFdAaT4kwT4m1cJoc40Qz6GqIWWOS1RqQl+hyb7EsioED7lG2ufIYzxRl/ALhipsSVhpKxn5lVMTfAhMMbmxA+OvOA59dsywNxGLgRuaVD+ZOufOg50LpO4pbovL5VlwBqlKE9axXD3p/DFtfyca70ZKGTOE4fzp2oeKabQpBPPFOBDJYWB/MLPceeAULs64sGkesjOiqzUo1T1ZwRMo5FbnpH0j2oHhwnlMToggLRnDZeTGw2I8QHe2 X-Forefront-PRVS: 07697999E6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(136003)(366004)(396003)(39860400002)(346002)(376002)(13464003)(199004)(189003)(1076002)(7736002)(81156014)(81166006)(6116002)(66066001)(3846002)(44832011)(8676002)(33656002)(4326008)(5660300001)(25786009)(8936002)(6246003)(105586002)(68736007)(106356001)(14444005)(50466002)(47776003)(53936002)(2906002)(9686003)(229853002)(55016002)(2870700001)(97736004)(5009440100003)(42882007)(58126008)(26005)(11346002)(446003)(956004)(486006)(478600001)(23676004)(305945005)(76176011)(72206003)(6666003)(52146003)(6916009)(52116002)(16526019)(186003)(386003)(33896004)(476003)(6496006)(316002)(2486003)(33716001)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BL0PR07MB4994; 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?MTtCTDBQUjA3TUI0OTk0OzIzOlJWQjRjUFJrYms0Vm9GSzZHUnNrUW9Sengz?= =?utf-8?B?ZXZlV004UFZwSFVjd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tq/4AcbYkKV324mAfkJwLt1tipcOgSMgzs9K+RkcNypaE/00tzT0NQPbhPOmgDZAzm0LKNLkfeCK+QNU3pMM=; 7:K5ehWEynUmMTR1RulHfyqy5utGEVhk9TzLikKsdLSEvCPzN9vPccyGwaUz5vGSWQzouBAWUhGsAWHDK5zAitDvIFzrqiLVh01PwJA2i8KNHxYo12Up6Jhhy8CPaOz7s1aCSntruQ8th6uuoawcSa+pBTm/reu2b8bRKkaqpM67rbmtlLJNiDxYFsJC4TJpKFcC5r35Zcf0Zz463wZD/JzqSmLoXfp1+2bEBK+A8bt6EJf3hNK0H3th9X/MUED4pr SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2018 06:12:05.6879 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 597717af-b7f7-483d-5ebf-08d6059ab1d2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR07MB4994 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, 19 Aug 2018 06:12:12 -0000 -----Original Message----- > Date: Sun, 22 Jul 2018 17:02:54 +0530 > From: Jerin Jacob > To: Mattias Rönnblom > Cc: dev@dpdk.org, bruce.richardson@intel.com > Subject: Re: [RFC 1/1] eventdev: add distributed software (DSW) event device > User-Agent: Mutt/1.10.1 (2018-07-13) > > -----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/ I would like to include this driver for v18.08. Please send the next the version in order to complete review before giving RC1 pull request. > > > --- > > 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 >