Barefoot Shell

This section contains the following topics:

About the Barefoot Shell

The Cisco Nexus 3464C and Cisco Nexus 34180YC are top of the rack (ToR) switches that contain the Barefoot Networks Tofino ASICs. Because these switches are TORs, they do not feature any interchangeable fabric modules or line cards. The Barefoot Networks Tofino ASICs exist on the switches' system boards.

On the Cisco Nexus 3464C and Cisco Nexus 34180YC switches, a specific shell enables access directly to the ASICs. This shell is called the Barefoot shell.

Guidelines and Limitations


Note

Beginning with Cisco NX-OS Release 9.3(3), this feature is no longer supported.


Following are the guidelines and limitations for the Barefoot shell:

  • For notes about platform support, see Supported Platforms for Programmability Features.

  • The Barefoot shell is for authorized use only. Use it with extreme caution and only when authorized by Cisco.

  • You can access and read information from the Barefoot ASICs without any limitations. However, Cisco does not recommend changing the Barefoot configuration settings.

Accessing the Barefoot Shell with CLI API

The Barefoot shell is available directly from EXEC mode. The shell enables you to issue commands directly to the Barefoot Networks Tofino ASICs, which are supported in the Cisco Nexus 3464C and Cisco Nexus 34180YC switches. You can check the model of your switch by issuing the show module command.

Example:
switch-1# show module
Mod Ports  Module-Type                          Model                 Status
--- ----- ------------------------------------- --------------------- ---------
1    66   64x100G QSFP28 + 2x10G SFP+ Ethernet  N3K-C3464C            active * 
 

This topic documents how to access the Barefoot shell from NX-OS, use the online help function, and exit the Barefoot shell. For detailed documentation about the Barefoot shell and its commands, consult the Barefoot Networks Tofino documentation.

  • To enter the Barefoot shell, issue the bfshell command.

    Example:

    switch-1# bfshell                                                                
    Warning: bfshell access should be used with caution
    
    
            ********************************************
            *      WARNING: Authorised Access Only     *
            ********************************************
        
    bfshell> 
    

    The command prompt changes to bfshell to indicate that you are in the Barefoot shell.

  • To get a list of top-level commands in the hierarchy, type ? (question mark).

    Example:

    bfshell> ?
      cint       C Interpreter
      exit       Exit this CLI session
      help       Display an overview of the CLI syntax
      pd-switch  pd_switch Related Commands
      pipemgr    Pipe manager commands
      quit       Exit this CLI session
      switchapi  switchAPI commands
      ucli       UCLI commands
      version    Display the SDE version
    
  • To get details about the types of help available, type help at the prompt.

    Example:
    bfshell> help 
    
    CONTEXT SENSITIVE HELP
    [?] - Display context sensitive help. This is either a list of possible
          command completions with summaries, or the full syntax of the
          current command. A subsequent repeat of this key, when a command
          has been resolved, will display a detailed reference.
    
    AUTO-COMPLETION
    The following keys both perform auto-completion for the current command line.
    If the command prefix is not unique then the bell will ring and a subsequent
    repeat of the key will display possible completions.
    
    [enter] - Auto-completes, syntax-checks then executes a command. If there is
              a syntax error then offending part of the command line will be
              highlighted and explained.
    
    [space] - Auto-completes, or if the command is already resolved inserts a space.
    
    MOVEMENT KEY
    [CTRL-A] - Move to the start of the line.
    [CTRL-E] - Move to the end of the line.
    [up]     - Move to the previous command line held in history.
    [down]   - Move to the next command line held in history.
    [left]   - Move the insertion point left one character.
    [right]  - Move the insertion point right one character.
    
    DELETION KEYS
    [CTRL-C]    - Delete and abort the current line.
    [CTRL-D]    - Delete the character to the right on the insertion point.
    [CTRL-K]    - Delete all the characters to the right of the insertion point.
    [CTRL-U]    - Delete the whole line.
    [backspace] - Delete the character to the left of the insertion point.
    
    ESCAPE SEQUENCES
    !!  - Subsitute the the last command line.
    !N  - Substitute the Nth command line (absolute as per 'history' command)
    !-N - Substitute the command line entered N lines before (relative)
    bfshell> 
  • To change to different command subsystems in the hierarchy, enter the top-level command name.

    For example, to change to the pd-switch commands:
    bfshell> ?
      cint       C Interpreter
      exit       Exit this CLI session
      help       Display an overview of the CLI syntax
      pd-switch  pd_switch Related Commands
      pipemgr    Pipe manager commands
      quit       Exit this CLI session
      switchapi  switchAPI commands
      ucli       UCLI commands
      version    Display the SDE version
    
    bfshell> pd-switch
    pd-switch:0>  

    Notice the prompt changes to display the subsystem.

    New commands are available within each subsystem in the hierarchy.

    pd-switch:0> ?
      dump_profile  dump action profile entries
      dump_table    dump table entries
      end           End pd-switch sub-commands
      exit          Exit this CLI session
      get           Display value of shell variable
      help          Display an overview of the CLI syntax
      pd            prefix for all pd commands
      quit          Exit this CLI session
      set           Set value of shell variable
      var           Declare new shell variable
    
  • To exit the Barefoot shell, issue either the exit or quit command, which terminates the current Barefoot CLI session and returns you to the NX-OS prompt. You can issue these commands from anywhere in the hierarchy.

    Examples:

    pd-switch:0> exit
    switch-1#
    bfshell> quit
    switch-1#