FlowTracker

Flowtracker commands

FlowTracker

Shortest form: ft.

Debug commands for the flow tracker: the hardware flow table, its groups, ALUs and export FIFO, plus the statistics of the flow-tracker application on the embedded microcontroller. Type sub-command words in full; abbreviations are not accepted. The short forms s (show), b (brief), e (entry), c (class) and st (state_trans) are the exceptions. ft is accepted as the command name.

The built-in help covers only part of what the shell accepts; the entries below list everything. Most forms need the hardware flow tracker, and stats needs the flow-tracker application. On a device without them the shell reports the command as not found rather than printing the usage. On a device that has them, the other hardware forms work after init; before it they print ft: Module not initialized.

Trident 3 has neither. Every ft sub-command on a SONiC Trident 3 switch prints only Failed to execute the diagnostic command. Error: Entry not found.: the SAI front-end’s wording for “command not found”, not a missing flow entry. The examples below all show this.

show, list, key lookup and stats are read-only. init, detach and key add change flow-tracker state in the switch. SONiC does not use the flow tracker through this command.

FlowTracker init

Start the flow-tracker module. FlowTracker detach stops it. An error prints ft: error initializing: <error> or ft: error detaching: <error>.

Unvalidated

drivshell> ft init
FlowTracker key <add | lookup> [DIP=<ip>] [SIP=<ip>] [L4DestPort=<n>] [L4SrcPort=<n>] [PROTO=<n>]

Insert a 5-tuple key into the flow table, or look one up. A lookup prints FT table index is = <i> and group = <g>. The built-in help shows a key L4SrcPortVRF; the shell actually accepts L4SrcPort. add first prints a debug line DIP = 0: SIP = 0, which you can ignore.

Hardware-validated

drivshell> ft key lookup DIP=10.0.0.2 SIP=10.0.0.1 L4DestPort=80 L4SrcPort=1234 PROTO=6

Failed to execute the diagnostic command. Error: Entry not found.
FlowTracker show [brief]

Print all flow-tracker state, or a brief summary.

Hardware-validated

drivshell> ft show brief

Failed to execute the diagnostic command. Error: Entry not found.
FlowTracker show group Group=<id>

Print the state of one flow group.

Hardware-validated

drivshell> ft show group Group=1

Failed to execute the diagnostic command. Error: Entry not found.
FlowTracker show session_data Group=<id> [DIP=<ip>] [SIP=<ip>] [L4DestPort=<n>] [L4SrcPort=<n>] [PROTO=<n>]

Print the session data of the flow with the given key. show session_data_index Group=<id> index=<n> selects the flow by its table index instead; that form is not in the built-in help.

Hardware-validated

drivshell> ft show session_data Group=1 DIP=10.0.0.2 SIP=10.0.0.1 L4DestPort=80 L4SrcPort=1234 PROTO=6

Failed to execute the diagnostic command. Error: Entry not found.
FlowTracker show alu32 index=<n>

Print one 32-bit ALU entry. show alu16 index=<n> and show aggalu32 index=<n> print 16-bit and aggregate ALU entries. show alu_hash prints the ALU hash table. aggalu32 and alu_hash are not in the built-in help.

Hardware-validated

drivshell> ft show alu32 index=0

Failed to execute the diagnostic command. Error: Entry not found.
FlowTracker show fifo

Print the export-FIFO configuration. Three related forms take no arguments either: show udf (UDF tracking-parameter mapping), show param (tracking parameters) and show state_trans (state transitions; not in the built-in help).

Hardware-validated

drivshell> ft show fifo

Failed to execute the diagnostic command. Error: Entry not found.
FlowTracker show appl Type=<n> Id=<n>

Print an application signature.

Hardware-validated

drivshell> ft show appl Type=0 Id=1

Failed to execute the diagnostic command. Error: Entry not found.
FlowTracker show entry [Group=<id>] [Table=<n>] [Index=<n>] [Count=<n>]

Print flow-table entries. Not in the built-in help.

Hardware-validated

drivshell> ft show entry Group=1 Count=10

Failed to execute the diagnostic command. Error: Entry not found.
FlowTracker show class Id=<n>

Print an aggregate class. Not in the built-in help.

Hardware-validated

drivshell> ft show class Id=1

Failed to execute the diagnostic command. Error: Entry not found.
FlowTracker list <ift | mft | eft | aift | amft | aeft | all | drop>

List the tracking parameters available for each flow-tracker type (ingress, MMU, egress, and their aggregate variants). list drop lists the drop reasons. None of these forms is in the built-in help.

Hardware-validated

drivshell> ft list all

Failed to execute the diagnostic command. Error: Entry not found.
FlowTracker stats <learn | export | age | elephant>

Print the statistics of the flow-tracker application.

Hardware-validated

drivshell> ft stats learn

Failed to execute the diagnostic command. Error: Entry not found.
FlowTracker etrap <stats [Clear=<bool>] | dump [Pipe=<n>] [StartIndex=<n>] [EndIndex=<n>] [Valid=<bool>]>

Elephant-trap statistics and flow-table dump. These exist only on Tomahawk 3; elsewhere the shell reports the command as not found. Type etrap, stats and dump in lower case. stats Clear=True clears the counters.

Hardware-validated

drivshell> ft etrap stats

Failed to execute the diagnostic command. Error: Entry not found.

Built-in help

Usages:
  ft etrap stats [Clear=<True|False>]
          - Show the ETRAP statistics
  ft etrap dump [Pipe=<pipe>] [StartIndex=<index>] [EndIndex=<index>] [Valid=<True|False>]
          - Dump Elephant flow table entries
  ft init    - Init FT.
  ft detach  - Detach FT.
  ft key add <DIP>=<val> <SIP>=<val> <L4DestPort>=<val> <L4SrcPortVRF>=<val>]
                       <Proto>=<val>]
                       - Add an entry into FT table with above key
  ft key lookup <DIP>=<val> <SIP>=<val> <L4DestPort>=<val> <L4SrcPortVRF>=<val>]
                       <Proto>=<val>]
                       - Returns the index associated with the above key.
  ft show group <Group=<val> - Dumps the state of group.
  ft show session_data <Group=<val> <DIP>=<val> <SIP>=<val> <L4DestPort>=<val> <L4SrcPortVRF>=<val>]
                       <Proto>=<val>]
                       - Dumps the Session data corresponding to user provided key.
  ft show alu32 <index=<val> - Dump ALU32 entry with index.
  ft show alu16 <index=<val> - Dump ALU32 entry with index.
  ft show fifo - Dump FT Export FIFO configurations.
  ft show appl <type>=<val> id=<val> - Dump Application signature
  ft show udf - Dump UDF tacking param mapping configuations
  ft show param - Dump tacking params

  ft stats learn
          - Show the Learn statistics
  ft stats export
          - Show the Export statistics
  ft stats age
          - Show the Aging statistics
  ft stats elephant
          - Show the Elephant statistics