--------------------------------------
    SCRUTINY NIC CLI README
--------------------------------------

SCRUTINY NIC CLI:
-------------------
1. Use help of each commands to get the combinations of the options/arg and command syntax.
2. Known issues are logged as a development defects.
3. Main help command has unsupported commands listed for future releases as a place holder.
4. Live patch is not dev tested as it requires a dedicated image.
5. 'install' command's -online options are not supported for BCM957504-P425D card.
    install command's behavior matches with that of bnxtnvm with BCM957504-P425D card and
    was not further tested with different card.
6. Output formatting of new syntax and legacy syntax has made to match the Scrutiny conventions.
7. A cold boot is needed after recovery FW update for any functionality to work. It's expected
   that bnxt_en functionality is broken for the device on which recovery is performed.
8. A) The set of PFs used by kernel mode sliff driver/ NICCLI and B)the set of PFs bound to vfio-pci
      driver / used by DPDK should be mutually exclusive. i.e. no PF should be used by both
	  the sets: A) & B) at any point of time. NICLI does not discover/list the PFs used by DPDK.
	  A PF should not be bound to vfio-pci driver/used by DPDK while it's being operated on by niccli.
9. bash shell kind of pattern matching & globbing features are not supported in interactive mode.
10.support for running multiple parallel instances of niccli commands is command specific even when
   scrutiny_cli/niccli support multiple parallel instances.
11. Live Firmware Upgrade feature is deprecated.


SUPPORTED PLATFORMS:
--------------------
1. Linux :
    - x86_64
	- aarch64
2. Windows :
    - x86_64
3. VMWare :
    - x86_64
4. FreeBSD :
    - x86_64	


Sliff Driver:
-------------
See sliff Driver specific additional Readme in sliff source.

INSTALLATION OF NICCLI:
-----------------------

NICCLI executable is delivered for Linux, Windows, VMWare and FreeBSD currently.

Linux OS (For x86_64 and aarch64):
---------------------------------

1) Navigate to the niccli folder. It has two separate folder sections for niccli exectubles and sliff Driver. 
   a) Linux folder
      It contains the niccli script, bare niccli executable, niccli rpm and debian packages.
      
   b) sliff Driver folder
      It contains the sliff driver source rpm, sliff driver rpms for different Linux distrubutions, sliff driver Debian packages, DKMS and source rpms. 

2) Installation of the niccli rpm :
   a) Install the rpm using the below command :
       rpm -[i/-U]vh niccli-<version>.x86_64.rpm
	   rpm -[i/-U]vh niccli-<version>.aarch64.rpm
       
   b) Above step installs the packaged files to the following locations. 
      For x86_64 :
	  -----------
        /opt/niccli                 
        /opt/niccli/Readme.txt
		/opt/niccli/cmb_a.bin
        /opt/niccli/niccli
        /opt/niccli/niccli.x86_64
		/opt/niccli/sr_a.bin
		/opt/niccli/th_a_0x20000360_sbl.signed.crid0001.bin.fastboot
        /usr/bin/niccli             :  niccli.x86_64 executable is replaced with "niccli" script that automatically loads (modprobe) the sliff driver prior to executing the application
        	
	 For aarch64 :
	 ------------
        /opt/niccli                 
        /opt/niccli/Readme.txt
		/opt/niccli/cmb_a.bin
        /opt/niccli/niccli
        /opt/niccli/niccli.aarch64
		/opt/niccli/sr_a.bin
		/opt/niccli/th_a_0x20000360_sbl.signed.crid0001.bin.fastboot
        /usr/bin/niccli           :  niccli.aarch64 executable is replaced with "niccli" script that automatically loads (modprobe) the sliff driver prior to executing the application

3) Installation of the Sliff Driver rpm :
   a) Downlaod the appropriate the rpm based on your Linux distrubution and install using the below command : 
      rpm -[i/-U]vh kmod-sliff-<version>.<linux_distrubution>.x86_64.rpm 
	  rpm -[i/-U]vh kmod-sliff-<version>.<linux_distrubution>.aarch64.rpm
	  NOTE : 
	   "rpm -ivh" works only with first time installation. 
	   Run "rpm -qa | grep kmod" to check if the sliff is already installed or not. 
	   If the package is already installed, then user should run "rpm -Uvh" to upgrade the package.
	   If user wants to erase the sliff package, then run "rpm -e *.rpm".
       If user had installed the sliff driver through make; make install, then user has to make sure that to remove the sliff driver from the path /lib/modules/`uname -r`/updates/sliff.ko to load the sliff driver from the rpm install path /lib/modules/`uname -r`/extra/sliff/sliff.ko	   
			 
      
   b) Above step installs the packaged files to the following locations based on the platform (x86_64 or aarch64).
        /etc/depmod.d/sdrv.conf
        /lib/modules/4.18.0-372.9.1.el8.x86_64
        /lib/modules/4.18.0-372.9.1.el8.x86_64/extra
        /lib/modules/4.18.0-372.9.1.el8.x86_64/extra/sdrv
        /lib/modules/4.18.0-372.9.1.el8.x86_64/extra/sdrv/sliff.ko

