1. 31 Jul, 2013 4 commits
    • David S. Miller's avatar
      Merge branch 'phys_port' · 69e12d88
      David S. Miller authored
      Jiri Pirko says:
      
      ====================
      This patchset is based on patch by Narendra_K@Dell.com
      Once device which can change phys port id during its lifetime adopts this,
      NETDEV_CHANGEPHYSPORTID event will be added and driver will call
      call_netdevice_notifiers(NETDEV_NETDEV_CHANGEPHYSPORTID, dev) to propagate
      the change to userspace.
      
      v1->v2: as suggested by Ben, handle -EOPNOTSUPP in rtnl code (wrapped up ndo call)
      v2->v3: adjusted patch 1 commit message
      v3->v4: used "%phN" for sysfs printf as suggested by DaveM
              added igb/igbvf implementation as requested by Or Gerlitz
      v4->v5: used prandom_u32 to generate id in igb_probe
              removed duplicate code in ibgvf_probe
              pushed dev_err string into one line in igbvf_refresh_ppid
      v5->v6: use uuid_le_gen for generating 16-byte phys port id for igb/igbvf
      	as suggested by BenH
      
      1) Why do we need this, and why do existing facilities fail to provide
         a way to accomplish this?
      
      Currenty there's very hard to tell if two netdevs are using the same physical
      port. For sr-iov this can be get by sysfs. For other mechanisms, like NPAR
      there's very hard to do it (one must learn it from NIC BIOS). But even for
      sr-iov there's no way to say if two netdevs are using the same phys port when
      these are passed through to virtual guests.
      
      This patchset provides the generic way of letting this information know to
      userspace. This info can be used by apps like NetworkManager, teamd, Wicked,
      ovs daemon, etc, to do smarter bonding decisions.
      
      2) Why is the physical port ID defined as a 32 byte opaque cookie?
         What formats and layouts need to be accomodated, and which
         influenced the design of the ID?
      
      For user to distinguish if two netdevs are using the same port, he only needs
      to compare their phys port ids. Nothing else is needed. This id has no
      structure for security reasons. VF should not know anything about PF.
      
      3) Are IDs globally unique?  Why or why not?  If IDs should be
         globally unique, but only in certain cases, what exactly are those
         cases.
      
      Most of the time only uniqueness needed is in scope of single machine.
      There might be case when the id should be unique between couple of machines
      in virtualization environment. Given that for example for igb/igbvf 16B uuid
      is used, there is no problem for this case as well. But each driver can
      implement this differently focusing the hw capabilities and needs.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      69e12d88
    • Jiri Pirko's avatar
      ff80e519
    • Jiri Pirko's avatar
    • Jiri Pirko's avatar
      net: add ndo to get id of physical port of the device · 66b52b0d
      Jiri Pirko authored
      This patch adds a ndo for getting physical port of the device. Driver
      which is aware of being virtual function of some physical port should
      implement this ndo. This is applicable not only for IOV, but for other
      solutions (NPAR, multichannel) as well. Basically if there is possible
      to have multiple netdevs on the single hw port.
      Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
      Acked-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      66b52b0d
  2. 30 Jul, 2013 20 commits
  3. 29 Jul, 2013 3 commits
  4. 28 Jul, 2013 13 commits