JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Using Virtual Networks in Oracle Solaris 11.1     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Network Virtualization and Resource Management in Oracle Solaris

2.  Creating and Administering Virtual Networks in Oracle Solaris

3.  Managing Network Resources in Oracle Solaris

Working With Clients, Transmit Rings, and Receive Rings

MAC Clients and Ring Allocation

Ring Allocation in VLANs

Datalink Properties for Ring Allocation

Commands for Working With Receive and Transmit Rings

Obtaining and Interpreting Ring Information

Displaying Ring Allocation Capabilities of a Datalink

Displaying Ring Use and Ring Assignments on a Datalink

How to Configure Clients and Allocate Rings

Working With Pools and CPUs

How to Configure a CPU Pool for a Datalink

How to Allocate CPUs to a Link

Managing Resources on Flows

How to Configure Flows

4.  Monitoring Network Traffic and Resource Usage in Oracle Solaris

Index

Working With Clients, Transmit Rings, and Receive Rings

On NICs, receive (Rx) rings and transmit (Tx) rings are hardware resources through which the system receives and sends network packets, respectively. The following sections provide an overview of rings, followed by procedures that are used to allocate rings for networking processes. Examples are also provided to show how the mechanism works when you issue commands to allocate rings.

MAC Clients and Ring Allocation

MAC clients such as VNICs and other datalinks are configured over a NIC to enable communication between a system and other network nodes. After a client is configured, it uses both Rx and Tx rings to receive or transmit network packets respectively. A MAC client can be either hardware-based or software-based. A hardware-based client fulfills any one of the following conditions:

Clients that do not fulfill any of these conditions are software-based MAC clients.

Hardware-based clients can be assigned rings for exclusive use depending on the NIC. NICs such as nxge support dynamic ring allocation. On such NICs, you can configure not only hardware-based clients. You also have the flexibility to determine the number of rings to allocate to such clients, assuming that rings remain available for allocation. The use of rings is always optimized for the primary interface, for example, net0. The primary interface is also known as the primary client. Any available rings that have not been assigned for exclusive use by other clients are automatically assigned to the primary interface.

Other NICs such as ixge only support static ring allocation. On these NICs, you can only create hardware-based clients. The clients are automatically configured with a fixed set of rings per client. The fixed set is determined during the NIC driver's initial configuration. For more information about a driver's initial configuration for static ring allocation, refer to the Oracle Solaris 11.1 Tunable Parameters Reference Manual.

Software-based clients do not have exclusive use of rings. Rather, they share rings with other existing software-based clients or with the primary client. The rings that software-based clients use depends on the number of hardware-based clients that have priority in ring allocation.

It is important to understand the distinction between the primary client and other secondary clients. The primary client is the physical datalink of the NIC. Based on the generic names provided by Oracle Solaris during installation, the primary client would be named netN, where N is an instance number. For an explanation of generic names for datalinks, see Network Devices and Datalink Names in Introduction to Oracle Solaris 11 Networking. VNICs are secondary clients that are created over the physical datalink. If these clients are hardware-based clients, then they can have exclusive use of rings. Otherwise, the clients are software-based.

Ring Allocation in VLANs

With VLANs, the assignment of rings proceeds differently depending on how the VLAN is created. VLANs are created in one of two ways:

A VLAN that is created by the dladm create-vlan subcommand shares the same MAC address as the underlying interface. Consequently, that VLAN also shares the Rx and Tx rings of the underlying interface. A VLAN that is created as a VNIC by using the dladm create-vnic command has a different MAC address from its underlying interface. The allocation of rings for such a VLAN is independent of the allocation for the underlying link. Thus, that VLAN can be assigned its own dedicated rings, assuming that the NIC supports hardware-based clients.

Datalink Properties for Ring Allocation

To administer rings, two ring properties can be set by using the dladm command:

You can set each property to one of three possible values:

To provide information about current ring assignments and use, the following additional read-only ring properties are available:

Commands for Working With Receive and Transmit Rings

To manage the use of receive and transmit rings of datalinks, you use the following principal dladm subcommands:

Obtaining and Interpreting Ring Information

This section describes the dladm show-linkprop output that displays ring-related properties of a datalink.

Displaying Ring Allocation Capabilities of a Datalink

This section provides examples of command output about ring-related properties and explains the type of information you can obtain. The following NICs are used in the examples:

Example 3-1 nxge Ring Information

The following example shows ring information for nxge:

