Configuring Transient Capture Buffer

About Transient Capture Buffer

Transient Capture Buffer (TCB) is a debug feature that monitors packet drop events. TCB provides more visibility into transactions around the vicinity of the packet drop. This feature is intended to debug rare unexpected packet drops.

TCB consists of the following:

  • TCB buffer (Circular buffer) — Used to capture transactions on a set of memory management unit (MMU) resources around the vicinity of a specific drop event:

    • Packet metadata (source/destination port, timestamp, Unicast queue number, Unicast queue depth, service pool depth, and so on)

    • Raw packet data (80 bytes from start of the packet)

  • Event buffer (FIFO buffer) — Used to:

    • Record drop packets metadata

    • Determine the reason for the drop

    The following figure shows the workflow for TCB.

    Figure 1. Transient Capture Buffer Phase Workflow

    In the post-trigger phase, any drop happening in other queues of the capture scope is stored in event buffer. This buffer stores metadata of packets. Raw packet information is lost.

Following are the configuration attributes for TCB:

  • Capture Scope:

    • Monitor Scope Type — Determines the scope type a TCB monitors. Supported scopes are:

      • Unicast Queue (UCQ)

      • Ingress port

      • Egress port

    • Monitor Scope Entity — Should be consistent with the Monitor Scope Type. Supported entities are:

      • UCQ ID

      • Port number

  • Drop Event Trigger — Drop mechanisms that can cause a trigger. Supported triggers are:

    • Ingress Admission Drop

    • Egress Admission Drop

    • Weighted Random Early Detection (WRED) Drop

  • Pre-Trigger Phase Sample Probability — Packet sampling probability in the Pre-Trigger phase (1/16 to all)

  • Post-Trigger Phase Sample Probability — Packet sampling probability in the Post-Trigger phase (1/16 to all)

  • Freeze condition — The TCB state machine will enter the Frozen phase when either of the below freeze conditions are reached:

    • Pre Freeze Capture Number — The number of packets captured between the Drop Event Trigger and Frozen phase

    • Pre Freeze Capture Time — Time between the Drop Event Trigger to the Frozen phase (usec)

  • Threshold Profiles — Eight threshold profiles available for each TCB instance. It has a start threshold and a stop threshold. The start threshold should be higher than the stop threshold.

  • Threshold Profile Map — Each UCQ in the TCB scope can map to one threshold profile and different UCQs could map to one threshold profile. Supported maps are:

    • Egress Admission Drop

    • Weighted Random Drop

Guidelines and Limitations

Following are the guidelines and limitations for Transient Capture Buffer:

  • The Transient Capture Buffer feature is supported only on Cisco Nexus 3132C-Z and Cisco Nexus 3264C-E switches

  • Only one capturing scope (for example, UC queue, ingress port, or egress port) can be configured at a time.

  • Cut-through packets are not captured.

  • The TCB feature might not be suitable for situations where there is a large number of packet drops.

Configuring Transient Capture Buffer Scope and Entity Information

Transient Capture Buffer Scope and Entity Configuration Methods

The capture entity parameters specify the port around which TCB works. The entity can be a port or a specific qos-group within the port, depending on the scope.

Following are instructions for configuring TCB for the following three scopes:

Configuring Transient Capture Buffer Unicast Scope

Procedure

  Command or Action Purpose

Step 1

switch(config)# hardware profile packet-drop

Gets to the level where you can configure TCB.

Step 2

switch(config-pkt-drop)# source unicast-queue interface interface qos-group qos-group

Example:

switch(config-pkt-drop)# source unicast-queue interface ethernet 1/1 qos-group 1

Specifies the capture scope as queue basis, where:

  • interface is the Ethernet IEEE 802.3z entity interface

  • qos-group is the queue associated with the interface

Configuring Transient Capture Buffer Ingress Scope

Procedure

  Command or Action Purpose

Step 1

switch(config)# hardware profile packet-drop

Gets to the level where you can configure TCB.

Step 2

switch(config-pkt-drop)# source ingress interface ethernet interface

