151
EZchip Technologies Ltd. EZchip Technologies Inc. 1 Hatamar Street, P.O. Box 527 900 E. Hamilton Ave, Suite 100 Yokneam 20692, Israel Campbell, CA 95008, USA Copyright © 2008 EZchip Technologies. All rights reserved. N N P P - - 3 3 N N P P s s l l R R e e f f e e r r e e n n c c e e M M a a n n u u a a l l NP-3 Network Processor Script Language Document Version 6.20 Document Number: 27-7888-02 The information contained is proprietary and confidential. Do not duplicate without permission.

EZchip NP-3 NPs Reference Manual Development/NP3... · 2011-01-10 · EZchip Technologies NP-3 NPsl Reference Manual Introduction Page 1-1 1. Introduction This document is designed

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

EZchip Technologies Ltd. EZchip Technologies Inc. 1 Hatamar Street, P.O. Box 527 900 E. Hamilton Ave, Suite 100 Yokneam 20692, Israel Campbell, CA 95008, USA Copyright © 2008 EZchip Technologies. All rights reserved.

NNPP--33 NNPPssll RReeffeerreennccee MMaannuuaall NP-3 Network Processor

Script Language Document Version 6.20

Document Number: 27-7888-02

The information contained is proprietary and confidential.

Do not duplicate without permission.

EZchip Technologies NP-3 NPsl Reference Manual

Preface 2

Preface ©2008 EZchip Technologies Ltd. EZchip is a registered trademark of EZchip Technologies Ltd. Brand and product names are trademarks or registered trademarks of their respective holders.

This document contains information proprietary to EZchip and may not be reproduced in any form without prior written consent from EZchip Technologies Ltd.

This document is provided on an “as is” basis. While the information contained herein is believed to be accurate, in no event will EZchip be liable for damages arising directly or indirectly from any use of the information contained in this document. All specifications are subject to change without notice.

EZchip Technologies Ltd. 1 Hatamar Street, PO Box 527, Yokneam 20692, Israel

EZchip Technologies Inc. 900 E. Hamilton Ave, Suite 100, Campbell, CA 95008, USA Email: [email protected], Web: www.ezchip.com

EZchip welcomes your comments on this publication. Please address them to: [email protected].

About this Manual This manual is intended for software developers who plan to develop microcode for EZchip's NP-3 Network Processors and Host Software for products using these network processors. This manual assumes that the reader is familiar with the EZchip network processors and EZdriver API routines.

The EZdriver Release Notes may contain information supplemental to this document.

Related Documents For additional information, refer to: EZdriver NP-3 API Reference Manual for the NP-3 Driver API routines. NP-3 Architecture and Instruction Set User Manual for NP-3 network processor functionality and its

instruction set. EZdesign Microcode Development Tools User Manual for the EZchip’s microcode development tools

such as EZmde, Structure Generator and Frame Generator.

This Document The following is a brief description of the contents of each section:

CHAPTER NAME DESCRIPTION

Section 1 Introduction This section provides a general overview of the NP Script Language. Section 2 NPsl Commands description of each of the NP Script Language commands and its arguments.

Commands are organized by their function.

Revision History

REVISION DATE DESCRIPTION OF MODIFICATION

6.20 Aug. 27, 2008 Relevant to EZdriver NP-3 API version 6.20b. No changes. 6.20 April 27, 2008 Relevant to EZdriver NP-3 API version 6.20a. 6.00 July 1, 2007 Initial release. Relevant to EZdriver NP-3 API version 6.00a.

EZchip Technologies NP-3 NPsl Reference Manual

Table of Contents 3

Contents Preface...................................................................................................................................................... 2 About this Manual.................................................................................................................................... 2 Related Documents .................................................................................................................................. 2 This Document ......................................................................................................................................... 2 Revision History....................................................................................................................................... 2

1. Introduction ........................................................................................................................1-1 1.1 Purpose of the NP Script Language.............................................................................................. 1-1 1.2 What is the NPsl.txt File?............................................................................................................. 1-1 1.3 Command Format......................................................................................................................... 1-2 1.4 Command Sequence and Mandatory Arguments ......................................................................... 1-3

2. NPsl Commads....................................................................................................................2-3 2.1 Functional Groups ........................................................................................................................ 2-3 2.2 Driver Commands ........................................................................................................................ 2-2

2.2.1 HMM Configuration........................................................................................................... 2-2 2.3 Channel Commands ..................................................................................................................... 2-4

2.3.1 Create Channel ................................................................................................................... 2-4 2.3.2 Channel Go....................................................................................................................... 2-10 2.3.3 Load Microcode................................................................................................................ 2-11 2.3.4 Initalize Memory Partition Command .............................................................................. 2-12 2.3.5 NP Configuration Commands .......................................................................................... 2-13

2.3.5.1 NPconfig - AGING ................................................................................................... 2-14 2.3.5.2 NPconfig - CONTROL_MEM.................................................................................. 2-15 2.3.5.3 NPconfig - DEBUG .................................................................................................. 2-17 2.3.5.4 NPconfig - ETHERNET_HW_DECODING_CONFIG ........................................... 2-18 2.3.5.5 NPconfig - EXTERNAL_CAM_CONFIG............................................................... 2-20 2.3.5.6 NPconfig - EXT_CAM_LTR_CONFIG................................................................... 2-22 2.3.5.7 NPconfig - FRAME_FLOW_ORDERING .............................................................. 2-23 2.3.5.8 NPconfig - HIGH_LEARN....................................................................................... 2-25 2.3.5.9 NPconfig - INDEX_Q............................................................................................... 2-26 2.3.5.10 NPconfig - METERING_COLOR_ENCODING ..................................................... 2-27 2.3.5.11 NPconfig - OAM_CONFIG...................................................................................... 2-28 2.3.5.12 NPconfig - REAL_TIME_COUNTER_CONFIG .................................................... 2-33 2.3.5.13 NPconfig - RFD_BUFFERS..................................................................................... 2-34 2.3.5.14 NPconfig - RFD_LIMITS......................................................................................... 2-35 2.3.5.15 NPconfig - SRH1_MSG_CTRL ............................................................................... 2-39 2.3.5.16 NPconfig - STAT_CNTRS ....................................................................................... 2-40 2.3.5.17 NPconfig - STAT_CONFIG ..................................................................................... 2-41 2.3.5.18 NPconfig - STAT_GROUP ...................................................................................... 2-42 2.3.5.19 NPconfig - STAT_OP............................................................................................... 2-43 2.3.5.20 NPconfig - STAT_SPECIAL_CNTRS..................................................................... 2-47 2.3.5.21 NPconfig - STAT_TB_PROFILE_CFG................................................................... 2-49 2.3.5.22 NPconfig - STAT_WATCHDOG_CNTRS.............................................................. 2-51 2.3.5.23 NPconfig - STAT_WATCHDOG_PROFILE_CFG................................................. 2-52 2.3.5.24 NPconfig - STAT_TBS............................................................................................. 2-54 2.3.5.25 NPconfig - TOP_MODIFY_CONFIG...................................................................... 2-55 2.3.5.26 NPconfig - TOP_PARSE_CONFIG ......................................................................... 2-56

2.4 Interface Commands................................................................................................................... 2-57 2.4.1 NP Configuration Commands .......................................................................................... 2-57

2.4.1.1 NPconfig - IF_OUT_OF_BAND_FC....................................................................... 2-57 2.4.1.2 NPconfig - IF_RGMII............................................................................................... 2-59 2.4.1.3 NPconfig - IF_RGMII_PHY_CONFIG.................................................................... 2-62

EZchip Technologies NP-3 NPsl Reference Manual

Table of Contents Page 4

2.4.1.4 NPconfig - IF_RGMII_PHY_REGISTER................................................................ 2-63 2.4.1.5 NPconfig - IF_RGMII_RATE_LIMIT ..................................................................... 2-64 2.4.1.6 NPconfig - IF_SPI_A and IF_SPI_B ........................................................................ 2-65 2.4.1.7 NPconfig - IF_TIMEOUT_PARAMS ...................................................................... 2-69 2.4.1.8 NPconfig - IF_XGMII .............................................................................................. 2-70 2.4.1.9 NPconfig - IF_XGMII_PHY_CONFIG.................................................................... 2-72 2.4.1.10 NPconfig - IF_XGMII_PHY_REGISTER ............................................................... 2-73

2.5 Traffic Manager Commands....................................................................................................... 2-74 2.5.1 TM Configuration Commands.......................................................................................... 2-74

2.5.1.1 TMconfig - ENTITY_PARAMS .............................................................................. 2-76 2.5.1.2 TMconfig - ENTITY_TOPOLOGY_PARAMS....................................................... 2-78 2.5.1.3 TMconfig - ADD_ENTITY_TOPOLOGY_PARAMS ............................................ 2-79 2.5.1.4 TMconfig - REMOVE_ENTITY_TOPOLOGY_PARAMS.................................... 2-80 2.5.1.5 TMconfig - FCU_PARAMS..................................................................................... 2-81 2.5.1.6 TMconfig - FCU_PROFILE ..................................................................................... 2-82 2.5.1.7 TMconfig - FCU_LIMIT .......................................................................................... 2-83 2.5.1.8 TMconfig - GENERAL_PARAMS .......................................................................... 2-84 2.5.1.9 TMconfig - IFG_PARAMS ...................................................................................... 2-86 2.5.1.10 TMconfig - PRIORITY_PARAMS .......................................................................... 2-87 2.5.1.11 TMconfig - SHAPING_PARAMS ........................................................................... 2-88 2.5.1.12 TMconfig - SHAPING_PROFILE............................................................................ 2-89 2.5.1.13 TMconfig - STATISTIC_PARAMS......................................................................... 2-90 2.5.1.14 TMconfig - STATISTIC_PARAMS_ADVANCED ................................................ 2-92 2.5.1.15 TMconfig - TOPOLOGY_PARAMS ....................................................................... 2-95 2.5.1.16 TMconfig - WFQ_PARAMS.................................................................................... 2-96 2.5.1.17 TMconfig - WFQ_PROFILE.................................................................................... 2-97 2.5.1.18 TMconfig - WRED_PARAMS................................................................................. 2-98 2.5.1.19 TMconfig - WRED_PROFILE ............................................................................... 2-101 2.5.1.20 TMconfig - WRED_SCALING_PROFILE............................................................ 2-104 2.5.1.21 TMconfig - L4_SERVICE_PROFILE.................................................................... 2-105 2.5.1.22 TMconfig - L3_USER_PARAMS .......................................................................... 2-107

2.6 Frame Commands..................................................................................................................... 2-110 2.6.1 Send Frame..................................................................................................................... 2-110

2.7 General Commands .................................................................................................................. 2-111 2.7.1 Write Memory Command............................................................................................... 2-111 2.7.2 Read Modify Write Memory Command......................................................................... 2-112 2.7.3 Write Register Command ............................................................................................... 2-113 2.7.4 Read, Modify and Write Register Command ................................................................. 2-114

2.8 Structure Commands ................................................................................................................ 2-115 2.8.1 Create Structure Command ............................................................................................ 2-115

2.8.1.1 Create a Statistics Structure .................................................................................... 2-117 2.8.1.2 Create a Direct Table Structure............................................................................... 2-117 2.8.1.3 Create a Hash Structure........................................................................................... 2-118 2.8.1.4 Create a Tree Structure ........................................................................................... 2-120 2.8.1.5 Create a FastIP Structure......................................................................................... 2-122 2.8.1.6 Create an External CAM Lookup Structure............................................................ 2-123 2.8.1.7 Create an External CAM Read Structure ................................................................ 2-123

2.8.2 Alias Structure Command .............................................................................................. 2-124 2.8.3 Build Tree Command ..................................................................................................... 2-125 2.8.4 Rebalance Tree Command.............................................................................................. 2-126 2.8.5 Add, Modify and Delete Entry Commands .................................................................... 2-127

2.8.5.1 Modifying a Standard Hash Entry .......................................................................... 2-129 2.8.5.2 Deleting a Standard Tree Entry............................................................................... 2-130 2.8.5.3 Adding a FastIP Entry............................................................................................. 2-130 2.8.5.4 Adding a Complex Entry ........................................................................................ 2-131 2.8.5.5 Adding a Hash Entry with High Learn Resources .................................................. 2-133

EZchip Technologies NP-3 NPsl Reference Manual

Table of Contents Page 5

2.9 NPsl-specific Commands ......................................................................................................... 2-137 2.9.1 EZmpc2 Commands ....................................................................................................... 2-137

2.9.1.1 EZmpc2 Configuration Command.......................................................................... 2-137 2.9.1.2 EZmpc2 Structure Configuration Command .......................................................... 2-139

2.9.2 Execution Commands..................................................................................................... 2-142 2.9.2.1 Run Script ............................................................................................................... 2-142 2.9.2.2 Run Bulk Script....................................................................................................... 2-143

Index............................................................................................................................................... 1

EZchip Technologies NP-3 NPsl Reference Manual

Introduction Page 1-1

1. Introduction

This document is designed to assist programmers in using the NP Script Language to edit and create initialization and configuration files, such as the NPsl.txt file, for the EZchip NP-3 network processor.

1.1 Purpose of the NP Script Language

The NP Script Language (NPsl) is used to create script files that assist in the initialization of the NP-3 network processor. The NPsl script files have textual representations of API calls and parameters for the Driver. Several of these script files may be combined to form the NPsl.txt file. This is a convenient tool for the configuration of the EZchip network processor, the loading of its microcode and initialization of its search structures without having to modify Host code on-the-fly. The NPsl.txt file can be used while debugging NP-3 microcode to initialize the network processor, prior to having written the actual Host software.

During the microcode debugging process on the EZmde station, the NPsl.txt script file is sent, via EZrunner, to EZware which mimics the Host. EZrunner parses each command and sends a bitstream to the Host. The Host translates this bitstream into API calls (using EZcmd2api library which is embedded in the agent library) and invokes each call.

After completion of the debugging process, this same script file may be run thorough the EZscr2c utility to convert it to C code with actual API calls. This may conveniently serve as the basis for the Host software that initializes the network processor.

The NPsl.txt file contains frequently used commands, however additional routines are available through the EZdriver API. Additional API commands are not provided in the scope of this document. (See the EZdriver API Reference Manual.)

1.2 What is the NPsl.txt File?

The NPsl.txt file is based on the NP Script Language and used with the EZdesign EZmde project to initialize and configure the NP-3 network processor.

The NPsl.txt file is a standard text file that may easily be edited by any editor to incorporate functionality that is supported by the network processor and Driver, but not available through the EZchip development tools and GUIs.

Section 2 provides a description of the NP Script Language commands to assist you in editing the NPsl.txt file. We suggest that it be used in conjunction with the EZdriver API Reference Manual.

EZchip Technologies NP-3 NPsl Reference Manual

Introduction Page 1-2

1.3 Command Format

The general format of operators is: operator_name ( [ argument1 [ , argument2 ]] );

Argument format: [argument_name = ]argument_value

All NPsl command tokens are case insensitive.

Variable Formats

Numeric– Decimal number (e.g. 314) or hexadecimal number begin with '0x' (e.g. 0x23B) where the type of argument is not specified, number prevails.

Hexadecimal bytestream – Beginning with '0h', any length (e.g. 0h00112233445566778899). When specifying a hexadecimal bytestream, the bytes are ordered from least significant to most significant (e.g. in the sample above, the least significant byte value is 0x00, the second byte value is 0x11 and the most significant byte value is 0x99).

String – String enclosed with " or ', e.g. "mainscript.txt" (see File Names below)

Boolean – {true,false}, {on,off}, {yes,no}

Enumerations – Values specific to an operation

Other – Type specific for some operators

Exceptions to the standard operators are InitPartition( ), NPconfig( ) and LoadMicroCode( ).

File Names

File names enclosed in quotations marks (“ “) or apostrophes (‘ ‘) may be inserted in NPsl file either: with the full path specified with the standard % syntax, e.g. “%EZdriverRoot%/NPcfg/cfg.txt” with a path relative to the file that is currently running.

Comment Format

Comments may be inserted in NPsl file in the standard format using either: # for a single line comment, or by enclosing your remarks within /* and */.

EZchip Technologies NP-3 NPsl Reference Manual

Introduction Page 2-3

1.4 Command Sequence and Mandatory Arguments

Any NPsl command can either appear once or several times in a file. Commands can appear in any order according to the validity of associated sequence of API calls in the Driver.

Unless specified otherwise, all arguments are optional and can be omitted (and are then assigned default values). Mandatory arguments are indicated as shown in Table 1-1. Some arguments are only mandatory for a particular case, such as when defining a tree structure and not a hash structure. Such dependencies are specified where relevant.

Table 1-1. Sample Format

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

channel The channel number. Unique ID of the network processor.

M EZchannelId uiChannelId

The “M” column indicates mandatory arguments. If not specifically indicated as mandatory, or one of the options below, the field is optional:

M Mandatory argument (M) Mandatory with dependencies, which are often listed C Filled in by EZchip Memory Partition Creator (EZmpc2) - Optional; will be assigned a default value

2. NPsl Commads

2.1 Functional Groups

The NPsl commands in this section are divided into these functional groups:

Driver Commands – for configuring the internal host memory manager page 2-2

Channel Commands – for opening and running channels (i.e. network proces-sors ), loading microcode and the memory partition to the network processor

page 2-4

Interface Commands – for configuring the NP-3’s external interfaces page 2-57

Traffic Manager Commands – for configuring the NP-3 embedded traffic managers

page 2-74

Frame Commands – for sending frames page 2-110

General Commands – for writing to registers and memory page 2-111

Search Structure Commands – for creating and defining search structures and their aliases as well as for creating, modifying and deleting entries in these search structures.

page 2-115

NPsl-specific Commands – for configuring EZmpc2 and running NPsl scripts. page 2-137

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-2

2.2 Driver Commands

The Driver commands include:

InitHmmConfig( ) page 2-2

2.2.1 HMM Configuration NPsl Command

InitHmmConfig( )

Description

This command configures the network processor’s internal Host Memory Management (HMM). Two modes are supported: automatic or manual.

API Routine

EZapiDriver_Init( )

API Command

EZapiDriver_InitCmd_SetHMMConfig

Example for automatic mode inithmmconfig( mode = auto, );

Example for manual mode inithmmconfig( mode = manual, number_of_fixed = 2, ( buf_size = 12 , number= 276569 ), ( buf_size = 8 , number= 162849 ), number_of_vary = 3, ( buf_size = 8 , number= 2158 ), ( buf_size = 16 , number= 137945 ), ( buf_size = 32 , number= 99666 ), );

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

mode HMM mode. Valid values are: “auto” - automatic configuration. “manual” - manual configuration. Default is manual.

EZapiDriver_HMMConfig eMode

number_of_fixed The number of fixed size buffer types. Relevant only in manual configuration. Format: Numeric.

(M) EZapiDriver_HMMConfig uiNumFixedBuffers

number_of_vary The number of variable size buffer types. Relevant only in manual configuration. Format: Numeric.

(M) EZapiDriver_HMMConfig uiNumVaryingBuffers

buf_size Specifies a buffer size to manage. For auto mode - irrelevant. For manual mode - a buf_size field should be specified for each fixed and varying buffer. Format: number, number.

(M) EZapiDriver_BufferCfg uiSize

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-3

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

number Specifies the number of buffers of size buf_size. For auto mode - irrelevant. For manual mode - a number field should be specified for each buf_size field.

(M) EZapiDriver_BufferCfg uiQuantity

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-4

2.3 Channel Commands

The Channel commands include:

CreateChannel( ) see page 2-4

GoChannel( ) see page 2-10

LoadMicroCode( ) see page 2-11

InitPartition( ) see page 2-12

2.3.1 Create Channel NPsl Command

CreateChannel( )

Description

Creates, initializes and configures the network processor channel.

API Routine

EZapiChannel_Create( )

Example CreateChannel(

Channel = 0x0, PCI_Base_Address=0x0030000, Chip_Type = NP-3, Chip_Mode = NP-3, Side_A_Interface_Type = XGMII, Side_A_Num_Sub_Interfaces_RX = 0x1, Side_A_Num_Sub_Interfaces_TX = 0x1, Side_B_Interface_Type = SPIB, Side_B_Num_Sub_Interfaces_RX = 0x8, Side_B_Num_Sub_Interfaces_TX = 0x8, TMa_Mode = Bypass, TMb_Mode = Bypass, Enable_Ext_CAM = FALSE, 72_Bit_Ext_CAM = FALSE, System_Clock_Frequency = 220, Enable_Host_RGMII_0 = FALSE, Enable_Host_RGMII_1 = FALSE, Dual_TM_Mode_Partition = 0x0, XGMII_Channelized_Mode = FALSE, Side_A_Num_Sub_Interfaces_RX_SPIB = 0x1, Side_A_Num_Sub_Interfaces_TX_SPIB = 0x1, Number_Of_Calls_Ready_To_Go = 0x1, Bst_Mask = Default, NP_Config_Mask = Default, Bst_Test_Mask = Default, Ext_Search_Mem_Type = DDR_II_16bit_1gb_CL4, Ext_Search_Mem_Size = 0x200, Ext_Search_Mem_Clock_Frequency = 0x10A, Ext_Search_Mem_Use_ECC = FALSE, TM_Frame_Mem_Type = DDR_II_16bit_1gb_CL4, TM_Frame_Mem_Size = 0x400, TM_Frame_Mem_Group_0_Active = TRUE, TM_Frame_Mem_Group_1_Active = TRUE, TM_Frame_Mem_Clock_Frequency = 0x10A, TM_Frame_Mem_Use_ECC = FALSE, TM_Control_Mem_Type = DDR_II_16bit_1gb_CL4, TM_Control_Mem_Size = 0x40,

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-5

TM_Control_Mem_Group_0_Active = TRUE, TM_Control_Mem_Group_1_Active = TRUE, TM_Control_Mem_Clock_Frequency = 0x10A, TM_Control_Mem_Use_ECC = FALSE, Statistic_Mem_Type = 1x18bit, Statistic_Mem_Size = 0x8, Statistic_Mem_Clock_Frequency = 0x10A, Statistic_Mem_Use_ECC = FALSE, Enable_Parity_Detection = FALSE Enable_64_End_2_End = FALSE

);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Channel Unique ID for the network processor. Format: Numeric.

M EZchannelId uiChannelId

PCI_Base_ Address

The PCI base address of the network-processor. If the PCI_Base_Address is not given, EZcmd2api (and EZscr2c) will use the default function for retrieving the PCI base address from the BSP. Format: Hexadecimal address.

- EZapiChannel_SystemConfig

uqPCIBase Address

Chip_Type The type/model of network processor. Valid values: "NP-3"

- EZapiChannel_SystemConfig

eChipType

Chip_Mode The mode of operation of the NP-3 network processor. Valid values: "NP-3".

- EZapiChannel_SystemConfig

eChipMode

Side_A_ Interface_Type

The interface type to use on Side A. Valid values: "SPIA", “SPIA_SPIB”, "XGMII", "RGMII", “None”.

- EZapiChannel_SystemConfig

eSideAInterface Type

Side_A_Num_ Sub_Interfaces_RX

The maximum number of ports/channels for receiving frames on Side A. Format: Numeric.

- EZapiChannel_SystemConfig

uqSideANum SubInterfacesRX

Side_A_Num_ Sub_Interfaces_TX

The maximum number of ports/channels for transmitting frames on Side A. For XGMII/RGMII interfaces, should be equal to uqSideANumSubInterfacesRX. Format: Numeric.

- EZapiChannel_SystemConfig

uqSideANum SubInterfacesTX

Side_B_ Interface_Type

The interface type to use on Side B of this channel. Valid values: "SPIA", "SPIB", "XGMII", "RGMII", “None”.

- EZapiChannel_SystemConfig

eSideBInterface Type

Side_B_Num_ Sub_Interfaces_RX

The maximum number of ports/channels for receiving frames on Side B. Format: Numeric.

- EZapiChannel_SystemConfig

uqSideBNum SubInterfacesRX

Side_B_Num_ Sub_Interfaces_TX

The maximum number of ports/channels for transmitting frames on Side B. For XGMII/RGMII interfaces, should be equal to uqSideBNumSubInterfacesRX. Format: Numeric.

- EZapiChannel_SystemConfig

uqSideBNum SubInterfacesTX

TMa_Mode The mode in which to use TMa. Valid values: "Bypass", “PartialBypass”, “SideA”.

- EZapiChannel_SystemConfig

eTMaMode

TMb_Mode The mode in which to use TMb. Valid values: "Bypass", "SideA", “SideB”, “Concatenated”, “Dual”.

- EZapiChannel_SystemConfig

eTMbMode

Enable_Ext_CAM Enable the External CAM interface. Format: Boolean.

- EZapiChannel_ SystemConfig

bEnableExtCAM

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-6

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

72_Bit_Ext_CAM Enable the external TCAM 72-bit bus interface. Format: Boolean.

- EZapiChannel_ SystemConfig

b72BitExtCAM

System_Clock_ Frequency

System clock frequency in MHz. Format: Numeric.

- EZapiChannel_ SystemConfig

uqSystemClock Frequency

Enable_Host_RGMII_0

Enable the first host RGMII port. Format: Boolean.

- EZapiChannel_ SystemConfig

bEnableHostRGMII0

Enable_Host_RGMII_1

Enable the second host RGMII port. Format: Boolean.

- EZapiChannel_ SystemConfig

bEnableHostRGMII1

Dual_TM_Mode_ Partition

The number of ports/channels that TMa transmits to (out of the number of Side-A SPI TX channels/RGMII ports). All other ports/channels are transmitted to by TMb. Relevant only when TMb mode is Dual. Format: Numeric.

- EZapiChannel_SystemConfig

uqDualTMMode Partition

XGMII_Channelized_Mode

Enable sending frames to ports 0-31 when XGMII is on Side-B and TMb is after the TOPs. All frames will physically be sent to port 0 (aggregated by TMb to port 0). Format: Boolean.

- EZapiChannel_SystemConfig

bXGMIIChannelizedMode

Side_A_Num_Sub_ Interfaces_RX_SPIB

The maximum number of ports/channels for receiving frames on Side A for SPIB when interface type at Side A is SPIA and SPIB, otherwise it is not relevant. Format: Numeric.

- EZapiChannel_SystemConfig

uqSideANumSub InterfacesRXSPIB

Side_A_Num_Sub_ Interfaces_TX_SPIB

The maximum number of ports/channels for transmitting frames on Side A for SPIB when interface type at Side A is SPIA and SPIB, otherwise it is not relevant. Format: Numeric.

- EZapiChannel_SystemConfig

uqSideANumSub InterfacesTXSPIB

Number_Of_Calls_ Ready_To_Go

Number of calls to the EZapiChannel_ReadyToGo( ) API routine required before the call to the EZapiChannel_Go( ) API routine. Format: Numeric.

- EZapiChannel_ InitParams

uqNumberOfCalls ReadyToGo

Bst_Mask Mask of blocks on which to perform Built-In Self Tests during the channel initialization sequence. Format: Numeric or “Default” to use Driver’s internal default value. Default value is “Default”.

- EZapiChannel_ InitParams

uqBstMask

Bst_Test_Mask Mask of blocks on which to perform Built-In Self Tests during the channel initialization sequence. Format: Numeric or “Default” to use Driver’s internal default value. Default value is “Default”.

- EZapiChannel_ InitParams

uqBstTestMask

NP_Config_Mask Mask controlling default configurations performed during the channel initialization sequence. Format: Numeric or “Default” to use Driver’s internal default value. Default value is “Default”.

- EZapiChannel_ InitParams

uqNPConfigMask

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-7

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Ext_Search_Mem_ Type

The type of the external search memory. Valid values are: "Inactive", “RLDRAM_II_18bit_288mb”, “RLDRAM_II_18bit_576mb”, “RLDRAM_II_18bit_576mb_25E”, “RLDRAM_II_36bit_288mb”, “RLDRAM_II_36bit_576mb”, “RLDRAM_II_36bit_576mb_25E”, “DDR_II_8bit_256mb_CL3”, “DDR_II_8bit_256mb_CL4”, “DDR_II_8bit_256mb_CL5", “DDR_II_8bit_512mb_CL3”, “DDR_II_8bit_512mb_CL4”, “DDR_II_8bit_512mb_CL5", “DDR_II_8bit_1gb_CL3”, “DDR_II_8bit_1gb_CL4”, “DDR_II_8bit_1gb_CL5”, “DDR_II_16bit_256mb_CL3”, “DDR_II_16bit_256mb_CL4”, “DDR_II_16bit_256mb_CL5”, “DDR_II_16bit_512mb_CL3”, “DDR_II_16bit_512mb_CL4”, “DDR_II_16bit_512mb_CL5”, “DDR_II_16bit_1gb_CL3”, “DDR_II_16bit_1gb_CL4”, “DDR_II_16bit_1gb_CL5”

- EZapiChannel_ ExtMemConfig

eExtSearchMemType

Ext_Search_Mem_ Size

The size of the external search memory in MBs. Format: Numeric.

- EZapiChannel_ ExtMemConfig

uqExtSearchMem Size

Ext_Search_Mem_ Clock_Frequency

The frequency of the external search memory clock in MHz. Format: Numeric.

- EZapiChannel_ ExtMemConfig

uqExtSearchMem ClockFrequency

Ext_Search_Mem_ Use_ECC

Indicates if ECC should be activated on the external search memory. Format: Boolean.

- EZapiChannel_ ExtMemConfig

bExtSearchMemUseECC

TM_Frame_Mem_ Type

The type of the external TM frame memory.Valid values are: "Inactive", “RLDRAM_II_18bit_288mb”, “RLDRAM_II_18bit_576mb”, “RLDRAM_II_18bit_576mb_25E”, “RLDRAM_II_36bit_288mb”, “RLDRAM_II_36bit_576mb”, “RLDRAM_II_36bit_576mb_25E”, “DDR_II_8bit_256mb_CL3”, “DDR_II_8bit_256mb_CL4”, “DDR_II_8bit_256mb_CL5", “DDR_II_8bit_512mb_CL3”, “DDR_II_8bit_512mb_CL4”, “DDR_II_8bit_512mb_CL5", “DDR_II_8bit_1gb_CL3”, “DDR_II_8bit_1gb_CL4”, “DDR_II_8bit_1gb_CL5”, “DDR_II_16bit_256mb_CL3”, “DDR_II_16bit_256mb_CL4”, “DDR_II_16bit_256mb_CL5”, “DDR_II_16bit_512mb_CL3”, “DDR_II_16bit_512mb_CL4”, “DDR_II_16bit_512mb_CL5”, “DDR_II_16bit_1gb_CL3”,

- EZapiChannel_ ExtMemConfig

eTMFrameMemType

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-8

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

“DDR_II_16bit_1gb_CL4”, “DDR_II_16bit_1gb_CL5”

TM_Frame_Mem_ Size

The size of the external TM frame memory in MBs. Format: Numeric.

- EZapiChannel_ ExtMemConfig

uqTMFrameMemSize

TM_Frame_Mem_ Group_0_Active

Indicates if group 0 of the external TM frame memory is active. Format: Boolean.

- EZapiChannel_ ExtMemConfig

bTMFrameMem Group0Active

TM_Frame_Mem_ Group_1_Active

Indicates if group 1 of the external TM frame memory is active. Format: Boolean.

- EZapiChannel_ ExtMemConfig

bTMFrameMem Group1Active

TM_Frame_Mem_ Clock_Frequency

The frequency of the external TM frame memory clock in MHz. Format: Numeric.

- EZapiChannel_ ExtMemConfig

uqTMFrameMem ClockFrequency

TM_Frame_Mem_ Use_ECC

Indicates if ECC should be activated on the external TM frame memory. Format: Boolean.