# dladm show-linkprop net0
LINK    PROPERTY            PERM  VALUE  DEFAULT  POSSIBLE
...
net0    rxrings             rw    --     --       sw,<1-7>
...
net0    txrings             rw    --     --       sw,<1-7>
...
net0    rxrings-available   r-    5      --       --
net0    txrings-available   r-    5      --       --
net0    rxhwclnt-available  r-    2      --       --
net0    txhwclnt-available  r-    2      --       --
...

With net0, the values of the POSSIBLE field are sw and <1-7> for rxrings and txrings. These values indicate that nxge supports hardware-based clients as well as software-based clients. The range <1-7> indicates the limits of the number of Rx rings or Tx rings you can set for clients. The range also indicates that the NIC supports dynamic ring allocation for both the receive and transmit sides.

In addition, the *rings-available properties indicate that five Rx rings and five Tx rings are available to allocate to hardware-based clients.

However, the *clnt-available properties show that you can configure only two clients that can have exclusive use of available Rx rings. Likewise, you can configure only two clients that can have exclusive use of available Tx rings.

Example 3-2 ixgbe Ring Information

The following example shows ring information for ixgbe:

# dladm show-linkprop net1
LINK   PROPERTY            PERM  VALUE  DEFAULT  POSSIBLE
...
net1   rxrings             rw     --    --       sw,hw
...
net1   txrings             rw     --    --       sw,hw,<1-7>
...
net1   rxrings-available   r-     0     --       --
net1   txrings-available   r-     5     --       --
net1   rxhwclnt-available  r-     0     --       --
net1   txhwclnt-available  r-     7     --       --
...

With net1, the POSSIBLE field values sw and hw for both rxrings and txrings indicate that ixgbe supports both hardware-based clients and software-based clients. For Rx rings, only static ring allocation is supported, where the hardware assigns a fixed set of Rx rings to each hardware-based client. However, for Tx rings, the range <1–7> indicates that dynamic allocation is supported. You can determine the number of Tx rings to assign to a hardware-based client, in this example, up to seven rings.

In addition, the *rings-available properties indicate that five Tx rings are available to allocate to hardware-based clients, but no Rx rings can be assigned.

Finally, based on the *hwclnt-available properties, you can configure seven hardware-based Tx clients to use Tx rings exclusively. However, you cannot create hardware-based clients with exclusive use of Rx rings because dynamic Rx ring allocation is not supported.

A zero (0) under the VALUE field for either of the *rings-available properties can mean one of the following:

You can verify the meaning of the zero by comparing the POSSIBLE field for rxrings and txrings with the VALUE field for rxrings-available and txrings-available.

For example, suppose that txrings-available is 0, as follows:

# dladm show-linkprop net1
LINK   PROPERTY            PERM  VALUE  DEFAULT  POSSIBLE
...
net1   rxrings             rw    --     --       sw,hw
net1   txrings             rw    --     --       sw,hw,<1-7>
net1   rxrings-available   r-    0      --       --
net1   txrings-available   r-    0      --       --
...

In this output, the VALUE field for rxrings-available is 0 while the POSSIBLE field for rxrings is sw,hw. The combined information means that no Rx rings are available because the NIC does not support dynamic ring allocation. On the transmit side, the VALUE field for txrings-available is 0 while the POSSIBLE field for txrings is sw,hw,<1-7>. The combined information indicates that no Tx rings are available because all the Tx rings have already been allocated. However, as the POSSIBLE field for txrings indicates, dynamic ring allocation is supported. Thus, you can allocate Tx rings as these rings become available.

Example 3-3 e1000g Ring Information

The following example shows ring information for e1000g:

# dladm show-linkprop net2
LINK   PROPERTY             PERM  VALUE  DEFAULT  POSSIBLE
...
net2   rxrings             rw     --      --     --
...
net2   txrings             rw     --      --     --
...
net2   rxrings-available   r-     0       --     --
net2   txrings-available   r-     0       --     --
net2   rxhwclnt-available  r-     0       --     --
net2   txhwclnt-available  r-     0       --     --
...

The output indicates that neither rings nor hardware-based clients can be configured because ring allocation is not supported in e1000g.

Displaying Ring Use and Ring Assignments on a Datalink

Two read-only datalink properties provide information about how rings are currently used by existing clients on the datalink:

To obtain information about ring use and which rings are distributed to clients, use both the dladm show-linkprop and dladm show-phys -H subcommands.

The following examples show different types of output generated by the two commands with respect to the use of Rx and Tx rings and how these rings are distributed among clients.

Example 3-4 Ring Use of the Primary Client

The primary client is the interface that is configured over the physical datalink of the NIC. For this example, the NIC is an ixgbe card. By default its datalink is net0. The IP interface over net0 is the primary client.