4) Installation of the Sliff Driver source rpm/tar:
   a) sliff driver source rpm can be found in below two paths in SIT builds:
      i) /niccli/sliff/sliff-<version>.tar.gz
     ii) /niccli/sliff/KMP/<Linux_OS_distrubution>/<Linux_OS_version>/sliff-<version>-<LinuxOSVersion>.src.rpm

   b) Verify the Source rpm has the following files. 
	  $rpm -ql sliff-225.0.100.0-1.rhel8u7.src.rpm
	  sliff-225.0.100.0.tar.gz
	  sliff.files
	  sliff.spec
	 
   c) Install the yum-utils and rpm-build packages which are required to build the source rpms. 
	  $sudo yum install yum-utils rpm-build
	 
   d) Check if there is any dependencies for building the Source packages. 
	  $yum-builddep sliff-225.0.100.0-1.rhel8u7.src.rpm
	 
   e) Install the Source rpm using the rpm-build command with the below options. It compiles and installs the sliff driver  to the path /lib/modules/
	  $rpmbuild -rb < SOURCE_RPM_FILE> or
	  $rpmbuild --rebuild <SOURCE_RPM_FILE>
	  
	  At the end of the rpmbuild, you should see : 
	  Wrote: /root/rpmbuild/RPMS/x86_64/kmod-sliff-<version>.rhel8u7.x86_64.rpm
	  
   f) To install the sliff driver, run the below command :
	  rpm -ivh /root/rpmbuild/RPMS/x86_64/kmod-sliff-<version>.rhel8u7.x86_64.rpm  

5) Following are the two ways to execute the NICCLI commands:
	a) run the "niccli" script, it automatically loads the appropriate sliff driver prior to executing the application and runs the "niccli.x86_64" binary.
	   If sliff driver is not installed, then script throws an error.
           
	b) If user is directly running the "niccli.x86_64" binary, then make sure that to load the appropriate .ko file based on the Linux Distrubution through the insmod command.

6) For the Non-standard Linux distrubutions/Customized kernel, use the sliff driver source files rpm (install the sliff driver source rpm to get the source files) and follow the below steps :
	a) Refer the steps #4 and #5


Windows OS :
------------

sliff driver for windows (.sys) is located in Windows/sdrv/win/sliff.sys

1. sliff driver is automatically loaded into system by the Windows niccli executable.
2. Make sure that you have Disabled driver signature enforcement or System has to be in Test mode (bcdedit /set testsigning on) to run the sliff driver.

NICCLI EXECUTION AND USAGE OF THE COMMANDS:
-------------------------------------------
1. Download the package from the Release Order and unzip it.
2. Run the ./niccli --list (Linux) or "niccli.exe --list" (Windows) command to list the devices in the system.
3. There are three modes of operation in the NICCLI

    a. Interactive Mode:
        To launch in interactive mode :
         <Scrutiny NIC CLI executable> [-i <index of the target>] |[-pcie <NIC pcie address>]

        After launching in interactive mode, execute 'help' command to
        display the list of available commands.

    b. Oneline Mode:
        To launch in Oneline mode :
         <Scrutiny NIC CLI executable> [-i <index of the target>] | [-pcie <NIC pcie address> <command>]
        To list available commands in Oneline mode :
         <Scrutiny NIC CLI executable> [-i <index of the target>] | [-pcie <NIC pcie address>] help
        Legacy Nic command syntax :
        To launch in Oneline mode :
         <Scrutiny NIC CLI executable> [-dev [<index of the target> | <mac address> | <NIC pcie address>]] <command>
        To list available commands in Oneline mode :
         <Scrutiny NIC CLI executable> [-dev [<index of the target> | <mac address> | <NIC pcie address>]] help


    c. Batch Mode:
        To launch in batch mode :
         <Scrutiny NIC CLI executable> [-i <index of the target>] | [-pcie <NIC pcie address>] --batch <batch file>

        NOTE: Batch mode requires flat text file with utility supported commands.
        Commands have to be provided in ascii format with the valid parameters.
        Supported commands can be listed using One-Line mode or Interactive mode
        Upon failure of any commands, utility will exit without continuing with other commands


    NOTE:
    ------

    1. '-eth' interface mode of communication is supported in future releases.
    2. '-dev' currently supports index, mac_addr & pci-bdf of the target. Eg : niccli -dev <index> <mac addr> <b:d:f> command.
    3. The pci address will be displayed as Domain:Bus:Device:Function.
    4. Niccli get the part number from the register space.
    5. Only applicable commands are listed for the Non-operational cards. Run help to see the supported commands.
    6. When the card is unidentified (PCI config space corrupt), user has to perform the 'install -rescue' twice. User should use the proper package file.
               - install -rescue <nvm-package.pkg>
               - install -rescue <firmware-package.pkg>
	       - make sure that you use exactly matching/appropriate package in rescue mode of install.