Example:

switch(config-pkt-drop)# source ingress interface ethernet 1/1

Specifies the capture scope as ingress, where interface is the Ethernet IEEE 802.3z entity interface.

Configuring Transient Capture Buffer Egress Scope

Procedure

  Command or Action Purpose

Step 1

switch(config)# hardware profile packet-drop

Gets to the level where you can configure TCB.

Step 2

switch(config-pkt-drop)# source egress interface ethernet interface

Example:

switch(config-pkt-drop)# source egress interface ethernet 1/1

Specifies the capture scope as egress, where interface is the Ethernet IEEE 802.3z entity interface.

Sample Transient Capture Buffer Scope Configurations

Following are sample TCB configurations for each type of scope.

Unicast Scope

hardware profile packet-drop
  source unicast-queue interface Ethernet1/49 qos-group 0
  timer 300
  count 200
  drop-trigger ingress-admission
  sampling-rate pre-trigger 10 post-trigger 10
  no shutdown

Ingress Scope

hardware profile packet-drop
  source ingress interface eth1/9
  timer 300
  count 200
  drop-trigger ingress-admission
  profile acme
    start-threshold 1500
    stop-threshold 1000
    interface Ethernet1/49 qos-group 2
    interface Ethernet1/49 qos-group 0
  sampling-rate pre-trigger 10 post-trigger 10
  no shutdown

Egress Scope

hardware profile packet-drop
  source egress interface eth1/49
  timer 300
  count 200
  drop-trigger egress-admission
  profile acme
    start-threshold 1500
    stop-threshold 1000
    interface Ethernet1/49 qos-group 2
    interface Ethernet1/49 qos-group 0
  no shutdown

Configuring Transient Capture Buffer Profiles

You can create a maximum of seven profiles, along with their respective start and stop thresholds for monitoring. The interface that you configure will be mapped to that corresponding profile in the hardware. It is only required for ingress and egress scope.

Procedure

  Command or Action Purpose

Step 1

switch(config)# hardware profile packet-drop

Gets to the level where you can configure TCB.

Step 2

switch(config-pkt-drop)# profile test

Gets to the level where you can create a TCB profile.

Step 3

switch(config-pkt-drop-profile)# start-threshold parameter

Example:

switch(config-pkt-drop-profile)# start-threshold 512

Configures the start-threshold parameters, where parameter is the parameter, in bytes.

Step 4

switch(config-pkt-drop-profile)# stop-threshold parameter

Example:

switch(config-pkt-drop-profile)# stop-threshold 256

Configures the stop-threshold parameters, where parameter is the parameter, in bytes.

Step 5

switch(config-pkt-drop-profile)# interface <if_list> {[qos-group <ucastqos-grp>]}

Example:

switch(config-pkt-drop-profile)# interface ethernet 1/1 qos-grop 1

Configures capture-scope parameters.

Transient Capture Buffer Global Parameters

To get to the TCB configuration level:

switch(config)# hardware profile packet-drop
switch(config-pkt-drop)#

The following options are available at this level:

Option

Purpose

count

Configures Captured Transactions count. This is an optional parameter.

drop-trigger

Configures drop-trigger parameters.

no

Negates the command.

profile

Provides information on Packet Drop Profile.

sampling-rate

Configures sampling-rate parameters. This is an optional parameter.

show

Shows running system information.

shutdown

Enables Transient Capture Buffer.

source

Configures Packet Drop Scope.

timer

Configures Packet Drop Timer parameters. This is an optional parameter.

end

Goes to exec mode.

exit

Exit from command interpreter.

pop

Pops mode from stack or restores from name.

push

Pushes current mode to stack or saves it under name.

where

Shows the cli context you are in.

Configuring Transient Capture Buffer Trigger Events

You can specify the trigger event that enables the state machine to capture the qualified set in the circular buffer.

Procedure

  Command or Action Purpose

Step 1

switch(config)# hardware profile packet-drop

Gets to the level where you can configure TCB.

Step 2

switch(config-pkt-drop)# drop-trigger trigger-event

