From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0085.outbound.protection.outlook.com [104.47.41.85]) by dpdk.org (Postfix) with ESMTP id 7B1F45587 for ; Mon, 12 Sep 2016 12:59:37 +0200 (CEST) Received: from BN6PR03CA0068.namprd03.prod.outlook.com (10.173.137.30) by SN2PR03MB1888.namprd03.prod.outlook.com (10.164.114.148) with Microsoft SMTP Server (TLS) id 15.1.403.16; Mon, 12 Sep 2016 10:59:35 +0000 Received: from BL2FFO11FD013.protection.gbl (2a01:111:f400:7c09::118) by BN6PR03CA0068.outlook.office365.com (2603:10b6:404:4c::30) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.619.10 via Frontend Transport; Mon, 12 Sep 2016 10:59:32 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; linux.intel.com; dkim=none (message not signed) header.d=none;linux.intel.com; dmarc=fail action=none header.from=nxp.com; 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 BL2FFO11FD013.mail.protection.outlook.com (10.173.160.221) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.587.6 via Frontend Transport; Mon, 12 Sep 2016 10:59:32 +0000 Received: from [127.0.0.1] (B32944-11.ap.freescale.net [10.232.14.25]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u8CAxQIW024411; Mon, 12 Sep 2016 03:59:29 -0700 To: Yuanhan Liu References: <1473072871-16108-1-git-send-email-pankaj.chauhan@nxp.com> <1473072871-16108-2-git-send-email-pankaj.chauhan@nxp.com> <20160911122142.GY23158@yliu-dev.sh.intel.com> CC: , , , , Thomas Monjalon From: Pankaj Chauhan Message-ID: Date: Mon, 12 Sep 2016 16:29:25 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160911122142.GY23158@yliu-dev.sh.intel.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131181515724292494; (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)(1109001)(1110001)(3190300001)(339900001)(377454003)(24454002)(51914003)(69234005)(199003)(43544003)(189002)(9170700003)(189998001)(76176999)(4001520100001)(36756003)(19580395003)(83506001)(65806001)(7846002)(47776003)(4001350100001)(2906002)(8936002)(23746002)(2950100001)(65956001)(65826007)(105606002)(305945005)(86362001)(110136002)(19580405001)(8676002)(31686004)(77096005)(7126002)(81166006)(7246003)(5660300001)(11100500001)(586003)(85426001)(50466002)(92566002)(33646002)(54356999)(8666005)(626004)(87936001)(120886001)(230700001)(4326007)(104016004)(64126003)(31696002)(106466001)(356003)(50986999)(5001760100003)(41533002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB1888; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD013; 1:kpBdY2iO7qKLGqz1HVaryR2dMNUqo+/msiXshz4f+pF3uQHDfImmWWJqxYRIW8ogQ3qX8UNwh4R9GHN2bxmPujHkYL5RNY1PF3J6vyPtkxDS2b3sBl1HZB7eckTZWfH8ZNSOfx9Uqmp+VKcDizj22gvavbC9lbWWiDrL9lcS0FO2w+3CTZu7KUQQt62ka9I1F1WrhE4lF2Ls110Taeew+ab+7PRrYBZCWFBg05S0vgH8ewHNF79XdnMfmkcjdK9PGNUsDhM94uKiO3Rjqk0hajSQkrEJSWfe3M7aMvCAg+N/H4AxfQm8X6rBZPectuQ3Ibn75lLin0pm0Wbkcr2eSyYwCVv1hFM8xEZDIYZ2jzGjrjF5+Jj+IkuLeqnFsZKZPpyNnGW8GadVvY1clXMUoMBH+wHYWI4MApBnI990hFnH4Iyjglio9JjSU/GaJYqsltxsADBmP3hFI7t112xxRRHxat4IFPmMbM/wPGqKBgdxDBmbpeHCGhZACL/bCNBXJLQbjnQrBHmoHodKZFc5oFUAgOBOG0BCmaLHjbFbAqIXCG1BiaxjpHtCdvYINHu4kuq1FEi8Ohhdt9eyOdNNpLyQgmNJU057mDbSTvjidXl6mYp62LBXiQbsTgih9N/R8RO157ll51J9WuXU1xKkbQ== X-MS-Office365-Filtering-Correlation-Id: 67a2735a-bb19-4af3-9525-08d3dafbe039 X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB1888; 2:hQLIAtPMcPyJHATywue46e8muPlVSt4Gs5A60ivj3ggnuXeWqsCvD/bar3mIUApz3//LrzWMvBMphftAIarZEh6IpnfQfpr8eAogrc21KXaUpyHepKtqS0UaQ1UFzuMP1/aa43AGyHiQgQoLKDn2RMWskcEm0VqYZcoUqmYPeTdly7126R/JJP7OLZqs7F6V; 3:cEP6eIAkVpK/z+D56O4Nm//+dWftQK5kGiqOdD4ODhLJitF1gqJHuHD7NRzWe8JMINd0JZcskERizKds/tjbFfkQ7qnfcAW7Dexv1o2fmJUYGtx3xggTYxPCVjh9Wz+cJsRNZP6h0CsvTCZMJLhtYudopAkWYM2+RImiUCFjKjxG5lSF8fYKMYZmKBH369DaUGRTSfLUbZZImkK6ReaI2YQ4Ha6HG/TT25S1D7f2w4s=; 25:jt3ct0F8sc8Hp4yXS06O9kcpByc3/JodnIGUhEjqCxkxUayoopIEt1UBgZFc7RUG1Z5wM0o7l43H+ELF/DZydV7yHjUW/3htX/Gc1FhZqBjhWTFv6yRS1SFa+urYwSbM3kTW6gkcqtVitkmfZI/kQfPWlPee+pwXLSRbgokSOpWC5lKIUlQ9YRoatrxRoZt72lokrZFtWmCIvHm9RRpkDWXoy88Me/WOVECPKkEiOWMZUmsE7KzjC00EjNKI3t9m X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN2PR03MB1888; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13018025)(8121501046)(13024025)(13023025)(5005006)(13015025)(13017025)(3002001)(10201501046)(6055026); SRVR:SN2PR03MB1888; BCL:0; PCL:0; RULEID:(400006); SRVR:SN2PR03MB1888; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB1888; 4:DlA90pLuysu6k0BL0umjdQmT4mF+5I92l789MIfDOssPF8nb8Q2IFoFMQ0XK27r4tNwIYxt6PN+Kepf7h2uc/mQuMHy4hcPyseE0CJpI3Drrlaefwy/WVqGVCc+BCiveqpehJdbN8aiUq1VeHiQYtkCh1hDyxrbshvJkTdrv0H8jYbREh1hGi8IehwcHDm3oFZ2YMdrc/4EFlfxjPW9NKA++azQSnWTwEN1xGtZjKO59OAlcWP4uCn9AN9JmAHEkoVK2vXxqjmgZoeazAxmxKi6ABv4S1LDuscdlaFEfmOmf9ugi5Vh28qoe3wO3tfvnafCZBxFUHgGTM6lbF83nfX7Q4C95yjPOBR71gC9oD3LgXAb1EbnGCnmIqvigib1GzkNBB/F2gOncNt3ap+QgmPrJ7XPNF0r8hRwOfojfq2DMpLGhUejlZE03O7Zh1GIa7/+uWoeynIsIaQIac+9xYHP0AzHMOw8C800fa4wkGwKG9vBWfyY7I+xmUDAj+1/olKTJco76VeJwXZ0e2gz8xQ== X-Forefront-PRVS: 006339698F X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; SN2PR03MB1888; 23:t5ZRzna2Xjje21j5Uy0GzFcs7aQPUyn46ItY6?= =?Windows-1252?Q?+wcI5pvR+fl5lZIjw0WSAVENim8ez+3H3fn2rhar3kobJmdd04Z/3aCo?= =?Windows-1252?Q?6wOJXb7ExlnLmwHEWap0lRIjPOFw/V9UIckhu9i17lxnHZ29/W7UEhgQ?= =?Windows-1252?Q?sNoWNxA+vwYCw6dJ1PEph+q4hv2qp2Ga2FvtJ1rOmTNkctAO8cXJ285y?= =?Windows-1252?Q?1gF+Minl2G55WRnDrxjROCrbgO4MNGWX+KGSChrXgW2veNIwQxvDkkMw?= =?Windows-1252?Q?cSs4t2gdb6gyiSE7ZuKkDIFkDuZrOx03iLkrX/XSe6F37xNyQEQoCmP7?= =?Windows-1252?Q?77XLABGrWa07lkpbNCYg7KWNzu078ukC2gqlkP2o11WNo5ff/Tj6HM8p?= =?Windows-1252?Q?5zQGJAxaGHyre4j0j7vblaXLrrtJXXiPkHI/4MErPpzJbco6TwwsQ0Px?= =?Windows-1252?Q?w81Ko4IXU0dDH3KneB5q/VFID4bXw0C1Sb735qZi/pX1tL/6aYeFO5bh?= =?Windows-1252?Q?YiveRZJuK5LiGthvLhchx+Mxw5DbBfNgIw6qlvd+/mnZ8MjVJlDTV5RW?= =?Windows-1252?Q?1R+FO0M8FDTYlH3fnbAW6YltmDaw/yrTIDtgTnJTPkdv5EVTWeqN6/c7?= =?Windows-1252?Q?KfdBahlSxrbAoGRtyU4miDf8dD3ly9E9QyCaqQtm1IxEwuKwvTmJyvS4?= =?Windows-1252?Q?Sncz13tRWf34zxDc1sP5hnnfiPpeT/R1H4MdvOYtnmNCPnDyc/PDQ8jo?= =?Windows-1252?Q?2ajtzo/l3Z+w0ySZZTYwTXDXOWC3iDxnp5IaQ9O2xhGkGMwxFpXnuwD0?= =?Windows-1252?Q?jlOeuXqqN5z+DgrOjmzXar/vsgi0tPr1D2kMQx+80n/pSjGURCXuBmcx?= =?Windows-1252?Q?j/Myr1qZURQCgQebcS7Ong/AYauTj4W05UzMSI1/Ek544gYk5yCNXJsK?= =?Windows-1252?Q?pBE+0Kb0DzQrXlbubZhwuoG4DDly3X4v0v7w6K+LvuQJ3XOfeqUSR5o6?= =?Windows-1252?Q?CRBJJxA+SsiBiNraUhtNOTsZZhWAKSZgPmEGQrdTmLd6/5YySfDLVgL5?= =?Windows-1252?Q?dCAiKAWYcv2txkfRHfA6kQd3aMQWNsP7NWd0zN44PUyL+TLUUhN3No2j?= =?Windows-1252?Q?gxswNAXXyDWvQpGnzrQB5gzdzvzWCfMNrAqTj0+211bbY2Y8UsbqPQUe?= =?Windows-1252?Q?ebfOUGNjYBAddcxTsU1qUnZIAa2ZvjLD1RldA4P+Au6qD3TwCYdQJECE?= =?Windows-1252?Q?R+YrFlwgzKD/BTB42hgXbjMtwqu50/+x85YiDNhC6VaD9RxC3Q1jpP4q?= =?Windows-1252?Q?NJclyLCrTH+hpu/cVtaKYoS8Bf9m/47TiP3aUGIb+Dw0RqyZK7hx/mPP?= =?Windows-1252?Q?6kDuLJrW2qkL7/W04t8GnB1Uy98fPMNi2LmHStWBHVl+kcibuFYQlwLo?= =?Windows-1252?Q?RhBtOTvl9K3n36nW/txXgYFd1NhrmyZFLMCR2v4E/IAN8SKgJhl2OjRT?= =?Windows-1252?Q?6LgCuPESi6IXkBxJih7V41lUY25k25iY9qRbZcfGCg8q3KxutWJ4hAKK?= =?Windows-1252?Q?mmk57F2fC/9P9cPVTN5pW0ara4eSxn97Ijnp9/sFPg0DL2i40JObzkPs?= =?Windows-1252?Q?S8e3KjINQ4toEwfBAv2ob/L23zBGVUhTCuOoeZvDs3gsvNDcWqQNbVlJ?= =?Windows-1252?Q?QOlLLxxpAto+5HUNJKTv+Yqv+yeGMrTc4+yWhCOz8x3k60SQFrk?= X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB1888; 5:xivV/ARajOqAGbFL12ZVTFRifiZn0GsDbGamKHgAl+d3tXEUT5mD7PJ4G/IIl30fm3C2EuEOyGJshtAxPkZVr+w2h6h7LsRgpc86lHy0eudRTWx6xelyU5q56XrA6c0QPuOQvHv/tFwh+GQVDEzY42yu+d9o8Dh1WdDSB+B+y5M=; 24:eR/JRfL3Vw55akkk+jH+ahSlnvWf3Ax5771uXG3Tsf0sO+nj/zwQQUzyCnBGGBWT5LpLUcQXTEOLvC5OJGNN4+je3uWyFe4yg8yL3vnnr6M= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2016 10:59:32.0860 (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: SN2PR03MB1888 Subject: Re: [dpdk-dev] [RFC][PATCH V2 1/3] examples/vhost: Add vswitch (generic switch) 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: Mon, 12 Sep 2016 10:59:38 -0000 On 9/11/2016 5:51 PM, Yuanhan Liu wrote: > On Mon, Sep 05, 2016 at 04:24:29PM +0530, Pankaj Chauhan wrote: >> Introduce support for a generic framework for handling of switching between >> physical and vhost devices. The vswitch framework introduces the following >> concept: >> >> 1. vswitch_dev: Vswitch device is a logical switch which can have physical and >> virtio devices. The devices are operated/used using standard rte_eth API for >> physical devices and lib_vhost API for vhost devices, PMD API is not used >> for vhost devices. >> >> 2. vswitch_port: Any physical or virtio device that is added to vswitch. The >> port can have its own tx/rx functions for doing data transfer, which are exposed >> to the framework using generic function pointers (vs_port->do_tx/do_rx). This way >> the generic code can do tx/rx without understanding the type of device (Physical or >> virtio). Similarly each port has its own functions to select tx/rx queues. The framework >> provides default tx/rx queue selection functions to the port when port is added >> (for both physical and vhost devices). But the framework allows the switch implementation >> to override the queue selection functions (vs_port->get_txq/rxq) if required. >> >> 3. vswitch_ops: The ops is set of function pointers which are used to do operations >> like learning, unlearning, add/delete port, lookup_and_forward. The user of vswitch >> framework (vhost/main.[c,h])uses these function pointers to perform above mentioned >> operations, thus it remains agnostic of the underlying implementation. >> >> Different switching logics can implement their vswitch_device and vswitch_ops, and >> register with the framework. This framework makes vhost-switch application scalable >> in terms of: >> >> 1. Different switching logics (one of them is vmdq, vhost/vmdq.[c,h] >> 2. Number of ports. >> 3. Policies of selecting ports for rx and tx. >> >> Signed-off-by: Pankaj Chauhan > > Hi, > > FYI, my testrobot caught some errors when this patch is applied. > (And sorry for the late review; hopefully I can make it next week). > > --yliu Hi YLiu, Thanks for the review. I am sorry it was my mistake in this patchset, the header defining few structures and macros used in patch 0001 are defined in patch 0003. Because of this 0001 was not individually compilable but all three are compliable as set, it was mistake on my part , will fix it and will take care of it in further patchsets. Do you want me to send another version for review, or i can fix it in the next version i send after review of v2 is complete? Thanks, Pankaj >