1296177Sjhibbits/* Copyright (c) 2008-2011 Freescale Semiconductor, Inc. 2296177Sjhibbits * All rights reserved. 3296177Sjhibbits * 4296177Sjhibbits * Redistribution and use in source and binary forms, with or without 5296177Sjhibbits * modification, are permitted provided that the following conditions are met: 6296177Sjhibbits * * Redistributions of source code must retain the above copyright 7296177Sjhibbits * notice, this list of conditions and the following disclaimer. 8296177Sjhibbits * * Redistributions in binary form must reproduce the above copyright 9296177Sjhibbits * notice, this list of conditions and the following disclaimer in the 10296177Sjhibbits * documentation and/or other materials provided with the distribution. 11296177Sjhibbits * * Neither the name of Freescale Semiconductor nor the 12296177Sjhibbits * names of its contributors may be used to endorse or promote products 13296177Sjhibbits * derived from this software without specific prior written permission. 14296177Sjhibbits * 15296177Sjhibbits * 16296177Sjhibbits * ALTERNATIVELY, this software may be distributed under the terms of the 17296177Sjhibbits * GNU General Public License ("GPL") as published by the Free Software 18296177Sjhibbits * Foundation, either version 2 of that License or (at your option) any 19296177Sjhibbits * later version. 20296177Sjhibbits * 21296177Sjhibbits * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY 22296177Sjhibbits * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23296177Sjhibbits * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24296177Sjhibbits * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY 25296177Sjhibbits * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26296177Sjhibbits * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27296177Sjhibbits * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 28296177Sjhibbits * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29296177Sjhibbits * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30296177Sjhibbits * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31296177Sjhibbits */ 32296177Sjhibbits 33296177Sjhibbits/**************************************************************************//** 34296177Sjhibbits @File fm_pcd_ext.h 35296177Sjhibbits 36296177Sjhibbits @Description FM PCD ... 37296177Sjhibbits*//***************************************************************************/ 38296177Sjhibbits#ifndef __FM_PCD_EXT 39296177Sjhibbits#define __FM_PCD_EXT 40296177Sjhibbits 41296177Sjhibbits#include "std_ext.h" 42296177Sjhibbits#include "net_ext.h" 43296177Sjhibbits#include "list_ext.h" 44296177Sjhibbits#include "fm_ext.h" 45296177Sjhibbits 46296177Sjhibbits 47296177Sjhibbits/**************************************************************************//** 48296177Sjhibbits 49296177Sjhibbits @Group FM_grp Frame Manager API 50296177Sjhibbits 51296177Sjhibbits @Description FM API functions, definitions and enums 52296177Sjhibbits 53296177Sjhibbits @{ 54296177Sjhibbits*//***************************************************************************/ 55296177Sjhibbits 56296177Sjhibbits/**************************************************************************//** 57296177Sjhibbits @Group FM_PCD_grp FM PCD 58296177Sjhibbits 59296177Sjhibbits @Description FM PCD API functions, definitions and enums 60296177Sjhibbits 61296177Sjhibbits The FM PCD module is responsible for the initialization of all 62296177Sjhibbits global classifying FM modules. This includes the parser general and 63296177Sjhibbits common registers, the key generator global and common registers, 64296177Sjhibbits and the Policer global and common registers. 65296177Sjhibbits In addition, the FM PCD SW module will initialize all required 66296177Sjhibbits key generator schemes, coarse classification flows, and Policer 67296177Sjhibbits profiles. When An FM module is configured to work with one of these 68296177Sjhibbits entities, it will register to it using the FM PORT API. The PCD 69296177Sjhibbits module will manage the PCD resources - i.e. resource management of 70296177Sjhibbits Keygen schemes, etc. 71296177Sjhibbits 72296177Sjhibbits @{ 73296177Sjhibbits*//***************************************************************************/ 74296177Sjhibbits 75296177Sjhibbits/**************************************************************************//** 76296177Sjhibbits @Collection General PCD defines 77296177Sjhibbits*//***************************************************************************/ 78296177Sjhibbitstypedef uint32_t fmPcdEngines_t; /**< options as defined below: */ 79296177Sjhibbits 80296177Sjhibbits#define FM_PCD_NONE 0 /**< No PCD Engine indicated */ 81296177Sjhibbits#define FM_PCD_PRS 0x80000000 /**< Parser indicated */ 82296177Sjhibbits#define FM_PCD_KG 0x40000000 /**< Keygen indicated */ 83296177Sjhibbits#define FM_PCD_CC 0x20000000 /**< Coarse classification indicated */ 84296177Sjhibbits#define FM_PCD_PLCR 0x10000000 /**< Policer indicated */ 85296177Sjhibbits#define FM_PCD_MANIP 0x08000000 /**< Manipulation indicated */ 86296177Sjhibbits 87296177Sjhibbits#define FM_PCD_MAX_NUM_OF_PRIVATE_HDRS 2 /**< Number of units/headers saved for user */ 88296177Sjhibbits 89296177Sjhibbits#define FM_PCD_PRS_NUM_OF_HDRS 16 /**< Number of headers supported by HW parser */ 90296177Sjhibbits#define FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS (32 - FM_PCD_MAX_NUM_OF_PRIVATE_HDRS) 91296177Sjhibbits /**< number of distinction units is limited by 92296177Sjhibbits register size (32), - reserved bits for 93296177Sjhibbits private headers. */ 94296177Sjhibbits 95296177Sjhibbits#define FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS 4 /**< Maximum number of interchangeable headers in a distinction unit */ 96296177Sjhibbits#define FM_PCD_KG_NUM_OF_GENERIC_REGS 8 /**< Total number of generic KG registers */ 97296177Sjhibbits#define FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY 35 /**< Max number allowed on any configuration. 98296177Sjhibbits For reason of HW implementation, in most 99296177Sjhibbits cases less than this will be allowed. The 100296177Sjhibbits driver will return error in initialization 101296177Sjhibbits time if resource is overused. */ 102296177Sjhibbits#define FM_PCD_KG_NUM_OF_EXTRACT_MASKS 4 /**< Total number of masks allowed on KG extractions. */ 103296177Sjhibbits#define FM_PCD_KG_NUM_OF_DEFAULT_GROUPS 16 /**< Number of default value logical groups */ 104296177Sjhibbits 105296177Sjhibbits#define FM_PCD_PRS_NUM_OF_LABELS 32 /**< Max number of SW parser label */ 106296177Sjhibbits#define FM_PCD_SW_PRS_SIZE 0x00000800 /**< Total size of sw parser area */ 107296177Sjhibbits#define FM_PCD_PRS_SW_OFFSET 0x00000040 /**< Size of illegal addresses at the beginning 108296177Sjhibbits of the SW parser area */ 109296177Sjhibbits#define FM_PCD_PRS_SW_PATCHES_SIZE 0x00000200 /**< Number of bytes saved for patches */ 110296177Sjhibbits#define FM_PCD_PRS_SW_TAIL_SIZE 4 /**< Number of bytes that must be cleared at 111296177Sjhibbits the end of the SW parser area */ 112296177Sjhibbits#define FM_SW_PRS_MAX_IMAGE_SIZE (FM_PCD_SW_PRS_SIZE-FM_PCD_PRS_SW_OFFSET-FM_PCD_PRS_SW_TAIL_SIZE-FM_PCD_PRS_SW_PATCHES_SIZE) 113296177Sjhibbits /**< Max possible size of SW parser code */ 114296177Sjhibbits 115296177Sjhibbits#define FM_PCD_MAX_MANIP_INSRT_TEMPLATE_SIZE 128 /**< Max possible size of insertion template for 116296177Sjhibbits insert manipulation*/ 117296177Sjhibbits/* @} */ 118296177Sjhibbits 119296177Sjhibbits 120296177Sjhibbits/**************************************************************************//** 121296177Sjhibbits @Group FM_PCD_init_grp FM PCD Initialization Unit 122296177Sjhibbits 123296177Sjhibbits @Description FM PCD Initialization Unit 124296177Sjhibbits 125296177Sjhibbits @{ 126296177Sjhibbits*//***************************************************************************/ 127296177Sjhibbits 128296177Sjhibbits/**************************************************************************//** 129296177Sjhibbits @Description PCD counters 130296177Sjhibbits*//***************************************************************************/ 131296177Sjhibbitstypedef enum e_FmPcdCounters { 132296177Sjhibbits e_FM_PCD_KG_COUNTERS_TOTAL, /**< Policer counter */ 133296177Sjhibbits e_FM_PCD_PLCR_COUNTERS_YELLOW, /**< Policer counter */ 134296177Sjhibbits e_FM_PCD_PLCR_COUNTERS_RED, /**< Policer counter */ 135296177Sjhibbits e_FM_PCD_PLCR_COUNTERS_RECOLORED_TO_RED, /**< Policer counter */ 136296177Sjhibbits e_FM_PCD_PLCR_COUNTERS_RECOLORED_TO_YELLOW, /**< Policer counter */ 137296177Sjhibbits e_FM_PCD_PLCR_COUNTERS_TOTAL, /**< Policer counter */ 138296177Sjhibbits e_FM_PCD_PLCR_COUNTERS_LENGTH_MISMATCH, /**< Policer counter */ 139296177Sjhibbits e_FM_PCD_PRS_COUNTERS_PARSE_DISPATCH, /**< Parser counter */ 140296177Sjhibbits e_FM_PCD_PRS_COUNTERS_L2_PARSE_RESULT_RETURNED, /**< Parser counter */ 141296177Sjhibbits e_FM_PCD_PRS_COUNTERS_L3_PARSE_RESULT_RETURNED, /**< Parser counter */ 142296177Sjhibbits e_FM_PCD_PRS_COUNTERS_L4_PARSE_RESULT_RETURNED, /**< Parser counter */ 143296177Sjhibbits e_FM_PCD_PRS_COUNTERS_SHIM_PARSE_RESULT_RETURNED, /**< Parser counter */ 144296177Sjhibbits e_FM_PCD_PRS_COUNTERS_L2_PARSE_RESULT_RETURNED_WITH_ERR, /**< Parser counter */ 145296177Sjhibbits e_FM_PCD_PRS_COUNTERS_L3_PARSE_RESULT_RETURNED_WITH_ERR, /**< Parser counter */ 146296177Sjhibbits e_FM_PCD_PRS_COUNTERS_L4_PARSE_RESULT_RETURNED_WITH_ERR, /**< Parser counter */ 147296177Sjhibbits e_FM_PCD_PRS_COUNTERS_SHIM_PARSE_RESULT_RETURNED_WITH_ERR, /**< Parser counter */ 148296177Sjhibbits e_FM_PCD_PRS_COUNTERS_SOFT_PRS_CYCLES, /**< Parser counter */ 149296177Sjhibbits e_FM_PCD_PRS_COUNTERS_SOFT_PRS_STALL_CYCLES, /**< Parser counter */ 150296177Sjhibbits e_FM_PCD_PRS_COUNTERS_HARD_PRS_CYCLE_INCL_STALL_CYCLES, /**< Parser counter */ 151296177Sjhibbits e_FM_PCD_PRS_COUNTERS_MURAM_READ_CYCLES, /**< MURAM counter */ 152296177Sjhibbits e_FM_PCD_PRS_COUNTERS_MURAM_READ_STALL_CYCLES, /**< MURAM counter */ 153296177Sjhibbits e_FM_PCD_PRS_COUNTERS_MURAM_WRITE_CYCLES, /**< MURAM counter */ 154296177Sjhibbits e_FM_PCD_PRS_COUNTERS_MURAM_WRITE_STALL_CYCLES, /**< MURAM counter */ 155296177Sjhibbits e_FM_PCD_PRS_COUNTERS_FPM_COMMAND_STALL_CYCLES /**< FPM counter */ 156296177Sjhibbits} e_FmPcdCounters; 157296177Sjhibbits 158296177Sjhibbits/**************************************************************************//** 159296177Sjhibbits @Description PCD interrupts 160296177Sjhibbits*//***************************************************************************/ 161296177Sjhibbitstypedef enum e_FmPcdExceptions { 162296177Sjhibbits e_FM_PCD_KG_EXCEPTION_DOUBLE_ECC, /**< Keygen ECC error */ 163296177Sjhibbits e_FM_PCD_PLCR_EXCEPTION_DOUBLE_ECC, /**< Read Buffer ECC error */ 164296177Sjhibbits e_FM_PCD_KG_EXCEPTION_KEYSIZE_OVERFLOW, /**< Write Buffer ECC error on system side */ 165296177Sjhibbits e_FM_PCD_PLCR_EXCEPTION_INIT_ENTRY_ERROR, /**< Write Buffer ECC error on FM side */ 166296177Sjhibbits e_FM_PCD_PLCR_EXCEPTION_PRAM_SELF_INIT_COMPLETE, /**< Self init complete */ 167296177Sjhibbits e_FM_PCD_PLCR_EXCEPTION_ATOMIC_ACTION_COMPLETE, /**< Atomic action complete */ 168296177Sjhibbits e_FM_PCD_PRS_EXCEPTION_DOUBLE_ECC, /**< Parser ECC error */ 169296177Sjhibbits e_FM_PCD_PRS_EXCEPTION_SINGLE_ECC /**< Parser single ECC */ 170296177Sjhibbits} e_FmPcdExceptions; 171296177Sjhibbits 172296177Sjhibbits 173296177Sjhibbits/**************************************************************************//** 174296177Sjhibbits @Description Exceptions user callback routine, will be called upon an 175296177Sjhibbits exception passing the exception identification. 176296177Sjhibbits 177296177Sjhibbits @Param[in] h_App - User's application descriptor. 178296177Sjhibbits @Param[in] exception - The exception. 179296177Sjhibbits *//***************************************************************************/ 180296177Sjhibbitstypedef void (t_FmPcdExceptionCallback) (t_Handle h_App, e_FmPcdExceptions exception); 181296177Sjhibbits 182296177Sjhibbits/**************************************************************************//** 183296177Sjhibbits @Description Exceptions user callback routine, will be called upon an exception 184296177Sjhibbits passing the exception identification. 185296177Sjhibbits 186296177Sjhibbits @Param[in] h_App - User's application descriptor. 187296177Sjhibbits @Param[in] exception - The exception. 188296177Sjhibbits @Param[in] index - id of the relevant source (may be scheme or profile id). 189296177Sjhibbits *//***************************************************************************/ 190296177Sjhibbitstypedef void (t_FmPcdIdExceptionCallback) ( t_Handle h_App, 191296177Sjhibbits e_FmPcdExceptions exception, 192296177Sjhibbits uint16_t index); 193296177Sjhibbits 194296177Sjhibbits/**************************************************************************//** 195296177Sjhibbits @Description A callback for enqueuing frame onto a QM queue. 196296177Sjhibbits 197296177Sjhibbits @Param[in] h_App - User's application descriptor. 198296177Sjhibbits @Param[in] p_Fd - Frame descriptor for the frame. 199296177Sjhibbits 200296177Sjhibbits @Return E_OK on success; Error code otherwise. 201296177Sjhibbits *//***************************************************************************/ 202296177Sjhibbitstypedef t_Error (t_FmPcdQmEnqueueCallback) (t_Handle h_QmArg, void *p_Fd); 203296177Sjhibbits 204296177Sjhibbits/**************************************************************************//** 205296177Sjhibbits @Description A structure for Host-Command 206296177Sjhibbits When using Host command for PCD functionalities, a dedicated port 207296177Sjhibbits must be used. If this routine is called for a PCD in a single partition 208296177Sjhibbits environment, or it is the Master partition in a Multi partition 209296177Sjhibbits environment, The port will be initialized by the PCD driver 210296177Sjhibbits initialization routine. 211296177Sjhibbits *//***************************************************************************/ 212296177Sjhibbitstypedef struct t_FmPcdHcParams { 213296177Sjhibbits uintptr_t portBaseAddr; /**< Host-Command Port Virtual Address of 214296177Sjhibbits memory mapped registers.*/ 215296177Sjhibbits uint8_t portId; /**< Host-Command Port Id (0-6 relative 216296177Sjhibbits to Host-Command/Offline parsing ports) */ 217296177Sjhibbits uint16_t liodnBase; /**< Irrelevant for P4080 rev 1. LIODN base for this port, to be 218296177Sjhibbits used together with LIODN offset. */ 219296177Sjhibbits uint32_t errFqid; /**< Host-Command Port Error Queue Id. */ 220296177Sjhibbits uint32_t confFqid; /**< Host-Command Port Confirmation queue Id. */ 221296177Sjhibbits uint32_t qmChannel; /**< Host-Command port - QM-channel dedicated to 222296177Sjhibbits this port will be used by the FM for dequeue. */ 223296177Sjhibbits t_FmPcdQmEnqueueCallback *f_QmEnqueue; /**< Call back routine for enqueuing a frame to the QM */ 224296177Sjhibbits t_Handle h_QmArg; /**< A handle of the QM module */ 225296177Sjhibbits} t_FmPcdHcParams; 226296177Sjhibbits 227296177Sjhibbits/**************************************************************************//** 228296177Sjhibbits @Description The main structure for PCD initialization 229296177Sjhibbits *//***************************************************************************/ 230296177Sjhibbitstypedef struct t_FmPcdParams { 231296177Sjhibbits bool prsSupport; /**< TRUE if Parser will be used for any 232296177Sjhibbits of the FM ports */ 233296177Sjhibbits bool ccSupport; /**< TRUE if Coarse Classification will be used for any 234296177Sjhibbits of the FM ports */ 235296177Sjhibbits bool kgSupport; /**< TRUE if Keygen will be used for any 236296177Sjhibbits of the FM ports */ 237296177Sjhibbits bool plcrSupport; /**< TRUE if Policer will be used for any 238296177Sjhibbits of the FM ports */ 239296177Sjhibbits t_Handle h_Fm; /**< A handle to the FM module */ 240296177Sjhibbits uint8_t numOfSchemes; /**< Number of schemes dedicated to this partition. */ 241296177Sjhibbits bool useHostCommand; /**< Optional for single partition, Mandatory for Multi partition */ 242296177Sjhibbits t_FmPcdHcParams hc; /**< Relevant only if useHostCommand=TRUE. 243296177Sjhibbits Host Command parameters. */ 244296177Sjhibbits 245296177Sjhibbits t_FmPcdExceptionCallback *f_Exception; /**< Relevant for master (or single) partition only: Callback routine 246296177Sjhibbits to be called of PCD exception */ 247296177Sjhibbits t_FmPcdIdExceptionCallback *f_ExceptionId; /**< Relevant for master (or single) partition only: Callback routine 248296177Sjhibbits to be used for a single scheme and 249296177Sjhibbits profile exceptions */ 250296177Sjhibbits t_Handle h_App; /**< Relevant for master (or single) partition only: A handle to an 251296177Sjhibbits application layer object; This handle will 252296177Sjhibbits be passed by the driver upon calling the above callbacks */ 253296177Sjhibbits} t_FmPcdParams; 254296177Sjhibbits 255296177Sjhibbits 256296177Sjhibbits/**************************************************************************//** 257296177Sjhibbits @Function FM_PCD_Config 258296177Sjhibbits 259296177Sjhibbits @Description Basic configuration of the PCD module. 260296177Sjhibbits Creates descriptor for the FM PCD module. 261296177Sjhibbits 262296177Sjhibbits @Param[in] p_FmPcdParams A structure of parameters for the initialization of PCD. 263296177Sjhibbits 264296177Sjhibbits @Return A handle to the initialized module. 265296177Sjhibbits*//***************************************************************************/ 266296177Sjhibbitst_Handle FM_PCD_Config(t_FmPcdParams *p_FmPcdParams); 267296177Sjhibbits 268296177Sjhibbits/**************************************************************************//** 269296177Sjhibbits @Function FM_PCD_Init 270296177Sjhibbits 271296177Sjhibbits @Description Initialization of the PCD module. 272296177Sjhibbits 273296177Sjhibbits @Param[in] h_FmPcd - FM PCD module descriptor. 274296177Sjhibbits 275296177Sjhibbits @Return E_OK on success; Error code otherwise. 276296177Sjhibbits*//***************************************************************************/ 277296177Sjhibbitst_Error FM_PCD_Init(t_Handle h_FmPcd); 278296177Sjhibbits 279296177Sjhibbits/**************************************************************************//** 280296177Sjhibbits @Function FM_PCD_Free 281296177Sjhibbits 282296177Sjhibbits @Description Frees all resources that were assigned to FM module. 283296177Sjhibbits 284296177Sjhibbits Calling this routine invalidates the descriptor. 285296177Sjhibbits 286296177Sjhibbits @Param[in] h_FmPcd - FM PCD module descriptor. 287296177Sjhibbits 288296177Sjhibbits @Return E_OK on success; Error code otherwise. 289296177Sjhibbits*//***************************************************************************/ 290296177Sjhibbitst_Error FM_PCD_Free(t_Handle h_FmPcd); 291296177Sjhibbits 292296177Sjhibbits/**************************************************************************//** 293296177Sjhibbits @Group FM_PCD_advanced_init_grp FM PCD Advanced Configuration Unit 294296177Sjhibbits 295296177Sjhibbits @Description Configuration functions used to change default values. 296296177Sjhibbits 297296177Sjhibbits @{ 298296177Sjhibbits*//***************************************************************************/ 299296177Sjhibbits 300296177Sjhibbits/**************************************************************************//** 301296177Sjhibbits @Function FM_PCD_ConfigPlcrNumOfSharedProfiles 302296177Sjhibbits 303296177Sjhibbits @Description Calling this routine changes the internal driver data base 304296177Sjhibbits from its default selection of exceptions enablement. 305296177Sjhibbits [4]. 306296177Sjhibbits 307296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 308296177Sjhibbits @Param[in] numOfSharedPlcrProfiles Number of profiles to 309296177Sjhibbits be shared between ports on this partition 310296177Sjhibbits 311296177Sjhibbits @Return E_OK on success; Error code otherwise. 312296177Sjhibbits*//***************************************************************************/ 313296177Sjhibbitst_Error FM_PCD_ConfigPlcrNumOfSharedProfiles(t_Handle h_FmPcd, uint16_t numOfSharedPlcrProfiles); 314296177Sjhibbits 315296177Sjhibbits/**************************************************************************//** 316296177Sjhibbits @Function FM_PCD_ConfigException 317296177Sjhibbits 318296177Sjhibbits @Description Calling this routine changes the internal driver data base 319296177Sjhibbits from its default selection of exceptions enablement. 320296177Sjhibbits By default all exceptions are enabled. 321296177Sjhibbits 322296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 323296177Sjhibbits @Param[in] exception The exception to be selected. 324296177Sjhibbits @Param[in] enable TRUE to enable interrupt, FALSE to mask it. 325296177Sjhibbits 326296177Sjhibbits @Return E_OK on success; Error code otherwise. 327296177Sjhibbits 328296177Sjhibbits @Cautions Not available for guest partition. 329296177Sjhibbits*//***************************************************************************/ 330296177Sjhibbitst_Error FM_PCD_ConfigException(t_Handle h_FmPcd, e_FmPcdExceptions exception, bool enable); 331296177Sjhibbits 332296177Sjhibbits/**************************************************************************//** 333296177Sjhibbits @Function FM_PCD_ConfigPlcrAutoRefreshMode 334296177Sjhibbits 335296177Sjhibbits @Description Calling this routine changes the internal driver data base 336296177Sjhibbits from its default selection of exceptions enablement. 337296177Sjhibbits By default autorefresh is enabled. 338296177Sjhibbits 339296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 340296177Sjhibbits @Param[in] enable TRUE to enable, FALSE to disable 341296177Sjhibbits 342296177Sjhibbits @Return E_OK on success; Error code otherwise. 343296177Sjhibbits 344296177Sjhibbits @Cautions Not available for guest partition. 345296177Sjhibbits*//***************************************************************************/ 346296177Sjhibbitst_Error FM_PCD_ConfigPlcrAutoRefreshMode(t_Handle h_FmPcd, bool enable); 347296177Sjhibbits 348296177Sjhibbits/**************************************************************************//** 349296177Sjhibbits @Function FM_PCD_ConfigPrsMaxCycleLimit 350296177Sjhibbits 351296177Sjhibbits @Description Calling this routine changes the internal data structure for 352296177Sjhibbits the maximum parsing time from its default value 353296177Sjhibbits [0]. 354296177Sjhibbits 355296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 356296177Sjhibbits @Param[in] value 0 to disable the mechanism, or new 357296177Sjhibbits maximum parsing time. 358296177Sjhibbits 359296177Sjhibbits @Return E_OK on success; Error code otherwise. 360296177Sjhibbits 361296177Sjhibbits @Cautions Not available for guest partition. 362296177Sjhibbits*//***************************************************************************/ 363296177Sjhibbitst_Error FM_PCD_ConfigPrsMaxCycleLimit(t_Handle h_FmPcd,uint16_t value); 364296177Sjhibbits 365296177Sjhibbits/** @} */ /* end of FM_PCD_advanced_init_grp group */ 366296177Sjhibbits/** @} */ /* end of FM_PCD_init_grp group */ 367296177Sjhibbits 368296177Sjhibbits 369296177Sjhibbits/**************************************************************************//** 370296177Sjhibbits @Group FM_PCD_Runtime_grp FM PCD Runtime Unit 371296177Sjhibbits 372296177Sjhibbits @Description FM PCD Runtime Unit 373296177Sjhibbits 374296177Sjhibbits The runtime control allows creation of PCD infrastructure modules 375296177Sjhibbits such as Network Environment Characteristics, Classification Plan 376296177Sjhibbits Groups and Coarse Classification Trees. 377296177Sjhibbits It also allows on-the-fly initialization, modification and removal 378296177Sjhibbits of PCD modules such as Keygen schemes, coarse classification nodes 379296177Sjhibbits and Policer profiles. 380296177Sjhibbits 381296177Sjhibbits 382296177Sjhibbits In order to explain the programming model of the PCD driver interface 383296177Sjhibbits a few terms should be explained, and will be used below. 384296177Sjhibbits * Distinction Header - One of the 16 protocols supported by the FM parser, 385296177Sjhibbits or one of the shim headers (1 or 2). May be a header with a special 386296177Sjhibbits option (see below). 387296177Sjhibbits * Interchangeable Headers Group- This is a group of Headers recognized 388296177Sjhibbits by either one of them. For example, if in a specific context the user 389296177Sjhibbits chooses to treat IPv4 and IPV6 in the same way, they may create an 390296177Sjhibbits interchangeable Headers Unit consisting of these 2 headers. 391296177Sjhibbits * A Distinction Unit - a Distinction Header or an Interchangeable Headers 392296177Sjhibbits Group. 393296177Sjhibbits * Header with special option - applies to ethernet, mpls, vlan, ipv4 and 394296177Sjhibbits ipv6, includes multicast, broadcast and other protocol specific options. 395296177Sjhibbits In terms of hardware it relates to the options available in the classification 396296177Sjhibbits plan. 397296177Sjhibbits * Network Environment Characteristics - a set of Distinction Units that define 398296177Sjhibbits the total recognizable header selection for a certain environment. This is 399296177Sjhibbits NOT the list of all headers that will ever appear in a flow, but rather 400296177Sjhibbits everything that needs distinction in a flow, where distinction is made by keygen 401296177Sjhibbits schemes and coarse classification action descriptors. 402296177Sjhibbits 403296177Sjhibbits The PCD runtime modules initialization is done in stages. The first stage after 404296177Sjhibbits initializing the PCD module itself is to establish a Network Flows Environment 405296177Sjhibbits Definition. The application may choose to establish one or more such environments. 406296177Sjhibbits Later, when needed, the application will have to state, for some of its modules, 407296177Sjhibbits to which single environment it belongs. 408296177Sjhibbits 409296177Sjhibbits @{ 410296177Sjhibbits*//***************************************************************************/ 411296177Sjhibbits 412296177Sjhibbits/**************************************************************************//** 413296177Sjhibbits @Description A structure for sw parser labels 414296177Sjhibbits *//***************************************************************************/ 415296177Sjhibbitstypedef struct t_FmPcdPrsLabelParams { 416296177Sjhibbits uint32_t instructionOffset; /**< SW parser label instruction offset (2 bytes 417296177Sjhibbits resolution), relative to Parser RAM. */ 418296177Sjhibbits e_NetHeaderType hdr; /**< The existance of this header will envoke 419296177Sjhibbits the sw parser code. */ 420296177Sjhibbits uint8_t indexPerHdr; /**< Normally 0, if more than one sw parser 421296177Sjhibbits attachments for the same header, use this 422296177Sjhibbits index to distinguish between them. */ 423296177Sjhibbits} t_FmPcdPrsLabelParams; 424296177Sjhibbits 425296177Sjhibbits/**************************************************************************//** 426296177Sjhibbits @Description A structure for sw parser 427296177Sjhibbits *//***************************************************************************/ 428296177Sjhibbitstypedef struct t_FmPcdPrsSwParams { 429296177Sjhibbits bool override; /**< FALSE to invoke a check that nothing else 430296177Sjhibbits was loaded to this address, including 431296177Sjhibbits internal patches. 432296177Sjhibbits TRUE to override any existing code.*/ 433296177Sjhibbits uint32_t size; /**< SW parser code size */ 434296177Sjhibbits uint16_t base; /**< SW parser base (in instruction counts! 435296177Sjhibbits must be larger than 0x20)*/ 436296177Sjhibbits uint8_t *p_Code; /**< SW parser code */ 437296177Sjhibbits uint32_t swPrsDataParams[FM_PCD_PRS_NUM_OF_HDRS]; 438296177Sjhibbits /**< SW parser data (parameters) */ 439296177Sjhibbits uint8_t numOfLabels; /**< Number of labels for SW parser. */ 440296177Sjhibbits t_FmPcdPrsLabelParams labelsTable[FM_PCD_PRS_NUM_OF_LABELS]; 441296177Sjhibbits /**< SW parser labels table, containing 442296177Sjhibbits numOfLabels entries */ 443296177Sjhibbits} t_FmPcdPrsSwParams; 444296177Sjhibbits 445296177Sjhibbits 446296177Sjhibbits/**************************************************************************//** 447296177Sjhibbits @Function FM_PCD_Enable 448296177Sjhibbits 449296177Sjhibbits @Description This routine should be called after PCD is initialized for enabling all 450296177Sjhibbits PCD engines according to their existing configuration. 451296177Sjhibbits 452296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 453296177Sjhibbits 454296177Sjhibbits @Return E_OK on success; Error code otherwise. 455296177Sjhibbits 456296177Sjhibbits @Cautions Allowed only following FM_PCD_Init() and when PCD is disabled. 457296177Sjhibbits*//***************************************************************************/ 458296177Sjhibbitst_Error FM_PCD_Enable(t_Handle h_FmPcd); 459296177Sjhibbits 460296177Sjhibbits/**************************************************************************//** 461296177Sjhibbits @Function FM_PCD_Disable 462296177Sjhibbits 463296177Sjhibbits @Description This routine may be called when PCD is enabled in order to 464296177Sjhibbits disable all PCD engines. It may be called 465296177Sjhibbits only when none of the ports in the system are using the PCD. 466296177Sjhibbits 467296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 468296177Sjhibbits 469296177Sjhibbits @Return E_OK on success; Error code otherwise. 470296177Sjhibbits 471296177Sjhibbits @Cautions Allowed only following FM_PCD_Init() and when PCD is enabled. 472296177Sjhibbits*//***************************************************************************/ 473296177Sjhibbitst_Error FM_PCD_Disable(t_Handle h_FmPcd); 474296177Sjhibbits 475296177Sjhibbits 476296177Sjhibbits/**************************************************************************//** 477296177Sjhibbits @Function FM_PCD_GetCounter 478296177Sjhibbits 479296177Sjhibbits @Description Reads one of the FM PCD counters. 480296177Sjhibbits 481296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 482296177Sjhibbits @Param[in] counter The requested counter. 483296177Sjhibbits 484296177Sjhibbits @Return Counter's current value. 485296177Sjhibbits 486296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 487296177Sjhibbits Note that it is user's responsibility to call this routine only 488296177Sjhibbits for enabled counters, and there will be no indication if a 489296177Sjhibbits disabled counter is accessed. 490296177Sjhibbits*//***************************************************************************/ 491296177Sjhibbitsuint32_t FM_PCD_GetCounter(t_Handle h_FmPcd, e_FmPcdCounters counter); 492296177Sjhibbits 493296177Sjhibbits/**************************************************************************//** 494296177Sjhibbits@Function FM_PCD_PrsLoadSw 495296177Sjhibbits 496296177Sjhibbits@Description This routine may be called in order to load software parsing code. 497296177Sjhibbits 498296177Sjhibbits 499296177Sjhibbits@Param[in] h_FmPcd FM PCD module descriptor. 500296177Sjhibbits@Param[in] p_SwPrs A pointer to a structure of software 501296177Sjhibbits parser parameters, including the software 502296177Sjhibbits parser image. 503296177Sjhibbits 504296177Sjhibbits@Return E_OK on success; Error code otherwise. 505296177Sjhibbits 506296177Sjhibbits@Cautions Allowed only following FM_PCD_Init() and when PCD is disabled. 507296177Sjhibbits Not available for guest partition. 508296177Sjhibbits*//***************************************************************************/ 509296177Sjhibbitst_Error FM_PCD_PrsLoadSw(t_Handle h_FmPcd, t_FmPcdPrsSwParams *p_SwPrs); 510296177Sjhibbits 511296177Sjhibbits/**************************************************************************//** 512296177Sjhibbits @Function FM_PCD_KgSetDfltValue 513296177Sjhibbits 514296177Sjhibbits @Description Calling this routine sets a global default value to be used 515296177Sjhibbits by the keygen when parser does not recognize a required 516296177Sjhibbits field/header. 517296177Sjhibbits By default default values are 0. 518296177Sjhibbits 519296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 520296177Sjhibbits @Param[in] valueId 0,1 - one of 2 global default values. 521296177Sjhibbits @Param[in] value The requested default value. 522296177Sjhibbits 523296177Sjhibbits @Return E_OK on success; Error code otherwise. 524296177Sjhibbits 525296177Sjhibbits @Cautions Allowed only following FM_PCD_Init() and when PCD is disabled. 526296177Sjhibbits Not available for guest partition. 527296177Sjhibbits*//***************************************************************************/ 528296177Sjhibbitst_Error FM_PCD_KgSetDfltValue(t_Handle h_FmPcd, uint8_t valueId, uint32_t value); 529296177Sjhibbits 530296177Sjhibbits/**************************************************************************//** 531296177Sjhibbits @Function FM_PCD_KgSetAdditionalDataAfterParsing 532296177Sjhibbits 533296177Sjhibbits @Description Calling this routine allows the keygen to access data past 534296177Sjhibbits the parser finishing point. 535296177Sjhibbits 536296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 537296177Sjhibbits @Param[in] payloadOffset the number of bytes beyond the parser location. 538296177Sjhibbits 539296177Sjhibbits @Return E_OK on success; Error code otherwise. 540296177Sjhibbits 541296177Sjhibbits @Cautions Allowed only following FM_PCD_Init() and when PCD is disabled. 542296177Sjhibbits Not available for guest partition. 543296177Sjhibbits*//***************************************************************************/ 544296177Sjhibbitst_Error FM_PCD_KgSetAdditionalDataAfterParsing(t_Handle h_FmPcd, uint8_t payloadOffset); 545296177Sjhibbits 546296177Sjhibbits/**************************************************************************//** 547296177Sjhibbits @Function FM_PCD_SetException 548296177Sjhibbits 549296177Sjhibbits @Description Calling this routine enables/disables PCD interrupts. 550296177Sjhibbits 551296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 552296177Sjhibbits @Param[in] exception The exception to be selected. 553296177Sjhibbits @Param[in] enable TRUE to enable interrupt, FALSE to mask it. 554296177Sjhibbits 555296177Sjhibbits @Return E_OK on success; Error code otherwise. 556296177Sjhibbits 557296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 558296177Sjhibbits Not available for guest partition. 559296177Sjhibbits*//***************************************************************************/ 560296177Sjhibbitst_Error FM_PCD_SetException(t_Handle h_FmPcd, e_FmPcdExceptions exception, bool enable); 561296177Sjhibbits 562296177Sjhibbits/**************************************************************************//** 563296177Sjhibbits @Function FM_PCD_ModifyCounter 564296177Sjhibbits 565296177Sjhibbits @Description Sets a value to an enabled counter. Use "0" to reset the counter. 566296177Sjhibbits 567296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 568296177Sjhibbits @Param[in] counter The requested counter. 569296177Sjhibbits @Param[in] value The requested value to be written into the counter. 570296177Sjhibbits 571296177Sjhibbits @Return E_OK on success; Error code otherwise. 572296177Sjhibbits 573296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 574296177Sjhibbits Not available for guest partition. 575296177Sjhibbits*//***************************************************************************/ 576296177Sjhibbitst_Error FM_PCD_ModifyCounter(t_Handle h_FmPcd, e_FmPcdCounters counter, uint32_t value); 577296177Sjhibbits 578296177Sjhibbits/**************************************************************************//** 579296177Sjhibbits @Function FM_PCD_SetPlcrStatistics 580296177Sjhibbits 581296177Sjhibbits @Description This routine may be used to enable/disable policer statistics 582296177Sjhibbits counter. By default the statistics is enabled. 583296177Sjhibbits 584296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor 585296177Sjhibbits @Param[in] enable TRUE to enable, FALSE to disable. 586296177Sjhibbits 587296177Sjhibbits @Return E_OK on success; Error code otherwise. 588296177Sjhibbits 589296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 590296177Sjhibbits Not available for guest partition. 591296177Sjhibbits*//***************************************************************************/ 592296177Sjhibbitst_Error FM_PCD_SetPlcrStatistics(t_Handle h_FmPcd, bool enable); 593296177Sjhibbits 594296177Sjhibbits/**************************************************************************//** 595296177Sjhibbits @Function FM_PCD_SetPrsStatistics 596296177Sjhibbits 597296177Sjhibbits @Description Defines whether to gather parser statistics including all ports. 598296177Sjhibbits 599296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 600296177Sjhibbits @Param[in] enable TRUE to enable, FALSE to disable. 601296177Sjhibbits 602296177Sjhibbits @Return None 603296177Sjhibbits 604296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 605296177Sjhibbits Not available for guest partition. 606296177Sjhibbits*//***************************************************************************/ 607296177Sjhibbitsvoid FM_PCD_SetPrsStatistics(t_Handle h_FmPcd, bool enable); 608296177Sjhibbits 609296177Sjhibbits/**************************************************************************//** 610296177Sjhibbits @Function FM_PCD_ForceIntr 611296177Sjhibbits 612296177Sjhibbits @Description Causes an interrupt event on the requested source. 613296177Sjhibbits 614296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 615296177Sjhibbits @Param[in] exception An exception to be forced. 616296177Sjhibbits 617296177Sjhibbits @Return E_OK on success; Error code if the exception is not enabled, 618296177Sjhibbits or is not able to create interrupt. 619296177Sjhibbits 620296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 621296177Sjhibbits Not available for guest partition. 622296177Sjhibbits*//***************************************************************************/ 623296177Sjhibbitst_Error FM_PCD_ForceIntr (t_Handle h_FmPcd, e_FmPcdExceptions exception); 624296177Sjhibbits 625296177Sjhibbits/**************************************************************************//** 626296177Sjhibbits @Function FM_PCD_HcTxConf 627296177Sjhibbits 628296177Sjhibbits @Description This routine should be called to confirm frames that were 629296177Sjhibbits received on the HC confirmation queue. 630296177Sjhibbits 631296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 632296177Sjhibbits @Param[in] p_Fd Frame descriptor of the received frame. 633296177Sjhibbits 634296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). Allowed only if 'useHostCommand' 635296177Sjhibbits option was selected in the initialization. 636296177Sjhibbits*//***************************************************************************/ 637296177Sjhibbitsvoid FM_PCD_HcTxConf(t_Handle h_FmPcd, t_DpaaFD *p_Fd); 638296177Sjhibbits 639296177Sjhibbits#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0)) 640296177Sjhibbits/**************************************************************************//** 641296177Sjhibbits @Function FM_PCD_DumpRegs 642296177Sjhibbits 643296177Sjhibbits @Description Dumps all PCD registers 644296177Sjhibbits 645296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 646296177Sjhibbits 647296177Sjhibbits @Return E_OK on success; Error code otherwise. 648296177Sjhibbits 649296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 650296177Sjhibbits*//***************************************************************************/ 651296177Sjhibbitst_Error FM_PCD_DumpRegs(t_Handle h_FmPcd); 652296177Sjhibbits 653296177Sjhibbits/**************************************************************************//** 654296177Sjhibbits @Function FM_PCD_KgDumpRegs 655296177Sjhibbits 656296177Sjhibbits @Description Dumps all PCD KG registers 657296177Sjhibbits 658296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 659296177Sjhibbits 660296177Sjhibbits @Return E_OK on success; Error code otherwise. 661296177Sjhibbits 662296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 663296177Sjhibbits*//***************************************************************************/ 664296177Sjhibbitst_Error FM_PCD_KgDumpRegs(t_Handle h_FmPcd); 665296177Sjhibbits 666296177Sjhibbits/**************************************************************************//** 667296177Sjhibbits @Function FM_PCD_PlcrDumpRegs 668296177Sjhibbits 669296177Sjhibbits @Description Dumps all PCD Plcr registers 670296177Sjhibbits 671296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 672296177Sjhibbits 673296177Sjhibbits @Return E_OK on success; Error code otherwise. 674296177Sjhibbits 675296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 676296177Sjhibbits*//***************************************************************************/ 677296177Sjhibbitst_Error FM_PCD_PlcrDumpRegs(t_Handle h_FmPcd); 678296177Sjhibbits 679296177Sjhibbits/**************************************************************************//** 680296177Sjhibbits @Function FM_PCD_PlcrProfileDumpRegs 681296177Sjhibbits 682296177Sjhibbits @Description Dumps all PCD Plcr registers 683296177Sjhibbits 684296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 685296177Sjhibbits @Param[in] h_Profile A handle to a profile. 686296177Sjhibbits 687296177Sjhibbits @Return E_OK on success; Error code otherwise. 688296177Sjhibbits 689296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 690296177Sjhibbits*//***************************************************************************/ 691296177Sjhibbitst_Error FM_PCD_PlcrProfileDumpRegs(t_Handle h_FmPcd, t_Handle h_Profile); 692296177Sjhibbits 693296177Sjhibbits/**************************************************************************//** 694296177Sjhibbits @Function FM_PCD_PrsDumpRegs 695296177Sjhibbits 696296177Sjhibbits @Description Dumps all PCD Prs registers 697296177Sjhibbits 698296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 699296177Sjhibbits 700296177Sjhibbits @Return E_OK on success; Error code otherwise. 701296177Sjhibbits 702296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 703296177Sjhibbits*//***************************************************************************/ 704296177Sjhibbitst_Error FM_PCD_PrsDumpRegs(t_Handle h_FmPcd); 705296177Sjhibbits 706296177Sjhibbits/**************************************************************************//** 707296177Sjhibbits @Function FM_PCD_HcDumpRegs 708296177Sjhibbits 709296177Sjhibbits @Description Dumps HC Port registers 710296177Sjhibbits 711296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 712296177Sjhibbits 713296177Sjhibbits @Return E_OK on success; Error code otherwise. 714296177Sjhibbits 715296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 716296177Sjhibbits*//***************************************************************************/ 717296177Sjhibbitst_Error FM_PCD_HcDumpRegs(t_Handle h_FmPcd); 718296177Sjhibbits#endif /* (defined(DEBUG_ERRORS) && ... */ 719296177Sjhibbits 720296177Sjhibbits 721296177Sjhibbits 722296177Sjhibbits/**************************************************************************//** 723296177Sjhibbits @Group FM_PCD_Runtime_tree_buildgrp FM PCD Tree building Unit 724296177Sjhibbits 725296177Sjhibbits @Description FM PCD Runtime Unit 726296177Sjhibbits 727296177Sjhibbits This group contains routines for setting, deleting and modifying 728296177Sjhibbits PCD resources, for defining the total PCD tree. 729296177Sjhibbits @{ 730296177Sjhibbits*//***************************************************************************/ 731296177Sjhibbits 732296177Sjhibbits/**************************************************************************//** 733296177Sjhibbits @Collection Definitions of coarse classification 734296177Sjhibbits parameters as required by keygen (when coarse classification 735296177Sjhibbits is the next engine after this scheme). 736296177Sjhibbits*//***************************************************************************/ 737296177Sjhibbits#define FM_PCD_MAX_NUM_OF_CC_NODES 255 738296177Sjhibbits#define FM_PCD_MAX_NUM_OF_CC_TREES 8 739296177Sjhibbits#define FM_PCD_MAX_NUM_OF_CC_GROUPS 16 740296177Sjhibbits#define FM_PCD_MAX_NUM_OF_CC_UNITS 4 741296177Sjhibbits#define FM_PCD_MAX_NUM_OF_KEYS 256 742296177Sjhibbits#define FM_PCD_MAX_SIZE_OF_KEY 56 743296177Sjhibbits#define FM_PCD_MAX_NUM_OF_CC_ENTRIES_IN_GRP 16 744296177Sjhibbits/* @} */ 745296177Sjhibbits 746296177Sjhibbits/**************************************************************************//** 747296177Sjhibbits @Collection A set of definitions to allow protocol 748296177Sjhibbits special option description. 749296177Sjhibbits*//***************************************************************************/ 750296177Sjhibbitstypedef uint32_t protocolOpt_t; /**< A general type to define a protocol option. */ 751296177Sjhibbits 752296177Sjhibbitstypedef protocolOpt_t ethProtocolOpt_t; /**< Ethernet protocol options. */ 753296177Sjhibbits#define ETH_BROADCAST 0x80000000 /**< Ethernet Broadcast. */ 754296177Sjhibbits#define ETH_MULTICAST 0x40000000 /**< Ethernet Multicast. */ 755296177Sjhibbits 756296177Sjhibbitstypedef protocolOpt_t vlanProtocolOpt_t; /**< Vlan protocol options. */ 757296177Sjhibbits#define VLAN_STACKED 0x20000000 /**< Vlan Stacked. */ 758296177Sjhibbits 759296177Sjhibbitstypedef protocolOpt_t mplsProtocolOpt_t; /**< MPLS protocol options. */ 760296177Sjhibbits#define MPLS_STACKED 0x10000000 /**< MPLS Stacked. */ 761296177Sjhibbits 762296177Sjhibbitstypedef protocolOpt_t ipv4ProtocolOpt_t; /**< IPv4 protocol options. */ 763296177Sjhibbits#define IPV4_BROADCAST_1 0x08000000 /**< IPv4 Broadcast. */ 764296177Sjhibbits#define IPV4_MULTICAST_1 0x04000000 /**< IPv4 Multicast. */ 765296177Sjhibbits#define IPV4_UNICAST_2 0x02000000 /**< Tunneled IPv4 - Unicast. */ 766296177Sjhibbits#define IPV4_MULTICAST_BROADCAST_2 0x01000000 /**< Tunneled IPv4 - Broadcast/Multicast. */ 767296177Sjhibbits 768296177Sjhibbitstypedef protocolOpt_t ipv6ProtocolOpt_t; /**< IPv6 protocol options. */ 769296177Sjhibbits#define IPV6_MULTICAST_1 0x00800000 /**< IPv6 Multicast. */ 770296177Sjhibbits#define IPV6_UNICAST_2 0x00400000 /**< Tunneled IPv6 - Unicast. */ 771296177Sjhibbits#define IPV6_MULTICAST_2 0x00200000 /**< Tunneled IPv6 - Multicast. */ 772296177Sjhibbits/* @} */ 773296177Sjhibbits 774296177Sjhibbits/**************************************************************************//** 775296177Sjhibbits @Description A type used for returning the order of the key extraction. 776296177Sjhibbits each value in this array represents the index of the extraction 777296177Sjhibbits command as defined by the user in the initialization extraction array. 778296177Sjhibbits The valid size of this array is the user define number of extractions 779296177Sjhibbits required (also marked by the second '0' in this array). 780296177Sjhibbits*//***************************************************************************/ 781296177Sjhibbitstypedef uint8_t t_FmPcdKgKeyOrder [FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY]; 782296177Sjhibbits 783296177Sjhibbits/**************************************************************************//** 784296177Sjhibbits @Description All PCD engines 785296177Sjhibbits*//***************************************************************************/ 786296177Sjhibbitstypedef enum e_FmPcdEngine { 787296177Sjhibbits e_FM_PCD_INVALID = 0, /**< Invalid PCD engine indicated*/ 788296177Sjhibbits e_FM_PCD_DONE, /**< No PCD Engine indicated */ 789296177Sjhibbits e_FM_PCD_KG, /**< Keygen indicated */ 790296177Sjhibbits e_FM_PCD_CC, /**< Coarse classification indicated */ 791296177Sjhibbits e_FM_PCD_PLCR, /**< Policer indicated */ 792296177Sjhibbits e_FM_PCD_PRS /**< Parser indicated */ 793296177Sjhibbits} e_FmPcdEngine; 794296177Sjhibbits 795296177Sjhibbits/**************************************************************************//** 796296177Sjhibbits @Description An enum for selecting extraction by header types 797296177Sjhibbits*//***************************************************************************/ 798296177Sjhibbitstypedef enum e_FmPcdExtractByHdrType { 799296177Sjhibbits e_FM_PCD_EXTRACT_FROM_HDR, /**< Extract bytes from header */ 800296177Sjhibbits e_FM_PCD_EXTRACT_FROM_FIELD, /**< Extract bytes from header field */ 801296177Sjhibbits e_FM_PCD_EXTRACT_FULL_FIELD /**< Extract a full field */ 802296177Sjhibbits} e_FmPcdExtractByHdrType; 803296177Sjhibbits 804296177Sjhibbits/**************************************************************************//** 805296177Sjhibbits @Description An enum for selecting extraction source 806296177Sjhibbits (when it is not the header) 807296177Sjhibbits*//***************************************************************************/ 808296177Sjhibbitstypedef enum e_FmPcdExtractFrom { 809296177Sjhibbits e_FM_PCD_EXTRACT_FROM_FRAME_START, /**< KG & CC: Extract from beginning of frame */ 810296177Sjhibbits e_FM_PCD_EXTRACT_FROM_DFLT_VALUE, /**< KG only: Extract from a default value */ 811296177Sjhibbits e_FM_PCD_EXTRACT_FROM_CURR_END_OF_PARSE, /**< KG only: Extract from the point where parsing had finished */ 812296177Sjhibbits e_FM_PCD_EXTRACT_FROM_KEY, /**< CC only: Field where saved KEY */ 813296177Sjhibbits e_FM_PCD_EXTRACT_FROM_HASH, /**< CC only: Field where saved HASH */ 814296177Sjhibbits e_FM_PCD_EXTRACT_FROM_PARSE_RESULT, /**< KG & CC: Extract from the parser result */ 815296177Sjhibbits e_FM_PCD_EXTRACT_FROM_ENQ_FQID, /**< KG & CC: Extract from enqueue FQID */ 816296177Sjhibbits e_FM_PCD_EXTRACT_FROM_FLOW_ID /**< CC only: Field where saved Dequeue FQID */ 817296177Sjhibbits} e_FmPcdExtractFrom; 818296177Sjhibbits 819296177Sjhibbits/**************************************************************************//** 820296177Sjhibbits @Description An enum for selecting extraction type 821296177Sjhibbits*//***************************************************************************/ 822296177Sjhibbitstypedef enum e_FmPcdExtractType { 823296177Sjhibbits e_FM_PCD_EXTRACT_BY_HDR, /**< Extract according to header */ 824296177Sjhibbits e_FM_PCD_EXTRACT_NON_HDR, /**< Extract from data that is not the header */ 825296177Sjhibbits e_FM_PCD_KG_EXTRACT_PORT_PRIVATE_INFO /**< Extract private info as specified by user */ 826296177Sjhibbits} e_FmPcdExtractType; 827296177Sjhibbits 828296177Sjhibbits/**************************************************************************//** 829296177Sjhibbits @Description An enum for selecting a default 830296177Sjhibbits*//***************************************************************************/ 831296177Sjhibbitstypedef enum e_FmPcdKgExtractDfltSelect { 832296177Sjhibbits e_FM_PCD_KG_DFLT_GBL_0, /**< Default selection is KG register 0 */ 833296177Sjhibbits e_FM_PCD_KG_DFLT_GBL_1, /**< Default selection is KG register 1 */ 834296177Sjhibbits e_FM_PCD_KG_DFLT_PRIVATE_0, /**< Default selection is a per scheme register 0 */ 835296177Sjhibbits e_FM_PCD_KG_DFLT_PRIVATE_1, /**< Default selection is a per scheme register 1 */ 836296177Sjhibbits e_FM_PCD_KG_DFLT_ILLEGAL /**< Illegal selection */ 837296177Sjhibbits} e_FmPcdKgExtractDfltSelect; 838296177Sjhibbits 839296177Sjhibbits/**************************************************************************//** 840296177Sjhibbits @Description An enum defining all default groups - 841296177Sjhibbits each group shares a default value, one of 4 user 842296177Sjhibbits initialized values. 843296177Sjhibbits*//***************************************************************************/ 844296177Sjhibbitstypedef enum e_FmPcdKgKnownFieldsDfltTypes { 845296177Sjhibbits e_FM_PCD_KG_MAC_ADDR, /**< MAC Address */ 846296177Sjhibbits e_FM_PCD_KG_TCI, /**< TCI field */ 847296177Sjhibbits e_FM_PCD_KG_ENET_TYPE, /**< ENET Type */ 848296177Sjhibbits e_FM_PCD_KG_PPP_SESSION_ID, /**< PPP Session id */ 849296177Sjhibbits e_FM_PCD_KG_PPP_PROTOCOL_ID, /**< PPP Protocol id */ 850296177Sjhibbits e_FM_PCD_KG_MPLS_LABEL, /**< MPLS label */ 851296177Sjhibbits e_FM_PCD_KG_IP_ADDR, /**< IP addr */ 852296177Sjhibbits e_FM_PCD_KG_PROTOCOL_TYPE, /**< Protocol type */ 853296177Sjhibbits e_FM_PCD_KG_IP_TOS_TC, /**< TOS or TC */ 854296177Sjhibbits e_FM_PCD_KG_IPV6_FLOW_LABEL, /**< IPV6 flow label */ 855296177Sjhibbits e_FM_PCD_KG_IPSEC_SPI, /**< IPSEC SPI */ 856296177Sjhibbits e_FM_PCD_KG_L4_PORT, /**< L4 Port */ 857296177Sjhibbits e_FM_PCD_KG_TCP_FLAG, /**< TCP Flag */ 858296177Sjhibbits e_FM_PCD_KG_GENERIC_FROM_DATA, /**< grouping implemented by sw, 859296177Sjhibbits any data extraction that is not the full 860296177Sjhibbits field described above */ 861296177Sjhibbits e_FM_PCD_KG_GENERIC_FROM_DATA_NO_V, /**< grouping implemented by sw, 862296177Sjhibbits any data extraction without validation */ 863296177Sjhibbits e_FM_PCD_KG_GENERIC_NOT_FROM_DATA /**< grouping implemented by sw, 864296177Sjhibbits extraction from parser result or 865296177Sjhibbits direct use of default value */ 866296177Sjhibbits} e_FmPcdKgKnownFieldsDfltTypes; 867296177Sjhibbits 868296177Sjhibbits/**************************************************************************//** 869296177Sjhibbits @Description enum for defining header index when headers may repeat 870296177Sjhibbits*//***************************************************************************/ 871296177Sjhibbitstypedef enum e_FmPcdHdrIndex { 872296177Sjhibbits e_FM_PCD_HDR_INDEX_NONE = 0, /**< used when multiple headers not used, also 873296177Sjhibbits to specify regular IP (not tunneled). */ 874296177Sjhibbits e_FM_PCD_HDR_INDEX_1, /**< may be used for VLAN, MPLS, tunneled IP */ 875296177Sjhibbits e_FM_PCD_HDR_INDEX_2, /**< may be used for MPLS, tunneled IP */ 876296177Sjhibbits e_FM_PCD_HDR_INDEX_3, /**< may be used for MPLS */ 877296177Sjhibbits e_FM_PCD_HDR_INDEX_LAST = 0xFF /**< may be used for VLAN, MPLS */ 878296177Sjhibbits} e_FmPcdHdrIndex; 879296177Sjhibbits 880296177Sjhibbits/**************************************************************************//** 881296177Sjhibbits @Description A structure for selcting the policer profile functional type 882296177Sjhibbits*//***************************************************************************/ 883296177Sjhibbitstypedef enum e_FmPcdProfileTypeSelection { 884296177Sjhibbits e_FM_PCD_PLCR_PORT_PRIVATE, /**< Port dedicated profile */ 885296177Sjhibbits e_FM_PCD_PLCR_SHARED /**< Shared profile (shared within partition) */ 886296177Sjhibbits} e_FmPcdProfileTypeSelection; 887296177Sjhibbits 888296177Sjhibbits/**************************************************************************//** 889296177Sjhibbits @Description A structure for selcting the policer profile algorithem 890296177Sjhibbits*//***************************************************************************/ 891296177Sjhibbitstypedef enum e_FmPcdPlcrAlgorithmSelection { 892296177Sjhibbits e_FM_PCD_PLCR_PASS_THROUGH, /**< Policer pass through */ 893296177Sjhibbits e_FM_PCD_PLCR_RFC_2698, /**< Policer algorythm RFC 2698 */ 894296177Sjhibbits e_FM_PCD_PLCR_RFC_4115 /**< Policer algorythm RFC 4115 */ 895296177Sjhibbits} e_FmPcdPlcrAlgorithmSelection; 896296177Sjhibbits 897296177Sjhibbits/**************************************************************************//** 898296177Sjhibbits @Description A structure for selcting the policer profile color mode 899296177Sjhibbits*//***************************************************************************/ 900296177Sjhibbitstypedef enum e_FmPcdPlcrColorMode { 901296177Sjhibbits e_FM_PCD_PLCR_COLOR_BLIND, /**< Color blind */ 902296177Sjhibbits e_FM_PCD_PLCR_COLOR_AWARE /**< Color aware */ 903296177Sjhibbits} e_FmPcdPlcrColorMode; 904296177Sjhibbits 905296177Sjhibbits/**************************************************************************//** 906296177Sjhibbits @Description A structure for selcting the policer profile color functional mode 907296177Sjhibbits*//***************************************************************************/ 908296177Sjhibbitstypedef enum e_FmPcdPlcrColor { 909296177Sjhibbits e_FM_PCD_PLCR_GREEN, /**< Green */ 910296177Sjhibbits e_FM_PCD_PLCR_YELLOW, /**< Yellow */ 911296177Sjhibbits e_FM_PCD_PLCR_RED, /**< Red */ 912296177Sjhibbits e_FM_PCD_PLCR_OVERRIDE /**< Color override */ 913296177Sjhibbits} e_FmPcdPlcrColor; 914296177Sjhibbits 915296177Sjhibbits/**************************************************************************//** 916296177Sjhibbits @Description A structure for selcting the policer profile packet frame length selector 917296177Sjhibbits*//***************************************************************************/ 918296177Sjhibbitstypedef enum e_FmPcdPlcrFrameLengthSelect { 919296177Sjhibbits e_FM_PCD_PLCR_L2_FRM_LEN, /**< L2 frame length */ 920296177Sjhibbits e_FM_PCD_PLCR_L3_FRM_LEN, /**< L3 frame length */ 921296177Sjhibbits e_FM_PCD_PLCR_L4_FRM_LEN, /**< L4 frame length */ 922296177Sjhibbits e_FM_PCD_PLCR_FULL_FRM_LEN /**< Full frame length */ 923296177Sjhibbits} e_FmPcdPlcrFrameLengthSelect; 924296177Sjhibbits 925296177Sjhibbits/**************************************************************************//** 926296177Sjhibbits @Description An enum for selecting rollback frame 927296177Sjhibbits*//***************************************************************************/ 928296177Sjhibbitstypedef enum e_FmPcdPlcrRollBackFrameSelect { 929296177Sjhibbits e_FM_PCD_PLCR_ROLLBACK_L2_FRM_LEN, /**< Rollback L2 frame length */ 930296177Sjhibbits e_FM_PCD_PLCR_ROLLBACK_FULL_FRM_LEN /**< Rollback Full frame length */ 931296177Sjhibbits} e_FmPcdPlcrRollBackFrameSelect; 932296177Sjhibbits 933296177Sjhibbits/**************************************************************************//** 934296177Sjhibbits @Description A structure for selcting the policer profile packet or byte mode 935296177Sjhibbits*//***************************************************************************/ 936296177Sjhibbitstypedef enum e_FmPcdPlcrRateMode { 937296177Sjhibbits e_FM_PCD_PLCR_BYTE_MODE, /**< Byte mode */ 938296177Sjhibbits e_FM_PCD_PLCR_PACKET_MODE /**< Packet mode */ 939296177Sjhibbits} e_FmPcdPlcrRateMode; 940296177Sjhibbits 941296177Sjhibbits/**************************************************************************//** 942296177Sjhibbits @Description An enum for defining action of frame 943296177Sjhibbits*//***************************************************************************/ 944296177Sjhibbitstypedef enum e_FmPcdDoneAction { 945296177Sjhibbits e_FM_PCD_ENQ_FRAME = 0, /**< Enqueue frame */ 946296177Sjhibbits e_FM_PCD_DROP_FRAME /**< Drop frame */ 947296177Sjhibbits} e_FmPcdDoneAction; 948296177Sjhibbits 949296177Sjhibbits/**************************************************************************//** 950296177Sjhibbits @Description A structure for selecting the policer counter 951296177Sjhibbits*//***************************************************************************/ 952296177Sjhibbitstypedef enum e_FmPcdPlcrProfileCounters { 953296177Sjhibbits e_FM_PCD_PLCR_PROFILE_GREEN_PACKET_TOTAL_COUNTER, /**< Green packets counter */ 954296177Sjhibbits e_FM_PCD_PLCR_PROFILE_YELLOW_PACKET_TOTAL_COUNTER, /**< Yellow packets counter */ 955296177Sjhibbits e_FM_PCD_PLCR_PROFILE_RED_PACKET_TOTAL_COUNTER, /**< Red packets counter */ 956296177Sjhibbits e_FM_PCD_PLCR_PROFILE_RECOLOURED_YELLOW_PACKET_TOTAL_COUNTER, /**< Recolored yellow packets counter */ 957296177Sjhibbits e_FM_PCD_PLCR_PROFILE_RECOLOURED_RED_PACKET_TOTAL_COUNTER /**< Recolored red packets counter */ 958296177Sjhibbits} e_FmPcdPlcrProfileCounters; 959296177Sjhibbits 960296177Sjhibbits/**************************************************************************//** 961296177Sjhibbits @Description A structure for selecting action 962296177Sjhibbits*//***************************************************************************/ 963296177Sjhibbitstypedef enum e_FmPcdAction { 964296177Sjhibbits e_FM_PCD_ACTION_NONE, /**< NONE */ 965296177Sjhibbits e_FM_PCD_ACTION_EXACT_MATCH, /**< Exact match on the selected extraction*/ 966296177Sjhibbits e_FM_PCD_ACTION_INDEXED_LOOKUP /**< Indexed lookup on the selected extraction*/ 967296177Sjhibbits} e_FmPcdAction; 968296177Sjhibbits 969296177Sjhibbits#if defined(FM_CAPWAP_SUPPORT) 970296177Sjhibbits/**************************************************************************//** 971296177Sjhibbits @Description An enum for selecting type of insert manipulation 972296177Sjhibbits*//***************************************************************************/ 973296177Sjhibbitstypedef enum e_FmPcdManipInsrtType { 974296177Sjhibbits e_FM_PCD_MANIP_INSRT_NONE = 0, /**< No insertion */ 975296177Sjhibbits e_FM_PCD_MANIP_INSRT_TO_START_OF_FRAME_INT_FRAME_HDR, /**< Insert internal frame header to start of frame */ 976296177Sjhibbits e_FM_PCD_MANIP_INSRT_TO_START_OF_FRAME_TEMPLATE /**< Insert template to start of frame*/ 977296177Sjhibbits} e_FmPcdManipInsrtType; 978296177Sjhibbits 979296177Sjhibbits/**************************************************************************//** 980296177Sjhibbits @Description An enum for selecting type of remove manipulation 981296177Sjhibbits*//***************************************************************************/ 982296177Sjhibbitstypedef enum e_FmPcdManipRmvParamsType { 983296177Sjhibbits e_FM_PCD_MANIP_RMV_NONE = 0, /**< No remove */ 984296177Sjhibbits e_FM_PCD_MANIP_RMV_FROM_START_OF_FRAME_TILL_SPECIFIC_LOCATION, /**< Remove from start of frame till (excluding) specified indication */ 985296177Sjhibbits e_FM_PCD_MANIP_RMV_FROM_START_OF_FRAME_INCLUDE_SPECIFIC_LOCATION, /**< Remove from start of frame till (including) specified indication */ 986296177Sjhibbits e_FM_PCD_MANIP_RMV_INT_FRAME_HDR /**< Remove internal frame header to start of frame */ 987296177Sjhibbits} e_FmPcdManipRmvParamsType; 988296177Sjhibbits 989296177Sjhibbits/**************************************************************************//** 990296177Sjhibbits @Description An enum for selecting type of location 991296177Sjhibbits*//***************************************************************************/ 992296177Sjhibbitstypedef enum e_FmPcdManipLocateType { 993296177Sjhibbits e_FM_PCD_MANIP_LOC_BY_HDR = 0, /**< Locate according to header */ 994296177Sjhibbits e_FM_PCD_MANIP_LOC_NON_HDR /**< Locate from data that is not the header */ 995296177Sjhibbits} e_FmPcdManipLocateType; 996296177Sjhibbits 997296177Sjhibbits/**************************************************************************//** 998296177Sjhibbits @Description An enum for selecting type of Timeout mode 999296177Sjhibbits*//***************************************************************************/ 1000296177Sjhibbitstypedef enum e_FmPcdManipReassemTimeOutMode { 1001296177Sjhibbits e_FM_PCD_MANIP_TIME_OUT_BETWEEN_FRAMES, /**< limits the time of the reassm process from the first frag to the last */ 1002296177Sjhibbits e_FM_PCD_MANIP_TIME_OUT_BETWEEN_FRAG /**< limits the time of receiving the fragment */ 1003296177Sjhibbits} e_FmPcdManipReassemTimeOutMode; 1004296177Sjhibbits 1005296177Sjhibbits/**************************************************************************//** 1006296177Sjhibbits @Description An enum for selecting type of WaysNumber mode 1007296177Sjhibbits*//***************************************************************************/ 1008296177Sjhibbitstypedef enum e_FmPcdManipReassemWaysNumber { 1009296177Sjhibbits e_FM_PCD_MANIP_ONE_WAY_HASH = 1, /**< -------------- */ 1010296177Sjhibbits e_FM_PCD_MANIP_TWO_WAYS_HASH, /**< -------------- */ 1011296177Sjhibbits e_FM_PCD_MANIP_THREE_WAYS_HASH, /**< -------------- */ 1012296177Sjhibbits e_FM_PCD_MANIP_FOUR_WAYS_HASH, /**< four ways hash */ 1013296177Sjhibbits e_FM_PCD_MANIP_FIVE_WAYS_HASH, /**< -------------- */ 1014296177Sjhibbits e_FM_PCD_MANIP_SIX_WAYS_HASH, /**< -------------- */ 1015296177Sjhibbits e_FM_PCD_MANIP_SEVEN_WAYS_HASH, /**< -------------- */ 1016296177Sjhibbits e_FM_PCD_MANIP_EIGHT_WAYS_HASH /**< eight ways hash*/ 1017296177Sjhibbits} e_FmPcdManipReassemWaysNumber; 1018296177Sjhibbits 1019296177Sjhibbits/**************************************************************************//** 1020296177Sjhibbits @Description An enum for selecting type of statistics mode 1021296177Sjhibbits*//***************************************************************************/ 1022296177Sjhibbitstypedef enum e_FmPcdStatsType { 1023296177Sjhibbits e_FM_PCD_STATS_PER_FLOWID = 0 /**< type where flowId used as index for getting statistics */ 1024296177Sjhibbits} e_FmPcdStatsType; 1025296177Sjhibbits 1026296177Sjhibbits#endif /* FM_CAPWAP_SUPPORT */ 1027296177Sjhibbits 1028296177Sjhibbits 1029296177Sjhibbits/**************************************************************************//** 1030296177Sjhibbits @Description A Union of protocol dependent special options 1031296177Sjhibbits*//***************************************************************************/ 1032296177Sjhibbitstypedef union u_FmPcdHdrProtocolOpt { 1033296177Sjhibbits ethProtocolOpt_t ethOpt; /**< Ethernet options */ 1034296177Sjhibbits vlanProtocolOpt_t vlanOpt; /**< Vlan options */ 1035296177Sjhibbits mplsProtocolOpt_t mplsOpt; /**< MPLS options */ 1036296177Sjhibbits ipv4ProtocolOpt_t ipv4Opt; /**< IPv4 options */ 1037296177Sjhibbits ipv6ProtocolOpt_t ipv6Opt; /**< IPv6 options */ 1038296177Sjhibbits} u_FmPcdHdrProtocolOpt; 1039296177Sjhibbits 1040296177Sjhibbits/**************************************************************************//** 1041296177Sjhibbits @Description A union holding all known protocol fields 1042296177Sjhibbits*//***************************************************************************/ 1043296177Sjhibbitstypedef union t_FmPcdFields { 1044296177Sjhibbits headerFieldEth_t eth; /**< eth */ 1045296177Sjhibbits headerFieldVlan_t vlan; /**< vlan */ 1046296177Sjhibbits headerFieldLlcSnap_t llcSnap; /**< llcSnap */ 1047296177Sjhibbits headerFieldPppoe_t pppoe; /**< pppoe */ 1048296177Sjhibbits headerFieldMpls_t mpls; /**< mpls */ 1049296177Sjhibbits headerFieldIpv4_t ipv4; /**< ipv4 */ 1050296177Sjhibbits headerFieldIpv6_t ipv6; /**< ipv6 */ 1051296177Sjhibbits headerFieldUdp_t udp; /**< udp */ 1052296177Sjhibbits headerFieldTcp_t tcp; /**< tcp */ 1053296177Sjhibbits headerFieldSctp_t sctp; /**< sctp */ 1054296177Sjhibbits headerFieldDccp_t dccp; /**< dccp */ 1055296177Sjhibbits headerFieldGre_t gre; /**< gre */ 1056296177Sjhibbits headerFieldMinencap_t minencap; /**< minencap */ 1057296177Sjhibbits headerFieldIpsecAh_t ipsecAh; /**< ipsecAh */ 1058296177Sjhibbits headerFieldIpsecEsp_t ipsecEsp; /**< ipsecEsp */ 1059296177Sjhibbits headerFieldUdpEncapEsp_t udpEncapEsp; /**< udpEncapEsp */ 1060296177Sjhibbits} t_FmPcdFields; 1061296177Sjhibbits 1062296177Sjhibbits/**************************************************************************//** 1063296177Sjhibbits @Description structure for defining header extraction for key generation 1064296177Sjhibbits*//***************************************************************************/ 1065296177Sjhibbitstypedef struct t_FmPcdFromHdr { 1066296177Sjhibbits uint8_t size; /**< Size in byte */ 1067296177Sjhibbits uint8_t offset; /**< Byte offset */ 1068296177Sjhibbits} t_FmPcdFromHdr; 1069296177Sjhibbits 1070296177Sjhibbits/**************************************************************************//** 1071296177Sjhibbits @Description structure for defining field extraction for key generation 1072296177Sjhibbits*//***************************************************************************/ 1073296177Sjhibbitstypedef struct t_FmPcdFromField { 1074296177Sjhibbits t_FmPcdFields field; /**< Field selection */ 1075296177Sjhibbits uint8_t size; /**< Size in byte */ 1076296177Sjhibbits uint8_t offset; /**< Byte offset */ 1077296177Sjhibbits} t_FmPcdFromField; 1078296177Sjhibbits 1079296177Sjhibbits/**************************************************************************//** 1080296177Sjhibbits @Description A structure of parameters used to define a single network 1081296177Sjhibbits environment unit. 1082296177Sjhibbits A unit should be defined if it will later be used by one or 1083296177Sjhibbits more PCD engines to distinguich between flows. 1084296177Sjhibbits*//***************************************************************************/ 1085296177Sjhibbitstypedef struct t_FmPcdDistinctionUnit { 1086296177Sjhibbits struct { 1087296177Sjhibbits e_NetHeaderType hdr; /**< One of the headers supported by the FM */ 1088296177Sjhibbits u_FmPcdHdrProtocolOpt opt; /**< only one option !! */ 1089296177Sjhibbits } hdrs[FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS]; 1090296177Sjhibbits} t_FmPcdDistinctionUnit; 1091296177Sjhibbits 1092296177Sjhibbits/**************************************************************************//** 1093296177Sjhibbits @Description A structure of parameters used to define the different 1094296177Sjhibbits units supported by a specific PCD Network Environment 1095296177Sjhibbits Characteristics module. Each unit represent 1096296177Sjhibbits a protocol or a group of protocols that may be used later 1097296177Sjhibbits by the different PCD engined to distinguich between flows. 1098296177Sjhibbits*//***************************************************************************/ 1099296177Sjhibbitstypedef struct t_FmPcdNetEnvParams { 1100296177Sjhibbits uint8_t numOfDistinctionUnits; /**< Number of different units to be identified */ 1101296177Sjhibbits t_FmPcdDistinctionUnit units[FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS]; /**< An array of numOfDistinctionUnits of the 1102296177Sjhibbits different units to be identified */ 1103296177Sjhibbits} t_FmPcdNetEnvParams; 1104296177Sjhibbits 1105296177Sjhibbits/**************************************************************************//** 1106296177Sjhibbits @Description structure for defining a single extraction action 1107296177Sjhibbits when creating a key 1108296177Sjhibbits*//***************************************************************************/ 1109296177Sjhibbitstypedef struct t_FmPcdExtractEntry { 1110296177Sjhibbits e_FmPcdExtractType type; /**< Extraction type select */ 1111296177Sjhibbits union { 1112296177Sjhibbits struct { 1113296177Sjhibbits e_NetHeaderType hdr; /**< Header selection */ 1114296177Sjhibbits bool ignoreProtocolValidation; 1115296177Sjhibbits /**< Ignore protocol validation */ 1116296177Sjhibbits e_FmPcdHdrIndex hdrIndex; /**< Relevant only for MPLS, VLAN and tunneled 1117296177Sjhibbits IP. Otherwise should be cleared.*/ 1118296177Sjhibbits e_FmPcdExtractByHdrType type; /**< Header extraction type select */ 1119296177Sjhibbits union { 1120296177Sjhibbits t_FmPcdFromHdr fromHdr; /**< Extract bytes from header parameters */ 1121296177Sjhibbits t_FmPcdFromField fromField; /**< Extract bytes from field parameters*/ 1122296177Sjhibbits t_FmPcdFields fullField; /**< Extract full filed parameters*/ 1123296177Sjhibbits } extractByHdrType; 1124296177Sjhibbits } extractByHdr; /**< used when type = e_FM_PCD_KG_EXTRACT_BY_HDR */ 1125296177Sjhibbits struct { 1126296177Sjhibbits e_FmPcdExtractFrom src; /**< Non-header extraction source */ 1127296177Sjhibbits e_FmPcdAction action; /**< Relevant for CC Only */ 1128296177Sjhibbits uint16_t icIndxMask; /**< Relevant only for CC where 1129296177Sjhibbits action=e_FM_PCD_ACTION_INDEXED_LOOKUP */ 1130296177Sjhibbits uint8_t offset; /**< Byte offset */ 1131296177Sjhibbits uint8_t size; /**< Size in byte */ 1132296177Sjhibbits } extractNonHdr; /**< used when type = e_FM_PCD_KG_EXTRACT_NON_HDR */ 1133296177Sjhibbits }; 1134296177Sjhibbits} t_FmPcdExtractEntry; 1135296177Sjhibbits 1136296177Sjhibbits/**************************************************************************//** 1137296177Sjhibbits @Description A structure for defining masks for each extracted 1138296177Sjhibbits field in the key. 1139296177Sjhibbits*//***************************************************************************/ 1140296177Sjhibbitstypedef struct t_FmPcdKgExtractMask { 1141296177Sjhibbits uint8_t extractArrayIndex; /**< Index in the extraction array, as initialized by user */ 1142296177Sjhibbits uint8_t offset; /**< Byte offset */ 1143296177Sjhibbits uint8_t mask; /**< A byte mask (selected bits will be used) */ 1144296177Sjhibbits} t_FmPcdKgExtractMask; 1145296177Sjhibbits 1146296177Sjhibbits/**************************************************************************//** 1147296177Sjhibbits @Description A structure for defining default selection per groups 1148296177Sjhibbits of fields 1149296177Sjhibbits*//***************************************************************************/ 1150296177Sjhibbitstypedef struct t_FmPcdKgExtractDflt { 1151296177Sjhibbits e_FmPcdKgKnownFieldsDfltTypes type; /**< Default type select*/ 1152296177Sjhibbits e_FmPcdKgExtractDfltSelect dfltSelect; /**< Default register select */ 1153296177Sjhibbits} t_FmPcdKgExtractDflt; 1154296177Sjhibbits 1155296177Sjhibbits/**************************************************************************//** 1156296177Sjhibbits @Description A structure for defining all parameters needed for 1157296177Sjhibbits generation a key and using a hash function 1158296177Sjhibbits*//***************************************************************************/ 1159296177Sjhibbitstypedef struct t_FmPcdKgKeyExtractAndHashParams { 1160296177Sjhibbits uint32_t privateDflt0; /**< Scheme default register 0 */ 1161296177Sjhibbits uint32_t privateDflt1; /**< Scheme default register 1 */ 1162296177Sjhibbits uint8_t numOfUsedExtracts; /**< defines the valid size of the following array */ 1163296177Sjhibbits t_FmPcdExtractEntry extractArray [FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY]; /**< An array of extractions definition. */ 1164296177Sjhibbits uint8_t numOfUsedDflts; /**< defines the valid size of the following array */ 1165296177Sjhibbits t_FmPcdKgExtractDflt dflts[FM_PCD_KG_NUM_OF_DEFAULT_GROUPS]; 1166296177Sjhibbits /**< For each extraction used in this scheme, specify the required 1167296177Sjhibbits default register to be used when header is not found. 1168296177Sjhibbits types not specified in this array will get undefined value. */ 1169296177Sjhibbits uint8_t numOfUsedMasks; /**< defines the valid size of the following array */ 1170296177Sjhibbits t_FmPcdKgExtractMask masks[FM_PCD_KG_NUM_OF_EXTRACT_MASKS]; 1171296177Sjhibbits uint8_t hashShift; /**< hash result right shift. Select the 24 bits out of the 64 hash 1172296177Sjhibbits result. 0 means using the 24 LSB's, otherwise use the 1173296177Sjhibbits 24 LSB's after shifting right.*/ 1174296177Sjhibbits uint32_t hashDistributionNumOfFqids; /**< must be > 1 and a power of 2. Represents the range 1175296177Sjhibbits of queues for the key and hash functionality */ 1176296177Sjhibbits uint8_t hashDistributionFqidsShift; /**< selects the FQID bits that will be effected by the hash */ 1177296177Sjhibbits bool symmetricHash; /**< TRUE to generate the same hash for frames with swapped source and 1178296177Sjhibbits destination fields on all layers; If TRUE, driver will check that for 1179296177Sjhibbits all layers, if SRC extraction is selected, DST extraction must also be 1180296177Sjhibbits selected, and vice versa. */ 1181296177Sjhibbits} t_FmPcdKgKeyExtractAndHashParams; 1182296177Sjhibbits 1183296177Sjhibbits/**************************************************************************//** 1184296177Sjhibbits @Description A structure of parameters for defining a single 1185296177Sjhibbits Fqid mask (extracted OR). 1186296177Sjhibbits*//***************************************************************************/ 1187296177Sjhibbitstypedef struct t_FmPcdKgExtractedOrParams { 1188296177Sjhibbits e_FmPcdExtractType type; /**< Extraction type select */ 1189296177Sjhibbits union { 1190296177Sjhibbits struct { /**< used when type = e_FM_PCD_KG_EXTRACT_BY_HDR */ 1191296177Sjhibbits e_NetHeaderType hdr; 1192296177Sjhibbits e_FmPcdHdrIndex hdrIndex; /**< Relevant only for MPLS, VLAN and tunneled 1193296177Sjhibbits IP. Otherwise should be cleared.*/ 1194296177Sjhibbits bool ignoreProtocolValidation; 1195296177Sjhibbits /**< continue extraction even if protocol is not recognized */ 1196296177Sjhibbits } extractByHdr; 1197296177Sjhibbits e_FmPcdExtractFrom src; /**< used when type = e_FM_PCD_KG_EXTRACT_NON_HDR */ 1198296177Sjhibbits }; 1199296177Sjhibbits uint8_t extractionOffset; /**< Offset for extraction (in bytes). */ 1200296177Sjhibbits e_FmPcdKgExtractDfltSelect dfltValue; /**< Select register from which extraction is taken if 1201296177Sjhibbits field not found */ 1202296177Sjhibbits uint8_t mask; /**< Extraction mask (specified bits are used) */ 1203296177Sjhibbits uint8_t bitOffsetInFqid; /**< 0-31, Selects which bits of the 24 FQID bits to effect using 1204296177Sjhibbits the extracted byte; Assume byte is placed as the 8 MSB's in 1205296177Sjhibbits a 32 bit word where the lower bits 1206296177Sjhibbits are the FQID; i.e if bitOffsetInFqid=1 than its LSB 1207296177Sjhibbits will effect the FQID MSB, if bitOffsetInFqid=24 than the 1208296177Sjhibbits extracted byte will effect the 8 LSB's of the FQID, 1209296177Sjhibbits if bitOffsetInFqid=31 than the byte's MSB will effect 1210296177Sjhibbits the FQID's LSB; 0 means - no effect on FQID; 1211296177Sjhibbits Note that one, and only one of 1212296177Sjhibbits bitOffsetInFqid or bitOffsetInPlcrProfile must be set (i.e, 1213296177Sjhibbits extracted byte must effect either FQID or Policer profile).*/ 1214296177Sjhibbits uint8_t bitOffsetInPlcrProfile; 1215296177Sjhibbits /**< 0-15, Selects which bits of the 8 policer profile id bits to 1216296177Sjhibbits effect using the extracted byte; Assume byte is placed 1217296177Sjhibbits as the 8 MSB's in a 16 bit word where the lower bits 1218296177Sjhibbits are the policer profile id; i.e if bitOffsetInPlcrProfile=1 1219296177Sjhibbits than its LSB will effect the profile MSB, if bitOffsetInFqid=8 1220296177Sjhibbits than the extracted byte will effect the whole policer profile id, 1221296177Sjhibbits if bitOffsetInFqid=15 than the byte's MSB will effect 1222296177Sjhibbits the Policer Profile id's LSB; 1223296177Sjhibbits 0 means - no effect on policer profile; Note that one, and only one of 1224296177Sjhibbits bitOffsetInFqid or bitOffsetInPlcrProfile must be set (i.e, 1225296177Sjhibbits extracted byte must effect either FQID or Policer profile).*/ 1226296177Sjhibbits} t_FmPcdKgExtractedOrParams; 1227296177Sjhibbits 1228296177Sjhibbits/**************************************************************************//** 1229296177Sjhibbits @Description A structure for configuring scheme counter 1230296177Sjhibbits*//***************************************************************************/ 1231296177Sjhibbitstypedef struct t_FmPcdKgSchemeCounter { 1232296177Sjhibbits bool update; /**< FALSE to keep the current counter state 1233296177Sjhibbits and continue from that point, TRUE to update/reset 1234296177Sjhibbits the counter when the scheme is written. */ 1235296177Sjhibbits uint32_t value; /**< If update=TRUE, this value will be written into the 1236296177Sjhibbits counter. clear this field to reset the counter. */ 1237296177Sjhibbits} t_FmPcdKgSchemeCounter; 1238296177Sjhibbits 1239296177Sjhibbits/**************************************************************************//** 1240296177Sjhibbits @Description A structure for defining policer profile 1241296177Sjhibbits parameters as required by keygen (when policer 1242296177Sjhibbits is the next engine after this scheme). 1243296177Sjhibbits*//***************************************************************************/ 1244296177Sjhibbitstypedef struct t_FmPcdKgPlcrProfile { 1245296177Sjhibbits bool sharedProfile; /**< TRUE if this profile is shared between ports 1246296177Sjhibbits (i.e. managed by master partition) May not be TRUE 1247296177Sjhibbits if profile is after Coarse Classification*/ 1248296177Sjhibbits bool direct; /**< if TRUE, directRelativeProfileId only selects the profile 1249296177Sjhibbits id, if FALSE fqidOffsetRelativeProfileIdBase is used 1250296177Sjhibbits together with fqidOffsetShift and numOfProfiles 1251296177Sjhibbits parameters, to define a range of profiles from 1252296177Sjhibbits which the keygen result will determine the 1253296177Sjhibbits destination policer profile. */ 1254296177Sjhibbits union { 1255296177Sjhibbits uint16_t directRelativeProfileId; /**< Used if 'direct' is TRUE, to select policer profile. 1256296177Sjhibbits This parameter should 1257296177Sjhibbits indicate the policer profile offset within the port's 1258296177Sjhibbits policer profiles or SHARED window. */ 1259296177Sjhibbits struct { 1260296177Sjhibbits uint8_t fqidOffsetShift; /**< shift of KG results without the qid base */ 1261296177Sjhibbits uint8_t fqidOffsetRelativeProfileIdBase; 1262296177Sjhibbits /**< OR of KG results without the qid base 1263296177Sjhibbits This parameter should indicate the policer profile 1264296177Sjhibbits offset within the port's policer profiles window or 1265296177Sjhibbits SHARED window depends on sharedProfile */ 1266296177Sjhibbits uint8_t numOfProfiles; /**< Range of profiles starting at base */ 1267296177Sjhibbits } indirectProfile; 1268296177Sjhibbits } profileSelect; 1269296177Sjhibbits} t_FmPcdKgPlcrProfile; 1270296177Sjhibbits 1271296177Sjhibbits/**************************************************************************//** 1272296177Sjhibbits @Description A structure for CC parameters if CC is the next engine after KG 1273296177Sjhibbits*//***************************************************************************/ 1274296177Sjhibbitstypedef struct t_FmPcdKgCc { 1275296177Sjhibbits t_Handle h_CcTree; /**< A handle to a CC Tree */ 1276296177Sjhibbits uint8_t grpId; /**< CC group id within the CC tree */ 1277296177Sjhibbits bool plcrNext; /**< TRUE if after CC, in case of data frame, 1278296177Sjhibbits policing is required. */ 1279296177Sjhibbits bool bypassPlcrProfileGeneration; 1280296177Sjhibbits /**< TRUE to bypass keygen policer profile 1281296177Sjhibbits generation (profile selected is the one selected at 1282296177Sjhibbits port initialization). */ 1283296177Sjhibbits t_FmPcdKgPlcrProfile plcrProfile; /**< only if plcrNext=TRUE and bypassPlcrProfileGeneration=FALSE */ 1284296177Sjhibbits} t_FmPcdKgCc; 1285296177Sjhibbits 1286296177Sjhibbits/**************************************************************************//** 1287296177Sjhibbits @Description A structure for initializing a keygen single scheme 1288296177Sjhibbits*//***************************************************************************/ 1289296177Sjhibbitstypedef struct t_FmPcdKgSchemeParams { 1290296177Sjhibbits bool modify; /**< TRUE to change an existing scheme */ 1291296177Sjhibbits union 1292296177Sjhibbits { 1293296177Sjhibbits uint8_t relativeSchemeId; /**< if modify=FALSE:Partition relative scheme id */ 1294296177Sjhibbits t_Handle h_Scheme; /**< if modify=TRUE: a handle of the existing scheme */ 1295296177Sjhibbits }id; 1296296177Sjhibbits bool alwaysDirect; /**< This scheme is reached only directly, i.e. no need for match vector. Keygen will ignore 1297296177Sjhibbits it when matching */ 1298296177Sjhibbits struct { /**< HL Relevant only if alwaysDirect = FALSE */ 1299296177Sjhibbits t_Handle h_NetEnv; /**< A handle to the Network environment as returned 1300296177Sjhibbits by FM_PCD_SetNetEnvCharacteristics() */ 1301296177Sjhibbits uint8_t numOfDistinctionUnits; /**< Number of netenv units listed in unitIds array */ 1302296177Sjhibbits uint8_t unitIds[FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS]; 1303296177Sjhibbits /**< Indexes as passed to SetNetEnvCharacteristics array*/ 1304296177Sjhibbits } netEnvParams; 1305296177Sjhibbits bool useHash; /**< use the KG Hash functionality */ 1306296177Sjhibbits t_FmPcdKgKeyExtractAndHashParams keyExtractAndHashParams; 1307296177Sjhibbits /**< used only if useHash = TRUE */ 1308296177Sjhibbits bool bypassFqidGeneration; /**< Normally - FALSE, TRUE to avoid FQID update in the IC; 1309296177Sjhibbits In such a case FQID after KG will be the default FQID 1310296177Sjhibbits defined for the relevant port, or the FQID defined by CC 1311296177Sjhibbits in cases where CC was the previous engine. */ 1312296177Sjhibbits uint32_t baseFqid; /**< Base FQID; Relevant only if bypassFqidGeneration = FALSE; 1313296177Sjhibbits If hash is used and an even distribution is expected 1314296177Sjhibbits according to hashDistributionNumOfFqids, baseFqid must be aligned to 1315296177Sjhibbits hashDistributionNumOfFqids. */ 1316296177Sjhibbits uint8_t numOfUsedExtractedOrs; /**< Number of Fqid masks listed in extractedOrs array*/ 1317296177Sjhibbits t_FmPcdKgExtractedOrParams extractedOrs[FM_PCD_KG_NUM_OF_GENERIC_REGS]; 1318296177Sjhibbits /**< IN: FM_PCD_KG_NUM_OF_GENERIC_REGS 1319296177Sjhibbits registers are shared between qidMasks 1320296177Sjhibbits functionality and some of the extraction 1321296177Sjhibbits actions; Normally only some will be used 1322296177Sjhibbits for qidMask. Driver will return error if 1323296177Sjhibbits resource is full at initialization time. */ 1324296177Sjhibbits e_FmPcdEngine nextEngine; /**< may be BMI, PLCR or CC */ 1325296177Sjhibbits union { /**< depends on nextEngine */ 1326296177Sjhibbits e_FmPcdDoneAction doneAction; /**< Used when next engine is BMI (done) */ 1327296177Sjhibbits t_FmPcdKgPlcrProfile plcrProfile; /**< Used when next engine is PLCR */ 1328296177Sjhibbits t_FmPcdKgCc cc; /**< Used when next engine is CC */ 1329296177Sjhibbits } kgNextEngineParams; 1330296177Sjhibbits t_FmPcdKgSchemeCounter schemeCounter; /**< A structure of parameters for updating 1331296177Sjhibbits the scheme counter */ 1332296177Sjhibbits} t_FmPcdKgSchemeParams; 1333296177Sjhibbits 1334296177Sjhibbits/**************************************************************************//** 1335296177Sjhibbits @Description A structure for defining CC params when CC is the 1336296177Sjhibbits next engine after a CC node. 1337296177Sjhibbits*//***************************************************************************/ 1338296177Sjhibbitstypedef struct t_FmPcdCcNextCcParams { 1339296177Sjhibbits t_Handle h_CcNode; /**< A handle of the next CC node */ 1340296177Sjhibbits} t_FmPcdCcNextCcParams; 1341296177Sjhibbits 1342296177Sjhibbits/**************************************************************************//** 1343296177Sjhibbits @Description A structure for defining PLCR params when PLCR is the 1344296177Sjhibbits next engine after a CC node. 1345296177Sjhibbits*//***************************************************************************/ 1346296177Sjhibbitstypedef struct t_FmPcdCcNextPlcrParams { 1347296177Sjhibbits bool overrideParams; /**< TRUE if CC override previously decided parameters*/ 1348296177Sjhibbits bool sharedProfile; /**< Relevant only if overrideParams=TRUE: 1349296177Sjhibbits TRUE if this profile is shared between ports */ 1350296177Sjhibbits uint16_t newRelativeProfileId; /**< Relevant only if overrideParams=TRUE: 1351296177Sjhibbits (otherwise profile id is taken from keygen); 1352296177Sjhibbits This parameter should indicate the policer 1353296177Sjhibbits profile offset within the port's 1354296177Sjhibbits policer profiles or from SHARED window.*/ 1355296177Sjhibbits uint32_t newFqid; /**< Relevant only if overrideParams=TRUE: 1356296177Sjhibbits FQID for enqueuing the frame; 1357296177Sjhibbits In earlier chips if policer next engine is KEYGEN, 1358296177Sjhibbits this parameter can be 0, because the KEYGEN 1359296177Sjhibbits always decides the enqueue FQID.*/ 1360296177Sjhibbits bool statisticsEn; /**< In the case of TRUE Statistic counter is 1361296177Sjhibbits incremented for each received frame passed through 1362296177Sjhibbits this Coarse Classification entry.*/ 1363296177Sjhibbits} t_FmPcdCcNextPlcrParams; 1364296177Sjhibbits 1365296177Sjhibbits/**************************************************************************//** 1366296177Sjhibbits @Description A structure for defining enqueue params when BMI is the 1367296177Sjhibbits next engine after a CC node. 1368296177Sjhibbits*//***************************************************************************/ 1369296177Sjhibbitstypedef struct t_FmPcdCcNextEnqueueParams { 1370296177Sjhibbits 1371296177Sjhibbits e_FmPcdDoneAction action; /**< Action - when next engine is BMI (done) */ 1372296177Sjhibbits bool overrideFqid; /**< TRUE if CC override previously decided Fqid(by Keygen), 1373296177Sjhibbits relevant if action = e_FM_PCD_ENQ_FRAME */ 1374296177Sjhibbits uint32_t newFqid; /**< Valid if overrideFqid=TRUE, FQID for enqueuing the frame 1375296177Sjhibbits (otherwise FQID is taken from keygen), 1376296177Sjhibbits relevant if action = e_FM_PCD_ENQ_FRAME*/ 1377296177Sjhibbits bool statisticsEn; /**< In the case of TRUE Statistic counter is 1378296177Sjhibbits incremented for each received frame passed through 1379296177Sjhibbits this Coarse Classification entry.*/ 1380296177Sjhibbits} t_FmPcdCcNextEnqueueParams; 1381296177Sjhibbits 1382296177Sjhibbits/**************************************************************************//** 1383296177Sjhibbits @Description A structure for defining KG params when KG is the 1384296177Sjhibbits next engine after a CC node. 1385296177Sjhibbits*//***************************************************************************/ 1386296177Sjhibbitstypedef struct t_FmPcdCcNextKgParams { 1387296177Sjhibbits bool overrideFqid; /**< TRUE if CC override previously decided Fqid (by keygen), 1388296177Sjhibbits Note - this parameters irrelevant for earlier chips*/ 1389296177Sjhibbits uint32_t newFqid; /**< Valid if overrideFqid=TRUE, FQID for enqueuing the frame 1390296177Sjhibbits (otherwise FQID is taken from keygen), 1391296177Sjhibbits Note - this parameters irrelevant for earlier chips*/ 1392296177Sjhibbits t_Handle h_DirectScheme; /**< Direct scheme handle to go to. */ 1393296177Sjhibbits bool statisticsEn; /**< In the case of TRUE Statistic counter is 1394296177Sjhibbits incremented for each received frame passed through 1395296177Sjhibbits this Coarse Classification entry.*/ 1396296177Sjhibbits} t_FmPcdCcNextKgParams; 1397296177Sjhibbits 1398296177Sjhibbits/**************************************************************************//** 1399296177Sjhibbits @Description A structure for defining next engine params after a CC node. 1400296177Sjhibbits*//***************************************************************************/ 1401296177Sjhibbitstypedef struct t_FmPcdCcNextEngineParams { 1402296177Sjhibbits e_FmPcdEngine nextEngine; /**< User has to initialize parameters 1403296177Sjhibbits according to nextEngine definition */ 1404296177Sjhibbits union { 1405296177Sjhibbits t_FmPcdCcNextCcParams ccParams; /**< Parameters in case next engine is CC */ 1406296177Sjhibbits t_FmPcdCcNextPlcrParams plcrParams; /**< Parameters in case next engine is PLCR */ 1407296177Sjhibbits t_FmPcdCcNextEnqueueParams enqueueParams; /**< Parameters in case next engine is BMI */ 1408296177Sjhibbits t_FmPcdCcNextKgParams kgParams; /**< Parameters in case next engine is KG */ 1409296177Sjhibbits } params; 1410296177Sjhibbits#if defined(FM_CAPWAP_SUPPORT) 1411296177Sjhibbits t_Handle h_Manip; /**< Handler to headerManip. 1412296177Sjhibbits Relevant if next engine of the type result 1413296177Sjhibbits (e_FM_PCD_PLCR, e_FM_PCD_KG, e_FM_PCD_DONE) */ 1414296177Sjhibbits#endif /* defined(FM_CAPWAP_SUPPORT) || ... */ 1415296177Sjhibbits} t_FmPcdCcNextEngineParams; 1416296177Sjhibbits 1417296177Sjhibbits/**************************************************************************//** 1418296177Sjhibbits @Description A structure for defining a single CC Key parameters 1419296177Sjhibbits*//***************************************************************************/ 1420296177Sjhibbitstypedef struct t_FmPcdCcKeyParams { 1421296177Sjhibbits uint8_t *p_Key; /**< pointer to the key of the size defined in keySize*/ 1422296177Sjhibbits uint8_t *p_Mask; /**< pointer to the Mask per key of the size defined 1423296177Sjhibbits in keySize. p_Key and p_Mask (if defined) has to be 1424296177Sjhibbits of the same size defined in the keySize */ 1425296177Sjhibbits t_FmPcdCcNextEngineParams ccNextEngineParams; 1426296177Sjhibbits /**< parameters for the next for the defined Key in 1427296177Sjhibbits the p_Key */ 1428296177Sjhibbits} t_FmPcdCcKeyParams; 1429296177Sjhibbits 1430296177Sjhibbits/**************************************************************************//** 1431296177Sjhibbits @Description A structure for defining CC Keys parameters 1432296177Sjhibbits*//***************************************************************************/ 1433296177Sjhibbitstypedef struct t_KeysParams { 1434296177Sjhibbits uint8_t numOfKeys; /**< Number Of relevant Keys */ 1435296177Sjhibbits uint8_t keySize; /**< size of the key - in the case of the extraction of 1436296177Sjhibbits the type FULL_FIELD keySize has to be as standard size of the relevant 1437296177Sjhibbits key. In the another type of extraction keySize has to be as size of extraction. 1438296177Sjhibbits In the case of action = e_FM_PCD_ACTION_INDEXED_LOOKUP the size of keySize has to be 2*/ 1439296177Sjhibbits t_FmPcdCcKeyParams keyParams[FM_PCD_MAX_NUM_OF_KEYS]; 1440296177Sjhibbits /**< it's array with numOfKeys entries each entry in 1441296177Sjhibbits the array of the type t_FmPcdCcKeyParams */ 1442296177Sjhibbits t_FmPcdCcNextEngineParams ccNextEngineParamsForMiss; 1443296177Sjhibbits /**< parameters for the next step of 1444296177Sjhibbits unfound (or undefined) key . Not relevant in the case 1445296177Sjhibbits of action = e_FM_PCD_ACTION_INDEXED_LOOKUP*/ 1446296177Sjhibbits} t_KeysParams; 1447296177Sjhibbits 1448296177Sjhibbits/**************************************************************************//** 1449296177Sjhibbits @Description A structure for defining the CC node params 1450296177Sjhibbits*//***************************************************************************/ 1451296177Sjhibbitstypedef struct t_FmPcdCcNodeParams { 1452296177Sjhibbits t_FmPcdExtractEntry extractCcParams; /**< params which defines extraction parameters */ 1453296177Sjhibbits t_KeysParams keysParams; /**< params which defines Keys parameters of the 1454296177Sjhibbits extraction defined in extractCcParams */ 1455296177Sjhibbits} t_FmPcdCcNodeParams; 1456296177Sjhibbits 1457296177Sjhibbits/**************************************************************************//** 1458296177Sjhibbits @Description A structure for defining each CC tree group in term of 1459296177Sjhibbits NetEnv units and the action to be taken in each case. 1460296177Sjhibbits the unitIds list must be in order from lower to higher indexes. 1461296177Sjhibbits 1462296177Sjhibbits t_FmPcdCcNextEngineParams is a list of 2^numOfDistinctionUnits 1463296177Sjhibbits structures where each defines the next action to be taken for 1464296177Sjhibbits each units combination. for example: 1465296177Sjhibbits numOfDistinctionUnits = 2 1466296177Sjhibbits unitIds = {1,3} 1467296177Sjhibbits p_NextEnginePerEntriesInGrp[0] = t_FmPcdCcNextEngineParams for the case that 1468296177Sjhibbits unit 1 - not found; unit 3 - not found; 1469296177Sjhibbits p_NextEnginePerEntriesInGrp[1] = t_FmPcdCcNextEngineParams for the case that 1470296177Sjhibbits unit 1 - not found; unit 3 - found; 1471296177Sjhibbits p_NextEnginePerEntriesInGrp[2] = t_FmPcdCcNextEngineParams for the case that 1472296177Sjhibbits unit 1 - found; unit 3 - not found; 1473296177Sjhibbits p_NextEnginePerEntriesInGrp[3] = t_FmPcdCcNextEngineParams for the case that 1474296177Sjhibbits unit 1 - found; unit 3 - found; 1475296177Sjhibbits*//***************************************************************************/ 1476296177Sjhibbitstypedef struct t_FmPcdCcGrpParams { 1477296177Sjhibbits uint8_t numOfDistinctionUnits; /**< up to 4 */ 1478296177Sjhibbits uint8_t unitIds[FM_PCD_MAX_NUM_OF_CC_UNITS]; 1479296177Sjhibbits /**< Indexes of the units as defined in 1480296177Sjhibbits FM_PCD_SetNetEnvCharacteristics() */ 1481296177Sjhibbits t_FmPcdCcNextEngineParams nextEnginePerEntriesInGrp[FM_PCD_MAX_NUM_OF_CC_ENTRIES_IN_GRP]; 1482296177Sjhibbits /**< Max size is 16 - if only one group used */ 1483296177Sjhibbits} t_FmPcdCcGrpParams; 1484296177Sjhibbits 1485296177Sjhibbits/**************************************************************************//** 1486296177Sjhibbits @Description A structure for defining the CC tree groups 1487296177Sjhibbits*//***************************************************************************/ 1488296177Sjhibbitstypedef struct t_FmPcdCcTreeParams { 1489296177Sjhibbits t_Handle h_NetEnv; /**< A handle to the Network environment as returned 1490296177Sjhibbits by FM_PCD_SetNetEnvCharacteristics() */ 1491296177Sjhibbits uint8_t numOfGrps; /**< Number of CC groups within the CC tree */ 1492296177Sjhibbits t_FmPcdCcGrpParams ccGrpParams[FM_PCD_MAX_NUM_OF_CC_GROUPS]; /**< Parameters for each group. */ 1493296177Sjhibbits} t_FmPcdCcTreeParams; 1494296177Sjhibbits 1495296177Sjhibbits/**************************************************************************//** 1496296177Sjhibbits @Description A structure for defining parameters for byte rate 1497296177Sjhibbits*//***************************************************************************/ 1498296177Sjhibbitstypedef struct t_FmPcdPlcrByteRateModeParams { 1499296177Sjhibbits e_FmPcdPlcrFrameLengthSelect frameLengthSelection; /**< Frame length selection */ 1500296177Sjhibbits e_FmPcdPlcrRollBackFrameSelect rollBackFrameSelection; /**< relevant option only e_FM_PCD_PLCR_L2_FRM_LEN, 1501296177Sjhibbits e_FM_PCD_PLCR_FULL_FRM_LEN */ 1502296177Sjhibbits} t_FmPcdPlcrByteRateModeParams; 1503296177Sjhibbits 1504296177Sjhibbits/**************************************************************************//** 1505296177Sjhibbits @Description A structure for selcting the policer profile RFC-2698 or 1506296177Sjhibbits RFC-4115 parameters 1507296177Sjhibbits*//***************************************************************************/ 1508296177Sjhibbitstypedef struct t_FmPcdPlcrNonPassthroughAlgParams { 1509296177Sjhibbits e_FmPcdPlcrRateMode rateMode; /**< Byte / Packet */ 1510296177Sjhibbits t_FmPcdPlcrByteRateModeParams byteModeParams; /**< Valid for Byte NULL for Packet */ 1511296177Sjhibbits uint32_t comittedInfoRate; /**< KBits/Sec or Packets/Sec */ 1512296177Sjhibbits uint32_t comittedBurstSize; /**< Bytes/Packets */ 1513296177Sjhibbits uint32_t peakOrAccessiveInfoRate; /**< KBits/Sec or Packets/Sec */ 1514296177Sjhibbits uint32_t peakOrAccessiveBurstSize; /**< Bytes/Packets */ 1515296177Sjhibbits} t_FmPcdPlcrNonPassthroughAlgParams; 1516296177Sjhibbits 1517296177Sjhibbits/**************************************************************************//** 1518296177Sjhibbits @Description A union for defining Policer next engine parameters 1519296177Sjhibbits*//***************************************************************************/ 1520296177Sjhibbitstypedef union u_FmPcdPlcrNextEngineParams { 1521296177Sjhibbits e_FmPcdDoneAction action; /**< Action - when next engine is BMI (done) */ 1522296177Sjhibbits t_Handle h_Profile; /**< Policer profile handle - used when next engine 1523296177Sjhibbits is PLCR, must be a SHARED profile */ 1524296177Sjhibbits t_Handle h_DirectScheme; /**< Direct scheme select - when next engine is Keygen */ 1525296177Sjhibbits} u_FmPcdPlcrNextEngineParams; 1526296177Sjhibbits 1527296177Sjhibbits/**************************************************************************//** 1528296177Sjhibbits @Description A structure for selecting the policer profile entry parameters 1529296177Sjhibbits*//***************************************************************************/ 1530296177Sjhibbitstypedef struct t_FmPcdPlcrProfileParams { 1531296177Sjhibbits bool modify; /**< TRUE to change an existing profile */ 1532296177Sjhibbits union { 1533296177Sjhibbits struct { 1534296177Sjhibbits e_FmPcdProfileTypeSelection profileType; /**< Type of policer profile */ 1535296177Sjhibbits t_Handle h_FmPort; /**< Relevant for per-port profiles only */ 1536296177Sjhibbits uint16_t relativeProfileId; /**< Profile id - relative to shared group or to port */ 1537296177Sjhibbits } newParams; /**< use it when modify=FALSE */ 1538296177Sjhibbits t_Handle h_Profile; /**< A handle to a profile - use it when modify=TRUE */ 1539296177Sjhibbits } id; 1540296177Sjhibbits e_FmPcdPlcrAlgorithmSelection algSelection; /**< Profile Algorithm PASS_THROUGH, RFC_2698, RFC_4115 */ 1541296177Sjhibbits e_FmPcdPlcrColorMode colorMode; /**< COLOR_BLIND, COLOR_AWARE */ 1542296177Sjhibbits 1543296177Sjhibbits union { 1544296177Sjhibbits e_FmPcdPlcrColor dfltColor; /**< For Color-Blind Pass-Through mode. the policer will re-color 1545296177Sjhibbits any incoming packet with the default value. */ 1546296177Sjhibbits e_FmPcdPlcrColor override; /**< For Color-Aware modes. The profile response to a 1547296177Sjhibbits pre-color value of 2'b11. */ 1548296177Sjhibbits } color; 1549296177Sjhibbits 1550296177Sjhibbits t_FmPcdPlcrNonPassthroughAlgParams nonPassthroughAlgParams; /**< RFC2698 or RFC4115 params */ 1551296177Sjhibbits 1552296177Sjhibbits e_FmPcdEngine nextEngineOnGreen; /**< Green next engine type */ 1553296177Sjhibbits u_FmPcdPlcrNextEngineParams paramsOnGreen; /**< Green next engine params */ 1554296177Sjhibbits 1555296177Sjhibbits e_FmPcdEngine nextEngineOnYellow; /**< Yellow next engine type */ 1556296177Sjhibbits u_FmPcdPlcrNextEngineParams paramsOnYellow; /**< Yellow next engine params */ 1557296177Sjhibbits 1558296177Sjhibbits e_FmPcdEngine nextEngineOnRed; /**< Red next engine type */ 1559296177Sjhibbits u_FmPcdPlcrNextEngineParams paramsOnRed; /**< Red next engine params */ 1560296177Sjhibbits 1561296177Sjhibbits bool trapProfileOnFlowA; /**< Trap on flow A */ 1562296177Sjhibbits bool trapProfileOnFlowB; /**< Trap on flow B */ 1563296177Sjhibbits bool trapProfileOnFlowC; /**< Trap on flow C */ 1564296177Sjhibbits} t_FmPcdPlcrProfileParams; 1565296177Sjhibbits 1566296177Sjhibbits#if defined(FM_CAPWAP_SUPPORT) 1567296177Sjhibbits/**************************************************************************//** 1568296177Sjhibbits @Description A structure for selecting the location of manipulation 1569296177Sjhibbits*//***************************************************************************/ 1570296177Sjhibbitstypedef struct t_FmPcdManipLocationParams { 1571296177Sjhibbits e_FmPcdManipLocateType type; /**< location of manipulation type select */ 1572296177Sjhibbits struct { /**< used when type = e_FM_PCD_MANIP_BY_HDR */ 1573296177Sjhibbits e_NetHeaderType hdr; /**< Header selection */ 1574296177Sjhibbits e_FmPcdHdrIndex hdrIndex; /**< Relevant only for MPLS, VLAN and tunneled 1575296177Sjhibbits IP. Otherwise should be cleared. */ 1576296177Sjhibbits bool byField; /**< TRUE if the location of manipulation is according to some field in the specific header*/ 1577296177Sjhibbits t_FmPcdFields fullField; /**< Relevant only when byField = TRUE: Extract field */ 1578296177Sjhibbits } manipByHdr; 1579296177Sjhibbits} t_FmPcdManipLocationParams; 1580296177Sjhibbits 1581296177Sjhibbits/**************************************************************************//** 1582296177Sjhibbits @Description structure for defining insert manipulation 1583296177Sjhibbits of the type e_FM_PCD_MANIP_INSRT_TO_START_OF_FRAME_TEMPLATE 1584296177Sjhibbits*//***************************************************************************/ 1585296177Sjhibbitstypedef struct t_FmPcdManipInsrtByTemplateParams { 1586296177Sjhibbits uint8_t size; /**< size of insert template to the start of the frame. */ 1587296177Sjhibbits uint8_t hdrTemplate[FM_PCD_MAX_MANIP_INSRT_TEMPLATE_SIZE]; 1588296177Sjhibbits /**< array of the insertion template. */ 1589296177Sjhibbits 1590296177Sjhibbits bool modifyOuterIp; /**< TRUE if user want to modify some fields in outer IP. */ 1591296177Sjhibbits struct { 1592296177Sjhibbits uint16_t ipOuterOffset; /**< offset of outer IP in the insert template, relevant if modifyOuterIp = TRUE.*/ 1593296177Sjhibbits uint16_t dscpEcn; /**< value of dscpEcn in IP outer, relevant if modifyOuterIp = TRUE. 1594296177Sjhibbits in IPV4 dscpEcn only byte - it has to be adjusted to the right*/ 1595296177Sjhibbits bool udpPresent; /**< TRUE if UDP is present in the insert template, relevant if modifyOuterIp = TRUE.*/ 1596296177Sjhibbits uint8_t udpOffset; /**< offset in the insert template of UDP, relevant if modifyOuterIp = TRUE and udpPresent=TRUE.*/ 1597296177Sjhibbits uint8_t ipIdentGenId; /**< Used by FMan-CTRL to calculate IP-identification field,relevant if modifyOuterIp = TRUE.*/ 1598296177Sjhibbits bool recalculateLength; /**< TRUE if recalculate length has to be performed due to the engines in the path which can change the frame later, relevant if modifyOuterIp = TRUE.*/ 1599296177Sjhibbits struct { 1600296177Sjhibbits uint8_t blockSize; /**< The CAAM block-size; Used by FMan-CTRL to calculate the IP-total-len field.*/ 1601296177Sjhibbits uint8_t extraBytesAddedAlignedToBlockSize; /**< Used by FMan-CTRL to calculate the IP-total-len field and UDP length*/ 1602296177Sjhibbits uint8_t extraBytesAddedNotAlignedToBlockSize;/**< Used by FMan-CTRL to calculate the IP-total-len field and UDP length.*/ 1603296177Sjhibbits } recalculateLengthParams; /**< recalculate length parameters - relevant if modifyOuterIp = TRUE and recalculateLength = TRUE */ 1604296177Sjhibbits } modifyOuterIpParams; /**< Outer IP modification parameters - ignored if modifyOuterIp is FALSE */ 1605296177Sjhibbits 1606296177Sjhibbits bool modifyOuterVlan; /**< TRUE if user wants to modify vpri field in the outer VLAN header*/ 1607296177Sjhibbits struct { 1608296177Sjhibbits uint8_t vpri; /**< value of vpri, relevant if modifyOuterVlan = TRUE 1609296177Sjhibbits vpri only 3 bits, it has to be adjusted to the right*/ 1610296177Sjhibbits } modifyOuterVlanParams; 1611296177Sjhibbits} t_FmPcdManipInsrtByTemplateParams; 1612296177Sjhibbits#endif /* defined(FM_CAPWAP_SUPPORT) || ... */ 1613296177Sjhibbits 1614296177Sjhibbits 1615296177Sjhibbits#ifdef FM_CAPWAP_SUPPORT 1616296177Sjhibbits/**************************************************************************//** 1617296177Sjhibbits @Description structure for defining CAPWAP fragmentation 1618296177Sjhibbits*//***************************************************************************/ 1619296177Sjhibbitstypedef struct t_CapwapFragmentationParams { 1620296177Sjhibbits uint16_t sizeForFragmentation; /**< if length of the frame is greater than this value, CAPWAP fragmentation will be executed.*/ 1621296177Sjhibbits bool headerOptionsCompr; /**< TRUE - first fragment include the CAPWAP header options field, 1622296177Sjhibbits and all other fragments exclude the CAPWAP options field, 1623296177Sjhibbits FALSE - all fragments include CAPWAP header options field. */ 1624296177Sjhibbits} t_CapwapFragmentationParams; 1625296177Sjhibbits 1626296177Sjhibbits/**************************************************************************//** 1627296177Sjhibbits @Description structure for defining CAPWAP Re-assembly 1628296177Sjhibbits*//***************************************************************************/ 1629296177Sjhibbitstypedef struct t_CapwapReassemblyParams { 1630296177Sjhibbits uint16_t maxNumFramesInProcess; /**< Number of frames which can be processed by Reassembly in the same time. 1631296177Sjhibbits It has to be power of 2. 1632296177Sjhibbits In the case numOfFramesPerHashEntry == e_FM_PCD_MANIP_FOUR_WAYS_HASH, 1633296177Sjhibbits maxNumFramesInProcess has to be in the range of 4 - 512, 1634296177Sjhibbits In the case numOfFramesPerHashEntry == e_FM_PCD_MANIP_EIGHT_WAYS_HASH, 1635296177Sjhibbits maxNumFramesInProcess has to be in the range of 8 - 2048 */ 1636296177Sjhibbits bool haltOnDuplicationFrag; /**< In the case of TRUE, Reassembly process halted due to duplicated fragment, 1637296177Sjhibbits and all processed fragments passed for enqueue with error indication. 1638296177Sjhibbits In the case of FALSE, only duplicated fragment passed for enqueue with error indication */ 1639296177Sjhibbits 1640296177Sjhibbits e_FmPcdManipReassemTimeOutMode timeOutMode; /**< Expiration delay initialized by Reassembly process */ 1641296177Sjhibbits uint32_t fqidForTimeOutFrames; /**< Fqid in which time out frames will enqueue during Time Out Process */ 1642296177Sjhibbits uint32_t timeoutRoutineRequestTime; 1643296177Sjhibbits /**< Represents the time interval in microseconds between consecutive 1644296177Sjhibbits timeout routine requests It has to be power of 2. */ 1645296177Sjhibbits uint32_t timeoutThresholdForReassmProcess; 1646296177Sjhibbits /**< Represents the time interval in microseconds which defines 1647296177Sjhibbits if opened frame (at least one fragment was processed but not all the fragments)is found as too old*/ 1648296177Sjhibbits 1649296177Sjhibbits e_FmPcdManipReassemWaysNumber numOfFramesPerHashEntry;/**< Number of frames per hash entry needed for reassembly process */ 1650296177Sjhibbits} t_CapwapReassemblyParams; 1651296177Sjhibbits#endif /* FM_CAPWAP_SUPPORT */ 1652296177Sjhibbits 1653296177Sjhibbits 1654296177Sjhibbits#if defined(FM_CAPWAP_SUPPORT) 1655296177Sjhibbits/**************************************************************************//** 1656296177Sjhibbits @Description structure for defining fragmentation/reassembly 1657296177Sjhibbits*//***************************************************************************/ 1658296177Sjhibbitstypedef struct t_FmPcdManipFragOrReasmParams { 1659296177Sjhibbits bool frag; /**< TRUE if using the structure for fragmentation, 1660296177Sjhibbits otherwise this structure is used for reassembly */ 1661296177Sjhibbits uint8_t extBufPoolIndx; /**< Index of the buffer pool ID which was configured for port 1662296177Sjhibbits and can be used for manipulation; 1663296177Sjhibbits NOTE: This field is relevant only for CAPWAP fragmentation 1664296177Sjhibbits and reassembly */ 1665296177Sjhibbits e_NetHeaderType hdr; /**< Header selection */ 1666296177Sjhibbits union { 1667296177Sjhibbits#ifdef FM_CAPWAP_SUPPORT 1668296177Sjhibbits t_CapwapFragmentationParams capwapFragParams; /**< Structure for CAPWAP fragmentation, relevant if frag = TRUE, hdr = HEADER_TYPE_CAPWAP */ 1669296177Sjhibbits t_CapwapReassemblyParams capwapReasmParams; /**< Structure for CAPWAP reassembly, relevant if frag = FALSE, hdr = HEADER_TYPE_CAPWAP */ 1670296177Sjhibbits#endif /* FM_CAPWAP_SUPPORT */ 1671296177Sjhibbits }; 1672296177Sjhibbits} t_FmPcdManipFragOrReasmParams; 1673296177Sjhibbits 1674296177Sjhibbits/**************************************************************************//** 1675296177Sjhibbits @Description structure for defining insert manipulation 1676296177Sjhibbits*//***************************************************************************/ 1677296177Sjhibbitstypedef struct t_FmPcdManipInsrtParams { 1678296177Sjhibbits e_FmPcdManipInsrtType type; /**< Type of insert manipulation */ 1679296177Sjhibbits union { 1680296177Sjhibbits t_FmPcdManipInsrtByTemplateParams insrtByTemplateParams; 1681296177Sjhibbits /**< parameters for insert manipulation, relevant if 1682296177Sjhibbits type = e_FM_PCD_MANIP_INSRT_TO_START_OF_FRAME_TEMPLATE */ 1683296177Sjhibbits }; 1684296177Sjhibbits} t_FmPcdManipInsrtParams; 1685296177Sjhibbits 1686296177Sjhibbits/**************************************************************************//** 1687296177Sjhibbits @Description structure for defining remove manipulation 1688296177Sjhibbits*//***************************************************************************/ 1689296177Sjhibbitstypedef struct t_FmPcdManipRmvParams { 1690296177Sjhibbits e_FmPcdManipRmvParamsType type; /**< Type of remove manipulation */ 1691296177Sjhibbits t_FmPcdManipLocationParams rmvSpecificLocationParams; 1692296177Sjhibbits /**< Specified location of remove manipulation; 1693296177Sjhibbits This params should be initialized in cases: 1694296177Sjhibbits - e_FM_PCD_MANIP_RMV_FROM_START_OF_FRAME_TILL_SPECIFIC_LOCATION 1695296177Sjhibbits - e_FM_PCD_MANIP_RMV_FROM_START_OF_FRAME_INCLUDE_SPECIFIC_LOCATION */ 1696296177Sjhibbits} t_FmPcdManipRmvParams; 1697296177Sjhibbits 1698296177Sjhibbits/**************************************************************************//** 1699296177Sjhibbits @Description structure for defining manipulation 1700296177Sjhibbits*//***************************************************************************/ 1701296177Sjhibbitstypedef struct t_FmPcdManipParams { 1702296177Sjhibbits bool rmv; /**< TRUE, if defined remove manipulation */ 1703296177Sjhibbits t_FmPcdManipRmvParams rmvParams; /**< Parameters for remove manipulation, relevant if rmv = TRUE */ 1704296177Sjhibbits 1705296177Sjhibbits bool insrt; /**< TRUE, if defined insert manipulation */ 1706296177Sjhibbits t_FmPcdManipInsrtParams insrtParams; /**< Parameters for insert manipulation, relevant if insrt = TRUE */ 1707296177Sjhibbits 1708296177Sjhibbits bool fragOrReasm; /**< TRUE, if defined fragmentation/reassembly manipulation */ 1709296177Sjhibbits t_FmPcdManipFragOrReasmParams fragOrReasmParams; /**< Parameters for fragmentation/reassembly manipulation, relevant if fragOrReasm = TRUE */ 1710296177Sjhibbits 1711296177Sjhibbits /**< General parameters */ 1712296177Sjhibbits bool treatFdStatusFieldsAsErrors; 1713296177Sjhibbits /**< Set to TRUE when the port that is using this manip is chained 1714296177Sjhibbits to SEC (i.e. the traffic was forwarded from SEC) */ 1715296177Sjhibbits} t_FmPcdManipParams; 1716296177Sjhibbits 1717296177Sjhibbits/**************************************************************************//** 1718296177Sjhibbits @Description structure for defining statistics node 1719296177Sjhibbits*//***************************************************************************/ 1720296177Sjhibbitstypedef struct t_FmPcdStatsParams { 1721296177Sjhibbits e_FmPcdStatsType type; /**< type of statistics node */ 1722296177Sjhibbits} t_FmPcdStatsParams; 1723296177Sjhibbits#endif /* defined(FM_CAPWAP_SUPPORT) || ... */ 1724296177Sjhibbits 1725296177Sjhibbits 1726296177Sjhibbits/**************************************************************************//** 1727296177Sjhibbits @Function FM_PCD_SetNetEnvCharacteristics 1728296177Sjhibbits 1729296177Sjhibbits @Description Define a set of Network Environment Characteristics. 1730296177Sjhibbits When setting an environment it is important to understand its 1731296177Sjhibbits application. It is not meant to describe the flows that will run 1732296177Sjhibbits on the ports using this environment, but what the user means TO DO 1733296177Sjhibbits with the PCD mechanisms in order to parse-classify-distribute those 1734296177Sjhibbits frames. 1735296177Sjhibbits By specifying a distinction unit, the user means it would use that option 1736296177Sjhibbits for distinction between frames at either a keygen scheme keygen or a coarse 1737296177Sjhibbits classification action descriptor. Using interchangeable headers to define a 1738296177Sjhibbits unit means that the user is indifferent to which of the interchangeable 1739296177Sjhibbits headers is present in the frame, and they want the distinction to be based 1740296177Sjhibbits on the presence of either one of them. 1741296177Sjhibbits Depending on context, there are limitations to the use of environments. A 1742296177Sjhibbits port using the PCD functionality is bound to an environment. Some or even 1743296177Sjhibbits all ports may share an environment but also an environment per port is 1744296177Sjhibbits possible. When initializing a scheme, a classification plan group (see below), 1745296177Sjhibbits or a coarse classification tree, one of the initialized environments must be 1746296177Sjhibbits stated and related to. When a port is bound to a scheme, a classification 1747296177Sjhibbits plan group, or a coarse classification tree, it MUST be bound to the same 1748296177Sjhibbits environment. 1749296177Sjhibbits The different PCD modules, may relate (for flows definition) ONLY on 1750296177Sjhibbits distinction units as defined by their environment. When initializing a 1751296177Sjhibbits scheme for example, it may not choose to select IPV4 as a match for 1752296177Sjhibbits recognizing flows unless it was defined in the relating environment. In 1753296177Sjhibbits fact, to guide the user through the configuration of the PCD, each module's 1754296177Sjhibbits characterization in terms of flows is not done using protocol names, but using 1755296177Sjhibbits environment indexes. 1756296177Sjhibbits In terms of HW implementation, the list of distinction units sets the LCV vectors 1757296177Sjhibbits and later used for match vector, classification plan vectors and coarse classification 1758296177Sjhibbits indexing. 1759296177Sjhibbits 1760296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 1761296177Sjhibbits @Param[in] p_NetEnvParams A structure of parameters for the initialization of 1762296177Sjhibbits the network environment. 1763296177Sjhibbits 1764296177Sjhibbits @Return A handle to the initialized object on success; NULL code otherwise. 1765296177Sjhibbits 1766296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 1767296177Sjhibbits*//***************************************************************************/ 1768296177Sjhibbitst_Handle FM_PCD_SetNetEnvCharacteristics(t_Handle h_FmPcd, t_FmPcdNetEnvParams *p_NetEnvParams); 1769296177Sjhibbits 1770296177Sjhibbits/**************************************************************************//** 1771296177Sjhibbits @Function FM_PCD_DeleteNetEnvCharacteristics 1772296177Sjhibbits 1773296177Sjhibbits @Description Deletes a set of Network Environment Characteristics. 1774296177Sjhibbits 1775296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 1776296177Sjhibbits @Param[in] h_NetEnv A handle to the Network environment. 1777296177Sjhibbits 1778296177Sjhibbits @Return E_OK on success; Error code otherwise. 1779296177Sjhibbits*//***************************************************************************/ 1780296177Sjhibbitst_Error FM_PCD_DeleteNetEnvCharacteristics(t_Handle h_FmPcd, t_Handle h_NetEnv); 1781296177Sjhibbits 1782296177Sjhibbits/**************************************************************************//** 1783296177Sjhibbits @Function FM_PCD_KgSetScheme 1784296177Sjhibbits 1785296177Sjhibbits @Description Initializing or modifying and enabling a scheme for the keygen. 1786296177Sjhibbits This routine should be called for adding or modifying a scheme. 1787296177Sjhibbits When a scheme needs modifying, the API requires that it will be 1788296177Sjhibbits rewritten. In such a case 'modify' should be TRUE. If the 1789296177Sjhibbits routine is called for a valid scheme and 'modify' is FALSE, 1790296177Sjhibbits it will return error. 1791296177Sjhibbits 1792296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 1793296177Sjhibbits @Param[in,out] p_Scheme A structure of parameters for defining the scheme 1794296177Sjhibbits 1795296177Sjhibbits @Return A handle to the initialized scheme on success; NULL code otherwise. 1796296177Sjhibbits 1797296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 1798296177Sjhibbits*//***************************************************************************/ 1799296177Sjhibbitst_Handle FM_PCD_KgSetScheme (t_Handle h_FmPcd, 1800296177Sjhibbits t_FmPcdKgSchemeParams *p_Scheme); 1801296177Sjhibbits 1802296177Sjhibbits/**************************************************************************//** 1803296177Sjhibbits @Function FM_PCD_KgDeleteScheme 1804296177Sjhibbits 1805296177Sjhibbits @Description Deleting an initialized scheme. 1806296177Sjhibbits 1807296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 1808296177Sjhibbits @Param[in] h_Scheme scheme handle as returned by FM_PCD_KgSetScheme 1809296177Sjhibbits 1810296177Sjhibbits @Return E_OK on success; Error code otherwise. 1811296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 1812296177Sjhibbits*//***************************************************************************/ 1813296177Sjhibbitst_Error FM_PCD_KgDeleteScheme(t_Handle h_FmPcd, t_Handle h_Scheme); 1814296177Sjhibbits 1815296177Sjhibbits/**************************************************************************//** 1816296177Sjhibbits @Function FM_PCD_KgGetSchemeCounter 1817296177Sjhibbits 1818296177Sjhibbits @Description Reads scheme packet counter. 1819296177Sjhibbits 1820296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 1821296177Sjhibbits @Param[in] h_Scheme scheme handle as returned by FM_PCD_KgSetScheme. 1822296177Sjhibbits 1823296177Sjhibbits @Return Counter's current value. 1824296177Sjhibbits 1825296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 1826296177Sjhibbits*//***************************************************************************/ 1827296177Sjhibbitsuint32_t FM_PCD_KgGetSchemeCounter(t_Handle h_FmPcd, t_Handle h_Scheme); 1828296177Sjhibbits 1829296177Sjhibbits/**************************************************************************//** 1830296177Sjhibbits @Function FM_PCD_KgSetSchemeCounter 1831296177Sjhibbits 1832296177Sjhibbits @Description Writes scheme packet counter. 1833296177Sjhibbits 1834296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 1835296177Sjhibbits @Param[in] h_Scheme scheme handle as returned by FM_PCD_KgSetScheme. 1836296177Sjhibbits @Param[in] value New scheme counter value - typically '0' for 1837296177Sjhibbits resetting the counter. 1838296177Sjhibbits @Return E_OK on success; Error code otherwise. 1839296177Sjhibbits 1840296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 1841296177Sjhibbits*//***************************************************************************/ 1842296177Sjhibbitst_Error FM_PCD_KgSetSchemeCounter(t_Handle h_FmPcd, t_Handle h_Scheme, uint32_t value); 1843296177Sjhibbits 1844296177Sjhibbits/**************************************************************************//** 1845296177Sjhibbits @Function FM_PCD_CcBuildTree 1846296177Sjhibbits 1847296177Sjhibbits @Description This routine must be called to define a complete coarse 1848296177Sjhibbits classification tree. This is the way to define coarse 1849296177Sjhibbits classification to a certain flow - the keygen schemes 1850296177Sjhibbits may point only to trees defined in this way. 1851296177Sjhibbits 1852296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 1853296177Sjhibbits @Param[in] p_FmPcdCcTreeParams A structure of parameters to define the tree. 1854296177Sjhibbits 1855296177Sjhibbits @Return A handle to the initialized object on success; NULL code otherwise. 1856296177Sjhibbits 1857296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 1858296177Sjhibbits*//***************************************************************************/ 1859296177Sjhibbitst_Handle FM_PCD_CcBuildTree (t_Handle h_FmPcd, 1860296177Sjhibbits t_FmPcdCcTreeParams *p_FmPcdCcTreeParams); 1861296177Sjhibbits 1862296177Sjhibbits/**************************************************************************//** 1863296177Sjhibbits @Function FM_PCD_CcDeleteTree 1864296177Sjhibbits 1865296177Sjhibbits @Description Deleting an built tree. 1866296177Sjhibbits 1867296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 1868296177Sjhibbits @Param[in] h_CcTree A handle to a CC tree. 1869296177Sjhibbits 1870296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 1871296177Sjhibbits*//***************************************************************************/ 1872296177Sjhibbitst_Error FM_PCD_CcDeleteTree(t_Handle h_FmPcd, t_Handle h_CcTree); 1873296177Sjhibbits 1874296177Sjhibbits/**************************************************************************//** 1875296177Sjhibbits @Function FM_PCD_CcSetNode 1876296177Sjhibbits 1877296177Sjhibbits @Description This routine should be called for each CC (coarse classification) 1878296177Sjhibbits node. The whole CC tree should be built bottom up so that each 1879296177Sjhibbits node points to already defined nodes. 1880296177Sjhibbits 1881296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 1882296177Sjhibbits @Param[in] p_CcNodeParam A structure of parameters defining the CC node 1883296177Sjhibbits 1884296177Sjhibbits @Return A handle to the initialized object on success; NULL code otherwise. 1885296177Sjhibbits 1886296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 1887296177Sjhibbits*//***************************************************************************/ 1888296177Sjhibbitst_Handle FM_PCD_CcSetNode(t_Handle h_FmPcd, 1889296177Sjhibbits t_FmPcdCcNodeParams *p_CcNodeParam); 1890296177Sjhibbits 1891296177Sjhibbits/**************************************************************************//** 1892296177Sjhibbits @Function FM_PCD_CcDeleteNode 1893296177Sjhibbits 1894296177Sjhibbits @Description Deleting an built node. 1895296177Sjhibbits 1896296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 1897296177Sjhibbits @Param[in] h_CcNode A handle to a CC node. 1898296177Sjhibbits 1899296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 1900296177Sjhibbits*//***************************************************************************/ 1901296177Sjhibbitst_Error FM_PCD_CcDeleteNode(t_Handle h_FmPcd, t_Handle h_CcNode); 1902296177Sjhibbits 1903296177Sjhibbits/**************************************************************************//** 1904296177Sjhibbits @Function FM_PCD_CcTreeModifyNextEngine 1905296177Sjhibbits 1906296177Sjhibbits @Description Modify the Next Engine Parameters in the entry of the tree. 1907296177Sjhibbits 1908296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 1909296177Sjhibbits @Param[in] h_CcTree A handle to the tree 1910296177Sjhibbits @Param[in] grpId A Group index in the tree 1911296177Sjhibbits @Param[in] index Entry index in the group defined by grpId 1912296177Sjhibbits @Param[in] p_FmPcdCcNextEngineParams A structure for defining new next engine params 1913296177Sjhibbits 1914296177Sjhibbits @Return E_OK on success; Error code otherwise. 1915296177Sjhibbits 1916296177Sjhibbits @Cautions Allowed only following FM_PCD_CcBuildTree(). 1917296177Sjhibbits*//***************************************************************************/ 1918296177Sjhibbitst_Error FM_PCD_CcTreeModifyNextEngine(t_Handle h_FmPcd, t_Handle h_CcTree, uint8_t grpId, uint8_t index, t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams); 1919296177Sjhibbits 1920296177Sjhibbits/**************************************************************************//** 1921296177Sjhibbits @Function FM_PCD_CcNodeModifyNextEngine 1922296177Sjhibbits 1923296177Sjhibbits @Description Modify the Next Engine Parameters in the relevant key entry of the node. 1924296177Sjhibbits 1925296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 1926296177Sjhibbits @Param[in] h_CcNode A handle to the node 1927296177Sjhibbits @Param[in] keyIndex Key index for Next Engine Params modifications 1928296177Sjhibbits @Param[in] p_FmPcdCcNextEngineParams A structure for defining new next engine params 1929296177Sjhibbits 1930296177Sjhibbits @Return E_OK on success; Error code otherwise. 1931296177Sjhibbits 1932296177Sjhibbits @Cautions Allowed only following FM_PCD_CcSetNode(). 1933296177Sjhibbits*//***************************************************************************/ 1934296177Sjhibbitst_Error FM_PCD_CcNodeModifyNextEngine(t_Handle h_FmPcd, t_Handle h_CcNode, uint8_t keyIndex, t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams); 1935296177Sjhibbits 1936296177Sjhibbits/**************************************************************************//** 1937296177Sjhibbits @Function FM_PCD_CcNodeModifyMissNextEngine 1938296177Sjhibbits 1939296177Sjhibbits @Description Modify the Next Engine Parameters of the Miss key case of the node. 1940296177Sjhibbits 1941296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 1942296177Sjhibbits @Param[in] h_CcNode A handle to the node 1943296177Sjhibbits @Param[in] p_FmPcdCcNextEngineParams A structure for defining new next engine params 1944296177Sjhibbits 1945296177Sjhibbits @Return E_OK on success; Error code otherwise. 1946296177Sjhibbits 1947296177Sjhibbits @Cautions Allowed only following FM_PCD_CcSetNode(). 1948296177Sjhibbits*//***************************************************************************/ 1949296177Sjhibbitst_Error FM_PCD_CcNodeModifyMissNextEngine(t_Handle h_FmPcd, t_Handle h_CcNode, t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams); 1950296177Sjhibbits 1951296177Sjhibbits/**************************************************************************//** 1952296177Sjhibbits @Function FM_PCD_CcNodeRemoveKey 1953296177Sjhibbits 1954296177Sjhibbits @Description Remove the key (include Next Engine Parameters of this key) defined by the index of the relevant node . 1955296177Sjhibbits 1956296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 1957296177Sjhibbits @Param[in] h_CcNode A handle to the node 1958296177Sjhibbits @Param[in] keyIndex Key index for removing 1959296177Sjhibbits 1960296177Sjhibbits @Return E_OK on success; Error code otherwise. 1961296177Sjhibbits 1962296177Sjhibbits @Cautions Allowed only following FM_PCD_CcSetNode() not only of the relevant node but also 1963296177Sjhibbits the node that points to this node 1964296177Sjhibbits*//***************************************************************************/ 1965296177Sjhibbitst_Error FM_PCD_CcNodeRemoveKey(t_Handle h_FmPcd, t_Handle h_CcNode, uint8_t keyIndex); 1966296177Sjhibbits 1967296177Sjhibbits/**************************************************************************//** 1968296177Sjhibbits @Function FM_PCD_CcNodeAddKey 1969296177Sjhibbits 1970296177Sjhibbits @Description Add the key(include Next Engine Parameters of this key)in the index defined by the keyIndex . 1971296177Sjhibbits 1972296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 1973296177Sjhibbits @Param[in] h_CcNode A handle to the node 1974296177Sjhibbits @Param[in] keyIndex Key index for adding 1975296177Sjhibbits @Param[in] keySize Key size of added key 1976296177Sjhibbits @Param[in] p_KeyParams A pointer to the parameters includes new key with Next Engine Parameters 1977296177Sjhibbits 1978296177Sjhibbits @Return E_OK on success; Error code otherwise. 1979296177Sjhibbits 1980296177Sjhibbits @Cautions Allowed only following FM_PCD_CcSetNode() not only of the relevant node but also 1981296177Sjhibbits the node that points to this node 1982296177Sjhibbits*//***************************************************************************/ 1983296177Sjhibbitst_Error FM_PCD_CcNodeAddKey(t_Handle h_FmPcd, t_Handle h_CcNode, uint8_t keyIndex, uint8_t keySize, t_FmPcdCcKeyParams *p_KeyParams); 1984296177Sjhibbits 1985296177Sjhibbits/**************************************************************************//** 1986296177Sjhibbits @Function FM_PCD_CcNodeModifyKeyAndNextEngine 1987296177Sjhibbits 1988296177Sjhibbits @Description Modify the key and Next Engine Parameters of this key in the index defined by the keyIndex . 1989296177Sjhibbits 1990296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 1991296177Sjhibbits @Param[in] h_CcNode A handle to the node 1992296177Sjhibbits @Param[in] keyIndex Key index for adding 1993296177Sjhibbits @Param[in] keySize Key size of added key 1994296177Sjhibbits @Param[in] p_KeyParams A pointer to the parameters includes modified key and modified Next Engine Parameters 1995296177Sjhibbits 1996296177Sjhibbits @Return E_OK on success; Error code otherwise. 1997296177Sjhibbits 1998296177Sjhibbits @Cautions Allowed only following FM_PCD_CcSetNode() not only of the relevant node but also 1999296177Sjhibbits the node that points to this node 2000296177Sjhibbits*//***************************************************************************/ 2001296177Sjhibbitst_Error FM_PCD_CcNodeModifyKeyAndNextEngine(t_Handle h_FmPcd, t_Handle h_CcNode, uint8_t keyIndex, uint8_t keySize, t_FmPcdCcKeyParams *p_KeyParams); 2002296177Sjhibbits 2003296177Sjhibbits/**************************************************************************//** 2004296177Sjhibbits @Function FM_PCD_CcNodeModifyKey 2005296177Sjhibbits 2006296177Sjhibbits @Description Modify the key in the index defined by the keyIndex . 2007296177Sjhibbits 2008296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 2009296177Sjhibbits @Param[in] h_CcNode A handle to the node 2010296177Sjhibbits @Param[in] keyIndex Key index for adding 2011296177Sjhibbits @Param[in] keySize Key size of added key 2012296177Sjhibbits @Param[in] p_Key A pointer to the new key 2013296177Sjhibbits @Param[in] p_Mask A pointer to the new mask if relevant, otherwise pointer to NULL 2014296177Sjhibbits 2015296177Sjhibbits @Return E_OK on success; Error code otherwise. 2016296177Sjhibbits 2017296177Sjhibbits @Cautions Allowed only following FM_PCD_CcSetNode() not only of the relevant node but also 2018296177Sjhibbits the node that points to this node 2019296177Sjhibbits*//***************************************************************************/ 2020296177Sjhibbitst_Error FM_PCD_CcNodeModifyKey(t_Handle h_FmPcd, t_Handle h_CcNode, uint8_t keyIndex, uint8_t keySize, uint8_t *p_Key, uint8_t *p_Mask); 2021296177Sjhibbits 2022296177Sjhibbits/**************************************************************************//** 2023296177Sjhibbits @Function FM_PCD_CcNodeGetKeyCounter 2024296177Sjhibbits 2025296177Sjhibbits @Description This routine may be used to get a counter of specific key in a CC 2026296177Sjhibbits Node; This counter reflects how many frames passed that were matched 2027296177Sjhibbits this key. 2028296177Sjhibbits 2029296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 2030296177Sjhibbits @Param[in] h_CcNode A handle to the node 2031296177Sjhibbits @Param[in] keyIndex Key index for adding 2032296177Sjhibbits 2033296177Sjhibbits @Return The specific key counter. 2034296177Sjhibbits 2035296177Sjhibbits @Cautions Allowed only following FM_PCD_CcSetNode() not only of the relevant node but also 2036296177Sjhibbits the node that points to this node 2037296177Sjhibbits*//***************************************************************************/ 2038296177Sjhibbitsuint32_t FM_PCD_CcNodeGetKeyCounter(t_Handle h_FmPcd, t_Handle h_CcNode, uint8_t keyIndex); 2039296177Sjhibbits 2040296177Sjhibbits/**************************************************************************//** 2041296177Sjhibbits @Function FM_PCD_PlcrSetProfile 2042296177Sjhibbits 2043296177Sjhibbits @Description Sets a profile entry in the policer profile table. 2044296177Sjhibbits The routine overrides any existing value. 2045296177Sjhibbits 2046296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 2047296177Sjhibbits @Param[in] p_Profile A structure of parameters for defining a 2048296177Sjhibbits policer profile entry. 2049296177Sjhibbits 2050296177Sjhibbits @Return A handle to the initialized object on success; NULL code otherwise. 2051296177Sjhibbits 2052296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 2053296177Sjhibbits*//***************************************************************************/ 2054296177Sjhibbitst_Handle FM_PCD_PlcrSetProfile(t_Handle h_FmPcd, 2055296177Sjhibbits t_FmPcdPlcrProfileParams *p_Profile); 2056296177Sjhibbits 2057296177Sjhibbits/**************************************************************************//** 2058296177Sjhibbits @Function FM_PCD_PlcrDeleteProfile 2059296177Sjhibbits 2060296177Sjhibbits @Description Delete a profile entry in the policer profile table. 2061296177Sjhibbits The routine set entry to invalid. 2062296177Sjhibbits 2063296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 2064296177Sjhibbits @Param[in] h_Profile A handle to the profile. 2065296177Sjhibbits 2066296177Sjhibbits @Return E_OK on success; Error code otherwise. 2067296177Sjhibbits 2068296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 2069296177Sjhibbits*//***************************************************************************/ 2070296177Sjhibbitst_Error FM_PCD_PlcrDeleteProfile(t_Handle h_FmPcd, t_Handle h_Profile); 2071296177Sjhibbits 2072296177Sjhibbits/**************************************************************************//** 2073296177Sjhibbits @Function FM_PCD_PlcrGetProfileCounter 2074296177Sjhibbits 2075296177Sjhibbits @Description Sets an entry in the classification plan. 2076296177Sjhibbits The routine overrides any existing value. 2077296177Sjhibbits 2078296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 2079296177Sjhibbits @Param[in] h_Profile A handle to the profile. 2080296177Sjhibbits @Param[in] counter Counter selector. 2081296177Sjhibbits 2082296177Sjhibbits @Return specific counter value. 2083296177Sjhibbits 2084296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 2085296177Sjhibbits*//***************************************************************************/ 2086296177Sjhibbitsuint32_t FM_PCD_PlcrGetProfileCounter(t_Handle h_FmPcd, t_Handle h_Profile, e_FmPcdPlcrProfileCounters counter); 2087296177Sjhibbits 2088296177Sjhibbits/**************************************************************************//** 2089296177Sjhibbits @Function FM_PCD_PlcrSetProfileCounter 2090296177Sjhibbits 2091296177Sjhibbits @Description Sets an entry in the classification plan. 2092296177Sjhibbits The routine overrides any existing value. 2093296177Sjhibbits 2094296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 2095296177Sjhibbits @Param[in] h_Profile A handle to the profile. 2096296177Sjhibbits @Param[in] counter Counter selector. 2097296177Sjhibbits @Param[in] value value to set counter with. 2098296177Sjhibbits 2099296177Sjhibbits @Return E_OK on success; Error code otherwise. 2100296177Sjhibbits 2101296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 2102296177Sjhibbits*//***************************************************************************/ 2103296177Sjhibbitst_Error FM_PCD_PlcrSetProfileCounter(t_Handle h_FmPcd, t_Handle h_Profile, e_FmPcdPlcrProfileCounters counter, uint32_t value); 2104296177Sjhibbits 2105296177Sjhibbits#if defined(FM_CAPWAP_SUPPORT) 2106296177Sjhibbits/**************************************************************************//** 2107296177Sjhibbits @Function FM_PCD_ManipSetNode 2108296177Sjhibbits 2109296177Sjhibbits @Description This routine should be called for defining a manipulation 2110296177Sjhibbits node. A manipulation node must be defined before the CC node 2111296177Sjhibbits that precedes it. 2112296177Sjhibbits 2113296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 2114296177Sjhibbits @Param[in] p_FmPcdManipParams A structure of parameters defining the manipulation 2115296177Sjhibbits 2116296177Sjhibbits @Return A handle to the initialized object on success; NULL code otherwise. 2117296177Sjhibbits 2118296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 2119296177Sjhibbits*//***************************************************************************/ 2120296177Sjhibbitst_Handle FM_PCD_ManipSetNode(t_Handle h_FmPcd, t_FmPcdManipParams *p_FmPcdManipParams); 2121296177Sjhibbits 2122296177Sjhibbits/**************************************************************************//** 2123296177Sjhibbits @Function FM_PCD_ManipDeleteNode 2124296177Sjhibbits 2125296177Sjhibbits @Description Delete an existing manip node. 2126296177Sjhibbits 2127296177Sjhibbits @Param[in] h_FmPcd A handle to an FM PCD Module. 2128296177Sjhibbits @Param[in] h_HdrManipNode A handle to a Manip node. 2129296177Sjhibbits 2130296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 2131296177Sjhibbits*//***************************************************************************/ 2132296177Sjhibbitst_Error FM_PCD_ManipDeleteNode(t_Handle h_FmPcd, t_Handle h_HdrManipNode); 2133296177Sjhibbits#endif /* defined(FM_CAPWAP_SUPPORT) || ... */ 2134296177Sjhibbits 2135296177Sjhibbits 2136296177Sjhibbits#ifdef FM_CAPWAP_SUPPORT 2137296177Sjhibbits/**************************************************************************//** 2138296177Sjhibbits @Function FM_PCD_StatisticsSetNode 2139296177Sjhibbits 2140296177Sjhibbits @Description This routine should be called for defining a statistics 2141296177Sjhibbits node. 2142296177Sjhibbits 2143296177Sjhibbits @Param[in] h_FmPcd FM PCD module descriptor. 2144296177Sjhibbits @Param[in] p_FmPcdstatsParams A structure of parameters defining the statistics 2145296177Sjhibbits 2146296177Sjhibbits @Return A handle to the initialized object on success; NULL code otherwise. 2147296177Sjhibbits 2148296177Sjhibbits @Cautions Allowed only following FM_PCD_Init(). 2149296177Sjhibbits*//***************************************************************************/ 2150296177Sjhibbitst_Handle FM_PCD_StatisticsSetNode(t_Handle h_FmPcd, t_FmPcdStatsParams *p_FmPcdstatsParams); 2151296177Sjhibbits#endif /* FM_CAPWAP_SUPPORT */ 2152296177Sjhibbits 2153296177Sjhibbits/** @} */ /* end of FM_PCD_Runtime_tree_buildgrp group */ 2154296177Sjhibbits/** @} */ /* end of FM_PCD_Runtime_grp group */ 2155296177Sjhibbits/** @} */ /* end of FM_PCD_grp group */ 2156296177Sjhibbits/** @} */ /* end of FM_grp group */ 2157296177Sjhibbits 2158296177Sjhibbits 2159296177Sjhibbits 2160296177Sjhibbits#endif /* __FM_PCD_EXT */ 2161