4. To see the list of supported commands, run the below command :
   ./niccli help


VMWare OS :
------------
1) Installation of the niccli:
   a) NICCLI is available as an executable binary for ESX70 OS and as a VIB package for ESX80 OS. To install the NICCLI VIB package user needs to run the command "esxcli software vib install -v <VIB_PACKAGE> --no-sig-check" command.

2) NICCLI does not depend on the sliff driver in VMWare OS. NICCLI interacts with the L2(bnxtnet) driver in order to communicate with the firmware.


FreeBSD OS :
------------
1. Download the niccli rpm from the SIT release under the niccli/FreeBSD folder. 
2. Before running the niccli executable or the script, make sure that bnxt_en/L2 driver and bnxt_mgmt driver is installed in the System
3. Only the niccli has the support for FreeBSD. niccli-f does not have support for the FreeBSD.


COMMANDS SUPPORTED ON LINUX:
----------------------------
	list                        - Lists all the compatible devices
	listdev                     - Lists all the compatible devices (Legacy syntax for NIC)
	list-eth                    - Lists all NIC devices with ethernet interface names
	version                     - Display the current version of the application
	pcidev                      - Generic PCI based display operation
	help                        - Lists the available commands
	quit                        - Quits from the application
	show                        - Shows NIC specific device information
	txfir                       - Network Interface Card Transmission Finite Impulse Response
	msixmv                      - Display and configure the number of MSIX max vectors values for VF's per each PF
	scan                        - Scan PCI devices in the topology
	idlecheck                   - Check the stability of hardware blocks for given type of  NIC
	pcie                        - Show/Execute pcie operation
	nvm                         - NVRAM Option Management
	backuppowercfg              - Backup Power Configuration
	resourcemgmt                - Query and Configure resources of the device
	pfalloc                     - Configure and Query for the number of PFs per PCIe endpoint
	rfd                         - Restores NVM configuration to factory defaults
	tsio                        - TSIO function capability on the pin
	vf                          - Configure and Query for a trusted VF
	dutycycle                   - Set duty cycle on TSIO outgoing signal
	dllsource                   - Set the DLL source for PHC
	coredump                    - Retrieves coredump data from device.
	reset                       - Reset the device
	synce                       - Configure the synchronous ethernet profile
	dscdump                     - Retrieves dscdump for device
	ptp                         - PTP extended parameters operation
        rxbufferpool                - Query and configure all the rx buffers. The shared option would
                                      assign all rx buffers to a shared buffer pool and would configure
                                      rx CoS queues belonging to all ports to use the shared buffer pool
        txpartitionrlmt             - Query and Configure the transmit side partition rate limit applies to traffic
                                      sent from a partition, which is one PF and all of its child VFs
        txportrlmt                  - Query and Configure the transmit side of port rate limit.
        rxportrlmt                  - Configure the receive side port rate limit.
        rxrlmt                      - Query the receive side rate control parameters.
        rxeprlmt                    - Configure the receive side rate control parameters for a given endpoint.
        txeprlmt                    - Query and Configure the PCIe endpoint transmit rate control.
        pfc                         - Configure the priority-based flow control on a given priority
        apptlv                      - Configure the priority for the AppTLV
        tcrlmt                      - Configure the rate limit for each traffic class.
        ets                         - Configure the enhanced transmission selection, priority to traffic class and bandwidths
        up2tc                       - Configure the user priorities to traffic classes
        getqos                      - Query the configured enhanced transmission selection, priority to traffic class and bandwidths
        listmap                     - List the priority to traffic class and queueid mapping
        dscp2prio                   - Query the dscp to priority mapping

	Legacy NVM commands :       - Query commands
	---------------------       - ---------------
	devid                       - Query Broadcom device ids.
	device_info                 - Query Broadcom device information and default hardware resources profile version.
	pkgver                      - Query firmware package version installed on the device.
	device_temperature          - Query the device temperature in Celsius.
	get_backup_power_config     - Query backup power configuration of the device.
	moduleinfo                  - Query the PHY module information.
	nvm_measurement             - Query the active NVM configuration.
	get_ptp_extended            - Query the PTP extended parameters.
	getoption                   - Query current NVM configuration option settings of a device.
	pcie_counters               - Display the pcie counters.
	saveoptions                 - Save NVM configuration options on the device to a file.
	get_sync_ethernet           - Get the synchronous ethernet frequency profile
	get_txfir                   - Query the TX FIR settings.
	cert_provision_state        - Query the imported certificate chain on the device.
	read                        - Read the NVM item data and write its contents to a file.
	mh_pf_alloc                 - Query the number of PFs per PCIe endpoint. This command is supported only on Thor devices.
	nvm-list                    - Display the NVM components and its associated version details.
	get_tsio_function_pin       - Query TSIO function capability on the pin.
								-
	Legacy NVM commands :       - Debug commands
	---------------------       - ---------------
	device_health_check         - Checks the device health.
	idle_check                  - Check the stability of hardware blocks.
	backup                      - Backup NVM contents to a file
								-
	Legacy NVM commands :       - Configuration commands
	---------------------       - ---------------
	reset_ap                    - Reset management processor.
	setoption                   - Configure NVM configuration option settings of a device.
	msix_max_vectors            - Configure the number of MSI-X max vectors per VF for each PF.
	loopback                    - Query/perform loopback config.
	add_ntuple_filter           - Add ntuple flow filter.
	free_ntuple_filter          - Free ntuple flow filter.
	cfgtunnel                   - query/config custom tunnel port/rss.
	query_tunnel_redirect       - query tunnel redirection for VF/tunnel type.
	add_tunnel_redirect         - Add tunnel redirection for VF/ tunnel type.
	del_tunnel_redirect         - Delete tunnel redirection for VF/ tunnel type.
	write                       - Create or overwrite NVM data item with a file.
	set_backup_power_config     - Set backup power configuration parameters of the device.
	set_txfir                   - Configures the TX FIR settings
	set_ptp_extended            - Set PTP extended parameters
	mh_pf_alloc                 - Configure the number of PFs per PCIe endpoint. This command is supported only on Thor devices
	restore_factory_defaults    - Restores NVM configuration to factory defaults
	duty_cycle                  - Set duty cycle on TSIO outgoing signal
	dll_source                  - Set the DLL source for PHC
	resmgmt                     - Query and Configure resources of the device.
								-
	Legacy NVM commands :       - FW update commands
	---------------------       - ---------------
	fw_sync                     - Synchronize primary & secondary FW images
	verify                      - Verify FW packages & NVM
	livepatch                   - Query, Activate and Deactivate the patch in live
	install                     - Install/Update FW

        Legacy QoS Rx commands :    - Rx Qos commands 
        ---------------------       - ---------------
        buffer_pool                 - The user can query and configure the rx buffer pool.
        rx_port_ratelimit           - The user can configure rx rate control that applies to all traffic in a rx CoS queue group.
        rx_endpoint_ratelimit       - The user can configure endpoint rx rate control that applies to all traffic in a rx CoS queue group.
        get_rx_ratelimits           - The user can query the rx rate limits.

        Legacy QoS Tx commands :    - Tx Qos commands 
        ---------------------       - ---------------
        partition_tx_ratelimit      - This command is used to configure partition tx rate limit.
        get_partition_tx_ratelimit  - This command is used to query the partition rate limit configuration for a given partition.
        get_tx_port_ratelimit       - This command is used to query the tx side of port rate limit.
        tx_port_ratelimit           - This command is used to configure the tx side of port rate limit
        tx_endpoint_ratelimit       - This command is used to configure PCIe endpoint tx rate limit.
        get_tx_endpoint_ratelimits  - This command is used to query the tx endpoint rate limits.

        Legacy DCB commands :       - Data Center Bridging commands 
        ---------------------       - ---------------
        set_pfc                     - This command is used to enable PFC on a given priority
        set_apptlv                  - This command is used to configure the priority of the AppTLV.
        ratelimit                   - This command is used to configure the rate limit for each traffic class.

