Configuring QoS TCAM Carving

About QoS TCAM Carving

You can change the size of the access control list (ACL) ternary content addressable memory (TCAM) regions in the hardware.

The number of default entries for QoS TCAM carving are:

  • The default QoS TCAM carving for the Cisco Nexus 9504, Cisco Nexus 9508, and Cisco Nexus 9516 is for Layer 3 QoS (IPV4) with 256 entries.


    Note


    All QoS TCAM entries are double wide.


  • The default QoS TCAM carving for ALE (Application Leaf Engine) enabled devices is for Layer 2 port QoS (IPV4) with 256 entries.


    Note


    All QoS TCAM entries are double wide.



Note


In addition to the above TCAM, for ALE enabled devices, a separate TCAM in the Cisco Nexus C9396PX (uplink ports) and Cisco Nexus C93128TX (uplink ports) ASIC is used for the QoS classification policies applied on 40G uplink ports. By default, this separate TCAM is carved for Layer 3 QoS (IPV4), Layer 2 Port QoS (IPV4), and VLAN QoS (IPV4) with 256 entries each.


Table 1 QoS TCAM Regions

Feature

Purpose

Region Name

Layer 3 QoS

QoS policy applied on Layer 3 interfaces.

IPV4: l3qos, ns-l3qos (See note following table.)

IPV6: ipv6-l3qos, ns-ipv6-l3qos (See note following table.)

Port QoS

QoS policy applied on Layer 2 interfaces.

IPV4: qos, ns-qos (See note following table.)

IPV6: ipv6-qos, ns-ipv6-qos (See note following table.)

MAC: mac-qos, ns-mac-qos (See note following table.)

VLAN QoS

QoS policy applied on VLAN.

IPV4: vqos, ns-vqos

IPV6: ipv6-vqos, ns-ipv6-vqos (See note following table.)

MAC: mac-vqos, ns-mac-vqos (See note following table.)

FEX QoS

QoS policy applied on FEX interfaces.

IPV4: fex-qos (See note following table.)

IPv6: fex-ipv6-qos (See note following table.)

MAC: fex-mac-qos (See note following table.)


Note


The region is applicable only for ALE enabled devices and are required for classification policies applied on 40G uplink ports.


You need to save the configuration and reload the system for the region configuration to become effective.

About QoS TCAM Lite Regions

IPV4 requires QoS TCAM regions to be double wide TCAMs to support confirm/violate policer statistics. If confirm/violate statistics are not required, the size of the QoS TCAM entries can be reduced to single wide TCAMs by using QoS TCAM lite regions. Policing is supported by these regions, however only violate packets/bytes statistics are supported.

Table 2 QoS TCAM Lite Regions

Feature

Purpose

Region Name

Layer 3 QoS

QoS policy applied on Layer 3 interfaces.

IPV4: l3qos-lite

Port QoS

QoS policy applied on Layer 2 interfaces.

IPV4: qos-lite

VLAN QoS

QoS policy applied on VLAN.

IPV4: vqos-lite

FEX QoS

QoS policy applied on FEX interfaces.

IPV4: fex-qos-lite


Note


The region is applicable only for ALE enabled devices and are required for classification policies applied on 40G uplink ports.


You need to save the configuration and reload the system for the region configuration to become effective.


Note


Either the regular version or the lite version of the QOS TCAM can be enabled. Both cannot be enabled at the same time. For example, either the IPv4 Port QoS or the IPv4 Port QoS lite version can be enabled at any one time.


Guidelines and Limitations

TCAM region sizes have the following configuration guidelines and limitations:

  • After TCAM carving, you must save the configuration and reload the switch.

  • By default, all IPv6 TCAMs are disabled (the TCAM size is set to 0).

  • Use the show hardware access-list tcam region command to view the configured TCAM region size.


    Note


    The information displayed by the show hardware access-list tcam region command is synchronized with the show system internal access-list globals command upon reload.


  • By default, the TCAM region for CoPP is 95% utilized on the Nexus 9300/Nexus 9500 series switch. If you modify the CoPP policy, it is likely that you will need to modify other TCAM region sizes to allow for more space to be applied to the CoPP TCAM region.

  • When any of the following classification criteria are used for IPv4 and IPv6, you need to carve the IPv4 based QoS TCAM region. It is not necessary to carve an IPv6 based QoS TCAM region.

    • Differentiated Services Code Point (DSCP) based classification

    • Class of service (CoS) based classification

    • IP precedence based classification

  • When a QoS policy is applied on multiple interfaces or multiple VLANs, the label is not shared since the statistics option is enabled.

    To share the label for the same qos policy that is applied on multiple interfaces or multiple VLANs, you need to configure the qos policy with no-stats option using the service-policy type qos input my-policy no-stats command.

Configuring QoS TCAM Carving

You can change the default QoS TCAM carving to accommodate your network requirements. The following sections contain examples of how to change the default QoS TCAM carving.

Enabling Layer 3 QoS (IPv6)

The default TCAM region configuration does not accommodate Layer 3 QoS (IPv6). To enable Layer 3 QoS (IPv6), you must decrease the TCAM size of another region and then increase the TCAM size for the Layer 3 QoS (IPv6) region.

The following table lists the default sizes for the ingress TCAM regions for the Cisco Nexus 9504, Cisco Nexus 9508, and Cisco Nexus 9516 devices.

Table 3 Default TCAM Region Configuration (Ingress)

Region Name

Size

Width