Configures the trigger event that enables the state machine to capture the qualified set in the circular buffer, where trigger-event is one of the following:

  • egress-admission — An Egress Admission Drop.

  • ingress-admission — An Ingress Admission Drop.

  • wred — A Weighted Random Early Discard Drop.

Configuring Transient Capture Buffer Sampling Rates

You can add sampling rates at which the packets need to be captured before and after a drop. This is an optional parameter.

Procedure

  Command or Action Purpose

Step 1

switch(config)# hardware profile packet-drop

Gets to the level where you can configure TCB.

Step 2

switch(config-pkt-drop)# sampling-rate pre-trigger pre-trig-params post-trigger post-trig-params

Example:

switch(config-pkt-drop)# sampling-rate pre-trigger 11 post-trigger 12

Adds sampling rates at which the packets need to be captured before and after a drop, where:

  • pre-trig-params — Used to specify the number of transactions to be captured before a drop, out of 16 samples. Valid options are 1-16.

  • post-trig-params — Used to specify the number of transactions to be captured after a drop, out of 16 samples. Valid options are 1-16.

Configuring Transient Capture Buffer Timers

You can configure TCB timer intervals, which, when expired, moves the state machine to frozen and signals the software with a pointer to the start of the buffer. This is an optional parameter.

Procedure

  Command or Action Purpose

Step 1

switch(config)# hardware profile packet-drop

Gets to the level where you can configure TCB.

Step 2

switch(config-pkt-drop)# timer timer

Configures the timer interval, where timer is the capture timer interval, in micro-seconds (usec). Valid options vary, depending on the switch:

  • For the Cisco Nexus 3132C-Z switch, valid options for the capture timer interval is from 1-429.

  • For the Cisco Nexus 3264C-E switch, valid options for the capture timer interval is from 1-385.

Configuring Transient Capture Buffer Capture Counts

You can configure a minimum number of transactions to be captured after a drop, which, when reached, moves the state machine to frozen and signals the software with a pointer to the start of the buffer. This is an optional parameter.

Procedure

  Command or Action Purpose

Step 1

switch(config)# hardware profile packet-drop

Gets to the level where you can configure TCB.

Step 2

switch(config-pkt-drop)# count transactions

Configures the minimum number of transactions to be captured after a drop, where transactions is from 2 -1024.

Verifying the Transient Capture Buffer Configurations

Verifying the Running Configurations for TCB

Use the show running-config ipqos command to display running configurations for TCB. The output varies, depending on the TCB scope and entity configuration that you have set up.

  • For an ingress scope and entity configuration, output similar to the following is displayed:

    switch# show running config ipqos
    hardware profile packet-drop
      source ingress interface eth1/9
      timer 300
      count 200
      drop-trigger ingress-admission
      profile arvinth
        start-threshold 1500
        stop-threshold 1000
        interface Ethernet1/49 qos-group 2
        interface Ethernet1/49 qos-group 0
      sampling-rate pre-trigger 10 post-trigger 10
      no shutdown 
    
    
  • For an egress scope and entity configuration, output similar to the following is displayed:

    switch# show running config ipqos
    hardware profile packet-drop
      source egress interface eth1/49
      timer 300
      count 200
      drop-trigger egress-admission
      profile arvinth
        start-threshold 1500
        stop-threshold 1000
        interface Ethernet1/49 qos-group 2
        interface Ethernet1/49 qos-group 0
      no shutdown
    
    
  • For a unicast scope and entity configuration, output similar to the following is displayed:

    switch# show running config ipqos
    hardware profile packet-drop
      source unicast-queue interface Ethernet1/49 qos-group 0
      timer 300
      count 200
      drop-trigger ingress-admission
      sampling-rate pre-trigger 10 post-trigger 10
      no shutdown
    
    

Verifying the Packet Drop Information

Use the show hardware profile packet-drop option command to display packet drop information for TCB, where option is:

  • data — Displays packet drop circular-buffer data.

  • event — Displays packet drop event-buffer data.

  • status — Displays packet drop status.

