Skip to content

Commit

Permalink
ldmvsw: Add ldmvsw.c driver code
Browse files Browse the repository at this point in the history
  Add ldmvsw.c driver

  Details:

  The ldmvsw driver very closely follows the sunvnet.c code and makes
  use of the sunvnet_common.c code for core functionality.

  A significant difference between sunvnet and ldmvsw driver is
  sunvnet creates a network interface for each vnet-port *parent*
  node in the MD while the ldmvsw driver creates a network interface
  for every vsw-port node in the Machine Description (MD).
  Therefore the netdev_priv() for sunvnet is a vnet structure while
  the netdev_priv() for ldmvsw is a vnet_port structure.

  Vnet_port structures allocated by ldmvsw have the vsw bit set.
  When finding the net_device associated with a port, the common code keys
  off this bit to use either the net_device found in the vnet_port or the
  net_device in the vnet structure (see the VNET_PORT_TO_NET_DEVICE() macro in
  sunvnet_common.h). This scheme allows the common code to work with
  both drivers with minimal changes.

  Similar to Xen, network interfaces created by the ldmvsw driver will always
  have a HW Addr (i.e. mac address) of FE:FF:FF:FF:FF:FF and each will be
  assigned the devname "vif<cfg_handle>.<port_id>" - where <cfg_handle> and
  <port_id> are a unique handle/port pair assigned to the associated
  vsw-port node in the MD.

  Signed-off-by: Aaron Young <aaron.young@oracle.com>
  Signed-off-by: Rashmi Narasimhan <rashmi.narasimhan@oracle.com>
  Reviewed-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
  Reviewed-by: Alexandre Chartre <Alexandre.Chartre@oracle.com>

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Aaron Young authored and David S. Miller committed Mar 18, 2016
1 parent 67d0719 commit 5d01fa0
Show file tree
Hide file tree
Showing 4 changed files with 481 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/sparc/configs/sparc64_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ CONFIG_SUNLANCE=m
CONFIG_HAPPYMEAL=m
CONFIG_SUNGEM=m
CONFIG_SUNVNET=m
CONFIG_LDMVSW=m
CONFIG_NET_PCI=y
CONFIG_E1000=m
CONFIG_E1000E=m
Expand Down
11 changes: 11 additions & 0 deletions drivers/net/ethernet/sun/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,17 @@ config SUNVNET
---help---
Support for virtual network devices under Sun Logical Domains.

config LDMVSW
tristate "Sun4v LDoms Virtual Switch support"
depends on SUN_LDOMS
---help---
Support for virtual switch devices under Sun4v Logical Domains.
This driver adds a network interface for every vsw-port node
found in the machine description of a service domain.
Linux bridge/switch software can use these interfaces for
guest domain network interconnectivity or guest domain
connection to a physical network on a service domain.

config NIU
tristate "Sun Neptune 10Gbit Ethernet support"
depends on PCI
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/sun/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ obj-$(CONFIG_SUNGEM) += sungem.o
obj-$(CONFIG_CASSINI) += cassini.o
obj-$(CONFIG_SUNVNET_COMMON) += sunvnet_common.o
obj-$(CONFIG_SUNVNET) += sunvnet.o
obj-$(CONFIG_LDMVSW) += ldmvsw.o
obj-$(CONFIG_NIU) += niu.o
Loading

0 comments on commit 5d01fa0

Please sign in to comment.