Switching Silicon Shell

Intel (Barefoot) Tofino Shell

About the Tofino Shell

Netberg Aurora switches with Intel Tofino IFP offer a specific shell with direct access to the ASICs. This shell is called bfshell.

Guidelines and Limitations

Following are the guidelines and limitations for the Tofino shell:

  • The Barefoot shell is for authorized use only. Use it with extreme caution and only when authorized by Netberg.
  • You can access and read information from the Intel Tofino ASICs without limitations. Netberg strongly advises against changing the Tofino configuration settings.

Accessing the Intel (Barefoot) Shell

Check your switch model by issuing the show version command.

admin@sonic:~$ show version
Platform: x86_64-netberg_aurora_710-r0
HwSKU: aurora-710
ASIC: barefoot

This document only describes how to access the Intel (Barefoot) shell, use the online help function, navigation, and exit the Intel (Barefoot) shell. For detailed information about the Intel (Barefoot) shell and its commands, please consult the Intel documentation.

To start the shell, enter the syncd container and issue the bfshell command.

admin@sonic:~$ docker exec -it syncd bash
root@sonic:/# /opt/bfn/install/bin/bfshell

* WARNING: Authorised Access Only *

To get a list of available commands, type ? (question mark).

  access        Access hardware registers
  bf_switch     bf_switchapi object commands
  bfrt_python   bfrt_cli commands
  debug_python  Python access hardware registers
  exit          Exit this CLI session
  help          Display an overview of the CLI syntax
  pipemgr       Pipe manager commands
  quit          Exit this CLI session
  run_file      Run the file like a script
  ucli          UCLI commands
  version       Display the SDE version

Type “help” at the prompt to get details of the help available.

bfshell> 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.
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.
[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.
[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.
!!  - 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)

Type the command name to change the command subsystem.

For example, change to UCLI commands:

bfshell> ucli

Each subsystem offers a new set of commands.

bf-sde> ?
 dump-trace       Display the trace logs
 reset-trace      Clear the trace logs
 set-trace-level  Set the trace level for a module
 set-log-level    Set the log level for a module
 get_trace        get_trace <size>
 ver              Display versions of all loaded/linked BF SDE components
 add-vdev         Add virtual device
 rmv-dev          Remove device
 show_tech_drivers  Display verbose system and module parameters. Usage -d <dev_id> -m <module_name> [-f <to enable file logging>]

After entering a new subsystem, type “..” to step back.

bf-sde> pm
bf-sde.pm> ..

To exit the Intel (Barefoot) shell, type the exit command. You will get back to the syncd container. Issue the exit command again to get back to SONiC CLI.

bf-sde> exit
bfshell> exit
root@sonic:/# exit

Latest news