Path: blob/main/sys/contrib/ncsw/inc/Peripherals/fm_pcd_ext.h
48375 views
/* Copyright (c) 2008-2012 Freescale Semiconductor, Inc1* All rights reserved.2*3* Redistribution and use in source and binary forms, with or without4* modification, are permitted provided that the following conditions are met:5* * Redistributions of source code must retain the above copyright6* notice, this list of conditions and the following disclaimer.7* * Redistributions in binary form must reproduce the above copyright8* notice, this list of conditions and the following disclaimer in the9* documentation and/or other materials provided with the distribution.10* * Neither the name of Freescale Semiconductor nor the11* names of its contributors may be used to endorse or promote products12* derived from this software without specific prior written permission.13*14*15* ALTERNATIVELY, this software may be distributed under the terms of the16* GNU General Public License ("GPL") as published by the Free Software17* Foundation, either version 2 of that License or (at your option) any18* later version.19*20* THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY21* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED22* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE23* DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY24* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES25* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;26* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND27* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT28* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS29* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.30*/313233/**************************************************************************//**34@File fm_pcd_ext.h3536@Description FM PCD API definitions37*//***************************************************************************/38#ifndef __FM_PCD_EXT39#define __FM_PCD_EXT4041#include "std_ext.h"42#include "net_ext.h"43#include "list_ext.h"44#include "fm_ext.h"45#include "fsl_fman_kg.h"464748/**************************************************************************//**49@Group FM_grp Frame Manager API5051@Description Frame Manager Application Programming Interface5253@{54*//***************************************************************************/5556/**************************************************************************//**57@Group FM_PCD_grp FM PCD5859@Description Frame Manager PCD (Parse-Classify-Distribute) API.6061The FM PCD module is responsible for the initialization of all62global classifying FM modules. This includes the parser general and63common registers, the key generator global and common registers,64and the policer global and common registers.65In addition, the FM PCD SW module will initialize all required66key generator schemes, coarse classification flows, and policer67profiles. When FM module is configured to work with one of these68entities, it will register to it using the FM PORT API. The PCD69module will manage the PCD resources - i.e. resource management of70KeyGen schemes, etc.7172@{73*//***************************************************************************/7475/**************************************************************************//**76@Collection General PCD defines77*//***************************************************************************/78#define FM_PCD_MAX_NUM_OF_PRIVATE_HDRS 2 /**< Number of units/headers saved for user */7980#define FM_PCD_PRS_NUM_OF_HDRS 16 /**< Number of headers supported by HW parser */81#define FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS (32 - FM_PCD_MAX_NUM_OF_PRIVATE_HDRS)82/**< Number of distinction units is limited by83register size (32 bits) minus reserved bits84for private headers. */85#define FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS 4 /**< Maximum number of interchangeable headers86in a distinction unit */87#define FM_PCD_KG_NUM_OF_GENERIC_REGS FM_KG_NUM_OF_GENERIC_REGS /**< Total number of generic KeyGen registers */88#define FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY 35 /**< Max number allowed on any configuration;89For HW implementation reasons, in most90cases less than this will be allowed; The91driver will return an initialization error92if resource is unavailable. */93#define FM_PCD_KG_NUM_OF_EXTRACT_MASKS 4 /**< Total number of masks allowed on KeyGen extractions. */94#define FM_PCD_KG_NUM_OF_DEFAULT_GROUPS 16 /**< Number of default value logical groups */9596#define FM_PCD_PRS_NUM_OF_LABELS 32 /**< Maximum number of SW parser labels */97#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)98/**< Maximum size of SW parser code */99100#define FM_PCD_MAX_MANIP_INSRT_TEMPLATE_SIZE 128 /**< Maximum size of insertion template for101insert manipulation */102103#if (DPAA_VERSION >= 11)104#define FM_PCD_FRM_REPLIC_MAX_NUM_OF_ENTRIES 64 /**< Maximum possible entries for frame replicator group */105#endif /* (DPAA_VERSION >= 11) */106/* @} */107108109/**************************************************************************//**110@Group FM_PCD_init_grp FM PCD Initialization Unit111112@Description Frame Manager PCD Initialization Unit API113114@{115*//***************************************************************************/116117/**************************************************************************//**118@Description PCD counters119*//***************************************************************************/120typedef enum e_FmPcdCounters {121e_FM_PCD_KG_COUNTERS_TOTAL, /**< KeyGen counter */122e_FM_PCD_PLCR_COUNTERS_RED, /**< Policer counter - counts the total number of RED packets that exit the Policer. */123e_FM_PCD_PLCR_COUNTERS_YELLOW, /**< Policer counter - counts the total number of YELLOW packets that exit the Policer. */124e_FM_PCD_PLCR_COUNTERS_RECOLORED_TO_RED, /**< Policer counter - counts the number of packets that changed color to RED by the Policer;125This is a subset of e_FM_PCD_PLCR_COUNTERS_RED packet count, indicating active color changes. */126e_FM_PCD_PLCR_COUNTERS_RECOLORED_TO_YELLOW, /**< Policer counter - counts the number of packets that changed color to YELLOW by the Policer;127This is a subset of e_FM_PCD_PLCR_COUNTERS_YELLOW packet count, indicating active color changes. */128e_FM_PCD_PLCR_COUNTERS_TOTAL, /**< Policer counter - counts the total number of packets passed in the Policer. */129e_FM_PCD_PLCR_COUNTERS_LENGTH_MISMATCH, /**< Policer counter - counts the number of packets with length mismatch. */130e_FM_PCD_PRS_COUNTERS_PARSE_DISPATCH, /**< Parser counter - counts the number of times the parser block is dispatched. */131e_FM_PCD_PRS_COUNTERS_L2_PARSE_RESULT_RETURNED, /**< Parser counter - counts the number of times L2 parse result is returned (including errors). */132e_FM_PCD_PRS_COUNTERS_L3_PARSE_RESULT_RETURNED, /**< Parser counter - counts the number of times L3 parse result is returned (including errors). */133e_FM_PCD_PRS_COUNTERS_L4_PARSE_RESULT_RETURNED, /**< Parser counter - counts the number of times L4 parse result is returned (including errors). */134e_FM_PCD_PRS_COUNTERS_SHIM_PARSE_RESULT_RETURNED, /**< Parser counter - counts the number of times SHIM parse result is returned (including errors). */135e_FM_PCD_PRS_COUNTERS_L2_PARSE_RESULT_RETURNED_WITH_ERR, /**< Parser counter - counts the number of times L2 parse result is returned with errors. */136e_FM_PCD_PRS_COUNTERS_L3_PARSE_RESULT_RETURNED_WITH_ERR, /**< Parser counter - counts the number of times L3 parse result is returned with errors. */137e_FM_PCD_PRS_COUNTERS_L4_PARSE_RESULT_RETURNED_WITH_ERR, /**< Parser counter - counts the number of times L4 parse result is returned with errors. */138e_FM_PCD_PRS_COUNTERS_SHIM_PARSE_RESULT_RETURNED_WITH_ERR, /**< Parser counter - counts the number of times SHIM parse result is returned with errors. */139e_FM_PCD_PRS_COUNTERS_SOFT_PRS_CYCLES, /**< Parser counter - counts the number of cycles spent executing soft parser instruction (including stall cycles). */140e_FM_PCD_PRS_COUNTERS_SOFT_PRS_STALL_CYCLES, /**< Parser counter - counts the number of cycles stalled waiting for parser internal memory reads while executing soft parser instruction. */141e_FM_PCD_PRS_COUNTERS_HARD_PRS_CYCLE_INCL_STALL_CYCLES, /**< Parser counter - counts the number of cycles spent executing hard parser (including stall cycles). */142e_FM_PCD_PRS_COUNTERS_MURAM_READ_CYCLES, /**< MURAM counter - counts the number of cycles while performing FMan Memory read. */143e_FM_PCD_PRS_COUNTERS_MURAM_READ_STALL_CYCLES, /**< MURAM counter - counts the number of cycles stalled while performing FMan Memory read. */144e_FM_PCD_PRS_COUNTERS_MURAM_WRITE_CYCLES, /**< MURAM counter - counts the number of cycles while performing FMan Memory write. */145e_FM_PCD_PRS_COUNTERS_MURAM_WRITE_STALL_CYCLES, /**< MURAM counter - counts the number of cycles stalled while performing FMan Memory write. */146e_FM_PCD_PRS_COUNTERS_FPM_COMMAND_STALL_CYCLES /**< FPM counter - counts the number of cycles stalled while performing a FPM Command. */147} e_FmPcdCounters;148149/**************************************************************************//**150@Description PCD interrupts151*//***************************************************************************/152typedef enum e_FmPcdExceptions {153e_FM_PCD_KG_EXCEPTION_DOUBLE_ECC, /**< KeyGen double-bit ECC error is detected on internal memory read access. */154e_FM_PCD_KG_EXCEPTION_KEYSIZE_OVERFLOW, /**< KeyGen scheme configuration error indicating a key size larger than 56 bytes. */155e_FM_PCD_PLCR_EXCEPTION_DOUBLE_ECC, /**< Policer double-bit ECC error has been detected on PRAM read access. */156e_FM_PCD_PLCR_EXCEPTION_INIT_ENTRY_ERROR, /**< Policer access to a non-initialized profile has been detected. */157e_FM_PCD_PLCR_EXCEPTION_PRAM_SELF_INIT_COMPLETE, /**< Policer RAM self-initialization complete */158e_FM_PCD_PLCR_EXCEPTION_ATOMIC_ACTION_COMPLETE, /**< Policer atomic action complete */159e_FM_PCD_PRS_EXCEPTION_DOUBLE_ECC, /**< Parser double-bit ECC error */160e_FM_PCD_PRS_EXCEPTION_SINGLE_ECC /**< Parser single-bit ECC error */161} e_FmPcdExceptions;162163164/**************************************************************************//**165@Description Exceptions user callback routine, will be called upon an166exception passing the exception identification.167168@Param[in] h_App - User's application descriptor.169@Param[in] exception - The exception.170*//***************************************************************************/171typedef void (t_FmPcdExceptionCallback) (t_Handle h_App, e_FmPcdExceptions exception);172173/**************************************************************************//**174@Description Exceptions user callback routine, will be called upon an exception175passing the exception identification.176177@Param[in] h_App - User's application descriptor.178@Param[in] exception - The exception.179@Param[in] index - id of the relevant source (may be scheme or profile id).180*//***************************************************************************/181typedef void (t_FmPcdIdExceptionCallback) ( t_Handle h_App,182e_FmPcdExceptions exception,183uint16_t index);184185/**************************************************************************//**186@Description A callback for enqueuing frame onto a QM queue.187188@Param[in] h_QmArg - Application's handle passed to QM module on enqueue.189@Param[in] p_Fd - Frame descriptor for the frame.190191@Return E_OK on success; Error code otherwise.192*//***************************************************************************/193typedef t_Error (t_FmPcdQmEnqueueCallback) (t_Handle h_QmArg, void *p_Fd);194195/**************************************************************************//**196@Description Host-Command parameters structure.197198When using Host command for PCD functionalities, a dedicated port199must be used. If this routine is called for a PCD in a single partition200environment, or it is the Master partition in a Multi-partition201environment, The port will be initialized by the PCD driver202initialization routine.203*//***************************************************************************/204typedef struct t_FmPcdHcParams {205uintptr_t portBaseAddr; /**< Virtual Address of Host-Command Port memory mapped registers.*/206uint8_t portId; /**< Port Id (0-6 relative to Host-Command/Offline-Parsing ports);207NOTE: When configuring Host Command port for208FMANv3 devices (DPAA_VERSION 11 and higher),209portId=0 MUST be used. */210uint16_t liodnBase; /**< LIODN base for this port, to be used together with LIODN offset211(irrelevant for P4080 revision 1.0) */212uint32_t errFqid; /**< Host-Command Port error queue Id. */213uint32_t confFqid; /**< Host-Command Port confirmation queue Id. */214uint32_t qmChannel; /**< QM channel dedicated to this Host-Command port;215will be used by the FM for dequeue. */216t_FmPcdQmEnqueueCallback *f_QmEnqueue; /**< Callback routine for enqueuing a frame to the QM */217t_Handle h_QmArg; /**< Application's handle passed to QM module on enqueue */218} t_FmPcdHcParams;219220/**************************************************************************//**221@Description The main structure for PCD initialization222*//***************************************************************************/223typedef struct t_FmPcdParams {224bool prsSupport; /**< TRUE if Parser will be used for any of the FM ports. */225bool ccSupport; /**< TRUE if Coarse Classification will be used for any226of the FM ports. */227bool kgSupport; /**< TRUE if KeyGen will be used for any of the FM ports. */228bool plcrSupport; /**< TRUE if Policer will be used for any of the FM ports. */229t_Handle h_Fm; /**< A handle to the FM module. */230uint8_t numOfSchemes; /**< Number of schemes dedicated to this partition.231this parameter is relevant if 'kgSupport'=TRUE. */232bool useHostCommand; /**< Optional for single partition, Mandatory for Multi partition */233t_FmPcdHcParams hc; /**< Host Command parameters, relevant only if 'useHostCommand'=TRUE;234Relevant when FM not runs in "guest-mode". */235236t_FmPcdExceptionCallback *f_Exception; /**< Callback routine for general PCD exceptions;237Relevant when FM not runs in "guest-mode". */238t_FmPcdIdExceptionCallback *f_ExceptionId; /**< Callback routine for specific KeyGen scheme or239Policer profile exceptions;240Relevant when FM not runs in "guest-mode". */241t_Handle h_App; /**< A handle to an application layer object; This handle will242be passed by the driver upon calling the above callbacks;243Relevant when FM not runs in "guest-mode". */244uint8_t partPlcrProfilesBase; /**< The first policer-profile-id dedicated to this partition.245this parameter is relevant if 'plcrSupport'=TRUE.246NOTE: this parameter relevant only when working with multiple partitions. */247uint16_t partNumOfPlcrProfiles; /**< Number of policer-profiles dedicated to this partition.248this parameter is relevant if 'plcrSupport'=TRUE.249NOTE: this parameter relevant only when working with multiple partitions. */250} t_FmPcdParams;251252253/**************************************************************************//**254@Function FM_PCD_Config255256@Description Basic configuration of the PCD module.257Creates descriptor for the FM PCD module.258259@Param[in] p_FmPcdParams A structure of parameters for the initialization of PCD.260261@Return A handle to the initialized module.262*//***************************************************************************/263t_Handle FM_PCD_Config(t_FmPcdParams *p_FmPcdParams);264265/**************************************************************************//**266@Function FM_PCD_Init267268@Description Initialization of the PCD module.269270@Param[in] h_FmPcd - FM PCD module descriptor.271272@Return E_OK on success; Error code otherwise.273*//***************************************************************************/274t_Error FM_PCD_Init(t_Handle h_FmPcd);275276/**************************************************************************//**277@Function FM_PCD_Free278279@Description Frees all resources that were assigned to FM module.280281Calling this routine invalidates the descriptor.282283@Param[in] h_FmPcd - FM PCD module descriptor.284285@Return E_OK on success; Error code otherwise.286*//***************************************************************************/287t_Error FM_PCD_Free(t_Handle h_FmPcd);288289/**************************************************************************//**290@Group FM_PCD_advanced_cfg_grp FM PCD Advanced Configuration Unit291292@Description Frame Manager PCD Advanced Configuration API.293294@{295*//***************************************************************************/296297/**************************************************************************//**298@Function FM_PCD_ConfigException299300@Description Calling this routine changes the internal driver data base301from its default selection of exceptions enabling.302[DEFAULT_numOfSharedPlcrProfiles].303304@Param[in] h_FmPcd FM PCD module descriptor.305@Param[in] exception The exception to be selected.306@Param[in] enable TRUE to enable interrupt, FALSE to mask it.307308@Return E_OK on success; Error code otherwise.309310@Cautions This routine should NOT be called from guest-partition311(i.e. guestId != NCSW_MASTER_ID)312*//***************************************************************************/313t_Error FM_PCD_ConfigException(t_Handle h_FmPcd, e_FmPcdExceptions exception, bool enable);314315/**************************************************************************//**316@Function FM_PCD_ConfigHcFramesDataMemory317318@Description Configures memory-partition-id for FMan-Controller Host-Command319frames. Calling this routine changes the internal driver data320base from its default configuration [0].321322@Param[in] h_FmPcd FM PCD module descriptor.323@Param[in] memId Memory partition ID.324325@Return E_OK on success; Error code otherwise.326327@Cautions This routine may be called only if 'useHostCommand' was TRUE328when FM_PCD_Config() routine was called.329*//***************************************************************************/330t_Error FM_PCD_ConfigHcFramesDataMemory(t_Handle h_FmPcd, uint8_t memId);331332/**************************************************************************//**333@Function FM_PCD_ConfigPlcrNumOfSharedProfiles334335@Description Calling this routine changes the internal driver data base336from its default selection of exceptions enablement.337[DEFAULT_numOfSharedPlcrProfiles].338339@Param[in] h_FmPcd FM PCD module descriptor.340@Param[in] numOfSharedPlcrProfiles Number of profiles to341be shared between ports on this partition342343@Return E_OK on success; Error code otherwise.344*//***************************************************************************/345t_Error FM_PCD_ConfigPlcrNumOfSharedProfiles(t_Handle h_FmPcd, uint16_t numOfSharedPlcrProfiles);346347/**************************************************************************//**348@Function FM_PCD_ConfigPlcrAutoRefreshMode349350@Description Calling this routine changes the internal driver data base351from its default selection of exceptions enablement.352By default auto-refresh is [DEFAULT_plcrAutoRefresh].353354@Param[in] h_FmPcd FM PCD module descriptor.355@Param[in] enable TRUE to enable, FALSE to disable356357@Return E_OK on success; Error code otherwise.358359@Cautions This routine should NOT be called from guest-partition360(i.e. guestId != NCSW_MASTER_ID)361*//***************************************************************************/362t_Error FM_PCD_ConfigPlcrAutoRefreshMode(t_Handle h_FmPcd, bool enable);363364/**************************************************************************//**365@Function FM_PCD_ConfigPrsMaxCycleLimit366367@Description Calling this routine changes the internal data structure for368the maximum parsing time from its default value369[DEFAULT_MAX_PRS_CYC_LIM].370371@Param[in] h_FmPcd FM PCD module descriptor.372@Param[in] value 0 to disable the mechanism, or new373maximum parsing time.374375@Return E_OK on success; Error code otherwise.376377@Cautions This routine should NOT be called from guest-partition378(i.e. guestId != NCSW_MASTER_ID)379*//***************************************************************************/380t_Error FM_PCD_ConfigPrsMaxCycleLimit(t_Handle h_FmPcd,uint16_t value);381382/** @} */ /* end of FM_PCD_advanced_cfg_grp group */383/** @} */ /* end of FM_PCD_init_grp group */384385386/**************************************************************************//**387@Group FM_PCD_Runtime_grp FM PCD Runtime Unit388389@Description Frame Manager PCD Runtime Unit API390391The runtime control allows creation of PCD infrastructure modules392such as Network Environment Characteristics, Classification Plan393Groups and Coarse Classification Trees.394It also allows on-the-fly initialization, modification and removal395of PCD modules such as KeyGen schemes, coarse classification nodes396and Policer profiles.397398In order to explain the programming model of the PCD driver interface399a few terms should be explained, and will be used below.400- Distinction Header - One of the 16 protocols supported by the FM parser,401or one of the SHIM headers (1 or 2). May be a header with a special402option (see below).403- Interchangeable Headers Group - This is a group of Headers recognized404by either one of them. For example, if in a specific context the user405chooses to treat IPv4 and IPV6 in the same way, they may create an406interchangeable Headers Unit consisting of these 2 headers.407- A Distinction Unit - a Distinction Header or an Interchangeable Headers408Group.409- Header with special option - applies to Ethernet, MPLS, VLAN, IPv4 and410IPv6, includes multicast, broadcast and other protocol specific options.411In terms of hardware it relates to the options available in the classification412plan.413- Network Environment Characteristics - a set of Distinction Units that define414the total recognizable header selection for a certain environment. This is415NOT the list of all headers that will ever appear in a flow, but rather416everything that needs distinction in a flow, where distinction is made by KeyGen417schemes and coarse classification action descriptors.418419The PCD runtime modules initialization is done in stages. The first stage after420initializing the PCD module itself is to establish a Network Flows Environment421Definition. The application may choose to establish one or more such environments.422Later, when needed, the application will have to state, for some of its modules,423to which single environment it belongs.424425@{426*//***************************************************************************/427428/**************************************************************************//**429@Description A structure for SW parser labels430*//***************************************************************************/431typedef struct t_FmPcdPrsLabelParams {432uint32_t instructionOffset; /**< SW parser label instruction offset (2 bytes433resolution), relative to Parser RAM. */434e_NetHeaderType hdr; /**< The existence of this header will invoke435the SW parser code; Use HEADER_TYPE_NONE436to indicate that sw parser is to run437independent of the existence of any protocol438(run before HW parser). */439uint8_t indexPerHdr; /**< Normally 0, if more than one SW parser440attachments for the same header, use this441index to distinguish between them. */442} t_FmPcdPrsLabelParams;443444/**************************************************************************//**445@Description A structure for SW parser446*//***************************************************************************/447typedef struct t_FmPcdPrsSwParams {448bool override; /**< FALSE to invoke a check that nothing else449was loaded to this address, including450internal patches.451TRUE to override any existing code.*/452uint32_t size; /**< SW parser code size */453uint16_t base; /**< SW parser base (in instruction counts!454must be larger than 0x20)*/455uint8_t *p_Code; /**< SW parser code */456uint32_t swPrsDataParams[FM_PCD_PRS_NUM_OF_HDRS];457/**< SW parser data (parameters) */458uint8_t numOfLabels; /**< Number of labels for SW parser. */459t_FmPcdPrsLabelParams labelsTable[FM_PCD_PRS_NUM_OF_LABELS];460/**< SW parser labels table, containing461numOfLabels entries */462} t_FmPcdPrsSwParams;463464465/**************************************************************************//**466@Function FM_PCD_Enable467468@Description This routine should be called after PCD is initialized for enabling all469PCD engines according to their existing configuration.470471@Param[in] h_FmPcd FM PCD module descriptor.472473@Return E_OK on success; Error code otherwise.474475@Cautions Allowed only following FM_PCD_Init() and when PCD is disabled.476*//***************************************************************************/477t_Error FM_PCD_Enable(t_Handle h_FmPcd);478479/**************************************************************************//**480@Function FM_PCD_Disable481482@Description This routine may be called when PCD is enabled in order to483disable all PCD engines. It may be called484only when none of the ports in the system are using the PCD.485486@Param[in] h_FmPcd FM PCD module descriptor.487488@Return E_OK on success; Error code otherwise.489490@Cautions Allowed only following FM_PCD_Init() and when PCD is enabled.491*//***************************************************************************/492t_Error FM_PCD_Disable(t_Handle h_FmPcd);493494/**************************************************************************//**495@Function FM_PCD_GetCounter496497@Description Reads one of the FM PCD counters.498499@Param[in] h_FmPcd FM PCD module descriptor.500@Param[in] counter The requested counter.501502@Return Counter's current value.503504@Cautions Allowed only following FM_PCD_Init().505Note that it is user's responsibility to call this routine only506for enabled counters, and there will be no indication if a507disabled counter is accessed.508*//***************************************************************************/509uint32_t FM_PCD_GetCounter(t_Handle h_FmPcd, e_FmPcdCounters counter);510511/**************************************************************************//**512@Function FM_PCD_PrsLoadSw513514@Description This routine may be called in order to load software parsing code.515516517@Param[in] h_FmPcd FM PCD module descriptor.518@Param[in] p_SwPrs A pointer to a structure of software519parser parameters, including the software520parser image.521522@Return E_OK on success; Error code otherwise.523524@Cautions Allowed only following FM_PCD_Init() and when PCD is disabled.525This routine should NOT be called from guest-partition526(i.e. guestId != NCSW_MASTER_ID)527*//***************************************************************************/528t_Error FM_PCD_PrsLoadSw(t_Handle h_FmPcd, t_FmPcdPrsSwParams *p_SwPrs);529530/**************************************************************************//**531@Function FM_PCD_SetAdvancedOffloadSupport532533@Description This routine must be called in order to support the following features:534IP-fragmentation, IP-reassembly, IPsec, Header-manipulation, frame-replicator.535536@Param[in] h_FmPcd FM PCD module descriptor.537538@Return E_OK on success; Error code otherwise.539540@Cautions Allowed only following FM_PCD_Init() and when PCD is disabled.541This routine should NOT be called from guest-partition542(i.e. guestId != NCSW_MASTER_ID)543*//***************************************************************************/544t_Error FM_PCD_SetAdvancedOffloadSupport(t_Handle h_FmPcd);545546/**************************************************************************//**547@Function FM_PCD_KgSetDfltValue548549@Description Calling this routine sets a global default value to be used550by the KeyGen when parser does not recognize a required551field/header.552By default default values are 0.553554@Param[in] h_FmPcd FM PCD module descriptor.555@Param[in] valueId 0,1 - one of 2 global default values.556@Param[in] value The requested default value.557558@Return E_OK on success; Error code otherwise.559560@Cautions Allowed only following FM_PCD_Init() and when PCD is disabled.561This routine should NOT be called from guest-partition562(i.e. guestId != NCSW_MASTER_ID)563*//***************************************************************************/564t_Error FM_PCD_KgSetDfltValue(t_Handle h_FmPcd, uint8_t valueId, uint32_t value);565566/**************************************************************************//**567@Function FM_PCD_KgSetAdditionalDataAfterParsing568569@Description Calling this routine allows the KeyGen to access data past570the parser finishing point.571572@Param[in] h_FmPcd FM PCD module descriptor.573@Param[in] payloadOffset the number of bytes beyond the parser location.574575@Return E_OK on success; Error code otherwise.576577@Cautions Allowed only following FM_PCD_Init() and when PCD is disabled.578This routine should NOT be called from guest-partition579(i.e. guestId != NCSW_MASTER_ID)580*//***************************************************************************/581t_Error FM_PCD_KgSetAdditionalDataAfterParsing(t_Handle h_FmPcd, uint8_t payloadOffset);582583/**************************************************************************//**584@Function FM_PCD_SetException585586@Description Calling this routine enables/disables PCD interrupts.587588@Param[in] h_FmPcd FM PCD module descriptor.589@Param[in] exception The exception to be selected.590@Param[in] enable TRUE to enable interrupt, FALSE to mask it.591592@Return E_OK on success; Error code otherwise.593594@Cautions Allowed only following FM_PCD_Init().595This routine should NOT be called from guest-partition596(i.e. guestId != NCSW_MASTER_ID)597*//***************************************************************************/598t_Error FM_PCD_SetException(t_Handle h_FmPcd, e_FmPcdExceptions exception, bool enable);599600/**************************************************************************//**601@Function FM_PCD_ModifyCounter602603@Description Sets a value to an enabled counter. Use "0" to reset the counter.604605@Param[in] h_FmPcd FM PCD module descriptor.606@Param[in] counter The requested counter.607@Param[in] value The requested value to be written into the counter.608609@Return E_OK on success; Error code otherwise.610611@Cautions Allowed only following FM_PCD_Init().612This routine should NOT be called from guest-partition613(i.e. guestId != NCSW_MASTER_ID)614*//***************************************************************************/615t_Error FM_PCD_ModifyCounter(t_Handle h_FmPcd, e_FmPcdCounters counter, uint32_t value);616617/**************************************************************************//**618@Function FM_PCD_SetPlcrStatistics619620@Description This routine may be used to enable/disable policer statistics621counter. By default the statistics is enabled.622623@Param[in] h_FmPcd FM PCD module descriptor624@Param[in] enable TRUE to enable, FALSE to disable.625626@Return E_OK on success; Error code otherwise.627628@Cautions Allowed only following FM_PCD_Init().629This routine should NOT be called from guest-partition630(i.e. guestId != NCSW_MASTER_ID)631*//***************************************************************************/632t_Error FM_PCD_SetPlcrStatistics(t_Handle h_FmPcd, bool enable);633634/**************************************************************************//**635@Function FM_PCD_SetPrsStatistics636637@Description Defines whether to gather parser statistics including all ports.638639@Param[in] h_FmPcd FM PCD module descriptor.640@Param[in] enable TRUE to enable, FALSE to disable.641642@Return None643644@Cautions Allowed only following FM_PCD_Init().645This routine should NOT be called from guest-partition646(i.e. guestId != NCSW_MASTER_ID)647*//***************************************************************************/648void FM_PCD_SetPrsStatistics(t_Handle h_FmPcd, bool enable);649650/**************************************************************************//**651@Function FM_PCD_HcTxConf652653@Description This routine should be called to confirm frames that were654received on the HC confirmation queue.655656@Param[in] h_FmPcd A handle to an FM PCD Module.657@Param[in] p_Fd Frame descriptor of the received frame.658659@Cautions Allowed only following FM_PCD_Init(). Allowed only if 'useHostCommand'660option was selected in the initialization.661*//***************************************************************************/662void FM_PCD_HcTxConf(t_Handle h_FmPcd, t_DpaaFD *p_Fd);663664/**************************************************************************//*665@Function FM_PCD_ForceIntr666667@Description Causes an interrupt event on the requested source.668669@Param[in] h_FmPcd FM PCD module descriptor.670@Param[in] exception An exception to be forced.671672@Return E_OK on success; Error code if the exception is not enabled,673or is not able to create interrupt.674675@Cautions Allowed only following FM_PCD_Init().676This routine should NOT be called from guest-partition677(i.e. guestId != NCSW_MASTER_ID)678*//***************************************************************************/679t_Error FM_PCD_ForceIntr (t_Handle h_FmPcd, e_FmPcdExceptions exception);680681#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))682/**************************************************************************//**683@Function FM_PCD_DumpRegs684685@Description Dumps all PCD registers686687@Param[in] h_FmPcd A handle to an FM PCD Module.688689@Return E_OK on success; Error code otherwise.690691@Cautions Allowed only following FM_PCD_Init().692NOTE: this routine may be called only for FM in master mode693(i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers694are mapped.695*//***************************************************************************/696t_Error FM_PCD_DumpRegs(t_Handle h_FmPcd);697698/**************************************************************************//**699@Function FM_PCD_KgDumpRegs700701@Description Dumps all PCD KG registers702703@Param[in] h_FmPcd A handle to an FM PCD Module.704705@Return E_OK on success; Error code otherwise.706707@Cautions Allowed only following FM_PCD_Init().708NOTE: this routine may be called only for FM in master mode709(i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers710are mapped.711*//***************************************************************************/712t_Error FM_PCD_KgDumpRegs(t_Handle h_FmPcd);713714/**************************************************************************//**715@Function FM_PCD_PlcrDumpRegs716717@Description Dumps all PCD Policer registers718719@Param[in] h_FmPcd A handle to an FM PCD Module.720721@Return E_OK on success; Error code otherwise.722723@Cautions Allowed only following FM_PCD_Init().724NOTE: this routine may be called only for FM in master mode725(i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers726are mapped.727*//***************************************************************************/728t_Error FM_PCD_PlcrDumpRegs(t_Handle h_FmPcd);729730/**************************************************************************//**731@Function FM_PCD_PlcrProfileDumpRegs732733@Description Dumps all PCD Policer profile registers734735@Param[in] h_Profile A handle to a Policer profile.736737@Return E_OK on success; Error code otherwise.738739@Cautions Allowed only following FM_PCD_Init().740NOTE: this routine may be called only for FM in master mode741(i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers742are mapped.743*//***************************************************************************/744t_Error FM_PCD_PlcrProfileDumpRegs(t_Handle h_Profile);745746/**************************************************************************//**747@Function FM_PCD_PrsDumpRegs748749@Description Dumps all PCD Parser registers750751@Param[in] h_FmPcd A handle to an FM PCD Module.752753@Return E_OK on success; Error code otherwise.754755@Cautions Allowed only following FM_PCD_Init().756NOTE: this routine may be called only for FM in master mode757(i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers758are mapped.759*//***************************************************************************/760t_Error FM_PCD_PrsDumpRegs(t_Handle h_FmPcd);761762/**************************************************************************//**763@Function FM_PCD_HcDumpRegs764765@Description Dumps HC Port registers766767@Param[in] h_FmPcd A handle to an FM PCD Module.768769@Return E_OK on success; Error code otherwise.770771@Cautions Allowed only following FM_PCD_Init().772NOTE: this routine may be called only for FM in master mode773(i.e. 'guestId'=NCSW_MASTER_ID).774*//***************************************************************************/775t_Error FM_PCD_HcDumpRegs(t_Handle h_FmPcd);776#endif /* (defined(DEBUG_ERRORS) && ... */777778779780/**************************************************************************//**781KeyGen FM_PCD_Runtime_build_grp FM PCD Runtime Building Unit782783@Description Frame Manager PCD Runtime Building API784785This group contains routines for setting, deleting and modifying786PCD resources, for defining the total PCD tree.787@{788*//***************************************************************************/789790/**************************************************************************//**791@Collection Definitions of coarse classification792parameters as required by KeyGen (when coarse classification793is the next engine after this scheme).794*//***************************************************************************/795#define FM_PCD_MAX_NUM_OF_CC_TREES 8796#define FM_PCD_MAX_NUM_OF_CC_GROUPS 16797#define FM_PCD_MAX_NUM_OF_CC_UNITS 4798#define FM_PCD_MAX_NUM_OF_KEYS 256799#define FM_PCD_MAX_NUM_OF_FLOWS (4*KILOBYTE)800#define FM_PCD_MAX_SIZE_OF_KEY 56801#define FM_PCD_MAX_NUM_OF_CC_ENTRIES_IN_GRP 16802#define FM_PCD_LAST_KEY_INDEX 0xffff803804#define FM_PCD_MAX_NUM_OF_CC_NODES 255 /* Obsolete, not used - will be removed in the future */805/* @} */806807/**************************************************************************//**808@Collection A set of definitions to allow protocol809special option description.810*//***************************************************************************/811typedef uint32_t protocolOpt_t; /**< A general type to define a protocol option. */812813typedef protocolOpt_t ethProtocolOpt_t; /**< Ethernet protocol options. */814#define ETH_BROADCAST 0x80000000 /**< Ethernet Broadcast. */815#define ETH_MULTICAST 0x40000000 /**< Ethernet Multicast. */816817typedef protocolOpt_t vlanProtocolOpt_t; /**< VLAN protocol options. */818#define VLAN_STACKED 0x20000000 /**< Stacked VLAN. */819820typedef protocolOpt_t mplsProtocolOpt_t; /**< MPLS protocol options. */821#define MPLS_STACKED 0x10000000 /**< Stacked MPLS. */822823typedef protocolOpt_t ipv4ProtocolOpt_t; /**< IPv4 protocol options. */824#define IPV4_BROADCAST_1 0x08000000 /**< IPv4 Broadcast. */825#define IPV4_MULTICAST_1 0x04000000 /**< IPv4 Multicast. */826#define IPV4_UNICAST_2 0x02000000 /**< Tunneled IPv4 - Unicast. */827#define IPV4_MULTICAST_BROADCAST_2 0x01000000 /**< Tunneled IPv4 - Broadcast/Multicast. */828829#define IPV4_FRAG_1 0x00000008 /**< IPV4 reassembly option.830IPV4 Reassembly manipulation requires network831environment with IPV4 header and IPV4_FRAG_1 option */832833typedef protocolOpt_t ipv6ProtocolOpt_t; /**< IPv6 protocol options. */834#define IPV6_MULTICAST_1 0x00800000 /**< IPv6 Multicast. */835#define IPV6_UNICAST_2 0x00400000 /**< Tunneled IPv6 - Unicast. */836#define IPV6_MULTICAST_2 0x00200000 /**< Tunneled IPv6 - Multicast. */837838#define IPV6_FRAG_1 0x00000004 /**< IPV6 reassembly option.839IPV6 Reassembly manipulation requires network840environment with IPV6 header and IPV6_FRAG_1 option;841in case where fragment found, the fragment-extension offset842may be found at 'shim2' (in parser-result). */843#if (DPAA_VERSION >= 11)844typedef protocolOpt_t capwapProtocolOpt_t; /**< CAPWAP protocol options. */845#define CAPWAP_FRAG_1 0x00000008 /**< CAPWAP reassembly option.846CAPWAP Reassembly manipulation requires network847environment with CAPWAP header and CAPWAP_FRAG_1 option;848in case where fragment found, the fragment-extension offset849may be found at 'shim2' (in parser-result). */850#endif /* (DPAA_VERSION >= 11) */851852853/* @} */854855#define FM_PCD_MANIP_MAX_HDR_SIZE 256856#define FM_PCD_MANIP_DSCP_TO_VLAN_TRANS 64857858/**************************************************************************//**859@Collection A set of definitions to support Header Manipulation selection.860*//***************************************************************************/861typedef uint32_t hdrManipFlags_t; /**< A general type to define a HMan update command flags. */862863typedef hdrManipFlags_t ipv4HdrManipUpdateFlags_t; /**< IPv4 protocol HMan update command flags. */864865#define HDR_MANIP_IPV4_TOS 0x80000000 /**< update TOS with the given value ('tos' field866of t_FmPcdManipHdrFieldUpdateIpv4) */867#define HDR_MANIP_IPV4_ID 0x40000000 /**< update IP ID with the given value ('id' field868of t_FmPcdManipHdrFieldUpdateIpv4) */869#define HDR_MANIP_IPV4_TTL 0x20000000 /**< Decrement TTL by 1 */870#define HDR_MANIP_IPV4_SRC 0x10000000 /**< update IP source address with the given value871('src' field of t_FmPcdManipHdrFieldUpdateIpv4) */872#define HDR_MANIP_IPV4_DST 0x08000000 /**< update IP destination address with the given value873('dst' field of t_FmPcdManipHdrFieldUpdateIpv4) */874875typedef hdrManipFlags_t ipv6HdrManipUpdateFlags_t; /**< IPv6 protocol HMan update command flags. */876877#define HDR_MANIP_IPV6_TC 0x80000000 /**< update Traffic Class address with the given value878('trafficClass' field of t_FmPcdManipHdrFieldUpdateIpv6) */879#define HDR_MANIP_IPV6_HL 0x40000000 /**< Decrement Hop Limit by 1 */880#define HDR_MANIP_IPV6_SRC 0x20000000 /**< update IP source address with the given value881('src' field of t_FmPcdManipHdrFieldUpdateIpv6) */882#define HDR_MANIP_IPV6_DST 0x10000000 /**< update IP destination address with the given value883('dst' field of t_FmPcdManipHdrFieldUpdateIpv6) */884885typedef hdrManipFlags_t tcpUdpHdrManipUpdateFlags_t;/**< TCP/UDP protocol HMan update command flags. */886887#define HDR_MANIP_TCP_UDP_SRC 0x80000000 /**< update TCP/UDP source address with the given value888('src' field of t_FmPcdManipHdrFieldUpdateTcpUdp) */889#define HDR_MANIP_TCP_UDP_DST 0x40000000 /**< update TCP/UDP destination address with the given value890('dst' field of t_FmPcdManipHdrFieldUpdateTcpUdp) */891#define HDR_MANIP_TCP_UDP_CHECKSUM 0x20000000 /**< update TCP/UDP checksum */892893/* @} */894895/**************************************************************************//**896@Description A type used for returning the order of the key extraction.897each value in this array represents the index of the extraction898command as defined by the user in the initialization extraction array.899The valid size of this array is the user define number of extractions900required (also marked by the second '0' in this array).901*//***************************************************************************/902typedef uint8_t t_FmPcdKgKeyOrder [FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY];903904/**************************************************************************//**905@Description All PCD engines906*//***************************************************************************/907typedef enum e_FmPcdEngine {908e_FM_PCD_INVALID = 0, /**< Invalid PCD engine */909e_FM_PCD_DONE, /**< No PCD Engine indicated */910e_FM_PCD_KG, /**< KeyGen */911e_FM_PCD_CC, /**< Coarse classifier */912e_FM_PCD_PLCR, /**< Policer */913e_FM_PCD_PRS, /**< Parser */914#if (DPAA_VERSION >= 11)915e_FM_PCD_FR, /**< Frame-Replicator */916#endif /* (DPAA_VERSION >= 11) */917e_FM_PCD_HASH /**< Hash table */918} e_FmPcdEngine;919920/**************************************************************************//**921@Description Enumeration type for selecting extraction by header types922*//***************************************************************************/923typedef enum e_FmPcdExtractByHdrType {924e_FM_PCD_EXTRACT_FROM_HDR, /**< Extract bytes from header */925e_FM_PCD_EXTRACT_FROM_FIELD, /**< Extract bytes from header field */926e_FM_PCD_EXTRACT_FULL_FIELD /**< Extract a full field */927} e_FmPcdExtractByHdrType;928929/**************************************************************************//**930@Description Enumeration type for selecting extraction source931(when it is not the header)932*//***************************************************************************/933typedef enum e_FmPcdExtractFrom {934e_FM_PCD_EXTRACT_FROM_FRAME_START, /**< KG & CC: Extract from beginning of frame */935e_FM_PCD_EXTRACT_FROM_DFLT_VALUE, /**< KG only: Extract from a default value */936e_FM_PCD_EXTRACT_FROM_CURR_END_OF_PARSE, /**< KG & CC: Extract from the point where parsing had finished */937e_FM_PCD_EXTRACT_FROM_KEY, /**< CC only: Field where saved KEY */938e_FM_PCD_EXTRACT_FROM_HASH, /**< CC only: Field where saved HASH */939e_FM_PCD_EXTRACT_FROM_PARSE_RESULT, /**< KG only: Extract from the parser result */940e_FM_PCD_EXTRACT_FROM_ENQ_FQID, /**< KG & CC: Extract from enqueue FQID */941e_FM_PCD_EXTRACT_FROM_FLOW_ID /**< CC only: Field where saved Dequeue FQID */942} e_FmPcdExtractFrom;943944/**************************************************************************//**945@Description Enumeration type for selecting extraction type946*//***************************************************************************/947typedef enum e_FmPcdExtractType {948e_FM_PCD_EXTRACT_BY_HDR, /**< Extract according to header */949e_FM_PCD_EXTRACT_NON_HDR, /**< Extract from data that is not the header */950e_FM_PCD_KG_EXTRACT_PORT_PRIVATE_INFO /**< Extract private info as specified by user */951} e_FmPcdExtractType;952953/**************************************************************************//**954@Description Enumeration type for selecting default extraction value955*//***************************************************************************/956typedef enum e_FmPcdKgExtractDfltSelect {957e_FM_PCD_KG_DFLT_GBL_0, /**< Default selection is KG register 0 */958e_FM_PCD_KG_DFLT_GBL_1, /**< Default selection is KG register 1 */959e_FM_PCD_KG_DFLT_PRIVATE_0, /**< Default selection is a per scheme register 0 */960e_FM_PCD_KG_DFLT_PRIVATE_1, /**< Default selection is a per scheme register 1 */961e_FM_PCD_KG_DFLT_ILLEGAL /**< Illegal selection */962} e_FmPcdKgExtractDfltSelect;963964/**************************************************************************//**965@Description Enumeration type defining all default groups - each group shares966a default value, one of four user-initialized values.967*//***************************************************************************/968typedef enum e_FmPcdKgKnownFieldsDfltTypes {969e_FM_PCD_KG_MAC_ADDR, /**< MAC Address */970e_FM_PCD_KG_TCI, /**< TCI field */971e_FM_PCD_KG_ENET_TYPE, /**< ENET Type */972e_FM_PCD_KG_PPP_SESSION_ID, /**< PPP Session id */973e_FM_PCD_KG_PPP_PROTOCOL_ID, /**< PPP Protocol id */974e_FM_PCD_KG_MPLS_LABEL, /**< MPLS label */975e_FM_PCD_KG_IP_ADDR, /**< IP address */976e_FM_PCD_KG_PROTOCOL_TYPE, /**< Protocol type */977e_FM_PCD_KG_IP_TOS_TC, /**< TOS or TC */978e_FM_PCD_KG_IPV6_FLOW_LABEL, /**< IPV6 flow label */979e_FM_PCD_KG_IPSEC_SPI, /**< IPSEC SPI */980e_FM_PCD_KG_L4_PORT, /**< L4 Port */981e_FM_PCD_KG_TCP_FLAG, /**< TCP Flag */982e_FM_PCD_KG_GENERIC_FROM_DATA, /**< grouping implemented by SW,983any data extraction that is not the full984field described above */985e_FM_PCD_KG_GENERIC_FROM_DATA_NO_V, /**< grouping implemented by SW,986any data extraction without validation */987e_FM_PCD_KG_GENERIC_NOT_FROM_DATA /**< grouping implemented by SW,988extraction from parser result or989direct use of default value */990} e_FmPcdKgKnownFieldsDfltTypes;991992/**************************************************************************//**993@Description Enumeration type for defining header index for scenarios with994multiple (tunneled) headers995*//***************************************************************************/996typedef enum e_FmPcdHdrIndex {997e_FM_PCD_HDR_INDEX_NONE = 0, /**< used when multiple headers not used, also998to specify regular IP (not tunneled). */999e_FM_PCD_HDR_INDEX_1, /**< may be used for VLAN, MPLS, tunneled IP */1000e_FM_PCD_HDR_INDEX_2, /**< may be used for MPLS, tunneled IP */1001e_FM_PCD_HDR_INDEX_3, /**< may be used for MPLS */1002e_FM_PCD_HDR_INDEX_LAST = 0xFF /**< may be used for VLAN, MPLS */1003} e_FmPcdHdrIndex;10041005/**************************************************************************//**1006@Description Enumeration type for selecting the policer profile functional type1007*//***************************************************************************/1008typedef enum e_FmPcdProfileTypeSelection {1009e_FM_PCD_PLCR_PORT_PRIVATE, /**< Port dedicated profile */1010e_FM_PCD_PLCR_SHARED /**< Shared profile (shared within partition) */1011} e_FmPcdProfileTypeSelection;10121013/**************************************************************************//**1014@Description Enumeration type for selecting the policer profile algorithm1015*//***************************************************************************/1016typedef enum e_FmPcdPlcrAlgorithmSelection {1017e_FM_PCD_PLCR_PASS_THROUGH, /**< Policer pass through */1018e_FM_PCD_PLCR_RFC_2698, /**< Policer algorithm RFC 2698 */1019e_FM_PCD_PLCR_RFC_4115 /**< Policer algorithm RFC 4115 */1020} e_FmPcdPlcrAlgorithmSelection;10211022/**************************************************************************//**1023@Description Enumeration type for selecting a policer profile color mode1024*//***************************************************************************/1025typedef enum e_FmPcdPlcrColorMode {1026e_FM_PCD_PLCR_COLOR_BLIND, /**< Color blind */1027e_FM_PCD_PLCR_COLOR_AWARE /**< Color aware */1028} e_FmPcdPlcrColorMode;10291030/**************************************************************************//**1031@Description Enumeration type for selecting a policer profile color1032*//***************************************************************************/1033typedef enum e_FmPcdPlcrColor {1034e_FM_PCD_PLCR_GREEN, /**< Green color code */1035e_FM_PCD_PLCR_YELLOW, /**< Yellow color code */1036e_FM_PCD_PLCR_RED, /**< Red color code */1037e_FM_PCD_PLCR_OVERRIDE /**< Color override code */1038} e_FmPcdPlcrColor;10391040/**************************************************************************//**1041@Description Enumeration type for selecting the policer profile packet frame length selector1042*//***************************************************************************/1043typedef enum e_FmPcdPlcrFrameLengthSelect {1044e_FM_PCD_PLCR_L2_FRM_LEN, /**< L2 frame length */1045e_FM_PCD_PLCR_L3_FRM_LEN, /**< L3 frame length */1046e_FM_PCD_PLCR_L4_FRM_LEN, /**< L4 frame length */1047e_FM_PCD_PLCR_FULL_FRM_LEN /**< Full frame length */1048} e_FmPcdPlcrFrameLengthSelect;10491050/**************************************************************************//**1051@Description Enumeration type for selecting roll-back frame1052*//***************************************************************************/1053typedef enum e_FmPcdPlcrRollBackFrameSelect {1054e_FM_PCD_PLCR_ROLLBACK_L2_FRM_LEN, /**< Roll-back L2 frame length */1055e_FM_PCD_PLCR_ROLLBACK_FULL_FRM_LEN /**< Roll-back Full frame length */1056} e_FmPcdPlcrRollBackFrameSelect;10571058/**************************************************************************//**1059@Description Enumeration type for selecting the policer profile packet or byte mode1060*//***************************************************************************/1061typedef enum e_FmPcdPlcrRateMode {1062e_FM_PCD_PLCR_BYTE_MODE, /**< Byte mode */1063e_FM_PCD_PLCR_PACKET_MODE /**< Packet mode */1064} e_FmPcdPlcrRateMode;10651066/**************************************************************************//**1067@Description Enumeration type for defining action of frame1068*//***************************************************************************/1069typedef enum e_FmPcdDoneAction {1070e_FM_PCD_ENQ_FRAME = 0, /**< Enqueue frame */1071e_FM_PCD_DROP_FRAME /**< Mark this frame as error frame and continue1072to error flow; 'FM_PORT_FRM_ERR_CLS_DISCARD'1073flag will be set for this frame. */1074} e_FmPcdDoneAction;10751076/**************************************************************************//**1077@Description Enumeration type for selecting the policer counter1078*//***************************************************************************/1079typedef enum e_FmPcdPlcrProfileCounters {1080e_FM_PCD_PLCR_PROFILE_GREEN_PACKET_TOTAL_COUNTER, /**< Green packets counter */1081e_FM_PCD_PLCR_PROFILE_YELLOW_PACKET_TOTAL_COUNTER, /**< Yellow packets counter */1082e_FM_PCD_PLCR_PROFILE_RED_PACKET_TOTAL_COUNTER, /**< Red packets counter */1083e_FM_PCD_PLCR_PROFILE_RECOLOURED_YELLOW_PACKET_TOTAL_COUNTER, /**< Recolored yellow packets counter */1084e_FM_PCD_PLCR_PROFILE_RECOLOURED_RED_PACKET_TOTAL_COUNTER /**< Recolored red packets counter */1085} e_FmPcdPlcrProfileCounters;10861087/**************************************************************************//**1088@Description Enumeration type for selecting the PCD action after extraction1089*//***************************************************************************/1090typedef enum e_FmPcdAction {1091e_FM_PCD_ACTION_NONE, /**< NONE */1092e_FM_PCD_ACTION_EXACT_MATCH, /**< Exact match on the selected extraction */1093e_FM_PCD_ACTION_INDEXED_LOOKUP /**< Indexed lookup on the selected extraction */1094} e_FmPcdAction;10951096/**************************************************************************//**1097@Description Enumeration type for selecting type of insert manipulation1098*//***************************************************************************/1099typedef enum e_FmPcdManipHdrInsrtType {1100e_FM_PCD_MANIP_INSRT_GENERIC, /**< Insert according to offset & size */1101e_FM_PCD_MANIP_INSRT_BY_HDR, /**< Insert according to protocol */1102#if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))1103e_FM_PCD_MANIP_INSRT_BY_TEMPLATE /**< Insert template to start of frame */1104#endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */1105} e_FmPcdManipHdrInsrtType;11061107/**************************************************************************//**1108@Description Enumeration type for selecting type of remove manipulation1109*//***************************************************************************/1110typedef enum e_FmPcdManipHdrRmvType {1111e_FM_PCD_MANIP_RMV_GENERIC, /**< Remove according to offset & size */1112e_FM_PCD_MANIP_RMV_BY_HDR /**< Remove according to offset & size */1113} e_FmPcdManipHdrRmvType;11141115/**************************************************************************//**1116@Description Enumeration type for selecting specific L2 fields removal1117*//***************************************************************************/1118typedef enum e_FmPcdManipHdrRmvSpecificL2 {1119e_FM_PCD_MANIP_HDR_RMV_ETHERNET, /**< Ethernet/802.3 MAC */1120e_FM_PCD_MANIP_HDR_RMV_STACKED_QTAGS, /**< stacked QTags */1121e_FM_PCD_MANIP_HDR_RMV_ETHERNET_AND_MPLS, /**< MPLS and Ethernet/802.3 MAC header until1122the header which follows the MPLS header */1123e_FM_PCD_MANIP_HDR_RMV_MPLS, /**< Remove MPLS header (Unlimited MPLS labels) */1124e_FM_PCD_MANIP_HDR_RMV_PPPOE /**< Remove the PPPoE header and PPP protocol field. */1125} e_FmPcdManipHdrRmvSpecificL2;11261127/**************************************************************************//**1128@Description Enumeration type for selecting specific fields updates1129*//***************************************************************************/1130typedef enum e_FmPcdManipHdrFieldUpdateType {1131e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN, /**< VLAN updates */1132e_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV4, /**< IPV4 updates */1133e_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV6, /**< IPV6 updates */1134e_FM_PCD_MANIP_HDR_FIELD_UPDATE_TCP_UDP, /**< TCP_UDP updates */1135} e_FmPcdManipHdrFieldUpdateType;11361137/**************************************************************************//**1138@Description Enumeration type for selecting VLAN updates1139*//***************************************************************************/1140typedef enum e_FmPcdManipHdrFieldUpdateVlan {1141e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN_VPRI, /**< Replace VPri of outer most VLAN tag. */1142e_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN /**< DSCP to VLAN priority bits translation */1143} e_FmPcdManipHdrFieldUpdateVlan;11441145/**************************************************************************//**1146@Description Enumeration type for selecting specific L2 header insertion1147*//***************************************************************************/1148typedef enum e_FmPcdManipHdrInsrtSpecificL2 {1149e_FM_PCD_MANIP_HDR_INSRT_MPLS, /**< Insert MPLS header (Unlimited MPLS labels) */1150e_FM_PCD_MANIP_HDR_INSRT_PPPOE /**< Insert PPPOE */1151} e_FmPcdManipHdrInsrtSpecificL2;11521153#if (DPAA_VERSION >= 11)1154/**************************************************************************//**1155@Description Enumeration type for selecting QoS mapping mode11561157Note: In all cases except 'e_FM_PCD_MANIP_HDR_QOS_MAPPING_NONE'1158User should instruct the port to read the hash-result1159*//***************************************************************************/1160typedef enum e_FmPcdManipHdrQosMappingMode {1161e_FM_PCD_MANIP_HDR_QOS_MAPPING_NONE = 0, /**< No mapping, QoS field will not be changed */1162e_FM_PCD_MANIP_HDR_QOS_MAPPING_AS_IS, /**< QoS field will be overwritten by the last byte in the hash-result. */1163} e_FmPcdManipHdrQosMappingMode;11641165/**************************************************************************//**1166@Description Enumeration type for selecting QoS source11671168Note: In all cases except 'e_FM_PCD_MANIP_HDR_QOS_SRC_NONE'1169User should left room for the hash-result on input/output buffer1170and instruct the port to read/write the hash-result to the buffer (RPD should be set)1171*//***************************************************************************/1172typedef enum e_FmPcdManipHdrQosSrc {1173e_FM_PCD_MANIP_HDR_QOS_SRC_NONE = 0, /**< TODO */1174e_FM_PCD_MANIP_HDR_QOS_SRC_USER_DEFINED, /**< QoS will be taken from the last byte in the hash-result. */1175} e_FmPcdManipHdrQosSrc;1176#endif /* (DPAA_VERSION >= 11) */11771178/**************************************************************************//**1179@Description Enumeration type for selecting type of header insertion1180*//***************************************************************************/1181typedef enum e_FmPcdManipHdrInsrtByHdrType {1182e_FM_PCD_MANIP_INSRT_BY_HDR_SPECIFIC_L2, /**< Specific L2 fields insertion */1183#if (DPAA_VERSION >= 11)1184e_FM_PCD_MANIP_INSRT_BY_HDR_IP, /**< IP insertion */1185e_FM_PCD_MANIP_INSRT_BY_HDR_UDP, /**< UDP insertion */1186e_FM_PCD_MANIP_INSRT_BY_HDR_UDP_LITE, /**< UDP lite insertion */1187e_FM_PCD_MANIP_INSRT_BY_HDR_CAPWAP /**< CAPWAP insertion */1188#endif /* (DPAA_VERSION >= 11) */1189} e_FmPcdManipHdrInsrtByHdrType;11901191/**************************************************************************//**1192@Description Enumeration type for selecting specific customCommand1193*//***************************************************************************/1194typedef enum e_FmPcdManipHdrCustomType {1195e_FM_PCD_MANIP_HDR_CUSTOM_IP_REPLACE, /**< Replace IPv4/IPv6 */1196e_FM_PCD_MANIP_HDR_CUSTOM_GEN_FIELD_REPLACE, /**< Replace IPv4/IPv6 */1197} e_FmPcdManipHdrCustomType;11981199/**************************************************************************//**1200@Description Enumeration type for selecting specific customCommand1201*//***************************************************************************/1202typedef enum e_FmPcdManipHdrCustomIpReplace {1203e_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV4_BY_IPV6, /**< Replace IPv4 by IPv6 */1204e_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV6_BY_IPV4 /**< Replace IPv6 by IPv4 */1205} e_FmPcdManipHdrCustomIpReplace;12061207/**************************************************************************//**1208@Description Enumeration type for selecting type of header removal1209*//***************************************************************************/1210typedef enum e_FmPcdManipHdrRmvByHdrType {1211e_FM_PCD_MANIP_RMV_BY_HDR_SPECIFIC_L2 = 0, /**< Specific L2 fields removal */1212#if (DPAA_VERSION >= 11)1213e_FM_PCD_MANIP_RMV_BY_HDR_CAPWAP, /**< CAPWAP removal */1214#endif /* (DPAA_VERSION >= 11) */1215#if (DPAA_VERSION >= 11) || ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))1216e_FM_PCD_MANIP_RMV_BY_HDR_FROM_START, /**< Locate from data that is not the header */1217#endif /* (DPAA_VERSION >= 11) || ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */1218} e_FmPcdManipHdrRmvByHdrType;12191220/**************************************************************************//**1221@Description Enumeration type for selecting type of timeout mode1222*//***************************************************************************/1223typedef enum e_FmPcdManipReassemTimeOutMode {1224e_FM_PCD_MANIP_TIME_OUT_BETWEEN_FRAMES, /**< Limits the time of the reassembly process1225from the first fragment to the last */1226e_FM_PCD_MANIP_TIME_OUT_BETWEEN_FRAG /**< Limits the time of receiving the fragment */1227} e_FmPcdManipReassemTimeOutMode;12281229/**************************************************************************//**1230@Description Enumeration type for selecting type of WaysNumber mode1231*//***************************************************************************/1232typedef enum e_FmPcdManipReassemWaysNumber {1233e_FM_PCD_MANIP_ONE_WAY_HASH = 1, /**< One way hash */1234e_FM_PCD_MANIP_TWO_WAYS_HASH, /**< Two ways hash */1235e_FM_PCD_MANIP_THREE_WAYS_HASH, /**< Three ways hash */1236e_FM_PCD_MANIP_FOUR_WAYS_HASH, /**< Four ways hash */1237e_FM_PCD_MANIP_FIVE_WAYS_HASH, /**< Five ways hash */1238e_FM_PCD_MANIP_SIX_WAYS_HASH, /**< Six ways hash */1239e_FM_PCD_MANIP_SEVEN_WAYS_HASH, /**< Seven ways hash */1240e_FM_PCD_MANIP_EIGHT_WAYS_HASH /**< Eight ways hash */1241} e_FmPcdManipReassemWaysNumber;12421243#if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))1244/**************************************************************************//**1245@Description Enumeration type for selecting type of statistics mode1246*//***************************************************************************/1247typedef enum e_FmPcdStatsType {1248e_FM_PCD_STATS_PER_FLOWID = 0 /**< Flow ID is used as index for getting statistics */1249} e_FmPcdStatsType;1250#endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */12511252/**************************************************************************//**1253@Description Enumeration type for selecting manipulation type1254*//***************************************************************************/1255typedef enum e_FmPcdManipType {1256e_FM_PCD_MANIP_HDR = 0, /**< Header manipulation */1257e_FM_PCD_MANIP_REASSEM, /**< Reassembly */1258e_FM_PCD_MANIP_FRAG, /**< Fragmentation */1259e_FM_PCD_MANIP_SPECIAL_OFFLOAD /**< Special Offloading */1260} e_FmPcdManipType;12611262/**************************************************************************//**1263@Description Enumeration type for selecting type of statistics mode1264*//***************************************************************************/1265typedef enum e_FmPcdCcStatsMode {1266e_FM_PCD_CC_STATS_MODE_NONE = 0, /**< No statistics support */1267e_FM_PCD_CC_STATS_MODE_FRAME, /**< Frame count statistics */1268e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME, /**< Byte and frame count statistics */1269#if (DPAA_VERSION >= 11)1270e_FM_PCD_CC_STATS_MODE_RMON, /**< Byte and frame length range count statistics;1271This mode is supported only on B4860 device */1272#endif /* (DPAA_VERSION >= 11) */1273} e_FmPcdCcStatsMode;12741275/**************************************************************************//**1276@Description Enumeration type for determining the action in case an IP packet1277is larger than MTU but its DF (Don't Fragment) bit is set.1278*//***************************************************************************/1279typedef enum e_FmPcdManipDontFragAction {1280e_FM_PCD_MANIP_DISCARD_PACKET = 0, /**< Discard packet */1281e_FM_PCD_MANIP_ENQ_TO_ERR_Q_OR_DISCARD_PACKET = e_FM_PCD_MANIP_DISCARD_PACKET,1282/**< Obsolete, cannot enqueue to error queue;1283In practice, selects to discard packets;1284Will be removed in the future */1285e_FM_PCD_MANIP_FRAGMENT_PACKET, /**< Fragment packet and continue normal processing */1286e_FM_PCD_MANIP_CONTINUE_WITHOUT_FRAG /**< Continue normal processing without fragmenting the packet */1287} e_FmPcdManipDontFragAction;12881289/**************************************************************************//**1290@Description Enumeration type for selecting type of special offload manipulation1291*//***************************************************************************/1292typedef enum e_FmPcdManipSpecialOffloadType {1293e_FM_PCD_MANIP_SPECIAL_OFFLOAD_IPSEC, /**< IPSec offload manipulation */1294#if (DPAA_VERSION >= 11)1295e_FM_PCD_MANIP_SPECIAL_OFFLOAD_CAPWAP /**< CAPWAP offload manipulation */1296#endif /* (DPAA_VERSION >= 11) */1297} e_FmPcdManipSpecialOffloadType;129812991300/**************************************************************************//**1301@Description A Union of protocol dependent special options1302*//***************************************************************************/1303typedef union u_FmPcdHdrProtocolOpt {1304ethProtocolOpt_t ethOpt; /**< Ethernet options */1305vlanProtocolOpt_t vlanOpt; /**< VLAN options */1306mplsProtocolOpt_t mplsOpt; /**< MPLS options */1307ipv4ProtocolOpt_t ipv4Opt; /**< IPv4 options */1308ipv6ProtocolOpt_t ipv6Opt; /**< IPv6 options */1309#if (DPAA_VERSION >= 11)1310capwapProtocolOpt_t capwapOpt; /**< CAPWAP options */1311#endif /* (DPAA_VERSION >= 11) */1312} u_FmPcdHdrProtocolOpt;13131314/**************************************************************************//**1315@Description A union holding protocol fields131613171318Fields supported as "full fields":1319HEADER_TYPE_ETH:1320NET_HEADER_FIELD_ETH_DA1321NET_HEADER_FIELD_ETH_SA1322NET_HEADER_FIELD_ETH_TYPE13231324HEADER_TYPE_LLC_SNAP:1325NET_HEADER_FIELD_LLC_SNAP_TYPE13261327HEADER_TYPE_VLAN:1328NET_HEADER_FIELD_VLAN_TCI1329(index may apply:1330e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,1331e_FM_PCD_HDR_INDEX_LAST)13321333HEADER_TYPE_MPLS:1334NET_HEADER_FIELD_MPLS_LABEL_STACK1335(index may apply:1336e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,1337e_FM_PCD_HDR_INDEX_2,1338e_FM_PCD_HDR_INDEX_LAST)13391340HEADER_TYPE_IPv4:1341NET_HEADER_FIELD_IPv4_SRC_IP1342NET_HEADER_FIELD_IPv4_DST_IP1343NET_HEADER_FIELD_IPv4_PROTO1344NET_HEADER_FIELD_IPv4_TOS1345(index may apply:1346e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,1347e_FM_PCD_HDR_INDEX_2/e_FM_PCD_HDR_INDEX_LAST)13481349HEADER_TYPE_IPv6:1350NET_HEADER_FIELD_IPv6_SRC_IP1351NET_HEADER_FIELD_IPv6_DST_IP1352NET_HEADER_FIELD_IPv6_NEXT_HDR1353NET_HEADER_FIELD_IPv6_VER | NET_HEADER_FIELD_IPv6_FL | NET_HEADER_FIELD_IPv6_TC (must come together!)1354(index may apply:1355e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,1356e_FM_PCD_HDR_INDEX_2/e_FM_PCD_HDR_INDEX_LAST)13571358(Note that starting from DPAA 1-1, NET_HEADER_FIELD_IPv6_NEXT_HDR applies to1359the last next header indication, meaning the next L4, which may be1360present at the Ipv6 last extension. On earlier revisions this field1361applies to the Next-Header field of the main IPv6 header)13621363HEADER_TYPE_IP:1364NET_HEADER_FIELD_IP_PROTO1365(index may apply:1366e_FM_PCD_HDR_INDEX_LAST)1367NET_HEADER_FIELD_IP_DSCP1368(index may apply:1369e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1)1370HEADER_TYPE_GRE:1371NET_HEADER_FIELD_GRE_TYPE13721373HEADER_TYPE_MINENCAP1374NET_HEADER_FIELD_MINENCAP_SRC_IP1375NET_HEADER_FIELD_MINENCAP_DST_IP1376NET_HEADER_FIELD_MINENCAP_TYPE13771378HEADER_TYPE_TCP:1379NET_HEADER_FIELD_TCP_PORT_SRC1380NET_HEADER_FIELD_TCP_PORT_DST1381NET_HEADER_FIELD_TCP_FLAGS13821383HEADER_TYPE_UDP:1384NET_HEADER_FIELD_UDP_PORT_SRC1385NET_HEADER_FIELD_UDP_PORT_DST13861387HEADER_TYPE_UDP_LITE:1388NET_HEADER_FIELD_UDP_LITE_PORT_SRC1389NET_HEADER_FIELD_UDP_LITE_PORT_DST13901391HEADER_TYPE_IPSEC_AH:1392NET_HEADER_FIELD_IPSEC_AH_SPI1393NET_HEADER_FIELD_IPSEC_AH_NH13941395HEADER_TYPE_IPSEC_ESP:1396NET_HEADER_FIELD_IPSEC_ESP_SPI13971398HEADER_TYPE_SCTP:1399NET_HEADER_FIELD_SCTP_PORT_SRC1400NET_HEADER_FIELD_SCTP_PORT_DST14011402HEADER_TYPE_DCCP:1403NET_HEADER_FIELD_DCCP_PORT_SRC1404NET_HEADER_FIELD_DCCP_PORT_DST14051406HEADER_TYPE_PPPoE:1407NET_HEADER_FIELD_PPPoE_PID1408NET_HEADER_FIELD_PPPoE_SID14091410*****************************************************************1411Fields supported as "from fields":1412HEADER_TYPE_ETH (with or without validation):1413NET_HEADER_FIELD_ETH_TYPE14141415HEADER_TYPE_VLAN (with or without validation):1416NET_HEADER_FIELD_VLAN_TCI1417(index may apply:1418e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,1419e_FM_PCD_HDR_INDEX_LAST)14201421HEADER_TYPE_IPv4 (without validation):1422NET_HEADER_FIELD_IPv4_PROTO1423(index may apply:1424e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,1425e_FM_PCD_HDR_INDEX_2/e_FM_PCD_HDR_INDEX_LAST)14261427HEADER_TYPE_IPv6 (without validation):1428NET_HEADER_FIELD_IPv6_NEXT_HDR1429(index may apply:1430e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,1431e_FM_PCD_HDR_INDEX_2/e_FM_PCD_HDR_INDEX_LAST)14321433*//***************************************************************************/1434typedef union t_FmPcdFields {1435headerFieldEth_t eth; /**< Ethernet */1436headerFieldVlan_t vlan; /**< VLAN */1437headerFieldLlcSnap_t llcSnap; /**< LLC SNAP */1438headerFieldPppoe_t pppoe; /**< PPPoE */1439headerFieldMpls_t mpls; /**< MPLS */1440headerFieldIp_t ip; /**< IP */1441headerFieldIpv4_t ipv4; /**< IPv4 */1442headerFieldIpv6_t ipv6; /**< IPv6 */1443headerFieldUdp_t udp; /**< UDP */1444headerFieldUdpLite_t udpLite; /**< UDP Lite */1445headerFieldTcp_t tcp; /**< TCP */1446headerFieldSctp_t sctp; /**< SCTP */1447headerFieldDccp_t dccp; /**< DCCP */1448headerFieldGre_t gre; /**< GRE */1449headerFieldMinencap_t minencap; /**< Minimal Encapsulation */1450headerFieldIpsecAh_t ipsecAh; /**< IPSec AH */1451headerFieldIpsecEsp_t ipsecEsp; /**< IPSec ESP */1452headerFieldUdpEncapEsp_t udpEncapEsp; /**< UDP Encapsulation ESP */1453} t_FmPcdFields;14541455/**************************************************************************//**1456@Description Parameters for defining header extraction for key generation1457*//***************************************************************************/1458typedef struct t_FmPcdFromHdr {1459uint8_t size; /**< Size in byte */1460uint8_t offset; /**< Byte offset */1461} t_FmPcdFromHdr;14621463/**************************************************************************//**1464@Description Parameters for defining field extraction for key generation1465*//***************************************************************************/1466typedef struct t_FmPcdFromField {1467t_FmPcdFields field; /**< Field selection */1468uint8_t size; /**< Size in byte */1469uint8_t offset; /**< Byte offset */1470} t_FmPcdFromField;14711472/**************************************************************************//**1473@Description Parameters for defining a single network environment unit14741475A distinction unit should be defined if it will later be used1476by one or more PCD engines to distinguish between flows.1477*//***************************************************************************/1478typedef struct t_FmPcdDistinctionUnit {1479struct {1480e_NetHeaderType hdr; /**< One of the headers supported by the FM */1481u_FmPcdHdrProtocolOpt opt; /**< Select only one option ! */1482} hdrs[FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS];1483} t_FmPcdDistinctionUnit;14841485/**************************************************************************//**1486@Description Parameters for defining all different distinction units supported1487by a specific PCD Network Environment Characteristics module.14881489Each unit represent a protocol or a group of protocols that may1490be used later by the different PCD engines to distinguish1491between flows.1492*//***************************************************************************/1493typedef struct t_FmPcdNetEnvParams {1494uint8_t numOfDistinctionUnits; /**< Number of different units to be identified */1495t_FmPcdDistinctionUnit units[FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS]; /**< An array of numOfDistinctionUnits of the1496different units to be identified */1497} t_FmPcdNetEnvParams;14981499/**************************************************************************//**1500@Description Parameters for defining a single extraction action when1501creating a key1502*//***************************************************************************/1503typedef struct t_FmPcdExtractEntry {1504e_FmPcdExtractType type; /**< Extraction type select */1505union {1506struct {1507e_NetHeaderType hdr; /**< Header selection */1508bool ignoreProtocolValidation;1509/**< Ignore protocol validation */1510e_FmPcdHdrIndex hdrIndex; /**< Relevant only for MPLS, VLAN and tunneled1511IP. Otherwise should be cleared. */1512e_FmPcdExtractByHdrType type; /**< Header extraction type select */1513union {1514t_FmPcdFromHdr fromHdr; /**< Extract bytes from header parameters */1515t_FmPcdFromField fromField; /**< Extract bytes from field parameters */1516t_FmPcdFields fullField; /**< Extract full filed parameters */1517} extractByHdrType;1518} extractByHdr; /**< used when type = e_FM_PCD_KG_EXTRACT_BY_HDR */1519struct {1520e_FmPcdExtractFrom src; /**< Non-header extraction source */1521e_FmPcdAction action; /**< Relevant for CC Only */1522uint16_t icIndxMask; /**< Relevant only for CC when1523action = e_FM_PCD_ACTION_INDEXED_LOOKUP;1524Note that the number of bits that are set within1525this mask must be log2 of the CC-node 'numOfKeys'.1526Note that the mask cannot be set on the lower bits. */1527uint8_t offset; /**< Byte offset */1528uint8_t size; /**< Size in byte */1529} extractNonHdr; /**< used when type = e_FM_PCD_KG_EXTRACT_NON_HDR */1530};1531} t_FmPcdExtractEntry;15321533/**************************************************************************//**1534@Description Parameters for defining masks for each extracted field in the key.1535*//***************************************************************************/1536typedef struct t_FmPcdKgExtractMask {1537uint8_t extractArrayIndex; /**< Index in the extraction array, as initialized by user */1538uint8_t offset; /**< Byte offset */1539uint8_t mask; /**< A byte mask (selected bits will be used) */1540} t_FmPcdKgExtractMask;15411542/**************************************************************************//**1543@Description Parameters for defining default selection per groups of fields1544*//***************************************************************************/1545typedef struct t_FmPcdKgExtractDflt {1546e_FmPcdKgKnownFieldsDfltTypes type; /**< Default type select */1547e_FmPcdKgExtractDfltSelect dfltSelect; /**< Default register select */1548} t_FmPcdKgExtractDflt;15491550/**************************************************************************//**1551@Description Parameters for defining key extraction and hashing1552*//***************************************************************************/1553typedef struct t_FmPcdKgKeyExtractAndHashParams {1554uint32_t privateDflt0; /**< Scheme default register 0 */1555uint32_t privateDflt1; /**< Scheme default register 1 */1556uint8_t numOfUsedExtracts; /**< defines the valid size of the following array */1557t_FmPcdExtractEntry extractArray [FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY]; /**< An array of extractions definition. */1558uint8_t numOfUsedDflts; /**< defines the valid size of the following array */1559t_FmPcdKgExtractDflt dflts[FM_PCD_KG_NUM_OF_DEFAULT_GROUPS];1560/**< For each extraction used in this scheme, specify the required1561default register to be used when header is not found.1562types not specified in this array will get undefined value. */1563uint8_t numOfUsedMasks; /**< defines the valid size of the following array */1564t_FmPcdKgExtractMask masks[FM_PCD_KG_NUM_OF_EXTRACT_MASKS];1565uint8_t hashShift; /**< hash result right shift. Select the 24 bits out of the 64 hash1566result. 0 means using the 24 LSB's, otherwise use the156724 LSB's after shifting right.*/1568uint32_t hashDistributionNumOfFqids; /**< must be > 1 and a power of 2. Represents the range1569of queues for the key and hash functionality */1570uint8_t hashDistributionFqidsShift; /**< selects the FQID bits that will be effected by the hash */1571bool symmetricHash; /**< TRUE to generate the same hash for frames with swapped source and1572destination fields on all layers; If TRUE, driver will check that for1573all layers, if SRC extraction is selected, DST extraction must also be1574selected, and vice versa. */1575} t_FmPcdKgKeyExtractAndHashParams;15761577/**************************************************************************//**1578@Description Parameters for defining a single FQID mask (extracted OR).1579*//***************************************************************************/1580typedef struct t_FmPcdKgExtractedOrParams {1581e_FmPcdExtractType type; /**< Extraction type select */1582union {1583struct { /**< used when type = e_FM_PCD_KG_EXTRACT_BY_HDR */1584e_NetHeaderType hdr;1585e_FmPcdHdrIndex hdrIndex; /**< Relevant only for MPLS, VLAN and tunneled1586IP. Otherwise should be cleared.*/1587bool ignoreProtocolValidation;1588/**< continue extraction even if protocol is not recognized */1589} extractByHdr; /**< Header to extract by */1590e_FmPcdExtractFrom src; /**< used when type = e_FM_PCD_KG_EXTRACT_NON_HDR */1591};1592uint8_t extractionOffset; /**< Offset for extraction (in bytes). */1593e_FmPcdKgExtractDfltSelect dfltValue; /**< Select register from which extraction is taken if1594field not found */1595uint8_t mask; /**< Extraction mask (specified bits are used) */1596uint8_t bitOffsetInFqid; /**< 0-31, Selects which bits of the 24 FQID bits to effect using1597the extracted byte; Assume byte is placed as the 8 MSB's in1598a 32 bit word where the lower bits1599are the FQID; i.e if bitOffsetInFqid=1 than its LSB1600will effect the FQID MSB, if bitOffsetInFqid=24 than the1601extracted byte will effect the 8 LSB's of the FQID,1602if bitOffsetInFqid=31 than the byte's MSB will effect1603the FQID's LSB; 0 means - no effect on FQID;1604Note that one, and only one of1605bitOffsetInFqid or bitOffsetInPlcrProfile must be set (i.e,1606extracted byte must effect either FQID or Policer profile).*/1607uint8_t bitOffsetInPlcrProfile;1608/**< 0-15, Selects which bits of the 8 policer profile id bits to1609effect using the extracted byte; Assume byte is placed1610as the 8 MSB's in a 16 bit word where the lower bits1611are the policer profile id; i.e if bitOffsetInPlcrProfile=11612than its LSB will effect the profile MSB, if bitOffsetInFqid=81613than the extracted byte will effect the whole policer profile id,1614if bitOffsetInFqid=15 than the byte's MSB will effect1615the Policer Profile id's LSB;16160 means - no effect on policer profile; Note that one, and only one of1617bitOffsetInFqid or bitOffsetInPlcrProfile must be set (i.e,1618extracted byte must effect either FQID or Policer profile).*/1619} t_FmPcdKgExtractedOrParams;16201621/**************************************************************************//**1622@Description Parameters for configuring a scheme counter1623*//***************************************************************************/1624typedef struct t_FmPcdKgSchemeCounter {1625bool update; /**< FALSE to keep the current counter state1626and continue from that point, TRUE to update/reset1627the counter when the scheme is written. */1628uint32_t value; /**< If update=TRUE, this value will be written into the1629counter. clear this field to reset the counter. */1630} t_FmPcdKgSchemeCounter;16311632/**************************************************************************//**1633@Description Parameters for configuring a policer profile for a KeyGen scheme1634(when policer is the next engine after this scheme).1635*//***************************************************************************/1636typedef struct t_FmPcdKgPlcrProfile {1637bool sharedProfile; /**< TRUE if this profile is shared between ports1638(managed by master partition); Must not be TRUE1639if profile is after Coarse Classification*/1640bool direct; /**< if TRUE, directRelativeProfileId only selects the profile1641id, if FALSE fqidOffsetRelativeProfileIdBase is used1642together with fqidOffsetShift and numOfProfiles1643parameters, to define a range of profiles from1644which the KeyGen result will determine the1645destination policer profile. */1646union {1647uint16_t directRelativeProfileId; /**< Used if 'direct' is TRUE, to select policer profile.1648should indicate the policer profile offset within the1649port's policer profiles or shared window. */1650struct {1651uint8_t fqidOffsetShift; /**< Shift on the KeyGen create FQID offset (i.e. not the1652final FQID - without the FQID base). */1653uint8_t fqidOffsetRelativeProfileIdBase;1654/**< The base of the FMan Port's relative Storage-Profile ID;1655this value will be "OR'ed" with the KeyGen create FQID1656offset (i.e. not the final FQID - without the FQID base);1657the final result should indicate the Storage-Profile offset1658within the FMan Port's relative Storage-Profiles window/1659(or the SHARED window depends on 'sharedProfile'). */1660uint8_t numOfProfiles; /**< Range of profiles starting at base */1661} indirectProfile; /**< Indirect profile parameters */1662} profileSelect; /**< Direct/indirect profile selection and parameters */1663} t_FmPcdKgPlcrProfile;16641665#if (DPAA_VERSION >= 11)1666/**************************************************************************//**1667@Description Parameters for configuring a storage profile for a KeyGen scheme.1668*//***************************************************************************/1669typedef struct t_FmPcdKgStorageProfile {1670bool direct; /**< If TRUE, directRelativeProfileId only selects the1671profile id;1672If FALSE, fqidOffsetRelativeProfileIdBase is used1673together with fqidOffsetShift and numOfProfiles1674parameters to define a range of profiles from which1675the KeyGen result will determine the destination1676storage profile. */1677union {1678uint16_t directRelativeProfileId; /**< Used when 'direct' is TRUE, to select a storage profile;1679should indicate the storage profile offset within the1680port's storage profiles window. */1681struct {1682uint8_t fqidOffsetShift; /**< Shift on the KeyGen create FQID offset (i.e. not the1683final FQID - without the FQID base). */1684uint8_t fqidOffsetRelativeProfileIdBase;1685/**< The base of the FMan Port's relative Storage-Profile ID;1686this value will be "OR'ed" with the KeyGen create FQID1687offset (i.e. not the final FQID - without the FQID base);1688the final result should indicate the Storage-Profile offset1689within the FMan Port's relative Storage-Profiles window. */1690uint8_t numOfProfiles; /**< Range of profiles starting at base. */1691} indirectProfile; /**< Indirect profile parameters. */1692} profileSelect; /**< Direct/indirect profile selection and parameters. */1693} t_FmPcdKgStorageProfile;1694#endif /* (DPAA_VERSION >= 11) */16951696/**************************************************************************//**1697@Description Parameters for defining CC as the next engine after KeyGen1698*//***************************************************************************/1699typedef struct t_FmPcdKgCc {1700t_Handle h_CcTree; /**< A handle to a CC Tree */1701uint8_t grpId; /**< CC group id within the CC tree */1702bool plcrNext; /**< TRUE if after CC, in case of data frame,1703policing is required. */1704bool bypassPlcrProfileGeneration; /**< TRUE to bypass KeyGen policer profile generation;1705selected profile is the one set at port initialization. */1706t_FmPcdKgPlcrProfile plcrProfile; /**< Valid only if plcrNext = TRUE and1707bypassPlcrProfileGeneration = FALSE */1708} t_FmPcdKgCc;17091710/**************************************************************************//**1711@Description Parameters for defining initializing a KeyGen scheme1712*//***************************************************************************/1713typedef struct t_FmPcdKgSchemeParams {1714bool modify; /**< TRUE to change an existing scheme */1715union1716{1717uint8_t relativeSchemeId; /**< if modify=FALSE:Partition relative scheme id */1718t_Handle h_Scheme; /**< if modify=TRUE: a handle of the existing scheme */1719} id;1720bool alwaysDirect; /**< This scheme is reached only directly, i.e. no need1721for match vector; KeyGen will ignore it when matching */1722struct { /**< HL Relevant only if alwaysDirect = FALSE */1723t_Handle h_NetEnv; /**< A handle to the Network environment as returned1724by FM_PCD_NetEnvCharacteristicsSet() */1725uint8_t numOfDistinctionUnits; /**< Number of NetEnv units listed in unitIds array */1726uint8_t unitIds[FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS];1727/**< Indexes as passed to SetNetEnvCharacteristics array*/1728} netEnvParams;1729bool useHash; /**< use the KeyGen Hash functionality */1730t_FmPcdKgKeyExtractAndHashParams keyExtractAndHashParams;1731/**< used only if useHash = TRUE */1732bool bypassFqidGeneration; /**< Normally - FALSE, TRUE to avoid FQID update in the IC;1733In such a case FQID after KeyGen will be the default FQID1734defined for the relevant port, or the FQID defined by CC1735in cases where CC was the previous engine. */1736uint32_t baseFqid; /**< Base FQID; Relevant only if bypassFqidGeneration = FALSE;1737If hash is used and an even distribution is expected1738according to hashDistributionNumOfFqids, baseFqid must be aligned to1739hashDistributionNumOfFqids. */1740uint8_t numOfUsedExtractedOrs; /**< Number of FQID masks listed in extractedOrs array */1741t_FmPcdKgExtractedOrParams extractedOrs[FM_PCD_KG_NUM_OF_GENERIC_REGS];1742/**< FM_PCD_KG_NUM_OF_GENERIC_REGS1743registers are shared between qidMasks1744functionality and some of the extraction1745actions; Normally only some will be used1746for qidMask. Driver will return error if1747resource is full at initialization time. */17481749#if (DPAA_VERSION >= 11)1750bool overrideStorageProfile; /**< TRUE if KeyGen override previously decided storage profile */1751t_FmPcdKgStorageProfile storageProfile; /**< Used when overrideStorageProfile TRUE */1752#endif /* (DPAA_VERSION >= 11) */17531754e_FmPcdEngine nextEngine; /**< may be BMI, PLCR or CC */1755union { /**< depends on nextEngine */1756e_FmPcdDoneAction doneAction; /**< Used when next engine is BMI (done) */1757t_FmPcdKgPlcrProfile plcrProfile; /**< Used when next engine is PLCR */1758t_FmPcdKgCc cc; /**< Used when next engine is CC */1759} kgNextEngineParams;1760t_FmPcdKgSchemeCounter schemeCounter; /**< A structure of parameters for updating1761the scheme counter */1762} t_FmPcdKgSchemeParams;17631764/**************************************************************************//**1765@Collection Definitions for CC statistics1766*//***************************************************************************/1767#if (DPAA_VERSION >= 11)1768#define FM_PCD_CC_STATS_MAX_NUM_OF_FLR 10 /* Maximal supported number of frame length ranges */1769#define FM_PCD_CC_STATS_FLR_SIZE 2 /* Size in bytes of a frame length range limit */1770#endif /* (DPAA_VERSION >= 11) */1771#define FM_PCD_CC_STATS_COUNTER_SIZE 4 /* Size in bytes of a frame length range counter */1772/* @} */17731774/**************************************************************************//**1775@Description Parameters for defining CC as the next engine after a CC node.1776*//***************************************************************************/1777typedef struct t_FmPcdCcNextCcParams {1778t_Handle h_CcNode; /**< A handle of the next CC node */1779} t_FmPcdCcNextCcParams;17801781#if (DPAA_VERSION >= 11)1782/**************************************************************************//**1783@Description Parameters for defining Frame replicator as the next engine after a CC node.1784*//***************************************************************************/1785typedef struct t_FmPcdCcNextFrParams {1786t_Handle h_FrmReplic; /**< A handle of the next frame replicator group */1787} t_FmPcdCcNextFrParams;1788#endif /* (DPAA_VERSION >= 11) */17891790/**************************************************************************//**1791@Description Parameters for defining Policer as the next engine after a CC node.1792*//***************************************************************************/1793typedef struct t_FmPcdCcNextPlcrParams {1794bool overrideParams; /**< TRUE if CC override previously decided parameters*/1795bool sharedProfile; /**< Relevant only if overrideParams=TRUE:1796TRUE if this profile is shared between ports */1797uint16_t newRelativeProfileId; /**< Relevant only if overrideParams=TRUE:1798(otherwise profile id is taken from KeyGen);1799This parameter should indicate the policer1800profile offset within the port's1801policer profiles or from SHARED window.*/1802uint32_t newFqid; /**< Relevant only if overrideParams=TRUE:1803FQID for enqueuing the frame;1804In earlier chips if policer next engine is KEYGEN,1805this parameter can be 0, because the KEYGEN1806always decides the enqueue FQID.*/1807#if (DPAA_VERSION >= 11)1808uint8_t newRelativeStorageProfileId;1809/**< Indicates the relative storage profile offset within1810the port's storage profiles window;1811Relevant only if the port was configured with VSP. */1812#endif /* (DPAA_VERSION >= 11) */1813} t_FmPcdCcNextPlcrParams;18141815/**************************************************************************//**1816@Description Parameters for defining enqueue as the next action after a CC node.1817*//***************************************************************************/1818typedef struct t_FmPcdCcNextEnqueueParams {1819e_FmPcdDoneAction action; /**< Action - when next engine is BMI (done) */1820bool overrideFqid; /**< TRUE if CC override previously decided fqid and vspid,1821relevant if action = e_FM_PCD_ENQ_FRAME */1822uint32_t newFqid; /**< Valid if overrideFqid=TRUE, FQID for enqueuing the frame1823(otherwise FQID is taken from KeyGen),1824relevant if action = e_FM_PCD_ENQ_FRAME */1825#if (DPAA_VERSION >= 11)1826uint8_t newRelativeStorageProfileId;1827/**< Valid if overrideFqid=TRUE, Indicates the relative virtual1828storage profile offset within the port's storage profiles1829window; Relevant only if the port was configured with VSP. */1830#endif /* (DPAA_VERSION >= 11) */1831} t_FmPcdCcNextEnqueueParams;18321833/**************************************************************************//**1834@Description Parameters for defining KeyGen as the next engine after a CC node.1835*//***************************************************************************/1836typedef struct t_FmPcdCcNextKgParams {1837bool overrideFqid; /**< TRUE if CC override previously decided fqid and vspid,1838Note - this parameters irrelevant for earlier chips */1839uint32_t newFqid; /**< Valid if overrideFqid=TRUE, FQID for enqueuing the frame1840(otherwise FQID is taken from KeyGen),1841Note - this parameters irrelevant for earlier chips */1842#if (DPAA_VERSION >= 11)1843uint8_t newRelativeStorageProfileId;1844/**< Valid if overrideFqid=TRUE, Indicates the relative virtual1845storage profile offset within the port's storage profiles1846window; Relevant only if the port was configured with VSP. */1847#endif /* (DPAA_VERSION >= 11) */18481849t_Handle h_DirectScheme; /**< Direct scheme handle to go to. */1850} t_FmPcdCcNextKgParams;18511852/**************************************************************************//**1853@Description Parameters for defining the next engine after a CC node.1854*//***************************************************************************/1855typedef struct t_FmPcdCcNextEngineParams {1856e_FmPcdEngine nextEngine; /**< User has to initialize parameters1857according to nextEngine definition */1858union {1859t_FmPcdCcNextCcParams ccParams; /**< Parameters in case next engine is CC */1860t_FmPcdCcNextPlcrParams plcrParams; /**< Parameters in case next engine is PLCR */1861t_FmPcdCcNextEnqueueParams enqueueParams; /**< Parameters in case next engine is BMI */1862t_FmPcdCcNextKgParams kgParams; /**< Parameters in case next engine is KG */1863#if (DPAA_VERSION >= 11)1864t_FmPcdCcNextFrParams frParams; /**< Parameters in case next engine is FR */1865#endif /* (DPAA_VERSION >= 11) */1866} params; /**< union used for all the next-engine parameters options */18671868t_Handle h_Manip; /**< Handle to Manipulation object.1869Relevant if next engine is of type result1870(e_FM_PCD_PLCR, e_FM_PCD_KG, e_FM_PCD_DONE) */18711872bool statisticsEn; /**< If TRUE, statistics counters are incremented1873for each frame passing through this1874Coarse Classification entry. */1875} t_FmPcdCcNextEngineParams;18761877/**************************************************************************//**1878@Description Parameters for defining a single CC key1879*//***************************************************************************/1880typedef struct t_FmPcdCcKeyParams {1881uint8_t *p_Key; /**< Relevant only if 'action' = e_FM_PCD_ACTION_EXACT_MATCH;1882pointer to the key of the size defined in keySize */1883uint8_t *p_Mask; /**< Relevant only if 'action' = e_FM_PCD_ACTION_EXACT_MATCH;1884pointer to the Mask per key of the size defined1885in keySize. p_Key and p_Mask (if defined) has to be1886of the same size defined in the keySize;1887NOTE that if this value is equal for all entries whithin1888this table, the driver will automatically use global-mask1889(i.e. one common mask for all entries) instead of private1890one; that is done in order to spare some memory and for1891better performance. */1892t_FmPcdCcNextEngineParams ccNextEngineParams;1893/**< parameters for the next for the defined Key in1894the p_Key */1895} t_FmPcdCcKeyParams;18961897/**************************************************************************//**1898@Description Parameters for defining CC keys parameters1899The driver supports two methods for CC node allocation: dynamic and static.1900Static mode was created in order to prevent runtime alloc/free1901of FMan memory (MURAM), which may cause fragmentation; in this mode,1902the driver automatically allocates the memory according to1903'maxNumOfKeys' parameter. The driver calculates the maximal memory1904size that may be used for this CC-Node taking into consideration1905'maskSupport' and 'statisticsMode' parameters.1906When 'action' = e_FM_PCD_ACTION_INDEXED_LOOKUP in the extraction1907parameters of this node, 'maxNumOfKeys' must be equal to 'numOfKeys'.1908In dynamic mode, 'maxNumOfKeys' must be zero. At initialization,1909all required structures are allocated according to 'numOfKeys'1910parameter. During runtime modification, these structures are1911re-allocated according to the updated number of keys.19121913Please note that 'action' and 'icIndxMask' mentioned in the1914specific parameter explanations are passed in the extraction1915parameters of the node (fields of extractCcParams.extractNonHdr).1916*//***************************************************************************/1917typedef struct t_KeysParams {1918uint16_t maxNumOfKeys; /**< Maximum number of keys that will (ever) be used in this CC-Node;1919A value of zero may be used for dynamic memory allocation. */1920bool maskSupport; /**< This parameter is relevant only if a node is initialized with1921'action' = e_FM_PCD_ACTION_EXACT_MATCH and maxNumOfKeys > 0;1922Should be TRUE to reserve table memory for key masks, even if1923initial keys do not contain masks, or if the node was initialized1924as 'empty' (without keys); this will allow user to add keys with1925masks at runtime.1926NOTE that if user want to use only global-masks (i.e. one common mask1927for all the entries within this table, this parameter should set to 'FALSE'. */1928e_FmPcdCcStatsMode statisticsMode; /**< Determines the supported statistics mode for all node's keys.1929To enable statistics gathering, statistics should be enabled per1930every key, using 'statisticsEn' in next engine parameters structure1931of that key;1932If 'maxNumOfKeys' is set, all required structures will be1933preallocated for all keys. */1934#if (DPAA_VERSION >= 11)1935uint16_t frameLengthRanges[FM_PCD_CC_STATS_MAX_NUM_OF_FLR];1936/**< Relevant only for 'RMON' statistics mode1937(this feature is supported only on B4860 device);1938Holds a list of programmable thresholds - for each received frame,1939its length in bytes is examined against these range thresholds and1940the appropriate counter is incremented by 1 - for example, to belong1941to range i, the following should hold:1942range i-1 threshold < frame length <= range i threshold1943Each range threshold must be larger then its preceding range1944threshold, and last range threshold must be 0xFFFF. */1945#endif /* (DPAA_VERSION >= 11) */1946uint16_t numOfKeys; /**< Number of initial keys;1947Note that in case of 'action' = e_FM_PCD_ACTION_INDEXED_LOOKUP,1948this field should be power-of-2 of the number of bits that are1949set in 'icIndxMask'. */1950uint8_t keySize; /**< Size of key - for extraction of type FULL_FIELD, 'keySize' has1951to be the standard size of the selected key; For other extraction1952types, 'keySize' has to be as size of extraction; When 'action' =1953e_FM_PCD_ACTION_INDEXED_LOOKUP, 'keySize' must be 2. */1954t_FmPcdCcKeyParams keyParams[FM_PCD_MAX_NUM_OF_KEYS];1955/**< An array with 'numOfKeys' entries, each entry specifies the1956corresponding key parameters;1957When 'action' = e_FM_PCD_ACTION_EXACT_MATCH, this value must not1958exceed 255 (FM_PCD_MAX_NUM_OF_KEYS-1) as the last entry is saved1959for the 'miss' entry. */1960t_FmPcdCcNextEngineParams ccNextEngineParamsForMiss;1961/**< Parameters for defining the next engine when a key is not matched;1962Not relevant if action = e_FM_PCD_ACTION_INDEXED_LOOKUP. */1963} t_KeysParams;196419651966/**************************************************************************//**1967@Description Parameters for defining a CC node1968*//***************************************************************************/1969typedef struct t_FmPcdCcNodeParams {1970t_FmPcdExtractEntry extractCcParams; /**< Extraction parameters */1971t_KeysParams keysParams; /**< Keys definition matching the selected extraction */1972} t_FmPcdCcNodeParams;19731974/**************************************************************************//**1975@Description Parameters for defining a hash table1976*//***************************************************************************/1977typedef struct t_FmPcdHashTableParams {1978uint16_t maxNumOfKeys; /**< Maximum Number Of Keys that will (ever) be used in this Hash-table */1979e_FmPcdCcStatsMode statisticsMode; /**< If not e_FM_PCD_CC_STATS_MODE_NONE, the required structures for the1980requested statistics mode will be allocated according to maxNumOfKeys. */1981uint8_t kgHashShift; /**< KG-Hash-shift as it was configured in the KG-scheme1982that leads to this hash-table. */1983uint16_t hashResMask; /**< Mask that will be used on the hash-result;1984The number-of-sets for this hash will be calculated1985as (2^(number of bits set in 'hashResMask'));1986The 4 lower bits must be cleared. */1987uint8_t hashShift; /**< Byte offset from the beginning of the KeyGen hash result to the19882-bytes to be used as hash index. */1989uint8_t matchKeySize; /**< Size of the exact match keys held by the hash buckets */19901991t_FmPcdCcNextEngineParams ccNextEngineParamsForMiss; /**< Parameters for defining the next engine when a key is not matched */19921993} t_FmPcdHashTableParams;19941995/**************************************************************************//**1996@Description Parameters for defining a CC tree group.19971998This structure defines a CC group in terms of NetEnv units1999and the action to be taken in each case. The unitIds list must2000be given in order from low to high indices.20012002t_FmPcdCcNextEngineParams is a list of 2^numOfDistinctionUnits2003structures where each defines the next action to be taken for2004each units combination. for example:2005numOfDistinctionUnits = 22006unitIds = {1,3}2007p_NextEnginePerEntriesInGrp[0] = t_FmPcdCcNextEngineParams for the case that2008unit 1 - not found; unit 3 - not found;2009p_NextEnginePerEntriesInGrp[1] = t_FmPcdCcNextEngineParams for the case that2010unit 1 - not found; unit 3 - found;2011p_NextEnginePerEntriesInGrp[2] = t_FmPcdCcNextEngineParams for the case that2012unit 1 - found; unit 3 - not found;2013p_NextEnginePerEntriesInGrp[3] = t_FmPcdCcNextEngineParams for the case that2014unit 1 - found; unit 3 - found;2015*//***************************************************************************/2016typedef struct t_FmPcdCcGrpParams {2017uint8_t numOfDistinctionUnits; /**< Up to 4 */2018uint8_t unitIds[FM_PCD_MAX_NUM_OF_CC_UNITS];2019/**< Indices of the units as defined in2020FM_PCD_NetEnvCharacteristicsSet() */2021t_FmPcdCcNextEngineParams nextEnginePerEntriesInGrp[FM_PCD_MAX_NUM_OF_CC_ENTRIES_IN_GRP];2022/**< Maximum entries per group is 16 */2023} t_FmPcdCcGrpParams;20242025/**************************************************************************//**2026@Description Parameters for defining CC tree groups2027*//***************************************************************************/2028typedef struct t_FmPcdCcTreeParams {2029t_Handle h_NetEnv; /**< A handle to the Network environment as returned2030by FM_PCD_NetEnvCharacteristicsSet() */2031uint8_t numOfGrps; /**< Number of CC groups within the CC tree */2032t_FmPcdCcGrpParams ccGrpParams[FM_PCD_MAX_NUM_OF_CC_GROUPS];2033/**< Parameters for each group. */2034} t_FmPcdCcTreeParams;203520362037/**************************************************************************//**2038@Description CC key statistics structure2039*//***************************************************************************/2040typedef struct t_FmPcdCcKeyStatistics {2041uint32_t byteCount; /**< This counter reflects byte count of frames that2042were matched by this key. */2043uint32_t frameCount; /**< This counter reflects count of frames that2044were matched by this key. */2045#if (DPAA_VERSION >= 11)2046uint32_t frameLengthRangeCount[FM_PCD_CC_STATS_MAX_NUM_OF_FLR];2047/**< These counters reflect how many frames matched2048this key in 'RMON' statistics mode:2049Each counter holds the number of frames of a2050specific frames length range, according to the2051ranges provided at initialization. */2052#endif /* (DPAA_VERSION >= 11) */2053} t_FmPcdCcKeyStatistics;20542055/**************************************************************************//**2056@Description Parameters for defining policer byte rate2057*//***************************************************************************/2058typedef struct t_FmPcdPlcrByteRateModeParams {2059e_FmPcdPlcrFrameLengthSelect frameLengthSelection; /**< Frame length selection */2060e_FmPcdPlcrRollBackFrameSelect rollBackFrameSelection; /**< relevant option only e_FM_PCD_PLCR_L2_FRM_LEN,2061e_FM_PCD_PLCR_FULL_FRM_LEN */2062} t_FmPcdPlcrByteRateModeParams;20632064/**************************************************************************//**2065@Description Parameters for defining the policer profile (based on2066RFC-2698 or RFC-4115 attributes).2067*//***************************************************************************/2068typedef struct t_FmPcdPlcrNonPassthroughAlgParams {2069e_FmPcdPlcrRateMode rateMode; /**< Byte mode or Packet mode */2070t_FmPcdPlcrByteRateModeParams byteModeParams; /**< Valid for Byte NULL for Packet */2071uint32_t committedInfoRate; /**< KBits/Second or Packets/Second */2072uint32_t committedBurstSize; /**< Bytes/Packets */2073uint32_t peakOrExcessInfoRate; /**< KBits/Second or Packets/Second */2074uint32_t peakOrExcessBurstSize; /**< Bytes/Packets */2075} t_FmPcdPlcrNonPassthroughAlgParams;20762077/**************************************************************************//**2078@Description Parameters for defining the next engine after policer2079*//***************************************************************************/2080typedef union u_FmPcdPlcrNextEngineParams {2081e_FmPcdDoneAction action; /**< Action - when next engine is BMI (done) */2082t_Handle h_Profile; /**< Policer profile handle - used when next engine2083is Policer, must be a SHARED profile */2084t_Handle h_DirectScheme; /**< Direct scheme select - when next engine is KeyGen */2085} u_FmPcdPlcrNextEngineParams;20862087/**************************************************************************//**2088@Description Parameters for defining the policer profile entry2089*//***************************************************************************/2090typedef struct t_FmPcdPlcrProfileParams {2091bool modify; /**< TRUE to change an existing profile */2092union {2093struct {2094e_FmPcdProfileTypeSelection profileType; /**< Type of policer profile */2095t_Handle h_FmPort; /**< Relevant for per-port profiles only */2096uint16_t relativeProfileId; /**< Profile id - relative to shared group or to port */2097} newParams; /**< use it when modify = FALSE */2098t_Handle h_Profile; /**< A handle to a profile - use it when modify=TRUE */2099} id;2100e_FmPcdPlcrAlgorithmSelection algSelection; /**< Profile Algorithm PASS_THROUGH, RFC_2698, RFC_4115 */2101e_FmPcdPlcrColorMode colorMode; /**< COLOR_BLIND, COLOR_AWARE */21022103union {2104e_FmPcdPlcrColor dfltColor; /**< For Color-Blind Pass-Through mode; the policer will re-color2105any incoming packet with the default value. */2106e_FmPcdPlcrColor override; /**< For Color-Aware modes; the profile response to a2107pre-color value of 2'b11. */2108} color;21092110t_FmPcdPlcrNonPassthroughAlgParams nonPassthroughAlgParams; /**< RFC2698 or RFC4115 parameters */21112112e_FmPcdEngine nextEngineOnGreen; /**< Next engine for green-colored frames */2113u_FmPcdPlcrNextEngineParams paramsOnGreen; /**< Next engine parameters for green-colored frames */21142115e_FmPcdEngine nextEngineOnYellow; /**< Next engine for yellow-colored frames */2116u_FmPcdPlcrNextEngineParams paramsOnYellow; /**< Next engine parameters for yellow-colored frames */21172118e_FmPcdEngine nextEngineOnRed; /**< Next engine for red-colored frames */2119u_FmPcdPlcrNextEngineParams paramsOnRed; /**< Next engine parameters for red-colored frames */21202121bool trapProfileOnFlowA; /**< Obsolete - do not use */2122bool trapProfileOnFlowB; /**< Obsolete - do not use */2123bool trapProfileOnFlowC; /**< Obsolete - do not use */2124} t_FmPcdPlcrProfileParams;21252126/**************************************************************************//**2127@Description Parameters for selecting a location for requested manipulation2128*//***************************************************************************/2129typedef struct t_FmManipHdrInfo {2130e_NetHeaderType hdr; /**< Header selection */2131e_FmPcdHdrIndex hdrIndex; /**< Relevant only for MPLS, VLAN and tunneled IP. Otherwise should be cleared. */2132bool byField; /**< TRUE if the location of manipulation is according to some field in the specific header*/2133t_FmPcdFields fullField; /**< Relevant only when byField = TRUE: Extract field */2134} t_FmManipHdrInfo;21352136#if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))2137/**************************************************************************//**2138@Description Parameters for defining an insertion manipulation2139of type e_FM_PCD_MANIP_INSRT_TO_START_OF_FRAME_TEMPLATE2140*//***************************************************************************/2141typedef struct t_FmPcdManipHdrInsrtByTemplateParams {2142uint8_t size; /**< Size of insert template to the start of the frame. */2143uint8_t hdrTemplate[FM_PCD_MAX_MANIP_INSRT_TEMPLATE_SIZE];2144/**< Array of the insertion template. */21452146bool modifyOuterIp; /**< TRUE if user want to modify some fields in outer IP. */2147struct {2148uint16_t ipOuterOffset; /**< Offset of outer IP in the insert template, relevant if modifyOuterIp = TRUE.*/2149uint16_t dscpEcn; /**< value of dscpEcn in IP outer, relevant if modifyOuterIp = TRUE.2150in IPV4 dscpEcn only byte - it has to be adjusted to the right*/2151bool udpPresent; /**< TRUE if UDP is present in the insert template, relevant if modifyOuterIp = TRUE.*/2152uint8_t udpOffset; /**< Offset in the insert template of UDP, relevant if modifyOuterIp = TRUE and udpPresent=TRUE.*/2153uint8_t ipIdentGenId; /**< Used by FMan-CTRL to calculate IP-identification field,relevant if modifyOuterIp = TRUE.*/2154bool 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.*/2155struct {2156uint8_t blockSize; /**< The CAAM block-size; Used by FMan-CTRL to calculate the IP Total Length field.*/2157uint8_t extraBytesAddedAlignedToBlockSize; /**< Used by FMan-CTRL to calculate the IP Total Length field and UDP length*/2158uint8_t extraBytesAddedNotAlignedToBlockSize;/**< Used by FMan-CTRL to calculate the IP Total Length field and UDP length.*/2159} recalculateLengthParams; /**< Recalculate length parameters - relevant if modifyOuterIp = TRUE and recalculateLength = TRUE */2160} modifyOuterIpParams; /**< Outer IP modification parameters - ignored if modifyOuterIp is FALSE */21612162bool modifyOuterVlan; /**< TRUE if user wants to modify VPri field in the outer VLAN header*/2163struct {2164uint8_t vpri; /**< Value of VPri, relevant if modifyOuterVlan = TRUE2165VPri only 3 bits, it has to be adjusted to the right*/2166} modifyOuterVlanParams;2167} t_FmPcdManipHdrInsrtByTemplateParams;21682169/**************************************************************************//**2170@Description Parameters for defining CAPWAP fragmentation2171*//***************************************************************************/2172typedef struct t_CapwapFragmentationParams {2173uint16_t sizeForFragmentation; /**< if length of the frame is greater than this value, CAPWAP fragmentation will be executed.*/2174bool headerOptionsCompr; /**< TRUE - first fragment include the CAPWAP header options field,2175and all other fragments exclude the CAPWAP options field,2176FALSE - all fragments include CAPWAP header options field. */2177} t_CapwapFragmentationParams;21782179/**************************************************************************//**2180@Description Parameters for defining CAPWAP reassembly2181*//***************************************************************************/2182typedef struct t_CapwapReassemblyParams {2183uint16_t maxNumFramesInProcess; /**< Number of frames which can be reassembled concurrently; must be power of 2.2184In case numOfFramesPerHashEntry == e_FM_PCD_MANIP_FOUR_WAYS_HASH,2185maxNumFramesInProcess has to be in the range of 4 - 512,2186In case numOfFramesPerHashEntry == e_FM_PCD_MANIP_EIGHT_WAYS_HASH,2187maxNumFramesInProcess has to be in the range of 8 - 2048 */2188bool haltOnDuplicationFrag; /**< If TRUE, reassembly process will be halted due to duplicated fragment,2189and all processed fragments will be enqueued with error indication;2190If FALSE, only duplicated fragments will be enqueued with error indication. */21912192e_FmPcdManipReassemTimeOutMode timeOutMode; /**< Expiration delay initialized by the reassembly process */2193uint32_t fqidForTimeOutFrames; /**< FQID in which time out frames will enqueue during Time Out Process */2194uint32_t timeoutRoutineRequestTime;2195/**< Represents the time interval in microseconds between consecutive2196timeout routine requests It has to be power of 2. */2197uint32_t timeoutThresholdForReassmProcess;2198/**< Time interval (microseconds) for marking frames in process as too old;2199Frames in process are those for which at least one fragment was received2200but not all fragments. */22012202e_FmPcdManipReassemWaysNumber numOfFramesPerHashEntry;/**< Number of frames per hash entry (needed for the reassembly process) */2203} t_CapwapReassemblyParams;22042205/**************************************************************************//**2206@Description Parameters for defining fragmentation/reassembly manipulation2207*//***************************************************************************/2208typedef struct t_FmPcdManipFragOrReasmParams {2209bool frag; /**< TRUE if using the structure for fragmentation,2210otherwise this structure is used for reassembly */2211uint8_t sgBpid; /**< Scatter/Gather buffer pool id;2212Same LIODN number is used for these buffers as for2213the received frames buffers, so buffers of this pool2214need to be allocated in the same memory area as the2215received buffers. If the received buffers arrive2216from different sources, the Scatter/Gather BP id2217should be mutual to all these sources. */2218e_NetHeaderType hdr; /**< Header selection */2219union {2220t_CapwapFragmentationParams capwapFragParams; /**< Structure for CAPWAP fragmentation,2221relevant if 'frag' = TRUE, 'hdr' = HEADER_TYPE_CAPWAP */2222t_CapwapReassemblyParams capwapReasmParams; /**< Structure for CAPWAP reassembly,2223relevant if 'frag' = FALSE, 'hdr' = HEADER_TYPE_CAPWAP */2224} u;2225} t_FmPcdManipFragOrReasmParams;2226#endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */222722282229/**************************************************************************//**2230@Description Parameters for defining header removal by header type2231*//***************************************************************************/2232typedef struct t_FmPcdManipHdrRmvByHdrParams {2233e_FmPcdManipHdrRmvByHdrType type; /**< Selection of header removal location */2234union {2235#if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))2236struct {2237bool include; /**< If FALSE, remove until the specified header (not including the header);2238If TRUE, remove also the specified header. */2239t_FmManipHdrInfo hdrInfo;2240} fromStartByHdr; /**< Relevant when type = e_FM_PCD_MANIP_RMV_BY_HDR_FROM_START */2241#endif /* (DPAA_VERSION >= 11) || ... */2242#if (DPAA_VERSION >= 11)2243t_FmManipHdrInfo hdrInfo; /**< Relevant when type = e_FM_PCD_MANIP_RMV_BY_HDR_FROM_START */2244#endif /* (DPAA_VERSION >= 11) */2245e_FmPcdManipHdrRmvSpecificL2 specificL2; /**< Relevant when type = e_FM_PCD_MANIP_BY_HDR_SPECIFIC_L2;2246Defines which L2 headers to remove. */2247} u;2248} t_FmPcdManipHdrRmvByHdrParams;22492250/**************************************************************************//**2251@Description Parameters for configuring IP fragmentation manipulation22522253Restrictions:2254- IP Fragmentation output fragments must not be forwarded to application directly.2255- Maximum number of fragments per frame is 16.2256- Fragmentation of IP fragments is not supported.2257- IPv4 packets containing header Option fields are fragmented by copying all option2258fields to each fragment, regardless of the copy bit value.2259- Transmit confirmation is not supported.2260- Fragmentation after SEC can't handle S/G frames.2261- Fragmentation nodes must be set as the last PCD action (i.e. the2262corresponding CC node key must have next engine set to e_FM_PCD_DONE).2263- Only BMan buffers shall be used for frames to be fragmented.2264- IPF does not support VSP. Therefore, on the same port where we have IPF2265we cannot support VSP.2266- NOTE: The following comment is relevant only for FMAN v3 devices: IPF2267does not support VSP. Therefore, on the same port where we have IPF we2268cannot support VSP.2269*//***************************************************************************/2270typedef struct t_FmPcdManipFragIpParams {2271uint16_t sizeForFragmentation; /**< If length of the frame is greater than this value,2272IP fragmentation will be executed.*/2273#if (DPAA_VERSION == 10)2274uint8_t scratchBpid; /**< Absolute buffer pool id according to BM configuration.*/2275#endif /* (DPAA_VERSION == 10) */2276bool sgBpidEn; /**< Enable a dedicated buffer pool id for the Scatter/Gather buffer allocation;2277If disabled, the Scatter/Gather buffer will be allocated from the same pool as the2278received frame's buffer. */2279uint8_t sgBpid; /**< Scatter/Gather buffer pool id;2280This parameters is relevant when 'sgBpidEn=TRUE';2281Same LIODN number is used for these buffers as for the received frames buffers, so buffers2282of this pool need to be allocated in the same memory area as the received buffers.2283If the received buffers arrive from different sources, the Scatter/Gather BP id should be2284mutual to all these sources. */2285e_FmPcdManipDontFragAction dontFragAction; /**< Don't Fragment Action - If an IP packet is larger2286than MTU and its DF bit is set, then this field will2287determine the action to be taken.*/2288} t_FmPcdManipFragIpParams;22892290/**************************************************************************//**2291@Description Parameters for configuring IP reassembly manipulation.22922293This is a common structure for both IPv4 and IPv6 reassembly2294manipulation. For reassembly of both IPv4 and IPv6, make sure to2295set the 'hdr' field in t_FmPcdManipReassemParams to HEADER_TYPE_IPv6.22962297Restrictions:2298- Application must define at least one scheme to catch the reassembled frames.2299- Maximum number of fragments per frame is 16.2300- Reassembly of IPv4 fragments containing Option fields is supported.23012302*//***************************************************************************/2303typedef struct t_FmPcdManipReassemIpParams {2304uint8_t relativeSchemeId[2]; /**< Partition relative scheme id:2305relativeSchemeId[0] - Relative scheme ID for IPV4 Reassembly manipulation;2306relativeSchemeId[1] - Relative scheme ID for IPV6 Reassembly manipulation;2307NOTE: The following comment is relevant only for FMAN v2 devices:2308Relative scheme ID for IPv4/IPv6 Reassembly manipulation must be smaller than2309the user schemes id to ensure that the reassembly schemes will be first match;2310Rest schemes, if defined, should have higher relative scheme ID. */2311#if (DPAA_VERSION >= 11)2312uint32_t nonConsistentSpFqid; /**< In case that other fragments of the frame corresponds to different storage2313profile than the opening fragment (Non-Consistent-SP state)2314then one of two possible scenarios occurs:2315if 'nonConsistentSpFqid != 0', the reassembled frame will be enqueued to2316this fqid, otherwise a 'Non Consistent SP' bit will be set in the FD[status].*/2317#else2318uint8_t sgBpid; /**< Buffer pool id for the S/G frame created by the reassembly process */2319#endif /* (DPAA_VERSION >= 11) */2320uint8_t dataMemId; /**< Memory partition ID for the IPR's external tables structure */2321uint16_t dataLiodnOffset; /**< LIODN offset for access the IPR's external tables structure. */2322uint16_t minFragSize[2]; /**< Minimum fragment size:2323minFragSize[0] - for ipv4, minFragSize[1] - for ipv6 */2324e_FmPcdManipReassemWaysNumber numOfFramesPerHashEntry[2];2325/**< Number of frames per hash entry needed for reassembly process:2326numOfFramesPerHashEntry[0] - for ipv4 (max value is e_FM_PCD_MANIP_EIGHT_WAYS_HASH);2327numOfFramesPerHashEntry[1] - for ipv6 (max value is e_FM_PCD_MANIP_SIX_WAYS_HASH). */2328uint16_t maxNumFramesInProcess; /**< Number of frames which can be processed by Reassembly in the same time;2329Must be power of 2;2330In the case numOfFramesPerHashEntry == e_FM_PCD_MANIP_FOUR_WAYS_HASH,2331maxNumFramesInProcess has to be in the range of 4 - 512;2332In the case numOfFramesPerHashEntry == e_FM_PCD_MANIP_EIGHT_WAYS_HASH,2333maxNumFramesInProcess has to be in the range of 8 - 2048. */2334e_FmPcdManipReassemTimeOutMode timeOutMode; /**< Expiration delay initialized by Reassembly process */2335uint32_t fqidForTimeOutFrames; /**< FQID in which time out frames will enqueue during Time Out Process;2336Recommended value for this field is 0; in this way timed-out frames will be discarded */2337uint32_t timeoutThresholdForReassmProcess;2338/**< Represents the time interval in microseconds which defines2339if opened frame (at least one fragment was processed but not all the fragments)is found as too old*/2340} t_FmPcdManipReassemIpParams;23412342/**************************************************************************//**2343@Description structure for defining IPSEC manipulation2344*//***************************************************************************/2345typedef struct t_FmPcdManipSpecialOffloadIPSecParams {2346bool decryption; /**< TRUE if being used in decryption direction;2347FALSE if being used in encryption direction. */2348bool ecnCopy; /**< TRUE to copy the ECN bits from inner/outer to outer/inner2349(direction depends on the 'decryption' field). */2350bool dscpCopy; /**< TRUE to copy the DSCP bits from inner/outer to outer/inner2351(direction depends on the 'decryption' field). */2352bool variableIpHdrLen; /**< TRUE for supporting variable IP header length in decryption. */2353bool variableIpVersion; /**< TRUE for supporting both IP version on the same SA in encryption */2354uint8_t outerIPHdrLen; /**< if 'variableIpVersion == TRUE' then this field must be set to non-zero value;2355It is specifies the length of the outer IP header that was configured in the2356corresponding SA. */2357uint16_t arwSize; /**< if <> '0' then will perform ARW check for this SA;2358The value must be a multiplication of 16 */2359uintptr_t arwAddr; /**< if arwSize <> '0' then this field must be set to non-zero value;2360MUST be allocated from FMAN's MURAM that the post-sec op-port belongs to;2361Must be 4B aligned. Required MURAM size is 'NEXT_POWER_OF_2(arwSize+32))/8+4' Bytes */2362} t_FmPcdManipSpecialOffloadIPSecParams;23632364#if (DPAA_VERSION >= 11)2365/**************************************************************************//**2366@Description Parameters for configuring CAPWAP fragmentation manipulation23672368Restrictions:2369- Maximum number of fragments per frame is 16.2370- Transmit confirmation is not supported.2371- Fragmentation nodes must be set as the last PCD action (i.e. the2372corresponding CC node key must have next engine set to e_FM_PCD_DONE).2373- Only BMan buffers shall be used for frames to be fragmented.2374- NOTE: The following comment is relevant only for FMAN v3 devices: IPF2375does not support VSP. Therefore, on the same port where we have IPF we2376cannot support VSP.2377*//***************************************************************************/2378typedef struct t_FmPcdManipFragCapwapParams {2379uint16_t sizeForFragmentation; /**< If length of the frame is greater than this value,2380CAPWAP fragmentation will be executed.*/2381bool sgBpidEn; /**< Enable a dedicated buffer pool id for the Scatter/Gather buffer allocation;2382If disabled, the Scatter/Gather buffer will be allocated from the same pool as the2383received frame's buffer. */2384uint8_t sgBpid; /**< Scatter/Gather buffer pool id;2385This parameters is relevant when 'sgBpidEn=TRUE';2386Same LIODN number is used for these buffers as for the received frames buffers, so buffers2387of this pool need to be allocated in the same memory area as the received buffers.2388If the received buffers arrive from different sources, the Scatter/Gather BP id should be2389mutual to all these sources. */2390bool compressModeEn; /**< CAPWAP Header Options Compress Enable mode;2391When this mode is enabled then only the first fragment include the CAPWAP header options2392field (if user provides it in the input frame) and all other fragments exclude the CAPWAP2393options field (CAPWAP header is updated accordingly).*/2394} t_FmPcdManipFragCapwapParams;23952396/**************************************************************************//**2397@Description Parameters for configuring CAPWAP reassembly manipulation.23982399Restrictions:2400- Application must define one scheme to catch the reassembled frames.2401- Maximum number of fragments per frame is 16.24022403*//***************************************************************************/2404typedef struct t_FmPcdManipReassemCapwapParams {2405uint8_t relativeSchemeId; /**< Partition relative scheme id;2406NOTE: this id must be smaller than the user schemes id to ensure that the reassembly scheme will be first match;2407Rest schemes, if defined, should have higher relative scheme ID. */2408uint8_t dataMemId; /**< Memory partition ID for the IPR's external tables structure */2409uint16_t dataLiodnOffset; /**< LIODN offset for access the IPR's external tables structure. */2410uint16_t maxReassembledFrameLength;/**< The maximum CAPWAP reassembled frame length in bytes;2411If maxReassembledFrameLength == 0, any successful reassembled frame length is2412considered as a valid length;2413if maxReassembledFrameLength > 0, a successful reassembled frame which its length2414exceeds this value is considered as an error frame (FD status[CRE] bit is set). */2415e_FmPcdManipReassemWaysNumber numOfFramesPerHashEntry;2416/**< Number of frames per hash entry needed for reassembly process */2417uint16_t maxNumFramesInProcess; /**< Number of frames which can be processed by reassembly in the same time;2418Must be power of 2;2419In the case numOfFramesPerHashEntry == e_FM_PCD_MANIP_FOUR_WAYS_HASH,2420maxNumFramesInProcess has to be in the range of 4 - 512;2421In the case numOfFramesPerHashEntry == e_FM_PCD_MANIP_EIGHT_WAYS_HASH,2422maxNumFramesInProcess has to be in the range of 8 - 2048. */2423e_FmPcdManipReassemTimeOutMode timeOutMode; /**< Expiration delay initialized by Reassembly process */2424uint32_t fqidForTimeOutFrames; /**< FQID in which time out frames will enqueue during Time Out Process;2425Recommended value for this field is 0; in this way timed-out frames will be discarded */2426uint32_t timeoutThresholdForReassmProcess;2427/**< Represents the time interval in microseconds which defines2428if opened frame (at least one fragment was processed but not all the fragments)is found as too old*/2429} t_FmPcdManipReassemCapwapParams;24302431/**************************************************************************//**2432@Description structure for defining CAPWAP manipulation2433*//***************************************************************************/2434typedef struct t_FmPcdManipSpecialOffloadCapwapParams {2435bool dtls; /**< TRUE if continue to SEC DTLS encryption */2436e_FmPcdManipHdrQosSrc qosSrc; /**< TODO */2437} t_FmPcdManipSpecialOffloadCapwapParams;24382439#endif /* (DPAA_VERSION >= 11) */244024412442/**************************************************************************//**2443@Description Parameters for defining special offload manipulation2444*//***************************************************************************/2445typedef struct t_FmPcdManipSpecialOffloadParams {2446e_FmPcdManipSpecialOffloadType type; /**< Type of special offload manipulation */2447union2448{2449t_FmPcdManipSpecialOffloadIPSecParams ipsec; /**< Parameters for IPSec; Relevant when2450type = e_FM_PCD_MANIP_SPECIAL_OFFLOAD_IPSEC */2451#if (DPAA_VERSION >= 11)2452t_FmPcdManipSpecialOffloadCapwapParams capwap; /**< Parameters for CAPWAP; Relevant when2453type = e_FM_PCD_MANIP_SPECIAL_OFFLOAD_CAPWAP */2454#endif /* (DPAA_VERSION >= 11) */2455} u;2456} t_FmPcdManipSpecialOffloadParams;24572458/**************************************************************************//**2459@Description Parameters for defining insertion manipulation2460*//***************************************************************************/2461typedef struct t_FmPcdManipHdrInsrt {2462uint8_t size; /**< size of inserted section */2463uint8_t *p_Data; /**< data to be inserted */2464} t_FmPcdManipHdrInsrt;246524662467/**************************************************************************//**2468@Description Parameters for defining generic removal manipulation2469*//***************************************************************************/2470typedef struct t_FmPcdManipHdrRmvGenericParams {2471uint8_t offset; /**< Offset from beginning of header to the start2472location of the removal */2473uint8_t size; /**< Size of removed section */2474} t_FmPcdManipHdrRmvGenericParams;24752476/**************************************************************************//**2477@Description Parameters for defining generic insertion manipulation2478*//***************************************************************************/2479typedef struct t_FmPcdManipHdrInsrtGenericParams {2480uint8_t offset; /**< Offset from beginning of header to the start2481location of the insertion */2482uint8_t size; /**< Size of inserted section */2483bool replace; /**< TRUE to override (replace) existing data at2484'offset', FALSE to insert */2485uint8_t *p_Data; /**< Pointer to data to be inserted */2486} t_FmPcdManipHdrInsrtGenericParams;24872488/**************************************************************************//**2489@Description Parameters for defining header manipulation VLAN DSCP To Vpri translation2490*//***************************************************************************/2491typedef struct t_FmPcdManipHdrFieldUpdateVlanDscpToVpri {2492uint8_t dscpToVpriTable[FM_PCD_MANIP_DSCP_TO_VLAN_TRANS];2493/**< A table of VPri values for each DSCP value;2494The index is the DSCP value (0-0x3F) and the2495value is the corresponding VPRI (0-15). */2496uint8_t vpriDefVal; /**< 0-7, Relevant only if if updateType =2497e_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN,2498this field is the Q Tag default value if the2499IP header is not found. */2500} t_FmPcdManipHdrFieldUpdateVlanDscpToVpri;25012502/**************************************************************************//**2503@Description Parameters for defining header manipulation VLAN fields updates2504*//***************************************************************************/2505typedef struct t_FmPcdManipHdrFieldUpdateVlan {2506e_FmPcdManipHdrFieldUpdateVlan updateType; /**< Selects VLAN update type */2507union {2508uint8_t vpri; /**< 0-7, Relevant only if If updateType =2509e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN_PRI, this2510is the new VLAN pri. */2511t_FmPcdManipHdrFieldUpdateVlanDscpToVpri dscpToVpri; /**< Parameters structure, Relevant only if updateType2512= e_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN. */2513} u;2514} t_FmPcdManipHdrFieldUpdateVlan;25152516/**************************************************************************//**2517@Description Parameters for defining header manipulation IPV4 fields updates2518*//***************************************************************************/2519typedef struct t_FmPcdManipHdrFieldUpdateIpv4 {2520ipv4HdrManipUpdateFlags_t validUpdates; /**< ORed flag, selecting the required updates */2521uint8_t tos; /**< 8 bit New TOS; Relevant if validUpdates contains2522HDR_MANIP_IPV4_TOS */2523uint16_t id; /**< 16 bit New IP ID; Relevant only if validUpdates2524contains HDR_MANIP_IPV4_ID */2525uint32_t src; /**< 32 bit New IP SRC; Relevant only if validUpdates2526contains HDR_MANIP_IPV4_SRC */2527uint32_t dst; /**< 32 bit New IP DST; Relevant only if validUpdates2528contains HDR_MANIP_IPV4_DST */2529} t_FmPcdManipHdrFieldUpdateIpv4;25302531/**************************************************************************//**2532@Description Parameters for defining header manipulation IPV6 fields updates2533*//***************************************************************************/2534typedef struct t_FmPcdManipHdrFieldUpdateIpv6 {2535ipv6HdrManipUpdateFlags_t validUpdates; /**< ORed flag, selecting the required updates */2536uint8_t trafficClass; /**< 8 bit New Traffic Class; Relevant if validUpdates contains2537HDR_MANIP_IPV6_TC */2538uint8_t src[NET_HEADER_FIELD_IPv6_ADDR_SIZE];2539/**< 16 byte new IP SRC; Relevant only if validUpdates2540contains HDR_MANIP_IPV6_SRC */2541uint8_t dst[NET_HEADER_FIELD_IPv6_ADDR_SIZE];2542/**< 16 byte new IP DST; Relevant only if validUpdates2543contains HDR_MANIP_IPV6_DST */2544} t_FmPcdManipHdrFieldUpdateIpv6;25452546/**************************************************************************//**2547@Description Parameters for defining header manipulation TCP/UDP fields updates2548*//***************************************************************************/2549typedef struct t_FmPcdManipHdrFieldUpdateTcpUdp {2550tcpUdpHdrManipUpdateFlags_t validUpdates; /**< ORed flag, selecting the required updates */2551uint16_t src; /**< 16 bit New TCP/UDP SRC; Relevant only if validUpdates2552contains HDR_MANIP_TCP_UDP_SRC */2553uint16_t dst; /**< 16 bit New TCP/UDP DST; Relevant only if validUpdates2554contains HDR_MANIP_TCP_UDP_DST */2555} t_FmPcdManipHdrFieldUpdateTcpUdp;25562557/**************************************************************************//**2558@Description Parameters for defining header manipulation fields updates2559*//***************************************************************************/2560typedef struct t_FmPcdManipHdrFieldUpdateParams {2561e_FmPcdManipHdrFieldUpdateType type; /**< Type of header field update manipulation */2562union {2563t_FmPcdManipHdrFieldUpdateVlan vlan; /**< Parameters for VLAN update. Relevant when2564type = e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN */2565t_FmPcdManipHdrFieldUpdateIpv4 ipv4; /**< Parameters for IPv4 update. Relevant when2566type = e_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV4 */2567t_FmPcdManipHdrFieldUpdateIpv6 ipv6; /**< Parameters for IPv6 update. Relevant when2568type = e_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV6 */2569t_FmPcdManipHdrFieldUpdateTcpUdp tcpUdp; /**< Parameters for TCP/UDP update. Relevant when2570type = e_FM_PCD_MANIP_HDR_FIELD_UPDATE_TCP_UDP */2571} u;2572} t_FmPcdManipHdrFieldUpdateParams;2573257425752576/**************************************************************************//**2577@Description Parameters for defining custom header manipulation for generic field replacement2578*//***************************************************************************/2579typedef struct t_FmPcdManipHdrCustomGenFieldReplace {2580uint8_t srcOffset; /**< Location of new data - Offset from2581Parse Result (>= 16, srcOffset+size <= 32, ) */2582uint8_t dstOffset; /**< Location of data to be overwritten - Offset from2583start of frame (dstOffset + size <= 256). */2584uint8_t size; /**< The number of bytes (<=16) to be replaced */2585uint8_t mask; /**< Optional 1 byte mask. Set to select bits for2586replacement (1 - bit will be replaced);2587Clear to use field as is. */2588uint8_t maskOffset; /**< Relevant if mask != 0;2589Mask offset within the replaces "size" */2590} t_FmPcdManipHdrCustomGenFieldReplace;25912592/**************************************************************************//**2593@Description Parameters for defining custom header manipulation for IP replacement2594*//***************************************************************************/2595typedef struct t_FmPcdManipHdrCustomIpHdrReplace {2596e_FmPcdManipHdrCustomIpReplace replaceType; /**< Selects replace update type */2597bool decTtlHl; /**< Decrement TTL (IPV4) or Hop limit (IPV6) by 1 */2598bool updateIpv4Id; /**< Relevant when replaceType =2599e_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV6_BY_IPV4 */2600uint16_t id; /**< 16 bit New IP ID; Relevant only if2601updateIpv4Id = TRUE */2602uint8_t hdrSize; /**< The size of the new IP header */2603uint8_t hdr[FM_PCD_MANIP_MAX_HDR_SIZE];2604/**< The new IP header */2605} t_FmPcdManipHdrCustomIpHdrReplace;26062607/**************************************************************************//**2608@Description Parameters for defining custom header manipulation2609*//***************************************************************************/2610typedef struct t_FmPcdManipHdrCustomParams {2611e_FmPcdManipHdrCustomType type; /**< Type of header field update manipulation */2612union {2613t_FmPcdManipHdrCustomIpHdrReplace ipHdrReplace; /**< Parameters IP header replacement */2614t_FmPcdManipHdrCustomGenFieldReplace genFieldReplace; /**< Parameters IP header replacement */2615} u;2616} t_FmPcdManipHdrCustomParams;26172618/**************************************************************************//**2619@Description Parameters for defining specific L2 insertion manipulation2620*//***************************************************************************/2621typedef struct t_FmPcdManipHdrInsrtSpecificL2Params {2622e_FmPcdManipHdrInsrtSpecificL2 specificL2; /**< Selects which L2 headers to insert */2623bool update; /**< TRUE to update MPLS header */2624uint8_t size; /**< size of inserted section */2625uint8_t *p_Data; /**< data to be inserted */2626} t_FmPcdManipHdrInsrtSpecificL2Params;26272628#if (DPAA_VERSION >= 11)2629/**************************************************************************//**2630@Description Parameters for defining IP insertion manipulation2631*//***************************************************************************/2632typedef struct t_FmPcdManipHdrInsrtIpParams {2633bool calcL4Checksum; /**< Calculate L4 checksum. */2634e_FmPcdManipHdrQosMappingMode mappingMode; /**< TODO */2635uint8_t lastPidOffset; /**< the offset of the last Protocol within2636the inserted header */2637uint16_t id; /**< 16 bit New IP ID */2638bool dontFragOverwrite;2639/**< IPv4 only. DF is overwritten with the hash-result next-to-last byte.2640* This byte is configured to be overwritten when RPD is set. */2641uint8_t lastDstOffset;2642/**< IPv6 only. if routing extension exist, user should set the offset of the destination address2643* in order to calculate UDP checksum pseudo header;2644* Otherwise set it to '0'. */2645t_FmPcdManipHdrInsrt insrt; /**< size and data to be inserted. */2646} t_FmPcdManipHdrInsrtIpParams;2647#endif /* (DPAA_VERSION >= 11) */26482649/**************************************************************************//**2650@Description Parameters for defining header insertion manipulation by header type2651*//***************************************************************************/2652typedef struct t_FmPcdManipHdrInsrtByHdrParams {2653e_FmPcdManipHdrInsrtByHdrType type; /**< Selects manipulation type */2654union {26552656t_FmPcdManipHdrInsrtSpecificL2Params specificL2Params;2657/**< Used when type = e_FM_PCD_MANIP_INSRT_BY_HDR_SPECIFIC_L2:2658Selects which L2 headers to insert */2659#if (DPAA_VERSION >= 11)2660t_FmPcdManipHdrInsrtIpParams ipParams; /**< Used when type = e_FM_PCD_MANIP_INSRT_BY_HDR_IP */2661t_FmPcdManipHdrInsrt insrt; /**< Used when type is one of e_FM_PCD_MANIP_INSRT_BY_HDR_UDP,2662e_FM_PCD_MANIP_INSRT_BY_HDR_UDP_LITE, or2663e_FM_PCD_MANIP_INSRT_BY_HDR_CAPWAP */2664#endif /* (DPAA_VERSION >= 11) */2665} u;2666} t_FmPcdManipHdrInsrtByHdrParams;26672668/**************************************************************************//**2669@Description Parameters for defining header insertion manipulation2670*//***************************************************************************/2671typedef struct t_FmPcdManipHdrInsrtParams {2672e_FmPcdManipHdrInsrtType type; /**< Type of insertion manipulation */2673union {2674t_FmPcdManipHdrInsrtByHdrParams byHdr; /**< Parameters for defining header insertion manipulation by header type,2675relevant if 'type' = e_FM_PCD_MANIP_INSRT_BY_HDR */2676t_FmPcdManipHdrInsrtGenericParams generic; /**< Parameters for defining generic header insertion manipulation,2677relevant if 'type' = e_FM_PCD_MANIP_INSRT_GENERIC */2678#if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))2679t_FmPcdManipHdrInsrtByTemplateParams byTemplate; /**< Parameters for defining header insertion manipulation by template,2680relevant if 'type' = e_FM_PCD_MANIP_INSRT_BY_TEMPLATE */2681#endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */2682} u;2683} t_FmPcdManipHdrInsrtParams;26842685/**************************************************************************//**2686@Description Parameters for defining header removal manipulation2687*//***************************************************************************/2688typedef struct t_FmPcdManipHdrRmvParams {2689e_FmPcdManipHdrRmvType type; /**< Type of header removal manipulation */2690union {2691t_FmPcdManipHdrRmvByHdrParams byHdr; /**< Parameters for defining header removal manipulation by header type,2692relevant if type = e_FM_PCD_MANIP_RMV_BY_HDR */2693t_FmPcdManipHdrRmvGenericParams generic; /**< Parameters for defining generic header removal manipulation,2694relevant if type = e_FM_PCD_MANIP_RMV_GENERIC */2695} u;2696} t_FmPcdManipHdrRmvParams;26972698/**************************************************************************//**2699@Description Parameters for defining header manipulation node2700*//***************************************************************************/2701typedef struct t_FmPcdManipHdrParams {2702bool rmv; /**< TRUE, to define removal manipulation */2703t_FmPcdManipHdrRmvParams rmvParams; /**< Parameters for removal manipulation, relevant if 'rmv' = TRUE */27042705bool insrt; /**< TRUE, to define insertion manipulation */2706t_FmPcdManipHdrInsrtParams insrtParams; /**< Parameters for insertion manipulation, relevant if 'insrt' = TRUE */27072708bool fieldUpdate; /**< TRUE, to define field update manipulation */2709t_FmPcdManipHdrFieldUpdateParams fieldUpdateParams; /**< Parameters for field update manipulation, relevant if 'fieldUpdate' = TRUE */27102711bool custom; /**< TRUE, to define custom manipulation */2712t_FmPcdManipHdrCustomParams customParams; /**< Parameters for custom manipulation, relevant if 'custom' = TRUE */27132714bool dontParseAfterManip;/**< TRUE to de-activate the parser after the manipulation defined in this node.2715Restrictions:27161. MUST be set if the next engine after the CC is not another CC node2717(but rather Policer or Keygen), and this is the last (no h_NextManip) in a chain2718of manipulation nodes. This includes single nodes (i.e. no h_NextManip and2719also never pointed as h_NextManip of other manipulation nodes)27202. MUST be set if the next engine after the CC is another CC node, and2721this is NOT the last manipulation node (i.e. it has h_NextManip).*/2722} t_FmPcdManipHdrParams;27232724/**************************************************************************//**2725@Description Parameters for defining fragmentation manipulation2726*//***************************************************************************/2727typedef struct t_FmPcdManipFragParams {2728e_NetHeaderType hdr; /**< Header selection */2729union {2730#if (DPAA_VERSION >= 11)2731t_FmPcdManipFragCapwapParams capwapFrag; /**< Parameters for defining CAPWAP fragmentation,2732relevant if 'hdr' = HEADER_TYPE_CAPWAP */2733#endif /* (DPAA_VERSION >= 11) */2734t_FmPcdManipFragIpParams ipFrag; /**< Parameters for defining IP fragmentation,2735relevant if 'hdr' = HEADER_TYPE_Ipv4 or HEADER_TYPE_Ipv6 */2736} u;2737} t_FmPcdManipFragParams;27382739/**************************************************************************//**2740@Description Parameters for defining reassembly manipulation2741*//***************************************************************************/2742typedef struct t_FmPcdManipReassemParams {2743e_NetHeaderType hdr; /**< Header selection */2744union {2745#if (DPAA_VERSION >= 11)2746t_FmPcdManipReassemCapwapParams capwapReassem; /**< Parameters for defining CAPWAP reassembly,2747relevant if 'hdr' = HEADER_TYPE_CAPWAP */2748#endif /* (DPAA_VERSION >= 11) */27492750t_FmPcdManipReassemIpParams ipReassem; /**< Parameters for defining IP reassembly,2751relevant if 'hdr' = HEADER_TYPE_Ipv4 or HEADER_TYPE_Ipv6 */2752} u;2753} t_FmPcdManipReassemParams;27542755/**************************************************************************//**2756@Description Parameters for defining a manipulation node2757*//***************************************************************************/2758typedef struct t_FmPcdManipParams {2759e_FmPcdManipType type; /**< Selects type of manipulation node */2760union{2761t_FmPcdManipHdrParams hdr; /**< Parameters for defining header manipulation node */2762t_FmPcdManipReassemParams reassem; /**< Parameters for defining reassembly manipulation node */2763t_FmPcdManipFragParams frag; /**< Parameters for defining fragmentation manipulation node */2764t_FmPcdManipSpecialOffloadParams specialOffload; /**< Parameters for defining special offload manipulation node */2765} u;27662767t_Handle h_NextManip; /**< Supported for Header Manipulation only;2768Handle to another (previously defined) manipulation node;2769Allows concatenation of manipulation actions;2770This parameter is optional and may be NULL. */2771#if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))2772bool fragOrReasm; /**< TRUE, if defined fragmentation/reassembly manipulation */2773t_FmPcdManipFragOrReasmParams fragOrReasmParams; /**< Parameters for fragmentation/reassembly manipulation,2774relevant if fragOrReasm = TRUE */2775#endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */2776} t_FmPcdManipParams;27772778/**************************************************************************//**2779@Description Structure for retrieving IP reassembly statistics2780*//***************************************************************************/2781typedef struct t_FmPcdManipReassemIpStats {2782/* common counters for both IPv4 and IPv6 */2783uint32_t timeout; /**< Counts the number of timeout occurrences */2784uint32_t rfdPoolBusy; /**< Counts the number of failed attempts to allocate2785a Reassembly Frame Descriptor */2786uint32_t internalBufferBusy; /**< Counts the number of times an internal buffer busy occurred */2787uint32_t externalBufferBusy; /**< Counts the number of times external buffer busy occurred */2788uint32_t sgFragments; /**< Counts the number of Scatter/Gather fragments */2789uint32_t dmaSemaphoreDepletion; /**< Counts the number of failed attempts to allocate a DMA semaphore */2790#if (DPAA_VERSION >= 11)2791uint32_t nonConsistentSp; /**< Counts the number of Non Consistent Storage Profile events for2792successfully reassembled frames */2793#endif /* (DPAA_VERSION >= 11) */2794struct {2795uint32_t successfullyReassembled; /**< Counts the number of successfully reassembled frames */2796uint32_t validFragments; /**< Counts the total number of valid fragments that2797have been processed for all frames */2798uint32_t processedFragments; /**< Counts the number of processed fragments2799(valid and error fragments) for all frames */2800uint32_t malformedFragments; /**< Counts the number of malformed fragments processed for all frames */2801uint32_t discardedFragments; /**< Counts the number of fragments discarded by the reassembly process */2802uint32_t autoLearnBusy; /**< Counts the number of times a busy condition occurs when attempting2803to access an IP-Reassembly Automatic Learning Hash set */2804uint32_t moreThan16Fragments; /**< Counts the fragment occurrences in which the number of fragments-per-frame2805exceeds 16 */2806} specificHdrStatistics[2]; /**< slot '0' is for IPv4, slot '1' is for IPv6 */2807} t_FmPcdManipReassemIpStats;28082809/**************************************************************************//**2810@Description Structure for retrieving IP fragmentation statistics2811*//***************************************************************************/2812typedef struct t_FmPcdManipFragIpStats {2813uint32_t totalFrames; /**< Number of frames that passed through the manipulation node */2814uint32_t fragmentedFrames; /**< Number of frames that were fragmented */2815uint32_t generatedFragments; /**< Number of fragments that were generated */2816} t_FmPcdManipFragIpStats;28172818#if (DPAA_VERSION >= 11)2819/**************************************************************************//**2820@Description Structure for retrieving CAPWAP reassembly statistics2821*//***************************************************************************/2822typedef struct t_FmPcdManipReassemCapwapStats {2823uint32_t timeout; /**< Counts the number of timeout occurrences */2824uint32_t rfdPoolBusy; /**< Counts the number of failed attempts to allocate2825a Reassembly Frame Descriptor */2826uint32_t internalBufferBusy; /**< Counts the number of times an internal buffer busy occurred */2827uint32_t externalBufferBusy; /**< Counts the number of times external buffer busy occurred */2828uint32_t sgFragments; /**< Counts the number of Scatter/Gather fragments */2829uint32_t dmaSemaphoreDepletion; /**< Counts the number of failed attempts to allocate a DMA semaphore */2830uint32_t successfullyReassembled; /**< Counts the number of successfully reassembled frames */2831uint32_t validFragments; /**< Counts the total number of valid fragments that2832have been processed for all frames */2833uint32_t processedFragments; /**< Counts the number of processed fragments2834(valid and error fragments) for all frames */2835uint32_t malformedFragments; /**< Counts the number of malformed fragments processed for all frames */2836uint32_t autoLearnBusy; /**< Counts the number of times a busy condition occurs when attempting2837to access an Reassembly Automatic Learning Hash set */2838uint32_t discardedFragments; /**< Counts the number of fragments discarded by the reassembly process */2839uint32_t moreThan16Fragments; /**< Counts the fragment occurrences in which the number of fragments-per-frame2840exceeds 16 */2841uint32_t exceedMaxReassemblyFrameLen;/**< ounts the number of times that a successful reassembled frame2842length exceeds MaxReassembledFrameLength value */2843} t_FmPcdManipReassemCapwapStats;28442845/**************************************************************************//**2846@Description Structure for retrieving CAPWAP fragmentation statistics2847*//***************************************************************************/2848typedef struct t_FmPcdManipFragCapwapStats {2849uint32_t totalFrames; /**< Number of frames that passed through the manipulation node */2850uint32_t fragmentedFrames; /**< Number of frames that were fragmented */2851uint32_t generatedFragments; /**< Number of fragments that were generated */2852#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))2853uint8_t sgAllocationFailure; /**< Number of allocation failure of s/g buffers */2854#endif /* (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0)) */2855} t_FmPcdManipFragCapwapStats;2856#endif /* (DPAA_VERSION >= 11) */28572858/**************************************************************************//**2859@Description Structure for retrieving reassembly statistics2860*//***************************************************************************/2861typedef struct t_FmPcdManipReassemStats {2862union {2863t_FmPcdManipReassemIpStats ipReassem; /**< Structure for IP reassembly statistics */2864#if (DPAA_VERSION >= 11)2865t_FmPcdManipReassemCapwapStats capwapReassem; /**< Structure for CAPWAP reassembly statistics */2866#endif /* (DPAA_VERSION >= 11) */2867} u;2868} t_FmPcdManipReassemStats;28692870/**************************************************************************//**2871@Description Structure for retrieving fragmentation statistics2872*//***************************************************************************/2873typedef struct t_FmPcdManipFragStats {2874union {2875t_FmPcdManipFragIpStats ipFrag; /**< Structure for IP fragmentation statistics */2876#if (DPAA_VERSION >= 11)2877t_FmPcdManipFragCapwapStats capwapFrag; /**< Structure for CAPWAP fragmentation statistics */2878#endif /* (DPAA_VERSION >= 11) */2879} u;2880} t_FmPcdManipFragStats;28812882/**************************************************************************//**2883@Description Structure for selecting manipulation statistics2884*//***************************************************************************/2885typedef struct t_FmPcdManipStats {2886union {2887t_FmPcdManipReassemStats reassem; /**< Structure for reassembly statistics */2888t_FmPcdManipFragStats frag; /**< Structure for fragmentation statistics */2889} u;2890} t_FmPcdManipStats;28912892#if (DPAA_VERSION >= 11)2893/**************************************************************************//**2894@Description Parameters for defining frame replicator group and its members2895*//***************************************************************************/2896typedef struct t_FmPcdFrmReplicGroupParams {2897uint8_t maxNumOfEntries; /**< Maximal number of members in the group;2898Must be at least 2. */2899uint8_t numOfEntries; /**< Number of members in the group;2900Must be at least 1. */2901t_FmPcdCcNextEngineParams nextEngineParams[FM_PCD_FRM_REPLIC_MAX_NUM_OF_ENTRIES];2902/**< Array of members' parameters */2903} t_FmPcdFrmReplicGroupParams;2904#endif /* (DPAA_VERSION >= 11) */29052906#if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))2907/**************************************************************************//**2908@Description structure for defining statistics node2909*//***************************************************************************/2910typedef struct t_FmPcdStatsParams {2911e_FmPcdStatsType type; /**< type of statistics node */2912} t_FmPcdStatsParams;2913#endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */29142915/**************************************************************************//**2916@Function FM_PCD_NetEnvCharacteristicsSet29172918@Description Define a set of Network Environment Characteristics.29192920When setting an environment it is important to understand its2921application. It is not meant to describe the flows that will run2922on the ports using this environment, but what the user means TO DO2923with the PCD mechanisms in order to parse-classify-distribute those2924frames.2925By specifying a distinction unit, the user means it would use that option2926for distinction between frames at either a KeyGen scheme or a coarse2927classification action descriptor. Using interchangeable headers to define a2928unit means that the user is indifferent to which of the interchangeable2929headers is present in the frame, and wants the distinction to be based2930on the presence of either one of them.29312932Depending on context, there are limitations to the use of environments. A2933port using the PCD functionality is bound to an environment. Some or even2934all ports may share an environment but also an environment per port is2935possible. When initializing a scheme, a classification plan group (see below),2936or a coarse classification tree, one of the initialized environments must be2937stated and related to. When a port is bound to a scheme, a classification2938plan group, or a coarse classification tree, it MUST be bound to the same2939environment.29402941The different PCD modules, may relate (for flows definition) ONLY on2942distinction units as defined by their environment. When initializing a2943scheme for example, it may not choose to select IPV4 as a match for2944recognizing flows unless it was defined in the relating environment. In2945fact, to guide the user through the configuration of the PCD, each module's2946characterization in terms of flows is not done using protocol names, but using2947environment indexes.29482949In terms of HW implementation, the list of distinction units sets the LCV vectors2950and later used for match vector, classification plan vectors and coarse classification2951indexing.29522953@Param[in] h_FmPcd FM PCD module descriptor.2954@Param[in] p_NetEnvParams A structure of parameters for the initialization of2955the network environment.29562957@Return A handle to the initialized object on success; NULL code otherwise.29582959@Cautions Allowed only following FM_PCD_Init().2960*//***************************************************************************/2961t_Handle FM_PCD_NetEnvCharacteristicsSet(t_Handle h_FmPcd, t_FmPcdNetEnvParams *p_NetEnvParams);29622963/**************************************************************************//**2964@Function FM_PCD_NetEnvCharacteristicsDelete29652966@Description Deletes a set of Network Environment Characteristics.29672968@Param[in] h_NetEnv A handle to the Network environment.29692970@Return E_OK on success; Error code otherwise.2971*//***************************************************************************/2972t_Error FM_PCD_NetEnvCharacteristicsDelete(t_Handle h_NetEnv);29732974/**************************************************************************//**2975@Function FM_PCD_KgSchemeSet29762977@Description Initializing or modifying and enabling a scheme for the KeyGen.2978This routine should be called for adding or modifying a scheme.2979When a scheme needs modifying, the API requires that it will be2980rewritten. In such a case 'modify' should be TRUE. If the2981routine is called for a valid scheme and 'modify' is FALSE,2982it will return error.29832984@Param[in] h_FmPcd If this is a new scheme - A handle to an FM PCD Module.2985Otherwise NULL (ignored by driver).2986@Param[in,out] p_SchemeParams A structure of parameters for defining the scheme29872988@Return A handle to the initialized scheme on success; NULL code otherwise.2989When used as "modify" (rather than for setting a new scheme),2990p_SchemeParams->id.h_Scheme will return NULL if action fails due to scheme2991BUSY state.29922993@Cautions Allowed only following FM_PCD_Init().2994*//***************************************************************************/2995t_Handle FM_PCD_KgSchemeSet(t_Handle h_FmPcd,2996t_FmPcdKgSchemeParams *p_SchemeParams);29972998/**************************************************************************//**2999@Function FM_PCD_KgSchemeDelete30003001@Description Deleting an initialized scheme.30023003@Param[in] h_Scheme scheme handle as returned by FM_PCD_KgSchemeSet()30043005@Return E_OK on success; Error code otherwise.30063007@Cautions Allowed only following FM_PCD_Init() & FM_PCD_KgSchemeSet().3008*//***************************************************************************/3009t_Error FM_PCD_KgSchemeDelete(t_Handle h_Scheme);30103011/**************************************************************************//**3012@Function FM_PCD_KgSchemeGetCounter30133014@Description Reads scheme packet counter.30153016@Param[in] h_Scheme scheme handle as returned by FM_PCD_KgSchemeSet().30173018@Return Counter's current value.30193020@Cautions Allowed only following FM_PCD_Init() & FM_PCD_KgSchemeSet().3021*//***************************************************************************/3022uint32_t FM_PCD_KgSchemeGetCounter(t_Handle h_Scheme);30233024/**************************************************************************//**3025@Function FM_PCD_KgSchemeSetCounter30263027@Description Writes scheme packet counter.30283029@Param[in] h_Scheme scheme handle as returned by FM_PCD_KgSchemeSet().3030@Param[in] value New scheme counter value - typically '0' for3031resetting the counter.30323033@Return E_OK on success; Error code otherwise.30343035@Cautions Allowed only following FM_PCD_Init() & FM_PCD_KgSchemeSet().3036*//***************************************************************************/3037t_Error FM_PCD_KgSchemeSetCounter(t_Handle h_Scheme, uint32_t value);30383039/**************************************************************************//**3040@Function FM_PCD_PlcrProfileSet30413042@Description Sets a profile entry in the policer profile table.3043The routine overrides any existing value.30443045@Param[in] h_FmPcd A handle to an FM PCD Module.3046@Param[in] p_Profile A structure of parameters for defining a3047policer profile entry.30483049@Return A handle to the initialized object on success; NULL code otherwise.3050When used as "modify" (rather than for setting a new profile),3051p_Profile->id.h_Profile will return NULL if action fails due to profile3052BUSY state.3053@Cautions Allowed only following FM_PCD_Init().3054*//***************************************************************************/3055t_Handle FM_PCD_PlcrProfileSet(t_Handle h_FmPcd,3056t_FmPcdPlcrProfileParams *p_Profile);30573058/**************************************************************************//**3059@Function FM_PCD_PlcrProfileDelete30603061@Description Delete a profile entry in the policer profile table.3062The routine set entry to invalid.30633064@Param[in] h_Profile A handle to the profile.30653066@Return E_OK on success; Error code otherwise.30673068@Cautions Allowed only following FM_PCD_Init().3069*//***************************************************************************/3070t_Error FM_PCD_PlcrProfileDelete(t_Handle h_Profile);30713072/**************************************************************************//**3073@Function FM_PCD_PlcrProfileGetCounter30743075@Description Sets an entry in the classification plan.3076The routine overrides any existing value.30773078@Param[in] h_Profile A handle to the profile.3079@Param[in] counter Counter selector.30803081@Return specific counter value.30823083@Cautions Allowed only following FM_PCD_Init().3084*//***************************************************************************/3085uint32_t FM_PCD_PlcrProfileGetCounter(t_Handle h_Profile,3086e_FmPcdPlcrProfileCounters counter);30873088/**************************************************************************//**3089@Function FM_PCD_PlcrProfileSetCounter30903091@Description Sets an entry in the classification plan.3092The routine overrides any existing value.30933094@Param[in] h_Profile A handle to the profile.3095@Param[in] counter Counter selector.3096@Param[in] value value to set counter with.30973098@Return E_OK on success; Error code otherwise.30993100@Cautions Allowed only following FM_PCD_Init().3101*//***************************************************************************/3102t_Error FM_PCD_PlcrProfileSetCounter(t_Handle h_Profile,3103e_FmPcdPlcrProfileCounters counter,3104uint32_t value);31053106/**************************************************************************//**3107@Function FM_PCD_CcRootBuild31083109@Description This routine must be called to define a complete coarse3110classification tree. This is the way to define coarse3111classification to a certain flow - the KeyGen schemes3112may point only to trees defined in this way.31133114@Param[in] h_FmPcd FM PCD module descriptor.3115@Param[in] p_Params A structure of parameters to define the tree.31163117@Return A handle to the initialized object on success; NULL code otherwise.31183119@Cautions Allowed only following FM_PCD_Init().3120*//***************************************************************************/3121t_Handle FM_PCD_CcRootBuild (t_Handle h_FmPcd,3122t_FmPcdCcTreeParams *p_Params);31233124/**************************************************************************//**3125@Function FM_PCD_CcRootDelete31263127@Description Deleting an built tree.31283129@Param[in] h_CcTree A handle to a CC tree.31303131@Return E_OK on success; Error code otherwise.31323133@Cautions Allowed only following FM_PCD_Init().3134*//***************************************************************************/3135t_Error FM_PCD_CcRootDelete(t_Handle h_CcTree);31363137/**************************************************************************//**3138@Function FM_PCD_CcRootModifyNextEngine31393140@Description Modify the Next Engine Parameters in the entry of the tree.31413142@Param[in] h_CcTree A handle to the tree3143@Param[in] grpId A Group index in the tree3144@Param[in] index Entry index in the group defined by grpId3145@Param[in] p_FmPcdCcNextEngineParams Pointer to new next engine parameters31463147@Return E_OK on success; Error code otherwise.31483149@Cautions Allowed only following FM_PCD_CcBuildTree().3150*//***************************************************************************/3151t_Error FM_PCD_CcRootModifyNextEngine(t_Handle h_CcTree,3152uint8_t grpId,3153uint8_t index,3154t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);31553156/**************************************************************************//**3157@Function FM_PCD_MatchTableSet31583159@Description This routine should be called for each CC (coarse classification)3160node. The whole CC tree should be built bottom up so that each3161node points to already defined nodes.31623163@Param[in] h_FmPcd FM PCD module descriptor.3164@Param[in] p_Param A structure of parameters defining the CC node31653166@Return A handle to the initialized object on success; NULL code otherwise.31673168@Cautions Allowed only following FM_PCD_Init().3169*//***************************************************************************/3170t_Handle FM_PCD_MatchTableSet(t_Handle h_FmPcd, t_FmPcdCcNodeParams *p_Param);31713172/**************************************************************************//**3173@Function FM_PCD_MatchTableDelete31743175@Description Deleting an built node.31763177@Param[in] h_CcNode A handle to a CC node.31783179@Return E_OK on success; Error code otherwise.31803181@Cautions Allowed only following FM_PCD_Init().3182*//***************************************************************************/3183t_Error FM_PCD_MatchTableDelete(t_Handle h_CcNode);31843185/**************************************************************************//**3186@Function FM_PCD_MatchTableModifyMissNextEngine31873188@Description Modify the Next Engine Parameters of the Miss key case of the node.31893190@Param[in] h_CcNode A handle to the node3191@Param[in] p_FmPcdCcNextEngineParams Parameters for defining next engine31923193@Return E_OK on success; Error code otherwise.31943195@Cautions Allowed only following FM_PCD_MatchTableSet();3196Not relevant in the case the node is of type 'INDEXED_LOOKUP'.3197When configuring nextEngine = e_FM_PCD_CC, note that3198p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different3199from the currently changed table.32003201*//***************************************************************************/3202t_Error FM_PCD_MatchTableModifyMissNextEngine(t_Handle h_CcNode,3203t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);32043205/**************************************************************************//**3206@Function FM_PCD_MatchTableRemoveKey32073208@Description Remove the key (including next engine parameters of this key)3209defined by the index of the relevant node.32103211@Param[in] h_CcNode A handle to the node3212@Param[in] keyIndex Key index for removing32133214@Return E_OK on success; Error code otherwise.32153216@Cautions Allowed only following FM_PCD_MatchTableSet() was called for this3217node and the nodes that lead to it.3218*//***************************************************************************/3219t_Error FM_PCD_MatchTableRemoveKey(t_Handle h_CcNode, uint16_t keyIndex);32203221/**************************************************************************//**3222@Function FM_PCD_MatchTableAddKey32233224@Description Add the key (including next engine parameters of this key in the3225index defined by the keyIndex. Note that 'FM_PCD_LAST_KEY_INDEX'3226may be used by user that don't care about the position of the3227key in the table - in that case, the key will be automatically3228added by the driver in the last available entry.32293230@Param[in] h_CcNode A handle to the node3231@Param[in] keyIndex Key index for adding.3232@Param[in] keySize Key size of added key3233@Param[in] p_KeyParams A pointer to the parameters includes3234new key with Next Engine Parameters32353236@Return E_OK on success; Error code otherwise.32373238@Cautions Allowed only following FM_PCD_MatchTableSet() was called for this3239node and the nodes that lead to it.3240*//***************************************************************************/3241t_Error FM_PCD_MatchTableAddKey(t_Handle h_CcNode,3242uint16_t keyIndex,3243uint8_t keySize,3244t_FmPcdCcKeyParams *p_KeyParams);32453246/**************************************************************************//**3247@Function FM_PCD_MatchTableModifyNextEngine32483249@Description Modify the Next Engine Parameters in the relevant key entry of the node.32503251@Param[in] h_CcNode A handle to the node3252@Param[in] keyIndex Key index for Next Engine modifications3253@Param[in] p_FmPcdCcNextEngineParams Parameters for defining next engine32543255@Return E_OK on success; Error code otherwise.32563257@Cautions Allowed only following FM_PCD_MatchTableSet().3258When configuring nextEngine = e_FM_PCD_CC, note that3259p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different3260from the currently changed table.32613262*//***************************************************************************/3263t_Error FM_PCD_MatchTableModifyNextEngine(t_Handle h_CcNode,3264uint16_t keyIndex,3265t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);32663267/**************************************************************************//**3268@Function FM_PCD_MatchTableModifyKeyAndNextEngine32693270@Description Modify the key and Next Engine Parameters of this key in the3271index defined by the keyIndex.32723273@Param[in] h_CcNode A handle to the node3274@Param[in] keyIndex Key index for adding3275@Param[in] keySize Key size of added key3276@Param[in] p_KeyParams A pointer to the parameters includes3277modified key and modified Next Engine Parameters32783279@Return E_OK on success; Error code otherwise.32803281@Cautions Allowed only following FM_PCD_MatchTableSet() was called for this3282node and the nodes that lead to it.3283When configuring nextEngine = e_FM_PCD_CC, note that3284p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different3285from the currently changed table.3286*//***************************************************************************/3287t_Error FM_PCD_MatchTableModifyKeyAndNextEngine(t_Handle h_CcNode,3288uint16_t keyIndex,3289uint8_t keySize,3290t_FmPcdCcKeyParams *p_KeyParams);32913292/**************************************************************************//**3293@Function FM_PCD_MatchTableModifyKey32943295@Description Modify the key in the index defined by the keyIndex.32963297@Param[in] h_CcNode A handle to the node3298@Param[in] keyIndex Key index for adding3299@Param[in] keySize Key size of added key3300@Param[in] p_Key A pointer to the new key3301@Param[in] p_Mask A pointer to the new mask if relevant,3302otherwise pointer to NULL33033304@Return E_OK on success; Error code otherwise.33053306@Cautions Allowed only following FM_PCD_MatchTableSet() was called for this3307node and the nodes that lead to it.3308*//***************************************************************************/3309t_Error FM_PCD_MatchTableModifyKey(t_Handle h_CcNode,3310uint16_t keyIndex,3311uint8_t keySize,3312uint8_t *p_Key,3313uint8_t *p_Mask);33143315/**************************************************************************//**3316@Function FM_PCD_MatchTableFindNRemoveKey33173318@Description Remove the key (including next engine parameters of this key)3319defined by the key and mask. Note that this routine will search3320the node to locate the index of the required key (& mask) to remove.33213322@Param[in] h_CcNode A handle to the node3323@Param[in] keySize Key size of the one to remove.3324@Param[in] p_Key A pointer to the requested key to remove.3325@Param[in] p_Mask A pointer to the mask if relevant,3326otherwise pointer to NULL33273328@Return E_OK on success; Error code otherwise.33293330@Cautions Allowed only following FM_PCD_MatchTableSet() was called for this3331node and the nodes that lead to it.3332*//***************************************************************************/3333t_Error FM_PCD_MatchTableFindNRemoveKey(t_Handle h_CcNode,3334uint8_t keySize,3335uint8_t *p_Key,3336uint8_t *p_Mask);33373338/**************************************************************************//**3339@Function FM_PCD_MatchTableFindNModifyNextEngine33403341@Description Modify the Next Engine Parameters in the relevant key entry of3342the node. Note that this routine will search the node to locate3343the index of the required key (& mask) to modify.33443345@Param[in] h_CcNode A handle to the node3346@Param[in] keySize Key size of the one to modify.3347@Param[in] p_Key A pointer to the requested key to modify.3348@Param[in] p_Mask A pointer to the mask if relevant,3349otherwise pointer to NULL3350@Param[in] p_FmPcdCcNextEngineParams Parameters for defining next engine33513352@Return E_OK on success; Error code otherwise.33533354@Cautions Allowed only following FM_PCD_MatchTableSet().3355When configuring nextEngine = e_FM_PCD_CC, note that3356p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different3357from the currently changed table.3358*//***************************************************************************/3359t_Error FM_PCD_MatchTableFindNModifyNextEngine(t_Handle h_CcNode,3360uint8_t keySize,3361uint8_t *p_Key,3362uint8_t *p_Mask,3363t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);33643365/**************************************************************************//**3366@Function FM_PCD_MatchTableFindNModifyKeyAndNextEngine33673368@Description Modify the key and Next Engine Parameters of this key in the3369index defined by the keyIndex. Note that this routine will search3370the node to locate the index of the required key (& mask) to modify.33713372@Param[in] h_CcNode A handle to the node3373@Param[in] keySize Key size of the one to modify.3374@Param[in] p_Key A pointer to the requested key to modify.3375@Param[in] p_Mask A pointer to the mask if relevant,3376otherwise pointer to NULL3377@Param[in] p_KeyParams A pointer to the parameters includes3378modified key and modified Next Engine Parameters33793380@Return E_OK on success; Error code otherwise.33813382@Cautions Allowed only following FM_PCD_MatchTableSet() was called for this3383node and the nodes that lead to it.3384When configuring nextEngine = e_FM_PCD_CC, note that3385p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different3386from the currently changed table.3387*//***************************************************************************/3388t_Error FM_PCD_MatchTableFindNModifyKeyAndNextEngine(t_Handle h_CcNode,3389uint8_t keySize,3390uint8_t *p_Key,3391uint8_t *p_Mask,3392t_FmPcdCcKeyParams *p_KeyParams);33933394/**************************************************************************//**3395@Function FM_PCD_MatchTableFindNModifyKey33963397@Description Modify the key in the index defined by the keyIndex. Note that3398this routine will search the node to locate the index of the3399required key (& mask) to modify.34003401@Param[in] h_CcNode A handle to the node3402@Param[in] keySize Key size of the one to modify.3403@Param[in] p_Key A pointer to the requested key to modify.3404@Param[in] p_Mask A pointer to the mask if relevant,3405otherwise pointer to NULL3406@Param[in] p_NewKey A pointer to the new key3407@Param[in] p_NewMask A pointer to the new mask if relevant,3408otherwise pointer to NULL34093410@Return E_OK on success; Error code otherwise.34113412@Cautions Allowed only following FM_PCD_MatchTableSet() was called for this3413node and the nodes that lead to it.3414*//***************************************************************************/3415t_Error FM_PCD_MatchTableFindNModifyKey(t_Handle h_CcNode,3416uint8_t keySize,3417uint8_t *p_Key,3418uint8_t *p_Mask,3419uint8_t *p_NewKey,3420uint8_t *p_NewMask);34213422/**************************************************************************//**3423@Function FM_PCD_MatchTableGetKeyCounter34243425@Description This routine may be used to get a counter of specific key in a CC3426Node; This counter reflects how many frames passed that were matched3427this key.34283429@Param[in] h_CcNode A handle to the node3430@Param[in] keyIndex Key index for adding34313432@Return The specific key counter.34333434@Cautions Allowed only following FM_PCD_MatchTableSet().3435*//***************************************************************************/3436uint32_t FM_PCD_MatchTableGetKeyCounter(t_Handle h_CcNode, uint16_t keyIndex);34373438/**************************************************************************//**3439@Function FM_PCD_MatchTableGetKeyStatistics34403441@Description This routine may be used to get statistics counters of specific key3442in a CC Node.34433444If 'e_FM_PCD_CC_STATS_MODE_FRAME' and3445'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,3446these counters reflect how many frames passed that were matched3447this key; The total frames count will be returned in the counter3448of the first range (as only one frame length range was defined).3449If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for this node, the total3450frame count will be separated to frame length counters, based on3451provided frame length ranges.34523453@Param[in] h_CcNode A handle to the node3454@Param[in] keyIndex Key index for adding3455@Param[out] p_KeyStatistics Key statistics counters34563457@Return The specific key statistics.34583459@Cautions Allowed only following FM_PCD_MatchTableSet().3460*//***************************************************************************/3461t_Error FM_PCD_MatchTableGetKeyStatistics(t_Handle h_CcNode,3462uint16_t keyIndex,3463t_FmPcdCcKeyStatistics *p_KeyStatistics);34643465/**************************************************************************//**3466@Function FM_PCD_MatchTableGetMissStatistics34673468@Description This routine may be used to get statistics counters of miss entry3469in a CC Node.34703471If 'e_FM_PCD_CC_STATS_MODE_FRAME' and3472'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,3473these counters reflect how many frames were not matched to any3474existing key and therefore passed through the miss entry; The3475total frames count will be returned in the counter of the3476first range (as only one frame length range was defined).34773478@Param[in] h_CcNode A handle to the node3479@Param[out] p_MissStatistics Statistics counters for 'miss'34803481@Return The statistics for 'miss'.34823483@Cautions Allowed only following FM_PCD_MatchTableSet().3484*//***************************************************************************/3485t_Error FM_PCD_MatchTableGetMissStatistics(t_Handle h_CcNode,3486t_FmPcdCcKeyStatistics *p_MissStatistics);34873488/**************************************************************************//**3489@Function FM_PCD_MatchTableFindNGetKeyStatistics34903491@Description This routine may be used to get statistics counters of specific key3492in a CC Node.34933494If 'e_FM_PCD_CC_STATS_MODE_FRAME' and3495'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,3496these counters reflect how many frames passed that were matched3497this key; The total frames count will be returned in the counter3498of the first range (as only one frame length range was defined).3499If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for this node, the total3500frame count will be separated to frame length counters, based on3501provided frame length ranges.3502Note that this routine will search the node to locate the index3503of the required key based on received key parameters.35043505@Param[in] h_CcNode A handle to the node3506@Param[in] keySize Size of the requested key3507@Param[in] p_Key A pointer to the requested key3508@Param[in] p_Mask A pointer to the mask if relevant,3509otherwise pointer to NULL3510@Param[out] p_KeyStatistics Key statistics counters35113512@Return The specific key statistics.35133514@Cautions Allowed only following FM_PCD_MatchTableSet().3515*//***************************************************************************/3516t_Error FM_PCD_MatchTableFindNGetKeyStatistics(t_Handle h_CcNode,3517uint8_t keySize,3518uint8_t *p_Key,3519uint8_t *p_Mask,3520t_FmPcdCcKeyStatistics *p_KeyStatistics);35213522/**************************************************************************//*3523@Function FM_PCD_MatchTableGetNextEngine35243525@Description Gets NextEngine of the relevant keyIndex.35263527@Param[in] h_CcNode A handle to the node.3528@Param[in] keyIndex keyIndex in the relevant node.3529@Param[out] p_FmPcdCcNextEngineParams here updated nextEngine parameters for3530the relevant keyIndex of the CC Node3531received as parameter to this function35323533@Return E_OK on success; Error code otherwise.35343535@Cautions Allowed only following FM_PCD_Init().3536*//***************************************************************************/3537t_Error FM_PCD_MatchTableGetNextEngine(t_Handle h_CcNode,3538uint16_t keyIndex,3539t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);35403541/**************************************************************************//*3542@Function FM_PCD_MatchTableGetIndexedHashBucket35433544@Description This routine simulates KeyGen operation on the provided key and3545calculates to which hash bucket it will be mapped.35463547@Param[in] h_CcNode A handle to the node.3548@Param[in] kgKeySize Key size as it was configured in the KG3549scheme that leads to this hash.3550@Param[in] p_KgKey Pointer to the key; must be like the key3551that the KG is generated, i.e. the same3552extraction and with mask if exist.3553@Param[in] kgHashShift Hash-shift as it was configured in the KG3554scheme that leads to this hash.3555@Param[out] p_CcNodeBucketHandle Pointer to the bucket of the provided key.3556@Param[out] p_BucketIndex Index to the bucket of the provided key3557@Param[out] p_LastIndex Pointer to last index in the bucket of the3558provided key.35593560@Return E_OK on success; Error code otherwise.35613562@Cautions Allowed only following FM_PCD_HashTableSet()3563*//***************************************************************************/3564t_Error FM_PCD_MatchTableGetIndexedHashBucket(t_Handle h_CcNode,3565uint8_t kgKeySize,3566uint8_t *p_KgKey,3567uint8_t kgHashShift,3568t_Handle *p_CcNodeBucketHandle,3569uint8_t *p_BucketIndex,3570uint16_t *p_LastIndex);35713572/**************************************************************************//**3573@Function FM_PCD_HashTableSet35743575@Description This routine initializes a hash table structure.3576KeyGen hash result determines the hash bucket.3577Next, KeyGen key is compared against all keys of this3578bucket (exact match).3579Number of sets (number of buckets) of the hash equals to the3580number of 1-s in 'hashResMask' in the provided parameters.3581Number of hash table ways is then calculated by dividing3582'maxNumOfKeys' equally between the hash sets. This is the maximal3583number of keys that a hash bucket may hold.3584The hash table is initialized empty and keys may be3585added to it following the initialization. Keys masks are not3586supported in current hash table implementation.3587The initialized hash table can be integrated as a node in a3588CC tree.35893590@Param[in] h_FmPcd FM PCD module descriptor.3591@Param[in] p_Param A structure of parameters defining the hash table35923593@Return A handle to the initialized object on success; NULL code otherwise.35943595@Cautions Allowed only following FM_PCD_Init().3596*//***************************************************************************/3597t_Handle FM_PCD_HashTableSet(t_Handle h_FmPcd, t_FmPcdHashTableParams *p_Param);35983599/**************************************************************************//**3600@Function FM_PCD_HashTableDelete36013602@Description This routine deletes the provided hash table and released all3603its allocated resources.36043605@Param[in] h_HashTbl A handle to a hash table36063607@Return E_OK on success; Error code otherwise.36083609@Cautions Allowed only following FM_PCD_HashTableSet().3610*//***************************************************************************/3611t_Error FM_PCD_HashTableDelete(t_Handle h_HashTbl);36123613/**************************************************************************//**3614@Function FM_PCD_HashTableAddKey36153616@Description This routine adds the provided key (including next engine3617parameters of this key) to the hash table.3618The key is added as the last key of the bucket that it is3619mapped to.36203621@Param[in] h_HashTbl A handle to a hash table3622@Param[in] keySize Key size of added key3623@Param[in] p_KeyParams A pointer to the parameters includes3624new key with next engine parameters; The pointer3625to the key mask must be NULL, as masks are not3626supported in hash table implementation.36273628@Return E_OK on success; Error code otherwise.36293630@Cautions Allowed only following FM_PCD_HashTableSet().3631*//***************************************************************************/3632t_Error FM_PCD_HashTableAddKey(t_Handle h_HashTbl,3633uint8_t keySize,3634t_FmPcdCcKeyParams *p_KeyParams);36353636/**************************************************************************//**3637@Function FM_PCD_HashTableRemoveKey36383639@Description This routine removes the requested key (including next engine3640parameters of this key) from the hash table.36413642@Param[in] h_HashTbl A handle to a hash table3643@Param[in] keySize Key size of the one to remove.3644@Param[in] p_Key A pointer to the requested key to remove.36453646@Return E_OK on success; Error code otherwise.36473648@Cautions Allowed only following FM_PCD_HashTableSet().3649*//***************************************************************************/3650t_Error FM_PCD_HashTableRemoveKey(t_Handle h_HashTbl,3651uint8_t keySize,3652uint8_t *p_Key);36533654/**************************************************************************//**3655@Function FM_PCD_HashTableModifyNextEngine36563657@Description This routine modifies the next engine for the provided key. The3658key should be previously added to the hash table.36593660@Param[in] h_HashTbl A handle to a hash table3661@Param[in] keySize Key size of the key to modify.3662@Param[in] p_Key A pointer to the requested key to modify.3663@Param[in] p_FmPcdCcNextEngineParams A structure for defining new next engine3664parameters.36653666@Return E_OK on success; Error code otherwise.36673668@Cautions Allowed only following FM_PCD_HashTableSet().3669When configuring nextEngine = e_FM_PCD_CC, note that3670p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different3671from the currently changed table.3672*//***************************************************************************/3673t_Error FM_PCD_HashTableModifyNextEngine(t_Handle h_HashTbl,3674uint8_t keySize,3675uint8_t *p_Key,3676t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);36773678/**************************************************************************//**3679@Function FM_PCD_HashTableModifyMissNextEngine36803681@Description This routine modifies the next engine on key match miss.36823683@Param[in] h_HashTbl A handle to a hash table3684@Param[in] p_FmPcdCcNextEngineParams A structure for defining new next engine3685parameters.36863687@Return E_OK on success; Error code otherwise.36883689@Cautions Allowed only following FM_PCD_HashTableSet().3690When configuring nextEngine = e_FM_PCD_CC, note that3691p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different3692from the currently changed table.3693*//***************************************************************************/3694t_Error FM_PCD_HashTableModifyMissNextEngine(t_Handle h_HashTbl,3695t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);36963697/**************************************************************************//*3698@Function FM_PCD_HashTableGetMissNextEngine36993700@Description Gets NextEngine in case of key match miss.37013702@Param[in] h_HashTbl A handle to a hash table3703@Param[out] p_FmPcdCcNextEngineParams Next engine parameters for the specified3704hash table.37053706@Return E_OK on success; Error code otherwise.37073708@Cautions Allowed only following FM_PCD_HashTableSet().3709*//***************************************************************************/3710t_Error FM_PCD_HashTableGetMissNextEngine(t_Handle h_HashTbl,3711t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);37123713/**************************************************************************//**3714@Function FM_PCD_HashTableFindNGetKeyStatistics37153716@Description This routine may be used to get statistics counters of specific key3717in a hash table.37183719If 'e_FM_PCD_CC_STATS_MODE_FRAME' and3720'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,3721these counters reflect how many frames passed that were matched3722this key; The total frames count will be returned in the counter3723of the first range (as only one frame length range was defined).3724If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for this node, the total3725frame count will be separated to frame length counters, based on3726provided frame length ranges.3727Note that this routine will identify the bucket of this key in3728the hash table and will search the bucket to locate the index3729of the required key based on received key parameters.37303731@Param[in] h_HashTbl A handle to a hash table3732@Param[in] keySize Size of the requested key3733@Param[in] p_Key A pointer to the requested key3734@Param[out] p_KeyStatistics Key statistics counters37353736@Return The specific key statistics.37373738@Cautions Allowed only following FM_PCD_HashTableSet().3739*//***************************************************************************/3740t_Error FM_PCD_HashTableFindNGetKeyStatistics(t_Handle h_HashTbl,3741uint8_t keySize,3742uint8_t *p_Key,3743t_FmPcdCcKeyStatistics *p_KeyStatistics);37443745/**************************************************************************//**3746@Function FM_PCD_HashTableGetMissStatistics37473748@Description This routine may be used to get statistics counters of 'miss'3749entry of the a hash table.37503751If 'e_FM_PCD_CC_STATS_MODE_FRAME' and3752'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,3753these counters reflect how many frames were not matched to any3754existing key and therefore passed through the miss entry;37553756@Param[in] h_HashTbl A handle to a hash table3757@Param[out] p_MissStatistics Statistics counters for 'miss'37583759@Return The statistics for 'miss'.37603761@Cautions Allowed only following FM_PCD_HashTableSet().3762*//***************************************************************************/3763t_Error FM_PCD_HashTableGetMissStatistics(t_Handle h_HashTbl,3764t_FmPcdCcKeyStatistics *p_MissStatistics);37653766/**************************************************************************//**3767@Function FM_PCD_ManipNodeSet37683769@Description This routine should be called for defining a manipulation3770node. A manipulation node must be defined before the CC node3771that precedes it.37723773@Param[in] h_FmPcd FM PCD module descriptor.3774@Param[in] p_FmPcdManipParams A structure of parameters defining the manipulation37753776@Return A handle to the initialized object on success; NULL code otherwise.37773778@Cautions Allowed only following FM_PCD_Init().3779*//***************************************************************************/3780t_Handle FM_PCD_ManipNodeSet(t_Handle h_FmPcd, t_FmPcdManipParams *p_FmPcdManipParams);37813782/**************************************************************************//**3783@Function FM_PCD_ManipNodeDelete37843785@Description Delete an existing manipulation node.37863787@Param[in] h_ManipNode A handle to a manipulation node.37883789@Return E_OK on success; Error code otherwise.37903791@Cautions Allowed only following FM_PCD_ManipNodeSet().3792*//***************************************************************************/3793t_Error FM_PCD_ManipNodeDelete(t_Handle h_ManipNode);37943795/**************************************************************************//**3796@Function FM_PCD_ManipGetStatistics37973798@Description Retrieve the manipulation statistics.37993800@Param[in] h_ManipNode A handle to a manipulation node.3801@Param[out] p_FmPcdManipStats A structure for retrieving the manipulation statistics38023803@Return E_OK on success; Error code otherwise.38043805@Cautions Allowed only following FM_PCD_ManipNodeSet().3806*//***************************************************************************/3807t_Error FM_PCD_ManipGetStatistics(t_Handle h_ManipNode, t_FmPcdManipStats *p_FmPcdManipStats);38083809/**************************************************************************//**3810@Function FM_PCD_ManipNodeReplace38113812@Description Change existing manipulation node to be according to new requirement.38133814@Param[in] h_ManipNode A handle to a manipulation node.3815@Param[out] p_ManipParams A structure of parameters defining the change requirement38163817@Return E_OK on success; Error code otherwise.38183819@Cautions Allowed only following FM_PCD_ManipNodeSet().3820*//***************************************************************************/3821t_Error FM_PCD_ManipNodeReplace(t_Handle h_ManipNode, t_FmPcdManipParams *p_ManipParams);38223823#if (DPAA_VERSION >= 11)3824/**************************************************************************//**3825@Function FM_PCD_FrmReplicSetGroup38263827@Description Initialize a Frame Replicator group.38283829@Param[in] h_FmPcd FM PCD module descriptor.3830@Param[in] p_FrmReplicGroupParam A structure of parameters for the initialization of3831the frame replicator group.38323833@Return A handle to the initialized object on success; NULL code otherwise.38343835@Cautions Allowed only following FM_PCD_Init().3836*//***************************************************************************/3837t_Handle FM_PCD_FrmReplicSetGroup(t_Handle h_FmPcd, t_FmPcdFrmReplicGroupParams *p_FrmReplicGroupParam);38383839/**************************************************************************//**3840@Function FM_PCD_FrmReplicDeleteGroup38413842@Description Delete a Frame Replicator group.38433844@Param[in] h_FrmReplicGroup A handle to the frame replicator group.38453846@Return E_OK on success; Error code otherwise.38473848@Cautions Allowed only following FM_PCD_FrmReplicSetGroup().3849*//***************************************************************************/3850t_Error FM_PCD_FrmReplicDeleteGroup(t_Handle h_FrmReplicGroup);38513852/**************************************************************************//**3853@Function FM_PCD_FrmReplicAddMember38543855@Description Add the member in the index defined by the memberIndex.38563857@Param[in] h_FrmReplicGroup A handle to the frame replicator group.3858@Param[in] memberIndex member index for adding.3859@Param[in] p_MemberParams A pointer to the new member parameters.38603861@Return E_OK on success; Error code otherwise.38623863@Cautions Allowed only following FM_PCD_FrmReplicSetGroup() of this group.3864*//***************************************************************************/3865t_Error FM_PCD_FrmReplicAddMember(t_Handle h_FrmReplicGroup,3866uint16_t memberIndex,3867t_FmPcdCcNextEngineParams *p_MemberParams);38683869/**************************************************************************//**3870@Function FM_PCD_FrmReplicRemoveMember38713872@Description Remove the member defined by the index from the relevant group.38733874@Param[in] h_FrmReplicGroup A handle to the frame replicator group.3875@Param[in] memberIndex member index for removing.38763877@Return E_OK on success; Error code otherwise.38783879@Cautions Allowed only following FM_PCD_FrmReplicSetGroup() of this group.3880*//***************************************************************************/3881t_Error FM_PCD_FrmReplicRemoveMember(t_Handle h_FrmReplicGroup,3882uint16_t memberIndex);3883#endif /* (DPAA_VERSION >= 11) */38843885#if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))3886/**************************************************************************//**3887@Function FM_PCD_StatisticsSetNode38883889@Description This routine should be called for defining a statistics node.38903891@Param[in] h_FmPcd FM PCD module descriptor.3892@Param[in] p_FmPcdstatsParams A structure of parameters defining the statistics38933894@Return A handle to the initialized object on success; NULL code otherwise.38953896@Cautions Allowed only following FM_PCD_Init().3897*//***************************************************************************/3898t_Handle FM_PCD_StatisticsSetNode(t_Handle h_FmPcd, t_FmPcdStatsParams *p_FmPcdstatsParams);3899#endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */39003901/** @} */ /* end of FM_PCD_Runtime_build_grp group */3902/** @} */ /* end of FM_PCD_Runtime_grp group */3903/** @} */ /* end of FM_PCD_grp group */3904/** @} */ /* end of FM_grp group */390539063907#ifdef NCSW_BACKWARD_COMPATIBLE_API3908#define FM_PCD_MAX_NUM_OF_INTERCHANGABLE_HDRS FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS3909#define e_FM_PCD_MANIP_ONE_WAYS_HASH e_FM_PCD_MANIP_ONE_WAY_HASH3910#define e_FM_PCD_MANIP_TOW_WAYS_HASH e_FM_PCD_MANIP_TWO_WAYS_HASH39113912#define e_FM_PCD_MANIP_FRAGMENT_PACKECT e_FM_PCD_MANIP_FRAGMENT_PACKET /* Feb13 */39133914#define FM_PCD_SetNetEnvCharacteristics(_pcd, _params) \3915FM_PCD_NetEnvCharacteristicsSet(_pcd, _params)3916#define FM_PCD_KgSetScheme(_pcd, _params) FM_PCD_KgSchemeSet(_pcd, _params)3917#define FM_PCD_CcBuildTree(_pcd, _params) FM_PCD_CcRootBuild(_pcd, _params)3918#define FM_PCD_CcSetNode(_pcd, _params) FM_PCD_MatchTableSet(_pcd, _params)3919#define FM_PCD_PlcrSetProfile(_pcd, _params) FM_PCD_PlcrProfileSet(_pcd, _params)3920#define FM_PCD_ManipSetNode(_pcd, _params) FM_PCD_ManipNodeSet(_pcd, _params)39213922#define FM_PCD_DeleteNetEnvCharacteristics(_pcd, ...) \3923FM_PCD_NetEnvCharacteristicsDelete(__VA_ARGS__)3924#define FM_PCD_KgDeleteScheme(_pcd, ...) \3925FM_PCD_KgSchemeDelete(__VA_ARGS__)3926#define FM_PCD_KgGetSchemeCounter(_pcd, ...) \3927FM_PCD_KgSchemeGetCounter(__VA_ARGS__)3928#define FM_PCD_KgSetSchemeCounter(_pcd, ...) \3929FM_PCD_KgSchemeSetCounter(__VA_ARGS__)3930#define FM_PCD_PlcrDeleteProfile(_pcd, ...) \3931FM_PCD_PlcrProfileDelete(__VA_ARGS__)3932#define FM_PCD_PlcrGetProfileCounter(_pcd, ...) \3933FM_PCD_PlcrProfileGetCounter(__VA_ARGS__)3934#define FM_PCD_PlcrSetProfileCounter(_pcd, ...) \3935FM_PCD_PlcrProfileSetCounter(__VA_ARGS__)3936#define FM_PCD_CcDeleteTree(_pcd, ...) \3937FM_PCD_CcRootDelete(__VA_ARGS__)3938#define FM_PCD_CcTreeModifyNextEngine(_pcd, ...) \3939FM_PCD_CcRootModifyNextEngine(__VA_ARGS__)3940#define FM_PCD_CcDeleteNode(_pcd, ...) \3941FM_PCD_MatchTableDelete(__VA_ARGS__)3942#define FM_PCD_CcNodeModifyMissNextEngine(_pcd, ...) \3943FM_PCD_MatchTableModifyMissNextEngine(__VA_ARGS__)3944#define FM_PCD_CcNodeRemoveKey(_pcd, ...) \3945FM_PCD_MatchTableRemoveKey(__VA_ARGS__)3946#define FM_PCD_CcNodeAddKey(_pcd, ...) \3947FM_PCD_MatchTableAddKey(__VA_ARGS__)3948#define FM_PCD_CcNodeModifyNextEngine(_pcd, ...) \3949FM_PCD_MatchTableModifyNextEngine(__VA_ARGS__)3950#define FM_PCD_CcNodeModifyKeyAndNextEngine(_pcd, ...) \3951FM_PCD_MatchTableModifyKeyAndNextEngine(__VA_ARGS__)3952#define FM_PCD_CcNodeModifyKey(_pcd, ...) \3953FM_PCD_MatchTableModifyKey(__VA_ARGS__)3954#define FM_PCD_CcNodeFindNRemoveKey(_pcd, ...) \3955FM_PCD_MatchTableFindNRemoveKey(__VA_ARGS__)3956#define FM_PCD_CcNodeFindNModifyNextEngine(_pcd, ...) \3957FM_PCD_MatchTableFindNModifyNextEngine(__VA_ARGS__)3958#define FM_PCD_CcNodeFindNModifyKeyAndNextEngine(_pcd, ...) \3959FM_PCD_MatchTableFindNModifyKeyAndNextEngine(__VA_ARGS__)3960#define FM_PCD_CcNodeFindNModifyKey(_pcd, ...) \3961FM_PCD_MatchTableFindNModifyKey(__VA_ARGS__)3962#define FM_PCD_CcIndexedHashNodeGetBucket(_pcd, ...) \3963FM_PCD_MatchTableGetIndexedHashBucket(__VA_ARGS__)3964#define FM_PCD_CcNodeGetNextEngine(_pcd, ...) \3965FM_PCD_MatchTableGetNextEngine(__VA_ARGS__)3966#define FM_PCD_CcNodeGetKeyCounter(_pcd, ...) \3967FM_PCD_MatchTableGetKeyCounter(__VA_ARGS__)3968#define FM_PCD_ManipDeleteNode(_pcd, ...) \3969FM_PCD_ManipNodeDelete(__VA_ARGS__)3970#endif /* NCSW_BACKWARD_COMPATIBLE_API */397139723973#endif /* __FM_PCD_EXT */397439753976