# dladm show-linkprop net0
LINK   PROPERTY              PERM  VALUE  DEFAULT  POSSIBLE
...
net0   rxrings              rw    --     --       sw,hw
net0   rxrings-effective    r     2      --       --
net0   txrings              rw    --     --       sw,hw,<1-7>
net0   txrings-effective    r     8      --       --
net0   txrings-available    r-    7      --       --
net0   rxrings-available    r-    0      --       --
net0   rxhwclnt-available   r-    3      --       --
net0   txhwclnt-available   r-    7      --       --
...
# dladm show-phys -H net0
LINK   RINGTYPE   RINGS   CLIENTS
net0   RX         0-1     <default,mcast>
net0   TX         0-7     <default>net0
net0   RX         2-3     net0
net0   RX         4-5     --
net0   RX         6-7     --

The output provides the following information about the use and distribution of rings for the primary client net0:

Example 3-5 Ring Use of a Secondary Client

This example assumes the configuration of a VNIC client vnic1 over net0, the physical datalink of the ixgbe card.

# dladm show-linkprop vnic1
LINK    PROPERTY            PERM  VALUE  DEFAULT  POSSIBLE
...
vnic1   rxrings             rw    hw     --       sw,hw 
vnic1   rxrings-effective   r-    2      --       -- 
vnic1   txrings             rw    hw     --       sw,hw,<1-7> 
vnic1   txrings-effective   r-    1      --       -- 
...
# dladm show-linkprop net0
LINK    PROPERTY            PERM  VALUE  DEFAULT  POSSIBLE
...
net0  rxrings             rw     --    --       sw,hw 
net0  rxrings-effective   r-     2     --       -- 
net0  txrings             rw     --    --       sw,hw,<1-7>
net0  txrings-effective   r-     --    --       -- 
net0  txrings-available   r-     6     --       -- 
net0  rxrings-available   r-     0     --       -- 
net0  rxhwclnt-available  r-     3     --       -- 
net0  txhwclnt-available  r-     6     --       -- 
...
# dladm show-phys -H net0
LINK     RINGTYPE   RINGS     CLIENTS
net0   RX         0-1       <default,mcast>
net0   TX         0,2-7     <default>net0
net0   RX         2-3       net0 
net0   RX         4-5       vnic1 
net0   RX         6-7       --
net0   TX         1         vnic1

The combined output from the three commands provides the following information:

Note that vnic1 is configured as a hardware-based client with static ring allocation. Consequently, the number of available Tx hardware clients (txhwclnt-available) that can be created over net0 is reduced to six.

How to Configure Clients and Allocate Rings

This procedure explains 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 Displaying Ring Allocation Capabilities of a Datalink and Displaying Ring Use and Ring Assignments on a Datalink. The information guides you in the way you configure the clients.

  1. Display the datalink's ring properties.
    # dladm show-linkprop datalink

    From the output, determine the following:

    • Whether the NIC supports hardware-based clients

    • The type of ring allocation that the NIC supports

    • The availability of rings to allocate to hardware-based clients

    • The availability of hardware-based clients that you can configure on the link

  2. Depending on the information from the previous step, perform one of the following:
    • If the NIC supports dynamic ring allocation, create the hardware-based client with the following syntax:

      # dladm create-vnic -p rxrings=number[,txrings=number] -l link vnic

      If the client was previously created, use the following syntax:

      # dladm set-linkprop -p rxrings=number[,txrings=number] vnic

      Note - Some NICs support dynamic ring allocation on either Rx rings or Tx rings, but not on both types. You specify number on the ring type for which dynamic ring allocation is supported.


    • If the NIC supports static ring allocation, create the hardware-based client with the following syntax:

      # dladm create-vnic -p rxrings=hw[,txrings=hw] -l link vnic

      If the client was previously created, use the following syntax:

      # dladm set-linkprop -p rxrings=hw[,txrings=hw] vnic

      Note - Some NICs support static ring allocation on either Rx rings or Tx rings, but not on both types. You specify hw on the ring type for which static ring allocation is supported.


    • If the NIC supports only software-based clients, create the client with the following syntax:

      # dladm create-vnic -p rxrings=sw[,txrings=sw] -l link vnic

      If the client was previously created, use the following syntax:

      # dladm set-linkprop -p rxrings=sw[,txrings=sw] vnic
  3. (Optional) Check the newly created client's ring information.
    # dladm show-linkprop vnic
  4. (Optional) Check how the datalink's rings are distributed among different clients.
    # dladm show-phys -H datalink

See Also

For an example that shows how to use flows and how to allocate system resources, including Rx and Tx rings, to process network traffic in a virtual network, see Example 3-8.