COMMANDS SUPPORTED ON WINDOWS:
------------------------------


	Commands sets - Generic/Offline
	-------------------------------------------------------------------------------
	list                        - Lists all the compatible devices
	listdev                     - Lists all the compatible devices (Legacy syntax for NIC)
	list-eth                    - Lists all NIC devices with ethernet interface names
	version                     - Display the current version of the application
	pcidev                      - Generic PCI based display operation
	help                        - Lists the available commands
	quit                        - Quits from the application

	Commands for platform 'BCM574xx Performance NIC' and interface 'Direct PCIe'
	-------------------------------------------------------------------------------
	show                        - Shows NIC specific device information
	txfir                       - Network Interface Card Transmission Finite Impulse Response
	scan                        - Scan PCI devices in the topology
	idlecheck                   - Check the stability of hardware blocks for given type of  NIC
	pcie                        - Show/Execute pcie operation
	nvm                         - NVRAM Option Management
	backuppowercfg              - Backup Power Configuration
	resourcemgmt                - Query and Configure resources of the device
	tsio                        - TSIO function capability on the pin
	coredump                    - Retrieves coredump data from device.
	reset                       - Reset the device
	pcicfg                      - Pci config read/write operation
								-
	Legacy NVM commands :       - Query commands
	---------------------       - ---------------
	devid                       - Query Broadcom device ids.
	device_info                 - Query Broadcom device information and default hardware resources profile version.
	pkgver                      - Query firmware package version installed on the device.
	device_temperature          - Query the device temperature in Celsius.
	get_backup_power_config     - Query backup power configuration of the device.
	getoption                   - Query current NVM configuration option settings of a device.
	pcie_counters               - Display the pcie counters.
	saveoptions                 - Save NVM configuration options on the device to a file.
	cert_provision_state        - Query the imported certificate chain on the device.
	mh_pf_alloc                 - Query the number of PFs per PCIe endpoint. This command is supported only on Thor devices.
	read                        - Read the NVM item data and write its contents to a file.
	nvm-list                    - Display the NVM components and its associated version details.
								-
	Legacy NVM commands :       - Debug commands
	---------------------       - ---------------
	device_health_check         - Checks the device health.
	idle_check                  - Check the stability of hardware blocks.
	backup                      - Backup NVM contents to a file
								-
	Legacy NVM commands :       - Configuration commands
	---------------------       - ---------------
	reset_ap                    - Reset management processor.
	setoption                   - Configure NVM configuration option settings of a device.
	set_backup_power_config     - Set backup power configuration parameters of the device.
									This is applicable only for NX-S devices.
	set_ptp_extended            - Set PTP extended parameters
	mh_pf_alloc                 - Configure the number of PFs per PCIe endpoint. This command is supported only on Thor devices
	restore_factory_defaults    - Restores NVM configuration to factory defaults
	write                       - Create or overwrite NVM data item with a file.
	resmgmt                     - Query and Configure resources of the device.
								-
	Legacy NVM commands :       - FW update commands
	---------------------       - ---------------
	fw_sync                     - Synchronize primary & secondary FW images
	verify                      - Verify FW packages & NVM
	livepatch                   - Query, Activate and Deactivate the patch in live
	install                     - Install/Update FW