- EZapiChannel_ ExtMemConfig

bTMFrameMemUse ECC

TM_Control_Mem_ Type

The type of the external TM control memory. Valid values are: "Inactive", “RLDRAM_II_18bit_288mb”, “RLDRAM_II_18bit_576mb”, “RLDRAM_II_18bit_576mb_25E”, “RLDRAM_II_36bit_288mb”, “RLDRAM_II_36bit_576mb”, “RLDRAM_II_36bit_576mb_25E”, “DDR_II_8bit_256mb_CL3”, “DDR_II_8bit_256mb_CL4”, "DDR_II_8bit_256mb_CL5", “DDR_II_8bit_512mb_CL3”, “DDR_II_8bit_512mb_CL4”, "DDR_II_8bit_512mb_CL5", “DDR_II_8bit_1gb_CL3”, “DDR_II_8bit_1gb_CL4”, “DDR_II_8bit_1gb_CL5”, “DDR_II_16bit_256mb_CL3”, “DDR_II_16bit_256mb_CL4”, “DDR_II_16bit_256mb_CL5”, “DDR_II_16bit_512mb_CL3”, “DDR_II_16bit_512mb_CL4”, “DDR_II_16bit_512mb_CL5”, “DDR_II_16bit_1gb_CL3”, “DDR_II_16bit_1gb_CL4”, "“DDR_II_16bit_1gb_CL5”

- EZapiChannel_ ExtMemConfig

eTMControlMem Type

TM_Control_Mem_ Size

The size of the external TM control memory in MBs. Format: Numeric.

- EZapiChannel_ ExtMemConfig

uqTMControlMem Size

TM_Control_Mem_ Group_0_Active

Indicates if group 0 of the external TM control memory is active. Format: Boolean.

- EZapiChannel_ ExtMemConfig

bTMControlMem Group0Active

TM_Control_Mem_ Group_1_Active

Indicates if group 1 of the external TM control memory is active. Format: Boolean.

- EZapiChannel_ ExtMemConfig

bTMControlMem Group1Active

TM_Control_Mem_ Clock_Frequency

The frequency of the external TM control memory clock in MHz. Format: Numeric.

- EZapiChannel_ ExtMemConfig

uqTMControlMem ClockFrequency

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-9

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

TM_Control_Mem_ Use_ECC

Indicates if ECC should be activated on the external TM control memory. Format: Boolean.

- EZapiChannel_ ExtMemConfig

bTMControlMemUseECC

Statistic_Mem_Type The type of the external statistic memory. Valid values are: “2x9bit”, “2x9bit_1x6bit”, ”1x18bit”, ”1x18bit_1x6bit”, "Inactive".

- EZapiChannel_ ExtMemConfig

eStatisticMemType

Statistic_Mem_Size The size of the external statistic memory in mega short counters. Format: Numeric.

- EZapiChannel_ ExtMemConfig

uqStatisticMemSize

Statistic_Mem_Clock_Frequency

The frequency of the external statistic memory clock in MHz. Format: Numeric.

- EZapiChannel_ ExtMemConfig

uqStatisticMemClockFrequency

Statistic_Mem_Use_ECC

Indicates if ECC should be activated on the external statistic memory. Format: Boolean.

- EZapiChannel_ ExtMemConfig

bStatisticMemUse ECC

Enable_Parity_ Detection

Enable/disable use of parity error detection mechanism. Cannot be enabled with extended profile and/or ECC. Format: Boolean.

- EZapiChannel_ ExtMemConfig

bEnableParity Detection

Enable_64_End_2_ End

Enable 64 end-to-end flow control support. Format: Boolean.

- EZapiChannel_AdvancedCreateParams

bEnable64End2End

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-10

2.3.2 Channel Go NPsl Command

GoChannel( )

Description

Starts the network processor running, which enables frames to be received from and sent to the ports and the switching fabric.

API Routine

EZapiChannel_Go( )

Example gochannel( channel = 0 );

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

channel The channel number. Format: Numeric.

M EZchannelId uiChannelId

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-11

2.3.3 Load Microcode NPsl Command

LoadMicroCode( )

Description

Downloads the microcode to the network processor’s embedded Task Optimized Processors (TOPs).

API Routine

EZapiChannel_Init( )

API Command

EZapiChannel_InitCmd_LoadCode

Example loadmicrocode( channel = 0, parse = "Parse.obj", search = "Search.obj", resolve = "Resolve.obj", modify = "Modify.obj" );

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Channel The channel number. Format: String.

M EZchannelId uiChannelId

Parse The file name of the compiled TOPparse assembler code. Format: String.

M

Search The file name of the compiled TOPsearch assembler code. Format: String.

-

Resolve The file name of the compiled TOPresolve assembler code. Format: String.

M

Modify The file name of the compiled TOPmodify assembler code. Format: String.

M

These arguments are used to create the software suite bytestream passed to the EZapiChannel_InitCmd_LoadCode command.

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-12

2.3.4 Initalize Memory Partition Command NPsl Command

InitPartition( )

Description

Configures and loads the memory partition to the TOPsearch memory cores.

The memory partition structure is highly complex and, therefore, not included in this document. A tool is supplied to generate the partition, which should not be modified in the NPsl script.

API Routine

EZapiChannel_Init( )

API Command

EZapiChannel_InitCmd_InitMemoryPartition

Example InitPartition( channel = 0, "partition.txt" # String specifying the file name that contains # the partition configuration. ); or InitPartition( channel = 0, BEGIN_MEMORY_PARTITION

... END_MEMORY_PARTITION );

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

channel The channel number. EZchannelId uiChannelId ... Unpublished Unpublished Unpublished

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-13

2.3.5 NP Configuration Commands NPsl Command

NPconfig( )

Description

Configures the network processor. The NPconfig commands in this section are organized alphabetically, however each block should be written according to the initialization sequence.

The only mandatory NPconfig argument is “channel = ”. All other NPconfig arguments are optional. Those not specified will maintain their current setting in the Driver. If they have not been specified previously, they are assigned the default initialization value by the Driver.

API Routine

EZapiChannel_Init( )