Total Size

IPV4 RACL

1536

1

1536

L3 QoS(IPV4)

256

2

512

COPP

256

2

512

System

256

2

512

Redirect

256

1

256

SPAN

256

1

256

VPC Convergence

512

1

512

4K

     Command or ActionPurpose
    Step 1 hardware access-list tcam region region number-of-entries
     

    Specify the region that frees up resource for the Layer 3 QoS (IPv6) TCAM region and the region's reduced number of entries.

    Note   

    Repeat this step for different regions to free up sufficient resources for the Layer 3 QoS (IPv6) TCAM region.

     
    Step 2 hardware access-list tcam region region number-of-entries
     

    Specify the Layer 3 QoS (IPv6) TCAM region and the number of (double wide) entries.

     

    This example sets the ingress Layer 3 QoS (IPv6) TCAM region size to 256. A Layer 3 QoS (IPv6) of size 256 takes 512 entries because IPv6 is double wide.

    • Reduce the span and redirect regions to 0. This creates 512 entry spaces that are used to carve Layer 3 QoS (IPV6) with 256 entries (double wide).

    switch(config)# hardware access-list tcam region redirect 0
     Warning: Please reload the linecard for the configuration to take effect
     Warning: BFD, DHCPv4 and DHCPv6 features will NOT be supported after this configuration change. 
    switch(config)# hardware access-list tcam region span 0
     Warning: Please reload the linecard for the configuration to take effect
    switch(config)# hardware access-list tcam region ipv6-l3qos 256
     Warning: Please reload the linecard for the configuration to take effect
    
    Table 4 Updated TCAM Region Configuration After Reducing the IPv4 RACL (Ingress)

    Region Name

    Size

    Width

    Total Size

    IPv4 RACL

    1536

    1

    1536

    Layer 3 QoS (IPv6)

    256

    2

    512

    Layer 3 QoS (IPv4)

    256

    2

    512

    CoPP

    256

    2

    512

    System

    256

    2

    512

    Redirect

    0

    1

    0

    SPAN

    0

    1

    0

    VPC Convergence

    512

    1

    512

    4K

    Enabling VLAN QoS (IPv4)

    To enable VLAN QoS (IPv4), you must decrease the TCAM size of another region and then increase the TCAM size for the VLAN QoS (IPv4) region.

    The following table list the default sizes for the ingress TCAM regions for ALE enabled devices.

    Table 5 Default TCAM Region Configuration (Ingress)

    Region Name

    Size

    Width

    Total Size

    PACL (IPV4)

    512

    1

    512

    Port QoS (IPV4)

    256

    2

    512

    VACL (IPV4)

    512

    1

    512

    RACL(IPV4)

    512

    1

    512

    System

    256

    2

    512

    COPP

    256

    2

    512

    Redirect

    512

    1

    512

    SPAN

    256

    1

    256

    VPC Converg

    256

    1

    256

    4K

       Command or ActionPurpose
      Step 1 hardware access-list tcam region region number-of-entries
       

      Specify the region that frees up resource for the VLAN QoS (IPv4) TCAM region and the region's reduced number of entries.

      Note   

      Repeat this step for different regions to free up sufficient resources for the VLAN QoS (IPv4) TCAM region.

       
      Step 2 hardware access-list tcam region region number-of-entries
       

      Specify the VLAN QoS (IPv4) TCAM region and the number of (double wide) entries.

       

      This example sets the VLAN QoS (IPv4) TCAM size to 256. A VLAN QoS (IPv4) of size 256 takes 512 entries because QoS TCAM is double wide.

      • Reduce the ingress Port QoS (IPv4) by 256 bytes (QoS features are double wide, 2 x 256 = 512) and add an ingress VLAN QoS (IPv4) with 256 (2 x 256).

        switch(config)# hardware access-list tcam region qos 0
         Warning: Please reload the linecard for the configuration to take effect
        switch(config)# hardware access-list tcam region vqos 256
         Warning: Please reload the linecard for the configuration to take effect
        
        Table 6  Updated TCAM Region Configuration After Reducing the IPv4 Port QoS Ingress

        Region Name

        Size

        Width

        Total Size

        PACL (IPV4)

        512

        1

        512

        Port QoS (IPV4)

        0

        2

        0

        VLAN QoS(IPV4)

        256

        2

        512

        VACL (IPV4)

        512

        1

        512

        RACL(IPV4)

        512

        1

        512

        System

        256

        2

        512

        COPP

        256

        2

        512

        Redirect

        512

        1

        512

        SPAN

        256

        1

        256

        VPC Converg

        256

        1

        256

        4K

      Verifying QoS TCAM Carving

      After you adjust the TCAM region sizes, enter the show hardware access-list tcam region command to display the TCAM sizes that will be applicable on the next reload of the device.


      Note


      To keep all modules synchronized, you must reload all line card modules or enter the copy running-config startup-config command and the reload command to reload the device. Multiple TCAM region configurations require only a single reload. You can wait until you complete all of your TCAM region configurations before you reload the device.


      If you exceed the 4K ingress limit for all TCAM regions when you configure a TCAM region, the following message appears:

      ERROR: Aggregate TCAM region configuration exceeded the available Ingress TCAM space.
      Please re-configure.
      
      

      If TCAM for a particular feature is not configured and you try to apply a feature that requires TCAM carving, the following message appears:

      ERROR: Module x returned status: TCAM region is not configured. Please configure TCAM
      region and retry the command.