COMMANDS SUPPORTED ON VMWare:
------------------------------

	list                      - Lists all the compatible devices
	listdev                   - Lists all the compatible devices (NIC legacy syntax)
	devid                     - Query Broadcom device id's.
	pkgver                    - Display firmware package version installed on the device.
	nvm-list                  - Display the NVM components and its associated version details.
	list-eth                  - Lists all NIC devices with ethernet interface names
	version                   - Display the current version of the application
	help                      - Lists the available commands
	quit                      - Quits from the application
	show                      - Shows NIC specific device information
	txfir                     - Network Interface Card Transmission Finite
        	                  - Impulse Response
	idlecheck                 - Check the stability of hardware blocks for given type
        	                  - of NIC device.
	pcie                      - Show/Execute pcie operation
	nvm                       - NVRAM Option Management
	backuppowercfg            - Backup Power Configuration
	dllsource                 - Set the DLL source for PHC
	coredump                  - Retrieves coredump data from device.
	reset                     - Reset the device
	dscdump                   - Retrieves dscdump for device
                          
	Legacy NVM commands :     - Query commands
	---------------------     - ---------------
	device_info               - Query Broadcom device information and default hardware
        	                  - resources profile version.
	device_temperature        - Query the device temperature in Celsius.
	get_backup_power_config   - Query backup power configuration of the device.
	nvm_measurement           - Query the active NVM configuration.
	getoption                 - Query current NVM configuration option settings
        	                  - of a device.
	pcie_counters             - Display the pcie counters.
	saveoptions               - Save NVM configuration options on the device
        	                  - to a file.
	get_txfir                 - Query the TX FIR settings.
	cert_provision_state      - Query the imported certificate chain on the device.
	read                      - Read the NVM item data and write its contents to a file.
	mh_pf_alloc               - Query the number of PFs per PCIe endpoint.
	                          - This command is supported only on Thor devices.
	nvm-list                  - Display the NVM components and its associated version
	                          - details.
	get_tsio_function_pin     - Query TSIO function capability on the pin.

	Legacy NVM commands :     - Debug commands
	---------------------     - ---------------
	device_health_check       - Checks the device health.
	idle_check                - Check the stability of hardware blocks.
	backup                    - Backup NVM contents to a file
        	                  -
	Legacy NVM commands :     - Configuration commands
	---------------------     - ---------------
	setoption                 - Configure NVM configuration option settings
        	                  -  of a device.
	write                     - Create or overwrite NVM data item with a file.
	set_txfir                 - Configures the TX FIR settings
	mh_pf_alloc               - Configure the number of PFs per PCIe endpoint.
	                          - This command is supported only on Thor devices.
	restore_factory_defaults  - Restores NVM configuration to factory defaults
	resmgmt                   - Query and Configure resources of the device.
	                          -
	Legacy NVM commands :     - FW update commands
	---------------------     - ---------------
	fw_sync                   - Synchronize primary & secondary FW images
	verify                    - Verify FW packages & NVM
	livepatch                 - Query, Activate and Deactivate the patch in live
	install                   - Install/Update FW
	
	
