From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0084.outbound.protection.outlook.com [104.47.36.84]) by dpdk.org (Postfix) with ESMTP id 4129D4CA2 for ; Mon, 27 Aug 2018 11:40:21 +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=8lfcfM2wiwEEMf+vYbJ9uIVKMNTkz+QFjJtBXQXcc4w=; b=IttEDJYXcpgBZM66loAdOyla7sVvAzLG6Xw3dqUw+jNd7Pv0J8TnniLXYbVKucl8urqp5RY/eBGjeid0VKzXADRkiDCofnGGqvZ+E9IcVr/PQuCYMQkhLNFajNU0tsRm/xzK1naGypl7PL+H8heIKxx2C2nA9cBx1417++uEkMw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (115.113.156.3) by BL0PR07MB4993.namprd07.prod.outlook.com (2603:10b6:208:49::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.15; Mon, 27 Aug 2018 09:40:16 +0000 Date: Mon, 27 Aug 2018 15:10:03 +0530 From: Jerin Jacob To: Mattias =?iso-8859-1?Q?R=F6nnblom?= Cc: dev@dpdk.org, bruce.richardson@intel.com Message-ID: <20180827094001.GA22264@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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: BMXPR01CA0015.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:d::25) To BL0PR07MB4993.namprd07.prod.outlook.com (2603:10b6:208:49::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e07ceeb3-45c5-48e5-e264-08d60c0119b2 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BL0PR07MB4993; X-Microsoft-Exchange-Diagnostics: 1; BL0PR07MB4993; 3:aTZIypzjv2BEcfw28zsFaow5WmkiSf98cHFi5QLRijpFLuaLp3AKFJ1vOqy3ICICSx5JPTV1QXYI65eS7Uu+Y9APpuPJkXzBgD8EAIq5PxvA2B5oQebWmcIBRymKu218dNHOQfuDj1HJse9/CqNLL+pugMSJHsM4ebGAW+/1oF3+WQbT8SLv5VEgG30e6h69iI+xC4xKPzM7A2vOR605n31/WZG8RX1XJX4uJvdr3Zkem2MRSw9gIrAk9tXwdDUp; 25:M4LEkA+djjjbnM+KXrWGCYP/S2ppUNUCd7NXfGMI2egLMMoynmY0hC3pLPDFqKnpYA/rv0zD8mVqUbem37od8HTAT+KPCuzEcipjU65InikMe8I7E2JUowfqcQGF6vun848fTu18CoixvvgmgEoX+a/LOOdgZR6fnVb6pbWyDqG9/A9k6goWfWLWsUedrAN4rcHM0FF9CFDH3fFUFvXajj0OS3+QtxCstdpBw3HGwP3Q3/yq2XKJOER9mND/HTODYKe6x0dYyk90ypY3Uann+taklR+HREYHptysc1HIDCYg3+Fhl0IHDLGYsxkQcDnK27CvVyOKvRQoGom7AwTfpA==; 31:0JIOc9e7GhfjHs4sHCNHKgLSj8x7MDuVPMf7mTPmsNRUPyUnLP7b8HrV2KwBAJyedXW/1B3AhORFe76yDFuC0++os3kadSKfndXgTGEN7Uzi5fC/nKJkdpaIzLV+OLHYG9gB9jO9FKzFyeub5OowhJ8hv+A4INT8rebx9WYtdeYQfdPMlra64DFSfhX0sxCCFa7c1AQoZhYS8ii3CjvpNf/WMQ20zcqU5CO+jX8gMwo= X-MS-TrafficTypeDiagnostic: BL0PR07MB4993: X-Microsoft-Exchange-Diagnostics: 1; BL0PR07MB4993; 20:KUsLZ89IA82MGZliUjbzUs1vi1F10gxrd/LsUId3U7kMpDp5RNikzTavgfpipRVzLJ3v6tWR8KITjpoJO++NRiti6gKlJG6HslvcMFsud+3oY8hZ9fJV1cTJJyJNqbqNw4OvcKz57LrrQbGtfa2uPmUoCzcEt/JFbuWaln7mCFVp8qGp40UArsJilekhVZxREejJR2F7fRdSF/Mabj5juKXQQIlqxOP0jlsEevuRHzLAOItrc+FZErzP8KR49romSagfyCzd6NVJGByzkbryNXwIQB1S8B74E3dqwFcUnSZMQ8P/H9fYGJ5hOcCDSOnUzOKd3XoVaPrFox/OeLvKui67v7FM0W48fM6pm5zUFvYJzSnxcBp813NdS57CE7FNJjfhocvw/9SzE/CAY/IkDQ49wpowc8pVfcdi4085eXydPTjiykLJVGZLpvcMgcVOoaVb0rRMxR/R/JSOhRw6cMKsHBkCk8xyiEvZTN2VIeRa0fWRImpV/cd/MEBYS+XMPqCqB0YcVtp1C9k5qHcvo+xEEKmfZyeSLU4XMOzz1br0lEKMk2ZyOE82ttl8O3QeddSEv8DdYMv1EIelq1jmE8h4TVWX/g5p140d2xLZomo= 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)(3002001)(3231311)(944501410)(52105095)(93006095)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201708071742011)(7699016); SRVR:BL0PR07MB4993; BCL:0; PCL:0; RULEID:; SRVR:BL0PR07MB4993; X-Microsoft-Exchange-Diagnostics: 1; BL0PR07MB4993; 4:Ix47fSfOo7YcKDNSAwdtCMo9ui9SV0g7QdrmfLSrltgn+uBds1oUIsR1Rji7YajL3LolNqrCaUnAsMRxc2h7NNt05nhldxXAm2JT8t63iBQh89czIaNK1YoODHSpnoiNaBWFSpsjwqHTCXw+vtSDETyMvyexCac6njqxlllOFh2nSHT/6+/DxpZZszhAy5eJuxNTFz5CKdROwYuHNo4fH1s9r2dGYfJWNbKNuUhn3mtwDpR3KHp9RmJc8HfQHfgRS84+jLTtU1TA4Slqn9YthlZY31XZIM5Bgt4EuUjd5H87/UgbmprjdDqyZJ/MdAoz8q/v1N4eKtVuRfxUKJELdSKmD+f/t8naiJhivTokRNm+roqwMBWWX84otiVKSDLR X-Forefront-PRVS: 07778E4001 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39850400004)(346002)(396003)(366004)(136003)(376002)(13464003)(199004)(189003)(81166006)(1076002)(305945005)(7736002)(52116002)(6496006)(53936002)(50466002)(478600001)(229853002)(47776003)(58126008)(66066001)(72206003)(6246003)(9686003)(6916009)(33896004)(486006)(2870700001)(6666003)(2906002)(956004)(476003)(44832011)(33716001)(81156014)(5660300001)(386003)(16526019)(106356001)(3846002)(186003)(93886005)(53546011)(6116002)(68736007)(105586002)(446003)(26005)(8676002)(11346002)(25786009)(4326008)(97736004)(316002)(76176011)(55016002)(8936002)(23756003)(42882007)(33656002)(55236004)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BL0PR07MB4993; 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: =?iso-8859-1?Q?1; BL0PR07MB4993; 23:myGf/UMeeElOAmlVTucggCP1LBycDXTXtzy1jPQ?= =?iso-8859-1?Q?vsUiJT8IQKAJ8rlHB7jJwpkB2OzEvOGbUD1nBgax6/8Z67SUqasGSXd14i?= =?iso-8859-1?Q?udWm3H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h5apDkqdztxv0aa/uZnzrx8gtCEnEpxamWh+PU3Sex0vzBpqcjIMW4CIeIvb40xcbTEmBYMeTi+fLK85uAHOdCNwFVwZ9h93BxLQwERgBc8XsZ+bkM8u20JB6r5HRbtPGLO4Y9KW4L5cpC0B1oIix04Y94UJKXjbt9BLfmCHuRWOhkHd5iVdJ5m91s1grXkOzOKxKwERJSGf4MrsGmTqdB+SpYnsuijpGu2U/fi5Xc1XGRi9pyZhr0XSokE4TkTAElfNSOh9/iXgU2LB8e6adE/nhWBPhC9ymQNu/ZO/vL01gluoNYyyTgHHoLfeOLOZYWwu6ssjAeaNzRVQIKKCzLq9WpKqYe3esp1x3JmuztqME06cjMqh9ICzzD4ezum+epA3X2dCG9tKuZeXD/Z+PrEtphTVEa5hA==; 5:FMuBwAz5hzSJhlyz9Fg/PCX7lcpxpDMJvSdvhNxg8DPWfTtzfo1aNwi4LUmUD+2vMJwWZUpFlnMq3EZo+JilmwtQKuOGCRPCwmB/BmcKpam6CNS5p3VPICSlPJu9SDtSASAFwRJEJyAdHWc4n3QI+vT3Q3NUqVfXpZC0rvXEswM=; 7:moqVdJM3VL+rV0AqE9USh1P8r3EO1rmhFZbfnYd2EgUUidfpeDSYIbjYL7DTzRG+HUXfaCw16Rp8DXI/I9NMUv2k/S1GXI3DGV5TcoNy2e+Nb+sbTN1Lx8ZY1jef6VVIBn0GnUWD/VmPa7Sumg4EtWfAbLWgX+n7dVDkr63/OyrWH5zrYehj6NZIi7Ds03vPFOCa2/blbLFfA8pvgtk6Jx5bzvARJKr54uT9QZRgNqRW2a4qT51UQCsxVJ9Wh6Y0 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2018 09:40:16.9747 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e07ceeb3-45c5-48e5-e264-08d60c0119b2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR07MB4993 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: Mon, 27 Aug 2018 09:40:21 -0000 -----Original Message----- > Date: Mon, 27 Aug 2018 11:23:59 +0200 > From: Mattias Rönnblom > To: Jerin Jacob > CC: dev@dpdk.org, bruce.richardson@intel.com > Subject: Re: [dpdk-dev] [RFC 1/1] eventdev: add distributed software (DSW) > event device > User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 > Thunderbird/52.9.1 > > External Email > > On 2018-07-22 13:32, Jerin Jacob wrote: > > > > +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. > > > > Is this support mandatory, or is it OK to leave it to the user to empty > the machinery before calling stop in the initial driver version? This is useful to avoid event buffer leak. The application may call stop() abruptly or some reason event device cannot provide the event on dequeue(). Any trivial implementation could be doing dequeue() in the driver on stop(). > > I can't find any other event device supporting the callback. drivers/event/sw and drivers/event/octeontx/ supports it. $ grep -r "dev_stop_flush" drivers/event/ drivers/event/octeontx/ssovf_evdev.c: if (dev->dev_ops->dev_stop_flush != NULL) drivers/event/octeontx/ssovf_evdev.c: dev->dev_ops->dev_stop_flush(dev->data->dev_id, event, dev->data->dev_stop_flush_arg); drivers/event/sw/sw_evdev_selftest.c:dev_stop_flush(struct test *t) /* test to check we can properly flush events */ drivers/event/sw/sw_evdev_selftest.c: if (rte_event_dev_stop_flush_callback_register(evdev, flush, &count)) { drivers/event/sw/sw_evdev_selftest.c: if (rte_event_dev_stop_flush_callback_register(evdev, NULL, NULL)) { drivers/event/sw/sw_evdev_selftest.c: ret = dev_stop_flush(t); drivers/event/sw/sw_evdev.c: eventdev_stop_flush_t flush; drivers/event/sw/sw_evdev.c: flush = dev->dev_ops->dev_stop_flush; drivers/event/sw/sw_evdev.c: arg = dev->data->dev_stop_flush_arg; drivers/event/sw/sw_evdev.c: eventdev_stop_flush_t flush; drivers/event/sw/sw_evdev.c: flush = dev->dev_ops->dev_stop_flush; drivers/event/sw/sw_evdev.c: arg = dev->data->dev_stop_flush_arg; > > In DSW, the events can be a little here-and-there - in the output > buffers, in the pause buffer, and on the input rings. Any trivial implementation could be doing dequeue() in the driver on stop(). > > That said, assuming the worker lcore threads have stopped using the > device and issued the appropriate barriers, it should be possible to > round up the events from the thread running 'rte_event_dev_stop'.