DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Tan, Jianfeng" <jianfeng.tan@intel.com>
To: Pankaj Chauhan <pankaj.chauhan@nxp.com>, dev@dpdk.org
Cc: hemant.agrawal@nxp.com, yuanhan.liu@linux.intel.com,
	maxime.coquelin@redhat.com
Subject: Re: [dpdk-dev] [RFC][PATCH V2 1/3] examples/vhost: Add vswitch (generic switch) framework
Date: Mon, 19 Sep 2016 20:42:15 +0800	[thread overview]
Message-ID: <764c0561-2325-56e9-51e3-f75285044ee4@intel.com> (raw)
In-Reply-To: <23bebfde-54ad-04fd-64cb-c99d7a4a78e9@nxp.com>

Hi Pankaj,

>> Can we hide queues inside struct vswitch_port? I mean:
>> For VMDQ switch, treat (port_id, queue_id) as a vswitch_port, so far
>> you've already stored "struct vhost_dev *" into vswitch_port.priv when
>> it's a virtual port, how about store queue_id into vswitch_port.priv
>> when it's a physical port.
>> For arp_learning switch, make (port_id, all_enabled_queues) as a
>> vswitch_port.
>> Summarize above two: we treat (port_id, all_enabled_queues[]) as a
>> vswitch_port.
>>
>> How about it?
>
> Thanks for wonderful suggestion! Yes it should be possible, instead of 
> having one vs_port for physical device we could create one vs_port for 
> each phys device + queue_id combination.
>
> Then we can bind the vs_ports to the cores, and do away with binding 
> vdevs to the cores.
>
> In order to add extra vs_ports (port + queue_id) there are two methods:
>
> 1. vhost/main.c (or vswitch_common.c) queries the underlying switch 
> about how many rx queues to support thourgh a new accessor. VMDQ will 
> return the number of vmdq queues, in this case. After getting the 
> number of rx queues, vhost/main.c creates the extra ports i.e one 
> vs_port for each physical port and queue id combination.
>
> 2. Second method is that the switch implementation for example vmdq.c 
> create the extra ports (port + queue_id) as part of vs_port->add_port 
> operation for the physical port.
>
> Which method do you think we should follow? I think #1 should be done 
> so that same logic can be used for other switches also.

Although VMDQs are created at initialization, we will not connect all of 
them to switch until a virtio device is added. So how about creating 
extra vs_ports (port + queue_id) as part of vmdq_add_port_virtio()?

Another thing, why we need the accessor, port_start()? For physical 
ports, it's initialized and started at port_init(); for virtual ports, 
no need to get started, right?

Thanks,
Jianfeng

  reply	other threads:[~2016-09-19 12:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=764c0561-2325-56e9-51e3-f75285044ee4@intel.com \
    --to=jianfeng.tan@intel.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=pankaj.chauhan@nxp.com \
    --cc=yuanhan.liu@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).