COMMANDS SUPPORTED ON FreeBSD:
------------------------------

	list                      - Lists all the compatible devices
	select                    - Select a device from the discovered list
	listdev                   - Lists all the compatible devices (NIC legacy syntax)
	devid                     - Query Broadcom device id's.
	pkgver                    - Display firmware package version installed on the device.
	nvm-list                  - Display the NVM components and its associated version details.
	list-eth                  - Lists all NIC devices with ethernet interface names
	version                   - Display the current version of the application
	pcidev                    - Generic PCI based display operation
	coredump                  - Retrieves coredump data from device.
	help                      - Lists the available commands
	quit                      - Quits from the application
	show                      - Shows NIC specific device information
	txfir                     - Network Interface Card Transmission Finite
							  - Impulse Response
	scan                      - Scan PCI devices in the topology
	idlecheck                 - Check the stability of hardware blocks for given type
							  - of NIC device.
	pcie                      - Show/Execute pcie operation
	nvm                       - NVRAM Option Management
	pfalloc                   - Configure and Query for the number of PFs per PCIe
							  - endpoint
	rfd                       - Restores NVM configuration to factory defaults
	tsio                      - TSIO function capability on the pin
	reset                     - Reset the device
	dscdump                   - Retrieves dscdump for device
	ptp                       - PTP extended parameters operation
							  -
	Legacy NVM commands :     - Query commands
	---------------------     - ---------------
	device_info               - Query Broadcom device information and default hardware
							  - resources profile version.
	device_temperature        - Query the device temperature in Celsius.
	nvm_measurement           - Query the active NVM configuration.
	getoption                 - Query current NVM configuration option settings
							  - of a device.
	pcie_counters             - Display the pcie counters.
	saveoptions               - Save NVM configuration options on the device
							  - to a file.
	get_txfir                 - Query the TX FIR settings.
	cert_provision_state      - Query the imported certificate chain on the device.
	read                      - Read the NVM item data and write its contents to a file.
	mh_pf_alloc               - Query the number of PFs per PCIe endpoint.
							  - This command is supported only on Thor devices.
							  -
	Legacy NVM commands :     - Debug commands
	---------------------     - ---------------
	device_health_check       - Checks the device health.
	idle_check                - Check the stability of hardware blocks.
	backup                    - Backup NVM contents to a file
							  -
	Legacy NVM commands :     - Configuration commands
	---------------------     - ---------------
	reset_ap                  - Reset management processor.
	setoption                 - Configure NVM configuration option settings
							  -  of a device.
							  - VF for each PF.
	write                     - Create or overwrite NVM data item with a file.
	set_txfir                 - Configures the TX FIR settings
	mh_pf_alloc               - Configure the number of PFs per PCIe endpoint.
							  - This command is supported only on Thor devices.
	restore_factory_defaults  - Restores NVM configuration to factory defaults
	resmgmt                   - Query and Configure resources of the device.
							  -
	Legacy NVM commands :     - FW update commands
	---------------------     - ---------------
	fw_sync                   - Synchronize primary & secondary FW images
	verify                    - Verify FW packages & NVM
	livepatch                 - Query, Activate and Deactivate the patch in live
	install                   - Install/Update FW



