From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 873DC5A57 for ; Fri, 26 Aug 2016 18:56:48 +0200 (CEST) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A5BE419D38D; Fri, 26 Aug 2016 16:56:47 +0000 (UTC) Received: from [10.36.7.161] (vpn1-7-161.ams2.redhat.com [10.36.7.161]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7QGuiYo005181 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 26 Aug 2016 12:56:46 -0400 To: Pankaj Chauhan , dev@dpdk.org References: <1472315186-28090-1-git-send-email-pankaj.chauhan@nxp.com> Cc: hemant.agrawal@nxp.com, shreyansh.jain@nxp.com, jianfeng.tan@intel.com, yuanhan.liu@linux.intel.com From: Maxime Coquelin Message-ID: Date: Fri, 26 Aug 2016 18:56:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1472315186-28090-1-git-send-email-pankaj.chauhan@nxp.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 26 Aug 2016 16:56:47 +0000 (UTC) Subject: Re: [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 16:56:48 -0000 On 08/27/2016 06:26 PM, Pankaj Chauhan wrote: > 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 > Thanks Pankaj, that was fast for such a big change! I'll start the review beginning of next week. Regards, Maxime