netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Brown, Aaron F" <aaron.f.brown@intel.com>
To: Jiri Pirko <jiri@resnulli.us>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"stephen@networkplumber.org" <stephen@networkplumber.org>,
	"Narendra_K@Dell.com" <Narendra_K@Dell.com>,
	"bhutchings@solarflare.com" <bhutchings@solarflare.com>,
	"or.gerlitz@gmail.com" <or.gerlitz@gmail.com>,
	"Wyborny, Carolyn" <carolyn.wyborny@intel.com>,
	"Rose, Gregory V" <gregory.v.rose@intel.com>,
	"vyasevic@redhat.com" <vyasevic@redhat.com>,
	"amwang@redhat.com" <amwang@redhat.com>,
	"johannes@sipsolutions.net" <johannes@sipsolutions.net>
Subject: RE: [patch net-next v6 4/4] igb/igbvf: implement ndo_get_phys_port_id
Date: Wed, 28 Aug 2013 02:26:28 +0000	[thread overview]
Message-ID: <309B89C4C689E141A5FF6A0C5FB2118B73070A38@ORSMSX101.amr.corp.intel.com> (raw)
In-Reply-To: <20130822131019.GB1421@minipsycho.brq.redhat.com>

Sorry, I was out sick towards the end of last week and playing catch up for the last few days...  Info inline.

> From: Jiri Pirko [mailto:jiri@resnulli.us]
> Sent: Thursday, August 22, 2013 6:10 AM
> To: Kirsher, Jeffrey T
> Cc: Brown, Aaron F; netdev@vger.kernel.org; davem@davemloft.net;
> stephen@networkplumber.org; Narendra_K@Dell.com;
> bhutchings@solarflare.com; or.gerlitz@gmail.com; Wyborny, Carolyn; Rose,
> Gregory V; vyasevic@redhat.com; amwang@redhat.com;
> johannes@sipsolutions.net
> Subject: Re: [patch net-next v6 4/4] igb/igbvf: implement
> ndo_get_phys_port_id
> 
> Thu, Aug 22, 2013 at 12:39:10PM CEST, jeffrey.t.kirsher@intel.com wrote:
> >On Mon, 2013-07-29 at 18:16 +0200, Jiri Pirko wrote:
> >> igb driver generated random number which will identify physical port.
> >> This id is available via ndo_get_phys_port_id directly on igb netdev.
> >> Also, id is passed to igbvf using mailbox. After that, it is
> >> available via ndo_get_phys_port_id on igbvf netdev as well.
> >>
> >> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
> >> ---
> >>  drivers/net/ethernet/intel/igb/e1000_mbx.h |  1 +
> >>  drivers/net/ethernet/intel/igb/igb.h       |  3 +++
> >>  drivers/net/ethernet/intel/igb/igb_main.c  | 37
> >> ++++++++++++++++++++++++++++-
> >>  drivers/net/ethernet/intel/igbvf/igbvf.h   |  4 ++++
> >>  drivers/net/ethernet/intel/igbvf/mbx.h     |  1 +
> >>  drivers/net/ethernet/intel/igbvf/netdev.c  | 38
> >> ++++++++++++++++++++++++++++++
> >>  drivers/net/ethernet/intel/igbvf/vf.c      | 34
> >> ++++++++++++++++++++++++++
> >>  drivers/net/ethernet/intel/igbvf/vf.h      |  1 +
> >>  8 files changed, 118 insertions(+), 1 deletion(-)
> >
> >Jiri-
> >
> >Validation ran into a couple of issues with this patch.  Here is what
> >Aaron found when testing this patch...
> 
> Interesting. So since igbvf_refresh_ppid() is called from igbvf_reset()
> and igbvf_probe(), I believed that is enough. Looks like perm_addr getting
> works in similar way. Can you please check if perm_addr is set correctly
> in the same time reading phys_port_id gives -EOPNOTSUPP?

By perm_addr do you mean the MAC Address of the vf?  Yes, it is set up (and I can view it vi ip link or sysconfig) when I see the op not supported message (after I fi vfs via sysfs, before bringing the vf interface up or reloading igbvf.)