EXAMPLE :
----------
1. # ./bin/niccli.x86_64 -i 1 help get_txfir

-------------------------------------------------------------------------------
Scrutiny NIC CLI v0.0.0.3 - Broadcom Inc. (c) 2021 (Bld-43.52.14.74.11.0)
-------------------------------------------------------------------------------

DESCRIPTION :
Queries the TX FIR settings.

SYNTAX :
niccli [-dev <index|mac|pci>] get_txfir -modtype <type> -lane <lane_number>
modtype : Modulation types of TX FIR. Supported values are 'NRZ' and 'PAM4'.
lane : MRS lane number.

MESSAGE : This command syntax will be deprecated in future.
Use new command syntax 'txfir' to get the details.

2. # ./bin/niccli.x86_64 -i 1 get_txfir -modtype PAM4 -lane 0

3.To test the prcatical use case scenario of recovery render the FW dysfunctional using following commands:

   bnxtnvm-debug -dev=ens4f0np0 setoption=enable_adapter_error_recovery#0
   bnxtnvm-debug -dev=ens4f0np0 setoption=error_injection_capability#1

   ./bin/niccli
   THOR  B0> fwcli crash null_ptr
   THOR  B0> install -recovery [-force] <fwfile.pkg>

4.Some NIC adapters does not support install -online as printed by the error message.

5.Some commands like add_ntuple_filter may fail, but they match the behavior of bnxtnvm.
  Such failures are due to firmware limitations.

6.Unless -all option is explicitly specified, resmgmt command works based on it's default mode
  (for a selected single PF or for all PFs/entire NIC device) which is printed when it's
  executed or it's help is displayed. -all option performs the given command/operation
  for all the PFs of the given NIC device.

-------------------------------------------------------------------------------
Scrutiny NIC CLI v0.0.0.3 - Broadcom Inc. (c) 2021 (Bld-43.52.14.74.11.0)
-------------------------------------------------------------------------------

Transmit Finite Impulse Response (TX FIR):
TX FIR V1 : 8716268
TX FIR V2 : 65520
TX FIR V3 : 0
TX FIR V4 : 0


