DPDK usage discussions
 help / color / mirror / Atom feed
From: Yuanhan Liu <yliu@fridaylinux.org>
To: devendra rawat <devendra.rawat.singh@gmail.com>
Cc: "Loftus, Ciara" <ciara.loftus@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Kevin Traynor <ktraynor@redhat.com>,
	"ovs-dev@openvswitch.org" <ovs-dev@openvswitch.org>,
	Adrien Mazarguil <adrien.mazarguil@6wind.com>,
	"nelio.laranjeiro@6wind.com" <nelio.laranjeiro@6wind.com>,
	"users@dpdk.org" <users@dpdk.org>,
	"olgas@mellanox.com" <olgas@mellanox.com>,
	Darrell Ball <dball@vmware.com>
Subject: Re: [dpdk-users] [ovs-dev] adding dpdk ports sharing same pci address to ovs-dpdk bridge
Date: Tue, 7 Nov 2017 17:08:07 +0800	[thread overview]
Message-ID: <20171107090807.GP12931@yliu-home> (raw)
In-Reply-To: <CACsJYqqNCChjQyA3csMAzxfcuGg2+-n-QPq1b9dgCr4eEOz-kg@mail.gmail.com>

On Tue, Oct 10, 2017 at 06:26:51PM +0530, devendra rawat wrote:
>     > Hi Everyone,
>     >
>     > Anything finalized for sorting out this issue, do you need any more
>     > information regarding this issue ?
> 
>     Hi,
> 
>     I put together a very rough RFC that aims to work-around the issue:
>     https://mail.openvswitch.org/pipermail/ovs-dev/2017-October/339496.html
> 
>     It hasn't been tested as I don't have access to the type of card that has
>     one PCI for multiple ports.
>     If anybody does have access to such a device, I welcome you to try the
>     patch although I'm not hopeful it will succeed first -pass.
>     Looking for feedback on implementation, interface, etc.
> 
> 
>  I applied the patch on top of OVS v2.8.1 and used DPDK v17.08. I used Mellanox
> ConnectX-3 pro NIC for testing, this NIC provides two 10G ports
> that share a single PCI address.
> 
> The patch is working fine, I was able to add both the 10G ports to OVS bridge
> by specifying the port no. (0 or 1) in the dpdk-devargs.
> 
> # ovs-vsctl add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk
> options:dpdk-devargs=0002:01:00.0,0
> # ovs-vsctl add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk
> options:dpdk-devargs=0002:01:00.0,1

I think the patch should work. But there something I want to point out:

- you were assuming the ports with the same PCI addresses are continuous
  in the port number. I don't think it's a good assumption, though it's
  very likely it's always the case in reality.

- I also think the index can not tell which port it is from the ports
  having the same PCI address.

Having said that, I think using the mac address to referencing a DPDK port
might be a better idea. Something like:

    options:dpdk-devargs=$mac_addr

Then from the ovs-dpdk point of you, it can detect whether it's a mac
or an PCI address, and use that to get the right port.

Or, we could have it both, if that's really needed:

    dpdk-devargs=$pci_addr,$mac_addr

In such way, the original issue would also be solved. Moreover, people
know exactly what the underlie port he want to deal with.

Comments/thought?

	--yliu

> 
> the port no. (0 and 1) are bound to actual physical port, i.e if I keep on
> adding and deleting port no. 0 to bridge br0 multiple times,
> every time I add the port back to br0, the same physical port is added to
> bridge br0.
> 

  reply	other threads:[~2017-11-07  9:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CACsJYqps0gM6NTUspVBcvjw1-VM4wj_UV2SbAhWGd-Y6WDBOzg@mail.gmail.com>
2017-09-08  9:56 ` Loftus, Ciara
2017-09-20 17:33   ` Kevin Traynor
2017-09-20 22:08     ` Thomas Monjalon
2017-09-21  8:04       ` Loftus, Ciara
2017-09-21  8:19         ` Thomas Monjalon
2017-09-21  8:28           ` Loftus, Ciara
2017-10-05 16:19             ` devendra rawat
2017-10-06 14:00               ` Loftus, Ciara
2017-10-10 12:56                 ` devendra rawat
2017-11-07  9:08                   ` Yuanhan Liu [this message]
2017-09-21  9:17     ` Adrien Mazarguil
2017-09-21  9:45       ` Adrien Mazarguil

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=20171107090807.GP12931@yliu-home \
    --to=yliu@fridaylinux.org \
    --cc=adrien.mazarguil@6wind.com \
    --cc=ciara.loftus@intel.com \
    --cc=dball@vmware.com \
    --cc=devendra.rawat.singh@gmail.com \
    --cc=ktraynor@redhat.com \
    --cc=nelio.laranjeiro@6wind.com \
    --cc=olgas@mellanox.com \
    --cc=ovs-dev@openvswitch.org \
    --cc=thomas@monjalon.net \
    --cc=users@dpdk.org \
    /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).