Example npconfig ( channel = 0, "cfg.txt" # String specifying the file name that contains the network # processor configuration. ); or npconfig ( channel = 0, [ BEGIN_NAME_OF_CONFIG_BLOCK [argument = argument_value] END ] );

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

channel The channel number. Format: Numeric.

M

cfg.txt String specifying the file name that contains the network processor configuration. Format: String.

-

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-14

2.3.5.1 NPconfig - AGING

Description

Configures the aging mechanism.

API Routine

EZapiChannel_Config( )

API Command

EZapiChannel_ConfigCmd_SetAging

Example NPconfig( channel = 0, BEGIN_AGING Resolution = 0x400 Aging_Machine = 0 Enable = true Period = 0x400 Skip_Aging = 0x0 Relative_Weight = 0x1 Line_Interval = 0x0 Aging_Machine = 1 Enable = false Aging_Machine = 2 Enable = false Aging_Machine = 3 Enable = false Aging_Machine = 4 Enable = false END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Resolution Aging time resolution (in system clocks). This value is identical for all aging machines, and defines the aging period time units. Format: Numeric.

EZapiChannel_AgingConfig

uqResolution

Aging_Machine Array of machine-specific configurations for each aging machine. Format: Numeric.

EZapiChannel_AgingConfig

asAgingMachines

Enable Enable/disable this aging/compression machine. Format: Boolean.

EZapiChannel_AgingMachine

bEnable

Period Number of time units between two successive aging/compression cycles by this machine.

Each time unit is: system_clock * aging_resolution.

Format: Numeric.

EZapiChannel_AgingMachine

uqPeriod

Skip_Aging Number of cycles which perform only compression (without aging entries) between each 2 full cycles (aging and compression). Format: Numeric.

EZapiChannel_AgingMachine

uqSkipAging

Relative_Weight The relative weight of this aging machine. 0 specifies absolute priority over all other non-zero weights. Format: Numeric.

EZapiChannel_AgingMachine

uqRelativeWeight

Line_Interval The time (in system clocks) between processing of two successive hash lines by this machine. Format: Numeric.

EZapiChannel_AgingMachine

uqLineInterval

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-15

2.3.5.2 NPconfig - CONTROL_MEM

Description

Configures the NP-3 control memory, which stores the queues that hold frame descriptors for frames entering and/or leaving the NP-3’s TOPs (e.g. the ICFD, ECFD, ETFD and output queues).

API Routine

EZapiChannel_Init( )

API Command

EZapiChannel_InitCmd_SetControlMemory

Example NPconfig( channel = 0, BEGIN_CONTROL_MEM ICFD_Entries = 0x100 ECFD_Entries = 0x100 OQ_Entries = 0x1F4 ETFD_Entries = 0x129 HTFD_Low_Entries = 0x5A HTFD_High_Entries = 0x5A ICFD_Budget_Indication = 0xFA ECFD_Budget_Indication = 0xFA OQ_Budget_Indication = 0x1EF ETFD_Per_Port_Budget_Indication = 0x11D END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

ICFD_Entries Number of entries in the ICFD queue. Format: Numeric.

EZapiChannel_CtrlMemQueues

uqICFDEntries

ECFD_Entries Number of entries in the ECFD queue. Format: Numeric.

EZapiChannel_CtrlMemQueues

uqECFDEntries

OQ_Entries Number of entries in the output queue. Format: Numeric.

EZapiChannel_CtrlMemQueues

uqOQEntries

ETFD_Entries Number of entries in the ETFD queue. Format: Numeric.

EZapiChannel_CtrlMemQueues

uqETFDEntries

HTFD_Low_Entries Number of entries in the HTFD low priority queue. Format: Numeric.

EZapiChannel_CtrlMemQueues

uqHTFDLowEntries

HTFD_High_Entries Number of entries in the HTFD high priority queue. Format: Numeric.

EZapiChannel_CtrlMemQueues

uqHTFDHighEntries

ICFD_Budget_Indication Number of entries that may be used in the ICFD queue before an indication to TOPparse and TOPresolve is generated. Format: Numeric.

EZapiChannel_CtrlMemQueues

uqICFDBudgetIndication

ECFD_Budget_Indication Number of entries that may be used in the ECFD queue before an indication to TOPparse and TOPresolve is generated. Format: Numeric.

EZapiChannel_CtrlMemQueues

uqECFDBudgetIndication

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-16

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

OQ_Budget_Indication Number of entries that may be used in the output queue before an indication to TOPmodify and TOPresolve is generated. Format: Numeric.

EZapiChannel_CtrlMemQueues

uqOQBudgetIndication

ETFD_Per_Port_Budget_ Indication

Number of entries that may be used in the ETFD queue by each port before an indication to TOPmodify is generated. Format: Numeric.

EZapiChannel_CtrlMemQueues

uqETFDPerPortBudget Indication

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-17

2.3.5.3 NPconfig - DEBUG

Description

Configures parameters relating to the debugging of the NP-3’s TOPs.

API Routine

EZapiChannel_Init( )

API Command

EZapiChannel_InitCmd_SetDebuggerParams

Example NPconfig( channel = 0, BEGIN_DEBUG Is_Debug_Mode = FALSE Num_Of_Parse_Engs = 0x8 Num_Of_Search_1_Engs = 0x10 Num_Of_Resolve_Engs = 0x8 Num_Of_Search_2_Engs = 0x2 Num_Of_Modify_Engs = 0x8 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Is_Debug_Mode Specify if TOPs are configured for Debug Mode. (Only the even-numbered TOP engines are operational to receive results.) Format: Boolean.

EZapiChannel_ DebuggerParams

bIsDebugMode

Num_Of_Parse_Engs Number of TOPparse engines. Format: Numeric.

EZapiChannel_ DebuggerParams

uiNumOfParseEngs

Num_Of_Search_1_Engs Number of TOPsearch I engines. Format: Numeric.

EZapiChannel_ DebuggerParams

uiNumOfSearch1Engs

Num_Of_Resolve_Engs Number of TOPresolve engines. Format: Numeric.

EZapiChannel_ DebuggerParams

uiNumOfResolveEngs

Num_Of_Search_2_Engs Number of TOPsearch II engines. Format: Numeric.

EZapiChannel_ DebuggerParams

uiNumOfSearch2Engs

Num_Of_Modify_Engs Number of TOPmodify engines. Format: Numeric.

EZapiChannel_ DebuggerParams

uiNumOfModifyEngs

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-18

2.3.5.4 NPconfig - ETHERNET_HW_DECODING_CONFIG

Description

Configures parameters that affect the network processor's Ethernet HW decoding.

API Routine

EZapiChannel_Config( )

API Command

EZapiChannel_ConfigCmd_SetEthernetHWDecodingConfig

Example NPconfig( channel = 0, BEGIN_ETHERNET_HW_DECODING_CONFIG Enable_8100 = TRUE Enable_9100 = FALSE Enable_88a8 = TRUE Enable_User_Defined_VLAN = TRUE User_Defined_VLAN = 0x64 Enable_CFI = FALSE MAC_Address = 0h000000000000 MAC_Address_Mask = 0x3 Mac_In_Mac = 0x14 Mcode_User_Defined_VLAN_1 = 0x20 Mcode_User_Defined_VLAN_2 = 0x20 Mcode_User_Defined_VLAN_3 = 0x20 Mcode_User_Defined_VLAN_4 = 0x20 Mcode_VLAN_Storage_Mode = ID_CFI_Prio Mcode_User_Defined_MAC_Address_1 = 0h000000000000 Mcode_User_Defined_MAC_Address_2 = 0h000000000000 Mcode_User_Defined_MAC_Address_3 = 0h000000000000 Mcode_User_Defined_MAC_Address_4 = 0h000000000000 Mcode_High_MAC_Address = 0h000000000000 Mcode_Low_MAC_Address = 0h000000000000 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Enable_8100 If TRUE, decoding of VLAN protocol ID 0x8100 is enabled. Format: Boolean.

EZapiChannel_Ethernet HWDecodingConfig

bEnable8100

Enable_9100 If TRUE, decoding of VLAN protocol ID 0x9100 is enabled. Format: Boolean.

EZapiChannel_Ethernet HWDecodingConfig

bEnable9100

Enable_88a8 If TRUE, decoding of VLAN protocol ID 0x88a8 is enabled. Format: Numeric.

EZapiChannel_Ethernet HWDecodingConfig

bEnable88a8

Enable_User_Defined_VLAN

If TRUE, decoding of user defined VLAN protocol ID (User_Defined_VLAN) is enabled. NOTE: Protocol must be with TCI size 2 bytes. Format: Boolean

EZapiChannel_Ethernet HWDecodingConfig

bEnableUser DefinedVLAN

User_Defined_VLAN User-defined VLAN protocol ID. Format: Numeric.

EZapiChannel_Ethernet HWDecodingConfig

uqUserDefined VLAN

Enable_CFI If TRUE, CFI bits are also decoded (appended to priority bits of each VLAN). Format: Boolean

EZapiChannel_Ethernet HWDecodingConfig

bEnableCFI

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-19

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

MAC_Address Destination MAC address to find. Bytes 0-5 contain octets 1-6 accordingly. Bytes 6-7 should be set to 0. Format: Bytestream with 8 bytes.

EZapiChannel_Ethernet HWDecodingConfig

aucMACAddress

MAC_Address_Mask Number of least significant bits to be masked. Format: Numeric.

EZapiChannel_Ethernet HWDecodingConfig

uqMACAddress Mask

Mac_In_Mac MAC in MAC protocol ID to find. Format: Numeric.

EZapiChannel_Ethernet HWDecodingConfig

uqMacInMac

Mcode_User_Defined_VLAN_1

User-defined VLAN protocol ID. Format: Numeric.

EZapiChannel_Ethernet HWDecodingConfig

uqMcodeUser DefinedVLAN1

Mcode_User_Defined_VLAN_2

User-defined VLAN protocol ID. Format: Numeric.

EZapiChannel_Ethernet HWDecodingConfig

uqMcodeUser DefinedVLAN2

Mcode_User_Defined_VLAN_3

User-defined VLAN protocol ID. Format: Numeric.

EZapiChannel_Ethernet HWDecodingConfig

uqMcodeUser DefinedVLAN3

Mcode_User_Defined_VLAN_4

User-defined VLAN protocol ID. Format: Numeric.

EZapiChannel_Ethernet HWDecodingConfig

uqMcodeUser DefinedVLAN4

Mcode_VLAN_Storage_Mode

Configures the mode for storing the VLAN TAG in the protocol decoder in case of MAC protocol into OREG4 and OREG5. Valid values: "ID_CFI_Prio","ID_CFI", "ID", "Prio_CFI".

EZapiChannel_Ethernet HWDecodingConfig

eMcodeVLANStorageMode

MCode_User_Defined_MAC_Address_1

Destination MAC address to find. Bytes 0-5 contain octets 1-6 accordingly. Bytes 6-7 should be set to 0. Format: Bytestream

EZapiChannel_Ethernet HWDecodingConfig

aucMCodeUser DefinedMAC Address1

MCode_User_Defined_MAC_Address_2

Destination MAC address to find. Bytes 0-5 contain octets 1-6 accordingly. Bytes 6-7 should be set to 0. Format: Bytestream

EZapiChannel_Ethernet HWDecodingConfig

aucMCodeUser DefinedMAC Address2

MCode_User_Defined_MAC_Address_3

Destination MAC address to find. Bytes 0-5 contain octets 1-6 accordingly. Bytes 6-7 should be set to 0. Format: Bytestream

EZapiChannel_Ethernet HWDecodingConfig

aucMCodeUser DefinedMAC Address3

MCode_User_Defined_MAC_Address_4

Destination MAC address to find. Bytes 0-5 contain octets 1-6 accordingly. Bytes 6-7 should be set to 0. Format: Bytestream

EZapiChannel_Ethernet HWDecodingConfig

aucMCodeUser DefinedMAC Address4

MCode_High_MAC_ Address

Destination MAC address to find, higher limit. Bytes 0-5 contain octets 1-6 accordingly. Bytes 6-7 should be set to 0. Format: Bytestream

EZapiChannel_Ethernet HWDecodingConfig

aucMCodeHigh MACAddress

MCode_Low_MAC_ Address

Destination MAC address to find, lower limit. Bytes 0-5 contain octets 1-6 accordingly. Bytes 6-7 should be set to 0. Format: Bytestream

EZapiChannel_Ethernet HWDecodingConfig

aucMCodeLowMACAddress

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-20

2.3.5.5 NPconfig - EXTERNAL_CAM_CONFIG

Description

Configures the external CAM interface.

API Routine

EZapiChannel_Init( )

API Command

EZapiChannel_InitCmd_SetExtCAMConfig

Example NPconfig( channel = 0, BEGIN_EXTERNAL_CAM_CONFIG Model = CYPRESS_AYAMA_20000

Use_Result_Interrupt = TRUE Result_Mode = IMPLICIT_MISS Implicit_Miss_Value = 0x0 FIFO_Empty_Value = 0x0 Read_Latency = 16

Latency_Index = 0 Latency_Value = 0xFF Latency_Index = 1 Latency_Value = 0xFF Latency_Index = 2

Latency_Value = 0xFF Latency_Index = 3 Latency_Value = 0xFF Latency_Index = 4 Latency_Value = 0xFF Latency_Index = 5 Latency_Value = 0xFF Latency_Index = 6 Latency_Value = 0xFF Latency_Index = 7 Latency_Value = 0xFF END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Model Defines the model of the External CAM used. Valid values: “CYPRESS_AYAMA_20000” "NETLOGIC_5000", "NETLOGIC_6000", "NETLOGIC_7000".

EZapiChannel_ExtCAMConfig

eModel

Use_Result_Interrupt Enable/disable using interrupts for notification of results from CAM. Not relevant for NetLogic CAMs. Format: Boolean.

EZapiChannel_ExtCAMConfig

bUseResultInterrupt

Result_Mode Defines how hit/miss results are reported. Valid values: “EXPLICIT_HIT”, ”IMPLICIT_MISS”. Relevant only for Cypress CAMs.

EZapiChannel_ExtCAMConfig

eResultMode

Implicit_Miss_Value Value reserved for miss indication. Relevant only when working in implicit miss result mode. Relevant only for Cypress CAMs. Format: Numeric.

EZapiChannel_ExtCAMConfig

uqImplicitMissValue

FIFO_Empty_Value Value reserved for empty FIFO indication. Can be either 0x00000000 or 0xFFFFFFFF. Relevant only for Cypress CAMs. Format: Numeric.

EZapiChannel_ExtCAMConfig

uqFIFOEmptyValue

Latency_Index Select one of the eight latency registers. Not relevant when working in interrupt mode or using a NetLogic CAM. Format: Numeric.

EZapiChannel_ExtCAMConfig

auqPollingLatencies (Index)

Latency_Value Set of latency values to use when performing lookups to the external CAM interface. Not relevant when working in interrupt mode or using a NetLogic CAM. Format: Numeric.

EZapiChannel_ExtCAMConfig

auqPollingLatencies (Value)

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-21

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Read_Latency Defines the latency of read operation in clocks. Relevant only for NETLOGIC_5000. Format: Numeric.

EZapiChannel_ExtCAMConfig

uqReadLatency

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-22

2.3.5.6 NPconfig - EXT_CAM_LTR_CONFIG

Description

Configure Logical Table Register shifting size of external TCAM lookup result for a single Logical Table Register.

API Routine

EZapiChannel_Config( )

API Command

EZapiChannel_ConfigCmd_SetExtCAMLTR

Example NPconfig( channel = 0, BEGIN_EXT_CAM_LTR_CONFIG LTR_Index = 1 DB_Shift_Low = 0 DB_Shift_High = 2 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

LTR_Index LTR (Logical table register) index. Format: Numeric.

M EZapiChannel_ExtCAMLTRConfig uqLTRIndex

DB_Shift_Low Lower data base shift size (in bits). Format: Numeric.

- EZapiChannel_ExtCAMLTRConfig uqDBShiftLow

DB_Shift_High Upper data base shift size (in bits). Format: Numeric.

- EZapiChannel_ExtCAMLTRConfig uqDBShiftHigh

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-23

2.3.5.7 NPconfig - FRAME_FLOW_ORDERING

Description

Configures parameters relating to the ordering of frame flows through the NP-3’s TOPs.

API Routine

EZapiChannel_Config( )

API Command

EZapiChannel_ConfigCmd_SetFrameFlowOrdering

Example NPconfig( channel = 0, BEGIN_FRAME_FLOW_ORDERING Unique_Flow_1 = Invalid Unique_Flow_2 = Invalid RX_Unicast = 0x0 RX_Multicast = 0x1 Loopback_1 = 0x7 Loopback_2 = 0x7 Loopback_3 = 0x7 TX_Unicast = 0x2 TX_Multicast = 0x3 TX_User_Defined = 0x4 Host_RGMII_0 = 0x5 Host_RGMII_1 = 0x6

Enable_RX_Per_Port_Frame_Flow = False Enable_TX_Per_Port_Frame_Flow = False Per_Port_0 = 0x0 Per_Port_1 = 0x0 Per_Port_2 = 0x0 Input_Priority = Equal_Priority

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Unique_Flow_1 Defines the first unique internal flow. Valid values are 0-7 or “Invalid”.

To configure no unique flows, set this field to “Invalid”.

EZapiChannel_ FrameFlowOrdering

uqUniqueFlow1

Unique_Flow_2 Defines the secondfirst unique internal flow. Valid values are 0-7 or “Invalid”.

To configure a single unique flow, set Unique_Flow_1 to the requested unique flow and this field to “Invalid”.

EZapiChannel_ FrameFlowOrdering

uqUniqueFlow2

RX_Unicast RX_Multicast Loopback_1 Loopback_2 Loopback_3 TX_Unicast TX_Multicast TX_User_Defined Host_RGMII_0 Host_RGMII_1

Assign each source to one of the eight internal network processor flows. For example, to assign frames entering the network processor from the RX unicast ports to logical flow number 6, use RX_Unicast = 0x6. Format: Numeric.

EZapiChannel_ FrameFlowOrdering

auqFrameFlowMapping

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-24

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Enable_RX_Per_Port_Frame_Flow

If TRUE, flow for RX unicast and multicast ports is assigned according to Per_Port_Frame_Flow_Mapping. If FALSE, flow for RX unicast and multicast ports is assigned according to Per_Port_Frame_Flow_Mapping. Format: Boolean

EZapiChannel_ FrameFlowOrdering

bEnableRXPerPortFrameFlow

Enable_TX_Per_Port_Frame_Flow

If TRUE, flow for TX unicast and multicast ports is assigned according to Per_Port_Frame_Flow_Mapping. If FALSE, flow for TX unicast and multicast ports is assigned according to Per_Port_Frame_Flow_Mapping. Format: Boolean

EZapiChannel_ FrameFlowOrdering

bEnableTXPerPortFrameFlow

Per_Port_X Per-port flow mapping (shared for both RX and TX ports). Maps the 4 lsb bits of the port number to to one of the eight internal network processor flows. Format: Numeric

EZapiChannel_ FrameFlowOrdering

auqPerPortFrameFlowMapping

Input_Priority Determines the priority between RX and TX frames when scheduling frames into the ICFD. Valid values: Equal_Priority, RX_High_Priority, TX_High_Priority.

EZapiChannel_ FrameFlowOrdering

eInputPriority

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-25

2.3.5.8 NPconfig - HIGH_LEARN

Description

Configures the behavior of the NP-3’s high-learn mechanism.

API Routine

EZapiChannel_Init( )

API Command

EZapiChannel_InitCmd_SetHighLearnConfig

Example NPconfig( channel = 0, BEGIN_HIGH_LEARN Enable_Index_Q_Stat = TRUE Enable_Srch_Q_Stat = TRUE Enable_Ordering = FALSE Enable_End_Mode = TRUE END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Enable_Index_Q_Stat Enable/disable updating of the uqHiLearnCntr1 statistic special counter in case of a High-Learn operation failure due to an empty Index Queue. Format: Boolean.

EZapiChannel_HighLearnConfig

bEnableIndexQStat

Enable_Srch_Q_Stat Enable/disable updating of the uqHiLearnCntr0 statistic special counter in case of a High-Learn operation failure due to an empty Search Pointer Queue. Format: Boolean.

EZapiChannel_HighLearnConfig

bEnableSrchQStat

Enable_Ordering Enable/disable ordering of High-Learn operations. Format: Boolean.

EZapiChannel_HighLearnConfig

bEnableOrdering

Enable_End_Mode Determines the indication of the end of the High-Learn ordering, enabling optimization of resources before the end of the microcode sequence. Set to FALSE to indicate end using the halt unicast command. Set to TRUE to indicate end by writing to H_LRN_END register. This enables optimization of resources before the end of the microcode sequence. Relevant when Enable_Ordering is TRUE. Format: Boolean.

EZapiChannel_HighLearnConfig

bEnableEndMode

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-26

2.3.5.9 NPconfig - INDEX_Q

Description

Configures the NP-3 Index Queues.

API Routine

EZapiChannel_Init( )

API Command

EZapiChannel_InitCmd_SetIndexQConfig

Example NPconfig( channel = 0, BEGIN_INDEX_Q Counter_Group_Size = 0x2 Q_Num = 0 First_Counter = 0x0 Number_Of_Counters = 0x100 Type = Statistic Skip_Queue_Init = FALSE Counter_Group = FALSE Q_Num = 1 First_Counter = 0x300 Number_Of_Counters = 0x100 Type = Statistic Skip_Queue_Init = FALSE Counter_Group = FALSE

Q_Num = 2 First_Counter = 0x600 Number_Of_Counters = 0x100 Type = Statistic Skip_Queue_Init = FALSE Counter_Group = FALSE Q_Num = 3 First_Counter = 0x900 Number_Of_Counters = 0x100 Type = User_Defined_Indices Skip_Queue_Init = FALSE Counter_Group = FALSE END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Q_num Number of the Index Queue being configured. Format: Numeric.

EZapiChannel_ IndexQConfig

asIndexQ (Index)

First_Counter The indice of the first counter in this index queue. Format: Numeric.

EZapiChannel_ IndexQ

uqFirstCounter

Number_Of_Counters The number of (successive) indices in this queue. This field should be set to 0 to indicate an inactive index queue. Format: Numeric.

EZapiChannel_ IndexQ

uqNumberOfCounters

Skip_Queue_Init If TRUE, queue is not initialized with elements (counters/numbers), and can later be filled with user-defined indices using the EZapiChannel_ConfigCmd_IndexQPush API command. Format: Boolean.

EZapiChannel_ IndexQ

bSkipQueueInit

Type The type of this index queue. Valid values: “Statistic”, “User_Defined_Indices”.

EZapiChannel_ IndexQ

eType

Counter_Group If TRUE, the queue holds pointers to a group of counters (each index points to Counter_Group_Size sequential counters). Default value is FALSE. Format: Boolean.

EZapiChannel_ IndexQ

bCounterGroup

Counter_Group_Size The number of sequential counters in each counter group. Format: Numeric.

EZapiChannel_ IndexQConfig

uqCounterGroupSize

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-27

2.3.5.10 NPconfig - METERING_COLOR_ENCODING

Description

Configures parameters relating to the metering color encoding.

API Routine

EZapiChannel_Init( )

API Command

EZapiChannel_InitCmd_SetMeteringColorEncoding

Example NPconfig( channel = 0, BEGIN_METERING_COLOR_ENCODING Green_Encoding = 0x0 Yellow_Encoding = 0x1 Red_Encoding = 0x2 User_Defined_Encoding = 0x3 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Green_Encoding Encoding to use for specifying green metering color. Valid values are 0-3. Value must not be used for encoding of any other color. Format: Numeric.

EZapiChannel_ MeteringColorEncoding

uqGreenEncoding

Yellow_Encoding Encoding to use for specifying yellow metering color. Valid values are 0-3. Value must not be used for encoding of any other color. Format: Numeric.

EZapiChannel_ MeteringColorEncoding

uqYellowEncoding

Red_Encoding Encoding to use for specifying red metering color. Valid values are 0-3. Value must not be used for encoding of any other color. Format: Numeric.

EZapiChannel_ MeteringColorEncoding

uqRedEncoding

User_Defined_Encoding Encoding to use for specifying the user defined metering color. Valid values are 0-3. Value must not be used for encoding of any other color. Format: Numeric.

EZapiChannel_ MeteringColorEncoding

uqUserDefinedEncoding

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-28

2.3.5.11 NPconfig - OAM_CONFIG

Description

Initializes configuration parameters affecting the NP's OAM.

API Routine

EZapiChannel_Init( )

API Command

EZapiChannel_InitCmd_SetOAMConfig

Example NPconfig( channel = 0, BEGIN_OAM_CONFIG Enable_Search_Msg_Offload = TRUE Search_Msg_RFD_Buffer_1 = 0x2 Search_Msg_RFD_Buffer_2 = 0x5 Search_Msg_Max_Size = 0x90 Search_Msg_Blocking = FALSE Search_Msg_Timeout = 0x41 Search_Msg_Flow_Id = 0x1 Enable_Scan_Msg = TRUE Scan_Msg_RFD_Buffer_1 = 0x7 Scan_Msg_RFD_Buffer_2 = 0x8 Scan_Msg_Max_Size = 0x5 Scan_Msg_Blocking = FALSE Scan_Msg_Timeout = 0x7 Scan_Msg_Flow_Id = 0x3 Enable_Stat_Msg_Offload = FALSE Stat_Msg_RFD_Buffer_1 = 0x167 Stat_Msg_RFD_Buffer_2 = 0x189 Stat_Msg_Max_Size = 0x89 Stat_Msg_Blocking = FALSE Stat_Msg_Timeout = 0x17 Stat_Msg_Flow_Id = 0x1 Enable_Timer_1 = TRUE Timer_1_Interval = 0x7 Timer_1_Mult_1 = 0x100 Timer_1_Mult_2 = 0x800 Timer_1_Counter_Threshold = 0x144 Timer_1_Frame_Buffer = FALSE Timer_1_RFD_Buffer = 0x19 Timer_1_Flow_Id = 0x5

Enable_Timer_2 = TRUE Timer_2_Mult_1 = 0x100 Timer_2_Mult_2 = 0x800 Timer_2_Interval = 0x6 Timer_2_Counter_Threshold = 0x77 Timer_2_Frame_Buffer = TRUE Timer_2_RFD_Buffer = 0x97 Timer_2_Flow_Id = 0x4 Enable_Timer_3 = TRUE Timer_3_Interval = 0x7 Timer_3_Mult_1 = 0x100 Timer_3_Mult_2 = 0x800 Timer_3_Counter_Threshold = 0x144 Timer_3_Frame_Buffer = FALSE Timer_3_RFD_Buffer = 0x19 Timer_3_Flow_Id = 0x5 Enable_Timer_4 = FALSE Timer_4_Interval = 0x6 Timer_4_Mult_1 = 0x100 Timer_4_Mult_2 = 0x800 Timer_4_Counter_Threshold = 0x77 Timer_4_Frame_Buffer = TRUE Timer_4_RFD_Buffer = 0x97 Timer_4_Flow_Id = 0x4 Enable_Watchdog_Msg_Offload = FALSE Watchdog_Frame_Buffer = TRUE Watchdog_RFD_Buffer = 0x99 Watchdog_Flow_Id = 0x2 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Enable_Search_Msg_ Offload

If TRUE, search messages are sent to the TOPs instead of to the host. Format: Boolean.

EZapiChannel_OAMConfig

bEnableSearchMsg Offload

Search_Msg_RFD_Buffer_1

The first RFD buffer used when frame is sent to TOPs. Format: Numeric.

EZapiChannel_OAMConfig

uqSearchMsgRFD Buffer1

Search_Msg_RFD_Buffer_2

The second RFD buffer used when frame is sent to TOPs. Format: Numeric.

EZapiChannel_OAMConfig

uqSearchMsgRFD Buffer1

Search_Msg_Max_Size Threshold for accumulated size of message data. Format: Numeric.

EZapiChannel_OAMConfig

uqSearchMsgMax Size

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-29

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Search_Msg_Blocking Configures behavior when maximum size is reached: If TRUE, the message DMA interface is blocked until the timeout expires, and only then a frame is generated to the TOPs. If FALSE, a frame is generated to the TOPs immediately. Format: Boolean.

EZapiChannel_OAMConfig

bEnableSearchMsg Blocking

Search_Msg_Timeout Timeout (in system clocks) for generating a search message frame to the TOPs (a frame is generated to the TOPs after no longer than this period). A value of 0 will generate a frame for every search message. Format: Numeric.

EZapiChannel_OAMConfig

uqSearchMsgTimeout

Search_Msg_Flow_Id Flow ID for the search message frame. Format: Numeric.

EZapiChannel_OAMConfig

uqSearchMsgFlowId

Enable_Scan_Msg If TRUE, scan messages are sent to the TOPs otherwise messages are not sent at all. Format: Boolean.

EZapiChannel_OAMConfig

bEnableScanMsg

Scan_Msg_RFD_Buffer_1 The first RFD buffer used when frame is sent to TOPs. Format: Numeric.

EZapiChannel_OAMConfig

uqScanMsgRFD Buffer1

Scan_Msg_RFD_Buffer_2 The second RFD buffer used when frame is sent to TOPs. Format: Numeric.

EZapiChannel_OAMConfig

uqScanMsgRFD Buffer1

Scan_Msg_Max_Size Threshold for accumulated size of message data. Format: Numeric.

EZapiChannel_OAMConfig

uqScanMsgMaxSize

Scan_Msg_Blocking Configures behavior when maximum size is reached: If TRUE, the message DMA interface is blocked until the timeout expires, and only then a frame is generated to the TOPs. If FALSE, a frame is generated to the TOPs immediately. Format: Boolean.

EZapiChannel_OAMConfig

bScanMsgBlocking

Scan_Msg_Timeout Timeout (in system clocks) for generating a scan message frame to the TOPs (a frame is generated to the TOPs after no longer than this period). A value of 0 will generate a frame for every scan message. Format: Numeric.

EZapiChannel_OAMConfig

uqScanMsgTimeout

Scan_Msg_Flow_Id Flow ID for the scan message frame. Format: Numeric.

EZapiChannel_OAMConfig

uqScanMsgFlowId

Enable_Stat_Msg_Offload If TRUE, statistic messages are sent to the TOPs instead of to the host. Format: Boolean.

EZapiChannel_OAMConfig

bEnableStatMsg Offload

Stat_Msg_RFD_Buffer_1 The first RFD buffer used when frame is sent to TOPs. Format: Numeric.

EZapiChannel_OAMConfig

uqStatMsgRFD Buffer1

Stat_Msg_RFD_Buffer_2 The second RFD buffer used when frame is sent to TOPs. Format: Numeric.

EZapiChannel_OAMConfig

uqStatMsgRFD Buffer2

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-30

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Stat_Msg_Max_Size Threshold for accumulated size of message data. Format: Numeric.

EZapiChannel_OAMConfig

uqStatMsgMaxSize

Stat_Msg_Blocking Configures behavior when maximum size is reached: If TRUE, the message DMA interface is blocked until the timeout expires, and only then a frame is generated to the TOPs. If FALSE, a frame is generated to the TOPs immediately. Format: Boolean.

EZapiChannel_OAMConfig

bStatMsgBlocking

Stat_Msg_Timeout Timeout (in system clocks) for generating a statistic message frame to the TOPs (a frame is generated to the TOPs after no longer than this period). A value of 0 will generate a frame for every statistic message. Format: Numeric.

EZapiChannel_OAMConfig

uqStatMsgTimeout

Stat_Msg_Flow_Id Flow ID for the statistic message frame. Format: Numeric.

EZapiChannel_OAMConfig

uqStatMsgFlowId

Enable_Timer_1 If TRUE, the first keep-alive frame generation timer is enabled. Format: Boolean.

EZapiChannel_OAMConfig

bEnableTimer1

Timer_1_Interval Interval (in system clocks) between events by the first keep-alive timer. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer1Interval

Timer_1_Mult_1 If the current event number is a multiple of Timer_1_Mult_1 then DIVIDER_1 bit (64) in RTC CFD interrupt is set. If value is 0 then feature is disabled. Supported from version 6.2. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer1Mult1

Timer_1_Mult_2 If the current event number is a multiple of Timer_1_Mult_2 then DIVIDER_1 bit (64) in RTC CFD interrupt is set. If value is 0 then feature is disabled. Supported from version 6.2. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer1Mult2

Timer_1_Counter_ Threshold

Threshold for first keep-alive timer counter (after reaching this value the counter rolls over). Format: Numeric.

EZapiChannel_OAMConfig

uqTimer1Counter Threshold

Timer_1_Frame_Buffer If TRUE, frames generated by the first keep-alive timer use a frame buffer. Format: Boolean.

EZapiChannel_OAMConfig

bTimer1FrameBuffer

Timer_1_RFD_Buffer The RFD buffer used when frame is sent to TOPs. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer1RFDBuffer

Timer_1_Flow_Id Flow ID for the keep-alive frames generated by the first timer. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer1FlowId

Enable_Timer_2 If TRUE, the second keep-alive frame generation timer is enabled. Format: Boolean.

EZapiChannel_OAMConfig

bEnableTimer2

Timer_2_Interval Interval (in system clocks) between events by the second keep-alive timer. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer2Interval

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-31

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Timer_2_Mult_1 If the current event number is a multiple of Timer_2_Mult_1 then DIVIDER_1 bit (64) in RTC CFD interrupt is set. If value is 0 then feature is disabled. Supported from version 6.2. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer2Mult1

Timer_2_Mult_2 If the current event number is a multiple of Timer_2_Mult_2 then DIVIDER_1 bit (64) in RTC CFD interrupt is set. If value is 0 then feature is disabled. Supported from version 6.2. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer2Mult2

Timer_2_Counter_ Threshold

Threshold for second keep-alive timer counter (after reaching this value the counter rolls over). Format: Numeric.

EZapiChannel_OAMConfig

uqTimer2Counter Threshold

Timer_2_Frame_Buffer If TRUE, frames generated by the second keep-alive timer use a frame buffer. Format: Boolean.

EZapiChannel_OAMConfig

bTimer2FrameBuffer

Timer_2_RFD_Buffer The RFD buffer used when frame is sent to TOPs. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer2RFDBuffer

Timer_2_Flow_Id Flow ID for the keep-alive frames generated by the second timer. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer2FlowId

Enable_Timer_3 If TRUE, the third keep-alive frame generation timer is enabled. Supported from version 6.2. Format: Boolean.

EZapiChannel_OAMConfig

bEnableTimer3

Timer_3_Interval Interval (in system clocks) between events by the fourth keep-alive timer. Supported from version 6.2. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer3Interval

Timer_3_Mult_1 If the current event number is a multiple of Timer_3_Divider_0 then DIVIDER_1 bit (64) in RTC CFD interrupt is set. If value is 0 then feature is disabled. Supported from version 6.2. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer3Mult1

Timer_3_Mult_2 If the current event number is a multiple of Timer_3_Divider_1 then DIVIDER_1 bit (64) in RTC CFD interrupt is set. If value is 0 then feature is disabled. Supported from version 6.2. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer3Mult2

Timer_3_Frame_Buffer If TRUE, frames generated by the third keep-alive timer use a frame buffer. Supported from version 6.2. Format: Boolean.

EZapiChannel_OAMConfig

bTimer3FrameBuffer

Timer_3_RFD_Buffer The RFD buffer used when frame is sent to TOPs. Supported from version 6.2. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer3RFDBuffer

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-32

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Timer_3_Flow_Id Flow Id for the keep-alive frames generated by the third timer. Supported from version 6.2. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer3FlowId

Enable_Timer_4 If TRUE, the fourth keep-alive frame generation timer is enabled. Format: Boolean.

EZapiChannel_OAMConfig

bEnableTimer4

Timer_4_Interval Interval (in system clocks) between events by the fourth keep-alive timer. Supported from version 6.2. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer4Interval

Timer_4_Mult_1 If the current event number is a multiple of Timer_4_Mult_1 then DIVIDER_1 bit (64) in RTC CFD interrupt is set. If value is 0 then feature is disabled. Supported from version 6.2. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer4Mult2

Timer_4_Mult_2 If the current event number is a multiple of Timer_4_Mult_2 then DIVIDER_1 bit (64) in RTC CFD interrupt is set. If value is 0 then feature is disabled. Supported from version 6.2. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer4Mult2

Timer_4_Counter_ Threshold

Threshold for fourth keep-alive timer counter (after reaching this value the counter rolls over). Supported from version 6.2. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer4Counter Threshold

Timer_4_Frame_Buffer If TRUE, frames generated by the fourth keep-alive timer use a frame buffer. Format: Boolean.

EZapiChannel_OAMConfig

bTimer4FrameBuffer

Timer_4_RFD_Buffer The RFD buffer used when frame is sent to TOPs. Supported from version 6.2. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer4RFDBuffer

Timer_4_Flow_Id Flow Id for the keep-alive frames generated by the fourth timer. Supported from version 6.2. Format: Numeric.

EZapiChannel_OAMConfig

uqTimer4FlowId

Enable_Watchdog_Msg_ Offload

If TRUE, watchdog messages are sent to the TOPs instead of to the host. Format: Boolean.

EZapiChannel_OAMConfig

bEnableWatchdog MsgOffload

Watchdog_Frame_Buffer If TRUE, watchdog counter event frames use a frame buffer. Format: Boolean.

EZapiChannel_OAMConfig

bWatchdogFrame Buffer

Watchdog_RFD_Buffer The RFD buffer used when frame is sent to TOPs. Format: Numeric.

EZapiChannel_OAMConfig

uqWatchdogRFD Buffer

Watchdog_Flow_Id Flow ID for the keep-alive frames generated by the first timer. Format: Numeric.

EZapiChannel_OAMConfig

uqWatchdogFlowId

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-33

2.3.5.12 NPconfig - REAL_TIME_COUNTER_CONFIG

Description

Configures parameters that affect the network processor's real time counter.

API Routine

EZapiChannel_Config( )

API Command

EZapiChannel_ConfigCmd_SetRealTimeCounterConfig

Example NPconfig( channel = 0, BEGIN_REAL_TIME_COUNTER_CONFIG Rate = 0x1000 Value = 0x200 Adjust = FALSE END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Rate Counter is advanced every uqRate/256 system clocks. If Rate is 0 then the counter is disabled. Format: Numeric.

EZapiChannel_RealTimeCounterConfig

uqRate

Value If bAdjust is FALSE, counter is set to this value. Otherwise uqValue is added to counter value. Format: Numeric.

EZapiChannel_RealTimeCounterConfig

uqValue

Adjust If TRUE, counter is adjusted according to uqValue. Format: Boolean.

EZapiChannel_RealTimeCounterConfig

bAdjust

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-34

2.3.5.13 NPconfig - RFD_BUFFERS

Description

Configures the allocation and physical mapping of the RFD buffers.

API Routine

EZapiChannel_Init( )

API Command

EZapiChannel_InitCmd_SetRFDBuffers

Example NPconfig( channel = 0, BEGIN_RFD_BUFFERS Frame_Mem_Mode = Continuous RX_Buffers = 0x100 TX_Buffers = 0x100 Reserved_Buffers= 0x0 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Frame_Mem_Mode Mode in which RFD buffers are mapped into the frame memory. Valid values: “Continuous”, “Alternating”.

EZapiChannel_RFDBuffers eFrameMemMode

RX_Buffers Number of RFD buffers to be allocated for RX path. Format: Numeric.

EZapiChannel_RFDBuffers uqRXBuffers

TX_Buffers Number of RFD buffers to be allocated for TX path. Format: Numeric.

EZapiChannel_RFDBuffers uqTXBuffers

Reserved_Buffers Number of reserved RFD buffers. Format: Numeric.

EZapiChannel_RFDBuffers uqReservedBuffers

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-35

2.3.5.14 NPconfig - RFD_LIMITS

Description

Configures parameters that restrict or control indications regarding the number of frame buffers used by each of the NP-3’s ports and/or clients.

API Routine

EZapiChannel_Init( )

API Command

EZapiChannel_InitCmd_SetRFDLimits

Example NPconfig( channel = 0, BEGIN_RFD_LIMITS RX_Per_Port_Budget_Indication = 0xE0 RX_First_Per_Port_High_Thresh = 0xE0 RX_First_Per_Port_Low_Thresh = 0xD0 RX_Second_Per_Port_High_Thresh = 0xE0 RX_Second_Per_Port_Low_Thresh = 0xD0 RX_Per_Port_Thresh_Select_Mask_1 = 0x0 RX_Per_Port_Thresh_Select_Mask_2 = 0x0 RX_Per_Port_Accounting_Mask_1 = 0xFFFFFFFF RX_Per_Port_Accounting_Mask_2 = 0x1F TX_Per_Port_Budget_Indication = 0xE0 TX_First_Per_Port_High_Thresh = 0xE0 TX_First_Per_Port_Low_Thresh = 0xD0 TX_Second_Per_Port_High_Thresh = 0xE0 TX_Second_Per_Port_Low_Thresh = 0xD0 TX_Per_Port_Thresh_Select_Mask_1 = 0x0 TX_Per_Port_Thresh_Select_Mask_2 = 0x0 TX_Per_Port_Accounting_Mask_1 = 0xFFFFFFFF TX_Per_Port_Accounting_Mask_2 = 0x1F RX_Host_Port_Budget_Indication = 0x28 TX_Host_Port_Budget_Indication = 0x28 RX_All_Ports_Budget = 0x100 RX_All_Ports_Budget_Indication = 0xE0 RX_All_Ports_High_Thresh = 0xE0 RX_All_Ports_Low_Thresh = 0xD0 TX_All_Ports_Budget = 0x100 TX_All_Ports_Budget_Indication = 0xE0 TX_All_Ports_High_Thresh = 0xE0 TX_All_Ports_Low_Thresh = 0xD0 RX_DMA_All_Ports_Budget = 0xF0 TX_DMA_All_Ports_Budget = 0xF0 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

RX_Per_Port_Budget_ Indication

Number of RX buffers each port may use before an indication is given to TOPmodify. Format: Numeric.

EZapiChannel_ RFDLimits

uqRXPerPortBudget Indication

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-36

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

RX_First_Per_Port_High_Thresh

The first RX high threshold for a single port. When the number of RX buffers used by a port equals or exceeds this value, a flow control 'Xoff' frame is issued.

Each port is configured to use one of the 2 low/high threshold pairs using the RX_Per_Port_Thresh_Select_Mask fields.

Format: Numeric.

EZapiChannel_ RFDLimits

uqRXFirstPerPortHigh Thresh

RX_First_Per_Port_Low_ Thresh

The first RX low threshold for a single port. When the number of RX buffers used by a port drops below this value, the flow control condition ends and a flow control 'Xon' frame is issued.

Each port is configured to use one of the 2 low/high threshold pairs using the RX_Per_Port_Thresh_ Select_Mask fields.

Format: Numeric.

EZapiChannel_ RFDLimits

uqRXFirstPerPortLow Thresh

RX_Second_Per_Port_ High_Thresh

The second RX high threshold for a single port. Format: Numeric.

EZapiChannel_ RFDLimits

uqRXSecondPerPort HighThresh

RX_Second_Per_Port_ Low_Thresh

The second RX low threshold for a single port. Format: Numeric.

EZapiChannel_ RFDLimits

uqRXSecondPerPort LowThresh

RX_Per_Port_Thresh_ Select_Mask_1

Bitmap for selecting one of the 2 RX low/high threshold pairs for ports 0-31. Set bit i to 0 to use the first low/high threshold pair for port i. Set bit i to 1 to use the second low/high threshold pair for port i.

For the index representing each port see NP-3 Architecture and Instruction Set User Manual.

Format: Numeric.

EZapiChannel_ RFDLimits

uqRXPerPortThresh SelectMask1

RX_Per_Port_Thresh_ Select_Mask_2

Bitmap for selecting one of the 2 RX low/high threshold pairs for ports 32-34 (bit i represents port 32+i). Format: Numeric.

EZapiChannel_ RFDLimits

uqRXPerPortThresh SelectMask2

RX_Per_Port_Accounting_Mask_1

Bitmap for enabling/disabling RX RFD budget accounting for ports 0-31. Set bit i to 0 to disable RFD budget accounting for port i. Set bit i to 1 to enable RFD budget accounting for port i.

Disabling RFD budget accounting for a port disables flow control, indications to TOPmodify, and counters of current use.

For ports with RFD budget accounting disabled all other RX per-port configurations are irrelevant.

Format: Numeric.

EZapiChannel_ RFDLimits

uqRXPerPortAccounting Mask1

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-37

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

RX_Per_Port_Accounting_Mask_2

Bitmap for enabling/disabling RX RFD budget accounting for ports 32-34 (bit i represents port 32+i). Format: Numeric.

EZapiChannel_ RFDLimits

uqRXPerPortAccounting Mask2

TX_Per_Port_Budget_ Indication

Number of TX buffers each port may use before an indication is given to TOPmodify. Format: Numeric.

EZapiChannel_ RFDLimits

uqTXPerPortBudget Indication

TX_First_Per_Port_High_Thresh

The first TX high threshold for a single port. Format: Numeric.

EZapiChannel_ RFDLimits

uqTXFirstPerPortHigh Thresh

TX_First_Per_Port_Low_ Thresh

The first TX low threshold for a single port. Format: Numeric.

EZapiChannel_ RFDLimits

uqTXFirstPerPortLow Thresh

TX_Second_Per_Port_ High_Thresh

The second TX high threshold for a single port. Format: Numeric.

EZapiChannel_ RFDLimits

uqTXSecondPerPort HighThresh

TX_Second_Per_Port_ Low_Thresh

The second TX low threshold for a single port. Format: Numeric.

EZapiChannel_ RFDLimits

uqTXSecondPerPortLow Thresh

TX_Per_Port_Thresh_ Select_Mask_1

Bitmap for selecting one of the 2 TX low/high threshold pairs for each port (for ports 0-31). Format: Numeric.

EZapiChannel_ RFDLimits

uqTXPerPortThreshSelect Mask1

TX_Per_Port_Thresh_ Select_Mask_2

Bitmap for selecting one of the 2 TX low/high threshold pairs for each port (for ports 32-35). Format: Numeric.

EZapiChannel_ RFDLimits

uqTXPerPortThreshSelect Mask2

TX_Per_Port_Accounting_Mask_1

Bitmap for enabling/disabling TX RFD budget accounting for each port (for ports 0-31). Format: Numeric.

EZapiChannel_ RFDLimits

uqTXPerPortAccounting Mask1

TX_Per_Port_Accounting_Mask_2

Bitmap for enabling/disabling TX RFD budget accounting for each port (for ports 32-35). Format: Numeric.

EZapiChannel_ RFDLimits

uqTXPerPortAccounting Mask2

RX_Host_Port_Budget_ Indication

Number of RX buffers the host port may use before an indication is given to TOPmodify. Format: Numeric.

EZapiChannel_ RFDLimits

uqRXHostPortBudget Indication

TX_Host_Port_Budget_ Indication

Number of TX buffers the host port may use before an indication is given to TOPmodify. Format: Numeric.

EZapiChannel_ RFDLimits

uqTXHostPortBudget Indication

RX_All_Ports_Budget Total cumulative number of RX buffers that all ports may use. Exceeding this value will cause an indication to TOPmodify and discarding of frames. Format: Numeric.

EZapiChannel_ RFDLimits

uqRXAllPortsBudget

RX_All_Ports_Budget_ Indication

Total cumulative number of RX buffers that all ports may use. Exceeding this value will cause an indication to TOPparse and TOPresolve. Format: Numeric.

EZapiChannel_ RFDLimits

uqRXAllPortsBudget Indication

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-38

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

RX_All_Ports_High_ Thresh

The RX buffer high threshold for all ports. When the total cumulative number of RX buffers used by all ports equals or exceeds this value, a flow control 'Xoff' frame is issued. Format: Numeric.

EZapiChannel_ RFDLimits

uqRXAllPortsHighThresh

RX_All_Ports_Low_ Thresh

The RX buffer low threshold for all ports. When the total cumulative number of RX buffers used by all ports drops below this value, the flow control condition ends and a flow control 'Xon' frame is issued. Format: Numeric.

EZapiChannel_ RFDLimits

uqRXAllPortsLowThresh

TX_All_Ports_Budget Total cumulative number of TX buffers that all ports may use. Exceeding this value will cause an indication to TOPmodify and discarding of frames. Format: Numeric.

EZapiChannel_ RFDLimits

uqTXAllPortsBudget

TX_All_Ports_Budget_ Indication

Total cumulative number of TX buffers that all ports may use. Exceeding this value will cause an indication to TOPparse and TOPresolve. Format: Numeric.

EZapiChannel_ RFDLimits

uqTXAllPortsBudget Indication

TX_All_Ports_High_ Thresh

The TX buffer high threshold for all ports. Format: Numeric.

EZapiChannel_ RFDLimits

uqTXAllPortsHighThresh

TX_All_Ports_Low_Thresh The TX buffer low threshold for all ports. Format: Numeric.

EZapiChannel_ RFDLimits

uqTXAllPortsLowThresh

RX_DMA_All_Ports_ Budget

Total cumulative number of RX buffers that all ports may use at DMA. Exceeding this value will cause the IFDMA to block until buffers are freed. This can be used to limit the flow of frames from the external interfaces before all buffers are used, thus reserving buffers for internal use.

The value should be no greater than RX_All_Ports_Budget.

Format: Numeric.

EZapiChannel_ RFDLimits

uqRXDMAAllPortsBudget

TX_DMA_All_Ports_ Budget

Total cumulative number of TX buffers that all ports may use at DMA.

The value should be no greater than TX_All_Ports_Budget.

Format: Numeric.

EZapiChannel_ RFDLimits

uqTXDMAAllPortsBudget

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-39

2.3.5.15 NPconfig - SRH1_MSG_CTRL

Description

Configures the behavior of the TOPsearch I message mechanism.

API Routine

EZapiChannel_Config( )

API Command

EZapiChannel_ConfigCmd_SetSrh1MsgCtrl

Example NPconfig( channel = 0, BEGIN_SRH1_MSG_CTRL Enable_Add_Msg = TRUE Enable_Del_Msg = TRUE Enable_Del_Blocking = FALSE Search_Msgs = 0xFFFFFFFF END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Enable_Add_Msg Enable/disable sending of add/update entry messages to the host. Format: Boolean.

EZapiChannel_ Srh1MsgCtrl

bEnableAddMsg

Enable_Del_Msg Enable/disable sending of delete entry messages to the host. Format: Boolean.

EZapiChannel_ Srh1MsgCtrl

bEnableDelMsg

Enable_Del_Blocking Enable/disable blocking of TOPresolve when delete entry messages cannot be sent to host due to a full search message queue. Format: Boolean.

EZapiChannel_ Srh1MsgCtrl

bEnableDelBlocking

Search_Msgs Number of external search messages to allocate memory for in the search message queue (for all structures).

This field defines the minimum number of messages which can be stored in the queue. The actual number of messages stored may be larger, according to actual search message sizes.

The memory for the search message queue must be allocated by the EZmpc2 tool. Thus, the value of this field must match the value passed to the EZmpc2 tool during partition creation.

Format: Numeric.

EZapiChannel_ Srh1MsgCtrl

uqSearchMsgs

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-40

2.3.5.16 NPconfig - STAT_CNTRS

Description

Configures the statistic counters within each group.

API Routine

EZapiChannel_Config( )

API Command

EZapiChannel_ConfigCmd_SetStatisticCntrs

Example NPconfig( channel = 0, BEGIN_STAT_CNTRS

Start_Id= 0 Num_Of_Cntrs = 20 Value = 80 Value_MSB = 90 Threshold = 21

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Start_Id The first counter's index. Format: Numeric.

EZapiChannel_ StatisticCntrsGrp

uqStartId

Num_Of_Cntrs The number of counters to perform an action on. Format: Numeric.

EZapiChannel_ StatisticCntrsGrp

uqNumOfCntrs

Value For get/set commands, the 4 LSBs of the counter's value. For increment/decrement commands, the amount to increment the counter.

Increment/decrement commands are performed in 64K chunks. Values larger than 64K are performed in a non-atomic manner.

Format: Numeric.

EZapiChannel_ StatisticCntr

uqValue

Value_MSB For get/set commands, the 4 MSBs of the counter's value. Otherwise not relevant. Format: Numeric.

EZapiChannel_ StatisticCntr

uqValueMSB

Threshold For get/set commands, the counter's threshold. Otherwise not relevant. Format: Numeric.

EZapiChannel_ StatisticCntr

uqThreshold

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-41

2.3.5.17 NPconfig - STAT_CONFIG

Description

Configures several general parameters for the statistics counters.

API Routine

EZapiChannel_Init( )

API Command

EZapiChannel_InitCmd_SetStatisticConfig

Example NPconfig( channel = 0, BEGIN_STAT_CONFIG

Enable_Extended_Profile = FALSE Statistic_Msgs = 0xFFFFFFFF

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Enable_Extended_Profile

Enable/disable use of extended profiles, allowing statistic Token Buckets to be attached to two Token Bucket profiles. Format: Boolean.

EZapiChannel_ StatisticConfig

bEnableExtendedProfile

Statistic_Msgs Number of statistic messages to allocate memory for in the statistic message queue.

The memory for the statistic message queue must be allocated by the EZmpc2 tool. Thus, the value of this field must match the value passed to the EZmpc2 tool during partition creation.

Format: Numeric.

EZapiChannel_ StatisticConfig

uqStatisticMsgs

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-42

2.3.5.18 NPconfig - STAT_GROUP

Description

Allocation of the statistics counters into homogenous groups.

API Routine

EZapiChannel_Init( )

API Command

EZapiChannel_InitCmd_SetStatGroupConfig

Example NPconfig( channel = 0, BEGIN_STAT_GROUP Group_Num = 2 First_Counter = 0x20 Group_Size = 0xA0 Group_Type = Short Group_Num = 3 First_Counter = 0x280 Group_Size = 0x50 Group_Type = Long END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Group_Num The number of the statistics group being configured. When configuring several groups, this number must be consecutive. Format: Numeric.

EZapiChannel_ StatisticGroupCfg

psGroupsArray (Index)

First_Counter The first counter of the group. Format: Numeric.

EZapiChannel_ StatisticGroupInit

uqFirstCounter

Group_Size The number of counters in the group. Format: Numeric.

EZapiChannel_ StatisticGroupInit

uqGroupSize

Group_Type The type of the group. Valid values: “Inactive”, “Short”, “Medium”, “Long”, “Token_Bucket”, “Watchdog”.

EZapiChannel_ StatisticGroupInit

eGroupType

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-43

2.3.5.19 NPconfig - STAT_OP

Description

Configures how the statistics block operates during runtime.

API Routine

EZapiChannel_Config( )

API Command

EZapiChannel_ConfigCmd_SetStatisticOperations

Example NPconfig( channel = 0, BEGIN_STAT_OP

Enable_Top_Access = TRUE Enable_TB_Refresh = TRUE Enable_GC_Scan = FALSE GC_Scan_Group_Mask = 0xF GC_Scan_Interval = 0x100 Enable_Watchdog_Scan_1 = FALSE Watchdog_Scan_1_Start = 0x2350 Watchdog_Scan_1_Number = 0x100 Watchdog_Scan_1_Interval = 0x10 Watchdog_Scan_1_Mult_1 = 0x1 Watchdog_Scan_1_Mult_2 = 0x2 Enable_Watchdog_Scan_2 = TRUE Watchdog_Scan_2_Start = 0x2280 Watchdog_Scan_2_Number = 0x50 Watchdog_Scan_2_Interval = 0x10

Watchdog_Scan_2_Mult_1 = 0x4 Watchdog_Scan_2_Mult_2 = 0x8 Enable_Watchdog_Scan_3 = FALSE Watchdog_Scan_3_Start = 0x2350 Watchdog_Scan_3_Number = 0x100 Watchdog_Scan_3_Interval = 0x10 Watchdog_Scan_3_Mult_1 = 0x1 Watchdog_Scan_3_Mult_2 = 0x2 Enable_Watchdog_Scan_4 = TRUE Watchdog_Scan_4_Start = 0x2280 Watchdog_Scan_4_Number = 0x50 Watchdog_Scan_4_Interval = 0x10 Watchdog_Scan_4_Mult_1 = 0x4 Watchdog_Scan_4_Mult_2 = 0x8 Enable_RT_Counter = FALSE

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Enable_Top_Access Determines if microcode operations on statistics counters from the TOPs are enabled.

Disabling TOP access will cause the TOPs to become blocked when performing statistics commands.

Format: Boolean.

EZapiChannel_ StatisticOperations

bEnableTopAccess

Enable_TB_Refresh Determines if the Token Bucket Refresh Machine is activated. The Token Bucket Refresh Machine periodically updates statistic Token Buckets that are not accessed by the NP-3's TOPs. Format: Boolean.

EZapiChannel_ StatisticOperations

bEnableTBrefresh

Enable_GC_Scan Determines if the Garbage Collection Scan Machine is activated. The Garbage Collection scan machine periodically scans the statistic groups and generates statistics messages for the host on counters that have exceeded their threshold. Format: Boolean.

EZapiChannel_ StatisticOperations

bEnableGCScan

GC_Scan_Group_ Mask

A bitmap consisting of a single bit for each of the four statistic groups indicating if the Garbage Collection Scan Machine scans the group. Format: Numeric.

EZapiChannel_ StatisticOperations

uqGCScanGroupMask

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-44

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

GC_Scan_Interval Configures the rate at which the Garbage Collection Scan Machine scans the counters. This value defines the maximum time between Garbage Collector requests to counter N and counter N+1 (in statistic memory clocks). Format: Numeric.

EZapiChannel_ StatisticOperations

uqGCScanInterval

Enable_Watchdog_ Scan_1

Determines if the first Watchdog scan machine is activated. Format: Boolean.

EZapiChannel_ StatisticOperations

bEnableWatchdogScan1

Watchdog_Scan_1_Start

The low counter index of the first Watchdog scan machine. Format: Numeric.

EZapiChannel_ StatisticOperations

uqWatchdogScan1Start

Watchdog_Scan_1_Number

The number of counters scanned by the first watchdog scan machine. Format: Numeric.

EZapiChannel_ StatisticOperations

uqWatchdogScan1Number

Watchdog_Scan_1_ Interval

Configures the rate at which the first Watchdog scan machine scans the counters. This value defines the time between requests to counter N and counter N+1 (in statistic memory clocks). Format: Numeric.

EZapiChannel_ StatisticOperations

uqWatchdogScan1Interval

Watchdog_Scan_1_ Mult_1

Configures the first multiple of the first scan machine interval. Format: Numeric. Supported from version 6.2

EZapiChannel_ StatisticOperations

uqWatchdogScan1Mult1

Watchdog_Scan_1_ Mult_2

Configures the second multiple of the first scan machine interval. Format: Numeric. Supported from version 6.2

EZapiChannel_ StatisticOperations

uqWatchdogScan1Mult2

Enable_Watchdog_ Scan_2

Determines if the second Watchdog scan machine is activated. Format: Boolean.

EZapiChannel_ StatisticOperations

bEnableWatchdogScan2

Watchdog_Scan_2_Start

The low counter index of the second Watchdog scan machine. Format: Numeric.

EZapiChannel_ StatisticOperations

uqWatchdogScan2Start

Watchdog_Scan_2_Number

The number of counters scanned by the second watchdog scan machine. Format: Numeric.

EZapiChannel_ StatisticOperations

uqWatchdogScan2Number

Watchdog_Scan_2_ Interval

Configures the rate at which the second Watchdog scan machine scans the counters. This value defines the time between requests to counter N and counter N+1 (in statistic memory clocks). Format: Numeric.

EZapiChannel_ StatisticOperations

uqWatchdogScan2Interval

Watchdog_Scan_2_ Mult_1

Configures the first multiple of the second scan machine interval. Format: Numeric. Supported from version 6.2

EZapiChannel_ StatisticOperations

uqWatchdogScan2Mult1

Watchdog_Scan_2_ Mult_2

Configures the second multiple of the second scan machine interval. Format: Numeric. Supported from version 6.2

EZapiChannel_ StatisticOperations

uqWatchdogScan2Mult2

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-45

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Enable_Watchdog_ Scan_3

Determines if the third Watchdog scan machine is activated. Format: Boolean. Supported from version 6.2

EZapiChannel_ StatisticOperations

bEnableWatchdogScan3

Watchdog_Scan_3_Start

The low counter index of the third Watchdog scan machine. Format: Numeric. Supported from version 6.2

EZapiChannel_ StatisticOperations

uqWatchdogScan3Start

Watchdog_Scan_3_Number

The number of counters scanned by the third watchdog scan machine. Format: Numeric. Supported from version 6.2

EZapiChannel_ StatisticOperations

uqWatchdogScan3Number

Watchdog_Scan_3_ Interval

Configures the rate at which the third Watchdog scan machine scans the counters. This value defines the time between requests to counter N and counter N+1 (in statistic memory clocks). Format: Numeric. Supported from version 6.2

EZapiChannel_ StatisticOperations

uqWatchdogScan3Interval

Watchdog_Scan_3_ Mult_1

Configures the first multiple of the third scan machine interval. Format: Numeric. Supported from version 6.2

EZapiChannel_ StatisticOperations

uqWatchdogScan3Mult1

Watchdog_Scan_3_ Mult_2

Configures the second multiple of the third scan machine interval. Format: Numeric. Supported from version 6.2

EZapiChannel_ StatisticOperations

uqWatchdogScan3Mult2

Enable_Watchdog_ Scan_1

Determines if the first watchdog scan machine is activated. Format: Boolean. Supported from version 6.2

EZapiChannel_ StatisticOperations

bEnableWatchdogScan4

Watchdog_Scan_4_Start

The low counter index of the fourth watchdog scan machine. Format: Numeric. Supported from version 6.2

EZapiChannel_ StatisticOperations

uqWatchdogScan4Start

Watchdog_Scan_4_Number

The number of counters scanned by the fourth watchdog scan machine. Format: Numeric. Supported from version 6.2

EZapiChannel_ StatisticOperations

uqWatchdogScan4Number

Watchdog_Scan_4_ Interval

Configures the rate at which the fourth Watchdog scan machine scans the counters. This value defines the time between requests to counter N and counter N+1 (in statistic memory clocks). Format: Numeric. Supported from version 6.2

EZapiChannel_ StatisticOperations

uqWatchdogScan4Interval

Watchdog_Scan_4_ Mult_1

Configures the first multiple of the fourth scan machine interval. Format: Numeric. Supported from version 6.2

EZapiChannel_ StatisticOperations

uqWatchdogScan4Mult1

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-46

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Watchdog_Scan_4_ Mult_2

Configures the second multiple of the fourth scan machine interval. Format: Numeric. Supported from version 6.2

EZapiChannel_ StatisticOperations

uqWatchdogScan4Mult2

Enable_RT_Counter Determines if the real-time statistic special counter is updated periodically by the real-time clock machine. Format: Boolean.

EZapiChannel_ StatisticOperations

bEnableRTCounter

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-47

2.3.5.20 NPconfig - STAT_SPECIAL_CNTRS

Description

Defines a set of statistics counters that are used by the NP-3’s internal blocks to track specific events.

API Routine

EZapiChannel_Init( )

API Command

EZapiChannel_InitCmd_SetSpecialCntrs

Example NPconfig( channel = 0, BEGIN_STAT_SPECIAL_CNTRS RT_Cntr = 0x7EA EBDMA_Cntr = 0x780 IBDMA_Cntr = 0x7B0 EFDMA_Base_Cntr = 0x7F0 IFDMA_Base_Cntr = 0x7C0 Modify_Cntr_0 = 0x7ED Modify_Cntr_1 = 0x7EE Modify_Cntr_2 = 0x7EF HiLearn_Cntr_0 = 0x7E8 HiLearn_Cntr_1 = 0x7E9 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

RT_Cntr Address of the Real Time statistic counter. This counter is periodically updated by the real-time clock machine. Format: Numeric.

EZapiChannel_SpecialCntrs uqRTCntr

EBDMA_Cntr Address of the EBDMA discard base statistic counter. This counter is the first of 34 counters which tally EBDMA discards. Must be aligned 64. Format: Numeric.

EZapiChannel_SpecialCntrs uqEBDMACntr

IBDMA_Cntr Address of the IBDMA discard statistic counter. This counter tallies IBDMA discards. Must be aligned 16. Format: Numeric.

EZapiChannel_SpecialCntrs uqIBDMACntr

EFDMA_Base_Cntr Address of the EFDMA discard base statistic counter. This counter is the first of 16 counters which tally EFDMA discards. Must be aligned 16. Format: Numeric.

EZapiChannel_SpecialCntrs uqEFDMABaseCntr

IFDMA_Base_Cntr Address of the IFDMA discard base statistic counter. This counter is the first of 33 counters which tally IFDMA discards. Must be aligned 64. Format: Numeric.

EZapiChannel_SpecialCntrs uqIFDMABaseCntr

Modify_Cntr_0 Address of the TOPmodify discard statistic counter #0. This counter is updated when TOPmodify attempts to send a frame to a full ETFD queue in non-blocking mode. Format: Numeric.

EZapiChannel_SpecialCntrs uqModifyCntr0

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-48

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Modify_Cntr_1 Address of the TOPmodify discard statistic counter #1. This counter is updated when TOPmodify attempts to send a frame to a full HTFD queue in non-blocking mode Format: Numeric.

EZapiChannel_SpecialCntrs uqModifyCntr1

Modify_Cntr_2 Address of the TOPmodify discard statistic counter #2. This counter is updated when TOPmodify attempts to send a frame to a full output queue in non-blocking mode. Format: Numeric.

EZapiChannel_SpecialCntrs uqModifyCntr2

HiLearn_Cntr_0 Address of the High-learn discard statistic counter #0. This counter is updated when a high-learn operation fails due to an empty search pointer queue. Format: Numeric.

EZapiChannel_SpecialCntrs uqHiLearnCntr0

HiLearn_Cntr_1 Address of the High-learn discard statistic counter #1. This counter is updated when a high-learn operation fails due to an empty index queue. Format: Numeric.

EZapiChannel_SpecialCntrs uqHiLearnCntr1

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-49

2.3.5.21 NPconfig - STAT_TB_PROFILE_CFG

Description

Configures parameters for the Token Bucket algorithms.

API Routine

EZapiChannel_Config( )

API Command

EZapiChannel_ConfigCmd_SetStatisticTBProfileCfg

Example NPconfig( channel = 0, BEGIN_STAT_TB_PROFILE_CFG Profile_Num = 1 Algorithm = SR_TCM Color_Aware = TRUE Coupling_Flag = FALSE CIR = 0x3000 CBS = 0x9000 PIR = 0x6000 PBS = 0x12000 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Profile_Num The number of the Token Bucket profile being configured. This number must be consecutive with the previous profile configuration. Format: Numeric.

EZapiChannel_StatisticTBProfile

Algorithm The marking algorithm used for this profile. Valid values: “Inactive”, “Single_Bucket“, “SR_TCM”, “TR_TCM”, “TR_TCM_MEF”.

EZapiChannel_StatisticTBProfile

eAlgorithm

Color_Aware Enable/disable color awareness. TRUE - Color Aware; FALSE - Color Blind. Relevant only for srTCM (“SR_TCM”), trTCM (“TR_TCM”) and trTCM MEF (“TR_TCM_MEF”) algorithms. Format: Boolean.

EZapiChannel_StatisticTBProfile

bColorAware

Coupling_Flag Enable/disable coupling flag. TRUE - coupling flag in on; FALSE - coupling flag is off. Relevant only for trTCM MEF algorithm. Format: Boolean.

EZapiChannel_StatisticTBProfile

bCouplingFlag

CIR Committed Information Rate (in bytes per-second). Format: Numeric.

EZapiChannel_StatisticTBProfile

uqCIR

CBS Committed Burst Size (in bytes). Format: Numeric.

EZapiChannel_StatisticTBProfile

uqCBS

PIR Peak Information Rate (in bytes per-second). Relevant only for trTCM and trTCM MEF algorithms. Format: Numeric.

EZapiChannel_StatisticTBProfile

uqPIR

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-50

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

PBS For srTCM algorithm, the Excess Burst Size (in bytes). For trTCM and trTCM MEF algorithms, the Peak Burst Size (in bytes). Otherwise not relevant. Format: Numeric.

EZapiChannel_StatisticTBProfile

uqPBS

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-51

2.3.5.22 NPconfig - STAT_WATCHDOG_CNTRS

Description

Configures the statistic watchdog counters within each group.

API Routine

EZapiChannel_Config( )

API Command

EZapiChannel_ConfigCmd_SetStatisticWatchdogCntrs

Example NPconfig( channel = 0, BEGIN_STAT_WATCHDOG_CNTRS Start_Id = 0x0 Num_Of_Cntrs = 0x14 Profile = 0xA Current_Value = 0 Last_Value = 0 Valid = TRUE Events = 0 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Start_Id The first counter's index. Format: Numeric.

EZapiChannel_StatisticWatchdogCntrsGrp

uqStartId

Num_Of_Cntrs The number of counters to perform an action on. Format: Numeric.

EZapiChannel_StatisticWatchdogCntrsGrp

uqNumOfCntrs

Profile The profile index the counter is attached to. Format: Numeric.

EZapiChannel_StatisticWatchdogCntr

uqProfile

Current_Value The current value of the counter. Format: Numeric.

EZapiChannel_StatisticWatchdogCntr

uqCurrentValue

Last_Value Last value of the counter. Format: Numeric.

EZapiChannel_StatisticWatchdogCntr

uqLastValue

Valid TRUE if counter is valid. Format: Boolean.

EZapiChannel_StatisticWatchdogCntr

bValid

Events Number of accumulated events. Format: Numeric. Supported from version 6.2

EZapiChannel_StatisticWatchdogCntr

uqEvents

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-52

2.3.5.23 NPconfig - STAT_WATCHDOG_PROFILE_CFG

Description

Configures the values for a watchdog profile.

API Routine

EZapiChannel_Config( )

API Command

EZapiChannel_ConfigCmd_SetStatisticWatchdogProfile

Example NPconfig( channel = 0, BEGIN_STAT_WATCHDOG_PROFILE_CFG Profile = 0x40 Mode = SlidingWindow_Event Min_Threshold = 0x20 Max_Threshold = 0x300 Scan_Machine = 2 Scan_Machine_Mult = 1 Reset_On_Good_Window = TRUE Max_Add_Credits = 15 Max_Sub_Credits = 22 Drop_Rate_Tolerance = 10 Message_Threshold = 5 Sliding_Windows = 4 Events_Threshold = 12 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Profile The profile index. Format: Numeric.

EZapiChannel_ StatisticWatchdog Profile

uqProfile

Mode Defines the mode of counters attached to this profile. Valid values – "AccumulativeWindow", "SlidingWindow_Event", "SlidingWindow_Window". Supported from version 6.2.

EZapiChannel_ StatisticWatchdog Profile

eMode

Min_Threshold Minimum threshold. Format: Numeric.

EZapiChannel_ StatisticWatchdog Profile

uqMinThreshold

Max_Threshold Maximum threshold. Format: Numeric.

EZapiChannel_ StatisticWatchdog Profile

uqMaxThreshold

Scan_Machine Defines the scan machine that the counters are visited by. Format: Numeric. Supported from version 6.2.

EZapiChannel_ StatisticWatchdog Profile

uqScanMachine

Scan_Machine_Mult Defines the scan machine multiple that the counters are visited by. Format: Numeric. Supported from version 6.2.

EZapiChannel_ StatisticWatchdog Profile

uqScanMachineMult

Reset_On_Good_ Window

If TRUE counter will be reset to zero on good window. Format: Boolean. Supported from version 6.2.

EZapiChannel_ StatisticWatchdog Profile

bResetOnGoodWindow

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-53

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Max_Add_Credits Defines the maximum credits to add to the counter on a bad window. Format: Numeric. Supported from version 6.2.

EZapiChannel_ StatisticWatchdog Profile

uqScanMachine

Max_Sub_Credits Defines the maximum credits to subtract from the counter on a good window. Format: Numeric. Supported from version 6.2.

EZapiChannel_ StatisticWatchdog Profile

uqScanMachine

Drop_Rate_Tolerance Defines the drop rate tolerance. Format: Numeric. Supported from version 6.2.

EZapiChannel_ StatisticWatchdog Profile

uqScanMachine

Message_Threshold Defines the threshold to generate a message. Format: Numeric. Supported from version 6.2.

EZapiChannel_ StatisticWatchdog Profile

uqScanMachine

Sliding_Windows Defines number of sliding windows. Format: Numeric. Supported from version 6.2.

EZapiChannel_ StatisticWatchdog Profile

uqScanMachine

Events_Threshold The threshold for events on each window. Format: Numeric. Supported from version 6.2.

EZapiChannel_ StatisticWatchdog Profile

uqEventsThreshold

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-54

2.3.5.24 NPconfig - STAT_TBS

Description

Configures the Token Bucket counters. Token Buckets are configured with either one or two associated profiles that define the parameters for the Token Bucket algorithms used.

API Routine

EZapiChannel_Config( )

API Command

EZapiChannel_ConfigCmd_SetStatisticTBs

Example NPconfig ( channel = 0, BEGIN_STAT_TBS Start_Id = 0x0 Num_Of_Cntrs = 0x28 Profile = 0x50 PeakProfile = 0x3C END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Start_Id The first Token Bucket's index. Format: Numeric.

EZapiChannel_StatisticTBGrp uqStartId

Num_Of_Cntrs The number of counters to perform an action on. Format: Numeric.

EZapiChannel_StatisticTBGrp uqNumOfCntrs

Profile The main profile for the statistic Token Bucket. Relevant only for set commands.

When working in extended profile mode this defines the profile's protocol and committed information. Otherwise, this defines all profile information.

Format: Numeric.

EZapiChannel_StatisticTB uqProfile

PeakProfile The peak profile for the statistic Token Bucket. Relevant only for set commands.

When working in extended profile mode this defines the profile's peak information. Otherwise, not relevant.

Format: Numeric.

EZapiChannel_StatisticTB uqPeakProfile

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-55

2.3.5.25 NPconfig - TOP_MODIFY_CONFIG

Description

Configures parameters that affect the behavior of features that are unique to the TOPmodify engine.

API Routine

EZapiChannel_Config( )

API Command

EZapiChannel_ConfigCmd_SetTopModifyConfig

Example NPconfig( channel = 0, BEGIN_TOP_MODIFY_CONFIG Block_On_Full_ETFD = FALSE Block_On_Full_HTFD = FALSE Block_On_Full_OQ = FALSE END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Block_On_Full_ETFD Enable/disable blocking of TOPmodify when the ETFD queue is full. TRUE - TOPmodify will block when the ETFD queue is full. FALSE - TOPmodify will discard the frame when the ETFD queue is full and increment the Modify_Cntr_0 statistic special counter. Format: Boolean.

EZapiChannel_ TopModifyConfig

bBlockOnFullETFD

Block_On_Full_HTFD Enable/disable blocking of TOPmodify when the HTFD queue is full. TRUE - TOPmodify will block when the HTFD queue is full. FALSE - TOPmodify will discard the frame when the HTFD queue is full and increment the Modify_Cntr_1 statistic special counter. Format: Boolean.

EZapiChannel_ TopModifyConfig

bBlockOnFullHTFD

Block_On_Full_OQ Enable/disable blocking of TOPmodify when the output queue is full. TRUE - TOPmodify will block when the output queue is full. FALSE - TOPmodify will discard the frame when the output queue is full and increment the Modify_Cntr_2 statistic special counter. Format: Boolean.

EZapiChannel_ TopModifyConfig

bBlockOnFullOQ

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-56

2.3.5.26 NPconfig - TOP_PARSE_CONFIG

Description

Configures parameters that affect the behavior of features that are unique to the TOPparse engine.

API Routine

EZapiChannel_Config( )

API Command

EZapiChannel_ConfigCmd_SetTopParseConfig

Example NPconfig( channel = 0, BEGIN_TOP_PARSE_CONFIG

Enable_Lock_Prs_Ctrl = TRUE User_Defined_Data = 0x0 HW_Decoding_Type = Ethernet Creg_Source = Port

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Enable_Lock_Prs_Ctrl Enable/disable passing of the lock ordering control bits from TOPparse to TOPsearch. Format: Boolean.

EZapiChannel_ TopParseConfig

bEnableLockPrsCtrl

User_Defined_Data Configure the four user-defined data bits (these 4 bits can be read by TOPparse microcode). Format: Numeric.

EZapiChannel_ TopParseConfig

uqUserDefinedData

HW_Decoding_Type Configure the frame type for hardware decoding. Valid values: “PPP”, “Ethernet”, “Per_Source”.

EZapiChannel_ TopParseConfig

eHWDecodingType

Creg_Source Configure the source used to define CREG data passed to TOPparse microcode on the TX path. Valid values: “Channel”, “Port”.

EZapiChannel_ TopParseConfig

eCregSource

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-57

2.4 Interface Commands

The Interface commands include:

NPconfig( ) see page 2-13

2.4.1 NP Configuration Commands 2.4.1.1 NPconfig - IF_OUT_OF_BAND_FC

Description

Set configuration parameters for an XGMII out of band flow control interface.

API Routine

EZapiIF_Config( )

API Command

EZapiIF_ConfigCmd_OutOfBandFC_SetConfig

Example NPconfig( channel = 0, BEGIN_IF_OUT_OF_BAND_FC Enable_Transmit_Status = TRUE Enable_Receive_Status = TRUE DIP2_For_Unsync = 0x6 DIP2_For_Sync = 0x2 RX_Calendar_Length = 0x20 RX_Calendar_M = 0x4 TX_Calendar_Length = 0x16 TX_Calendar_M = 0x4 Out_Status_Clock_Frequency_Divider = 0x18 In_Status_Sampling_Point = 0x4 RX_Status_Relative_Delay = 0x4 Reflect_RFD_Status = FALSE Special_RFD_Mode = FALSE END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Enable_Transmit_ Status

Enable sending of status from the interface to the external framer. Setting this field to FALSE will stop the external framer from sending additional frames to the interface. Format: Boolean.

EZapiIF_OutOfBandFC bEnableTransmitStatus

Enable_Receive_ Status

Enable receiving of status (and thus credits) from the external framer. Setting this field to FALSE will stop the interface from sending additional frames to the external framer. Format: Boolean.

EZapiIF_OutOfBandFC bEnableReceiveStatus

DIP2_For_Unsync The number of consecutive DIP2 errors to set out-of-sync indication. Format: Numeric.

EZapiIF_OutOfBandFC uqDIP2ForUnsync

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-58

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

DIP2_For_Sync The number of consecutive correct DIP2 calculations to reset out-of-sync indication. Format: Numeric.

EZapiIF_OutOfBandFC uqDIP2ForSync

RX_Calendar_Length The current length of the RX calendar sequence. Default value is the number of SPI channels defined in the call to the EZapiChannel_Create( ) routine. Format: Numeric.

EZapiIF_OutOfBandFC uqRXCalendarLength

RX_Calendar_M The number of repetitions of the RX calendar sequence. Format: Numeric.

EZapiIF_OutOfBandFC uqRXCalendarM

TX_Calendar_Length The current length of the TX calendar sequence. Default value is the number of SPI channels defined in the call to the EZapiChannel_Create( ) routine. Format: Numeric.

EZapiIF_OutOfBandFC uqTXCalendarLength

TX_Calendar_M The number of repetitions of the TX calendar sequence. Format: Numeric.

EZapiIF_OutOfBandFC uqTXCalendarM

Out_Status_Clock_ Frequency_Divider

Determines the frequency of the status clock (the system clock is divided by this value to generate the status clock). Format: Numeric.

EZapiIF_OutOfBandFC uqOutStatusClock FrequencyDivider

In_Status_Sampling_Point

Incoming status sampling point. Format: Numeric.

EZapiIF_OutOfBandFC uqInStatusSampling Point

RX_Status_Relative_Delay

Receive status delay relatively to receive status clock rising edge in system clocks. Format: Numeric.

EZapiIF_OutOfBandFC uqRXStatusRelative Delay

Reflect_RFD_Status Enable setting of all ports to satisfied in outgoing status sequence in case of XGMII link level flow control from RFD. Format: Boolean.

EZapiIF_OutOfBandFC bReflectRFDStatus

Special_RFD_Mode Enable reflecting RFD congestion level on channels 24-27 outgoing status. Format: Boolean.

EZapiIF_OutOfBandFC bSpecialRFDMode

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-59

2.4.1.2 NPconfig - IF_RGMII

Description

Configures the NP-3’s RGMII interfaces.

API Routine

EZapiIF_Config( )

API Command

EZapiIF_ConfigCmd_RGMII_SetConfig

Example NPconfig( channel = 0, BEGIN_IF_RGMII Min_Frame_Length = 0x3C Max_Frame_Length = 0x3DC0 Ignore_Errors = FALSE In_Band_Link_Status = FALSE RX_Stat_Int_Mask = 0x0 TX_Stat_Int_Mask = 0x0 RGMII_Port = 0 MAC_Address = 0h0000000000000000 Enable_Receive = TRUE Enable_Transmit = TRUE Port_Rate = 1000Mb Obey_Pause_Frames = TRUE Transmit_Pause_Frames = TRUE Pause_Retransmit_Period = 0xF Add_CRC = TRUE Strip_CRC = TRUE Ignore_CRC_Error = FALSE Ignore_Length_Error = TRUE Pad_Short_Frames = TRUE Min_Transmit_IFG = 0xA Min_Receive_IFG = 0x5 Discard_Control_Frames = FALSE

Enable_TM_Header_Mode = FALSE Max_Frame_Length = 0x3DC0 Enable_Stat_Updates = TRUE RGMII_Port = 0hFE MAC_Address = 0h0000000000000000 Enable_Receive = TRUE Enable_Transmit = TRUE Port_Rate = 1000Mb Obey_Pause_Frames = TRUE Transmit_Pause_Frames = TRUE Pause_Retransmit_Period = 0xF Add_CRC = TRUE Strip_CRC = TRUE Ignore_CRC_Error = FALSE Ignore_Length_Error = TRUE Pad_Short_Frames = TRUE Min_Transmit_IFG = 0xC Min_Receive_IFG = 0x5 Discard_Control_Frames = TRUE Enable_TM_Header_Mode = FALSE Max_Frame_Length = 0x3DC0 Enable_Stat_Updates = TRUE END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Min_Frame_Length The minimum frame length (in bytes) for incoming frames (after optionally stripping the CRC). Format: Numeric.

EZapiIF_RGMII uqMinFrameLength

Max_Frame_Length The maximum frame length (in bytes) for incoming frames (after optionally stripping the CRC). Format: Numeric.

EZapiIF_RGMII uqMaxFrameLength

Max_Frame_Length The maximum frame length (in bytes) for incoming frames (after optionally stripping the CRC). Format: Numeric.

EZapiIF_RGMII_Port

uqMaxFrameLength

Ignore_Errors If TRUE, incoming frames for which interface errors were detected are not discarded (and are passed to the TOPs). Format: Boolean.

EZapiIF_RGMII bIgnoreErrors

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-60

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

In_Band_Link_Status If TRUE, link status change indication is taken from in-band data. If FALSE, link status change indication is taken from MII interface. Format: Boolean.

EZapiIF_RGMII bInBandLinkStatus

RX_Stat_Int_Mask The interrupt mask for the RX RGMII statistic interrupts vector. Format: Numeric.

EZapiIF_RGMII uqRXStatIntMask

TX_Stat_Int_Mask The interrupt mask for the TX RGMII statistic interrupts vector. Format: Numeric.

EZapiIF_RGMII uqTXStatIntMask

RGMII_Port RGMII per-port configuration array. Includes an element for each of the 8 RGMII ports (0-7) and for each of the two Host RGMII ports (8-9). Format: Numeric, bytestream (bit-mask) or “ALL”

EZapiIF_RGMII asRGMIIPorts

MAC_Address The MAC address for the RGMII port. Bytes 0-5 contain octets 1-6 accordingly. Bytes 6-7 should be set to 0. Format: Bytestream

EZapiIF_RGMII_Port

aucMACAddress

Enable_Receive Enable receiving of frames on the interface. Format: Boolean.

EZapiIF_RGMII_Port

bEnableReceive

Enable_Transmit Enable transmitting of frames on the interface. Format: Boolean.

EZapiIF_RGMII_Port

bEnableTransmit

Port_Rate The rate of the RGMII port. Valid values: “10Mb”, ”100Mb”, ”1000Mb”.

EZapiIF_RGMII_Port

ePortRate

Obey_Pause_Frames If set to TRUE, the interface will obey pause frames it receives. If set to FALSE, the interface will ignore pause frames it receives. Format: Boolean.

EZapiIF_RGMII_Port

bObeyPauseFrames

Transmit_Pause_ Frames

Enable/disable transmitting of pause frames by this interface. Format: Boolean.

EZapiIF_RGMII_Port

bTransmitPauseFrames

Pause_Retransmit_ Period

Defines the period of time (in nanoseconds) before retransmitting flow control pause frames. Format: Numeric.

EZapiIF_RGMII_Port

uqPauseRetransmit Period

Add_CRC If TRUE, 4 bytes of CRC are appended to all outgoing frames. Format: Boolean.

EZapiIF_RGMII_Port

bAddCRC

Strip_CRC If TRUE, 4 bytes of CRC are stripped from all incoming frames. Format: Boolean.

EZapiIF_RGMII_Port

bStripCRC

Ignore_CRC_Error If FALSE, the CRC is checked for incoming frames, and frames with an incorrect CRC are discarded. Format: Boolean.

EZapiIF_RGMII_Port

bIgnoreCRCError

Ignore_Length_Error If FALSE, the frame length field is validated against the actual data field length, and the frame is discarded if the validation fails. Format: Boolean.

EZapiIF_RGMII_Port

bIgnoreLengthError

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-61

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Pad_Short_Frames If TRUE, all outgoing frames shorter than 64 bytes will be padded to 64 bytes (including CRC). Format: Boolean.

EZapiIF_RGMII_Port

bPadShortFrames

Min_Transmit_IFG Minimum IFG (in bytes) between transmitted packets. Format: Numeric.

EZapiIF_RGMII_Port

uqMinTransmitIFG

Min_Receive_IFG Minimum IFG (in bytes) between received packets. Format: Numeric.

EZapiIF_RGMII_Port

uqMinReceiveIFG

Discard_Control_ Frames

If TRUE, incoming RGMII control frames are discarded at the interface and are not passed to the TOPs. Format: Boolean.

EZapiIF_RGMII_Port

bDiscardControlFrames

Enable_TM_Header_ Mode

If TRUE, first 4 bytes of the frame are treated as TM header. Format: Boolean.

EZapiIF_RGMII_Port

bEnableTMHeaderMode

Enable_Stat_Updates Enable/disable statistic counter updates. Format: Boolean.

EZapiIF_RGMII_Port

bEnableStatUpdates

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-62

2.4.1.3 NPconfig - IF_RGMII_PHY_CONFIG

Description

Configures the NP-3’s RGMII (and host RGMII) PHY management configuration parameters.

API Routine

EZapiIF_Config( )

API Command

EZapiIF_ConfigCmd_RGMII_SetPhyConfig

Example NPconfig( channel = 0, BEGIN_IF_RGMII_PHY_CONFIG MII_Clock_Divider = 0x80 MII_Supress_Preamble = FALSE Scan_Link_Status = FALSE Start_Scan_PHY_Address = 0 Stop_Scan_PHY_Address = 0 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

MII_Clock_Divider Determines the frequency of the management clock (the source clock is divided by this value to generate the management clock). Format: Numeric.

EZapiIF_RGMII_PHYConfig

uqMIIClockDivider

MII_Supress_ Preamble

If TRUE, the MII management preamble is not generated (this reduces the management cycle. Format: Boolean.

EZapiIF_RGMII_PHYConfig

bMIISupressPreamble

Scan_Link_Status If TRUE, the NP-3 will scan the PHY addresses between uqStartScanPHYAddress and uqStopScanPHYAddress for link status changes and generate an interrupt if a change occurs. Format: Boolean.

EZapiIF_RGMII_PHYConfig

bScanLinkStatus

Start_Scan_PHY_ Address

The address to start scanning at. Relevant only if bScanPHYStatus is TRUE. Format: Numeric.

EZapiIF_RGMII_PHYConfig

uqStartScanPHYAddress

Stop_Scan_PHY_ Address

The address to stop scanning at. Relevant only if bScanPHYStatus is TRUE. Format: Numeric.

EZapiIF_RGMII_PHYConfig

uqStopScanPHYAddress

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-63

2.4.1.4 NPconfig - IF_RGMII_PHY_REGISTER

Description

Write an RGMII PHY register.

API Routine

EZapiIF_Config( )

API Command

EZapiIF_ConfigCmd_RGMII_WritePhyReg

Example NPconfig( channel = 0, BEGIN_IF_RGMII_PHY_REGISTER PHY_Address = 0x9 Register_Address = 0x5 Data = 0x8988 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

PHY_Address The address of the PHY. Format: Numeric.

EZapiIF_RGMII_PHYRegister uqPHYAddress

Register_Address The register address to access in the PHY. Format: Numeric.

EZapiIF_RGMII_PHYRegister uqRegisterAddress

Data Data to write. Format: Numeric.

EZapiIF_RGMII_PHYRegister uqData

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-64

2.4.1.5 NPconfig - IF_RGMII_RATE_LIMIT

Description

Configures the NP-3’s RGMII port rate limit.

API Routine

EZapiIF_Config( )

API Command

EZapiIF_ConfigCmd_RGMII_SetRateLimit

Example NPconfig( channel = 0, BEGIN_IF_RGMII_RATE_LIMIT Port = all Enable = TRUE High_Thresh = 0x20000 Low_Thresh = 0x10000 Rate_Limit = 0x3200 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Port RGMII per-port configuration array. Includes an element for each of the 8 RGMII ports (0-6) and for each of the two Host SGMII ports (7-8). Format: Numeric, bytestream (bit-mask), "Host_0", "Host_1" or “ALL”.

EZapiIF_RGMII_RateLimit uqPort

Enable Enable/disable use of the rate limit mechanism. Format: Boolean.

EZapiIF_RGMII_RateLimit bEnable

High_Thresh Flow control is activated when the rate limit counter exceeds this value. Format: Numeric.

EZapiIF_RGMII_RateLimit uqHighThresh

Low_Thresh Flow control is de-activated when the rate limit counter becomes less than this value. Format: Numeric.

EZapiIF_RGMII_RateLimit uqLowThresh

Rate_Limit The rate limit (in bytes per-second). Format: Numeric.

EZapiIF_RGMII_RateLimit uqRateLimit

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-65

2.4.1.6 NPconfig - IF_SPI_A and IF_SPI_B

Description

Configures the NP-3’s two SPI4.2 interfaces.

API Routine

EZapiIF_Config( )

API Command

EZapiIF_ConfigCmd_SPIA_SetConfig EZapiIF_ConfigCmd_SPIB_SetConfig

Example NPconfig( channel = 0, BEGIN_IF_SPI_A Enable_Transmit_Status = TRUE Enable_Receive_Status = TRUE Training_Sequence_Interval = 0x3 Training_Sequences = 0x1 DIP4_For_Unsync = 0x2 DIP4_For_Sync = 0x6 DIP2_For_Unsync = 0x2 DIP2_For_Sync = 0x6 Min_Frame_Length = 0x3C Max_Frame_Length = 0x3DC0 Ignore_Errors = FALSE RX_Enable_Hitless_BW_Rep = FALSE RX_Fixed_Calendar_Sequence = TRUE RX_Calendar_Length = 0x1 RX_Max_Calendar_Length = 0x0 RX_Calendar_Sequence = NULL RX_Calendar_M = 0x4 TX_Enable_Hitless_BW_Rep = FALSE TX_Fixed_Calendar_Sequence = TRUE

TX_Calendar_Length = 0x1 TX_Max_Calendar_Length = 0x0 TX_Calendar_M = 0x4 TX_Calendar_Sequence = NULL Transfer_Size = 0x80 Reset_Credits_On_Satisfy = FALSE Enable_Full_Packet_Mode = FALSE SPI_Profile = 0 Max_Burst_1 = 0x200 Max_Burst_2 = 0x100 Scheduling_Weight = Normal SPI_Profile = 0h0E Max_Burst_1 = 0x200 Max_Burst_2 = 0x100 Scheduling_Weight = Normal SPI_Channel = 1 Profile = 0x0 SPI_Channel = 0hFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE Profile = 0x0 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API

STRUCTURE API FIELD NAME

Enable_Transmit_ Status

Enable sending of status from the interface to the external framer. Setting this field to FALSE will stop the external framer from sending additional frames to the interface. Format: Boolean.

EZapiIF_SPI bEnableTransmitStatus

Enable_Receive_ Status

Enable receiving of status (and thus credits) from the external framer. Setting this field to FALSE will stop the interface from sending additional frames to the external framer. Format: Boolean.

EZapiIF_SPI bEnableReceiveStatus

Training_Sequence_ Interval

Time period (in system clocks) between two subsequent periodic training sequences. Format: Numeric.

EZapiIF_SPI uqTrainingSequence Interval

Training_Sequences The number of training sequences to send at each interval. Format: Numeric.

EZapiIF_SPI uqTrainingSequences

DIP4_For_Unsync The number of consecutive DIP4 errors to set out-of-sync indication. Format: Numeric.

EZapiIF_SPI uqDIP4ForUnsync

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-66

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE

API FIELD NAME

DIP4_For_Sync The number of consecutive correct DIP4 calculations to reset out-of-sync indication. Format: Numeric.

EZapiIF_SPI uqDIP4ForSync

DIP2_For_Unsync The number of consecutive DIP2 errors to set out-of-sync indication. Format: Numeric.

EZapiIF_SPI uqDIP2ForUnsync

DIP2_For_Sync The number of consecutive correct DIP2 calculations to reset out-of-sync indication. Format: Numeric.

EZapiIF_SPI uqDIP2ForSync

Min_Frame_Length The minimum frame length (in bytes) for incoming frames. Format: Numeric.

EZapiIF_SPI uqMinFrameLength

Max_Frame_Length The maximum frame length (in bytes) for incoming frames. Format: Numeric.

EZapiIF_SPI uqMaxFrameLength

Ignore_Errors If TRUE, incoming frames for which errors were detected are not discarded (and are passed to the TOPs). Relevant only when the SPI interface transfers incoming frames directly to the TOPs (and not via a TM). Format: Boolean.

EZapiIF_SPI bIgnoreErrors

RX_Enable_Hitless_BW_Rep

Specifies if to enable hitless bandwidth re-provisioning on the receive path. Format: Boolean.

EZapiIF_SPI bRXEnableHitlessBW Rep

RX_Fixed_Calendar_Sequence

Specifies if a fixed calendar sequence is used on the receive path. In fixed mode, the sequence includes each SPI channel once. In user-defined mode, the sequence is defined by the user according to RX_Calendar_Length and RX_Calendar_Sequence, and can contain each SPI channel any number of times. Format: Boolean.

EZapiIF_SPI bRXFixedCalendar Sequence

RX_Calendar_Length The current length of the RX calendar sequence. Default value is the number of SPI channels defined in the call to the EZapiChannel_Create( ) routine. Format: Numeric.

EZapiIF_SPI uqRXCalendarLength

RX_Max_Calendar_ Length

The maximum length of the user-defined RX calendar sequence. Can be set to 0 for fixed-calendar sequence mode. For SPI-A, value must be a multiple of 4. For SPI-B, value must be a multiple of 6. Format: Numeric.

EZapiIF_SPI uqRXMaxCalendar Length

RX_Calendar_ Sequence

The user-defined RX calendar sequence. Relevant only for user defined calendar sequence mode. Index i specifies the SPI channel to transmit at position i of the calendar sequence. The length of the buffer is RX_Calendar_Length. Can be set to NULL, in which case the calendar sequence is not set. Format: Bytestream or “NULL”.

EZapiIF_SPI pucRXCalendar Sequence

RX_Calendar_M The number of repetitions of the RX calendar sequence. Format: Numeric.

EZapiIF_SPI uqRXCalendarM

TX_Enable_Hitless_BW_Rep

Specifies if to enable hitless bandwidth re-provisioning on the transmit path. Format: Boolean.

EZapiIF_SPI bTXEnableHitlessBW Rep

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-67

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE

API FIELD NAME

TX_Fixed_Calendar_Sequence

Specifies if a fixed calendar sequence is used on the transmit path. In fixed mode, the sequence includes each SPI channel once. In user-defined mode, the sequence is defined by the user according to TX_Calendar_Length and TX_Calendar_Sequence, and can contain each SPI channel any number of times. Format: Boolean.

EZapiIF_SPI bTXFixedCalendar Sequence

TX_Calendar_Length The current length of the TX calendar sequence. Default value is the number of SPI channels defined in the call to the EZapiChannel_Create( ) routine. Format: Numeric.

EZapiIF_SPI uqTXCalendarLength

TX_Max_Calendar_ Length

The maximum length of the user-defined TX calendar sequence. Can be set to zero for fixed-calendar sequence mode. For SPI-A, value must be a multiple of 4. For SPI-B, value must be a multiple of 6. Format: Numeric.

EZapiIF_SPI uqTXMaxCalendar Length

TX_Calendar_M The number of repetitions of the TX calendar sequence. Format: Numeric.

EZapiIF_SPI uqTXCalendarM

TX_Calendar_ Sequence

The user-defined TX calendar sequence. Relevant only for user defined calendar sequence mode. Index i specifies the SPI channel to transmit at position i of the calendar sequence. The length of the buffer is TX_Calendar_Length. Can be set to NULL, in which case the calendar sequence is not set. Format: Bytestream or “NULL”.

EZapiIF_SPI pucTXCalendar Sequence

Transfer_Size The maximum transfer size (in bytes). Format: Numeric.

EZapiIF_SPI uqTransferSize

Reset_Credits_On_ Satisfy

If TRUE, any existing credits are discarded when a satisfy status is received for an SPI channel. Format: Boolean.

EZapiIF_SPI bResetCreditsOnSatisfy

Enable_Full_Packet_Mode

If TRUE, SPI full packet mode feature is enabled (entire packets are sent as a single burst with no interleaving of data from several channels). Relevant only when a TM is used to transmit to the SPI interface. Format: Boolean.

EZapiIF_SPI bEnableFullPacketMode

SPI_Profile SPI profile configuration array. Format: Numeric, bytestream (bit-mask) or “ALL”.

EZapiIF_SPI asProfiles

Max_Burst_1 Credits for starving mode (in bytes) for the SPI channel. Should be greater than or equal to uqTransferSize. Format: Numeric.

EZapiIF_SPI_Profile

uqMaxBurst1

Max_Burst_2 Credits for hungry mode (in bytes) for the SPI channel. Valid values are the same as for uqMaxBurst1. Should be greater than or equal to uqTransferSize. Format: Numeric.

EZapiIF_SPI_Profile

uqMaxBurst2

Scheduling_Weight The weight in the WRR scheduler for the SPI channel. Valid values: “Normal”, “Medium”, ”High”.

EZapiIF_SPI_Profile

eSchedulingWeight

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-68

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE

API FIELD NAME

SPI_Channel SPI channel configuration array. The number of valid structures in the array is the number of SPI channels in the interface being configured. Format: Numeric, bytestream (bit-mask) or “ALL”.

EZapiIF_SPI asSPIChannels

Profile The profile this SPI channel is attached to. Format: Numeric.

EZapiIF_SPI_Channel

uqProfile

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-69

2.4.1.7 NPconfig - IF_TIMEOUT_PARAMS

Description

Set configuration parameters for timeout of outgoing frames.

API Routine

EZapiIF_Config( )

API Command

EZapiIF_ConfigCmd_SetTimeoutParams

Example NPconfig( channel = 0, BEGIN_IF_TIMEOUT_PARAMS Enable_RX_Timeout = FALSE RX_Timeout = 0x0 Enable_TX_Timeout = FALSE TX_Timeout = 0x0 Enable_TMa_Timeout = FALSE TMa_Timeout = 0x0 Enable_TMb_Timeout = FALSE TMb_Timeout = 0x0 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Enable_RX_Timeout Enable/disable timeout in the internal DMAs for outgoing frames on the RX path. Format: Boolean.

EZapiIF_TimeoutParams

bEnableRXTimeout

RX_Timeout The timeout (in milliseconds) in the internal DMAs for outgoing frames on the RX path. Format: Numeric

EZapiIF_TimeoutParams

uqRXTimeout

Enable_TX_Timeout Enable/disable timeout in the internal DMAs for outgoing frames on the TX path. Format: Boolean.

EZapiIF_TimeoutParams

bEnableTXTimeout

TX_Timeout The timeout (in milliseconds) in the internal DMAs for outgoing frames on the TX path. Format: Numeric

EZapiIF_TimeoutParams

uqTXTimeout

Enable_TMa_Timeout Enable/disable timeout in TMa for outgoing frames. Format: Boolean.

EZapiIF_TimeoutParams

bEnableTMaTimeout

TMa_Timeout The timeout (in milliseconds) in TMa for outgoing frames. Format: Numeric

EZapiIF_TimeoutParams

uqTMaTimeout

Enable_TMb_Timeout Enable/disable timeout in TMb for outgoing frames. Format: Boolean.

EZapiIF_TimeoutParams

bEnableTMbTimeout

TMb_Timeout The timeout (in milliseconds) in TMb for outgoing frames. Format: Numeric

EZapiIF_TimeoutParams

uqTMbTimeout

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-70

2.4.1.8 NPconfig - IF_XGMII

Description

Configures the NP-3’s XGMII interface.

API Routine

EZapiIF_Config( )

API Command

EZapiIF_ConfigCmd_XGMII_SetConfig

Example NPconfig( channel = 0, BEGIN_IF_XGMII MAC_Address = 0h0000000000000000 Enable_Receive = TRUE Enable_Transmit = TRUE Obey_Pause_Frames = TRUE Transmit_Pause_Frames = TRUE Pause_Retransmit_Period = 0x2DC6C0 Min_Frame_Length = 0x3C Max_Frame_Length = 0x3DC0 Ignore_Errors = FALSE Add_CRC = TRUE Strip_CRC = TRUE

Ignore_CRC_Error = FALSE Ignore_Length_Error = TRUE Pad_Short_Frames = TRUE Min_Transmit_IFG = 0x8 Min_Receive_IFG = 0x4 IFG_Rate_Control = FALSE Hi_Gig_Mode = FALSE Discard_Control_Frames = TRUE Enable_Stat_Updates = TRUE RX_Stat_Int_Mask = 0x0 TX_Stat_Int_Mask = 0x0 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

MAC_Address The MAC address for the XGMII port. Bytes 0-5 contain octets 1-6 accordingly. Bytes 6-7 should be set to 0. Format: Bytestream

EZapiIF_XGMII aucMACAddress

Enable_Receive Enable receiving of frames on the interface. Format: Boolean.

EZapiIF_XGMII bEnableReceive

Enable_Transmit Enable transmitting of frames on the interface. Format: Boolean.

EZapiIF_XGMII bEnableTransmit

Obey_Pause_ Frames

If set to TRUE, the interface will obey pause frames it receives. If set to FALSE, the interface will ignore pause frames it receives. Format: Boolean.

EZapiIF_XGMII bObeyPauseFrames

Transmit_Pause_ Frames

Enable/disable transmitting of pause frames by this interface. Format: Boolean.

EZapiIF_XGMII bTransmitPauseFrames

Pause_Retransmit_ Period

Defines the period of time (in nanoseconds) before retransmitting flow control pause frames. A value of 0 indicates no retransmitting of pause frames. Format: Numeric.

EZapiIF_XGMII uqPauseRetransmitPeriod

Min_Frame_Length The minimum frame length (in bytes) for incoming frames (after optionally stripping the CRC). Format: Numeric.

EZapiIF_XGMII uqMinFrameLength

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-71

ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

Max_Frame_Length The maximum frame length (in bytes) for incoming frames (after optionally stripping the CRC). Format: Numeric.

EZapiIF_XGMII uqMaxFrameLength

Ignore_Errors If TRUE, incoming frames for which interface errors were detected are not discarded (and are passed to the TOPs). Relevant only when the XGMII interface transfers incoming frames directly to the TOPs (and not via a TM). Format: Boolean.

EZapiIF_XGMII bIgnoreErrors

Add_CRC If TRUE, 4 bytes of CRC are appended to all outgoing frames. Format: Boolean.

EZapiIF_XGMII bAddCRC

Strip_CRC If TRUE, 4 bytes of CRC are stripped from all incoming frames. Format: Boolean.

EZapiIF_XGMII bStripCRC

Ignore_CRC_Error If FALSE, the CRC is checked for incoming frames, and frames with an incorrect CRC are discarded. Format: Boolean.

EZapiIF_XGMII bIgnoreCRCError

Ignore_Length_Error If FALSE, the frame length field is validated against the actual data field length, and the frame is discarded if the validation fails. Format: Boolean.

EZapiIF_XGMII bIgnoreLengthError

Pad_Short_Frames If TRUE, all outgoing frames shorter than 64 bytes will be padded to 64 bytes (including CRC). Format: Boolean.

EZapiIF_XGMII bPadShortFrames

Min_Transmit_IFG Minimum IFG (in bytes) between transmitted packets. Format: Numeric.

EZapiIF_XGMII uqMinTransmitIFG

Min_Receive_IFG Minimum IFG (in bytes) between received packets. Format: Numeric.

EZapiIF_XGMII uqMinReceiveIFG

IFG_Rate_Control When set, the MAC operates in self pace mode (minimum IFG length depends on the previous frame length). Should be set to FALSE for operation with a LAN PHY. Should be set to TRUE for operation with a WAN PHY. Format: Boolean.

EZapiIF_XGMII bIFGRateControl

Hi_Gig_Mode Set to TRUE to configure the interface to work in HiGig™ mode. Format: Boolean.

EZapiIF_XGMII bHiGigMode

Discard_Control_ Frames

Enable receiving of frames on the interface. Format: Boolean.

EZapiIF_XGMII bDiscardControlFrames

Enable_Stat_ Updates

Enable/disable statistic counter updates. Format: Boolean.

EZapiIF_XGMII bEnableStatUpdates

RX_Stat_Int_Mask The interrupt mask for the RX XGMII statistic interrupts vector. Format: Numeric.

EZapiIF_XGMII uqRXStatIntMask

TX_Stat_Int_Mask The interrupt mask for the TX XGMII statistic interrupts vector. Format: Numeric.

EZapiIF_XGMII uqTXStatIntMask

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-72

2.4.1.9 NPconfig - IF_XGMII_PHY_CONFIG

Description

Configures the NP-3’s XGMII PHY management configuration parameters.

API Routine

EZapiIF_Config( )

API Command

EZapiIF_ConfigCmd_XGMII_SetPhyConfig

Example NPconfig( channel = 0, BEGIN_IF_XGMII_PHY_CONFIG MII_Clock_Divider = 0x80 MII_Supress_Preamble = FALSE END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

MII_Clock_Divider Determines the frequency of the management clock (the source clock is divided by this value to generate the management clock). Format: Numeric.

EZapiIF_XGMII_PHYConfig

uqMIIClockDivider

MII_Supress_ Preamble

If TRUE, the MII management preamble is not generated (this reduces the management cycle. Format: Boolean.

EZapiIF_XGMII_PHYConfig

bMIISupressPreamble

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-73

2.4.1.10 NPconfig - IF_XGMII_PHY_REGISTER

Description

Write an XGMII PHY register.

API Routine

EZapiIF_Config( )

API Command

EZapiIF_ConfigCmd_XGMII_WritePhyReg

Example NPconfig( channel = 0, BEGIN_IF_XGMII_PHY_REGISTER PHY_Address = 0x1 Device_Address = 0x1 Register_Address = 0x5 Clause_45 = TRUE Data = 0x7809 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES API STRUCTURE API FIELD NAME

PHY_Address The address of the PHY. Format: Numeric

EZapiIF_XGMII_PHYRegister uqPHYAddress

Device_Address The device address inside the PHY. Format: Numeric

EZapiIF_XGMII_PHYRegister uqDeviceAddress

Register_Address The register address to access in the PHY. Format: Numeric.

EZapiIF_XGMII_PHYRegister uqRegisterAddress

Clause_45 Defines the standard used to perform management commands: If TRUE, IEEE 802.3 clause 45 (10G standard) is used. If FALSE, IEEE 802.3 clause 22 (1G standard) is used. Format: Boolean.

EZapiIF_XGMII_PHYRegister bClause45

Data Data to write. Format: Numeric.

EZapiIF_XGMII_PHYRegister uqData

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-74

2.5 Traffic Manager Commands

The TM commands include:

TMconfig( ) see page 2-74

2.5.1 TM Configuration Commands NPsl Command

TMconfig( )

Description

Configures the embedded traffic managers. The TMconfig commands in this section are organized alphabetically, however each block should be written according to the initialization sequence.

The TMconfig arguments are “channel = ” and “TM_Id”are mandatory. Additional TMconfig arguments that are mandatory are specified. Arguments not specified will maintain their current setting in the Driver. If they have not been specified previously, they are assigned the default initialization value by the Driver.

API Routine

EZapiTM_Init( )

Example TMconfig ( Channel = 0, TM_Id = TMa [ BEGIN_NAME_OF_CONFIG_BLOCK [argument = argument_value] END ] );

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Channel The channel number. Format: Numeric.

M uiChannelId

TM_Id Specifies the embedded traffic manager to be configured. Valid values: “TMa”, “TMb”.

M eTM

The TMconfig commands utilize the loops function in order to perform a series of configurations. TMconfig ( channel = 0, TM_id = TMa, [LOOP ( variable_1 = start, end , increment )] [LOOP ( variable_2 = start, end , increment )] BEGIN_TM_BLOCK .... END [BEGIN_TM_BLOCK .... END] [ENDLOOP] [ENDLOOP] );

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-75

Each loop statement is performed in an identical manner to the C loop: for( variable=start; variable<end; Variable+=increment ) { BEGIN_TM_BLOCK .... END [BEGIN_TM_BLOCK .... END] }

The following describes the allowed values for each element:

start – Constant,variable or expression.

end – Constant,variable or expressionincrement – Constant,variable or expression.

constant – 0, 4, 0x7

variable – x, y, var_1 (must be used before)

expression – x, x+2, y+x*3, [y-2]*5

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-76

2.5.1.1 TMconfig - ENTITY_PARAMS

Description

Assign a set of profiles and parameters for single entity in a single level.

API Routine

EZapiTM_Config( )

API Command

EZapiTM_ConfigCmd_SetEntityParams

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_ENTITY_PARAMS Level = 3 Entity = 245 Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Priority = Normal Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 1 WFQ_Profile = 0x0

END);

TMconfig( channel = 0, TM_Id = TMb

BEGIN_ENTITY_PARAMS Level = 3 Entity = Rel2Abs( L0_Rel = 0x0, L1_Rel = 0x4, L2_Rel = 0x2, L3_Rel = 0x2 ) Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Priority = Normal Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 1 WFQ_Profile = 0x0

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Level The level of the entity to configure. Valid values: “0”, “1”, “2”, “3”, “4”.

M EZapiTM_EntityParams eLevel

Entity The absolute position (within the level) of the entity to configure. Format: Numeric. Can also be set using the Rel2Abs() macro which receives a series of relative positions (see field descriptions below) and translates them to an absolute index.

M EZapiTM_EntityParams uqEntity

Entity_Mode The entity's mode. Valid values: “Disabled”,”Suspended”,”Enabled”.

- EZapiTM_EntityParams eEntityMode

WRED_Profile The WRED profile to attach this entity to. Format: Numeric.

- EZapiTM_EntityParams uqWREDProfile

WRED_Scaling_ Profile

The WRED scaling profile for this entity. Format: Numeric.

- EZapiTM_EntityParams uqWREDScalingProfile

Priority The scheduling priority for this entity. Valid values: “Normal”, “High”,”Propagated”.

- EZapiTM_EntityParams ePriority

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-77

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Shaping_Mode The shaping mode for this entity. The shaping mode determines if the entity uses a shaping profile and, if so, how this shaping profile is interpreted. Valid values: “Explicit”, “Unshaped”, “Best_Effort”, “Unlimited_Excess”, “No_Excess”, “No_Commit”.

- EZapiTM_EntityParams eShapingMode

Shaping_Profile The shaping profile for this entity. Format: Numeric.

- EZapiTM_EntityParams uqShapingProfile

Shaping_Factor The shaping factor for this entity. The shaping factor allows to multiply the value of the shaping profile for this entity by one of 4 factors. Valid values: “1”, “2”, “4”, “0.5”, “.5”, “One”, “Two”, “Four”, “Half”.

- EZapiTM_EntityParams eShapingFactor

WFQ_Profile The WFQ profile for this entity. Format: Numeric.

- EZapiTM_EntityParams uqWFQProfile

L0_Rel The index of the L0 entity (this is also the absolute index). Format: Numeric

- EZapiTM_TranslationParams

uqL0RelativeIndex

L1_Rel The relative index of the L1 entity within the L0 entity. For special queues and FLATx256 mode, set to Invalid. Format: Numeric or “Invalid”

- EZapiTM_Translation Params

uqL1RelativeIndex

L2_Rel The relative index of the L2 entity. For special queues and FLATx256 mode this is relative to the L0 entity. Otherwise, this is relative to the L1 entity. Format: Numeric

- EZapiTM_Translation Params

uqL2RelativeIndex

L3_Rel The relative index of the L3 entity (within the L2 entity). Format: Numeric

- EZapiTM_Translation Params

uqL3RelativeIndex

L4_Rel The relative index of the L4 entity (within the L3 entity). Format: Numeric.

- EZapiTM_Translation Params

uqL4RelativeIndex

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-78

2.5.1.2 TMconfig - ENTITY_TOPOLOGY_PARAMS

Description

Define the topological mapping between entities in levels 2, 3 and 4 of the TM.

API Routine

EZapiTM_Init( )

API Command

EZapiTM_InitCmd_SetEntityTopologyParams

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_ENTITY_TOPOLOGY_PARAMS Level = 2 Entity = 0x2 First_Next_Level_Entity = 0x3 Num_Next_Level_Entities = 0x4 L34_Mode = 4_L4_SERVICES L4_Service_Profile = 0x0

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Level The level of the entity to configure. Format: Numeric.

M EZapiTM_Entity TopologyParams

eLevel

Entity The absolute position (within the level) of the entity to configure. Format: Numeric.

M EZapiTM_Entity TopologyParams

uqEntity

First_Next_Level_Entity The absolute index of the first son (in the next level) for the entity being configured. Format: Numeric.

M EZapiTM_Entity TopologyParams

uqFirstNextLevelEntity

Num_Next_Level_Entities The number of sons (in the next level) for the entity being configured (entity uqEntity in level eLevel). Format: Numeric.

M EZapiTM_Entity TopologyParams

uqNumNextLevel Entities

L34_Mode Defines the number of L4 services mapped to each L3 user. Valid values: “4_L4_SERVICES”, “8_L4_SERVICES”.

(M) EZapiTM_Entity TopologyParams

eL34Mode

L4_Service_Profile The L4 service profile assigned to the mapped L4 entities. Format: Numeric.

(M) EZapiTM_Entity TopologyParams

uqL4ServiceProfile

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-79

2.5.1.3 TMconfig - ADD_ENTITY_TOPOLOGY_PARAMS

Description

Add the topological mapping between entities in levels 2, 3 and 4 of the TM.

API Routine

EZapiTM_Config( )

API Command

EZapiTM_ConfigCmd_AddEntityTopologyParams

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_ADD_ENTITY_TOPOLOGY_PARAMS Level = 2 Entity = 0x2 First_Next_Level_Entity = 0x3 Num_Next_Level_Entities = 0x4 L34_Mode = 4_L4_SERVICES L4_Service_Profile = 0x0

END);

Details

Same as TMconfig - ENTITY_TOPOLOGY_PARAMS.

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-80

2.5.1.4 TMconfig - REMOVE_ENTITY_TOPOLOGY_PARAMS

Description

Remove the topological mapping between entities in levels 2, 3 and 4 of the TM.

API Routine

EZapiTM_Config( )

API Command

EZapiTM_ConfigCmd_RemoveEntityTopologyParams

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_REMOVE_ENTITY_TOPOLOGY_PARAMS Level = 2 Entity = 0x2 First_Next_Level_Entity = 0x3 Num_Next_Level_Entities = 0x4 L34_Mode = 4_L4_SERVICES L4_Service_Profile = 0x0

END);

Details

Same as TMconfig - ENTITY_TOPOLOGY_PARAMS.

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-81

2.5.1.5 TMconfig - FCU_PARAMS

Description

Configure FCU general parameters.

API Routine.

EZapiTM_Init( )

API Command

EZapiTM_InitCmd_SetFCUParams

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_FCU_PARAMS Enable_Per_Source = FALSE Enable_TMa_Per_Dest = FALSE TMa_Dest_Indications = FALSE Enable_TMb_Per_Dest = FALSE

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Enable_Per_Source Enable per-source flow control (for both TMs). This also enables the global interrupt. Format: Boolean

- EZapiTM_FCUParams bEnablePerSource

Enable_TMa_Per_Dest Enable per-destination flow control for TMa. This also enables interrupts and TOP indications for TMa aggregate usage and all special ports. Format: Boolean

- EZapiTM_FCUParams bEnableTMaPerDest

TMa_Dest_Indications Enable TMa 128 destination indications mode. If enabled, indications to host are generated for 128 TMa destinations (0-127) instead of per-destination flow-control on 32 TMa destinations (0-31). Format: Boolean

- EZapiTM_FCUParams bTMaDestIndications

Enable_TMb_Per_Dest Enable per-destination flow control for TMb. This also enables interrupts and TOP indications for TMB aggregate usage. Format: Boolean

- EZapiTM_FCUParams bEnableTMbPerDest

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-82

2.5.1.6 TMconfig - FCU_PROFILE

Description

Configure a FCU profile.

API Routine

EZapiTM_Config( )

API Command

EZapiTM_ConfigCmd_SetFCUProfile

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_FCU_PROFILE Profile = 7 High_Thresh = 0x80000 Low_Thresh = 0x70000

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Profile The profile ID. Format: Numeric.

M EZapiTM_FCUProfile uqProfile

High_Thresh The high threshold value. When the number of buffers exceeds this value, the flow control, status or interrupt is initiated (according to the FCU type attached to this profile). Format: Numeric.

- EZapiTM_FCUProfile uqHighThresh

Low_Thresh The low threshold value. When the number of buffers exceeds this value, the flow control, status or interrupt is terminated. Format: Numeric.

- EZapiTM_FCUProfile uqLowThresh

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-83

2.5.1.7 TMconfig - FCU_LIMIT

Description

Configure a profile index to set the limit for a source, destination, interrupt or indication to the network processor’s TOPs.

API Routine

EZapiTM_Config( )

API Command

EZapiTM_ConfigCmd_SetFCULimit

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_FCU_LIMIT Type = Per_Source_FC Item = Side_A_Port_9 Interface = Host_RGMII_0 Profile = 5

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD

NAME

Type The type of the FCU handling being defined. Valid values: “Per_Source_FC”, “Per_Dest_FC”, “Interrupt”, “Indication”.

M EZapiTM_FCULimit eType

The source, destination, interrupt or TOP indication to configure. Valid values differ according to type:

M

For “Per_Source_FC”: “Side_A_Port_xx” (where xx is the port number), “Side_A_All_Ports”, “Side_B_Port_xx”, “Side_B_All_Ports”, “Host_RGMII_0”, “Host_RGMII_1”, “Host_RGMII_All_Ports”, “Host_PCI, Global”.

For “Per_Dest_FC”: “TM_A_Port_xx”, “TM_A_All_Unicast_Ports”, “TM_A_All_Ports”, “TM_B_Port_xx”, “TM_B_All_Ports”, “LB_0”, “LB_1”, “LB_2”, “Host_RGMII_0”, “Host_RGMII_1”, “Host_PCI”.

For “Interrupt”: “LB_0”, “LB_1”, “LB_2”, “Host_RGMII_0”, “Host_RGMII_1”, “Host_PCI”, “TM_A_All_Unicast_Ports”, “TM_A_All_Ports”, “TM_B_All_Ports”, “Global”.

Item

For “Indication”: “LB_0”, “LB_1”, “LB_2”, “Host_RGMII_0”, “Host_RGMII_1”, “TM_A_All_Unicast_Ports”, “TM_A_All_Ports”, “TM_B_All_Ports”.

EZapiTM_FCULimit uqItem

Interface The interface to close. Valid values: “Side_A”, “Side_B”, “Host_RGMII_0”, “Host_RGMII_1”. Relevant only for per-destination FC and global per-source FC.

M EZapiTM_FCU_Limit eInterface

Profile The profile to use for the item being configured. Format: Numeric.

M EZapiTM_FCULimit uqProfile

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-84

2.5.1.8 TMconfig - GENERAL_PARAMS

Description

Set configurations/modes that have a global affect on the behavior of the Traffic Manager.

API Routine

EZapiTM_Init( )

API Command

EZapiTM_InitCmd_SetGeneralParams

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_GENERAL_PARAMS Use_TMb_Header = FALSE IFG_Emulation = 0x0 L1_Scheduling_Scheme = FALSE L2_Scheduling_Scheme = FALSE L3_Scheduling_Scheme = FALSE Block_Traffic = TRUE

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API

STRUCTURE API FIELD NAME

Use_TMb_Header Enable/disable the use of TMb headers to select the queue to use for frames entering TMb from the external interface. Format: Boolean.

- EZapiTM_ GeneralParams

bUseTMbHeader

IFG_Emulation The amount of bytes to add/remove from frame size. This can be used to compensate for appending of IFG to frame (or any other adjustments performed on frame length) when transmitting. Format: Numeric

- EZapiTM_ GeneralParams

uqIFGEmulation

L1_Scheduling_Scheme The scheduling scheme to use for L1. If FALSE - High priority yellow entities are scheduled before low priority green entities. If TRUE - High priority yellow entities are scheduled after low priority green entities. Format: Boolean If not specified, “Scheduling_Scheme” field value is used.

- EZapiTM_ GeneralParams

bL1SchedulingScheme

L2_Scheduling_Scheme The scheduling scheme to use for L2. If FALSE - High priority yellow entities are scheduled before low priority green entities. If TRUE - High priority yellow entities are scheduled after low priority green entities. Format: Boolean If not specified, “Scheduling_Scheme” field value is used.

- EZapiTM_ GeneralParams

bL2SchedulingScheme

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-85

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE

API FIELD NAME

L3_Scheduling_Scheme The scheduling scheme to use for L3. If FALSE - High priority yellow entities are scheduled before low priority green entities. If TRUE - High priority yellow entities are scheduled after low priority green entities. Format: Boolean If not specified, “Scheduling_Scheme” field value is used.

- EZapiTM_ GeneralParams

bL3SchedulingScheme

Block_Traffic Enable/disable the blocking of traffic on disabled and suspended entities.

When enabled, the last WFQ profile in levels 2 and 3 is reserved for internal Driver use.

Format: Boolean

- EZapiTM_ GeneralParams

bBlockTraffic

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-86

2.5.1.9 TMconfig - IFG_PARAMS

Description

Configure IFG general parameters.

API Routine

EZapiTM_Config( )

API Command

EZapiTM_ConfigCmd_SetIFGParams

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_IFG_PARAMS IFG_Mode = Per_Frame_Overhead IFG_Per_Frame_Mode = Unsigned_Positive IFG_Frame_Mantissa = 0x20 IFG_Frame_Exponent = 0x4 Enable_L0_IFG = FALSE Enable_L1_IFG = FALSE Enable_L2_IFG = TRUE Enable_L3_IFG = FALSE Enable_L4_IFG = FALSE END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCT API FIELD NAME

IFG_Mode Configure the IFG mode. Valid values: Legacy, Const_Overhead, Per_Frame_Overhead.

- EZapiTM_IFGParams

eIFGMode

IFG_Per_Frame_Mode Configure the mode of the frame overhead mantissa value in the flow ID when working in per-frame frame overhead mode. Valid values: Signed, Unsigned_Positive, Unsigned_Negative.

- EZapiTM_IFGParams

eIFGPerFrameMode

IFG_Frame_Mantissa The amount of bytes to add/remove from frame size for per-frame IFG. Format: Numeric

- EZapiTM_IFGParams

uqIFGFrame Mantissa

IFG_Frame_Exponent The exponent to use for the IFG emulation value. Format: Numeric

- EZapiTM_IFGParams

uqIFGFrame Exponent

Enable_L0_IFG Enables/disables L0 inter-frame gap emulation. Format: Boolean

- EZapiTM_IFGParams

bEnableL0IFG

Enable_L1_IFG Enables/disables L1 inter-frame gap emulation. Format: Boolean

- EZapiTM_IFGParams

bEnableL1IFG

Enable_L2_IFG Enables/disables L2 inter-frame gap emulation. Format: Boolean

- EZapiTM_IFGParams

bEnableL2IFG

Enable_L3_IFG Enables/disables L3 inter-frame gap emulation. Format: Boolean

- EZapiTM_IFGParams

bEnableL3IFG

Enable_L4_IFG Enables/disables L4 inter-frame gap emulation. Format: Boolean

- EZapiTM_IFGParams

bEnableL4IFG

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-87

2.5.1.10 TMconfig - PRIORITY_PARAMS

Description

Configure per-system and per-level priority parameters.

API Routine

EZapiTM_Init( )

API Command

EZapiTM_InitCmd_SetPriorityParams

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_PRIORITY_PARAMS L4_High_Priority_Mode = FALSE Enable_OQ_Priority = FALSE L1_Affects_OQ_Priority = FALSE L2_Affects_OQ_Priority = FALSE L3_Affects_OQ_Priority = FALSE L4_Affects_OQ_Priority = FALSE Propagated_Priority_Mode = Inactive END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

L4_High_Priority_Mode If TRUE, first L4 entity mapped to each L3 entity is high priority. Format: Boolean

- EZapiTM_PriorityParams

bL4HighPriorityMode

Enable_OQ_Priority Enable 2 priority levels at the output queue. Format: Boolean

EZapiTM_PriorityParams

bEnableOQPriority

L1_Affects_OQ_Priority If TRUE, frames mapped to L1 entities which are configured to high priority are treated as high priority at OQ. Format: Boolean.

- EZapiTM_PriorityParams

bL1AffectsOQPriority

L2_Affects_OQ_Priority If TRUE, frames mapped to L2 entities which are configured to high priority are treated as high priority at OQ. Format: Boolean.

- EZapiTM_PriorityParams

bL2AffectsOQPriority

L3_Affects_OQ_Priority If TRUE, frames mapped to L3 entities which are configured to high priority are treated as high priority at OQ. Format: Boolean.

- EZapiTM_PriorityParams

bL3AffectsOQPriority

L4_Affects_OQ_Priority If TRUE, frames mapped to L4 entities which are configured to high priority are treated as high priority at OQ. Format: Boolean.

- EZapiTM_PriorityParams

bL4AffectsOQPriority

Propagated_Priority_Mode The mode for propagated priority and/or color. Valid values: “Inactive”, “2WAY”,”4WAY”.

- EZapiTM_PriorityParams

ePropagatedPriority Mode

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-88

2.5.1.11 TMconfig - SHAPING_PARAMS

Description

Configure per-system and per-level shaping parameters.

API Routine

EZapiTM_Init( )

API Command

EZapiTM_InitCmd_SetShapingParams

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_SHAPING_PARAMS Enable_L0_Shaping = FALSE Enable_L1_Shaping = FALSE Enable_L2_Shaping = FALSE Enable_L3_Shaping = FALSE

Enable_L4_Shaping = FALSE L0_Base_Rate = 20000 L1_Base_Rate = 20000 L2_Base_Rate = 10000 L4_Shaped_Entity_Bitmap = 0x80 L4_Base_Rate = 10000 Quad_Shaping_Mode = FALSE END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Enable_L0_Shaping Enables/disables L0 shaping. Format: Boolean

- EZapiTM_ShapingParams bEnableL0Shaping

Enable_L1_Shaping Enables/disables L1 shaping. Format: Boolean

- EZapiTM_ShapingParams bEnableL1Shaping

Enable_L2_Shaping Enables/disables L2 shaping. Format: Boolean

- EZapiTM_ShapingParams bEnableL2Shaping

Enable_L3_Shaping Enables/disables L3 shaping. Format: Boolean

- EZapiTM_ShapingParams bEnableL3Shaping

Enable_L4_Shaping Enables/disables L4 shaping. Format: Boolean

- EZapiTM_ShapingParams bEnableL4Shaping

L0_Base_Rate The base rate for level 0 (in bytes per second). Format : Numeric

- EZapiTM_ShapingParams uqL0BaseRate

L1_Base_Rate The base rate for level 1 (in bytes per second). Format : Numeric

- EZapiTM_ShapingParams uqL1BaseRate

L2_Base_Rate The base rate for level 2 (in bytes per second). Format : Numeric

- EZapiTM_ShapingParams uqL2BaseRate

L4_Shaped_Entity_ Bitmap

A bitmap of 8 bits representing which L4 entities are shapable. Format : Numeric

- EZapiTM_ShapingParams uqL4ShapedEntity Bitmap

L4_Base_Rate The base rate for level 4 (in bytes per second). Format : Numeric

- EZapiTM_ShapingParams uqL4BaseRate

Quad_Shaping_Mode Enable/disable quad shaping mode. Supported from version 6.2 Format : Boolean

- EZapiTM_ShapingParams bQuadShapingMode

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-89

2.5.1.12 TMconfig - SHAPING_PROFILE

Description

Configure a single Shaping profile.

API Routine

EZapiTM_Config( )

API Command

EZapiTM_ConfigCmd_SetShapingProfile

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_SHAPING_PROFILE Level = 3 Profile = 5 CIR = 0x0 CBS = 0x0 PIR = 0x0 PBS = 0x0

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Level The level this shaping profile is used for. Valid values: “0”, “1”, “2”, “3”, “4”.

M EZapiTM_ShapingProfile eLevel

Profile The profile ID. Format: Numeric.

M EZapiTM_ShapingProfile uqProfile

CIR Committed Information Rate (in bytes per second). Format: Numeric.

- EZapiTM_ShapingProfile uqCIR

CBS Committed Burst Size (in bytes). Format: Numeric.

- EZapiTM_ShapingProfile uqCBS

PIR Peak Information Rate (in bytes per second). Relevant only when dual shaping is used. Format: Numeric or “Unlimited_Rate”.

- EZapiTM_ShapingProfile uqPIR

PBS Excess Burst Size (in bytes). Relevant only when dual shaping is used. Format: Numeric.

- EZapiTM_ShapingProfile uqPBS

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-90

2.5.1.13 TMconfig - STATISTIC_PARAMS

Description

Configure TM statistics parameters.

API Routine

EZapiTM_Config( )

API Command

EZapiTM_ConfigCmd_SetStatisticParams

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_STATISTIC_PARAMS TM_Count_Mode = None Level_Count_Mode = None Level = 0 Count_Committed_Transmit = FALSE Committed_Transmit_Base = 0x0 Count_Excess_Transmit = FALSE Excess_Transmit_Base = 0x0 Count_WRED_Drop = FALSE WRED_Drop_Level = 0 Count_WRED_Drop_Per_Color = FALSE WRED_Drop_Base = 0x0 Count_Timeout_Drop = FALSE Timeout_Drop_Base = 0x0 Allow_Overlap = FALSE END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

TM_Count_Mode The mode to count summary event statistics. Valid values: “None”, “Bytes”, “Frames”.

- EZapiTM_ StatisticParams

eTMCountMode

Level_Count_Mode The mode to count detailed event statistics. Valid values: “None”, “Bytes”, “Frames”, “Bytes_And_Frames”.

- EZapiTM_ StatisticParams

eLevelCountMode

Level The level to gather detailed per-level statistics for. Valid values: “0”, “1”, “2”, “3”, “4”

- EZapiTM_ StatisticParams

eLevel

Count_Committed_ Transmit

Enable counting of per-level committed transmissions. Format: Boolean

- EZapiTM_ StatisticParams

bCountCommittedTransmit

Committed_Transmit_ Base

The base address for per-level committed transmit statistic counters. Format: Numeric.

- EZapiTM_ StatisticParams

uqCommittedTransmitBase

Count_Excess_Transmit Enable counting of per-level excess transmissions. Format: Boolean

- EZapiTM_ StatisticParams

bCountExcessTransmit

Excess_Transmit_Base The base address for per-level excess transmit statistic counters. Format: Numeric.

- EZapiTM_ StatisticParams

uqExcessTransmitBase

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-91

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Count_WRED_Drop Enable counting of per-level WRED drops. Format: Boolean

- EZapiTM_ StatisticParams

bCountWREDDrop

WRED_Drop_Level The level to gather detailed per-level statistics for WRED drop. Valid values: “0”, “1”, “2”, “3”, “4” If not specified, “Level” field value is used.

- EZapiTM_ StatisticParams

eWREDDropLevel

Count_WRED_Drop_Per_Color

Enable WRED drop counting according to color. Format: Boolean

- EZapiTM_ StatisticParams

bCountWREDDropPerColor

WRED_Drop_Base The base address for per-level WRED drop statistic counters. Format: Numeric.

- EZapiTM_ StatisticParams

uqWREDDropBase

Count_Timeout_Drop Enable counting of per-level timeout drops. Format: Boolean.

- EZapiTM_ StatisticParams

bCountTimeoutDrop

Timeout_Drop_Base The base address for per-level timeout drop statistic counters. Format: Numeric.

- EZapiTM_ StatisticParams

uqTimeoutDropBase

Allow_Overlap Allow counters overlap. Format: Boolean.

- EZapiTM_ StatisticParams

bAllowOverlap

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-92

2.5.1.14 TMconfig - STATISTIC_PARAMS_ADVANCED

Description

Configure TM statistics parameters.

API Routine

EZapiTM_Config( )

API Command

EZapiTM_ConfigCmd_SetStatisticParamsAdvanced

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_STATISTIC_PARAMS_ADVANCED TM_Count_Mode = Frames Level_Count_Mode = Bytes_AND_Frames Level = 2 Count_Committed_Transmit = TRUE Committed_Transmit_Bytes_Base = 0x2000 Committed_Transmit_Frames_Base = 0x300 Count_Excess_Transmit = FALSE Excess_Transmit_Bytes_Base = 0x2000 Excess_Transmit_Frames_Base = 0x300 Count_WRED_Drop = TRUE WRED_Drop_Level = 3 WRED_Green_Drop_Bytes_Base = 0x2000 WRED_Green_Drop_Frames_Base = 0x300 WRED_Extended_Green_Drop_Bytes_Base = 0x3000 WRED_Extended_Green_Drop_Frames_Base = 0x200 WRED_Yellow_Drop_Bytes_Base = 0x1000 WRED_Yellow_Drop_Frames_Base = 0x400 WRED_Extended_Yellow_Drop_Bytes_Base = 0x3000 WRED_Extended_Yellow_Drop_Frames_Base = 0x500 WRED_Red_Drop_Bytes_Base = 0x4000 WRED_Red_Drop_Frames_Base = 0x600 WRED_Extended_Red_Drop_Bytes_Base = 0x600 WRED_Extended_Red_Drop_Frames_Base = 0x200 WRED_User_Drop_Bytes_Base = 0x7200 WRED_User_Drop_Frames_Base = 0x300 WRED_Extended_User_Drop_Bytes_Base = 0x900 WRED_Extended_User_Drop_Frames_Base = 0x200 Count_Timeout_Drop = FALSE Timeout_Drop_Bytes_Base = 0x5000 Timeout_Drop_Frames_Base = 0x200 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

TM_Count_Mode The mode to count summary event statistics. Valid values: “None”, “Bytes”, “Frames”.

- EZapiTM_StatisticParamsAdvanced

eTMCountMode

Level_Count_Mode The mode to count detailed event statistics. Valid values: “None”, “Bytes”, “Frames”, “Bytes_And_Frames”.

- EZapiTM_StatisticParamsAdvanced

eLevelCountMode

Level The level to gather detailed per-level statistics for. Valid values: “0”, “1”, “2”, “3”, “4”

- EZapiTM_StatisticParamsAdvanced

eLevel

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-93

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Count_Committed_ Transmit

Enable counting of per-level committed transmissions. Format: Boolean

- EZapiTM_StatisticParamsAdvanced

bCountCommittedTransmit

Committed_Transmit_Bytes_Base

The base address for per-level committed transmit bytes statistic counters. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqCommittedTransmit BytesBase

Committed_Transmit_Frames_Base

The base address for per-level committed transmit frames statistic counters. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqCommittedTransmit FramesBase

Count_Excess_ Transmit

Enable counting of per-level excess transmissions. Format: Boolean

- EZapiTM_StatisticParamsAdvanced

bCountExcessTransmit

Excess_Transmit_ Bytes_Base

The base address for per-level excess transmit bytes statistic counters. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqExcessTransmitBytes Base

Excess_Transmit_ Frames_Base

The base address for per-level excess transmit frames statistic counters. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqExcessTransmitFramesBase

Count_WRED_Drop Enable counting of per-level WRED drops. Format: Boolean

- EZapiTM_StatisticParamsAdvanced

bCountWREDDrop

WRED_Drop_Level The level to gather detailed per-level statistics for WRED drop. Valid values: “0”, “1”, “2”, “3”, “4”. If not specified, “Level” field value is used.

- EZapiTM_StatisticParamsAdvanced

eWREDDropLevel

WRED_Green_Drop_Bytes_Base

The base address for per-level WRED green color drop bytes statistics. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqWREDGreenDropBytesBase

WRED_Green_Drop_Frames_Base

The base address for per-level WRED green color drop frames statistics. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqWREDGreenDrop FramesBase

WRED_Extended_ Green_Drop_Bytes_ Base

The base address for per-level WRED extended green color drop bytes statistics. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqWREDExtendedGreen DropBytesBase

WRED_Extended_ Green_Drop_Frames_Base

The base address for per-level WRED extended green color drop frames statistics. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqWREDExtendedGreen DropFramesBase

WRED_Yellow_Drop_Bytes_Base

The base address for per-level WRED yellow color drop bytes statistics. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqWREDYellowDropBytesBase

WRED_Yellow_Drop_Frames_Base

The base address for per-level WRED yellow color drop frames statistics. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqWREDYellowDrop FramesBase

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-94

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

WRED_Extended_ Yellow_Drop_Bytes_ Base

The base address for per-level WRED extended yellow color drop bytes statistics. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqWREDExtendedYellowDropBytesBase

WRED_Extended_ Yellow_Drop_Frames_Base

The base address for per-level WRED extended yellow color drop frames statistics. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqWREDExtendedYellowDropFramesBase

WRED_Red_Drop_ Bytes_Base

The base address for per-level WRED red color drop bytes statistics. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqWREDRedDropBytes Base

WRED_Red_Drop_ Frames_Base

The base address for per-level WRED red color drop frames statistics. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqWREDRedDropFramesBase

WRED_Extended_ Red_Drop_Bytes_ Base

The base address for per-level WRED extended red color drop bytes statistics. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqWREDExtendedRed DropBytesBase

WRED_Extended_ Red_Drop_Frames_Base

The base address for per-level WRED extended red color drop frames statistics. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqWREDExtendedRed DropFramesBase

WRED_User_Drop_ Bytes_Base

The base address for per-level WRED user color drop bytes statistics. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqWREDUserDropBytes Base

WRED_User_Drop_ Frames_Base

The base address for per-level WRED user color drop frames statistics. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqWREDUserDropFramesBase

WRED_Extended_ User_Drop_Bytes_ Base

The base address for per-level WRED extended user color drop bytes statistics. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqWREDExtendedUser DropBytesBase

WRED_Extended_ User_Drop_Frames_ Base

The base address for per-level WRED extended user color drop frames statistics. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqWREDExtendedUser DropFramesBase

Count_Timeout_Drop Enable counting of per-level timeout drops. Format: Boolean.

- EZapiTM_StatisticParamsAdvanced

bCountTimeoutDrop

Timeout_Drop_Bytes_Base

The base address for per-level timeout drop bytes statistic counters. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqTimeoutDropBytesBase

Timeout_Drop_ Frames_Base

The base address for per-level timeout drop frames statistic counters. Format: Numeric.

- EZapiTM_StatisticParamsAdvanced

uqTimeoutDropFrames Base

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-95

2.5.1.15 TMconfig - TOPOLOGY_PARAMS

Description

Defines the high-level topology of the Traffic Manager levels (the number and size of levels), as well as the the topological mapping between entities in Levels 0, 1 and 2 of the TM.

API Routine

EZapiTM_Init( )

API Command

EZapiTM_InitCmd_SetTopologyParams

Example TMconfig(

Channel = 0, TM_Id = TMb

BEGIN_TOPOLOGY_PARAMS Enable_Special_Groups = FALSE Loopback_Qs_Multicast_Mask = 0x0 L12_Mode = 1x256 L34_Mode = 1k Enable_L1_Aggregation = FALSE

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Enable_Special_Groups Enable/disable special groups. Relevant only for TMa. Format: Boolean.

- EZapiTM_ TopologyParams

bEnableSpecialGroups

Loopback_Qs_Multicast_ Mask

Defines a bitwise mask indicating which of the loopback queues are in multicast mode. Format: Numeric.

- EZapiTM_ TopologyParams

uqLoopbackQsMulticastMask

L12_Mode Defines the number of entities in Level1 and Level2 of the hierarchical scheduler (as well as the mapping between them). Valid values: “1x256”, “4x64”, “8x32”, “16x16”, “32x8”, “32x4”, “FLATx256”, “8LAGx32”.

- EZapiTM_ TopologyParams

eL12Mode

L34_Mode Defines the number of entities in Level3 and Level4 of the hierarchical scheduler. Valid values: “1k”, “4k”, “1kx64k”, “16k”.

- EZapiTM_ TopologyParams

eL34Mode

Enable_L1_Aggregation Enable/disable L1 aggregation mode. Format: Boolean.

- EZapiTM_ TopologyParams

bEnableL1Aggregation

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-96

2.5.1.16 TMconfig - WFQ_PARAMS

Description

Configure per-system and per-level WFQ parameters.

API Routine

EZapiTM_Init( )

API Command

EZapiTM_InitCmd_SetWFQParams

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_WFQ_PARAMS L0_WFQ_Mode = Byte L1_WFQ_Mode = Byte L2_WFQ_Mode = Byte L3_WFQ_Mode = Byte L4_WFQ_Mode = Byte L3_Uses_Single_WFQ = FALSE L4_Service_WFQ_Threshold = 0x0

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

L0_WFQ_Mode The WFQ mode for level 0. Valid values: “Byte”, “Frame”.

- EZapiTM_WFQParams eL0WFQMode

L1_WFQ_Mode The WFQ mode for level 1. Valid values: “Byte”, “Frame”, “Absolute”.

- EZapiTM_WFQParams eL1WFQMode

L2_WFQ_Mode The WFQ mode for level 2. Valid values: “Byte”, “Frame”, “Absolute”.

- EZapiTM_WFQParams eL2WFQMode

L3_WFQ_Mode The WFQ mode for level 3. Valid values: “Byte”, “Frame”, “Absolute”

- EZapiTM_WFQParams eL3WFQMode

L4_WFQ_Mode The WFQ mode for level 4. Valid values: “Byte”, “Frame”, “Absolute”

- EZapiTM_WFQParams eL4WFQMode

L3_Uses_Single_WFQ Configures if Level 3 uses Single or Dual Weighted Fair Queuing. Format: Boolean.

- EZapiTM_WFQParams bL3UsesSingleWFQ

L4_Service_WFQ_ Threshold

Threshold of priority for commit WFQ used for L4 services in 16K mode. Format: Numeric.

- EZapiTM_WFQParams uqL4ServiceWFQThreshold

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-97

2.5.1.17 TMconfig - WFQ_PROFILE

Description

Configure a single WFQ profile.

API Routine

EZapiTM_Config( )

API Command

EZapiTM_ConfigCmd_SetWFQProfile

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_WFQ_PROFILE Level = 2 Profile = 3 Committed_Weight = 0x1 Excess_Weight = 0x1

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Level The level this WFQ profile is used for. Valid values: “0”, “1”, “2”, “3”, “4”.

M EZapiTM_WFQProfile eLevel

Profile The profile ID. Format: Numeric.

M EZapiTM_WFQProfile uqProfile

Committed_Weight The WFQ relative weight for committed traffic. When single WFQ is used, this is also the weight for excess traffic. Format: Numeric.

- EZapiTM_WFQProfile uqCommittedWeight

Excess_Weight The WFQ relative weight for excess traffic when Dual WFQ is used. Format: Numeric.

- EZapiTM_WFQProfile uqExcessWeight

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-98

2.5.1.18 TMconfig - WRED_PARAMS

Description

Configure per-system and per-level WRED parameters.

API Routine

EZapiTM_Init( )

API Command

EZapiTM_InitCmd_SetWREDParams

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_WRED_PARAMS Enable_Global_Level_WRED = FALSE Enable_TM_Level_WRED = FALSE Enable_L12_WRED = FALSE Enable_L3_WRED = FALSE Enable_L3_WRED_Aggregation = FALSE Enable_L4_WRED = FALSE WRED_Decision_Mode = Relaxed Global_Level_Decision_Order = First TM_Level_Decision_Order = Second L12_Level_Decision_Order = Third

L3_Decision_Order = Fourth L4_Decision_Order = Fifth Enable_Profile_Scaling = FALSE Enable_Global_Extended_Coloring = TRUE Enable_TM_Extended_Coloring = FALSE Enable_L12_Extended_Coloring = FALSE Enable_L3_Extended_Coloring = FALSE Enable_L4_Extended_Coloring = FALSE TM_Level_Frame_Count = FALSE L12_Frame_Count = FALSE L3_Frame_Count = FALSE L4_Frame_Count = FALSE

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Enable_Global_Level_ WRED

Enable/disable Global level WRED. Format: Boolean.

- EZapiTM_WREDParams

bEnableGlobalLevel WRED

Enable_TM_Level_ WRED

Enables/disables TM level WRED. Format: Boolean.

- EZapiTM_WREDParams

bEnableTMLevelWRED

Enable_L12_WRED Enables/disables L12 WRED. Format: Boolean.

- EZapiTM_WREDParams

bEnableL12WRED

Enable_L3_WRED Enables/disables L3 WRED. Format: Boolean.

- EZapiTM_WREDParams

bEnableL3WRED

Enable_L3_WRED_ Aggregation

Enables/disables using L3 WRED aggregation. If enabled, for each frame, L3 WRED is performed using an L3 profile based on the L3 entity used, but according to the aggregated average resource usage of all L3 entities mapped to the same L2 entity. Format: Boolean.

- EZapiTM_WREDParams

bEnableL3WRED Aggregation

Enable_L4_WRED Enables/disables L4 WRED. Format: Boolean.

- EZapiTM_WREDParams

bEnableL4WRED

WRED_Decision_Mode Selects the mode in which the pass/drop WRED decision at each enabled WRED level is resolved into a single WRED pass/drop decision. Valid values: “Aggressive”, “Relaxed”, “Conservative”, “Guaranteed”.

- EZapiTM_WREDParams

eWREDDecisionMode

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-99

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Global_Level_Decision_Order

Selects the order in which the Global level WRED pass/drop decision is evaluated according to the WRED Decision Mode. Valid values: “First”, “Second”, “Third”, “Fourth”, “Fifth”.

- EZapiTM_WREDParams

eGlobalLevelDecision Order

TM_Level_Decision_ Order

Selects the order in which the TM level WRED pass/drop decision is evaluated according to the WRED Decision Mode. Valid values: “First”, “Second”, “Third”, “Fourth”, “Fifth”.

- EZapiTM_WREDParams

eTMLevelDecisionOrder

L12_Level_Decision_ Order

Selects the order in which the L12 WRED pass/drop decision is evaluated according to the WRED Decision Mode. Valid values: “First”, “Second”, “Third”, “Fourth”, “Fifth”.

- EZapiTM_WREDParams

eL12LevelDecisionOrder

L3_Decision_Order Selects the order in which the L3 WRED pass/drop decision is evaluated according to the WRED Decision Mode. Valid values: “First”, “Second”, “Third”, “Fourth”, “Fifth”.

- EZapiTM_WREDParams

eL3DecisionOrder

L4_Decision_Order Selects the order in which the L4 WRED pass/drop decision is evaluated according to the WRED Decision Mode. Valid values: “First”, “Second”, “Third”, “Fourth”, “Fifth”.

- EZapiTM_WREDParams

eL4DecisionOrder

Enable_Profile_Scaling Enable/disable scaling of WRED profiles. Format: Boolean.

- EZapiTM_WREDParams

bEnableProfileScaling

Enable_Global_ Extended_Coloring

Enable/disable extended coloring support for Global level WRED. Format: Boolean.

- EZapiTM_ WREDParams

bEnableGlobalExtended Coloring

Enable_TM_Extended_ Coloring

Enable/disable extended coloring support for TM level WRED. Format: Boolean.

- EZapiTM_ WREDParams

bEnableTMExtended Coloring

Enable_L12_Extended_ Coloring

Enable/disable extended coloring support for L12 WRED. Format: Boolean.

- EZapiTM_WREDParams

bEnableL12Extended Coloring

Enable_L3_Extended_ Coloring

Enable/disable extended coloring support for L3 WRED. Format: Boolean.

- EZapiTM_WREDParams

bEnableL3Extended Coloring

Enable_L4_Extended_ Coloring

Enable/disable extended coloring support for L4 WRED. Format: Boolean.

- EZapiTM_WREDParams

bEnableL4Extended Coloring

TM_Level_Frame_Count Enable/disable frame counting (instead of buffer counting) mode. Format: Boolean.

- EZapiTM_ WREDParams

bTMLevelFrameCount

L12_Frame_Count Enable/disable frame counting (instead of buffer counting) mode. Format: Boolean.

- EZapiTM_ WREDParams

bL12FrameCount

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-100

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

L3_Frame_Count Enable/disable frame counting (instead of buffer counting) mode. Format: Boolean.

- EZapiTM_ WREDParams

bL3FrameCount

L4_Frame_Count Enable/disable frame counting (instead of buffer counting) mode. Format: Boolean.

- EZapiTM_ WREDParams

bL4FrameCount

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-101

2.5.1.19 TMconfig - WRED_PROFILE

Description

Configure a single WRED profile.

API Routine

EZapiTM_Config( )

API Command

EZapiTM_ConfigCmd_SetWREDProfile

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_WRED_PROFILE Level = TM Profile = 5 Moving_Average_Factor = 8 Guaranteed_Thresh = 0x0 Green_Min_Thresh = 0x0 Green_Max_Thresh = 0x1FF800 Green_Max_Drop_Percent = 0 Yellow_Min_Thresh = 0 Yellow_Max_Thresh = 0x1FF800 Yellow_Max_Drop_Percent = 0 Red_Min_Thresh = 0 Red_Max_Thresh = 0x1FF800 Red_Max_Drop_Percent = 0 User_Defined_Min_Thresh = 0 User_Defined_Max_Thresh = 0x1FF800 User_Defined_Max_Drop_Percent = 0 Global_Level_Thresh_Displacement = 0 Displace_Global_Level_Guaranteed_Thresh = FALSE TM_Level_Thresh_Displacement = 0 Displace_TM_Level_Guaranteed_Thresh = FALSE L12_Thresh_Displacement = 0 Displace_L12_Guaranteed_Thresh = FALSE

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCT API FIELD NAME

Level The level this WRED profile is used for. Valid values: “Global”, “TM”, “12”, “3”, “4”.

M EZapiTM_ WREDProfile

eLevel

Profile The profile ID. Format: Numeric.

M EZapiTM_ WREDProfile

uqProfile

Moving_Average_Factor Defines the sensitivity of the moving average calculation. Format: Numeric.

- EZapiTM_ WREDProfile

uqMovingAverageFactor

Guaranteed_Thresh The guaranteed threshold (in buffers). Format: Numeric.

- EZapiTM_ WREDProfile

uqGuaranteedThresh

Green_Min_Thresh The minimum threshold for frames marked green (in buffers). Format: Numeric.

- EZapiTM_ WREDProfile

uqGreenMinThresh

Green_Max_Thresh The maximum threshold for frames marked green (in buffers). Format: Numeric.

- EZapiTM_ WREDProfile

uqGreenMaxThresh

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-102

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCT API FIELD NAME

Green_Max_Drop_ Percent

The maximum drop percent for frames marked green. Format: Numeric.

- EZapiTM_ WREDProfile

uqGreenMaxDropPercent

Yellow_Min_Thresh The minimum threshold for frames marked yellow (in buffers). Format: Numeric.

- EZapiTM_ WREDProfile

uqYellowMinThresh

Yellow_Max_Thresh The maximum threshold for frames marked yellow (in buffers). Format: Numeric.

- EZapiTM_ WREDProfile

uqYellowMaxThresh

Yellow_Max_Drop_ Percent

The maximum drop percent for frames marked yellow. Format: Numeric.

- EZapiTM_ WREDProfile

uqYellowMaxDropPercent

Red_Min_Thresh The minimum threshold for frames marked red (in buffers). Format: Numeric.

- EZapiTM_ WREDProfile

uqRedMinThresh

Red_Max_Thresh The maximum threshold for frames marked red (in buffers). Format: Numeric.

- EZapiTM_ WREDProfile

uqRedMaxThresh

Red_Max_Drop_Percent The maximum drop percent for frames marked red. Format: Numeric.

- EZapiTM_ WREDProfile

uqRedMaxDropPercent

User_Defined_Min_ Thresh

The minimum threshold for frames marked with user-defined color (in buffers). Format: Numeric.

- EZapiTM_ WREDProfile

uqUserDefinedMinThresh

User_Defined_Max_ Thresh

The maximum threshold for frames marked with user-defined color (in buffers). Format: Numeric.

- EZapiTM_ WREDProfile

uqUserDefinedMaxThresh

User_Defined_Max_ Drop_Percent

The maximum drop percent for frames marked with user-defined color. Format: Numeric.

- EZapiTM_ WREDProfile

uqUserDefinedMaxDrop Percent

Global_Level_Thresh_ Displacement

Defines how far the Global level WRED function is displaced when Global level WRED is performed for a frame mapped through an L3 entity using this profile (in buffers, zero indicates no change). Format: Numeric.

- EZapiTM_ WREDProfile

uqGlobalLevelThresh Displacement

Displace_Global_Level_Guaranteed_Thresh

Defines if the guaranteed threshold of the Global level WRED function is also displaced by Global_Level_Thresh_Displacement. Format: Boolean.

- EZapiTM_ WREDProfile

bDisplaceGlobalLevel GuaranteedThresh

TM_Level_Thresh_ Displacement

Defines how far the TM level WRED function is displaced when TM level WRED is performed for a frame mapped through an L3 entity using this profile (in buffers, zero indicates no change). Format: Numeric.

- EZapiTM_ WREDProfile

uqTMLevelThresh Displacement

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-103

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCT API FIELD NAME

Displace_TM_Level_ Guaranteed_Thresh

Defines if the guaranteed threshold of the TM level WRED function is also displaced by TM_Level_Thresh_Displacement. Format: Boolean.

- EZapiTM_ WREDProfile

bDisplaceTMLevel GuaranteedThresh

L12_Thresh_ Displacement

Defines how far the L12 WRED function is displaced when L12 WRED is performed for a frame mapped through an L3 entity using this profile (in buffers, zero indicates no change). Format: Numeric.

- EZapiTM_ WREDProfile

uqL12ThreshDisplacement

Displace_L12_ Guaranteed_Thresh

Defines if the guaranteed threshold of the L12 WRED function is also displaced by L12_Thresh_Displacement. Format: Boolean.

- EZapiTM_ WREDProfile

bDisplaceL12Guaranteed Thresh

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-104

2.5.1.20 TMconfig - WRED_SCALING_PROFILE

Description

Configure a single WRED scaling profile.

API Routine

EZapiTM_Config( )

API Command

EZapiTM_ConfigCmd_SetWREDScalingProfile

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_WRED_SCALING_PROFILE Profile = 5 Scaling_Factor = 0x1 Scaling_Offset = 0x0

END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCT API FIELD NAME

Profile The profile ID. Format: Numeric.

M EZapiTM_WREDScalingProfile uqProfile

Scaling_Factor The WRED profile scaling factor. Format: Numeric.

- EZapiTM_WREDScalingProfile uqScalingFactor

Scaling_Offset The WRED profile scaling offset. Format: Numeric.

- EZapiTM_WREDScalingProfile uqScalingOffset

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-105

2.5.1.21 TMconfig - L4_SERVICE_PROFILE

Configure a single L4 service profile.

API Routine

EZapiTM_Config( )

API Command

EZapiTM_ConfigCmd_SetL4ServiceProfile

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_L4_SERVICE_PROFILE Profile = 0x14 Service = 0 Shaping_Type = Single Green_Priority = 0x3 Yellow_Priority = 0x3 Red_Priority = Inactive Quad_Shaper = 0x1 Service = 1 Shaping_Type = Single Green_Priority = 0x3 Yellow_Priority = 0x3 Red_Priority = Inactive Quad_Shaper = 0x1 Service = 2 Shaping_Type = Single Green_Priority = 0x3 Yellow_Priority = 0x3 Red_Priority = Inactive Quad_Shaper = 0x2 Service = 3 Shaping_Type = Single Green_Priority = 0x3 Yellow_Priority = 0x3 Red_Priority = Inactive Quad_Shaper = 0x1

Service = 4 Shaping_Type = Single Green_Priority = 0x3 Yellow_Priority = 0x3 Red_Priority = Inactive Quad_Shaper = 0x1 Service = 5 Shaping_Type = Single Green_Priority = 0x3 Yellow_Priority = 0x3 Red_Priority = Inactive Quad_Shaper = 0x1 Service = 6 Shaping_Type = Single Green_Priority = 0x3 Yellow_Priority = 0x3 Red_Priority = Inactive Quad_Shaper = 0x1 Service = 7 Shaping_Type = Single Green_Priority = 0x3 Yellow_Priority = 0x3 Red_Priority = Inactive Quad_Shaper = 0x1 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCT API FIELD NAME

Profile The L4 service profile ID. Format: Numeric.

M EZapiTM_L4Service Profile

uqProfile

Service Number of L4 service parameter. Format: Numeric.

- EZapiTM_L4Service Profile

asL4ServiceParams

Shaping_Type The type of shaping performed on the L4 service. Valid values: “Single”,” Dual”.

- EZapiTM_L4Service ProfileParams

eShapingType

Green_Priority The priority assigned to the L4 service when the L3 user's shaper is green. Format: Numeric or “Inactive”.

- EZapiTM_L4Service ProfileParams

uqGreenPriority

Yellow_Priority The priority assigned to the L4 service when the L3 user's shaper is yellow. Format: Numeric or “Inactive”.

- EZapiTM_L4Service ProfileParams

uqYellowPriority

Red_Priority The priority assigned to the L4 service when the L3 user's shaper is red. Format: Numeric or “Inactive”.

- EZapiTM_L4Service ProfileParams

uqRedPriority

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-106

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCT API FIELD NAME

Quad_Shaper Selects which CIR bucket to use by service. Valid values are 1-3. Supported from version 6.2 Format: Numeric

- EZapiTM_L4Service ProfileParams

uqQuadShaper

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-107

2.5.1.22 TMconfig - L3_USER_PARAMS

Description

Configure a a set of profiles and parameters for an L3 user entity and all L4 service entities mapped to it.

API Routine

EZapiTM_Config( )

API Command

EZapiTM_ConfigCmd_SetL3UserParams

Example TMconfig(

channel = 0, TM_Id = TMb

BEGIN_L3_USER_PARAMS Entity = 0x0 Entity_Mode = Disabled Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 Service = 0 Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 WFQ_Profile = 0x0 Service = 1 Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 WFQ_Profile = 0x0 Service = 2 Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 WFQ_Profile = 0x0 Service = 3 Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 WFQ_Profile = 0x0 Service = 4 Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 WFQ_Profile = 0x0 Service = 5 Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0

TMconfig( channel = 0, TM_Id = TMb

BEGIN_L3_USER_PARAMS Entity = Rel2Abs ( L0_Rel = 0x1, L1_Rel = 0x3, L2_Rel = 0x2, L3_Rel = 0x1 ) Entity_Mode = Disabled Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 Service = 0 Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 WFQ_Profile = 0x0 Service = 1 Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 WFQ_Profile = 0x0 Service = 2 Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 WFQ_Profile = 0x0 Service = 3 Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 WFQ_Profile = 0x0 Service = 4 Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 WFQ_Profile = 0x0 Service = 5 Entity_Mode = Disabled

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-108

WFQ_Profile = 0x0 Service = 6 Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 WFQ_Profile = 0x0 Service = 7 Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 WFQ_Profile = 1 END);

WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 WFQ_Profile = 0x0 Service = 6 Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 Service = 7 Entity_Mode = Disabled WRED_Profile = 0x0 WRED_Scaling_Profile = 0x0 Shaping_Mode = Unshaped Shaping_Profile = 0x0 Shaping_Factor = 0x1 WFQ_Profile = 0x0 END);

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCT API FIELD NAME

Entity The absolute position of the L3 user entity to configure. Format: Numeric. Can also be set using the Rel2Abs() macro which receives a series of relative positions (see field descriptions below) and translates them to an absolute index.

M EZapiTM_L3User Params

uqEntity

Entity_Mode The L3 user entity's mode. Valid values: “Disabled”,” Suspended”,” Enabled”.

- EZapiTM_L3User Params

eEntityMode

Shaping_Mode The shaping mode for this L3 user entity. The shaping mode determines if the entity uses a shaping profile, and if so how this shaping profile is interpreted. Valid values: “Unshaped”,” Explicit”.

- EZapiTM_L3User Params

eShapingMode

Shaping_Profile The shaping profile for this L3 user entity. Format: Numeric.

- EZapiTM_L3User Params

uqShapingProfile

Shaping_Factor The shaping factor for this L3 user entity. Valid values: “0.5”, “1”, “2”, “4”.

- EZapiTM_L3User Params

eShapingFactor

L0_Rel The index of the L0 entity (this is also the absolute index). Format: Numeric

- EZapiTM_ TranslationParams

uqL0RelativeIndex

L1_Rel The relative index of the L1 entity within the L0 entity. For special queues and FLATx256 mode, set to Invalid. Format: Numeric or “Invalid”

- EZapiTM_ TranslationParams

uqL1RelativeIndex

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-109

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCT API FIELD NAME

L2_Rel The relative index of the L2 entity. For special queues and FLATx256 mode this is relative to the L0 entity. Otherwise, this is relative to the L1 entity. Format: Numeric

- EZapiTM_ TranslationParams

uqL2RelativeIndex

L3_Rel The relative index of the L3 entity (within the L2 entity). Format: Numeric

- EZapiTM_ TranslationParams

uqL3RelativeIndex

Service Number of L4 service parameter. Format: Numeric.

- EZapiTM_L3User Params

asL4ServiceParams

Entity_Mode The L4 service entity's mode. Valid values: “Disabled”,” Suspended”,” Enabled”.

- EZapiTM_ L4ServiceParams

eEntityMode

WRED_Profile The WRED Profile to attach this L4 service entity to. Format: Numeric.

- EZapiTM_ L4ServiceParams

uqWREDProfile

WRED_Scaling_ Profile

The WRED scaling profile for this L4 service entity. Format: Numeric.

- EZapiTM_ L4ServiceParams

uqWREDScalingProfile

Shaping_Mode The shaping mode for this L3 user entity. The shaping mode determines if the entity uses a shaping profile, and if so how this shaping profile is interpreted. Valid values: “Unshaped”,” Explicit”.

- EZapiTM_ L4ServiceParams

eShapingMode

Shaping_Profile The shaping profile for this L3 user entity. Format: Numeric.

- EZapiTM_ L4ServiceParams

uqShapingProfile

Shaping_Factor The shaping factor for this L3 user entity. Valid values: “0.5”, “1”, “2”, “4”.

- EZapiTM_ L4ServiceParams

eShapingFactor

WFQ_Profile The WFQ profile for this L4 service entity. Format: Numeric.

- EZapiTM_ L4ServiceParams

uqWFQProfile

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-110

2.6 Frame Commands

The Frame commands include:

SendFrame( ) see page 2-110

2.6.1 Send Frame NPsl Command

SendFrame( )

Description

Sends the frame to a given destination.

API Routine

EZapiFrame_Send( )

Example SendFrame ( Channel = 0, Transmit_Q = ETFD , Buffer_Region = RX, Destination_Port = 1, TM_Flow_Id = 2, Number_Of_Chunks = 2, Chunk = 0, Data = 0h03254362436432, Chunk = 1, Data = 0h053632632432532152 );

Details ARGUMENT DESCRIPTION AND VALID VALUES M API

STRUCTURE API FIELD NAME

Channel The channel number to send the frame to. Format: Numeric.

M - uiChannelId

Transmit_Q The queue in the NP to place the frame in, and from which the frame is transmitted. Valid values: “OQ”, “ETFD”, “TMa”, “TMb”.

M EZapiFrame_ SendParams

eTransmitQ

Buffer_Region The region of frame memory (RX or TX) used to send the frame. Valid values: “RX”, “TX”.

M EZapiFrame_ SendParams

eBufferRegion

Destination_Port The destination port. Format: Numeric.

(M) EZapiFrame_ SendParams

uqDestinationPort

Flow_ID The FlowID describing the TM queue to place the frame in. Format: Numeric.

(M) EZapiFrame_ SendParams

uqTMFlowID

Number_Of_Chunks The number of logical data chunks in the frame. Format: Numeric.

M EZapiFrame uqNumberOfChunks

Data The data of the current chunk, in bytestream. Format: Hexadecimal bytestream.

M EZapiFrame_ Chunk

psData

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-111

2.7 General Commands

The General commands include:

WriteMem( ) see page 2-111

ReadModifyWrite_Mem( ) see page 2-112

Write_Reg( ) see page 2-113

ReadModifyWrite_Reg( ) see page 2-114

2.7.1 Write Memory Command NPsl Command

WriteMem( )

Description

Writes the contents of the buffer to the NP's memory.

API Routine

EZapiMem_Write( )

Example WriteMem( Channel = 0x0, Memory = ParseCam8, Address = 0x10, Size = 0x8, Value = 0h0123456789ABCDEF );

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Channel The channel to write to its memory. Format: Numeric. M EZchannelId uiChannelId Memory The memory block to write to. Valid values: "Frame",

“Search1IntTable”, “Search1Ext”, “Search2Ext”, “Search1Core”, “Search2Core”, "ParseCode", "Search1Code", "ResolveCode", "ModifyCode", "Search1Scratchpad", “InControl”, “OutControl”, "Search1SDT", "Search2SDT", "ParseCam8", "ParseCam16", "ParseCam32", "ParseCam64", "ModifyCam8", “CREG”, “Search1InitialCode”, "PortConfigSRAM", ”ExternalQDR”, “SPICalendarSRAM”, ”TMFrame”, ”TMFrame_Data”, "TMFrame_Search", “TMControl”, “TMControl_TMaQD”, “TMControl_TMbQD”, “TMControl_TMaTC”, “TMControl_TMbTC”, “TMaMock”, “TMbMock”, “TMaSRAMBase_X”, “TMbSRAMBase_X” (where X can be 0-37).

M EZapiPrm_MemId eMemId

Address The address in memory to start writing to. The resolution of this address varies according to the memory type (see enum EZapiPrm_MemId). Format: Numeric.

M EZuns32 uqAddress

Size The size, in bytes, of the data to write. Format: Numeric. M EZuns32 uqLength Value Buffer containing the data, in byte-stream format, to write

to the memory. Format: Hexadecimal bytestream. M EZptr pData

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-112

2.7.2 Read Modify Write Memory Command NPsl Command

ReadModifyWrite_Mem( )

Description

Modifies the contents of the network processor’s memory.

API Routine

EZapiMem_ReadModifyWrite ( )

Example ReadModifyWrite_Mem( Channel = 0x0, Memory = TMaSRAMBase_5, Address = 0x7, Size = 0x20, Value = 0h000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F, ModifyMask = 0x01 );

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Channel The ID of the channel to modify in. Format: Numeric.

M EZchannelId uiChannelId

Memory The memory block to write to. Valid values: “TMaMock”, “TMbMock”, “TMaSRAMBase_X”, “TMbSRAMBase_X” (where X can be 4, 5, 6, 7, 9, 11 or 21).

M EZapiPrm_MemId eMemId

Address The address in memory to start writing to. The resolution of this address varies according to the memory type (see enum EZapiPrm_MemId). Format: Numeric.

M EZuns32 uqAddress

Size The size, in bytes, of the data to write. Format: Numeric.

M EZuns32 uqLength

Value Buffer containing the data, in byte-stream format, to write to the memory. Format: Hexadecimal bytestream.

M EZptr pData

ModifyMask The mask the defines which fields of the data will be written to chip. Format: Numeric.

M EZuns32 uqModifyMask

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-113

2.7.3 Write Register Command NPsl Command

Write_Reg( )

Description

Writes the contents of a register to the network processor.

API Routine

EZapiReg_Write( )

Example Write_Reg ( Channel = 0x0, Reg_Id= etfd_head_tail_4, Value= 0x5 );

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Channel The channel to write to its registers. Format: Numeric.

M EZchannelId uiChannelId

Reg_Id The register name. Valid values can be found in the EZRegType.h file under the enum EZapiRegId. Use the register name without the “EZreg_NP_3_” prefix, e.g. EZreg_NP_3_ETFD_HEAD_TAIL_4 --> ETFD_HEAD_TAIL_4.

M EZapiRegId eRegId

Value The register value to write. Format: Numeric.

M EZuns32 uqData

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-114

2.7.4 Read, Modify and Write Register Command NPsl Command

ReadModifyWrite_Reg( )

Description

Modifies the value of a register in the NP.

API Routine

EZapiReg_ReadModifyWrite( )

Example ReadModifyWrite_Reg ( Channel = 0x0, Reg_Id= etfd_head_tail_4, Value= 0x5, Mask = 0xF );

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Channel The channel to write to its registers. Format: Numeric.

M EZchannelId uiChannelId

Reg_Id The register name. Valid values can be found in the EZRegType.h file under the enum EZapiRegId. Use the register name without the “EZreg_NP_3_” prefix, e.g. EZreg_NP_3_ETFD_HEAD_TAIL_4 --> ETFD_HEAD_TAIL_4.

M EZapiRegId eRegId

Value The register value to write. Format: Numeric.

M EZuns32 uqData

Mask The mask that defines which bits of uqData should be writen to the register, for each bit that is set in uqMask the corresponding bit in uqData will be writen to theregister. Format: Numeric.

M EZuns32 uqMask

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-115

2.8 Structure Commands

The Structure commands include:

CreateStruct( ) see page 2-115

AliasStruct( ) see page 2-124

BuildTree( ) see page 2-125

RebalanceTree( ) see page 2-126

AddEntry( ), ConfigEntry( ), DeleteEntry( ) see page 2-127

2.8.1 Create Structure Command NPsl Command

CreateStruct( )

Description

Creates a new empty search structure and loads it into the network processor.

API Routine

EZapiStruct_Create( )

Details

This section has been divided general arguments followed by examples and arguments for several specific types of search structures, including a statistics structure, direct table, hash structure and tree.

Arguments shared for all structure types: ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Channel The channel this structure resides on. For single channel structures. Format: Numeric.

ChannelMap The set of channels this structure resides on. For multi-channel structures. Format: Hexadecimal bytestream.

M EZapiStruct_Attrs sChannelMap

Search The TOP ID. Valid values: “TOPsearch–I” (or “1”), “TOPsearch–II” (or “2”), “TOPparse”.

M EZapiStruct_Attrs uiSearch

Str_Num The structure number. Format: Numeric.

M EZapiStruct_Attrs uiStructNumber

(continued)

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-116

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Str_Type Type of seach structure. Valid values: "Statistic” - statistics structure. "Int_Table" - internal table (SRAM). ”Table” - direct table in internal memory. ”Ext_Table” - direct table in external memory. ”Hash” - hash table in internal memory. “Hash_Tree” - hash in internal memory + tree. ”Mix_Hash” - hash spread between internal and external memory. ”Mix_Hash_Tree” - hash spread between internal and external memory + tree. ”Ext_Hash” - hash in external memory. ”Ext_Hash_Tree” - hash in external memory + tree.

”Tree” - binary tree. "Tree_Hash” - binary tree + hash. “Direct_Tree” – a direct table of tree structures. “Ext_Direct_Tree” - an external direct table of external tree structures. “Fast_IP” – FastIP structure. “Ext_CAM_Lookup” – a structure for performing a lookup via the external CAM interface. “Ext_CAM_Read” - a structure for performing a read result operation after a lookup via the external CAM interface.

M EZapiStruct_Attrs eStructType

Key_Size The size of the key in bytes. Irrelevant for statistic structures. Format: Numeric.

M EZapiStruct_Attrs uiKeySize

Res_Size The size of the result in bytes. Irrelevant for statistic structures. Format: Numeric.

M EZapiStruct_Attrs uiResultSize

Multi_Channel_Data_Mode

Specifies how this structure’s data is used on several channels. Valid values: “Identical” - structure always has the same set of entries on all channel. “Different” - structure may have a different set of entries on each channel. Irrelevant for statistic structures.

- EZapiStruct_Attrs eMultiChannel DataMode

Memory_Manage_Type

Specifies how this structure’s memory is managed on several channels. Valid values: "Manual_shared" - memory is managed once for all channels. "manual_per_channel" - memory is managed separately for each channel. Irrelevant for statistic structures.

C EZapiStruct_ CreateParams

eMemMngType

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-117

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Memory_Mng_Options_Channels

Defines a subset of channels for which the following memory management arguments take effect. Valid values: a channel number - for a single channel. a channel map - a subset of the structure channel map. “all” - all the channels to which this structure is mapped. Irrelevant for statistic structures.

C Used to specify indexes in the psMemMngOptions array for structures with per-channel memory management.

2.8.1.1 Create a Statistics Structure

This section contains an example for creating a statistics type structure when using a single network processor. For a description of the arguments, see 2.8.1.

Example for statistics structure - single channel CreateStruct( Channel = 0, Search = TOPsearch-I, Str_Num = 1, Str_Type = Statistic, ); 2.8.1.2 Create a Direct Table Structure

This section contains an example and the arguments for creating a direct table when using a single network processor. For general arguments, see 2.8.1.

Example for table structure - single channel CreateStruct( Channel = 0, Search = TOPsearch-I, Str_Num = 1, Str_Type = Table, Key_Size = 1, Res_Size = 8, Multi_Channel_Data_Mode = Different, Max_Number_Of_Keys = 256 );

Additional arguments specifically for table structures: ARGUMENT DESCRIPTION AND VALID

VALUES M API STRUCTURE API FIELD NAME

Max_Number_Of_Keys

The maximum number of keys. Format: Numeric.

M EZapiStruct_MemMngOptions uiMaxNumberOfKeys

Def_Result The default result for the structure. Format: Hexadecimal bytestream.

- EZapiStruct_MiscOptions pucDefaultResult

Main_Space ID of the space for the table allocation. Format: Numeric.

C EZapiStruct_MemMngOptions uiTableSpaceId

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-118

2.8.1.3 Create a Hash Structure

This section contains an example and the arguments for creating a hash table when using a single network processor. For general arguments, see 2.8.1.

Example for hash structure- single channel CreateStruct( Channel = 0, Search = TOPsearch-I, Str_Num = 30, Str_Type = Hash, Key_Size = 18, Res_Size = 16, Multi_Channel_Data_Mode = Different, Hash_Size = 8, Exp_Entries = 200, Max_Entries = Unlimited, Lookup_Refresh = FALSE, Lookup_Msg = FALSE, Aging_Enable = FALSE, Aging_Machine = 0, HL_Resource_Mng_Mode = Disabled, Per_User_Resource_Control = FALSE, Hash_Function = 1, Single_Cycle = FALSE, Static_Aging_Msg = FALSE, Remote_Aging_Msg = FALSE, Scan_Entry_Msg = FALSE, Counter_Group = FALSE, );

Additional arguments specifically for hash structures: ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Hash_Size The size of the hash in bits, i.e., hash table size = 2^uiHashSize. Format: Numeric.

M EZapiStruct_ MemMngOptions

uiHashSize

Exp_Entries Specifies maximum number of the entries. Format: Numeric.

M EZapiStruct_Attrs uiExpectedNumberOfEntries

Max_Entries Determines the maximum number of the entries in the tree. Format: Numeric or "Unlimited".

M EZapiStruct_Attrs uiMaxNumberOfEntries

Lookup_Refresh Specifies if lookup operations refresh aged entries. Format: Boolean.

- EZapiStruct_MiscOptions

bLookupRefresh

Lookup_Msg Enables the sending of messages to host when lookups are performed on hash entries that have the AddEntry bit set. Format: Boolean.

- EZapiStruct_MiscOptions

bLookupMsg

Aging_Enable Specifies if aging is enabled on this structure. Format: Boolean.

- EZapiStruct_MiscOptions

bAgingEnable

Aging_Machine Specifies the aging machine (0-3) that operates on this structure. Format: Numeric.

- EZapiStruct_MiscOptions

uqAgingMachine

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-119

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

HL_Resource_Mng_Mode

Specifies the mode in which high learn resources are handled. Valid values: "Disabled", "Enabled", "User_Defined", "No_Learn".

- EZapiStruct_ MiscOptions

eHLResourceMngMode

Per_User_Resource_Control

Enables the Per-User Resource Control feature. When enabled, high learn resource IDX02 specifies the statistic counter index to use for the per-user resource counting. Supported from version 6.0. Format: Boolean.

EZapiStruct_MiscOptions

bPerUserResourceControl

Hash_Function Specifies the hash function used on this structure. Format: Numeric.

- EZapiStruct_MiscOptions

eHashFunction

Single_Cycle Specifies whether single cycle hash mode is enabled. Supported from version 6.0. Format: Boolean.

EZapiStruct_MiscOptions

bSingleCycle

Static_Aging_Msg Indicates if to enable sending messages to the host for entries that are aged but static, and are thus not deleted. Supported from version 6.0. Format: Boolean.

EZapiStruct_MiscOptions

bStaticAgingMsg

Remote_Aging_Msg Indicates if to enable sending messages to the host for entries that are aged but are remote (i.e. not local), and are thus not deleted. Supported from version 6.0. Format: Boolean.

EZapiStruct_MiscOptions

bRemoteAgingMsg

Scan_Entry_Msg Indicates if to enable sending messages to host for entries that are in the structure. Relevant only if fifth aging machine is enabled. Supported from version 6.0. Format: Boolean.

EZapiStruct_MiscOptions

bScanEntryMsg

Counter_Group Must be set to TRUE if this structure performs dynamic resource allocation from an index queue for which the counter group feature is enabled (i.e. for which the allocated index represents a group of sequential counters), Supported from version 6.0. Format: Boolean.

EZapiStruct_MiscOptions

bCounterGroup

Main_Space ID of the space for the hash table allocation. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiHashTableSpaceId

Node_Page ID of the space for additional signature page allocation. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiHashNextPageSpaceId

Result_Page ID of the space for result page allocation. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiHashResPageSpaceId

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-120

2.8.1.4 Create a Tree Structure

This section contains an example and the arguments for creating a tree when using a multiple network processors. For general arguments, see 2.8.1.

Example for tree structure- multi channel CreateStruct( ChannelMap = 0h07000000000000000000000000000000, Search = TOPsearch-I, Str_Num = 4, Str_Type = Tree, Key_Size = 0, Res_Size = 8, Multi_Channel_Data_Mode = Identical, Max_entries = 81, Exp_entries = 81, Entry_Type = Varying, Match_Type = Finest, Def_Result = 0hFF22334455667788, );

Additional arguments specifically for tree structures: ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Max_Entries Determines the maximum number of the entries in the tree. Format: Numeric.

M EZapiStruct_Attrs uiMaxNumberOfEntries

Exp_Entries Expected number of entries. Should be equal to the “max_entries” field. Format: Numeric.

M EZapiStruct_Attrs uiExpectedNumberOfEntries

Entry_Type Type of entry. Valid values: “Varying”, “Const”, “Const_Prefix”, ”Const_Complex”, “Const_Suffix”, “IP_V4”, “IP_V6”.

- EZapiStruct_ MiscOptions

eEntryType

Match_Type The match scheme for the tree structure. Valid values: "Finest", "First".

- EZapiStruct_ MiscOptions

eMatchType

Def_Result The default result for the structure. Format: Hexadecimal bytestream.

- EZapiStruct_ MiscOptions

pucDefaultResult

Num_Sub_Structs The number of sub structures. Relevant for direct tree structures only. Format: Numeric.

- EZapiStruct_Attrs uiNumSubStructs

Max_Entries_Per_ Sub_Struct

The maximum number of entries that each of the sub-structures can contain. A value of zero indicates no limitation per sub-structure. Relevant only for direct tree structures. Format: Numeric.

- EZapiStruct_Attrs uiMaxEntriesPerSubStruct

Policy_Depth Defines the minimum depth which must be placed in internal memory. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiTreePolicyDepth

Max_Policy_Depth Defines the maximum depth which should be placed in internal memory. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiTreeMaxPolicyDepth

Main_Space ID of the space for root lookahead page allocation.

C EZapiStruct_ MemMngOptions

uiTreeRootLookaheadPage SpaceId

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-121

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Format: Numeric. Node_Page ID of the space for lookahead page

allocation in internal memory. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiTreeIntLookaheadPage SpaceId

Node_Ext_Page ID of the space for lookahead page allocation in external memory. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiTreeExtLookaheadPage SpaceId

Result_Page ID of the space for result page allocation in internal memory. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiTreeIntResultPageSpaceId

Result_Ext_Page ID of the space for result page allocation in external memory. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiTreeExtResultPageSpaceId

Leaf_Int_Page ID of the space for leaf page allocation in internal memory. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiTreeIntLeafPageSpaceId

Leaf_Ext_Page ID of the space for leaf page allocation in external memory. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiTreeExtLeafPageSpaceId

Int_Backup ID of the backup space in internal memory. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiTreeIntBackupPageSpaceId

Ext_Backup ID of the backup space in external memory. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiTreeExtBackupPageSpaceId

Int_Static_Budget Maximum amount of internal memory (in bytes) that the tree can use statically. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiTreeIntStaticBudget

Int_Extra_Budget Maximum amount of additional internal memory (in bytes) that the tree can use during rebuild. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiTreeIntExtraBudget

Ext_Budget Maximum amount of external memory (in bytes) that the tree can use. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiTreeExtBudget

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-122

2.8.1.5 Create a FastIP Structure

This section contains an example and the arguments for creating a fast_ip structure when using a multiple network processors. For general arguments, see 2.8.1.

Example for tree structure- multi channel CreateStruct( channelmap = 0h07000000000000000000000000000000, Search = TOPsearch-I, Str_Num = 2, Str_Type = Fast_IP, Key_Size = 4, Res_Size = 4, Multi_Channel_Data_Mode = Identical, Max_Entries = 2000, Def_Result = 0h03123456, Segment_Sizes = [ 8, 8, 8, 8 ], Compressed = FALSE, );

Additional arguments specifically for tree structures: ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Max_Entries Determines the maximum number of the entries in the tree. Format: Numeric.

M EZapiStruct_Attrs uiMaxNumberOfEntries

Def_Result The default result for the structure. Format: Hexadecimal bytestream.

- EZapiStruct_ MiscOptions

pucDefaultResult

Segment_Sizes Specifies the configuration of segment sizes in the FastIP structure, The sum of all elements should equal the key size (in bits). Default value is 8-8-8-8 for key_size = 4. Maximum number of segments is 16.

- EZapiStruct_ MiscOptions

uqNumSegments auqSegmentSizes

Compressed Indicates if FastIP structure is in compressed format. Format: Boolean.

- EZapiStruct_ MiscOptions

bCompressed

Fast_IP_Root_Table_Space

ID of the space for root table allocation. Format: Numeric.

C EZapiStruct_ MemMngOptions

uiFastIPRootTableSpaceId

Fast_IP_Next_Table_Space

ID of the space for next tables allocation. Format: Numeric

C EZapiStruct_ MemMngOptions

uiFastIPNextTableSpaceId

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-123

2.8.1.6 Create an External CAM Lookup Structure

This section contains an example and the arguments for creating an external CAM Lookup structure. For general arguments, see 2.8.1. CreateStruct( Channel = 0, Search = TOPsearch-I, Str_Num = 2, Str_Type = Ext_CAM_Lookup, Latency_Index = 2, );

Additional arguments specifically for table structures: ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Latency_Index The latency value to use (one of 8 configurable latency values). Format: Numeric.

M EZapiStruct_Attrs uiResultSize

2.8.1.7 Create an External CAM Read Structure

This section contains an example and the arguments for creating an external CAM Read structure. For arguments, see 2.8.1. CreateStruct( Channel = 0, Search = TOPsearch-I, Str_Num = 2, Str_Type = Ext_CAM_Read, Res_Size = 8, );

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-124

2.8.2 Alias Structure Command NPsl Command

AliasStruct( )

Description

Create an alias for a previously created structure.

API Routine

EZapiStruct_Config( )

API Command

EZapiStruct_ConfigCmd_Alias

Example AliasStruct( Channel = 0, Search = TOPsearch-I, Str_Num = 4, Sec_Str_Num = 6, Break_Link = FALSE Sec_Str_Search = TOPsearch-II );

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Channel The channel number. Format: Numeric.

ChannelMap A hexadecimal bytestream specifying a subset of channels. Can be “all” to specify all channels that this structure is mapped to. If channelmap is “all”, the channel must be specified separately for translation between channel number and channel ID. The structure is always aliased on all channels on which is resides.

M

Search The TOP ID. Valid values: “TOPsearch–I” (or “1”), “TOPsearch–II” (or “2”), “TOPparse”.

M

Str_Num The structure number defined in the structure definition table. Format: Numeric.

M

Used to specify the structure ID on which to perform the requested command (uiStructId). This is done using the EZapiStruct_StatCmd_GetStrId command which translates from a structure number on a given channel and search memory to an internal EZdriver structure ID. If the channel is given, it is used as the channel for translation, otherwise the first channel in the channelmap bytestream is used. The alias operation is always performed on all channels the structure is aliased on.

Sec_Str_Num The second structure number that will be an alias for the original structure. Format: Numeric.

M EZapiStruct_AliasParams uqStructNumber

Break_Link Relevant only for linked structures. If true, the alias structure is not linked (i.e. an alias for a tree_hash structure will be a tree). Format: Boolean.

- EZapiStruct_AliasParams bBreakLink

Sec_Str_Search The TOP ID of the new alias structure. Valid values: “TOPsearch–I” (or “1”), “TOPsearch–II” (or “2”), “TOPparse”.

M EZapiStruct_AliasParams uiSearch

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-125

2.8.3 Build Tree Command NPsl Command

BuildTree( )

Description

Builds a tree structure.

API Routine

EZapiStruct_Config( )

API Command

EZapiStruct_ConfigCmd_Rebuild_Tree

Example buildtree( channel = 0, search = TOPsearch-I, str_num = 4 );

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

channel The channel number. Format: Numeric.

channelmap

A hexadecimal bytestream specifying a subset of channels. Can be “all” to specify all channels that this structure is mapped to. If channelmap is “all”, the channel must be specified separately for translation between channel number and channel ID. Format: Hexadecimal bytestream.

M

search The TOP ID. Valid values: “TOPsearch-I” (or “1”), “TOPsearch-II” (or “2”).

M

str_num The structure number defined in the structure definition table. Format: Numeric.

M

sub_str_num The sub-structure number. Relevant only for direct tree structures. Format: Numeric.

-

These fields are used for these purposes: To specify the structure ID on which to perform the requested command (uiStructId). This is done using the EZapiStruct_StatCmd_GetStrId command which translates from a structure number on a given channel and search memory to an internal EZdriver structure ID.

If the channel is given, it is used as the channel for translation, otherwise the first channel in the channelmap bytestream is used.

To specify the channels on which to perform the action (psChannelMap).

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-126

2.8.4 Rebalance Tree Command NPsl Command

RebalanceTree( )

Description

Re-balances a tree structure.

API Routine

EZapiStruct_Config( )

API Command

EZapiStruct_ConfigCmd_Rebalance_Tree

Example rebalancetree( channelmap = 0h07000000000000000000000000000000, search = TOPsearch-I, str_num = 3, mode = single_part, num_parts = 4, part = 3 );

Details ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

channel The channel number. Format: Numeric.

channelmap

A hexadecimal bytestream specifying a subset of channels. Can be “all” to specify all channels that this structure is mapped to. If channelmap is “all”, the channel must be specified separately for translation between channel number and channel ID. Format: Hexadecimal bytestream.

M

search The TOP ID. Valid values: “TOPsearch-I” (or “1”), “TOPsearch-II” (or “2”).

M

str_num The structure number defined in the structure definition table. Format: Numeric.

M

These fields are used for these purposes: To specify the structure ID on which to perform the requested command (uiStructId). This is done using the EZapiStruct_StatCmd_GetStrId command which translates from a structure number on a given channel and search memory to an internal EZdriver structure ID.

If the channel is given, it is used as the channel for translation, otherwise the first channel in the channelmap bytestream is used.

To specify the channels on which to perform the action (psChannelMap).

mode Specifies whether the rebalance command will apply on one part of the tree, or the whole tree. Valid values: “full_tree”, “single_part”.

- EZapiStruct_RebalanceTreeParams

eMode

num_parts Specifies the number of parts to which the tree will be divided. Relevant only for “single_part” mode. Format: Numeric.

- EZapiStruct_RebalanceTreeParams

uiNumParts

part Specifies the current part from the total number of parts to be rebalanced. Relevant only for “single_part” mode. Format: Numeric.

- EZapiStruct_RebalanceTreeParams

uiPart

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-127

2.8.5 Add, Modify and Delete Entry Commands NPsl Command

AddEntry( ) DeleteEntry( ) ModifyEntry( )

Description

Add a new entry (standard or complex), or modify or delete an existing entry (standard only) from a search structure.These three commands share a common syntax.

API Routine Add entry: EZapiStruct_AddEntry( ) Delete entry: EZapiStruct_DeleteEntry( ) Modify entry: EZapiStruct_ConfigEntry( )

API Command

Modify entry: EZapiStruct_ConfigEntryCmd_ModifyResult

Example for adding a standard table entry addentry ( channel=0, search=TOPsearch-I, str_num=1, str_type=table, key_val=0h36, res_val=0h0300000000000000, );

Details

This section has been divided general arguments followed by examples and arguments for several specific types of search structures, including a statistics structure, direct table, hash structure and tree.

Arguments shared by all entry operations: ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

channel The channel number. Format: Numeric.

channelmap

A hexadecimal bytestream specifying a subset of channels. Can be “all” to specify all channels that this structure is mapped to. If channelmap is “all”, the channel must be specified separately for translation between channel number and channel ID. Structure is always aliased on all channels on which is resides. Format: Hexadecimal bytestream.

M

search The TOP ID. Valid values: “TOPsearch-I” (or “1”), “TOPsearch-II” (or “2”), “TOPparse”.

M

str_num The structure number defined in the structure definition table. Format: Numeric.

M

These fields are used for these purposes: To specify the structure ID on which to perform the requested command (uiStructId). This is done using the EZapiStruct_StatCmd_GetStrId command which translates from a structure number on a given channel and search memory to an internal EZdriver structure ID.

If channel is given, it is used as the channel for translation, otherwise the first channel in the channelmap bytestream is used.

To specify the channels on which to perform the action (psChannelMap).

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-128

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

sub_str_num The sub-structure number. Relevant only for direct tree structures. Format: Numeric.

-

str_type Type of seach structure. Valid values: "statistic", "int_table", ”table”, ”ext_table”, “hash”, “hash_tree”, ”mix_hash”, ”mix_hash_tree”, ”ext_hash”, ”ext_hash_tree”, ”tree” , "tree_hash", “direct_tree”, “ext_direct_tree”, “fast_ip”, “ext_cam_lookup”, “ext_cam_read”.

- Irrelevant - used by EZscr2c to output code relevant to given structure.

key_val The entry key value. Format: Hexadecimal bytestream. Not relevant for complex entries.

(M) EZapiEntry uiKeySize pKey

res_val The entry result value. Format: Hexadecimal bytestream.

(M) EZapiEntry uiResultSize pResult

enforce Specifies whether the operation is to be enforced. Format: Boolean.

- EZapiStruct_ AddEntryOptions

bEnforce

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-129

2.8.5.1 Modifying a Standard Hash Entry

This section contains an example and the arguments for modifying a standard hash entry. For general arguments, see page 2-127.

Example for modifying a standard hash entry modifyentry ( channel=0, search=TOPsearch-I, str_num=1, str_type=hash, key_val=0h36, res_val=0h0300000000000000, ref=false, static=false, local=false, entry_add=false, );

Additional arguments for standard entry commands operating on hash structures: ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

Ref Specifies whether the entry is fresh. Format: Boolean.

- EZapiStruct_EntryAttrs bFresh

Static Specifies whether the entry is static or supports aging. Format: Boolean.

- EZapiStruct_EntryAttrs bStatic

Local Specifies whether the entry is local. Format: Boolean.

- EZapiStruct_EntryAttrs bLocal

entry_add Specifies whether the entry will generate a search message back to the host. Format: Boolean.

- EZapiStruct_EntryAttrs bSetAddEntry

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-130

2.8.5.2 Deleting a Standard Tree Entry

This section contains an example and the arguments for deleting a standard tree entry. For general arguments, see page 2-127.

Example for deleting a standard tree entry delentry ( channel=0, search=TOPsearch-I, str_num=1, str_type=tree, key_val=0h36, mask_val=0hFF, rank=6, enforce=true, );

Additional arguments for standard entry commands operating on tree structures: ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

mask_val The entry mask value. Format: bytestream. Irrelevant for complex entries.

- EZapiEntry uiResultSize pMask

rank Specifies the priority of the entry. Relevant for first match tree structures only. Format: Numeric.

- EZapiStruct_EntryAttrs uiPriority

immediate Specifies whether the entry will be added immediately to the tree, or only during the next rebuild operation. Format: Boolean.

- EZapiStruct_TreeMng eUpdateMode

2.8.5.3 Adding a FastIP Entry

This section contains an example for adding an entry to a FastIP structure. For a description of the arguments, see page 2-127.

Example for adding a FastIP entry addentry ( channel=0, search=TOPsearch-I, str_num=1, str_type=fast_ip, key_val =0h00010203, mask_val=0h00FFFFFF, res_val=0h0300000000000000, );

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-131

2.8.5.4 Adding a Complex Entry

This section contains an example and the arguments for adding a complex entry to a tree. For general arguments, see page 2-127.

Example for adding a complex entry addentry ( channel=0, search=TOPsearch-I, str_num=1, str_type=tree, rank=6, num_fields=7, field_size=32, field_type=normal, field_key=0h0040bccd, field_mask=0h00c0ffff, field_size=32, field_type=range, field_start=0xa000281, field_end=0xa0002ff, field_size=16, field_type=greater_than, field_start=1023, field_size=16, field_type=less_than, field_end=0x27, field_size=16, field_type=any, field_size=8, field_type=equals, field_val=17, field_size=8, field_type=any, res_size=8, res_val=0h1b00000006000000 );

Additional arguments for complex entry commands operating on tree structures: ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

num_fields Specifies the number of fields in a complex entry. Format: Numeric.

M EZapiEntry uiNumFields

field_size Specifies the field size in bits, in a complex entry. Format: Numeric.

M EZapiField uiFieldSize

field_type Specifies the field type, in a complex entry. Valid values: "any", "normal", "equals", "less_than", "not_equals", "greater_than", "range".

M EZapiField eFieldType

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-132

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

field_endian Specifies the endian mode in which the field will be written to the key, in a complex entry. Valid values: “little", "big”. Relevant for field types: “range”, “equals”, “not_equals”, “less_than”, “greater_than”.

- EZapiField eFieldEndian

field_key Specifies the field value in a complex entry. Valid value: hexadecimal byte-stream. Relevant for field type: “normal”. Format: hexadecimal bytestream

(M) EZapiField pKey

field_mask Specifies the field mask in a complex entry. Valid value: hexadecimal bytestream. Relevant for field type: “normal”. Format: hexadecimal bytestream

(M) EZapiField pMask

field_val Specifies the field value in a complex entry. Relevant for field types: “equals”, “not_equals”. Format: Numeric.

(M) EZapiField uiValue1

field_start Specifies the lower bound of a range of a complex entry field. Relevant for field types: “range”, “greater_than”. Format: Numeric.

(M) EZapiField uiValue1

field_end Specifies the upper bound of a range of a complex entry field. Relevant for field types: “range”, “less_than”. Format: Numeric.

(M) EZapiField “range”: uiValue2 “less_than”: uiValue1

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-133

2.8.5.5 Adding a Hash Entry with High Learn Resources

This section contains an example and the arguments for adding hash entry with high-learn resources. For general arguments, see page 2-127.

Example for adding a hash entry with high-learn resources # Add entry with the following high-learn resources: # idx0: user defined software counter, with initial value of 3. # idx1: token bucket counter, allocated from index queue 0 and attached to profile 10. # idx2: state, with initial value of 2. # idx3: index counter, allocated from index queue 1. # idx4: invalid # idx5: invalid # idx6: invalid # idx7: invalid addentry (

channel=0, search=TOPsearch-I, str_num=1, str_type=hash, key_val=0hAA, res_val=0h0300000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFF, idx01_valid = true, idx01_mode = idx01_usr_tok, user_data_type_0 = user_data_swcntr, user_data_0 = 3, queue_num_1 = 0, counter_data_1 = 10, idx234_valid = true, idx234_mode = idx234_3, user_data_type_2 = user_data_state, user_data_2 = 2, queue_num_3 = 1, user_data_type_4 = user_data_none, idx567_valid = false,

);

Additional arguments for hash entry commands with high-learn resources: ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

idx01_valid Format: Boolean. True - the block is valid.

M EZapiStruct_HLResources → EZapiStruct_Index01Data

bValid

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-134

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

idx01_mode The type of counters 0 and 1. Valid values: "idx01_tok_usr" -

idx0 is a token bucket, idx1 is user-defined. idx0 may also have a state.

"idx01_tok_ind" - idx0 is a token bucket, idx1 is an index counter. idx0 may also have a state.

"idx01_ind_usr" - idx0 is an index counter, idx1 is user-defined. idx0 may also have a state.

"idx01_ind_ind" - idx0 is an index counter, idx1 is an index counter. idx0 may also have a state.

"idx01_usr_usr" - idx0 is user-defined, idx1 user-defined.

"idx01_usr_ind" - idx0 is user-defined, idx1 is an index counter.

"idx01_usr_tok" - idx0 is user-defined, idx1 is a token bucket.

(M) eIndex01Mode

user_data_type_0 The type of user defined resource. Valid values: “user_data_none" -

no resource, original result is preserved

"user_data_swcntr" - user-defined software counter

“user_data_state" - user-defined state field

Relevant only for user-defined resources.

(M) eUserDataType

user_data_0 Initial value for software counter or state resource. Relevant only for resources of user-defined type. Format: Numeric.

(M) uiUserData

queue_num_0 The Index queue from which to allocate resources. Relevant only for index counter or token bucket resources. Format: Numeric.

(M) uiQueNum

counter_data_0 The profile that is to be attached to the token bucket resources. Relevant only for token bucket resources. Format: Numeric.

(M)

EZapiStruct_HLResources → EZapiStruct_Index01Data → EZapiStruct_IndexData [ 0 ]

uiCounterData

user_data_type_1 (M) eUserDataType user_data_1 (M) uiUserData queue_num_1 (M) uiQueNum counter_data_1

See: user_data_type_0 user_data_0 queue_num_0 counter_data_0 (M)

EZapiStruct_HLResources → EZapiStruct_Index01Data → EZapiStruct_IndexData [ 1 ]

uiCounterData

idx234_valid Format: Boolean. True - the block is valid.

M EZapiStruct_HLResources → bValid

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-135

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

idx234_mode The type of counters 2, 3 and 4. Valid values: "idx234_2" -

idx2 is an index-counter idx2 can also have a state idx3 is user-defined idx4 is user-defined

"idx234_3" - idx2 is user defined idx3 is an index-counter idx4 is user defined

"idx234_34" - idx2 is user defined idx3 is an index counter idx4 is an index counter

"idx234_234" - idx2 is an index counter idx2 can also have a state idx3 is an index counter idx4 is an index counter

(M) EZapiStruct_Index234Data eIndex234Mode

user_data_type_2 (M) eUserDataType user_data_2 (M) uiUserData queue_num_2 (M) uiQueNum counter_data_2

See: user_data_type_0 user_data_0 queue_num_0 counter_data_0 (M)

EZapiStruct_HLResources → EZapiStruct_Index234Data → EZapiStruct_IndexData [ 0 ] uiCounterData

user_data_type_3 (M) eUserDataType counter_data_3 (M) uiCounterData user_data_3 (M) uiUserData queue_num_3

See: user_data_type_0 user_data_0 queue_num_0 counter_data_0 (M)

EZapiStruct_HLResources → EZapiStruct_Index234Data → EZapiStruct_IndexData [ 1 ]

uiQueNum

user_data_type_4 (M) eUserDataType user_data_4 (M) uiUserData queue_num_4 (M) uiQueNum counter_data_4

See: user_data_type_0 user_data_0 queue_num_0 counter_data_0 (M)

EZapiStruct_HLResources → EZapiStruct_Index234Data → EZapiStruct_IndexData [ 1 ]

uiCounterData

idx567_valid Format: Boolean. True - the block is valid.

M bValid

idx567_mode The type of counters 2, 3 and 4. Valid values: "idx567_5" -

idx5 is an index counter idx6 is user-defined idx7 is user-defined

"idx567_56" - idx5 is an index counter idx6 is an index counter idx7 is user-defined

"idx567_567" - idx5 is an index counter idx6 is an index counter idx7 is an index counter

(M)

EZapiStruct_HLResources → EZapiStruct_Index567Data

eIndex567Mode

(cont.)

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-136

ARGUMENT DESCRIPTION AND VALID VALUES M API STRUCTURE API FIELD NAME

user_data_type_5 (M) eUserDataType user_data_5 (M) uiUserData queue_num_5 (M) uiQueNum counter_data_5

See: user_data_type_0 user_data_0 queue_num_0 counter_data_0 (M)

EZapiStruct_HLResources → EZapiStruct_Index567Data → EZapiStruct_IndexData [ 0 ]

uiCounterData

user_data_type_6 (M) eUserDataType user_data_6 (M) uiUserData queue_num_6 (M) uiQueNum counter_data_6

See: user_data_type_0 user_data_0 queue_num_0 counter_data_0 (M)

EZapiStruct_HLResources → EZapiStruct_Index567Data → EZapiStruct_IndexData [ 1 ]

uiCounterData

user_data_type_7 (M) eUserDataType user_data_7 (M) uiUserData queue_num_7 (M) uiQueNum counter_data_7

See: user_data_type_0 user_data_0 queue_num_0 counter_data_0 (M)

EZapiStruct_HLResources → EZapiStruct_Index567Data → EZapiStruct_IndexData [ 2 ]

uiCounterData

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-137

2.9 NPsl-specific Commands

Unlike the rest of the NPsl commands, these commands are not translated to Driver API calls.

The NPsl-specific commands include:

MPC_config( ) see page 2-137

MPC_struct_config( ) see page 2-139

RunScript( ) see page 2-142

RunMacro( ) see page 2-143

2.9.1 EZmpc2 Commands 2.9.1.1 EZmpc2 Configuration Command

NPsl Command MPC_config( )

Description

Defines global parameters for the EZmpc2 tool.

Example mpc_config ( partition_channelmap = 0h07000000000000000000000000000000, multi_channel_mode = per_channel, external_memory_size = 16, config_channel = 0, { external_memory_size = 32, } config_channelmap = 0h06000000000000000000000000000000, { external_memory_size = 64 } );

Details ARGUMENT DESCRIPTION AND VALID VALUES M

partition_channel Specifies a single channel number for which the memory partition is configured. Format: Hexadecimal bytestream.

-

partition_channelmap Specifies a multiple channel bytestream for which the memory partition is configured. Format: Hexadecimal bytestream.

-

multi_channel_mode The mode in which EZmpc2 should generate multiple channel partitions. Valid values: “shared” – Attempt to create an identical partition for all channels. “per_channel” – Create a separate partition for each channel.

-

external_memory_size External memory size in Mbytes. This definition can be either general, or specific per channel or a subset of channels. In the latter case, it overrides the general definition. Format: Numeric.

-

config_channel Defines a single channel number for which the following definitions will be applied and will override the general EZmpc2 definitions. Format: Numeric.

-

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-138

ARGUMENT DESCRIPTION AND VALID VALUES M

config_channelmap Defines a multiple channel byte-stream for which the following definitions will be applied and will override the general EZmpc2 definitions. Format: Hexadecimal bytestream.

-

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-139

2.9.1.2 EZmpc2 Structure Configuration Command

NPsl Command MPC_struct_config( )

Description

Defines definitions for a search structure that are used only by EZmpc2.

Example for hash structure - single channel mpc_struct_config ( channel = 0, search = 1, str_num = 3, sig_page_percent = 100, low_learn = false, );

Example for tree structure - multi-channel mpc_struct_config ( channelmap = 0h07000000000000000000000000000000, search = 1, str_num = 3, spread_type = leaves_in_external_only, policy_depth = 4, max_policy_depth = 255, budget_percent = 100, tree_increment_percent = 7, rebuild_space = shared, rebuild_location = as_exists, );

Details ARGUMENT DESCRIPTION AND VALID VALUES M

channel - channelmap - search - str_num

These fields are used to specify the structure this command configures. If the channel is given, it is used as the channel for translation, otherwise the first channel in the channelmap bytestream is used. If these fields do not exist, the previous structure defined in the file input to EZmpc2 is used.

-

spread_type Specifies the mode in which the leaves of the tree structure are spread between the internal and external memory. Valid values: "leaves_in_external_only” - leaves are always in external memory. "leaves_also_in_internal" - leaves may be in internal memory, subject to constraints below. Default is “leaves_in_external_only” if external memory exists, “leaves_also_in_internal” otherwise. Relevant only for tree structures.

-

policy_depth The minimum depth which must be placed in internal memory. 0 indicates that EZmpc2 should attempt to automatically configure this value. 1 indicates that the tree should be placed in external memory only (other than root of tree, which is always in internal memory). 255 indicates that the tree should be placed in internal memory only (leaves will still be in external memory if spread_type is set to “leaves_in_external_only”). Relevant only for tree structures. Format: Numeric.

-

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-140

ARGUMENT DESCRIPTION AND VALID VALUES M

budget_percent Configures internal memory budget - used to divide any leftover internal memory. Budget is given in percent of leftover internal memory, relative to other tree structures. Valid values: 0-100. Default is 0 if other tree structures specified budgets, and 100 otherwise. Relevant only for tree structures. Format: Numeric.

-

tree_increment_percent The percent of additions to memory allocated for trees. Default is 7. Relevant only for tree structures. Format: Numeric.

-

rebuild_space Configures how memory should be allocated for tree rebuild. Valid values: “no_rebuild” – tree will not be rebuilt, no need to allocate additional memory. “shared” – memory allocated for rebuild of this tree is shared with memory allocated for other tree rebuilds. “separate” – memory allocated for rebuild of this tree is allocated separately from memory allocated for other tree rebuilds. Default is “shared”. Relevant only for tree structures.

-

rebuild_location Configures the type of memory used for tree rebuild. Valid values: “external_only” – tree is built in external memory only and then returned to internal memory. “as_exists” – tree is rebuilt using existing internal/external division. Default is “as_exists”. Relevant only for tree structures.

-

sig_page_percent The percentage of additional signature pages to allocate. Valid values: 0-100. 0-99 indicates percentage of worst case usage expected. 100 indicates EZmpc2 should attempt to automatically configure this value. Default is 100. Relevant only for hash structures.

-

res_page_percent The percentage of result pages to allocate. Valid values: 0-100. 0-99 indicates percentage of num of entries. 100 indicates EZmpc should attempt to automatically configure this value. Default is 100. Relevant only for single cycle hash structures.

-

low_learn Specifies if low learn operations will be performed on this hash structure. Relevant only for TOPsearch I hash structures. Can only be specified for hash structures with the following key sizes: 4, 8 or 10. Format: Boolean.

-

memory_allocation_mode Specifies the mode for evaluationg memory needs of FastIP structure. Possible values are: “standard” in which user specifies amount of memory to be set for the structure or “advanced” in which mpc will automatically evaluate memory needs according to additional parameters user should specify. Releavnt for fast_ip structure only.

M

memory_allocated Relevant when using “standard” memory_allocation_mode, specifies amount of memory in Mega Bytes to be set for the FastIP structure. Relevant for fast_ip structure only.

(M)

table_utilization Relevant for fast_ip when using “advanced” memory_allocation_mode. Array of values, each values correspond to a segment and specifies table utilization (in percents) in the segment. Default values exist for key_size = 4 with 8-8-8-8, 8-16-8 and 16-8-8 segment

(M)

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-141

ARGUMENT DESCRIPTION AND VALID VALUES M

configurations. prefix_length_distribution Relevant for fast_ip when using “advanced” memory_allocation_mode.

Array of values describing expected distribution of entry prefix lengths across segments.

(M)

external_memory_area Specifies where external portions of the search structure reside. Valid values: “tm_frame”, “search”. Default is “search”.

-

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-142

2.9.2 Execution Commands Execution commands are not translated to Driver API calls, but rather used to execute another NPsl file. They are useful for building hierarchies of NPsl files.

The Execution commands include:

RunScript( ) see page 2-142

RunMacro( ) see page 2-143 2.9.2.1 Run Script

This command is used for an NPsl.txt file that calls additional files in a hierarchy. This does not represent an actual API call.

NPsl Command RunScript( )

Description

Enables the execution of NPsl commands from a file.

Example runscript( "script.txt", # string specifying a file name start = 0, number = 100000, times = 2 );

Details ARGUMENT DESCRIPTION AND VALID VALUES M

start Specifies the operator number from which to start execute commands. Format: Numeric.

-

number Specifies the number of operators to execute, beginning from ‘start’. Format: Numeric.

-

times Specifies the number of times that the script will be executed. Format: Numeric.

-

EZchip Technologies NP-3 NPsl Reference Manual

NPsl Commands Page 2-143

2.9.2.2 Run Bulk Script

This command is used for an NPsl.txt file that calls additional files in a hierarchy. This does not represent an actual API call.

NPsl Command RunMacro( )

Description

Enables the execution of a bulk of NPsl commands from a file. All the NPsl commands in the file are first parsed, and only then sent to the host in a single bulk, and executed concurrently.

Example runmacro( "macro.txt", # string specifying a file name. start = 0, number=100000 );

Details ARGUMENT DESCRIPTION AND VALID VALUES M

start Specifies the operator number from which to start execute commands. Format: Numeric.

-

number Specifies the number of operators to execute, beginning from ‘start’. Format: Numeric.

-

EZchip Technologies NP-3 NPsl Reference Manual

Index 1

Index

AddEntry( ), 2-127 AliasStruct( ), 2-124 BuildTree( ), 2-125 CreateChannel( ), 2-4 CreateStruct( ), 2-115 DeleteEntry( ), 2-127 GoChannel( ), 2-10 InitHmmConfig( ), 2-2 InitPartition( ), 2-12 LoadMicroCode( ), 2-11 ModifyEntry( ), 2-127 MPC_config( ), 2-137 MPC_struct_config( ), 2-139 NPconfig( ), 2-13, 2-57

AGING, 2-14 CONTROL_MEM, 2-15 DEBUG, 2-17 ETHERNET_HW_DECODING_CONFIG,

2-18 EXT_TCAM_LTR_CONFIG, 2-22 EXTERNAL_CAM, 2-20 FRAME_FLOW_ORDERING, 2-23 HIGH_LEARN, 2-25 IF_OUT_OF_BAND_FC, 2-57 IF_RGMII, 2-59 IF_RGMII_PHY_CONFIG, 2-62 IF_RGMII_PHY_REGISTER, 2-63 IF_RGMII_RATE_LIMIT, 2-64 IF_SPI_A, 2-65 IF_SPI_B, 2-65 IF_TIMEOUT_PARAMS, 2-69 IF_XGMII, 2-70 IF_XGMII_PHY_CONFIG, 2-72 IF_XGMII_PHY_REGISTER, 2-73 INDEX_Q, 2-26 METERING_COLOR_ENCODING, 2-27 OAM_CONFIG, 2-28 REAL_TIME_COUNTER_CONFIG, 2-33 RFD_BUFFERS, 2-34 RFD_LIMITS, 2-35 SRH1_MSG_CTRL, 2-39 STAT_CNTRS, 2-40 STAT_CONFIG, 2-41

STAT_GROUP, 2-42 STAT_OP, 2-43 STAT_SPECIAL_CNTRS, 2-47 STAT_TB_PROFILE_CFG, 2-49 STAT_TBS, 2-54 STAT_WATCHDOG_CNTRS, 2-51 STAT_WATCHDOG_PROFILE_CFG, 2-52 TOP_MODIFY_CONFIG, 2-55 TOP_PARSE_CONFIG, 2-56

ReadModifyWrite_Mem( ), 2-112 ReadModifyWrite_Reg( ), 2-114 RebalanceTree( ), 2-126 RunMacro( ), 2-143 RunScript( ), 2-142 Send( ), 2-110 TMconfig( ), 2-74

ADD_ENTITY_TOPOLOGY_PARAMS, 2-79

ENTITY_PARAMS, 2-76 ENTITY_TOPOLOGY_PARAMS, 2-78 FCU_LIMIT, 2-83 FCU_PARAMS, 2-81 FCU_PROFILE, 2-82 GENERAL_PARAMS, 2-84 IFG_PARAMS, 2-86 L3_USER_PROFILE, 2-107 L4_SERVICE_PROFILE, 2-105 Loops, 2-74 PRIORITY_PARAMS, 2-87 REMOVE_ENTITY_TOPOLOGY_PARAM

S, 2-80 SHAPING_PARAMS, 2-88 SHAPING_PROFILE, 2-89 STATISTIC_PARAMS, 2-90 STATISTIC_PARAMS_ADVANCED, 2-92 TOPOLOGY_PARAMS, 2-95 WFQ_PARAMS, 2-96 WFQ_PROFILE, 2-97 WRED_PARAMS, 2-98 WRED_PROFILE, 2-101 WRED_SCALING_PROFILE, 2-104

Write_Reg( ), 2-113 WriteMem( ), 2-111