KNOWN LIMITATIONS/ISSUES & USAGE GUIDELINES:
--------------------------------------------

    OTHERS:
    -------
    1. Command classification needs to done based on generic, debug and factory which is not in the current scope of the regular release.
    2. 'saveoptions' command output file includes all the legacy debug and generic commands.
    3. Currently, nic-cli framework does not support running multiple instances in parallel, sometimes it may lead to system crash and this scenario should be avoided.
    4. 
	  1) 'scrutiny.ini' file captures the logs for the scruitny library and to capture the logs for the CLI layer alone , user has to specify
          any of the following options in the cli command,

          A) niccli --verbose NULL <command>
             -  Prints the verbose logs on the console.

          B) niccli --debug NULL <command>
             - Prints the debug logs on the console.

          C) niccli --verbose file.txt <command>
             - Redirects the verbose logs into the file specified.

          D) nicli --debug file.txt <command>
             - Redirects the debug logs into the file specified.
	   
	   2) Running any niccli command with 'scrutiny.ini' file being present in the same directory as niccli executable, will affect the overall completion time
	      for the command. This is because debug logging will get enabled when 'scrutiny.ini' file is present. It is recommened to used only for debugging 
          purpose.
		  
    5. With the combination of THOR and other cards, we are seeing the communication going to a different
       PF, in that scenario please remove the device and perform the command operation. This is under scrutiny.
    6. Few commands are not supported on Windows due to the dependency of Ethtool, Curl library and Sysfs path.
       These commands will be enabled in the subsequent releases.
    7. A) bnxtnvm does not support -save option currently. And also setting some tunnel nvm options like ipv4ovxlan_udp_port  fail as firmware does not allow it.
        So, it's not recommended to test -save option with tunnel commands as of now.

       B) Current bnxtnvm add_tunnel_redirect command has a bug. When different VF was already configured and
         if we try to configure again with different tunnel type and VF, it always says VF0(fixed) was already
         configured even though what we previously configured is not always VF0.
    8. Command 'devid=<package file name>' is planned for future releases and it will be implemented through enhancement request.
       Hence current '-i <index number> devid' is supported. Once the ER is implemented, we will remove this statement from Readme file.
    9. In interactive mode if the card is not in operational state or corrupted, after the fastboot re-launch the application for the supported list of commands.
    10. From the application side we are enabling the NVM simplification in NICCLI build as FW has already delivered the changes.
        Application now will support only the NVM Options that is defined in FW 'nvm_option_table.h' header as application will directly consume the same from firmware.
        Testing with prior FW releases we may observe some of the NVM options may not be supported as those options are not explicitly is added in the auto generated NVM
        option header file.
    11. As part of NVM Simplification few observations are evident. They are.

        A) The 'getoption' (without any nvm option name) command output will be chip based. It will not display all the nvm options as specified in
           firmware generated nvm_option_table.h file.
        B) The 'setoption', 'getoption' and 'saveoptions' commands output will be specific for the selected NIC controller.
        C) The NVM options may be supported for the latest release firmware build which consumes the latest nvm_option_table header file. For older firmware, application will
           still get unsupported response from lower layer. Hence those will not be listed in supported command output in respective commands.

        Once the debug build is validated by all the stake holders, NICCLI will remove this limitations.

    12. Provided NICCLIF binary is not tested, and discussion are going on regarding BNXT-MT commands for windows.
    13. White space characters other than plain space like tab etc. are not supported as argument separators in the interactive mode.
    14. As of now Linux sliff driver is not signed. When kernel lockdown is enabled(Eg.by secure boot),  sliff.ko can't loaded.
                  Please disable kernel lockdown to load the driver module.
                  Eg. mokutil --disable-validation
                            [OR]
                         echo 1 > /proc/sys/kernel/sysrq
                         echo x > /proc/sysrq-trigger

    15. Interrupting/killing niccli during the middle of some operations may result in unknown/undefined/unexpected behavior.
    16. Performing some management plane operations in parallel while data path/plane and/or bnxt_en/bnxt_re module load/unload is in progress may result in
        HW errors and/or unknown/undefined/unexpected behavior.
    17. Uninstalling bnxtnvm removes the fastboot firmware files needed for recovery from the default path: /lib/firmware/diagfw/.
        In such case, install -recovery has to be used in conjunction with -f option to specify the fastboot file.
        Eg. install -recovery -f th_a_0x20000360_sbl.signed.crid0001.bin.fastboot BCM957504-P425D.pkg
    18. Fastboot firmware loaded by repaving/rescue/recovery path may cause HWRM errors(as seen in dmesg) from data path
        drivers like bnxt_en unless they are unloaded.
    19. Running niccli when the Traffic Control flow operations are executed in different terminal simultaneously may cause some of the HWRM request may get
        starved or black-holed. During this time, Bnxt_en driver displays the message similar to this "bnxt_en 0000:b1:00.0 ens45np0: Error (timeout: 2000015) msg {0x2da 0x5703} len:0" but bnxt_en driver recovers after some retries. As it is not a harmful message, it should be ignored.
    20. 'fwcli' command's help is generated by firmware and hence, tools have no control over it.
    21. For DCB commands i.e. pfc, apptlv, up2tc, getqos, ets, listmap, dscp2prio and tcrlmt to work, user has disable the following nvm options "lldp_nearest_bridge",
	"lldp_nearest_non_tpmr_bridge" and "dcbx_mode".
    22. In FreeBSD for DCB commands to work, user has to make sure logical link of the interface should be UP. This is BSD layer2 driver (if_bnxt.ko) limitation.
    23. When the niccli tool is peforming any operation and user removes the device in parallel, user can encounter an abnormal behavior in the tool output and
        system may sometime experience crash due to the non-availability of the PCIe BARs of removed device.
    24.After each individual command, bnxtmt framework executes following command sequence:
        "reset all;delay ms 1000;pci init"
       This sequence of operations should be performed either manually or by higher level bc.sh counter part script for nicclif.
       nicclif command like prbs_test may not exactly behave like bnxtmt command counter part.This is not the limitation/bug
       of individual nicclif command(s).
    25.Some commands may need fast boot & other initialization like fwutil before execution.
       This initialization sequence should be performed
       either manually or by higher level bc.sh counter part script for nicclif.
    26.Scrutiny compatible command: mem is counter part of legacy bnxtmt's reg command by default.


    VMWARE LIMITATIONS:
    -------------------
    1. In interactive mode, editing the command by moving the cursor using the left/right arrow will not work. The user has to re-issue the command.

Separate loggings makes the debugging easier for the developers.
Since it supports Storage, switch, expanders, NIC products through different ways of communication interfaces,
we cannot change the existing logging mechanism design/functionality alone for NIC.

2. This design is well approved by all architects.

NO COMMANDS ERs:
----------------

DCSG01091294 : Sliff Driver - Driver installation and check dmesg logs.
DCSG01091305 : Debug Log Open/close - scrutiny.ini file has to be copied to the same path of the NICCLI executable and check if the log files are generated.
