This section describes how to configure clients on a datalink based on the type of support for ring allocation.
Make sure that you can interpret the output of the dladm commands that display datalink ring properties, as explained in Commands for Configuring Rings. This information helps you to configure clients and allocate rings.
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.
# dladm show-linkprop -p rxringsavail,txringsavail,rxhwclntavail,txhwclntavail link
Determine the following information from the output of the command:
Whether the NIC supports hardware-based clients
The availability of rings to allocate to hardware-based clients
The availability of hardware-based clients that you can configure on the link
# dladm create-vnic -p rxrings=value[,txrings=value] -l link VNIC
where value can be one of the following:
hw - Indicates that you are configuring a hardware-based client.
number - Indicates that you are configuring a hardware-based client only. The number refers to the quantity of rings that you can allocate to the client for its exclusive use.
# dladm create-vnic -p rxrings=sw[,txrings=sw] -l link VNIC
Alternatively, if the client was previously created, you can use the dladm set-linkprop command to set the ring properties.
# dladm show-linkprop -p rxrings,txrings VNIC
# dladm show-phys -H link
This example is based on the nxge device and shows how to configure clients and allocate rings on the datalink net5. This example shows how to create the following clients:
The VNIC vnic2, which is a hardware-based client with exclusive use of Rx and Tx rings.
The VNIC vnic3, which is a hardware-based client with a fixed number of rings that are set according to the NIC driver's initial configuration.
The VNIC vnic4, which is a software-based client.
Check whether the physical datalink net5 supports ring allocation for clients.
# dladm show-linkprop -p rxringsavail,txringsavail net5 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE net5 rxringsavail r- 7 7 -- -- net5 txringsavail r- 11 11 -- --
The output shows that the physical datalink net5 has 7 Rx rings and 11 Tx rings that you can assign to the clients over the physical datalink net5.
Check the availability of hardware-based clients that you can create over the physical datalink net5.
# dladm show-linkprop -p rxhwclntavail,txhwclntavail net5 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE net5 rxhwclntavail r- 3 3 -- -- net5 txhwclntavail r- 4 4 -- --
The output shows that you can create 3 hardware-based Rx clients and 4 hardware-based Tx clients over the datalink net5.
Check the existing ring usage over the physical datalink net5.
# dladm show-phys -H net5 LINK RINGTYPE RINGS CLIENTS nxge1 RX 0-7 <default,mcast> nxge1 TX 0-11 <default>
The output shows that the nxge1 device has eight Rx rings (0-7) and twelve Tx rings (0-11). Because no datalinks are on the nxge1 device, the Rx rings and Tx rings are not assigned to any datalinks. The value <default> in the CLIENTS column means that the Tx rings will be used by the software-based clients. The value <default,mcast> under the CLIENTS column means that the Rx rings will be used by the software-based clients and non-unicast packets.
Create the VNIC vnic2 over the datalink net5 with two Rx rings and two Tx rings.
# dladm create-vnic -l net5 -p rxrings=2,txrings=2 vnic2
Verify the rings that are assigned to the VNIC vnic2.
# dladm show-linkprop -p rxrings,txrings vnic2 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE vnic2 rxrings rw 2 2 -- sw,hw,<1-7> vnic2 txrings rw 2 2 -- sw,hw,<1-11>
Verify the ring usage on the physical datalink net5.
# dladm show-phys -H net5 LINK RINGTYPE RINGS CLIENTS nxge1 RX 0,3-7 <default,mcast> nxge1 TX 0,3-11 <default> nxge1 RX 1-2 vnic2 nxge1 TX 1-2 vnic2
The output shows that the Rx rings allocated to vnic2 are 1 and 2. For Tx rings, vnic2 uses the rings 1 and 2.
Check whether you can create additional hardware-based clients over the physical datalink net5.
# dladm show-linkprop -p rxhwclntavail,txhwclntavail net5 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE net5 rxhwclntavail r- 2 2 -- -- net5 txhwclntavail r- 3 3 -- --
The output shows that you can create two hardware-based Rx clients and three hardware-based Tx clients over the physical datalink net5.
Create the VNIC vnic3, which is a hardware-based client.
# dladm create-vnic -l net5 -p rxrings=hw,txrings=hw vnic3
Verify the rings that are assigned to the VNIC vnic3.
# dladm show-linkprop -p rxrings,txrings vnic3 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE vnic3 rxrings rw -- 1 -- sw,hw,<1-7> vnic3 txrings rw hw hw -- sw,hw,<-11>
Check whether you can create additional hardware-based clients over the physical datalink net5.
# dladm show-linkprop -p rxhwclntavail,txhwclntavail net5 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE net5 rxhwclntavail r- 2 2 -- -- net5 txhwclntavail r- 2 2 -- --
The output shows that you can create 2 hardware-based Rx clients and 2 hardware-based Tx clients over the physical datalink net5.
Create the VNIC vnic4, which is a software-based client.
# dladm create-vnic -l net5 -p rxrings=sw,txrings=sw vnic4
Verify the ring usage on vnic4.
# dladm show-linkprop -p rxrings,txrings vnic4 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE vnic4 rxrings rw sw -- -- sw,hw,<1-7> vnic4 txrings rw sw -- -- sw,hw,<1-11>
Verify the ring usage on the physical datalink net5.
# dladm show-phys -H net5 LINK RINGTYPE RINGS CLIENTS nxge1 RX 0,4-7 <default,mcast>,vnic4 nxge1 TX 0,4-11 <default>,vnic4 nxge1 RX 1-2 vnic2 nxge1 RX 3 vnic3 nxge1 TX 1-2 vnic2 nxge1 TX 3 vnic3
The output shows that vnic4 is software-based client that shares the default set of rings on the physical datalink net5. The VNIC vnic2 is a hardware-based client that has exclusive use of two rings (2-3) and vnic3 is a hardware-based client that has exclusive use of one ring (3).
This example is based on the ixgbe device and shows how to configure clients and allocate rings on the physical datalink net4.
Check the existing ring usage over the physical datalink net4.
# dladm show-phys -H net4 LINK RINGTYPE RINGS CLIENTS net4 RX 0-3 <default,mcast> net4 RX 4-7 -- net4 RX 8-11 -- net4 RX 12-15 -- net4 TX 0-7 <default>
Check whether you can create hardware-based clients over the physical datalink net4.
# dladm show-linkprop -p rxhwclntavail,txhwclntavail,rxringsavail,txringsavail net4 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE net4 rxhwclntavail r- 3 3 -- -- net4 txhwclntavail r- 0 0 -- -- net4 rxringsavail r- 0 0 -- -- net4 txringsavail r- 0 0 -- --
The output shows that you can create 3 hardware-based Rx clients over the physical datalink net4.
Create the VNIC vnic3, which is a hardware-based Rx client.
# dladm create-vnic -l net4 -p rxrings=hw vnic3
You cannot configure the txrings property for vnic3 because the available number of hardware-based Tx clients (txhwclntavail) is zero.
Verify the rings that are assigned to the VNIC vnic3.
# dladm show-linkprop -p rxrings,txrings vnic3 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE vnic3 rxrings rw hw hw -- sw,hw vnic3 txrings rw -- 8 -- --
Check whether you can create additional hardware-based clients over the physical datalink net4.
# dladm show-linkprop -p rxhwclntavail,txhwclntavail,rxringsavail,txringsavail net5 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE net4 rxhwclntavail r- 2 2 -- -- net4 txhwclntavail r- 0 0 -- -- net4 rxringsavail r- 0 0 -- -- net4 txringsavail r- 0 0 -- --
The output shows that you can create 2 hardware-based Rx clients over the physical datalink net4.
Verify the ring usage on the physical datalink net4.
# dladm show-phys -H net4 LINK RINGTYPE RINGS CLIENTS net4 RX 0-3 <default,mcast> net4 RX 4-7 vnic3 net4 RX 8-11 net4 RX 12-15 -- net4 TX 0-7 <default>,vnic3
The output shows that vnic3 is a hardware-based Rx client with exclusive use of four rings. For Tx rings, vnic3 uses the default set of rings and also shares the rings with other datalinks when they are created on the physical datalink net4.