From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0050.outbound.protection.outlook.com [104.47.36.50]) by dpdk.org (Postfix) with ESMTP id 247C45A36 for ; Fri, 26 Aug 2016 17:55:00 +0200 (CEST) Received: from BLUPR0301CA0022.namprd03.prod.outlook.com (10.162.113.160) by BY2PR03MB1877.namprd03.prod.outlook.com (10.164.114.17) with Microsoft SMTP Server (TLS) id 15.1.497.12; Fri, 26 Aug 2016 15:54:57 +0000 Received: from BL2FFO11OLC010.protection.gbl (2a01:111:f400:7c09::118) by BLUPR0301CA0022.outlook.office365.com (2a01:111:e400:5259::32) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.599.9 via Frontend Transport; Fri, 26 Aug 2016 15:54:56 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;nxp.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11OLC010.mail.protection.outlook.com (10.173.160.154) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.587.6 via Frontend Transport; Fri, 26 Aug 2016 15:54:57 +0000 Received: from BuildMachinepc.ap.freescale.net (BuildMachinepc.ap.freescale.net [10.232.133.79]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u7QFsrmO028095; Fri, 26 Aug 2016 08:54:54 -0700 From: Pankaj Chauhan To: CC: , , , , , Pankaj Chauhan Date: Sat, 27 Aug 2016 21:56:23 +0530 Message-ID: <1472315186-28090-1-git-send-email-pankaj.chauhan@nxp.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131167004979402340; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(305945005)(86362001)(68736007)(2906002)(50466002)(2351001)(50986999)(92566002)(106466001)(5660300001)(4326007)(104016004)(77096005)(47776003)(48376002)(586003)(229853001)(97736004)(7846002)(356003)(87936001)(85426001)(189998001)(8676002)(626004)(105606002)(50226002)(81166006)(110136002)(5003940100001)(33646002)(81156014)(8936002)(36756003)(8666005)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR03MB1877; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC010; 1:qlxizdoit+W1mItkUw8T4jAIqustqUWETxvusRctjYABGuItylLH6lQaMof5+fQQMGiXkX3mvlCxEP7Jltw7/5f+c/V3bN/5JdWsKUuhes8y/fUkvoYUSNycvJX7e/K0omY9SBHap85ZHw0moWixSuNxwYkWJ0+AzlamJKbSa0gf8CJhKxg03eDUJWrlHgscG244MVDmqL/WOWIqsIGvh+0pzZstS6R2GNtGzzqY3N9R/Hr19Bznt5JBiwrYyzA74rsw2H9Y7H6av3MCRBhobSaObODZk8GgASqiLV0KZMzI4ggIKUFedq7UIYj7Pfp6eR1WuSk3x6ImLkeR6jKVI2lTytnY+9omXdfi+tb1mzanzd+5/F3XzcteArjFR6XRT4QNajUvYGsW7fDg9cn2j+9LmqT+UkkGCSBv6aGiWosGVjTz7qG3G7jI5zSFXBW5WY5qYhTDDENIK00Y/PRus7pW4PjZ+Vfcpx0q0BYvYG+hPZiZXsA5EnKzaWP0Fgf1iFr0fLTMOy4yIHAFXHnyI84n4DRE9+pCJl8rLD75idMW3JZEn9uV8Si/9Wg/beYRc69QIHaZRPsOaiF/5fDvo+CJIUK+stXht956DfpmYmyzSaXjWhe4P4Kv3dNlIDDIJx0Lw1vbAi7qOXTq8xbpmYdpJ7hRBzEHdNBznXiOGGUwke2pYaBPZY9Tpnf21jgi3Ciwzfy0Gd2337hsDIcEYcXqqkGRxexCcKjIf9XrTmfkrZ5ScLEh9QB3quC4fCfsxjO/81bNuHen6RwGo7Oaww== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: b6df068f-fb26-4056-3505-08d3cdc95481 X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB1877; 2:aXmWcEMNDkPKMF3sElICnAvSDAFoC9ifkrxdY+Vi0UBAySb8w8G8jnlervpd8Q+rCA7Ogx6JHHvbcQhy/i3+nmF49z3uZheLsk1A7JFfpYdfVYLymJBDt3iPgKWnRh7z7dKSPO8kOAOD+CI+Fj1udMiLPVj25JiEGg19v4nrgRFIGBFfEofI6KXAnM32KplK; 3:+w++5UUGmViADFGunxZIv0ckLaXr+D2D5BMoDQG084uMRKy8aa209lYv70/11aIWORq3NffEtkBKNf8k/hOgjKF4ytaXUsVwz+utNdLskFtpwC6NiggVte7hM/r5j3j+osS4Inb/Qwqkybund4AOqCUgRtAnEhDvlivKRhYa5pKaixE5cOR+TvGW53aK8ehXwyPC0WQvwItPWjKuZh+PXmLuHiVDRv/jb6iBXhth2N0=; 25:OMvCNCsuhpsntZbEaY9E5O90hp0kGHUccZlHOt+k/Dh/uINO3w04tsqqs9WvYjMoZk5Nbss2JxtOdIVg1EVnc8wrBBr6Blg/jp4KMvnaX7g15Txp1h8W74ybqtjNMKRvcBSES2bLYUj9fv1uf4lUfwRqUIR5xxhYeTXBr5kyYKH86xNT3v12chHc7iypqe6TFRye0oZnYllX44vIuUYy5nV6/lqQwPID/IlnViAtnfwH0kNn+ASSE3+9kf7MwuDro/BNESRzffsunZwV8+DqMpiTBlY+TZdU7IxxGjQTAcdjORi4HCAoo0O38bY7xfeAOOpJvoMSo9IiCcJVrZqMfCJKXIEQzjo7igpbe4NyCZYE21bFtzLv4Vlz+XKvRJT5qLOoUddDtlrkPRZzp+gAt2scxQ+lbMLmEaK80CbTWO0= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB1877; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13015025)(13023025)(13024025)(13018025)(13017025)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:BY2PR03MB1877; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR03MB1877; X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB1877; 4:x+KOL68HXCOnZ5XRs80befMGLXMLl2eiGwbx+8Wck5aY7KH41S1v5v5JjMEMhAjXkCQ1YkDYcVXAzk1WLR2Nl3uHawmydD0VZ9oV+/Liim3j4orpdraBStS3adQt+E+kqlPwaKlukpWeo6mPmuPdJSOSNPY0ZVZFS2jw5wXnMwICwGWvkyFgL4XUU8hOqUgRMoUDjX8jNevB71LX49TlB66FyPWHI6KG5SdiZvGTY7qjoM96+2bWJoRHZz3jGhKwi30k/5ApQFHMBTPXjpJNLR6Haw0Tpgh9zC5AE9C/bqT4XOv/ARC59/gOZg8CAoG+ari6tSEaeQtZiBUPSIZOSwLGNDTWkuvelFeaYI6El/99yXMOab3m7LxBPDA+ve7QlU3hJfMaGkPvWJmkxRnmpwtbIGsST3ScG8g4qbP494Am2MiseW2TFGDpnPhoroO+bxqZv8kggV75Bn0dF0uY4PISaL/KR7QLuuznV9nK9HFVWsmr6Aq3ZcSPQ9v81okR X-Forefront-PRVS: 00462943DE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR03MB1877; 23:kGEm7KQh5cuqB4edydtrC557Kljl5TSx2WuvamW5t?= =?us-ascii?Q?LSH9KBau4F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R7lKx?= =?us-ascii?Q?/H6Wi95CyMvfx8BswAfVvAvlAnnl3ALzPG0hgG7aW6j8pyhaa0h5DtxLwDHo?= =?us-ascii?Q?3SQHPutqTb37MfxAEuoeDu/FPL3TahcqXrdOjaL0qxEFx6knGhgpRnPHCshE?= =?us-ascii?Q?4+MDVOKRjIkk0hv5LgkYe4Wbi9S?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB1877; 5:2PIFFhtK73SjW/CW3j19SGc5XdEXe5vQomrpXP/Ahee1Z9D7NxmDIDfelkk6WjDC5YAKWLmrKpvYMXHE2pPhXKLXqVmr5IVA4VKY21PfUSXHZnkNHz+h/SnVW4nBe+mJn10Mh+ZB6iT+qJsOgo0ka76J/4R0e9XUVNb1Q4tzyzc=; 24:qLpJfFaDQAp5ZxVnGtUHZypNeOSBIYJsmLNO8H+eIW5QTwlGoOq9DdWhNuZ54VT+th4vZybHv6W7fR1es9UNnlUdRaphfDDbMbmUPccCFmo=; 7:Q1fA4+WqihAAtM6UP+vssFCm2EJaPoEFMjhqAeWc6FTHt4/dcT24GtndCVX5hrDiGBNTDpHnX0AjPfcnwEriqlfKJxDTLyoCYmtPQvdA9fTg/+1mzJ9DJ76IYCIKSF6U6xIsLyVXJo0wzxgByHNpU8eBCszq/gO54pPbXgBfDOuhqVjEmLR+RYem8m9TriBX SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2016 15:54:57.7530 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB1877 Subject: [dpdk-dev] [RFC][PATCH 0/3] example/vhost: Introduce Vswitch Framework X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2016 15:55:00 -0000 Introduce generic vswitch framework in vhost-switch application. Following are the goals/aim of the framework: 1. Make vhost-switch application generic so that it can support devices which don't support VMDQ. 2. Provide a framework so that any switching logic (generic in software or vendor specefic like VMDQ) can work with vhost-switch. Thus making vhost-switch applicable for multiple platforms of different vendors. 3. Make vhost-switch and switching logic scalable in terms of ports or policies of doing rx/tx across the ports added to switch. The patchset includes three patches: 1. "Add vswitch(generic switch) framework": This adds the generic framework, it provides the APIs/accessor functions which the vhos-switch application uses without knowing anything about underlying switching logic. The framework introduces the concept of vswitch_device, vswitch_port, and vswitch_ops. The idea is that vhost-switch will sit over the framework and different switching logics will plug into the framework underneath it. Please refer the patch description for more details of devices, ports and ops. 2. "Add vswitch command line options": Adds two new command line options for vswitch. 3. "Add VMDQ vswitch device": This patch basically delinks existing vhost/main.[c,h] from VMDQ and adds VMDQ as a vswitch device implmentation which plugs into the vswitch framework. Any other vendor logic for switching can also be plugged in same way. Thanks to Tan Jianfeng, Yuanhan Liu, Maxime coquelin for early discussions and inputs on this concept. ** Caution and disclaimer ** 1. The patch set is not tested, it just compiles fine: I just finished the coding and sending the RFC patch so that it can be reviewed early. In parallel i will start testing it and therefore please forgive if you find some code which you think will crash shamelessly (i know it will crash :), it is not tested). So please review the concept, meanwhile i will test and send the next version soon. 2. This patchset is first step towards using vhost-switch on platforms other than intel and making it generic. It is no way complete, so i expect that we discuss/develop toghether towards the goals i mentioned in this cover letter. TODO list: 1. Test obviously : i will do it in comming week, once basic things are working i will send another version which you can use for your testing. Till then don't spend your time in test because i am sure it will waste your time for my silly mistakes. 2. Addd constructor based logic for registration of Vswitch implmentations like VMDQ. we will use similar mechanism as registration of PMD drivers (base on constructor function) to register all the switch implmentations in vhost-switch and then select the required implementation using command line option 'switch'. Pankaj Chauhan (3): examples/vhost: Add vswitch (generic switch) framework examples/vhost: Add vwitch command line options examples/vhost: Add VMDQ vswitch device examples/vhost/Makefile | 2 +- examples/vhost/main.c | 603 +++++++++++-------------------------- examples/vhost/main.h | 10 + examples/vhost/vmdq.c | 649 ++++++++++++++++++++++++++++++++++++++++ examples/vhost/vmdq.h | 59 ++++ examples/vhost/vswitch_common.c | 467 +++++++++++++++++++++++++++++ examples/vhost/vswitch_common.h | 175 +++++++++++ 7 files changed, 1528 insertions(+), 437 deletions(-) create mode 100644 examples/vhost/vmdq.c create mode 100644 examples/vhost/vmdq.h create mode 100644 examples/vhost/vswitch_common.c create mode 100644 examples/vhost/vswitch_common.h -- 1.9.1