Message ID | 1531289248-20025-1-git-send-email-anoob.joseph@caviumnetworks.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5EB471B458; Wed, 11 Jul 2018 08:08:03 +0200 (CEST) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0083.outbound.protection.outlook.com [104.47.34.83]) by dpdk.org (Postfix) with ESMTP id B894B1B44E for <dev@dpdk.org>; Wed, 11 Jul 2018 08:08:01 +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=ytxBpjsGMsqIwGuYEKQijK5nN8IFqGPDRSX3DFs1jyg=; b=EfSYOyVMdHxxXUw3XGEgckJZz+w+oMHzUcIE8kq9HznpEqiyVdF2Zju1hnlQQZv1pTDJ0ZeMgQnNrORNMb93LoeUfMUdG9uOwdrA0GGOif75v4qDtzCFCB+3A1HY2RyxJa2ONcz/mCBGVdeMivbqUfhqxk0fMumPPEuxaPTP8TQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from ajoseph83.caveonetworks.com.caveonetworks.com (115.113.156.2) by BN7PR07MB4898.namprd07.prod.outlook.com (2603:10b6:406:ef::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.21; Wed, 11 Jul 2018 06:07:58 +0000 From: Anoob Joseph <anoob.joseph@caviumnetworks.com> To: Bruce Richardson <bruce.richardson@intel.com>, Pablo de Lara <pablo.de.lara.guarch@intel.com> Cc: Anoob Joseph <anoob.joseph@caviumnetworks.com>, Jerin Jacob <jerin.jacob@caviumnetworks.com>, Narayana Prasad <narayanaprasad.athreya@caviumnetworks.com>, dev@dpdk.org Date: Wed, 11 Jul 2018 11:37:16 +0530 Message-Id: <1531289248-20025-1-git-send-email-anoob.joseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528976946-14396-1-git-send-email-anoob.joseph@caviumnetworks.com> References: <1528976946-14396-1-git-send-email-anoob.joseph@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: BMXPR01CA0027.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:c::13) To BN7PR07MB4898.namprd07.prod.outlook.com (2603:10b6:406:ef::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e7a8728d-ae4e-4087-607d-08d5e6f4a7b2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:BN7PR07MB4898; X-Microsoft-Exchange-Diagnostics: 1; BN7PR07MB4898; 3:atX+BXObA0/kRH5SsTsT0Qz9TrXkx7TwHlJ+OkdFD1EBPOKOUVBdVo0Pj8T0GMdjKPbTw4iYF2oF3dGAXRuIaPKwqsthpc5RxffZsYybzJMy3cwEAlH7luKHjIOjK0vSt/A1nA40kdixlQ9yhotcQF9JAgS8kEv6RgDDalpxxw2t8BxKT94O4xWnO+WJnA7sdHOv0W+Sf2LUqi8qhPxuVqR5YqzqG93IjW43U+20HuWIGayRsYFzsryAN3WgQ8cg; 25:r10UubC8qBrSgWNopdaSQMUku5744EpsOvm82wv+ZcmD3JMUKAEhr2IeOEsHTo0wzTUTK3vgelpjzn8GYXWFfkroI4tRxYOVvxyOGdojpnCpIFeBe1yuBPLV1t7rBqUNP+nSH6PeUZ1KUfKKdwWpwcyHRMr6c3CAzcztdPNcDk2SBgGZyKe/rhRZCGX+OB7tLmurIuMVm5Am0VPg8eScTZRG0iZkKPnH5nGDX8fk/JSBQLcN17+3OlaM2QzrjBzKxzsh+YSW8c6206JXFpjJoxFzQ0vljwtzHym0SQ9XTaG/amdwLr0CGQ8V04YXtvR8S0zal4Fi4wqPuCB+4dRy7g==; 31:UqOLq7hlO2TYtDkKgy6l4HGr7yJtFhHnbuq+dBg803XPWukvWJNxxOC6QvGsYQymKPPdkaAcTVDK/Y/EjxdSe9/wqa4jQHW1ZVfmxziwSob3QiDUNvZ2i8sFcSRnU4V7cqpOO2BFADYn5htyTHVp4ITdJOddjsawgUL59hOxOhOaIcUwiVFLD2xG9LK5gTjNGbcscxOD/vB50pZA4935m/LSVU9WUaz55CQA7RZfkcQ= X-MS-TrafficTypeDiagnostic: BN7PR07MB4898: X-Microsoft-Exchange-Diagnostics: 1; BN7PR07MB4898; 20:a9j56DF2tUjxAANxhH8ZyQtOtsMU7HgG30Bv/tAanSdwQh00/8NMMGx32ZcDef7kjOeuMtreh5x6RRhi6160bjnWtftMHiR2WPdwecbMfhB4ej6ebefXV46WID5Ssb/FhZIGxbk84AMKLMA9P3oDxUyamLWmQDJvJfIfBFWAh3DPtievYDwtIHZCqaHS8xbG2aJ3EA/X4vVKq7R/FQVcf+qfw9dXAIYD8fOZqErALODMhDQmTeysKAH7lEXHNLJL3Q9BNNpmXCBNRAlf+PB/UxI+nmZJPQ/CYw7lhh9cfdEkzPdeDSjbgj33VcMZ3kcL0KlGh7wVzYjwZJeDrqy+IZtZAf+jmq7/xAzmUzO+eb+Tx2WN7m9MpgOr4yyZauRBuZDyLYhdLDJCtPSvf7tzko0x+4HiwBSHj0ZkuoR/baMvSOPJAdnw/bLkzbTHYf2tB6mP0O35y9DRz6puoI+bX7sQG6fwJP4KT5ChdvoD6s+ybKOR6VcIfs/q/QeQ05wba73sw5AC/ADVQgsA1tneBTkw0HFC0nBinXLOALVOgqxSyIQ2yboPM9ZKJdHDpDa2N8WUNw3hriMd5s9844x/ygAYXtD7YJ1cXHWL+zSUQHo=; 4:GHqESfJjJjDiw7TJi6OGoHIYPWGFuWE2S77K6iMphJZwZMs6Qyl8kIEcLF42pGljqZzxcp8blb/Ud/IFeLOPwOhmHl/1Jyif4V4xw8duJfiSedElx8mkmiMXyldhq9Xp6Njx17k/9qk5LfmjpLabA6d1flM3Ho1wkFiDtjIjKFH3rN/W3kZ+psnRA0KYDb7xSD17LYBNYHV9bBx/Or/O2yQ54OzcBwAfOzNAFLLQj6FYP9jln35Fb4m778gBtcWolOJ/d8DoPlIJV54k+nU8lA== X-Microsoft-Antispam-PRVS: <BN7PR07MB48985B6666111DCDAFFDCE46F85A0@BN7PR07MB4898.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(10201501046)(93006095)(3002001)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:BN7PR07MB4898; BCL:0; PCL:0; RULEID:; SRVR:BN7PR07MB4898; X-Forefront-PRVS: 0730093765 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(136003)(39860400002)(366004)(396003)(189003)(199004)(68736007)(81166006)(8676002)(81156014)(44832011)(50466002)(6666003)(25786009)(6512007)(7736002)(4326008)(6486002)(48376002)(8936002)(2906002)(3846002)(478600001)(72206003)(305945005)(6116002)(486006)(16586007)(2616005)(54906003)(110136005)(316002)(36756003)(476003)(956004)(446003)(11346002)(47776003)(26005)(42882007)(52116002)(105586002)(186003)(76176011)(16526019)(66066001)(106356001)(51416003)(97736004)(6506007)(55236004)(50226002)(53936002)(5660300001)(386003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN7PR07MB4898; H:ajoseph83.caveonetworks.com.caveonetworks.com; 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; BN7PR07MB4898; 23:qpzsqK/oPdLIdI/tt87UpFKDIxexcfvD0emCAQny4?= poW5oK1KdWqFN7Q+SOBva4LiqGMndMUyjfC/P9DwfxEUK3+HpjDvK3v7IOxhkF/ZSIbiwpYlTk0m1InJfWjWIF6I/dWheUkhH572MaZmn4aXilToZlYwqkdOOcGkxhAG5zvqcQod/qgELNtQOa4x9ru6HzonRkBqaUEDj9gub76Speab+hPoUQ7fiT7OaVcxJyq0mZvrvCXAmxXicNXPi8ymvnfyLxj7t21n1xnUUE9A6btWaSwiwlp1wrxIffCT7buc3AvOSLktDFQJSTBDgZcyIoQp72vNRgCs6sB4cAUljkqWTH5U3f+eWZFjOpgJ0L0UqyD1LEsJrRbnvS5ipJ3wm1Um9FTr6i/Wa+RHfeerK70Xo2EbG9+R6ArhOzw4W9rfoFKKO3H0q8DfmotZYIZhkvbwnn9NGlLHoQ28pGA8QxTMiK7g3tzqDAOYeDrga/iEz3nrpRybOi6yN7JA+ruob5N4hS2RiGehHbj6UnhGjeTpY61U4q6Sf4QNafAFi9Htvy3VSC1J0srriQyWjYeyOl3E/f805vKbpI0HABqaUj47Fct/9pAaJCem9r4E2okq2oDsyCicj7/bBMNaKyrn/+70V91o1iZZhx5PqMAMu2I57jrHynKpWmNNQlpPXVjUvGZ1nWEga3Kbxu66XKBvqQSNK1BbONtP/Dj6uT0/JF1xJRdYvDc7H/lrvpN6x+48mdL89ZzZiyIhi0k74MlDKLfBOxzbUlD80V9ZFJJ2m5hZiwUkkW+oIHE83bJ9rOcwR1JZ7xt5fEV5h1CAgx2kNDRWrK8o9gqzyudcurntvIEQFni0e0T86tPX81y2leG/oaxivrDj7zhdHmBB7vVVHu/ymoa6HasK86PTy8CMOog789liKHmombtuvkEOXpA1pHwHh5LDCjW0GoOsNB5yH9ksuBrRrl2DJ8rlNY5AnaIEodUI/O0wyImkkhsMa7X84C/bQ9khMFNmPcSYoKQruKbRD57cX2rfCMZicgbToO0zdz0dz59+0nAmE9VvmVyeru/tNl7BDukIf31RO04H79tKEGn22CBQu59JgkEESyq1l3MvHLKxcIjJFAHfiuGR7roVY8H/h8xkbZMueHQGUszX/th7XBABQpmyaCk6p2ekqIDWkrtnl8xarVZOeFWQEAVN2LWYbQdygzsV6PkSxHrOx7C3ALWbTiZts9FRYgapjLKFrqOvHXM8z2yzMU= X-Microsoft-Antispam-Message-Info: GVEvLZoSUyqmCr0+d1nPjCU280qvkNle1i/+Fqow8M5V/fiXVNn5YMrf3Abed82/c8AL6HVVjk8oMGgMGYZxJWkV5OcGlYtTI8HpTYpYMpG2T2d2eALfNZ60Y+/YP63YCPrASyqyC+Ovzrh9JP3s18H0vjxr+zvA1zeOCIMdhi6YIpXJyakWaiWoMVvFuEeo9VHLfvjbJh9NOi8LB86EtLXiFtxLVk7/cZrWTeN2k2jUOffT8kNqUHIFyQNuJvKNA3daN38LWst1o+OljXhNh+ZoN8q7jK9wviDurcInH3GhubtK4t+fhNgMMOxhPRLo1Mk+jbFI1KHjnHweKBiEvcYs8o7nhg7jnTdPADw0ma0= X-Microsoft-Exchange-Diagnostics: 1; BN7PR07MB4898; 6:olyB/FSO1iCTOG7EqRX5/PpRRC3CVAg7kQiqzL7LQBH2lWb+iE6MxUyw+0eSPDN7WbMYR/fmeY3H26KLGH3b/uKMGZlBBQa+PVfzji0RVB6a6X3HvjBS34mkzjek68yOiUEWX7qWiq92NyPX4yhisPMQNatWKWLfVueccyZaMwI/BMFOJ2Gts5f2dHsCN8taN/qLJ0d5bEDm40gP2DHjzdFMcTy2xDJhK6i7xTVp7b9s3fG98kakl66jSG8apfAyPX80jFT0xUf2vlRS7mHW/XBkrCsBeM77av3NQize97woeeiMqY/swMStTu3K/yOQlZiZIQXgs+MqkoC0xCn6rB2r/6njizu8X9bHFKWmGInIe2x95I97a1Gh3+59+O5sI6ijqg+GNRrzmRysVeOizHzq7Q748CcRHAsqNLEOgbjMCER32PyIxI93EzPPpdSd1g2iGMzujxtG/EvYu2p5AA==; 5:Ied5UJgqeNjLx3nt/Wy0oX8aa/JDepThOCSffW+GWPBZ0eFx2UtRQeuL9lmNJWmS/FT1AY31D2L1DRfRMkQhUIqn6U6qxZ+LjjNNsv45cd/dLiKXqwr5YM+v26RQrfNGVAaHV+oWbQmcxGS/tk4jJ1N9lfEx2RYZhMDnkwv2qhc=; 24:hF8vVtf2jqZFNFRNIzzJO6hHVHu/jk5enfPDtTFxlp1DOOzHRcKKDwIPOCfUBHO6+aJEaUFKId4gW1qb+GyBA3HlfwWND8ZCLe597hgwyUw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN7PR07MB4898; 7:y1H2IY3azu3rqgC6IRcLwarnF4UPrDNp6cj0VVFt7vtLxxjxINEMJGWt8NCOv2KCuJ3l6bF2yJPG5SHXxIRHddrcRXu2C7Wax8W0SVlevb8maG3nw2fALkvfBxE84rWF5c74CM5XqWbziFoOBX6jKHDzDP0eAIgb8mZ+2/hEPriu79lve0/ISDF2/eIfl3lEgUoT1tqTuf4SgLpEEEnDPHWrcFvAzaaSbgjS9K6Yo8/tek8kHBrhlPVsx8ut0436 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2018 06:07:58.5044 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e7a8728d-ae4e-4087-607d-08d5e6f4a7b2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR07MB4898 Subject: [dpdk-dev] [PATCH v2 00/12] preparing l2fwd for eventmode additions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
preparing l2fwd for eventmode additions
|
|
Message
Anoob Joseph
July 11, 2018, 6:07 a.m. UTC
This patchset modularizes l2fwd application to prepare it for eventmode additions. This patchset doesn't change the code flow or logic, except for few minor improvements. Some of the newly added functions are used in just one place, but is added for efficient usage with eventmode. v2: * Merged small patches with others as directed by Pablo v1: * Fix all checkpatch reported issues Anoob Joseph (12): examples/l2fwd: move macro definitions to common header examples/l2fwd: move structure definitions to common header examples/l2fwd: move globally accessed vars to common header examples/l2fwd: move dataplane code to new file examples/l2fwd: remove unused header includes examples/l2fwd: move drain buffers to new function examples/l2fwd: optimize check for master core examples/l2fwd: move periodic tasks to new function examples/l2fwd: skip timer updates for non master cores examples/l2fwd: move pkt send code to a new function examples/l2fwd: use fprint instead of printf for usage print examples/l2fwd: improvements to the usage print examples/l2fwd/Makefile | 1 + examples/l2fwd/l2fwd_common.h | 63 ++++++++++ examples/l2fwd/l2fwd_worker.c | 249 +++++++++++++++++++++++++++++++++++++ examples/l2fwd/l2fwd_worker.h | 16 +++ examples/l2fwd/main.c | 276 ++++++------------------------------------ 5 files changed, 364 insertions(+), 241 deletions(-) create mode 100644 examples/l2fwd/l2fwd_common.h create mode 100644 examples/l2fwd/l2fwd_worker.c create mode 100644 examples/l2fwd/l2fwd_worker.h
Comments
> Anoob Joseph (12): > examples/l2fwd: move macro definitions to common header > examples/l2fwd: move structure definitions to common header > examples/l2fwd: move globally accessed vars to common header > examples/l2fwd: move dataplane code to new file > examples/l2fwd: remove unused header includes > examples/l2fwd: move drain buffers to new function > examples/l2fwd: optimize check for master core > examples/l2fwd: move periodic tasks to new function > examples/l2fwd: skip timer updates for non master cores > examples/l2fwd: move pkt send code to a new function > examples/l2fwd: use fprint instead of printf for usage print > examples/l2fwd: improvements to the usage print Maintainers of this app look to be against adding complexity. In order to get this series accepted, we need more discussions with more people involved. So it will miss 18.08. It can be discussed in a more global discussion about examples maintenance. If discussion does not happen, you can request it to the technical board.
Hi Thomas, On 26-07-2018 22:27, Thomas Monjalon wrote: > External Email > >> Anoob Joseph (12): >> examples/l2fwd: move macro definitions to common header >> examples/l2fwd: move structure definitions to common header >> examples/l2fwd: move globally accessed vars to common header >> examples/l2fwd: move dataplane code to new file >> examples/l2fwd: remove unused header includes >> examples/l2fwd: move drain buffers to new function >> examples/l2fwd: optimize check for master core >> examples/l2fwd: move periodic tasks to new function >> examples/l2fwd: skip timer updates for non master cores >> examples/l2fwd: move pkt send code to a new function >> examples/l2fwd: use fprint instead of printf for usage print >> examples/l2fwd: improvements to the usage print > Maintainers of this app look to be against adding complexity. > > In order to get this series accepted, we need more discussions > with more people involved. > So it will miss 18.08. > > It can be discussed in a more global discussion about examples maintenance. > If discussion does not happen, you can request it to the technical board. > Event dev framework and various adapters enable multiple packet handling schemes, as opposed to the traditional polling on queues. But these features are not integrated into any established example application. There are specific example applications for event dev etc, which can be used to analyze an event device or a particular eventdev adapter, but there is no standard application which can be used to compare the real world performance for a system when it's using event device for packet handling and when it's done via polling on queues. The following patch submitted by Sunil was looking to address this issue with l3fwd, https://mails.dpdk.org/archives/dev/2018-March/093131.html Bruce & Jerin reviewed the patch and suggested the addition of helper functions to abstract the event mode additions in applications, https://mails.dpdk.org/archives/dev/2018-April/096879.html This effort of adding helper functions for eventmode was taken up following the above suggestion. The idea is to add eventmode without touching the existing code path. All the eventmode specific additions would go into library so that these need not be repeated for every application. And since there is no change in the existing code path, performance for any vendor should not have any impact with the additions. The scope of this effort has increased since the submission, as now we have Tx adapter as well. Sunil & Konstantin had clarified their concerns, and gave green flag to this approach. https://mails.dpdk.org/archives/dev/2018-June/105730.html https://mails.dpdk.org/archives/dev/2018-July/106453.html I guess Bruce was opening this question to the community. For compute intense applications like ipsec-secgw, eventmode might be the right approach in the first place. Such complex applications would need a scheduler to perform dynamic load balancing. Addition of eventmode in l2fwd was to float around the idea which can then be scaled for more complex applications. If maintainers doesn't have any objection to this, I'm fine with adding this in the next release. Thanks, Anoob
On Wed, 1 Aug 2018 12:29:50 +0530 "Joseph, Anoob" <Anoob.Joseph@caviumnetworks.com> wrote: > Hi Thomas, > > On 26-07-2018 22:27, Thomas Monjalon wrote: > > External Email > > > >> Anoob Joseph (12): > >> examples/l2fwd: move macro definitions to common header > >> examples/l2fwd: move structure definitions to common header > >> examples/l2fwd: move globally accessed vars to common header > >> examples/l2fwd: move dataplane code to new file > >> examples/l2fwd: remove unused header includes > >> examples/l2fwd: move drain buffers to new function > >> examples/l2fwd: optimize check for master core > >> examples/l2fwd: move periodic tasks to new function > >> examples/l2fwd: skip timer updates for non master cores > >> examples/l2fwd: move pkt send code to a new function > >> examples/l2fwd: use fprint instead of printf for usage print > >> examples/l2fwd: improvements to the usage print > > Maintainers of this app look to be against adding complexity. > > > > In order to get this series accepted, we need more discussions > > with more people involved. > > So it will miss 18.08. > > > > It can be discussed in a more global discussion about examples maintenance. > > If discussion does not happen, you can request it to the technical board. > > > Event dev framework and various adapters enable multiple packet handling > schemes, as opposed to the traditional polling on queues. But these > features are not integrated into any established example application. > There are specific example applications for event dev etc, which can be > used to analyze an event device or a particular eventdev adapter, but > there is no standard application which can be used to compare the real > world performance for a system when it's using event device for packet > handling and when it's done via polling on queues. > > The following patch submitted by Sunil was looking to address this issue > with l3fwd, > https://mails.dpdk.org/archives/dev/2018-March/093131.html > > Bruce & Jerin reviewed the patch and suggested the addition of helper > functions to abstract the event mode additions in applications, > https://mails.dpdk.org/archives/dev/2018-April/096879.html > > This effort of adding helper functions for eventmode was taken up > following the above suggestion. The idea is to add eventmode without > touching the existing code path. All the eventmode specific additions > would go into library so that these need not be repeated for every > application. And since there is no change in the existing code path, > performance for any vendor should not have any impact with the additions. > > The scope of this effort has increased since the submission, as now we > have Tx adapter as well. Sunil & Konstantin had clarified their > concerns, and gave green flag to this approach. > https://mails.dpdk.org/archives/dev/2018-June/105730.html > https://mails.dpdk.org/archives/dev/2018-July/106453.html > > I guess Bruce was opening this question to the community. For compute > intense applications like ipsec-secgw, eventmode might be the right > approach in the first place. Such complex applications would need a > scheduler to perform dynamic load balancing. Addition of eventmode in > l2fwd was to float around the idea which can then be scaled for more > complex applications. > > If maintainers doesn't have any objection to this, I'm fine with adding > this in the next release. > > Thanks, > Anoob It is important that DPDK has good examples of how to use existing frameworks and libraries. These applications are what most customers build their applications from and they provide basis for testing. The DPDK needs to continue to support multiple usage models. This is one of its strong points. I would rather leave existing l2fwd and l3fwd alone and instead make new examples that use the frameworks. If nothing else haveing l2fwd and l2fwd-eventdev would allow for performance comparisons. As the number of examples increases, probably also need to have a roadmap or decision chart to explain the advangage/disadvantage of each architecture.
-----Original Message----- > Date: Wed, 1 Aug 2018 09:54:14 -0700 > From: Stephen Hemminger <stephen@networkplumber.org> > To: "Joseph, Anoob" <Anoob.Joseph@caviumnetworks.com> > Cc: Thomas Monjalon <thomas@monjalon.net>, dev@dpdk.org, Bruce Richardson > <bruce.richardson@intel.com>, Pablo de Lara > <pablo.de.lara.guarch@intel.com>, Jerin Jacob > <jerin.jacob@caviumnetworks.com>, Narayana Prasad > <narayanaprasad.athreya@caviumnetworks.com>, Hemant Agrawal > <hemant.agrawal@nxp.com>, "Ananyev, Konstantin" > <konstantin.ananyev@intel.com>, Sunil Kumar Kori <sunil.kori@nxp.com>, > Nikhil Rao <nikhil.rao@intel.com> > Subject: Re: [dpdk-dev] [PATCH v2 00/12] preparing l2fwd for eventmode > additions > > > On Wed, 1 Aug 2018 12:29:50 +0530 > "Joseph, Anoob" <Anoob.Joseph@caviumnetworks.com> wrote: > > > Hi Thomas, > > > > On 26-07-2018 22:27, Thomas Monjalon wrote: > > > External Email > > > > > >> Anoob Joseph (12): > > >> examples/l2fwd: move macro definitions to common header > > >> examples/l2fwd: move structure definitions to common header > > >> examples/l2fwd: move globally accessed vars to common header > > >> examples/l2fwd: move dataplane code to new file > > >> examples/l2fwd: remove unused header includes > > >> examples/l2fwd: move drain buffers to new function > > >> examples/l2fwd: optimize check for master core > > >> examples/l2fwd: move periodic tasks to new function > > >> examples/l2fwd: skip timer updates for non master cores > > >> examples/l2fwd: move pkt send code to a new function > > >> examples/l2fwd: use fprint instead of printf for usage print > > >> examples/l2fwd: improvements to the usage print > > > Maintainers of this app look to be against adding complexity. > > > > > > In order to get this series accepted, we need more discussions > > > with more people involved. > > > So it will miss 18.08. > > > > > > It can be discussed in a more global discussion about examples maintenance. > > > If discussion does not happen, you can request it to the technical board. > > > > > Event dev framework and various adapters enable multiple packet handling > > schemes, as opposed to the traditional polling on queues. But these > > features are not integrated into any established example application. > > There are specific example applications for event dev etc, which can be > > used to analyze an event device or a particular eventdev adapter, but > > there is no standard application which can be used to compare the real > > world performance for a system when it's using event device for packet > > handling and when it's done via polling on queues. > > > > The following patch submitted by Sunil was looking to address this issue > > with l3fwd, > > https://mails.dpdk.org/archives/dev/2018-March/093131.html > > > > Bruce & Jerin reviewed the patch and suggested the addition of helper > > functions to abstract the event mode additions in applications, > > https://mails.dpdk.org/archives/dev/2018-April/096879.html > > > > This effort of adding helper functions for eventmode was taken up > > following the above suggestion. The idea is to add eventmode without > > touching the existing code path. All the eventmode specific additions > > would go into library so that these need not be repeated for every > > application. And since there is no change in the existing code path, > > performance for any vendor should not have any impact with the additions. > > > > The scope of this effort has increased since the submission, as now we > > have Tx adapter as well. Sunil & Konstantin had clarified their > > concerns, and gave green flag to this approach. > > https://mails.dpdk.org/archives/dev/2018-June/105730.html > > https://mails.dpdk.org/archives/dev/2018-July/106453.html > > > > I guess Bruce was opening this question to the community. For compute > > intense applications like ipsec-secgw, eventmode might be the right > > approach in the first place. Such complex applications would need a > > scheduler to perform dynamic load balancing. Addition of eventmode in > > l2fwd was to float around the idea which can then be scaled for more > > complex applications. > > > > If maintainers doesn't have any objection to this, I'm fine with adding > > this in the next release. > > > > Thanks, > > Anoob > > It is important that DPDK has good examples of how to use existing > frameworks and libraries. These applications are what most customers > build their applications from and they provide basis for testing. > > The DPDK needs to continue to support multiple usage models. This > is one of its strong points. I would rather leave existing l2fwd > and l3fwd alone and instead make new examples that use the frameworks. > If nothing else haveing l2fwd and l2fwd-eventdev would allow for > performance comparisons. Unlike other applications example, there wont be any change in packet processing functions in eventdev vs poll mode case. Only worker schematics will change and that can be moved to separated files. something like worker_poll.c and worker_event.c and both of them use common packet processing functions using mbuf. The only disadvantage of having separate application would be packet processing code duplication. Which is non trivial for l3fwd, IPSec application IMO. # Are we fine with code duplication in example application like l3fwd and IPSec? # if yes, Are we fine with keeping l2fwd _as is_ to reduce the complexity and l2fwd-eventdev supports both modes wherever possible? > > As the number of examples increases, probably also need to have > a roadmap or decision chart to explain the advangage/disadvantage > of each architecture. >
Hi everyone, > > > > > > > > In order to get this series accepted, we need more discussions > > > > with more people involved. > > > > So it will miss 18.08. > > > > > > > > It can be discussed in a more global discussion about examples maintenance. > > > > If discussion does not happen, you can request it to the technical board. > > > > > > > Event dev framework and various adapters enable multiple packet handling > > > schemes, as opposed to the traditional polling on queues. But these > > > features are not integrated into any established example application. > > > There are specific example applications for event dev etc, which can be > > > used to analyze an event device or a particular eventdev adapter, but > > > there is no standard application which can be used to compare the real > > > world performance for a system when it's using event device for packet > > > handling and when it's done via polling on queues. > > > > > > The following patch submitted by Sunil was looking to address this issue > > > with l3fwd, > > > https://mails.dpdk.org/archives/dev/2018-March/093131.html > > > > > > Bruce & Jerin reviewed the patch and suggested the addition of helper > > > functions to abstract the event mode additions in applications, > > > https://mails.dpdk.org/archives/dev/2018-April/096879.html > > > > > > This effort of adding helper functions for eventmode was taken up > > > following the above suggestion. The idea is to add eventmode without > > > touching the existing code path. All the eventmode specific additions > > > would go into library so that these need not be repeated for every > > > application. And since there is no change in the existing code path, > > > performance for any vendor should not have any impact with the additions. > > > > > > The scope of this effort has increased since the submission, as now we > > > have Tx adapter as well. Sunil & Konstantin had clarified their > > > concerns, and gave green flag to this approach. > > > https://mails.dpdk.org/archives/dev/2018-June/105730.html > > > https://mails.dpdk.org/archives/dev/2018-July/106453.html > > > > > > I guess Bruce was opening this question to the community. For compute > > > intense applications like ipsec-secgw, eventmode might be the right > > > approach in the first place. Such complex applications would need a > > > scheduler to perform dynamic load balancing. Addition of eventmode in > > > l2fwd was to float around the idea which can then be scaled for more > > > complex applications. > > > > > > If maintainers doesn't have any objection to this, I'm fine with adding > > > this in the next release. > > > > > > Thanks, > > > Anoob > > > > It is important that DPDK has good examples of how to use existing > > frameworks and libraries. These applications are what most customers > > build their applications from and they provide basis for testing. > > > > The DPDK needs to continue to support multiple usage models. This > > is one of its strong points. I would rather leave existing l2fwd > > and l3fwd alone and instead make new examples that use the frameworks. > > If nothing else haveing l2fwd and l2fwd-eventdev would allow for > > performance comparisons. > > Unlike other applications example, there wont be any change in packet > processing functions in eventdev vs poll mode case. Only worker > schematics will change and that can be moved to separated files. > something like worker_poll.c and worker_event.c and both of them > use common packet processing functions using mbuf. > > The only disadvantage of having separate application would be packet > processing code duplication. Which is non trivial for l3fwd, IPSec > application IMO. Personally I am ok with original design suggestion: keep packet processing code common, that would be used by both poll and event modes. We could just have a command-line parameter in which mode the app will run. Another alternative - generate two binaries l2fwd-poll, l2fwd-event (or so). Konstantin > > # Are we fine with code duplication in example application like l3fwd and > IPSec? > # if yes, Are we fine with keeping l2fwd _as is_ to reduce the > complexity and l2fwd-eventdev supports both modes wherever possible? > > > > > As the number of examples increases, probably also need to have > > a roadmap or decision chart to explain the advangage/disadvantage > > of each architecture. > >
Hi Bruce, Pablo, If there are no more issues about the approach, can you review the patches and give the feedback? Please do note that this series doesn't add any event mode specific code. That will come as a different patch series after incorporating Jerin's comments. Thanks, Anoob On 02-08-2018 13:49, Ananyev, Konstantin wrote: > External Email > > Hi everyone, > >>>>> In order to get this series accepted, we need more discussions >>>>> with more people involved. >>>>> So it will miss 18.08. >>>>> >>>>> It can be discussed in a more global discussion about examples maintenance. >>>>> If discussion does not happen, you can request it to the technical board. >>>>> >>>> Event dev framework and various adapters enable multiple packet handling >>>> schemes, as opposed to the traditional polling on queues. But these >>>> features are not integrated into any established example application. >>>> There are specific example applications for event dev etc, which can be >>>> used to analyze an event device or a particular eventdev adapter, but >>>> there is no standard application which can be used to compare the real >>>> world performance for a system when it's using event device for packet >>>> handling and when it's done via polling on queues. >>>> >>>> The following patch submitted by Sunil was looking to address this issue >>>> with l3fwd, >>>> https://mails.dpdk.org/archives/dev/2018-March/093131.html >>>> >>>> Bruce & Jerin reviewed the patch and suggested the addition of helper >>>> functions to abstract the event mode additions in applications, >>>> https://mails.dpdk.org/archives/dev/2018-April/096879.html >>>> >>>> This effort of adding helper functions for eventmode was taken up >>>> following the above suggestion. The idea is to add eventmode without >>>> touching the existing code path. All the eventmode specific additions >>>> would go into library so that these need not be repeated for every >>>> application. And since there is no change in the existing code path, >>>> performance for any vendor should not have any impact with the additions. >>>> >>>> The scope of this effort has increased since the submission, as now we >>>> have Tx adapter as well. Sunil & Konstantin had clarified their >>>> concerns, and gave green flag to this approach. >>>> https://mails.dpdk.org/archives/dev/2018-June/105730.html >>>> https://mails.dpdk.org/archives/dev/2018-July/106453.html >>>> >>>> I guess Bruce was opening this question to the community. For compute >>>> intense applications like ipsec-secgw, eventmode might be the right >>>> approach in the first place. Such complex applications would need a >>>> scheduler to perform dynamic load balancing. Addition of eventmode in >>>> l2fwd was to float around the idea which can then be scaled for more >>>> complex applications. >>>> >>>> If maintainers doesn't have any objection to this, I'm fine with adding >>>> this in the next release. >>>> >>>> Thanks, >>>> Anoob >>> It is important that DPDK has good examples of how to use existing >>> frameworks and libraries. These applications are what most customers >>> build their applications from and they provide basis for testing. >>> >>> The DPDK needs to continue to support multiple usage models. This >>> is one of its strong points. I would rather leave existing l2fwd >>> and l3fwd alone and instead make new examples that use the frameworks. >>> If nothing else haveing l2fwd and l2fwd-eventdev would allow for >>> performance comparisons. >> Unlike other applications example, there wont be any change in packet >> processing functions in eventdev vs poll mode case. Only worker >> schematics will change and that can be moved to separated files. >> something like worker_poll.c and worker_event.c and both of them >> use common packet processing functions using mbuf. >> >> The only disadvantage of having separate application would be packet >> processing code duplication. Which is non trivial for l3fwd, IPSec >> application IMO. > Personally I am ok with original design suggestion: > keep packet processing code common, that would be used by both poll and event modes. > We could just have a command-line parameter in which mode the app will run. > Another alternative - generate two binaries l2fwd-poll, l2fwd-event (or so). > Konstantin >> # Are we fine with code duplication in example application like l3fwd and >> IPSec? >> # if yes, Are we fine with keeping l2fwd _as is_ to reduce the >> complexity and l2fwd-eventdev supports both modes wherever possible? >> >>> As the number of examples increases, probably also need to have >>> a roadmap or decision chart to explain the advangage/disadvantage >>> of each architecture. >>>
On Mon, Aug 13, 2018 at 12:52:19PM +0530, Joseph, Anoob wrote: > Hi Bruce, Pablo, > > If there are no more issues about the approach, can you review the patches > and give the feedback? > > Please do note that this series doesn't add any event mode specific code. > That will come as a different patch series after incorporating Jerin's > comments. > > Thanks, > Anoob My main concern is with l2fwd, rather than l3fwd, which is already fairly complicated. I could see l3fwd being updated to allow an eventmode without too many problems. With l2fwd, the only issue I have is with the volume of code involved. l2fwd is currently a very simple application which fits in a single file. With these updates it's no longer such a simple, approachable app, rather it becomes one which takes a bit of studying a switching between files to fully understand. The data path is only a very small part of the app, so by adding an event-based path to the same app we have very little code saving. Therefore, I think having a separate l2fwd-eventdev would be better for this case. Two simpler to understand apps is better than one more complicated on IMHO. My 2c. /Bruce > On 02-08-2018 13:49, Ananyev, Konstantin wrote: > > External Email > > > > Hi everyone, > > > > > > > > In order to get this series accepted, we need more discussions > > > > > > with more people involved. > > > > > > So it will miss 18.08. > > > > > > > > > > > > It can be discussed in a more global discussion about examples maintenance. > > > > > > If discussion does not happen, you can request it to the technical board. > > > > > > > > > > > Event dev framework and various adapters enable multiple packet handling > > > > > schemes, as opposed to the traditional polling on queues. But these > > > > > features are not integrated into any established example application. > > > > > There are specific example applications for event dev etc, which can be > > > > > used to analyze an event device or a particular eventdev adapter, but > > > > > there is no standard application which can be used to compare the real > > > > > world performance for a system when it's using event device for packet > > > > > handling and when it's done via polling on queues. > > > > > > > > > > The following patch submitted by Sunil was looking to address this issue > > > > > with l3fwd, > > > > > https://mails.dpdk.org/archives/dev/2018-March/093131.html > > > > > > > > > > Bruce & Jerin reviewed the patch and suggested the addition of helper > > > > > functions to abstract the event mode additions in applications, > > > > > https://mails.dpdk.org/archives/dev/2018-April/096879.html > > > > > > > > > > This effort of adding helper functions for eventmode was taken up > > > > > following the above suggestion. The idea is to add eventmode without > > > > > touching the existing code path. All the eventmode specific additions > > > > > would go into library so that these need not be repeated for every > > > > > application. And since there is no change in the existing code path, > > > > > performance for any vendor should not have any impact with the additions. > > > > > > > > > > The scope of this effort has increased since the submission, as now we > > > > > have Tx adapter as well. Sunil & Konstantin had clarified their > > > > > concerns, and gave green flag to this approach. > > > > > https://mails.dpdk.org/archives/dev/2018-June/105730.html > > > > > https://mails.dpdk.org/archives/dev/2018-July/106453.html > > > > > > > > > > I guess Bruce was opening this question to the community. For compute > > > > > intense applications like ipsec-secgw, eventmode might be the right > > > > > approach in the first place. Such complex applications would need a > > > > > scheduler to perform dynamic load balancing. Addition of eventmode in > > > > > l2fwd was to float around the idea which can then be scaled for more > > > > > complex applications. > > > > > > > > > > If maintainers doesn't have any objection to this, I'm fine with adding > > > > > this in the next release. > > > > > > > > > > Thanks, > > > > > Anoob > > > > It is important that DPDK has good examples of how to use existing > > > > frameworks and libraries. These applications are what most customers > > > > build their applications from and they provide basis for testing. > > > > > > > > The DPDK needs to continue to support multiple usage models. This > > > > is one of its strong points. I would rather leave existing l2fwd > > > > and l3fwd alone and instead make new examples that use the frameworks. > > > > If nothing else haveing l2fwd and l2fwd-eventdev would allow for > > > > performance comparisons. > > > Unlike other applications example, there wont be any change in packet > > > processing functions in eventdev vs poll mode case. Only worker > > > schematics will change and that can be moved to separated files. > > > something like worker_poll.c and worker_event.c and both of them > > > use common packet processing functions using mbuf. > > > > > > The only disadvantage of having separate application would be packet > > > processing code duplication. Which is non trivial for l3fwd, IPSec > > > application IMO. > > Personally I am ok with original design suggestion: > > keep packet processing code common, that would be used by both poll and event modes. > > We could just have a command-line parameter in which mode the app will run. > > Another alternative - generate two binaries l2fwd-poll, l2fwd-event (or so). > > Konstantin > > > # Are we fine with code duplication in example application like l3fwd and > > > IPSec? > > > # if yes, Are we fine with keeping l2fwd _as is_ to reduce the > > > complexity and l2fwd-eventdev supports both modes wherever possible? > > > > > > > As the number of examples increases, probably also need to have > > > > a roadmap or decision chart to explain the advangage/disadvantage > > > > of each architecture. > > > > >
Hi Bruce, The reason why l2fwd was chosen was to allow everyone to chip in their ideas while preparing the framework. This framework would be extended to other applications, hence needed enough inputs before expanding to complex applications. If your suggestion is to make l3fwd event driven first, I'll start looking in that direction. As for l2fwd, I'm fine with moving event-mode additions to a new app. But with the present approach, the app would run in both event mode and poll mode. Your thoughts on renaming the existing app to l2fwd-poll and the proposed app as l2fwd? Thanks, Anoob On 13-08-2018 14:57, Bruce Richardson wrote: > External Email > > On Mon, Aug 13, 2018 at 12:52:19PM +0530, Joseph, Anoob wrote: >> Hi Bruce, Pablo, >> >> If there are no more issues about the approach, can you review the patches >> and give the feedback? >> >> Please do note that this series doesn't add any event mode specific code. >> That will come as a different patch series after incorporating Jerin's >> comments. >> >> Thanks, >> Anoob > My main concern is with l2fwd, rather than l3fwd, which is already fairly > complicated. I could see l3fwd being updated to allow an eventmode without > too many problems. > > With l2fwd, the only issue I have is with the volume of code involved. > l2fwd is currently a very simple application which fits in a single file. > With these updates it's no longer such a simple, approachable app, rather > it becomes one which takes a bit of studying a switching between files to > fully understand. The data path is only a very small part of the app, so by > adding an event-based path to the same app we have very little code saving. > Therefore, I think having a separate l2fwd-eventdev would be better for > this case. Two simpler to understand apps is better than one more > complicated on IMHO. > > My 2c. > > /Bruce > >> On 02-08-2018 13:49, Ananyev, Konstantin wrote: >>> External Email >>> >>> Hi everyone, >>> >>>>>>> In order to get this series accepted, we need more discussions >>>>>>> with more people involved. >>>>>>> So it will miss 18.08. >>>>>>> >>>>>>> It can be discussed in a more global discussion about examples maintenance. >>>>>>> If discussion does not happen, you can request it to the technical board. >>>>>>> >>>>>> Event dev framework and various adapters enable multiple packet handling >>>>>> schemes, as opposed to the traditional polling on queues. But these >>>>>> features are not integrated into any established example application. >>>>>> There are specific example applications for event dev etc, which can be >>>>>> used to analyze an event device or a particular eventdev adapter, but >>>>>> there is no standard application which can be used to compare the real >>>>>> world performance for a system when it's using event device for packet >>>>>> handling and when it's done via polling on queues. >>>>>> >>>>>> The following patch submitted by Sunil was looking to address this issue >>>>>> with l3fwd, >>>>>> https://mails.dpdk.org/archives/dev/2018-March/093131.html >>>>>> >>>>>> Bruce & Jerin reviewed the patch and suggested the addition of helper >>>>>> functions to abstract the event mode additions in applications, >>>>>> https://mails.dpdk.org/archives/dev/2018-April/096879.html >>>>>> >>>>>> This effort of adding helper functions for eventmode was taken up >>>>>> following the above suggestion. The idea is to add eventmode without >>>>>> touching the existing code path. All the eventmode specific additions >>>>>> would go into library so that these need not be repeated for every >>>>>> application. And since there is no change in the existing code path, >>>>>> performance for any vendor should not have any impact with the additions. >>>>>> >>>>>> The scope of this effort has increased since the submission, as now we >>>>>> have Tx adapter as well. Sunil & Konstantin had clarified their >>>>>> concerns, and gave green flag to this approach. >>>>>> https://mails.dpdk.org/archives/dev/2018-June/105730.html >>>>>> https://mails.dpdk.org/archives/dev/2018-July/106453.html >>>>>> >>>>>> I guess Bruce was opening this question to the community. For compute >>>>>> intense applications like ipsec-secgw, eventmode might be the right >>>>>> approach in the first place. Such complex applications would need a >>>>>> scheduler to perform dynamic load balancing. Addition of eventmode in >>>>>> l2fwd was to float around the idea which can then be scaled for more >>>>>> complex applications. >>>>>> >>>>>> If maintainers doesn't have any objection to this, I'm fine with adding >>>>>> this in the next release. >>>>>> >>>>>> Thanks, >>>>>> Anoob >>>>> It is important that DPDK has good examples of how to use existing >>>>> frameworks and libraries. These applications are what most customers >>>>> build their applications from and they provide basis for testing. >>>>> >>>>> The DPDK needs to continue to support multiple usage models. This >>>>> is one of its strong points. I would rather leave existing l2fwd >>>>> and l3fwd alone and instead make new examples that use the frameworks. >>>>> If nothing else haveing l2fwd and l2fwd-eventdev would allow for >>>>> performance comparisons. >>>> Unlike other applications example, there wont be any change in packet >>>> processing functions in eventdev vs poll mode case. Only worker >>>> schematics will change and that can be moved to separated files. >>>> something like worker_poll.c and worker_event.c and both of them >>>> use common packet processing functions using mbuf. >>>> >>>> The only disadvantage of having separate application would be packet >>>> processing code duplication. Which is non trivial for l3fwd, IPSec >>>> application IMO. >>> Personally I am ok with original design suggestion: >>> keep packet processing code common, that would be used by both poll and event modes. >>> We could just have a command-line parameter in which mode the app will run. >>> Another alternative - generate two binaries l2fwd-poll, l2fwd-event (or so). >>> Konstantin >>>> # Are we fine with code duplication in example application like l3fwd and >>>> IPSec? >>>> # if yes, Are we fine with keeping l2fwd _as is_ to reduce the >>>> complexity and l2fwd-eventdev supports both modes wherever possible? >>>> >>>>> As the number of examples increases, probably also need to have >>>>> a roadmap or decision chart to explain the advangage/disadvantage >>>>> of each architecture. >>>>>
On Mon, Aug 13, 2018 at 09:29:01PM +0530, Joseph, Anoob wrote: > Hi Bruce, > > The reason why l2fwd was chosen was to allow everyone to chip in their ideas > while preparing the framework. > This framework would be extended to other applications, hence needed enough > inputs before expanding to complex applications. If your suggestion is to > make l3fwd event driven first, I'll start looking in that direction. Seems good to me, if others don't have an issue with it. > > As for l2fwd, I'm fine with moving event-mode additions to a new app. But > with the present approach, the app would run in both event mode and poll > mode. > > Your thoughts on renaming the existing app to l2fwd-poll and the proposed > app as l2fwd? > > Thanks, > Anoob I'm not sure about the name "poll", I think "ethdev" and "eventdev" should be the suffixes, if we want to move in that direction. However, my preference would be to leave l2fwd as-is, and to have a comment at the top of the source file, and note in the documentation along the lines of: "This example demonstrates basic l2 forwarding using ethdev primitives. To see the same use-case implemented using event-based primitives, see the 'l2fwd-eventdev' example". As I said before, my main concern is to keep the basic examples short and readable. /Bruce > On 13-08-2018 14:57, Bruce Richardson wrote: > > External Email > > > > On Mon, Aug 13, 2018 at 12:52:19PM +0530, Joseph, Anoob wrote: > > > Hi Bruce, Pablo, > > > > > > If there are no more issues about the approach, can you review the patches > > > and give the feedback? > > > > > > Please do note that this series doesn't add any event mode specific code. > > > That will come as a different patch series after incorporating Jerin's > > > comments. > > > > > > Thanks, > > > Anoob > > My main concern is with l2fwd, rather than l3fwd, which is already fairly > > complicated. I could see l3fwd being updated to allow an eventmode without > > too many problems. > > > > With l2fwd, the only issue I have is with the volume of code involved. > > l2fwd is currently a very simple application which fits in a single file. > > With these updates it's no longer such a simple, approachable app, rather > > it becomes one which takes a bit of studying a switching between files to > > fully understand. The data path is only a very small part of the app, so by > > adding an event-based path to the same app we have very little code saving. > > Therefore, I think having a separate l2fwd-eventdev would be better for > > this case. Two simpler to understand apps is better than one more > > complicated on IMHO. > > > > My 2c. > > > > /Bruce > > > > > On 02-08-2018 13:49, Ananyev, Konstantin wrote: > > > > External Email > > > > > > > > Hi everyone, > > > > > > > > > > > > In order to get this series accepted, we need more discussions > > > > > > > > with more people involved. > > > > > > > > So it will miss 18.08. > > > > > > > > > > > > > > > > It can be discussed in a more global discussion about examples maintenance. > > > > > > > > If discussion does not happen, you can request it to the technical board. > > > > > > > > > > > > > > > Event dev framework and various adapters enable multiple packet handling > > > > > > > schemes, as opposed to the traditional polling on queues. But these > > > > > > > features are not integrated into any established example application. > > > > > > > There are specific example applications for event dev etc, which can be > > > > > > > used to analyze an event device or a particular eventdev adapter, but > > > > > > > there is no standard application which can be used to compare the real > > > > > > > world performance for a system when it's using event device for packet > > > > > > > handling and when it's done via polling on queues. > > > > > > > > > > > > > > The following patch submitted by Sunil was looking to address this issue > > > > > > > with l3fwd, > > > > > > > https://mails.dpdk.org/archives/dev/2018-March/093131.html > > > > > > > > > > > > > > Bruce & Jerin reviewed the patch and suggested the addition of helper > > > > > > > functions to abstract the event mode additions in applications, > > > > > > > https://mails.dpdk.org/archives/dev/2018-April/096879.html > > > > > > > > > > > > > > This effort of adding helper functions for eventmode was taken up > > > > > > > following the above suggestion. The idea is to add eventmode without > > > > > > > touching the existing code path. All the eventmode specific additions > > > > > > > would go into library so that these need not be repeated for every > > > > > > > application. And since there is no change in the existing code path, > > > > > > > performance for any vendor should not have any impact with the additions. > > > > > > > > > > > > > > The scope of this effort has increased since the submission, as now we > > > > > > > have Tx adapter as well. Sunil & Konstantin had clarified their > > > > > > > concerns, and gave green flag to this approach. > > > > > > > https://mails.dpdk.org/archives/dev/2018-June/105730.html > > > > > > > https://mails.dpdk.org/archives/dev/2018-July/106453.html > > > > > > > > > > > > > > I guess Bruce was opening this question to the community. For compute > > > > > > > intense applications like ipsec-secgw, eventmode might be the right > > > > > > > approach in the first place. Such complex applications would need a > > > > > > > scheduler to perform dynamic load balancing. Addition of eventmode in > > > > > > > l2fwd was to float around the idea which can then be scaled for more > > > > > > > complex applications. > > > > > > > > > > > > > > If maintainers doesn't have any objection to this, I'm fine with adding > > > > > > > this in the next release. > > > > > > > > > > > > > > Thanks, > > > > > > > Anoob > > > > > > It is important that DPDK has good examples of how to use existing > > > > > > frameworks and libraries. These applications are what most customers > > > > > > build their applications from and they provide basis for testing. > > > > > > > > > > > > The DPDK needs to continue to support multiple usage models. This > > > > > > is one of its strong points. I would rather leave existing l2fwd > > > > > > and l3fwd alone and instead make new examples that use the frameworks. > > > > > > If nothing else haveing l2fwd and l2fwd-eventdev would allow for > > > > > > performance comparisons. > > > > > Unlike other applications example, there wont be any change in packet > > > > > processing functions in eventdev vs poll mode case. Only worker > > > > > schematics will change and that can be moved to separated files. > > > > > something like worker_poll.c and worker_event.c and both of them > > > > > use common packet processing functions using mbuf. > > > > > > > > > > The only disadvantage of having separate application would be packet > > > > > processing code duplication. Which is non trivial for l3fwd, IPSec > > > > > application IMO. > > > > Personally I am ok with original design suggestion: > > > > keep packet processing code common, that would be used by both poll and event modes. > > > > We could just have a command-line parameter in which mode the app will run. > > > > Another alternative - generate two binaries l2fwd-poll, l2fwd-event (or so). > > > > Konstantin > > > > > # Are we fine with code duplication in example application like l3fwd and > > > > > IPSec? > > > > > # if yes, Are we fine with keeping l2fwd _as is_ to reduce the > > > > > complexity and l2fwd-eventdev supports both modes wherever possible? > > > > > > > > > > > As the number of examples increases, probably also need to have > > > > > > a roadmap or decision chart to explain the advangage/disadvantage > > > > > > of each architecture. > > > > > > >
Hi Bruce, On 14-08-2018 16:03, Bruce Richardson wrote: > External Email > > On Mon, Aug 13, 2018 at 09:29:01PM +0530, Joseph, Anoob wrote: >> Hi Bruce, >> >> The reason why l2fwd was chosen was to allow everyone to chip in their ideas >> while preparing the framework. >> This framework would be extended to other applications, hence needed enough >> inputs before expanding to complex applications. If your suggestion is to >> make l3fwd event driven first, I'll start looking in that direction. > Seems good to me, if others don't have an issue with it. > >> As for l2fwd, I'm fine with moving event-mode additions to a new app. But >> with the present approach, the app would run in both event mode and poll >> mode. >> >> Your thoughts on renaming the existing app to l2fwd-poll and the proposed >> app as l2fwd? >> >> Thanks, >> Anoob > I'm not sure about the name "poll", I think "ethdev" and "eventdev" should be > the suffixes, if we want to move in that direction. With new adapters, like crypto adapter, event device will be able to handle multiple devices at the same time. It will be able to abstract not just eth device but other devices too (crypto for example). For apps like ipsec-secgw, crypto also would be abstracted with event-device. So what should be the ideal naming convention taking into account all that? Using "eth"& "event" won't fit in for such cases. Presently, mode was defined by the way packets were submitted to & received from the device. With poll mode, device(eth, crypto etc) would get packets directly from the core & the core would then poll for completion. In case of event-mode, event device handles this scheduling. Event device would submit (to all devices) and receive packets (from all devices). Core need not poll on the device, in that case. Hence the naming... Your thoughts? Anoob > However, my preference would be to leave l2fwd as-is, and to have a comment > at the top of the source file, and note in the documentation along the > lines of: > > "This example demonstrates basic l2 forwarding using ethdev primitives. To > see the same use-case implemented using event-based primitives, see the > 'l2fwd-eventdev' example". > > As I said before, my main concern is to keep the basic examples short and > readable. > > /Bruce > >> On 13-08-2018 14:57, Bruce Richardson wrote: >>> External Email >>> >>> On Mon, Aug 13, 2018 at 12:52:19PM +0530, Joseph, Anoob wrote: >>>> Hi Bruce, Pablo, >>>> >>>> If there are no more issues about the approach, can you review the patches >>>> and give the feedback? >>>> >>>> Please do note that this series doesn't add any event mode specific code. >>>> That will come as a different patch series after incorporating Jerin's >>>> comments. >>>> >>>> Thanks, >>>> Anoob >>> My main concern is with l2fwd, rather than l3fwd, which is already fairly >>> complicated. I could see l3fwd being updated to allow an eventmode without >>> too many problems. >>> >>> With l2fwd, the only issue I have is with the volume of code involved. >>> l2fwd is currently a very simple application which fits in a single file. >>> With these updates it's no longer such a simple, approachable app, rather >>> it becomes one which takes a bit of studying a switching between files to >>> fully understand. The data path is only a very small part of the app, so by >>> adding an event-based path to the same app we have very little code saving. >>> Therefore, I think having a separate l2fwd-eventdev would be better for >>> this case. Two simpler to understand apps is better than one more >>> complicated on IMHO. >>> >>> My 2c. >>> >>> /Bruce >>> >>>> On 02-08-2018 13:49, Ananyev, Konstantin wrote: >>>>> External Email >>>>> >>>>> Hi everyone, >>>>> >>>>>>>>> In order to get this series accepted, we need more discussions >>>>>>>>> with more people involved. >>>>>>>>> So it will miss 18.08. >>>>>>>>> >>>>>>>>> It can be discussed in a more global discussion about examples maintenance. >>>>>>>>> If discussion does not happen, you can request it to the technical board. >>>>>>>>> >>>>>>>> Event dev framework and various adapters enable multiple packet handling >>>>>>>> schemes, as opposed to the traditional polling on queues. But these >>>>>>>> features are not integrated into any established example application. >>>>>>>> There are specific example applications for event dev etc, which can be >>>>>>>> used to analyze an event device or a particular eventdev adapter, but >>>>>>>> there is no standard application which can be used to compare the real >>>>>>>> world performance for a system when it's using event device for packet >>>>>>>> handling and when it's done via polling on queues. >>>>>>>> >>>>>>>> The following patch submitted by Sunil was looking to address this issue >>>>>>>> with l3fwd, >>>>>>>> https://mails.dpdk.org/archives/dev/2018-March/093131.html >>>>>>>> >>>>>>>> Bruce & Jerin reviewed the patch and suggested the addition of helper >>>>>>>> functions to abstract the event mode additions in applications, >>>>>>>> https://mails.dpdk.org/archives/dev/2018-April/096879.html >>>>>>>> >>>>>>>> This effort of adding helper functions for eventmode was taken up >>>>>>>> following the above suggestion. The idea is to add eventmode without >>>>>>>> touching the existing code path. All the eventmode specific additions >>>>>>>> would go into library so that these need not be repeated for every >>>>>>>> application. And since there is no change in the existing code path, >>>>>>>> performance for any vendor should not have any impact with the additions. >>>>>>>> >>>>>>>> The scope of this effort has increased since the submission, as now we >>>>>>>> have Tx adapter as well. Sunil & Konstantin had clarified their >>>>>>>> concerns, and gave green flag to this approach. >>>>>>>> https://mails.dpdk.org/archives/dev/2018-June/105730.html >>>>>>>> https://mails.dpdk.org/archives/dev/2018-July/106453.html >>>>>>>> >>>>>>>> I guess Bruce was opening this question to the community. For compute >>>>>>>> intense applications like ipsec-secgw, eventmode might be the right >>>>>>>> approach in the first place. Such complex applications would need a >>>>>>>> scheduler to perform dynamic load balancing. Addition of eventmode in >>>>>>>> l2fwd was to float around the idea which can then be scaled for more >>>>>>>> complex applications. >>>>>>>> >>>>>>>> If maintainers doesn't have any objection to this, I'm fine with adding >>>>>>>> this in the next release. >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Anoob >>>>>>> It is important that DPDK has good examples of how to use existing >>>>>>> frameworks and libraries. These applications are what most customers >>>>>>> build their applications from and they provide basis for testing. >>>>>>> >>>>>>> The DPDK needs to continue to support multiple usage models. This >>>>>>> is one of its strong points. I would rather leave existing l2fwd >>>>>>> and l3fwd alone and instead make new examples that use the frameworks. >>>>>>> If nothing else haveing l2fwd and l2fwd-eventdev would allow for >>>>>>> performance comparisons. >>>>>> Unlike other applications example, there wont be any change in packet >>>>>> processing functions in eventdev vs poll mode case. Only worker >>>>>> schematics will change and that can be moved to separated files. >>>>>> something like worker_poll.c and worker_event.c and both of them >>>>>> use common packet processing functions using mbuf. >>>>>> >>>>>> The only disadvantage of having separate application would be packet >>>>>> processing code duplication. Which is non trivial for l3fwd, IPSec >>>>>> application IMO. >>>>> Personally I am ok with original design suggestion: >>>>> keep packet processing code common, that would be used by both poll and event modes. >>>>> We could just have a command-line parameter in which mode the app will run. >>>>> Another alternative - generate two binaries l2fwd-poll, l2fwd-event (or so). >>>>> Konstantin >>>>>> # Are we fine with code duplication in example application like l3fwd and >>>>>> IPSec? >>>>>> # if yes, Are we fine with keeping l2fwd _as is_ to reduce the >>>>>> complexity and l2fwd-eventdev supports both modes wherever possible? >>>>>> >>>>>>> As the number of examples increases, probably also need to have >>>>>>> a roadmap or decision chart to explain the advangage/disadvantage >>>>>>> of each architecture. >>>>>>>
18/08/2018 11:58, Joseph, Anoob: > Hi Bruce, > > On 14-08-2018 16:03, Bruce Richardson wrote: > > On Mon, Aug 13, 2018 at 09:29:01PM +0530, Joseph, Anoob wrote: > >> Hi Bruce, > >> > >> The reason why l2fwd was chosen was to allow everyone to chip in their ideas > >> while preparing the framework. > >> This framework would be extended to other applications, hence needed enough > >> inputs before expanding to complex applications. If your suggestion is to > >> make l3fwd event driven first, I'll start looking in that direction. > > Seems good to me, if others don't have an issue with it. > > > >> As for l2fwd, I'm fine with moving event-mode additions to a new app. But > >> with the present approach, the app would run in both event mode and poll > >> mode. > >> > >> Your thoughts on renaming the existing app to l2fwd-poll and the proposed > >> app as l2fwd? > >> > >> Thanks, > >> Anoob > > I'm not sure about the name "poll", I think "ethdev" and "eventdev" should be > > the suffixes, if we want to move in that direction. > With new adapters, like crypto adapter, event device will be able to > handle multiple devices at the same time. It will be able to abstract > not just eth device but other devices too (crypto for example). For apps > like ipsec-secgw, crypto also would be abstracted with event-device. So > what should be the ideal naming convention taking into account all that? > Using "eth"& "event" won't fit in for such cases. > > Presently, mode was defined by the way packets were submitted to & > received from the device. With poll mode, device(eth, crypto etc) would > get packets directly from the core & the core would then poll for > completion. In case of event-mode, event device handles this scheduling. > Event device would submit (to all devices) and receive packets (from all > devices). Core need not poll on the device, in that case. Hence the > naming... > > Your thoughts? I think it is OK to have event mode in examples, in general. The only concern of Bruce was to keep l2fwd example simple. So for l2fwd, and only for this one, you can create a new example called l2fwd-event.