By user12611315 on May 24, 2012
OVM Server for SPARC(a.k.a LDoms) 2.2 provides support SR-IOV. That is, an SR-IOV Virtual Function(VF) can be assigned to a Logical Domain. A VF will provide bare metal like performance, this blog explains how to configure a VF so that VNICs can be created on top the VF device. This is required to be able to support Solaris11 Zones in a logical domain.
The following example, shows how to setup a VF so that VNICs can be created on it.
When a VF is created by default only one mac-address(primary mac-address) is assigned to it. In order to create VNICs, additional mac-addresses need to be assigned to it. This can be done either when the VF is created or using the set-io command. This example assumes you already created a VF. If the VF is assigned to a domain, then it must be stopped before assigning additional mac-addresses.
The following command allocates 3 alternate mac-addresses using automatic mac-address allocation method.
Primary# ldm set-io alt-mac-addrs=auto,auto,auto /SYS/MB/NET0/IOVNET.PF0.VF0
Now boot the logical domain to which the above VF is assigned. You can check the mac-addresses assigned to a VF using the following dladm command.
ldg0# dladm show-phys -m net3 LINK SLOT ADDRESS INUSE CLIENT net3 primary 0:14:4f:f9:48:69 yes net3 1 0:14:4f:fb:38:e no -- 2 0:14:4f:fa:c8:7d no -- 3 0:14:4f:fb:99:4b no --
Now, we can create up to 3 VNICs on the net3 device using the dladm command. Creating more than that will fail. If more VNICs are desired, assign more mac-addresses using the 'ldm set-io' command.
ldg0# dladm create-vnic -l net3 vnic0 ldg0# dladm create-vnic -l net3 vnic1 ldg0# dladm create-vnic -l net3 vnic2 ldg0# dladm create-vnic -l net3 vnic3 May 20 22:16:18 dt241-147.us.oracle.com vnic: WARNING: cannot detach client: 22 dladm: vnic creation over net3 failed: operation failed ldg0#