DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC][PATCH V2 0/3] example/vhost: Introduce Vswitch Framework
@ 2016-09-05 10:54 Pankaj Chauhan
  2016-09-05 10:54 ` [dpdk-dev] [RFC][PATCH V2 1/3] examples/vhost: Add vswitch (generic switch) framework Pankaj Chauhan
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Pankaj Chauhan @ 2016-09-05 10:54 UTC (permalink / raw)
  To: dev
  Cc: hemant.agrawal, jianfeng.tan, yuanhan.liu, maxime.coquelin,
	Pankaj Chauhan

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.

TODO list:
1. 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'.

2. Test VM2VM hardware mode: I tried following command it didn't work:

vhost-switch -c f -n 4 --socket-mem 1024 --huge-dir /mnt/huge  -- -p 0x1  --vm2vm 2 
  	--vlan-strip 1 --dev-basename usvhost
I tried same command on upstream master also but it didn't work, that means i am doing something
wrong, please help me with correct method to test it. Or now the patches are working, so
if possible please give a try to hardware VM2VM mode.

3. Changes for Maxime's comment on freeing of buffers in vs_looup_n_fwd(). I wasn't clear about
what is the right way to handle, we'll fix it after getting feedback from Maxime.

Change Log
==========

v1->v2
------
1. Tested following:
	- Ping and iperf from VM to external machine connected to Phys port.
	- Ping and iperf betweeen 2 VMs in software vm2vm mode

	- My testsetup is:
		-  vhost & VM machine: xeonD1521 with Network card: X552/X557-AT 10GBASE-T
		- Peer connected to VM machine: OptiPlex-790 with 82574L Gigabit card
2. Incorporated changes for all the comments from Maxime Coquelin. One comment is not yet
   taken care off, and it is listed in TODO list.

Pankaj Chauhan (3):
  examples/vhost: Add vswitch (generic switch) framework
  examples/vhost: Add vswitch command line options
  examples/vhost: Add VMDQ vswitch device

 examples/vhost/Makefile         |   2 +-
 examples/vhost/main.c           | 651 +++++++++++++-------------------------
 examples/vhost/main.h           |  10 +
 examples/vhost/vmdq.c           | 669 ++++++++++++++++++++++++++++++++++++++++
 examples/vhost/vmdq.h           |  57 ++++
 examples/vhost/vswitch_common.c | 499 ++++++++++++++++++++++++++++++
 examples/vhost/vswitch_common.h | 186 +++++++++++
 examples/vhost/vswitch_txrx.c   |  97 ++++++
 examples/vhost/vswitch_txrx.h   |  71 +++++
 9 files changed, 1800 insertions(+), 442 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
 create mode 100644 examples/vhost/vswitch_txrx.c
 create mode 100644 examples/vhost/vswitch_txrx.h

-- 
1.9.1

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-09-27 12:10 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-05 10:54 [dpdk-dev] [RFC][PATCH V2 0/3] example/vhost: Introduce Vswitch Framework Pankaj Chauhan
2016-09-05 10:54 ` [dpdk-dev] [RFC][PATCH V2 1/3] examples/vhost: Add vswitch (generic switch) framework Pankaj Chauhan
2016-09-09  8:56   ` Tan, Jianfeng
2016-09-12 10:55     ` Pankaj Chauhan
2016-09-13  6:51       ` Tan, Jianfeng
2016-09-15  9:00         ` Pankaj Chauhan
2016-09-19 12:42           ` Tan, Jianfeng
2016-09-27 11:26             ` Pankaj Chauhan
2016-09-19 14:43         ` Yuanhan Liu
2016-09-20  8:58           ` Pankaj Chauhan
2016-09-26  3:56             ` Yuanhan Liu
2016-09-27 11:35               ` Pankaj Chauhan
2016-09-27 12:10                 ` Yuanhan Liu
2016-09-11 12:21   ` Yuanhan Liu
2016-09-12 10:59     ` Pankaj Chauhan
2016-09-26  4:12   ` Yuanhan Liu
2016-09-27 11:44     ` Pankaj Chauhan
2016-09-27 12:03       ` Yuanhan Liu
2016-09-05 10:54 ` [dpdk-dev] [RFC][PATCH V2 2/3] examples/vhost: Add vswitch command line options Pankaj Chauhan
2016-09-13 12:14   ` Yuanhan Liu
2016-09-15  9:11     ` Pankaj Chauhan
2016-09-05 10:54 ` [dpdk-dev] [RFC][PATCH V2 3/3] examples/vhost: Add VMDQ vswitch device Pankaj Chauhan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).