The following examples show packet drop info for the different command options.

  • Following are examples of captured data using show hardware profile packet-drop data (example output below is a snippet of actual full output):

    switch# show hardware profile packet-drop data
    Details of Instance : 1
    =========================
    Src_port : Ethernet1/10
    Dst_port : Ethernet1/1 , Qos-group : 1 , Queue_depth : 3362736 bytes
    Payload : 18809011ad5701a100881060968045281ea000040637d4961a8971a803c03c00000000502002771000123456789abcdef101112131415
    
    Src_port : Ethernet1/10
    Dst_port : Ethernet1/1 , Qos-group : 1 , Queue_depth : 3362736 bytes
    Payload : 18809011ad5701a100881060968045281ea000040637d4961a8971a803c03c00000000502002771000123456789abcdef101112131415
    
    Src_port : Ethernet1/10
    Dst_port : Ethernet1/1 , Qos-group : 1 , Queue_depth : 3362736 bytes
    Payload : 18809011ad5701a100881060968045281ea000040637d4961a8971a803c03c00000000502002771000123456789abcdef101112131415
    
    Src_port : Ethernet1/10
    Dst_port : Ethernet1/1 , Qos-group : 1 , Queue_depth : 3362736 bytes
    Payload : 18809011ad5701a100881060968045281ea000040637d4961a8971a803c03c00000000502002771000123456789abcdef101112131415
    
    
  • Following is an example of captured data using show hardware profile packet-drop data instance instance-number, where instance-number is a value from 1-5:

    switch# show hardware profile packet-drop data instance 1
    Details of Instance : 1
    =========================
    Fri Apr 30 10-59-16 1971 , Src_port : Ethernet1/9
    Dst_port : Ethernet1/49 , Qos-group : 0 , Queue_depth : 3440112 bytes
    Payload : 18809011b0b1010940028045006edee900fffd8b7faaa11e1e1e10000000000000000000000000000000000000000000000
    
    
  • Following are examples of captured data using show hardware profile packet-drop event (example output below is a snippet of actual full output):

    switch# show hardware profile packet-drop event
    Details of Instance : 1
    =========================
    Src_port : Ethernet1/10
    Dst_port : Ethernet1/1 , Qos-group : 1 , Queue_depth : 3375216 bytes, Drop_reason : Egress-Admission
    
    Src_port : Ethernet1/10
    Dst_port : Ethernet1/1 , Qos-group : 1 , Queue_depth : 3375216 bytes, Drop_reason : Egress-Admission
    
    Src_port : Ethernet1/10
    Dst_port : Ethernet1/1 , Qos-group : 1 , Queue_depth : 3375216 bytes, Drop_reason : Egress-Admission
    
    Src_port : Ethernet1/10
    Dst_port : Ethernet1/1 , Qos-group : 1 , Queue_depth : 3375216 bytes, Drop_reason : Egress-Admission
    
    Src_port : Ethernet1/10
    Dst_port : Ethernet1/1 , Qos-group : 1 , Queue_depth : 3375216 bytes, Drop_reason : Egress-Admission
    
    
  • Following is an example of captured data using show hardware profile packet-drop event instance instance-number, where instance-number is a value from 1-5:

    switch# show hardware profile packet-drop event instance 1
    Details of Instance : 1
    =========================
    Fri Apr 30 20-57-24 1971 , Src_port : Ethernet1/9
    Dst_port : Ethernet1/49 , Qos-group : 0 ,  Queue_depth : 3452592 bytes, Drop_reason : EADMIN
    
    
  • Following is an example of captured data using show hardware profile packet-drop status:

    switch# show hardware profile packet-drop status
    TCB Enabled : FALSE
    TCB State : IDLE
    Capture Scope : ingress
    Drop Trigger : wred
    Capture Transactions : 304
    Capture Timer : 385
    
    

Clearing Transient Capture Buffer Information

Use the information in this section to clear all instances of packet-drop data/event information.

Procedure

Command or Action Purpose

switch(config)# clear hardware profile packet-drop file_instance