> 
> 
> >
> >Aaron Brown wrote:
> >I think I have to fail this, it seems to have an issue with
> >initialization.  When I first create a vf via sysfs the pys_port_id
> >file is created along with the other sysfs files for the vf, however an
> >attempt to cat out the value returns " Operation not supported".  At
> >this point the vf is still down, if I bring it up (or simply unload /
> >reload the igbvf driver) I can then cat the file successfully and the
> >vf interface phys_port_id matches the phys_port_id of the pf.  This is
> >testing from bare metal, a console session showing this behavior
> >follows:
> >
> >u1304:[0]/sys> find . -iname phys_port_id
> >./devices/pci0000:00/0000:00:01.0/0000:07:00.0/net/eth0/phys_port_id
> >./devices/pci0000:00/0000:00:01.0/0000:07:00.1/net/eth1/phys_port_id
> >./devices/virtual/net/sit0/phys_port_id
> >./devices/virtual/net/lo/phys_port_id
> >u1304:[0]/sys> cat
> >devices/pci0000:00/0000:00:01.0/0000:07:00.0/net/eth0/phys_port_id
> >5ece9fbd9cd51546982e15c1f2c11e25
> >u1304:[0]/sys>
> >
> >So far so good, now make a few vfs and check for new phys_port_id sysfs
> files.
> >
> >u1304:[0]/sys> find . -iname sriov_numvfs
> >./devices/pci0000:00/0000:00:01.0/0000:07:00.0/sriov_numvfs
> >./devices/pci0000:00/0000:00:01.0/0000:07:00.1/sriov_numvfs
> >u1304:[0]/sys> echo 2 >
> devices/pci0000:00/0000:00:01.0/0000:07:00.0/sriov_numvfs
> >u1304:[0]/sys> find . -iname phys_port_id
> ./devices/pci0000:00/0000:00:01.0/0000:07:00.0/net/eth0/phys_port_id
> >./devices/pci0000:00/0000:00:01.0/0000:07:00.1/net/eth1/phys_port_id
> >./devices/pci0000:00/0000:00:01.0/0000:07:10.0/net/eth2/phys_port_id
> >./devices/pci0000:00/0000:00:01.0/0000:07:10.2/net/eth3/phys_port_id
> >./devices/virtual/net/sit0/phys_port_id
> >./devices/virtual/net/lo/phys_port_id
> >u1304:[0]/sys>
> >
> >The first vf is eth2, attempt to cat out it's phys_port_id
> >
> >u1304:[0]/sys> cat
> >./devices/pci0000:00/0000:00:01.0/0000:07:10.0/net/eth2/phys_port_id
> >cat:
> >./devices/pci0000:00/0000:00:01.0/0000:07:10.0/net/eth2/phys_port_id:
> >Operation not supported u1304:[0]/sys>
> >
> >But, if I bring the interface up (or unload / load the igbvf driver) I
> then am able to cat the phys_port_id of the vf and it matches the
> phys_port_id of the physical interface.
> >
> >u1304:[0]/sys> ifconfig eth2 u1304-2
> >u1304:[0]/sys> cat
> >./devices/pci0000:00/0000:00:01.0/0000:07:10.0/net/eth2/phys_port_id
> >5ece9fbd9cd51546982e15c1f2c11e25
> >u1304:[0]/sys>
> 

  reply	other threads:[~2013-08-28  2:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-29 16:16 [patch net-next v6 0/4] export device physical port id to userspace Jiri Pirko
2013-07-29 16:16 ` [patch net-next v6 1/4] net: add ndo to get id of physical port of the device Jiri Pirko
2013-07-29 16:16 ` [patch net-next v6 2/4] rtnl: export physical port id via RT netlink Jiri Pirko
2013-07-29 16:16 ` [patch net-next v6 3/4] net: export physical port id via sysfs Jiri Pirko
2013-07-29 16:16 ` [patch net-next v6 4/4] igb/igbvf: implement ndo_get_phys_port_id Jiri Pirko
2013-08-22 10:39   ` Jeff Kirsher
2013-08-22 13:10     ` Jiri Pirko
2013-08-28  2:26       ` Brown, Aaron F [this message]
2013-08-28  6:05         ` Jiri Pirko
2013-08-28 19:06           ` Brown, Aaron F
2014-02-21  8:02             ` Jiri Pirko
2013-07-29 22:23 ` [patch net-next v6 0/4] export device physical port id to userspace Jeff Kirsher
2013-07-31  0:36 ` David Miller

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=309B89C4C689E141A5FF6A0C5FB2118B73070A38@ORSMSX101.amr.corp.intel.com \
    --to=aaron.f.brown@intel.com \
    --cc=Narendra_K@Dell.com \
    --cc=amwang@redhat.com \
    --cc=bhutchings@solarflare.com \
    --cc=carolyn.wyborny@intel.com \
    --cc=davem@davemloft.net \
    --cc=gregory.v.rose@intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jiri@resnulli.us \
    --cc=johannes@sipsolutions.net \
    --cc=netdev@vger.kernel.org \
    --cc=or.gerlitz@gmail.com \
    --cc=stephen@networkplumber.org \
    --cc=vyasevic@redhat.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).