xref: /freebsd/sys/contrib/ncsw/inc/Peripherals/fm_pcd_ext.h (revision c2c014f24c10f90d85126ac5fbd4d8524de32b1c)
1*852ba100SJustin Hibbits /* Copyright (c) 2008-2012 Freescale Semiconductor, Inc
20aeed3e9SJustin Hibbits  * All rights reserved.
30aeed3e9SJustin Hibbits  *
40aeed3e9SJustin Hibbits  * Redistribution and use in source and binary forms, with or without
50aeed3e9SJustin Hibbits  * modification, are permitted provided that the following conditions are met:
60aeed3e9SJustin Hibbits  *     * Redistributions of source code must retain the above copyright
70aeed3e9SJustin Hibbits  *       notice, this list of conditions and the following disclaimer.
80aeed3e9SJustin Hibbits  *     * Redistributions in binary form must reproduce the above copyright
90aeed3e9SJustin Hibbits  *       notice, this list of conditions and the following disclaimer in the
100aeed3e9SJustin Hibbits  *       documentation and/or other materials provided with the distribution.
110aeed3e9SJustin Hibbits  *     * Neither the name of Freescale Semiconductor nor the
120aeed3e9SJustin Hibbits  *       names of its contributors may be used to endorse or promote products
130aeed3e9SJustin Hibbits  *       derived from this software without specific prior written permission.
140aeed3e9SJustin Hibbits  *
150aeed3e9SJustin Hibbits  *
160aeed3e9SJustin Hibbits  * ALTERNATIVELY, this software may be distributed under the terms of the
170aeed3e9SJustin Hibbits  * GNU General Public License ("GPL") as published by the Free Software
180aeed3e9SJustin Hibbits  * Foundation, either version 2 of that License or (at your option) any
190aeed3e9SJustin Hibbits  * later version.
200aeed3e9SJustin Hibbits  *
210aeed3e9SJustin Hibbits  * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
220aeed3e9SJustin Hibbits  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
230aeed3e9SJustin Hibbits  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
240aeed3e9SJustin Hibbits  * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
250aeed3e9SJustin Hibbits  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
260aeed3e9SJustin Hibbits  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
270aeed3e9SJustin Hibbits  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
280aeed3e9SJustin Hibbits  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
290aeed3e9SJustin Hibbits  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
300aeed3e9SJustin Hibbits  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
310aeed3e9SJustin Hibbits  */
320aeed3e9SJustin Hibbits 
33*852ba100SJustin Hibbits 
340aeed3e9SJustin Hibbits /**************************************************************************//**
350aeed3e9SJustin Hibbits  @File          fm_pcd_ext.h
360aeed3e9SJustin Hibbits 
37*852ba100SJustin Hibbits  @Description   FM PCD API definitions
380aeed3e9SJustin Hibbits *//***************************************************************************/
390aeed3e9SJustin Hibbits #ifndef __FM_PCD_EXT
400aeed3e9SJustin Hibbits #define __FM_PCD_EXT
410aeed3e9SJustin Hibbits 
420aeed3e9SJustin Hibbits #include "std_ext.h"
430aeed3e9SJustin Hibbits #include "net_ext.h"
440aeed3e9SJustin Hibbits #include "list_ext.h"
450aeed3e9SJustin Hibbits #include "fm_ext.h"
46*852ba100SJustin Hibbits #include "fsl_fman_kg.h"
470aeed3e9SJustin Hibbits 
480aeed3e9SJustin Hibbits 
490aeed3e9SJustin Hibbits /**************************************************************************//**
500aeed3e9SJustin Hibbits  @Group         FM_grp Frame Manager API
510aeed3e9SJustin Hibbits 
52*852ba100SJustin Hibbits  @Description   Frame Manager Application Programming Interface
530aeed3e9SJustin Hibbits 
540aeed3e9SJustin Hibbits  @{
550aeed3e9SJustin Hibbits *//***************************************************************************/
560aeed3e9SJustin Hibbits 
570aeed3e9SJustin Hibbits /**************************************************************************//**
580aeed3e9SJustin Hibbits  @Group         FM_PCD_grp FM PCD
590aeed3e9SJustin Hibbits 
60*852ba100SJustin Hibbits  @Description   Frame Manager PCD (Parse-Classify-Distribute) API.
610aeed3e9SJustin Hibbits 
620aeed3e9SJustin Hibbits                 The FM PCD module is responsible for the initialization of all
630aeed3e9SJustin Hibbits                 global classifying FM modules. This includes the parser general and
640aeed3e9SJustin Hibbits                 common registers, the key generator global and common registers,
65*852ba100SJustin Hibbits                 and the policer global and common registers.
660aeed3e9SJustin Hibbits                 In addition, the FM PCD SW module will initialize all required
67*852ba100SJustin Hibbits                 key generator schemes, coarse classification flows, and policer
68*852ba100SJustin Hibbits                 profiles. When FM module is configured to work with one of these
690aeed3e9SJustin Hibbits                 entities, it will register to it using the FM PORT API. The PCD
700aeed3e9SJustin Hibbits                 module will manage the PCD resources - i.e. resource management of
71*852ba100SJustin Hibbits                 KeyGen schemes, etc.
720aeed3e9SJustin Hibbits 
730aeed3e9SJustin Hibbits  @{
740aeed3e9SJustin Hibbits *//***************************************************************************/
750aeed3e9SJustin Hibbits 
760aeed3e9SJustin Hibbits /**************************************************************************//**
770aeed3e9SJustin Hibbits  @Collection    General PCD defines
780aeed3e9SJustin Hibbits *//***************************************************************************/
790aeed3e9SJustin Hibbits #define FM_PCD_MAX_NUM_OF_PRIVATE_HDRS              2                   /**< Number of units/headers saved for user */
800aeed3e9SJustin Hibbits 
810aeed3e9SJustin Hibbits #define FM_PCD_PRS_NUM_OF_HDRS                      16                  /**< Number of headers supported by HW parser */
820aeed3e9SJustin Hibbits #define FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS         (32 - FM_PCD_MAX_NUM_OF_PRIVATE_HDRS)
83*852ba100SJustin Hibbits                                                                         /**< Number of distinction units is limited by
84*852ba100SJustin Hibbits                                                                              register size (32 bits) minus reserved bits
85*852ba100SJustin Hibbits                                                                              for private headers. */
86*852ba100SJustin Hibbits #define FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS      4                   /**< Maximum number of interchangeable headers
87*852ba100SJustin Hibbits                                                                              in a distinction unit */
88*852ba100SJustin Hibbits #define FM_PCD_KG_NUM_OF_GENERIC_REGS               FM_KG_NUM_OF_GENERIC_REGS /**< Total number of generic KeyGen registers */
89*852ba100SJustin Hibbits #define FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY       35                  /**< Max number allowed on any configuration;
90*852ba100SJustin Hibbits                                                                              For HW implementation reasons, in most
91*852ba100SJustin Hibbits                                                                              cases less than this will be allowed; The
92*852ba100SJustin Hibbits                                                                              driver will return an initialization error
93*852ba100SJustin Hibbits                                                                              if resource is unavailable. */
94*852ba100SJustin Hibbits #define FM_PCD_KG_NUM_OF_EXTRACT_MASKS              4                   /**< Total number of masks allowed on KeyGen extractions. */
950aeed3e9SJustin Hibbits #define FM_PCD_KG_NUM_OF_DEFAULT_GROUPS             16                  /**< Number of default value logical groups */
960aeed3e9SJustin Hibbits 
97*852ba100SJustin Hibbits #define FM_PCD_PRS_NUM_OF_LABELS                    32                  /**< Maximum number of SW parser labels */
98*852ba100SJustin Hibbits #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)
99*852ba100SJustin Hibbits                                                                         /**< Maximum size of SW parser code */
1000aeed3e9SJustin Hibbits 
101*852ba100SJustin Hibbits #define FM_PCD_MAX_MANIP_INSRT_TEMPLATE_SIZE        128                 /**< Maximum size of insertion template for
1020aeed3e9SJustin Hibbits                                                                              insert manipulation */
103*852ba100SJustin Hibbits 
104*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
105*852ba100SJustin Hibbits #define FM_PCD_FRM_REPLIC_MAX_NUM_OF_ENTRIES        64                  /**< Maximum possible entries for frame replicator group */
106*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
1070aeed3e9SJustin Hibbits /* @} */
1080aeed3e9SJustin Hibbits 
1090aeed3e9SJustin Hibbits 
1100aeed3e9SJustin Hibbits /**************************************************************************//**
1110aeed3e9SJustin Hibbits  @Group         FM_PCD_init_grp FM PCD Initialization Unit
1120aeed3e9SJustin Hibbits 
113*852ba100SJustin Hibbits  @Description   Frame Manager PCD Initialization Unit API
1140aeed3e9SJustin Hibbits 
1150aeed3e9SJustin Hibbits  @{
1160aeed3e9SJustin Hibbits *//***************************************************************************/
1170aeed3e9SJustin Hibbits 
1180aeed3e9SJustin Hibbits /**************************************************************************//**
1190aeed3e9SJustin Hibbits  @Description   PCD counters
1200aeed3e9SJustin Hibbits *//***************************************************************************/
1210aeed3e9SJustin Hibbits typedef enum e_FmPcdCounters {
122*852ba100SJustin Hibbits     e_FM_PCD_KG_COUNTERS_TOTAL,                                 /**< KeyGen counter */
123*852ba100SJustin Hibbits     e_FM_PCD_PLCR_COUNTERS_RED,                                 /**< Policer counter - counts the total number of RED packets that exit the Policer. */
124*852ba100SJustin Hibbits     e_FM_PCD_PLCR_COUNTERS_YELLOW,                              /**< Policer counter - counts the total number of YELLOW packets that exit the Policer. */
125*852ba100SJustin Hibbits     e_FM_PCD_PLCR_COUNTERS_RECOLORED_TO_RED,                    /**< Policer counter - counts the number of packets that changed color to RED by the Policer;
126*852ba100SJustin Hibbits                                                                      This is a subset of e_FM_PCD_PLCR_COUNTERS_RED packet count, indicating active color changes. */
127*852ba100SJustin Hibbits     e_FM_PCD_PLCR_COUNTERS_RECOLORED_TO_YELLOW,                 /**< Policer counter - counts the number of packets that changed color to YELLOW by the Policer;
128*852ba100SJustin Hibbits                                                                      This is a subset of e_FM_PCD_PLCR_COUNTERS_YELLOW packet count, indicating active color changes. */
129*852ba100SJustin Hibbits     e_FM_PCD_PLCR_COUNTERS_TOTAL,                               /**< Policer counter - counts the total number of packets passed in the Policer. */
130*852ba100SJustin Hibbits     e_FM_PCD_PLCR_COUNTERS_LENGTH_MISMATCH,                     /**< Policer counter - counts the number of packets with length mismatch. */
131*852ba100SJustin Hibbits     e_FM_PCD_PRS_COUNTERS_PARSE_DISPATCH,                       /**< Parser counter - counts the number of times the parser block is dispatched. */
132*852ba100SJustin Hibbits     e_FM_PCD_PRS_COUNTERS_L2_PARSE_RESULT_RETURNED,             /**< Parser counter - counts the number of times L2 parse result is returned (including errors). */
133*852ba100SJustin Hibbits     e_FM_PCD_PRS_COUNTERS_L3_PARSE_RESULT_RETURNED,             /**< Parser counter - counts the number of times L3 parse result is returned (including errors). */
134*852ba100SJustin Hibbits     e_FM_PCD_PRS_COUNTERS_L4_PARSE_RESULT_RETURNED,             /**< Parser counter - counts the number of times L4 parse result is returned (including errors). */
135*852ba100SJustin Hibbits     e_FM_PCD_PRS_COUNTERS_SHIM_PARSE_RESULT_RETURNED,           /**< Parser counter - counts the number of times SHIM parse result is returned (including errors). */
136*852ba100SJustin Hibbits     e_FM_PCD_PRS_COUNTERS_L2_PARSE_RESULT_RETURNED_WITH_ERR,    /**< Parser counter - counts the number of times L2 parse result is returned with errors. */
137*852ba100SJustin Hibbits     e_FM_PCD_PRS_COUNTERS_L3_PARSE_RESULT_RETURNED_WITH_ERR,    /**< Parser counter - counts the number of times L3 parse result is returned with errors. */
138*852ba100SJustin Hibbits     e_FM_PCD_PRS_COUNTERS_L4_PARSE_RESULT_RETURNED_WITH_ERR,    /**< Parser counter - counts the number of times L4 parse result is returned with errors. */
139*852ba100SJustin Hibbits     e_FM_PCD_PRS_COUNTERS_SHIM_PARSE_RESULT_RETURNED_WITH_ERR,  /**< Parser counter - counts the number of times SHIM parse result is returned with errors. */
140*852ba100SJustin Hibbits     e_FM_PCD_PRS_COUNTERS_SOFT_PRS_CYCLES,                      /**< Parser counter - counts the number of cycles spent executing soft parser instruction (including stall cycles). */
141*852ba100SJustin Hibbits     e_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. */
142*852ba100SJustin Hibbits     e_FM_PCD_PRS_COUNTERS_HARD_PRS_CYCLE_INCL_STALL_CYCLES,     /**< Parser counter - counts the number of cycles spent executing hard parser (including stall cycles). */
143*852ba100SJustin Hibbits     e_FM_PCD_PRS_COUNTERS_MURAM_READ_CYCLES,                    /**< MURAM counter - counts the number of cycles while performing FMan Memory read. */
144*852ba100SJustin Hibbits     e_FM_PCD_PRS_COUNTERS_MURAM_READ_STALL_CYCLES,              /**< MURAM counter - counts the number of cycles stalled while performing FMan Memory read. */
145*852ba100SJustin Hibbits     e_FM_PCD_PRS_COUNTERS_MURAM_WRITE_CYCLES,                   /**< MURAM counter - counts the number of cycles while performing FMan Memory write. */
146*852ba100SJustin Hibbits     e_FM_PCD_PRS_COUNTERS_MURAM_WRITE_STALL_CYCLES,             /**< MURAM counter - counts the number of cycles stalled while performing FMan Memory write. */
147*852ba100SJustin Hibbits     e_FM_PCD_PRS_COUNTERS_FPM_COMMAND_STALL_CYCLES              /**< FPM counter - counts the number of cycles stalled while performing a FPM Command. */
1480aeed3e9SJustin Hibbits } e_FmPcdCounters;
1490aeed3e9SJustin Hibbits 
1500aeed3e9SJustin Hibbits /**************************************************************************//**
1510aeed3e9SJustin Hibbits  @Description   PCD interrupts
1520aeed3e9SJustin Hibbits *//***************************************************************************/
1530aeed3e9SJustin Hibbits typedef enum e_FmPcdExceptions {
154*852ba100SJustin Hibbits     e_FM_PCD_KG_EXCEPTION_DOUBLE_ECC,                   /**< KeyGen double-bit ECC error is detected on internal memory read access. */
155*852ba100SJustin Hibbits     e_FM_PCD_KG_EXCEPTION_KEYSIZE_OVERFLOW,             /**< KeyGen scheme configuration error indicating a key size larger than 56 bytes. */
156*852ba100SJustin Hibbits     e_FM_PCD_PLCR_EXCEPTION_DOUBLE_ECC,                 /**< Policer double-bit ECC error has been detected on PRAM read access. */
157*852ba100SJustin Hibbits     e_FM_PCD_PLCR_EXCEPTION_INIT_ENTRY_ERROR,           /**< Policer access to a non-initialized profile has been detected. */
158*852ba100SJustin Hibbits     e_FM_PCD_PLCR_EXCEPTION_PRAM_SELF_INIT_COMPLETE,    /**< Policer RAM self-initialization complete */
159*852ba100SJustin Hibbits     e_FM_PCD_PLCR_EXCEPTION_ATOMIC_ACTION_COMPLETE,     /**< Policer atomic action complete */
160*852ba100SJustin Hibbits     e_FM_PCD_PRS_EXCEPTION_DOUBLE_ECC,                  /**< Parser double-bit ECC error */
161*852ba100SJustin Hibbits     e_FM_PCD_PRS_EXCEPTION_SINGLE_ECC                   /**< Parser single-bit ECC error */
1620aeed3e9SJustin Hibbits } e_FmPcdExceptions;
1630aeed3e9SJustin Hibbits 
1640aeed3e9SJustin Hibbits 
1650aeed3e9SJustin Hibbits /**************************************************************************//**
1660aeed3e9SJustin Hibbits  @Description   Exceptions user callback routine, will be called upon an
1670aeed3e9SJustin Hibbits                 exception passing the exception identification.
1680aeed3e9SJustin Hibbits 
1690aeed3e9SJustin Hibbits  @Param[in]     h_App      - User's application descriptor.
1700aeed3e9SJustin Hibbits  @Param[in]     exception  - The exception.
1710aeed3e9SJustin Hibbits   *//***************************************************************************/
1720aeed3e9SJustin Hibbits typedef void (t_FmPcdExceptionCallback) (t_Handle h_App, e_FmPcdExceptions exception);
1730aeed3e9SJustin Hibbits 
1740aeed3e9SJustin Hibbits /**************************************************************************//**
1750aeed3e9SJustin Hibbits  @Description   Exceptions user callback routine, will be called upon an exception
1760aeed3e9SJustin Hibbits                 passing the exception identification.
1770aeed3e9SJustin Hibbits 
1780aeed3e9SJustin Hibbits  @Param[in]     h_App           - User's application descriptor.
1790aeed3e9SJustin Hibbits  @Param[in]     exception       - The exception.
1800aeed3e9SJustin Hibbits  @Param[in]     index           - id of the relevant source (may be scheme or profile id).
1810aeed3e9SJustin Hibbits  *//***************************************************************************/
1820aeed3e9SJustin Hibbits typedef void (t_FmPcdIdExceptionCallback) ( t_Handle           h_App,
1830aeed3e9SJustin Hibbits                                             e_FmPcdExceptions  exception,
1840aeed3e9SJustin Hibbits                                             uint16_t           index);
1850aeed3e9SJustin Hibbits 
1860aeed3e9SJustin Hibbits /**************************************************************************//**
1870aeed3e9SJustin Hibbits  @Description   A callback for enqueuing frame onto a QM queue.
1880aeed3e9SJustin Hibbits 
189*852ba100SJustin Hibbits  @Param[in]     h_QmArg         - Application's handle passed to QM module on enqueue.
1900aeed3e9SJustin Hibbits  @Param[in]     p_Fd            - Frame descriptor for the frame.
1910aeed3e9SJustin Hibbits 
1920aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
1930aeed3e9SJustin Hibbits  *//***************************************************************************/
1940aeed3e9SJustin Hibbits typedef t_Error (t_FmPcdQmEnqueueCallback) (t_Handle h_QmArg, void *p_Fd);
1950aeed3e9SJustin Hibbits 
1960aeed3e9SJustin Hibbits /**************************************************************************//**
197*852ba100SJustin Hibbits  @Description   Host-Command parameters structure.
198*852ba100SJustin Hibbits 
1990aeed3e9SJustin Hibbits                 When using Host command for PCD functionalities, a dedicated port
2000aeed3e9SJustin Hibbits                 must be used. If this routine is called for a PCD in a single partition
201*852ba100SJustin Hibbits                 environment, or it is the Master partition in a Multi-partition
2020aeed3e9SJustin Hibbits                 environment, The port will be initialized by the PCD driver
2030aeed3e9SJustin Hibbits                 initialization routine.
2040aeed3e9SJustin Hibbits  *//***************************************************************************/
2050aeed3e9SJustin Hibbits typedef struct t_FmPcdHcParams {
206*852ba100SJustin Hibbits     uintptr_t                   portBaseAddr;       /**< Virtual Address of Host-Command Port memory mapped registers.*/
207*852ba100SJustin Hibbits     uint8_t                     portId;             /**< Port Id (0-6 relative to Host-Command/Offline-Parsing ports);
208*852ba100SJustin Hibbits                                                          NOTE: When configuring Host Command port for
209*852ba100SJustin Hibbits                                                          FMANv3 devices (DPAA_VERSION 11 and higher),
210*852ba100SJustin Hibbits                                                          portId=0 MUST be used. */
211*852ba100SJustin Hibbits     uint16_t                    liodnBase;          /**< LIODN base for this port, to be used together with LIODN offset
212*852ba100SJustin Hibbits                                                          (irrelevant for P4080 revision 1.0) */
213*852ba100SJustin Hibbits     uint32_t                    errFqid;            /**< Host-Command Port error queue Id. */
214*852ba100SJustin Hibbits     uint32_t                    confFqid;           /**< Host-Command Port confirmation queue Id. */
215*852ba100SJustin Hibbits     uint32_t                    qmChannel;          /**< QM channel dedicated to this Host-Command port;
216*852ba100SJustin Hibbits                                                          will be used by the FM for dequeue. */
2170aeed3e9SJustin Hibbits     t_FmPcdQmEnqueueCallback    *f_QmEnqueue;       /**< Callback routine for enqueuing a frame to the QM */
218*852ba100SJustin Hibbits     t_Handle                    h_QmArg;            /**< Application's handle passed to QM module on enqueue */
2190aeed3e9SJustin Hibbits } t_FmPcdHcParams;
2200aeed3e9SJustin Hibbits 
2210aeed3e9SJustin Hibbits /**************************************************************************//**
2220aeed3e9SJustin Hibbits  @Description   The main structure for PCD initialization
2230aeed3e9SJustin Hibbits  *//***************************************************************************/
2240aeed3e9SJustin Hibbits typedef struct t_FmPcdParams {
225*852ba100SJustin Hibbits     bool                        prsSupport;             /**< TRUE if Parser will be used for any of the FM ports. */
2260aeed3e9SJustin Hibbits     bool                        ccSupport;              /**< TRUE if Coarse Classification will be used for any
227*852ba100SJustin Hibbits                                                              of the FM ports. */
228*852ba100SJustin Hibbits     bool                        kgSupport;              /**< TRUE if KeyGen will be used for any of the FM ports. */
229*852ba100SJustin Hibbits     bool                        plcrSupport;            /**< TRUE if Policer will be used for any of the FM ports. */
230*852ba100SJustin Hibbits     t_Handle                    h_Fm;                   /**< A handle to the FM module. */
231*852ba100SJustin Hibbits     uint8_t                     numOfSchemes;           /**< Number of schemes dedicated to this partition.
232*852ba100SJustin Hibbits                                                              this parameter is relevant if 'kgSupport'=TRUE. */
2330aeed3e9SJustin Hibbits     bool                        useHostCommand;         /**< Optional for single partition, Mandatory for Multi partition */
234*852ba100SJustin Hibbits     t_FmPcdHcParams             hc;                     /**< Host Command parameters, relevant only if 'useHostCommand'=TRUE;
235*852ba100SJustin Hibbits                                                              Relevant when FM not runs in "guest-mode". */
2360aeed3e9SJustin Hibbits 
237*852ba100SJustin Hibbits     t_FmPcdExceptionCallback    *f_Exception;           /**< Callback routine for general PCD exceptions;
238*852ba100SJustin Hibbits                                                              Relevant when FM not runs in "guest-mode". */
239*852ba100SJustin Hibbits     t_FmPcdIdExceptionCallback  *f_ExceptionId;         /**< Callback routine for specific KeyGen scheme or
240*852ba100SJustin Hibbits                                                              Policer profile exceptions;
241*852ba100SJustin Hibbits                                                              Relevant when FM not runs in "guest-mode". */
242*852ba100SJustin Hibbits     t_Handle                    h_App;                  /**< A handle to an application layer object; This handle will
243*852ba100SJustin Hibbits                                                              be passed by the driver upon calling the above callbacks;
244*852ba100SJustin Hibbits                                                              Relevant when FM not runs in "guest-mode". */
245*852ba100SJustin Hibbits     uint8_t                     partPlcrProfilesBase;   /**< The first policer-profile-id dedicated to this partition.
246*852ba100SJustin Hibbits                                                              this parameter is relevant if 'plcrSupport'=TRUE.
247*852ba100SJustin Hibbits                                                              NOTE: this parameter relevant only when working with multiple partitions. */
248*852ba100SJustin Hibbits     uint16_t                    partNumOfPlcrProfiles;  /**< Number of policer-profiles dedicated to this partition.
249*852ba100SJustin Hibbits                                                              this parameter is relevant if 'plcrSupport'=TRUE.
250*852ba100SJustin Hibbits                                                              NOTE: this parameter relevant only when working with multiple partitions. */
2510aeed3e9SJustin Hibbits } t_FmPcdParams;
2520aeed3e9SJustin Hibbits 
2530aeed3e9SJustin Hibbits 
2540aeed3e9SJustin Hibbits /**************************************************************************//**
2550aeed3e9SJustin Hibbits  @Function      FM_PCD_Config
2560aeed3e9SJustin Hibbits 
2570aeed3e9SJustin Hibbits  @Description   Basic configuration of the PCD module.
2580aeed3e9SJustin Hibbits                 Creates descriptor for the FM PCD module.
2590aeed3e9SJustin Hibbits 
2600aeed3e9SJustin Hibbits  @Param[in]     p_FmPcdParams    A structure of parameters for the initialization of PCD.
2610aeed3e9SJustin Hibbits 
2620aeed3e9SJustin Hibbits  @Return        A handle to the initialized module.
2630aeed3e9SJustin Hibbits *//***************************************************************************/
2640aeed3e9SJustin Hibbits t_Handle FM_PCD_Config(t_FmPcdParams *p_FmPcdParams);
2650aeed3e9SJustin Hibbits 
2660aeed3e9SJustin Hibbits /**************************************************************************//**
2670aeed3e9SJustin Hibbits  @Function      FM_PCD_Init
2680aeed3e9SJustin Hibbits 
2690aeed3e9SJustin Hibbits  @Description   Initialization of the PCD module.
2700aeed3e9SJustin Hibbits 
2710aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd - FM PCD module descriptor.
2720aeed3e9SJustin Hibbits 
2730aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
2740aeed3e9SJustin Hibbits *//***************************************************************************/
2750aeed3e9SJustin Hibbits t_Error FM_PCD_Init(t_Handle h_FmPcd);
2760aeed3e9SJustin Hibbits 
2770aeed3e9SJustin Hibbits /**************************************************************************//**
2780aeed3e9SJustin Hibbits  @Function      FM_PCD_Free
2790aeed3e9SJustin Hibbits 
2800aeed3e9SJustin Hibbits  @Description   Frees all resources that were assigned to FM module.
2810aeed3e9SJustin Hibbits 
2820aeed3e9SJustin Hibbits                 Calling this routine invalidates the descriptor.
2830aeed3e9SJustin Hibbits 
2840aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd - FM PCD module descriptor.
2850aeed3e9SJustin Hibbits 
2860aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
2870aeed3e9SJustin Hibbits *//***************************************************************************/
2880aeed3e9SJustin Hibbits t_Error FM_PCD_Free(t_Handle h_FmPcd);
2890aeed3e9SJustin Hibbits 
2900aeed3e9SJustin Hibbits /**************************************************************************//**
291*852ba100SJustin Hibbits  @Group         FM_PCD_advanced_cfg_grp    FM PCD Advanced Configuration Unit
2920aeed3e9SJustin Hibbits 
293*852ba100SJustin Hibbits  @Description   Frame Manager PCD Advanced Configuration API.
2940aeed3e9SJustin Hibbits 
2950aeed3e9SJustin Hibbits  @{
2960aeed3e9SJustin Hibbits *//***************************************************************************/
2970aeed3e9SJustin Hibbits 
2980aeed3e9SJustin Hibbits /**************************************************************************//**
299*852ba100SJustin Hibbits  @Function      FM_PCD_ConfigException
300*852ba100SJustin Hibbits 
301*852ba100SJustin Hibbits  @Description   Calling this routine changes the internal driver data base
302*852ba100SJustin Hibbits                 from its default selection of exceptions enabling.
303*852ba100SJustin Hibbits                 [DEFAULT_numOfSharedPlcrProfiles].
304*852ba100SJustin Hibbits 
305*852ba100SJustin Hibbits  @Param[in]     h_FmPcd         FM PCD module descriptor.
306*852ba100SJustin Hibbits  @Param[in]     exception       The exception to be selected.
307*852ba100SJustin Hibbits  @Param[in]     enable          TRUE to enable interrupt, FALSE to mask it.
308*852ba100SJustin Hibbits 
309*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
310*852ba100SJustin Hibbits 
311*852ba100SJustin Hibbits  @Cautions      This routine should NOT be called from guest-partition
312*852ba100SJustin Hibbits                 (i.e. guestId != NCSW_MASTER_ID)
313*852ba100SJustin Hibbits *//***************************************************************************/
314*852ba100SJustin Hibbits t_Error FM_PCD_ConfigException(t_Handle h_FmPcd, e_FmPcdExceptions exception, bool enable);
315*852ba100SJustin Hibbits 
316*852ba100SJustin Hibbits /**************************************************************************//**
317*852ba100SJustin Hibbits  @Function      FM_PCD_ConfigHcFramesDataMemory
318*852ba100SJustin Hibbits 
319*852ba100SJustin Hibbits  @Description   Configures memory-partition-id for FMan-Controller Host-Command
320*852ba100SJustin Hibbits                 frames. Calling this routine changes the internal driver data
321*852ba100SJustin Hibbits                 base from its default configuration [0].
322*852ba100SJustin Hibbits 
323*852ba100SJustin Hibbits  @Param[in]     h_FmPcd         FM PCD module descriptor.
324*852ba100SJustin Hibbits  @Param[in]     memId           Memory partition ID.
325*852ba100SJustin Hibbits 
326*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
327*852ba100SJustin Hibbits 
328*852ba100SJustin Hibbits  @Cautions      This routine may be called only if 'useHostCommand' was TRUE
329*852ba100SJustin Hibbits                 when FM_PCD_Config() routine was called.
330*852ba100SJustin Hibbits *//***************************************************************************/
331*852ba100SJustin Hibbits t_Error FM_PCD_ConfigHcFramesDataMemory(t_Handle h_FmPcd, uint8_t memId);
332*852ba100SJustin Hibbits 
333*852ba100SJustin Hibbits /**************************************************************************//**
3340aeed3e9SJustin Hibbits  @Function      FM_PCD_ConfigPlcrNumOfSharedProfiles
3350aeed3e9SJustin Hibbits 
3360aeed3e9SJustin Hibbits  @Description   Calling this routine changes the internal driver data base
3370aeed3e9SJustin Hibbits                 from its default selection of exceptions enablement.
338*852ba100SJustin Hibbits                 [DEFAULT_numOfSharedPlcrProfiles].
3390aeed3e9SJustin Hibbits 
3400aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd                     FM PCD module descriptor.
3410aeed3e9SJustin Hibbits  @Param[in]     numOfSharedPlcrProfiles     Number of profiles to
3420aeed3e9SJustin Hibbits                                             be shared between ports on this partition
3430aeed3e9SJustin Hibbits 
3440aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3450aeed3e9SJustin Hibbits *//***************************************************************************/
3460aeed3e9SJustin Hibbits t_Error FM_PCD_ConfigPlcrNumOfSharedProfiles(t_Handle h_FmPcd, uint16_t numOfSharedPlcrProfiles);
3470aeed3e9SJustin Hibbits 
3480aeed3e9SJustin Hibbits /**************************************************************************//**
3490aeed3e9SJustin Hibbits  @Function      FM_PCD_ConfigPlcrAutoRefreshMode
3500aeed3e9SJustin Hibbits 
3510aeed3e9SJustin Hibbits  @Description   Calling this routine changes the internal driver data base
3520aeed3e9SJustin Hibbits                 from its default selection of exceptions enablement.
353*852ba100SJustin Hibbits                 By default auto-refresh is [DEFAULT_plcrAutoRefresh].
3540aeed3e9SJustin Hibbits 
3550aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd         FM PCD module descriptor.
3560aeed3e9SJustin Hibbits  @Param[in]     enable          TRUE to enable, FALSE to disable
3570aeed3e9SJustin Hibbits 
3580aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3590aeed3e9SJustin Hibbits 
360*852ba100SJustin Hibbits  @Cautions      This routine should NOT be called from guest-partition
361*852ba100SJustin Hibbits                 (i.e. guestId != NCSW_MASTER_ID)
3620aeed3e9SJustin Hibbits *//***************************************************************************/
3630aeed3e9SJustin Hibbits t_Error FM_PCD_ConfigPlcrAutoRefreshMode(t_Handle h_FmPcd, bool enable);
3640aeed3e9SJustin Hibbits 
3650aeed3e9SJustin Hibbits /**************************************************************************//**
3660aeed3e9SJustin Hibbits  @Function      FM_PCD_ConfigPrsMaxCycleLimit
3670aeed3e9SJustin Hibbits 
3680aeed3e9SJustin Hibbits  @Description   Calling this routine changes the internal data structure for
3690aeed3e9SJustin Hibbits                 the maximum parsing time from its default value
370*852ba100SJustin Hibbits                 [DEFAULT_MAX_PRS_CYC_LIM].
3710aeed3e9SJustin Hibbits 
3720aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd         FM PCD module descriptor.
3730aeed3e9SJustin Hibbits  @Param[in]     value           0 to disable the mechanism, or new
3740aeed3e9SJustin Hibbits                                 maximum parsing time.
3750aeed3e9SJustin Hibbits 
3760aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3770aeed3e9SJustin Hibbits 
378*852ba100SJustin Hibbits  @Cautions      This routine should NOT be called from guest-partition
379*852ba100SJustin Hibbits                 (i.e. guestId != NCSW_MASTER_ID)
3800aeed3e9SJustin Hibbits *//***************************************************************************/
3810aeed3e9SJustin Hibbits t_Error FM_PCD_ConfigPrsMaxCycleLimit(t_Handle h_FmPcd,uint16_t value);
3820aeed3e9SJustin Hibbits 
383*852ba100SJustin Hibbits /** @} */ /* end of FM_PCD_advanced_cfg_grp group */
3840aeed3e9SJustin Hibbits /** @} */ /* end of FM_PCD_init_grp group */
3850aeed3e9SJustin Hibbits 
3860aeed3e9SJustin Hibbits 
3870aeed3e9SJustin Hibbits /**************************************************************************//**
3880aeed3e9SJustin Hibbits  @Group         FM_PCD_Runtime_grp FM PCD Runtime Unit
3890aeed3e9SJustin Hibbits 
390*852ba100SJustin Hibbits  @Description   Frame Manager PCD Runtime Unit API
3910aeed3e9SJustin Hibbits 
3920aeed3e9SJustin Hibbits                 The runtime control allows creation of PCD infrastructure modules
3930aeed3e9SJustin Hibbits                 such as Network Environment Characteristics, Classification Plan
3940aeed3e9SJustin Hibbits                 Groups and Coarse Classification Trees.
3950aeed3e9SJustin Hibbits                 It also allows on-the-fly initialization, modification and removal
396*852ba100SJustin Hibbits                 of PCD modules such as KeyGen schemes, coarse classification nodes
3970aeed3e9SJustin Hibbits                 and Policer profiles.
3980aeed3e9SJustin Hibbits 
3990aeed3e9SJustin Hibbits                 In order to explain the programming model of the PCD driver interface
4000aeed3e9SJustin Hibbits                 a few terms should be explained, and will be used below.
401*852ba100SJustin Hibbits                   - Distinction Header - One of the 16 protocols supported by the FM parser,
402*852ba100SJustin Hibbits                     or one of the SHIM headers (1 or 2). May be a header with a special
4030aeed3e9SJustin Hibbits                     option (see below).
404*852ba100SJustin Hibbits                   - Interchangeable Headers Group - This is a group of Headers recognized
4050aeed3e9SJustin Hibbits                     by either one of them. For example, if in a specific context the user
4060aeed3e9SJustin Hibbits                     chooses to treat IPv4 and IPV6 in the same way, they may create an
4070aeed3e9SJustin Hibbits                     interchangeable Headers Unit consisting of these 2 headers.
408*852ba100SJustin Hibbits                   - A Distinction Unit - a Distinction Header or an Interchangeable Headers
4090aeed3e9SJustin Hibbits                     Group.
410*852ba100SJustin Hibbits                   - Header with special option - applies to Ethernet, MPLS, VLAN, IPv4 and
411*852ba100SJustin Hibbits                     IPv6, includes multicast, broadcast and other protocol specific options.
4120aeed3e9SJustin Hibbits                     In terms of hardware it relates to the options available in the classification
4130aeed3e9SJustin Hibbits                     plan.
414*852ba100SJustin Hibbits                   - Network Environment Characteristics - a set of Distinction Units that define
4150aeed3e9SJustin Hibbits                     the total recognizable header selection for a certain environment. This is
4160aeed3e9SJustin Hibbits                     NOT the list of all headers that will ever appear in a flow, but rather
417*852ba100SJustin Hibbits                     everything that needs distinction in a flow, where distinction is made by KeyGen
4180aeed3e9SJustin Hibbits                     schemes and coarse classification action descriptors.
4190aeed3e9SJustin Hibbits 
4200aeed3e9SJustin Hibbits                 The PCD runtime modules initialization is done in stages. The first stage after
4210aeed3e9SJustin Hibbits                 initializing the PCD module itself is to establish a Network Flows Environment
4220aeed3e9SJustin Hibbits                 Definition. The application may choose to establish one or more such environments.
4230aeed3e9SJustin Hibbits                 Later, when needed, the application will have to state, for some of its modules,
4240aeed3e9SJustin Hibbits                 to which single environment it belongs.
4250aeed3e9SJustin Hibbits 
4260aeed3e9SJustin Hibbits  @{
4270aeed3e9SJustin Hibbits *//***************************************************************************/
4280aeed3e9SJustin Hibbits 
4290aeed3e9SJustin Hibbits /**************************************************************************//**
430*852ba100SJustin Hibbits  @Description   A structure for SW parser labels
4310aeed3e9SJustin Hibbits  *//***************************************************************************/
4320aeed3e9SJustin Hibbits typedef struct t_FmPcdPrsLabelParams {
4330aeed3e9SJustin Hibbits     uint32_t                instructionOffset;              /**< SW parser label instruction offset (2 bytes
4340aeed3e9SJustin Hibbits                                                                  resolution), relative to Parser RAM. */
435*852ba100SJustin Hibbits     e_NetHeaderType         hdr;                            /**< The existence of this header will invoke
436*852ba100SJustin Hibbits                                                                  the SW parser code; Use  HEADER_TYPE_NONE
437*852ba100SJustin Hibbits                                                                  to indicate that sw parser is to run
438*852ba100SJustin Hibbits                                                                  independent of the existence of any protocol
439*852ba100SJustin Hibbits                                                                  (run before HW parser). */
440*852ba100SJustin Hibbits     uint8_t                 indexPerHdr;                    /**< Normally 0, if more than one SW parser
4410aeed3e9SJustin Hibbits                                                                  attachments for the same header, use this
4420aeed3e9SJustin Hibbits                                                                  index to distinguish between them. */
4430aeed3e9SJustin Hibbits } t_FmPcdPrsLabelParams;
4440aeed3e9SJustin Hibbits 
4450aeed3e9SJustin Hibbits /**************************************************************************//**
446*852ba100SJustin Hibbits  @Description   A structure for SW parser
4470aeed3e9SJustin Hibbits  *//***************************************************************************/
4480aeed3e9SJustin Hibbits typedef struct t_FmPcdPrsSwParams {
4490aeed3e9SJustin Hibbits     bool                    override;                   /**< FALSE to invoke a check that nothing else
4500aeed3e9SJustin Hibbits                                                              was loaded to this address, including
4510aeed3e9SJustin Hibbits                                                              internal patches.
4520aeed3e9SJustin Hibbits                                                              TRUE to override any existing code.*/
4530aeed3e9SJustin Hibbits     uint32_t                size;                       /**< SW parser code size */
4540aeed3e9SJustin Hibbits     uint16_t                base;                       /**< SW parser base (in instruction counts!
4550aeed3e9SJustin Hibbits                                                              must be larger than 0x20)*/
4560aeed3e9SJustin Hibbits     uint8_t                 *p_Code;                    /**< SW parser code */
4570aeed3e9SJustin Hibbits     uint32_t                swPrsDataParams[FM_PCD_PRS_NUM_OF_HDRS];
4580aeed3e9SJustin Hibbits                                                         /**< SW parser data (parameters) */
4590aeed3e9SJustin Hibbits     uint8_t                 numOfLabels;                /**< Number of labels for SW parser. */
4600aeed3e9SJustin Hibbits     t_FmPcdPrsLabelParams   labelsTable[FM_PCD_PRS_NUM_OF_LABELS];
4610aeed3e9SJustin Hibbits                                                         /**< SW parser labels table, containing
4620aeed3e9SJustin Hibbits                                                              numOfLabels entries */
4630aeed3e9SJustin Hibbits } t_FmPcdPrsSwParams;
4640aeed3e9SJustin Hibbits 
4650aeed3e9SJustin Hibbits 
4660aeed3e9SJustin Hibbits /**************************************************************************//**
4670aeed3e9SJustin Hibbits  @Function      FM_PCD_Enable
4680aeed3e9SJustin Hibbits 
4690aeed3e9SJustin Hibbits  @Description   This routine should be called after PCD is initialized for enabling all
4700aeed3e9SJustin Hibbits                 PCD engines according to their existing configuration.
4710aeed3e9SJustin Hibbits 
4720aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd         FM PCD module descriptor.
4730aeed3e9SJustin Hibbits 
4740aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
4750aeed3e9SJustin Hibbits 
4760aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init() and when PCD is disabled.
4770aeed3e9SJustin Hibbits *//***************************************************************************/
4780aeed3e9SJustin Hibbits t_Error FM_PCD_Enable(t_Handle h_FmPcd);
4790aeed3e9SJustin Hibbits 
4800aeed3e9SJustin Hibbits /**************************************************************************//**
4810aeed3e9SJustin Hibbits  @Function      FM_PCD_Disable
4820aeed3e9SJustin Hibbits 
4830aeed3e9SJustin Hibbits  @Description   This routine may be called when PCD is enabled in order to
4840aeed3e9SJustin Hibbits                 disable all PCD engines. It may be called
4850aeed3e9SJustin Hibbits                 only when none of the ports in the system are using the PCD.
4860aeed3e9SJustin Hibbits 
4870aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd         FM PCD module descriptor.
4880aeed3e9SJustin Hibbits 
4890aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
4900aeed3e9SJustin Hibbits 
4910aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init() and when PCD is enabled.
4920aeed3e9SJustin Hibbits *//***************************************************************************/
4930aeed3e9SJustin Hibbits t_Error FM_PCD_Disable(t_Handle h_FmPcd);
4940aeed3e9SJustin Hibbits 
4950aeed3e9SJustin Hibbits /**************************************************************************//**
4960aeed3e9SJustin Hibbits  @Function      FM_PCD_GetCounter
4970aeed3e9SJustin Hibbits 
4980aeed3e9SJustin Hibbits  @Description   Reads one of the FM PCD counters.
4990aeed3e9SJustin Hibbits 
5000aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd     FM PCD module descriptor.
5010aeed3e9SJustin Hibbits  @Param[in]     counter     The requested counter.
5020aeed3e9SJustin Hibbits 
5030aeed3e9SJustin Hibbits  @Return        Counter's current value.
5040aeed3e9SJustin Hibbits 
5050aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
5060aeed3e9SJustin Hibbits                 Note that it is user's responsibility to call this routine only
5070aeed3e9SJustin Hibbits                 for enabled counters, and there will be no indication if a
5080aeed3e9SJustin Hibbits                 disabled counter is accessed.
5090aeed3e9SJustin Hibbits *//***************************************************************************/
5100aeed3e9SJustin Hibbits uint32_t FM_PCD_GetCounter(t_Handle h_FmPcd, e_FmPcdCounters counter);
5110aeed3e9SJustin Hibbits 
5120aeed3e9SJustin Hibbits /**************************************************************************//**
5130aeed3e9SJustin Hibbits @Function       FM_PCD_PrsLoadSw
5140aeed3e9SJustin Hibbits 
5150aeed3e9SJustin Hibbits @Description    This routine may be called in order to load software parsing code.
5160aeed3e9SJustin Hibbits 
5170aeed3e9SJustin Hibbits 
5180aeed3e9SJustin Hibbits @Param[in]      h_FmPcd        FM PCD module descriptor.
5190aeed3e9SJustin Hibbits @Param[in]      p_SwPrs        A pointer to a structure of software
5200aeed3e9SJustin Hibbits                                parser parameters, including the software
5210aeed3e9SJustin Hibbits                                parser image.
5220aeed3e9SJustin Hibbits 
5230aeed3e9SJustin Hibbits @Return         E_OK on success; Error code otherwise.
5240aeed3e9SJustin Hibbits 
5250aeed3e9SJustin Hibbits @Cautions       Allowed only following FM_PCD_Init() and when PCD is disabled.
526*852ba100SJustin Hibbits                 This routine should NOT be called from guest-partition
527*852ba100SJustin Hibbits                 (i.e. guestId != NCSW_MASTER_ID)
5280aeed3e9SJustin Hibbits *//***************************************************************************/
5290aeed3e9SJustin Hibbits t_Error FM_PCD_PrsLoadSw(t_Handle h_FmPcd, t_FmPcdPrsSwParams *p_SwPrs);
5300aeed3e9SJustin Hibbits 
5310aeed3e9SJustin Hibbits /**************************************************************************//**
532*852ba100SJustin Hibbits @Function      FM_PCD_SetAdvancedOffloadSupport
533*852ba100SJustin Hibbits 
534*852ba100SJustin Hibbits @Description   This routine must be called in order to support the following features:
535*852ba100SJustin Hibbits                IP-fragmentation, IP-reassembly, IPsec, Header-manipulation, frame-replicator.
536*852ba100SJustin Hibbits 
537*852ba100SJustin Hibbits @Param[in]     h_FmPcd         FM PCD module descriptor.
538*852ba100SJustin Hibbits 
539*852ba100SJustin Hibbits @Return        E_OK on success; Error code otherwise.
540*852ba100SJustin Hibbits 
541*852ba100SJustin Hibbits @Cautions      Allowed only following FM_PCD_Init() and when PCD is disabled.
542*852ba100SJustin Hibbits                This routine should NOT be called from guest-partition
543*852ba100SJustin Hibbits                (i.e. guestId != NCSW_MASTER_ID)
544*852ba100SJustin Hibbits *//***************************************************************************/
545*852ba100SJustin Hibbits t_Error FM_PCD_SetAdvancedOffloadSupport(t_Handle h_FmPcd);
546*852ba100SJustin Hibbits 
547*852ba100SJustin Hibbits /**************************************************************************//**
5480aeed3e9SJustin Hibbits  @Function      FM_PCD_KgSetDfltValue
5490aeed3e9SJustin Hibbits 
5500aeed3e9SJustin Hibbits  @Description   Calling this routine sets a global default value to be used
551*852ba100SJustin Hibbits                 by the KeyGen when parser does not recognize a required
5520aeed3e9SJustin Hibbits                 field/header.
5530aeed3e9SJustin Hibbits                 By default default values are 0.
5540aeed3e9SJustin Hibbits 
5550aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd         FM PCD module descriptor.
5560aeed3e9SJustin Hibbits  @Param[in]     valueId         0,1 - one of 2 global default values.
5570aeed3e9SJustin Hibbits  @Param[in]     value           The requested default value.
5580aeed3e9SJustin Hibbits 
5590aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
5600aeed3e9SJustin Hibbits 
5610aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init() and when PCD is disabled.
562*852ba100SJustin Hibbits                 This routine should NOT be called from guest-partition
563*852ba100SJustin Hibbits                 (i.e. guestId != NCSW_MASTER_ID)
5640aeed3e9SJustin Hibbits *//***************************************************************************/
5650aeed3e9SJustin Hibbits t_Error FM_PCD_KgSetDfltValue(t_Handle h_FmPcd, uint8_t valueId, uint32_t value);
5660aeed3e9SJustin Hibbits 
5670aeed3e9SJustin Hibbits /**************************************************************************//**
5680aeed3e9SJustin Hibbits  @Function      FM_PCD_KgSetAdditionalDataAfterParsing
5690aeed3e9SJustin Hibbits 
570*852ba100SJustin Hibbits  @Description   Calling this routine allows the KeyGen to access data past
5710aeed3e9SJustin Hibbits                 the parser finishing point.
5720aeed3e9SJustin Hibbits 
5730aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd         FM PCD module descriptor.
5740aeed3e9SJustin Hibbits  @Param[in]     payloadOffset   the number of bytes beyond the parser location.
5750aeed3e9SJustin Hibbits 
5760aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
5770aeed3e9SJustin Hibbits 
5780aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init() and when PCD is disabled.
579*852ba100SJustin Hibbits                 This routine should NOT be called from guest-partition
580*852ba100SJustin Hibbits                 (i.e. guestId != NCSW_MASTER_ID)
5810aeed3e9SJustin Hibbits *//***************************************************************************/
5820aeed3e9SJustin Hibbits t_Error FM_PCD_KgSetAdditionalDataAfterParsing(t_Handle h_FmPcd, uint8_t payloadOffset);
5830aeed3e9SJustin Hibbits 
5840aeed3e9SJustin Hibbits /**************************************************************************//**
5850aeed3e9SJustin Hibbits  @Function      FM_PCD_SetException
5860aeed3e9SJustin Hibbits 
5870aeed3e9SJustin Hibbits  @Description   Calling this routine enables/disables PCD interrupts.
5880aeed3e9SJustin Hibbits 
5890aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd         FM PCD module descriptor.
5900aeed3e9SJustin Hibbits  @Param[in]     exception       The exception to be selected.
5910aeed3e9SJustin Hibbits  @Param[in]     enable          TRUE to enable interrupt, FALSE to mask it.
5920aeed3e9SJustin Hibbits 
5930aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
5940aeed3e9SJustin Hibbits 
5950aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
596*852ba100SJustin Hibbits                 This routine should NOT be called from guest-partition
597*852ba100SJustin Hibbits                 (i.e. guestId != NCSW_MASTER_ID)
5980aeed3e9SJustin Hibbits *//***************************************************************************/
5990aeed3e9SJustin Hibbits t_Error FM_PCD_SetException(t_Handle h_FmPcd, e_FmPcdExceptions exception, bool enable);
6000aeed3e9SJustin Hibbits 
6010aeed3e9SJustin Hibbits /**************************************************************************//**
6020aeed3e9SJustin Hibbits  @Function      FM_PCD_ModifyCounter
6030aeed3e9SJustin Hibbits 
6040aeed3e9SJustin Hibbits  @Description   Sets a value to an enabled counter. Use "0" to reset the counter.
6050aeed3e9SJustin Hibbits 
6060aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd     FM PCD module descriptor.
6070aeed3e9SJustin Hibbits  @Param[in]     counter     The requested counter.
6080aeed3e9SJustin Hibbits  @Param[in]     value       The requested value to be written into the counter.
6090aeed3e9SJustin Hibbits 
6100aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
6110aeed3e9SJustin Hibbits 
6120aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
613*852ba100SJustin Hibbits                 This routine should NOT be called from guest-partition
614*852ba100SJustin Hibbits                 (i.e. guestId != NCSW_MASTER_ID)
6150aeed3e9SJustin Hibbits *//***************************************************************************/
6160aeed3e9SJustin Hibbits t_Error FM_PCD_ModifyCounter(t_Handle h_FmPcd, e_FmPcdCounters counter, uint32_t value);
6170aeed3e9SJustin Hibbits 
6180aeed3e9SJustin Hibbits /**************************************************************************//**
6190aeed3e9SJustin Hibbits  @Function      FM_PCD_SetPlcrStatistics
6200aeed3e9SJustin Hibbits 
6210aeed3e9SJustin Hibbits  @Description   This routine may be used to enable/disable policer statistics
6220aeed3e9SJustin Hibbits                 counter. By default the statistics is enabled.
6230aeed3e9SJustin Hibbits 
6240aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd         FM PCD module descriptor
6250aeed3e9SJustin Hibbits  @Param[in]     enable          TRUE to enable, FALSE to disable.
6260aeed3e9SJustin Hibbits 
6270aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
6280aeed3e9SJustin Hibbits 
6290aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
630*852ba100SJustin Hibbits                 This routine should NOT be called from guest-partition
631*852ba100SJustin Hibbits                 (i.e. guestId != NCSW_MASTER_ID)
6320aeed3e9SJustin Hibbits *//***************************************************************************/
6330aeed3e9SJustin Hibbits t_Error FM_PCD_SetPlcrStatistics(t_Handle h_FmPcd, bool enable);
6340aeed3e9SJustin Hibbits 
6350aeed3e9SJustin Hibbits /**************************************************************************//**
6360aeed3e9SJustin Hibbits  @Function      FM_PCD_SetPrsStatistics
6370aeed3e9SJustin Hibbits 
6380aeed3e9SJustin Hibbits  @Description   Defines whether to gather parser statistics including all ports.
6390aeed3e9SJustin Hibbits 
6400aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd     FM PCD module descriptor.
6410aeed3e9SJustin Hibbits  @Param[in]     enable      TRUE to enable, FALSE to disable.
6420aeed3e9SJustin Hibbits 
6430aeed3e9SJustin Hibbits  @Return        None
6440aeed3e9SJustin Hibbits 
6450aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
646*852ba100SJustin Hibbits                 This routine should NOT be called from guest-partition
647*852ba100SJustin Hibbits                 (i.e. guestId != NCSW_MASTER_ID)
6480aeed3e9SJustin Hibbits *//***************************************************************************/
6490aeed3e9SJustin Hibbits void FM_PCD_SetPrsStatistics(t_Handle h_FmPcd, bool enable);
6500aeed3e9SJustin Hibbits 
6510aeed3e9SJustin Hibbits /**************************************************************************//**
6520aeed3e9SJustin Hibbits  @Function      FM_PCD_HcTxConf
6530aeed3e9SJustin Hibbits 
6540aeed3e9SJustin Hibbits  @Description   This routine should be called to confirm frames that were
6550aeed3e9SJustin Hibbits                  received on the HC confirmation queue.
6560aeed3e9SJustin Hibbits 
6570aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd         A handle to an FM PCD Module.
6580aeed3e9SJustin Hibbits  @Param[in]     p_Fd            Frame descriptor of the received frame.
6590aeed3e9SJustin Hibbits 
6600aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init(). Allowed only if 'useHostCommand'
6610aeed3e9SJustin Hibbits                 option was selected in the initialization.
6620aeed3e9SJustin Hibbits *//***************************************************************************/
6630aeed3e9SJustin Hibbits void FM_PCD_HcTxConf(t_Handle h_FmPcd, t_DpaaFD *p_Fd);
6640aeed3e9SJustin Hibbits 
665*852ba100SJustin Hibbits /**************************************************************************//*
666*852ba100SJustin Hibbits  @Function      FM_PCD_ForceIntr
667*852ba100SJustin Hibbits 
668*852ba100SJustin Hibbits  @Description   Causes an interrupt event on the requested source.
669*852ba100SJustin Hibbits 
670*852ba100SJustin Hibbits  @Param[in]     h_FmPcd     FM PCD module descriptor.
671*852ba100SJustin Hibbits  @Param[in]     exception       An exception to be forced.
672*852ba100SJustin Hibbits 
673*852ba100SJustin Hibbits  @Return        E_OK on success; Error code if the exception is not enabled,
674*852ba100SJustin Hibbits                 or is not able to create interrupt.
675*852ba100SJustin Hibbits 
676*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
677*852ba100SJustin Hibbits                 This routine should NOT be called from guest-partition
678*852ba100SJustin Hibbits                 (i.e. guestId != NCSW_MASTER_ID)
679*852ba100SJustin Hibbits *//***************************************************************************/
680*852ba100SJustin Hibbits t_Error FM_PCD_ForceIntr (t_Handle h_FmPcd, e_FmPcdExceptions exception);
681*852ba100SJustin Hibbits 
6820aeed3e9SJustin Hibbits #if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
6830aeed3e9SJustin Hibbits /**************************************************************************//**
6840aeed3e9SJustin Hibbits  @Function      FM_PCD_DumpRegs
6850aeed3e9SJustin Hibbits 
6860aeed3e9SJustin Hibbits  @Description   Dumps all PCD registers
6870aeed3e9SJustin Hibbits 
6880aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd         A handle to an FM PCD Module.
6890aeed3e9SJustin Hibbits 
6900aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
6910aeed3e9SJustin Hibbits 
6920aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
693*852ba100SJustin Hibbits                 NOTE: this routine may be called only for FM in master mode
694*852ba100SJustin Hibbits                 (i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers
695*852ba100SJustin Hibbits                 are mapped.
6960aeed3e9SJustin Hibbits *//***************************************************************************/
6970aeed3e9SJustin Hibbits t_Error FM_PCD_DumpRegs(t_Handle h_FmPcd);
6980aeed3e9SJustin Hibbits 
6990aeed3e9SJustin Hibbits /**************************************************************************//**
7000aeed3e9SJustin Hibbits  @Function      FM_PCD_KgDumpRegs
7010aeed3e9SJustin Hibbits 
7020aeed3e9SJustin Hibbits  @Description   Dumps all PCD KG registers
7030aeed3e9SJustin Hibbits 
7040aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd         A handle to an FM PCD Module.
7050aeed3e9SJustin Hibbits 
7060aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
7070aeed3e9SJustin Hibbits 
7080aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
709*852ba100SJustin Hibbits                 NOTE: this routine may be called only for FM in master mode
710*852ba100SJustin Hibbits                 (i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers
711*852ba100SJustin Hibbits                 are mapped.
7120aeed3e9SJustin Hibbits *//***************************************************************************/
7130aeed3e9SJustin Hibbits t_Error FM_PCD_KgDumpRegs(t_Handle h_FmPcd);
7140aeed3e9SJustin Hibbits 
7150aeed3e9SJustin Hibbits /**************************************************************************//**
7160aeed3e9SJustin Hibbits  @Function      FM_PCD_PlcrDumpRegs
7170aeed3e9SJustin Hibbits 
718*852ba100SJustin Hibbits  @Description   Dumps all PCD Policer registers
7190aeed3e9SJustin Hibbits 
7200aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd         A handle to an FM PCD Module.
7210aeed3e9SJustin Hibbits 
7220aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
7230aeed3e9SJustin Hibbits 
7240aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
725*852ba100SJustin Hibbits                 NOTE: this routine may be called only for FM in master mode
726*852ba100SJustin Hibbits                 (i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers
727*852ba100SJustin Hibbits                 are mapped.
7280aeed3e9SJustin Hibbits *//***************************************************************************/
7290aeed3e9SJustin Hibbits t_Error FM_PCD_PlcrDumpRegs(t_Handle h_FmPcd);
7300aeed3e9SJustin Hibbits 
7310aeed3e9SJustin Hibbits /**************************************************************************//**
7320aeed3e9SJustin Hibbits  @Function      FM_PCD_PlcrProfileDumpRegs
7330aeed3e9SJustin Hibbits 
734*852ba100SJustin Hibbits  @Description   Dumps all PCD Policer profile registers
7350aeed3e9SJustin Hibbits 
736*852ba100SJustin Hibbits  @Param[in]     h_Profile       A handle to a Policer profile.
7370aeed3e9SJustin Hibbits 
7380aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
7390aeed3e9SJustin Hibbits 
7400aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
741*852ba100SJustin Hibbits                 NOTE: this routine may be called only for FM in master mode
742*852ba100SJustin Hibbits                 (i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers
743*852ba100SJustin Hibbits                 are mapped.
7440aeed3e9SJustin Hibbits *//***************************************************************************/
745*852ba100SJustin Hibbits t_Error FM_PCD_PlcrProfileDumpRegs(t_Handle h_Profile);
7460aeed3e9SJustin Hibbits 
7470aeed3e9SJustin Hibbits /**************************************************************************//**
7480aeed3e9SJustin Hibbits  @Function      FM_PCD_PrsDumpRegs
7490aeed3e9SJustin Hibbits 
750*852ba100SJustin Hibbits  @Description   Dumps all PCD Parser registers
7510aeed3e9SJustin Hibbits 
7520aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd         A handle to an FM PCD Module.
7530aeed3e9SJustin Hibbits 
7540aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
7550aeed3e9SJustin Hibbits 
7560aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
757*852ba100SJustin Hibbits                 NOTE: this routine may be called only for FM in master mode
758*852ba100SJustin Hibbits                 (i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers
759*852ba100SJustin Hibbits                 are mapped.
7600aeed3e9SJustin Hibbits *//***************************************************************************/
7610aeed3e9SJustin Hibbits t_Error FM_PCD_PrsDumpRegs(t_Handle h_FmPcd);
7620aeed3e9SJustin Hibbits 
7630aeed3e9SJustin Hibbits /**************************************************************************//**
7640aeed3e9SJustin Hibbits  @Function      FM_PCD_HcDumpRegs
7650aeed3e9SJustin Hibbits 
7660aeed3e9SJustin Hibbits  @Description   Dumps HC Port registers
7670aeed3e9SJustin Hibbits 
7680aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd         A handle to an FM PCD Module.
7690aeed3e9SJustin Hibbits 
7700aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
7710aeed3e9SJustin Hibbits 
7720aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
773*852ba100SJustin Hibbits                 NOTE: this routine may be called only for FM in master mode
774*852ba100SJustin Hibbits                 (i.e. 'guestId'=NCSW_MASTER_ID).
7750aeed3e9SJustin Hibbits *//***************************************************************************/
7760aeed3e9SJustin Hibbits t_Error     FM_PCD_HcDumpRegs(t_Handle h_FmPcd);
7770aeed3e9SJustin Hibbits #endif /* (defined(DEBUG_ERRORS) && ... */
7780aeed3e9SJustin Hibbits 
7790aeed3e9SJustin Hibbits 
7800aeed3e9SJustin Hibbits 
7810aeed3e9SJustin Hibbits /**************************************************************************//**
782*852ba100SJustin Hibbits  KeyGen         FM_PCD_Runtime_build_grp FM PCD Runtime Building Unit
7830aeed3e9SJustin Hibbits 
784*852ba100SJustin Hibbits  @Description   Frame Manager PCD Runtime Building API
7850aeed3e9SJustin Hibbits 
7860aeed3e9SJustin Hibbits                 This group contains routines for setting, deleting and modifying
7870aeed3e9SJustin Hibbits                 PCD resources, for defining the total PCD tree.
7880aeed3e9SJustin Hibbits  @{
7890aeed3e9SJustin Hibbits *//***************************************************************************/
7900aeed3e9SJustin Hibbits 
7910aeed3e9SJustin Hibbits /**************************************************************************//**
7920aeed3e9SJustin Hibbits  @Collection    Definitions of coarse classification
793*852ba100SJustin Hibbits                 parameters as required by KeyGen (when coarse classification
7940aeed3e9SJustin Hibbits                 is the next engine after this scheme).
7950aeed3e9SJustin Hibbits *//***************************************************************************/
7960aeed3e9SJustin Hibbits #define FM_PCD_MAX_NUM_OF_CC_TREES              8
7970aeed3e9SJustin Hibbits #define FM_PCD_MAX_NUM_OF_CC_GROUPS             16
7980aeed3e9SJustin Hibbits #define FM_PCD_MAX_NUM_OF_CC_UNITS              4
7990aeed3e9SJustin Hibbits #define FM_PCD_MAX_NUM_OF_KEYS                  256
800*852ba100SJustin Hibbits #define FM_PCD_MAX_NUM_OF_FLOWS                 (4*KILOBYTE)
8010aeed3e9SJustin Hibbits #define FM_PCD_MAX_SIZE_OF_KEY                  56
8020aeed3e9SJustin Hibbits #define FM_PCD_MAX_NUM_OF_CC_ENTRIES_IN_GRP     16
803*852ba100SJustin Hibbits #define FM_PCD_LAST_KEY_INDEX                   0xffff
804*852ba100SJustin Hibbits 
805*852ba100SJustin Hibbits #define FM_PCD_MAX_NUM_OF_CC_NODES              255 /* Obsolete, not used - will be removed in the future */
8060aeed3e9SJustin Hibbits /* @} */
8070aeed3e9SJustin Hibbits 
8080aeed3e9SJustin Hibbits /**************************************************************************//**
8090aeed3e9SJustin Hibbits  @Collection    A set of definitions to allow protocol
8100aeed3e9SJustin Hibbits                 special option description.
8110aeed3e9SJustin Hibbits *//***************************************************************************/
8120aeed3e9SJustin Hibbits typedef uint32_t        protocolOpt_t;          /**< A general type to define a protocol option. */
8130aeed3e9SJustin Hibbits 
8140aeed3e9SJustin Hibbits typedef protocolOpt_t   ethProtocolOpt_t;       /**< Ethernet protocol options. */
8150aeed3e9SJustin Hibbits #define ETH_BROADCAST               0x80000000  /**< Ethernet Broadcast. */
8160aeed3e9SJustin Hibbits #define ETH_MULTICAST               0x40000000  /**< Ethernet Multicast. */
8170aeed3e9SJustin Hibbits 
818*852ba100SJustin Hibbits typedef protocolOpt_t   vlanProtocolOpt_t;      /**< VLAN protocol options. */
819*852ba100SJustin Hibbits #define VLAN_STACKED                0x20000000  /**< Stacked VLAN. */
8200aeed3e9SJustin Hibbits 
8210aeed3e9SJustin Hibbits typedef protocolOpt_t   mplsProtocolOpt_t;      /**< MPLS protocol options. */
822*852ba100SJustin Hibbits #define MPLS_STACKED                0x10000000  /**< Stacked MPLS. */
8230aeed3e9SJustin Hibbits 
8240aeed3e9SJustin Hibbits typedef protocolOpt_t   ipv4ProtocolOpt_t;      /**< IPv4 protocol options. */
8250aeed3e9SJustin Hibbits #define IPV4_BROADCAST_1            0x08000000  /**< IPv4 Broadcast. */
8260aeed3e9SJustin Hibbits #define IPV4_MULTICAST_1            0x04000000  /**< IPv4 Multicast. */
8270aeed3e9SJustin Hibbits #define IPV4_UNICAST_2              0x02000000  /**< Tunneled IPv4 - Unicast. */
8280aeed3e9SJustin Hibbits #define IPV4_MULTICAST_BROADCAST_2  0x01000000  /**< Tunneled IPv4 - Broadcast/Multicast. */
8290aeed3e9SJustin Hibbits 
830*852ba100SJustin Hibbits #define IPV4_FRAG_1                 0x00000008  /**< IPV4 reassembly option.
831*852ba100SJustin Hibbits                                                      IPV4 Reassembly manipulation requires network
832*852ba100SJustin Hibbits                                                      environment with IPV4 header and IPV4_FRAG_1 option  */
833*852ba100SJustin Hibbits 
8340aeed3e9SJustin Hibbits typedef protocolOpt_t   ipv6ProtocolOpt_t;      /**< IPv6 protocol options. */
8350aeed3e9SJustin Hibbits #define IPV6_MULTICAST_1            0x00800000  /**< IPv6 Multicast. */
8360aeed3e9SJustin Hibbits #define IPV6_UNICAST_2              0x00400000  /**< Tunneled IPv6 - Unicast. */
8370aeed3e9SJustin Hibbits #define IPV6_MULTICAST_2            0x00200000  /**< Tunneled IPv6 - Multicast. */
838*852ba100SJustin Hibbits 
839*852ba100SJustin Hibbits #define IPV6_FRAG_1                 0x00000004  /**< IPV6 reassembly option.
840*852ba100SJustin Hibbits                                                      IPV6 Reassembly manipulation requires network
841*852ba100SJustin Hibbits                                                      environment with IPV6 header and IPV6_FRAG_1 option;
842*852ba100SJustin Hibbits                                                      in case where fragment found, the fragment-extension offset
843*852ba100SJustin Hibbits                                                      may be found at 'shim2' (in parser-result). */
844*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
845*852ba100SJustin Hibbits typedef protocolOpt_t   capwapProtocolOpt_t;      /**< CAPWAP protocol options. */
846*852ba100SJustin Hibbits #define CAPWAP_FRAG_1               0x00000008  /**< CAPWAP reassembly option.
847*852ba100SJustin Hibbits                                                      CAPWAP Reassembly manipulation requires network
848*852ba100SJustin Hibbits                                                      environment with CAPWAP header and CAPWAP_FRAG_1 option;
849*852ba100SJustin Hibbits                                                      in case where fragment found, the fragment-extension offset
850*852ba100SJustin Hibbits                                                      may be found at 'shim2' (in parser-result). */
851*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
852*852ba100SJustin Hibbits 
853*852ba100SJustin Hibbits 
854*852ba100SJustin Hibbits /* @} */
855*852ba100SJustin Hibbits 
856*852ba100SJustin Hibbits #define FM_PCD_MANIP_MAX_HDR_SIZE               256
857*852ba100SJustin Hibbits #define FM_PCD_MANIP_DSCP_TO_VLAN_TRANS         64
858*852ba100SJustin Hibbits 
859*852ba100SJustin Hibbits /**************************************************************************//**
860*852ba100SJustin Hibbits  @Collection    A set of definitions to support Header Manipulation selection.
861*852ba100SJustin Hibbits *//***************************************************************************/
862*852ba100SJustin Hibbits typedef uint32_t                hdrManipFlags_t;            /**< A general type to define a HMan update command flags. */
863*852ba100SJustin Hibbits 
864*852ba100SJustin Hibbits typedef hdrManipFlags_t         ipv4HdrManipUpdateFlags_t;  /**< IPv4 protocol HMan update command flags. */
865*852ba100SJustin Hibbits 
866*852ba100SJustin Hibbits #define HDR_MANIP_IPV4_TOS      0x80000000                  /**< update TOS with the given value ('tos' field
867*852ba100SJustin Hibbits                                                                  of t_FmPcdManipHdrFieldUpdateIpv4) */
868*852ba100SJustin Hibbits #define HDR_MANIP_IPV4_ID       0x40000000                  /**< update IP ID with the given value ('id' field
869*852ba100SJustin Hibbits                                                                  of t_FmPcdManipHdrFieldUpdateIpv4) */
870*852ba100SJustin Hibbits #define HDR_MANIP_IPV4_TTL      0x20000000                  /**< Decrement TTL by 1 */
871*852ba100SJustin Hibbits #define HDR_MANIP_IPV4_SRC      0x10000000                  /**< update IP source address with the given value
872*852ba100SJustin Hibbits                                                                  ('src' field of t_FmPcdManipHdrFieldUpdateIpv4) */
873*852ba100SJustin Hibbits #define HDR_MANIP_IPV4_DST      0x08000000                  /**< update IP destination address with the given value
874*852ba100SJustin Hibbits                                                                  ('dst' field of t_FmPcdManipHdrFieldUpdateIpv4) */
875*852ba100SJustin Hibbits 
876*852ba100SJustin Hibbits typedef hdrManipFlags_t         ipv6HdrManipUpdateFlags_t;  /**< IPv6 protocol HMan update command flags. */
877*852ba100SJustin Hibbits 
878*852ba100SJustin Hibbits #define HDR_MANIP_IPV6_TC       0x80000000                  /**< update Traffic Class address with the given value
879*852ba100SJustin Hibbits                                                                  ('trafficClass' field of t_FmPcdManipHdrFieldUpdateIpv6) */
880*852ba100SJustin Hibbits #define HDR_MANIP_IPV6_HL       0x40000000                  /**< Decrement Hop Limit by 1 */
881*852ba100SJustin Hibbits #define HDR_MANIP_IPV6_SRC      0x20000000                  /**< update IP source address with the given value
882*852ba100SJustin Hibbits                                                                  ('src' field of t_FmPcdManipHdrFieldUpdateIpv6) */
883*852ba100SJustin Hibbits #define HDR_MANIP_IPV6_DST      0x10000000                  /**< update IP destination address with the given value
884*852ba100SJustin Hibbits                                                                  ('dst' field of t_FmPcdManipHdrFieldUpdateIpv6) */
885*852ba100SJustin Hibbits 
886*852ba100SJustin Hibbits typedef hdrManipFlags_t         tcpUdpHdrManipUpdateFlags_t;/**< TCP/UDP protocol HMan update command flags. */
887*852ba100SJustin Hibbits 
888*852ba100SJustin Hibbits #define HDR_MANIP_TCP_UDP_SRC       0x80000000              /**< update TCP/UDP source address with the given value
889*852ba100SJustin Hibbits                                                                  ('src' field of t_FmPcdManipHdrFieldUpdateTcpUdp) */
890*852ba100SJustin Hibbits #define HDR_MANIP_TCP_UDP_DST       0x40000000              /**< update TCP/UDP destination address with the given value
891*852ba100SJustin Hibbits                                                                  ('dst' field of t_FmPcdManipHdrFieldUpdateTcpUdp) */
892*852ba100SJustin Hibbits #define HDR_MANIP_TCP_UDP_CHECKSUM  0x20000000             /**< update TCP/UDP checksum */
893*852ba100SJustin Hibbits 
8940aeed3e9SJustin Hibbits /* @} */
8950aeed3e9SJustin Hibbits 
8960aeed3e9SJustin Hibbits /**************************************************************************//**
8970aeed3e9SJustin Hibbits  @Description   A type used for returning the order of the key extraction.
8980aeed3e9SJustin Hibbits                 each value in this array represents the index of the extraction
8990aeed3e9SJustin Hibbits                 command as defined by the user in the initialization extraction array.
9000aeed3e9SJustin Hibbits                 The valid size of this array is the user define number of extractions
9010aeed3e9SJustin Hibbits                 required (also marked by the second '0' in this array).
9020aeed3e9SJustin Hibbits *//***************************************************************************/
9030aeed3e9SJustin Hibbits typedef    uint8_t    t_FmPcdKgKeyOrder [FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY];
9040aeed3e9SJustin Hibbits 
9050aeed3e9SJustin Hibbits /**************************************************************************//**
9060aeed3e9SJustin Hibbits  @Description   All PCD engines
9070aeed3e9SJustin Hibbits *//***************************************************************************/
9080aeed3e9SJustin Hibbits typedef enum e_FmPcdEngine {
909*852ba100SJustin Hibbits     e_FM_PCD_INVALID = 0,   /**< Invalid PCD engine */
9100aeed3e9SJustin Hibbits     e_FM_PCD_DONE,          /**< No PCD Engine indicated */
911*852ba100SJustin Hibbits     e_FM_PCD_KG,            /**< KeyGen */
912*852ba100SJustin Hibbits     e_FM_PCD_CC,            /**< Coarse classifier */
913*852ba100SJustin Hibbits     e_FM_PCD_PLCR,          /**< Policer */
914*852ba100SJustin Hibbits     e_FM_PCD_PRS,           /**< Parser */
915*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
916*852ba100SJustin Hibbits     e_FM_PCD_FR,            /**< Frame-Replicator */
917*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
918*852ba100SJustin Hibbits     e_FM_PCD_HASH           /**< Hash table */
9190aeed3e9SJustin Hibbits } e_FmPcdEngine;
9200aeed3e9SJustin Hibbits 
9210aeed3e9SJustin Hibbits /**************************************************************************//**
922*852ba100SJustin Hibbits  @Description   Enumeration type for selecting extraction by header types
9230aeed3e9SJustin Hibbits *//***************************************************************************/
9240aeed3e9SJustin Hibbits typedef enum e_FmPcdExtractByHdrType {
9250aeed3e9SJustin Hibbits     e_FM_PCD_EXTRACT_FROM_HDR,      /**< Extract bytes from header */
9260aeed3e9SJustin Hibbits     e_FM_PCD_EXTRACT_FROM_FIELD,    /**< Extract bytes from header field */
9270aeed3e9SJustin Hibbits     e_FM_PCD_EXTRACT_FULL_FIELD     /**< Extract a full field */
9280aeed3e9SJustin Hibbits } e_FmPcdExtractByHdrType;
9290aeed3e9SJustin Hibbits 
9300aeed3e9SJustin Hibbits /**************************************************************************//**
931*852ba100SJustin Hibbits  @Description   Enumeration type for selecting extraction source
9320aeed3e9SJustin Hibbits                 (when it is not the header)
9330aeed3e9SJustin Hibbits *//***************************************************************************/
9340aeed3e9SJustin Hibbits typedef enum e_FmPcdExtractFrom {
9350aeed3e9SJustin Hibbits     e_FM_PCD_EXTRACT_FROM_FRAME_START,          /**< KG & CC: Extract from beginning of frame */
9360aeed3e9SJustin Hibbits     e_FM_PCD_EXTRACT_FROM_DFLT_VALUE,           /**< KG only: Extract from a default value */
937*852ba100SJustin Hibbits     e_FM_PCD_EXTRACT_FROM_CURR_END_OF_PARSE,    /**< KG & CC: Extract from the point where parsing had finished */
9380aeed3e9SJustin Hibbits     e_FM_PCD_EXTRACT_FROM_KEY,                  /**< CC only: Field where saved KEY */
9390aeed3e9SJustin Hibbits     e_FM_PCD_EXTRACT_FROM_HASH,                 /**< CC only: Field where saved HASH */
940*852ba100SJustin Hibbits     e_FM_PCD_EXTRACT_FROM_PARSE_RESULT,         /**< KG only: Extract from the parser result */
9410aeed3e9SJustin Hibbits     e_FM_PCD_EXTRACT_FROM_ENQ_FQID,             /**< KG & CC: Extract from enqueue FQID */
9420aeed3e9SJustin Hibbits     e_FM_PCD_EXTRACT_FROM_FLOW_ID               /**< CC only: Field where saved Dequeue FQID */
9430aeed3e9SJustin Hibbits } e_FmPcdExtractFrom;
9440aeed3e9SJustin Hibbits 
9450aeed3e9SJustin Hibbits /**************************************************************************//**
946*852ba100SJustin Hibbits  @Description   Enumeration type for selecting extraction type
9470aeed3e9SJustin Hibbits *//***************************************************************************/
9480aeed3e9SJustin Hibbits typedef enum e_FmPcdExtractType {
9490aeed3e9SJustin Hibbits     e_FM_PCD_EXTRACT_BY_HDR,                /**< Extract according to header */
9500aeed3e9SJustin Hibbits     e_FM_PCD_EXTRACT_NON_HDR,               /**< Extract from data that is not the header */
9510aeed3e9SJustin Hibbits     e_FM_PCD_KG_EXTRACT_PORT_PRIVATE_INFO   /**< Extract private info as specified by user */
9520aeed3e9SJustin Hibbits } e_FmPcdExtractType;
9530aeed3e9SJustin Hibbits 
9540aeed3e9SJustin Hibbits /**************************************************************************//**
955*852ba100SJustin Hibbits  @Description   Enumeration type for selecting default extraction value
9560aeed3e9SJustin Hibbits *//***************************************************************************/
9570aeed3e9SJustin Hibbits typedef enum e_FmPcdKgExtractDfltSelect {
9580aeed3e9SJustin Hibbits     e_FM_PCD_KG_DFLT_GBL_0,          /**< Default selection is KG register 0 */
9590aeed3e9SJustin Hibbits     e_FM_PCD_KG_DFLT_GBL_1,          /**< Default selection is KG register 1 */
9600aeed3e9SJustin Hibbits     e_FM_PCD_KG_DFLT_PRIVATE_0,      /**< Default selection is a per scheme register 0 */
9610aeed3e9SJustin Hibbits     e_FM_PCD_KG_DFLT_PRIVATE_1,      /**< Default selection is a per scheme register 1 */
9620aeed3e9SJustin Hibbits     e_FM_PCD_KG_DFLT_ILLEGAL         /**< Illegal selection */
9630aeed3e9SJustin Hibbits } e_FmPcdKgExtractDfltSelect;
9640aeed3e9SJustin Hibbits 
9650aeed3e9SJustin Hibbits /**************************************************************************//**
966*852ba100SJustin Hibbits  @Description   Enumeration type defining all default groups - each group shares
967*852ba100SJustin Hibbits                 a default value, one of four user-initialized values.
9680aeed3e9SJustin Hibbits *//***************************************************************************/
9690aeed3e9SJustin Hibbits typedef enum e_FmPcdKgKnownFieldsDfltTypes {
9700aeed3e9SJustin Hibbits     e_FM_PCD_KG_MAC_ADDR,               /**< MAC Address */
9710aeed3e9SJustin Hibbits     e_FM_PCD_KG_TCI,                    /**< TCI field */
9720aeed3e9SJustin Hibbits     e_FM_PCD_KG_ENET_TYPE,              /**< ENET Type */
9730aeed3e9SJustin Hibbits     e_FM_PCD_KG_PPP_SESSION_ID,         /**< PPP Session id */
9740aeed3e9SJustin Hibbits     e_FM_PCD_KG_PPP_PROTOCOL_ID,        /**< PPP Protocol id */
9750aeed3e9SJustin Hibbits     e_FM_PCD_KG_MPLS_LABEL,             /**< MPLS label */
976*852ba100SJustin Hibbits     e_FM_PCD_KG_IP_ADDR,                /**< IP address */
9770aeed3e9SJustin Hibbits     e_FM_PCD_KG_PROTOCOL_TYPE,          /**< Protocol type */
9780aeed3e9SJustin Hibbits     e_FM_PCD_KG_IP_TOS_TC,              /**< TOS or TC */
9790aeed3e9SJustin Hibbits     e_FM_PCD_KG_IPV6_FLOW_LABEL,        /**< IPV6 flow label */
9800aeed3e9SJustin Hibbits     e_FM_PCD_KG_IPSEC_SPI,              /**< IPSEC SPI */
9810aeed3e9SJustin Hibbits     e_FM_PCD_KG_L4_PORT,                /**< L4 Port */
9820aeed3e9SJustin Hibbits     e_FM_PCD_KG_TCP_FLAG,               /**< TCP Flag */
983*852ba100SJustin Hibbits     e_FM_PCD_KG_GENERIC_FROM_DATA,      /**< grouping implemented by SW,
9840aeed3e9SJustin Hibbits                                              any data extraction that is not the full
9850aeed3e9SJustin Hibbits                                              field described above  */
986*852ba100SJustin Hibbits     e_FM_PCD_KG_GENERIC_FROM_DATA_NO_V, /**< grouping implemented by SW,
9870aeed3e9SJustin Hibbits                                              any data extraction without validation */
988*852ba100SJustin Hibbits     e_FM_PCD_KG_GENERIC_NOT_FROM_DATA   /**< grouping implemented by SW,
9890aeed3e9SJustin Hibbits                                              extraction from parser result or
9900aeed3e9SJustin Hibbits                                              direct use of default value  */
9910aeed3e9SJustin Hibbits } e_FmPcdKgKnownFieldsDfltTypes;
9920aeed3e9SJustin Hibbits 
9930aeed3e9SJustin Hibbits /**************************************************************************//**
994*852ba100SJustin Hibbits  @Description   Enumeration type for defining header index for scenarios with
995*852ba100SJustin Hibbits                 multiple (tunneled) headers
9960aeed3e9SJustin Hibbits *//***************************************************************************/
9970aeed3e9SJustin Hibbits typedef enum e_FmPcdHdrIndex {
9980aeed3e9SJustin Hibbits     e_FM_PCD_HDR_INDEX_NONE = 0,        /**< used when multiple headers not used, also
9990aeed3e9SJustin Hibbits                                              to specify regular IP (not tunneled). */
10000aeed3e9SJustin Hibbits     e_FM_PCD_HDR_INDEX_1,               /**< may be used for VLAN, MPLS, tunneled IP */
10010aeed3e9SJustin Hibbits     e_FM_PCD_HDR_INDEX_2,               /**< may be used for MPLS, tunneled IP */
10020aeed3e9SJustin Hibbits     e_FM_PCD_HDR_INDEX_3,               /**< may be used for MPLS */
10030aeed3e9SJustin Hibbits     e_FM_PCD_HDR_INDEX_LAST = 0xFF      /**< may be used for VLAN, MPLS */
10040aeed3e9SJustin Hibbits } e_FmPcdHdrIndex;
10050aeed3e9SJustin Hibbits 
10060aeed3e9SJustin Hibbits /**************************************************************************//**
1007*852ba100SJustin Hibbits  @Description   Enumeration type for selecting the policer profile functional type
10080aeed3e9SJustin Hibbits *//***************************************************************************/
10090aeed3e9SJustin Hibbits typedef enum e_FmPcdProfileTypeSelection {
10100aeed3e9SJustin Hibbits     e_FM_PCD_PLCR_PORT_PRIVATE,         /**< Port dedicated profile */
10110aeed3e9SJustin Hibbits     e_FM_PCD_PLCR_SHARED                /**< Shared profile (shared within partition) */
10120aeed3e9SJustin Hibbits } e_FmPcdProfileTypeSelection;
10130aeed3e9SJustin Hibbits 
10140aeed3e9SJustin Hibbits /**************************************************************************//**
1015*852ba100SJustin Hibbits  @Description   Enumeration type for selecting the policer profile algorithm
10160aeed3e9SJustin Hibbits *//***************************************************************************/
10170aeed3e9SJustin Hibbits typedef enum e_FmPcdPlcrAlgorithmSelection {
10180aeed3e9SJustin Hibbits     e_FM_PCD_PLCR_PASS_THROUGH,         /**< Policer pass through */
1019*852ba100SJustin Hibbits     e_FM_PCD_PLCR_RFC_2698,             /**< Policer algorithm RFC 2698 */
1020*852ba100SJustin Hibbits     e_FM_PCD_PLCR_RFC_4115              /**< Policer algorithm RFC 4115 */
10210aeed3e9SJustin Hibbits } e_FmPcdPlcrAlgorithmSelection;
10220aeed3e9SJustin Hibbits 
10230aeed3e9SJustin Hibbits /**************************************************************************//**
1024*852ba100SJustin Hibbits  @Description   Enumeration type for selecting a policer profile color mode
10250aeed3e9SJustin Hibbits *//***************************************************************************/
10260aeed3e9SJustin Hibbits typedef enum e_FmPcdPlcrColorMode {
10270aeed3e9SJustin Hibbits     e_FM_PCD_PLCR_COLOR_BLIND,          /**< Color blind */
10280aeed3e9SJustin Hibbits     e_FM_PCD_PLCR_COLOR_AWARE           /**< Color aware */
10290aeed3e9SJustin Hibbits } e_FmPcdPlcrColorMode;
10300aeed3e9SJustin Hibbits 
10310aeed3e9SJustin Hibbits /**************************************************************************//**
1032*852ba100SJustin Hibbits  @Description   Enumeration type for selecting a policer profile color
10330aeed3e9SJustin Hibbits *//***************************************************************************/
10340aeed3e9SJustin Hibbits typedef enum e_FmPcdPlcrColor {
1035*852ba100SJustin Hibbits     e_FM_PCD_PLCR_GREEN,                /**< Green color code */
1036*852ba100SJustin Hibbits     e_FM_PCD_PLCR_YELLOW,               /**< Yellow color code */
1037*852ba100SJustin Hibbits     e_FM_PCD_PLCR_RED,                  /**< Red color code */
1038*852ba100SJustin Hibbits     e_FM_PCD_PLCR_OVERRIDE              /**< Color override code */
10390aeed3e9SJustin Hibbits } e_FmPcdPlcrColor;
10400aeed3e9SJustin Hibbits 
10410aeed3e9SJustin Hibbits /**************************************************************************//**
1042*852ba100SJustin Hibbits  @Description   Enumeration type for selecting the policer profile packet frame length selector
10430aeed3e9SJustin Hibbits *//***************************************************************************/
10440aeed3e9SJustin Hibbits typedef enum e_FmPcdPlcrFrameLengthSelect {
10450aeed3e9SJustin Hibbits   e_FM_PCD_PLCR_L2_FRM_LEN,             /**< L2 frame length */
10460aeed3e9SJustin Hibbits   e_FM_PCD_PLCR_L3_FRM_LEN,             /**< L3 frame length */
10470aeed3e9SJustin Hibbits   e_FM_PCD_PLCR_L4_FRM_LEN,             /**< L4 frame length */
10480aeed3e9SJustin Hibbits   e_FM_PCD_PLCR_FULL_FRM_LEN            /**< Full frame length */
10490aeed3e9SJustin Hibbits } e_FmPcdPlcrFrameLengthSelect;
10500aeed3e9SJustin Hibbits 
10510aeed3e9SJustin Hibbits /**************************************************************************//**
1052*852ba100SJustin Hibbits  @Description   Enumeration type for selecting roll-back frame
10530aeed3e9SJustin Hibbits *//***************************************************************************/
10540aeed3e9SJustin Hibbits typedef enum e_FmPcdPlcrRollBackFrameSelect {
1055*852ba100SJustin Hibbits   e_FM_PCD_PLCR_ROLLBACK_L2_FRM_LEN,    /**< Roll-back L2 frame length */
1056*852ba100SJustin Hibbits   e_FM_PCD_PLCR_ROLLBACK_FULL_FRM_LEN   /**< Roll-back Full frame length */
10570aeed3e9SJustin Hibbits } e_FmPcdPlcrRollBackFrameSelect;
10580aeed3e9SJustin Hibbits 
10590aeed3e9SJustin Hibbits /**************************************************************************//**
1060*852ba100SJustin Hibbits  @Description   Enumeration type for selecting the policer profile packet or byte mode
10610aeed3e9SJustin Hibbits *//***************************************************************************/
10620aeed3e9SJustin Hibbits typedef enum e_FmPcdPlcrRateMode {
10630aeed3e9SJustin Hibbits     e_FM_PCD_PLCR_BYTE_MODE,            /**< Byte mode */
10640aeed3e9SJustin Hibbits     e_FM_PCD_PLCR_PACKET_MODE           /**< Packet mode */
10650aeed3e9SJustin Hibbits } e_FmPcdPlcrRateMode;
10660aeed3e9SJustin Hibbits 
10670aeed3e9SJustin Hibbits /**************************************************************************//**
1068*852ba100SJustin Hibbits  @Description   Enumeration type for defining action of frame
10690aeed3e9SJustin Hibbits *//***************************************************************************/
10700aeed3e9SJustin Hibbits typedef enum e_FmPcdDoneAction {
10710aeed3e9SJustin Hibbits     e_FM_PCD_ENQ_FRAME = 0,        /**< Enqueue frame */
1072*852ba100SJustin Hibbits     e_FM_PCD_DROP_FRAME            /**< Mark this frame as error frame and continue
1073*852ba100SJustin Hibbits                                         to error flow; 'FM_PORT_FRM_ERR_CLS_DISCARD'
1074*852ba100SJustin Hibbits                                         flag will be set for this frame. */
10750aeed3e9SJustin Hibbits } e_FmPcdDoneAction;
10760aeed3e9SJustin Hibbits 
10770aeed3e9SJustin Hibbits /**************************************************************************//**
1078*852ba100SJustin Hibbits  @Description   Enumeration type for selecting the policer counter
10790aeed3e9SJustin Hibbits *//***************************************************************************/
10800aeed3e9SJustin Hibbits typedef enum e_FmPcdPlcrProfileCounters {
10810aeed3e9SJustin Hibbits     e_FM_PCD_PLCR_PROFILE_GREEN_PACKET_TOTAL_COUNTER,               /**< Green packets counter */
10820aeed3e9SJustin Hibbits     e_FM_PCD_PLCR_PROFILE_YELLOW_PACKET_TOTAL_COUNTER,              /**< Yellow packets counter */
10830aeed3e9SJustin Hibbits     e_FM_PCD_PLCR_PROFILE_RED_PACKET_TOTAL_COUNTER,                 /**< Red packets counter */
10840aeed3e9SJustin Hibbits     e_FM_PCD_PLCR_PROFILE_RECOLOURED_YELLOW_PACKET_TOTAL_COUNTER,   /**< Recolored yellow packets counter */
10850aeed3e9SJustin Hibbits     e_FM_PCD_PLCR_PROFILE_RECOLOURED_RED_PACKET_TOTAL_COUNTER       /**< Recolored red packets counter */
10860aeed3e9SJustin Hibbits } e_FmPcdPlcrProfileCounters;
10870aeed3e9SJustin Hibbits 
10880aeed3e9SJustin Hibbits /**************************************************************************//**
1089*852ba100SJustin Hibbits  @Description   Enumeration type for selecting the PCD action after extraction
10900aeed3e9SJustin Hibbits *//***************************************************************************/
10910aeed3e9SJustin Hibbits typedef enum e_FmPcdAction {
10920aeed3e9SJustin Hibbits     e_FM_PCD_ACTION_NONE,                           /**< NONE  */
10930aeed3e9SJustin Hibbits     e_FM_PCD_ACTION_EXACT_MATCH,                    /**< Exact match on the selected extraction */
10940aeed3e9SJustin Hibbits     e_FM_PCD_ACTION_INDEXED_LOOKUP                  /**< Indexed lookup on the selected extraction */
10950aeed3e9SJustin Hibbits } e_FmPcdAction;
10960aeed3e9SJustin Hibbits 
10970aeed3e9SJustin Hibbits /**************************************************************************//**
1098*852ba100SJustin Hibbits  @Description   Enumeration type for selecting type of insert manipulation
10990aeed3e9SJustin Hibbits *//***************************************************************************/
1100*852ba100SJustin Hibbits typedef enum e_FmPcdManipHdrInsrtType {
1101*852ba100SJustin Hibbits     e_FM_PCD_MANIP_INSRT_GENERIC,                   /**< Insert according to offset & size */
1102*852ba100SJustin Hibbits     e_FM_PCD_MANIP_INSRT_BY_HDR,                    /**< Insert according to protocol */
1103*852ba100SJustin Hibbits #if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
1104*852ba100SJustin Hibbits     e_FM_PCD_MANIP_INSRT_BY_TEMPLATE                /**< Insert template to start of frame */
1105*852ba100SJustin Hibbits #endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */
1106*852ba100SJustin Hibbits } e_FmPcdManipHdrInsrtType;
11070aeed3e9SJustin Hibbits 
11080aeed3e9SJustin Hibbits /**************************************************************************//**
1109*852ba100SJustin Hibbits  @Description   Enumeration type for selecting type of remove manipulation
11100aeed3e9SJustin Hibbits *//***************************************************************************/
1111*852ba100SJustin Hibbits typedef enum e_FmPcdManipHdrRmvType {
1112*852ba100SJustin Hibbits     e_FM_PCD_MANIP_RMV_GENERIC,                     /**< Remove according to offset & size */
1113*852ba100SJustin Hibbits     e_FM_PCD_MANIP_RMV_BY_HDR                       /**< Remove according to offset & size */
1114*852ba100SJustin Hibbits } e_FmPcdManipHdrRmvType;
11150aeed3e9SJustin Hibbits 
11160aeed3e9SJustin Hibbits /**************************************************************************//**
1117*852ba100SJustin Hibbits  @Description   Enumeration type for selecting specific L2 fields removal
11180aeed3e9SJustin Hibbits *//***************************************************************************/
1119*852ba100SJustin Hibbits typedef enum e_FmPcdManipHdrRmvSpecificL2 {
1120*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_RMV_ETHERNET,                /**< Ethernet/802.3 MAC */
1121*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_RMV_STACKED_QTAGS,           /**< stacked QTags */
1122*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_RMV_ETHERNET_AND_MPLS,       /**< MPLS and Ethernet/802.3 MAC header until
1123*852ba100SJustin Hibbits                                                          the header which follows the MPLS header */
1124*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_RMV_MPLS,                     /**< Remove MPLS header (Unlimited MPLS labels) */
1125*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_RMV_PPPOE                     /**< Remove the PPPoE header and PPP protocol field. */
1126*852ba100SJustin Hibbits } e_FmPcdManipHdrRmvSpecificL2;
11270aeed3e9SJustin Hibbits 
11280aeed3e9SJustin Hibbits /**************************************************************************//**
1129*852ba100SJustin Hibbits  @Description   Enumeration type for selecting specific fields updates
1130*852ba100SJustin Hibbits *//***************************************************************************/
1131*852ba100SJustin Hibbits typedef enum e_FmPcdManipHdrFieldUpdateType {
1132*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN,               /**< VLAN updates */
1133*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV4,               /**< IPV4 updates */
1134*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV6,               /**< IPV6 updates */
1135*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_FIELD_UPDATE_TCP_UDP,            /**< TCP_UDP updates */
1136*852ba100SJustin Hibbits } e_FmPcdManipHdrFieldUpdateType;
1137*852ba100SJustin Hibbits 
1138*852ba100SJustin Hibbits /**************************************************************************//**
1139*852ba100SJustin Hibbits  @Description   Enumeration type for selecting VLAN updates
1140*852ba100SJustin Hibbits *//***************************************************************************/
1141*852ba100SJustin Hibbits typedef enum e_FmPcdManipHdrFieldUpdateVlan {
1142*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN_VPRI,      /**< Replace VPri of outer most VLAN tag. */
1143*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN    /**< DSCP to VLAN priority bits translation */
1144*852ba100SJustin Hibbits } e_FmPcdManipHdrFieldUpdateVlan;
1145*852ba100SJustin Hibbits 
1146*852ba100SJustin Hibbits /**************************************************************************//**
1147*852ba100SJustin Hibbits  @Description   Enumeration type for selecting specific L2 header insertion
1148*852ba100SJustin Hibbits *//***************************************************************************/
1149*852ba100SJustin Hibbits typedef enum e_FmPcdManipHdrInsrtSpecificL2 {
1150*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_INSRT_MPLS,                   /**< Insert MPLS header (Unlimited MPLS labels) */
1151*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_INSRT_PPPOE                   /**< Insert PPPOE */
1152*852ba100SJustin Hibbits } e_FmPcdManipHdrInsrtSpecificL2;
1153*852ba100SJustin Hibbits 
1154*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
1155*852ba100SJustin Hibbits /**************************************************************************//**
1156*852ba100SJustin Hibbits  @Description   Enumeration type for selecting QoS mapping mode
1157*852ba100SJustin Hibbits 
1158*852ba100SJustin Hibbits                 Note: In all cases except 'e_FM_PCD_MANIP_HDR_QOS_MAPPING_NONE'
1159*852ba100SJustin Hibbits                 User should instruct the port to read the hash-result
1160*852ba100SJustin Hibbits *//***************************************************************************/
1161*852ba100SJustin Hibbits typedef enum e_FmPcdManipHdrQosMappingMode {
1162*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_QOS_MAPPING_NONE = 0,   /**< No mapping, QoS field will not be changed */
1163*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_QOS_MAPPING_AS_IS, /**< QoS field will be overwritten by the last byte in the hash-result. */
1164*852ba100SJustin Hibbits } e_FmPcdManipHdrQosMappingMode;
1165*852ba100SJustin Hibbits 
1166*852ba100SJustin Hibbits /**************************************************************************//**
1167*852ba100SJustin Hibbits  @Description   Enumeration type for selecting QoS source
1168*852ba100SJustin Hibbits 
1169*852ba100SJustin Hibbits                 Note: In all cases except 'e_FM_PCD_MANIP_HDR_QOS_SRC_NONE'
1170*852ba100SJustin Hibbits                 User should left room for the hash-result on input/output buffer
1171*852ba100SJustin Hibbits                 and instruct the port to read/write the hash-result to the buffer (RPD should be set)
1172*852ba100SJustin Hibbits *//***************************************************************************/
1173*852ba100SJustin Hibbits typedef enum e_FmPcdManipHdrQosSrc {
1174*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_QOS_SRC_NONE = 0,        /**< TODO */
1175*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_QOS_SRC_USER_DEFINED,    /**< QoS will be taken from the last byte in the hash-result. */
1176*852ba100SJustin Hibbits } e_FmPcdManipHdrQosSrc;
1177*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
1178*852ba100SJustin Hibbits 
1179*852ba100SJustin Hibbits /**************************************************************************//**
1180*852ba100SJustin Hibbits  @Description   Enumeration type for selecting type of header insertion
1181*852ba100SJustin Hibbits *//***************************************************************************/
1182*852ba100SJustin Hibbits typedef enum e_FmPcdManipHdrInsrtByHdrType {
1183*852ba100SJustin Hibbits     e_FM_PCD_MANIP_INSRT_BY_HDR_SPECIFIC_L2,        /**< Specific L2 fields insertion */
1184*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
1185*852ba100SJustin Hibbits     e_FM_PCD_MANIP_INSRT_BY_HDR_IP,                 /**< IP insertion */
1186*852ba100SJustin Hibbits     e_FM_PCD_MANIP_INSRT_BY_HDR_UDP,                /**< UDP insertion */
1187*852ba100SJustin Hibbits     e_FM_PCD_MANIP_INSRT_BY_HDR_UDP_LITE,             /**< UDP lite insertion */
1188*852ba100SJustin Hibbits     e_FM_PCD_MANIP_INSRT_BY_HDR_CAPWAP                 /**< CAPWAP insertion */
1189*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
1190*852ba100SJustin Hibbits } e_FmPcdManipHdrInsrtByHdrType;
1191*852ba100SJustin Hibbits 
1192*852ba100SJustin Hibbits /**************************************************************************//**
1193*852ba100SJustin Hibbits  @Description   Enumeration type for selecting specific customCommand
1194*852ba100SJustin Hibbits *//***************************************************************************/
1195*852ba100SJustin Hibbits typedef enum e_FmPcdManipHdrCustomType {
1196*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_CUSTOM_IP_REPLACE,           /**< Replace IPv4/IPv6 */
1197*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_CUSTOM_GEN_FIELD_REPLACE,     /**< Replace IPv4/IPv6 */
1198*852ba100SJustin Hibbits } e_FmPcdManipHdrCustomType;
1199*852ba100SJustin Hibbits 
1200*852ba100SJustin Hibbits /**************************************************************************//**
1201*852ba100SJustin Hibbits  @Description   Enumeration type for selecting specific customCommand
1202*852ba100SJustin Hibbits *//***************************************************************************/
1203*852ba100SJustin Hibbits typedef enum e_FmPcdManipHdrCustomIpReplace {
1204*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV4_BY_IPV6,           /**< Replace IPv4 by IPv6 */
1205*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV6_BY_IPV4            /**< Replace IPv6 by IPv4 */
1206*852ba100SJustin Hibbits } e_FmPcdManipHdrCustomIpReplace;
1207*852ba100SJustin Hibbits 
1208*852ba100SJustin Hibbits /**************************************************************************//**
1209*852ba100SJustin Hibbits  @Description   Enumeration type for selecting type of header removal
1210*852ba100SJustin Hibbits *//***************************************************************************/
1211*852ba100SJustin Hibbits typedef enum e_FmPcdManipHdrRmvByHdrType {
1212*852ba100SJustin Hibbits     e_FM_PCD_MANIP_RMV_BY_HDR_SPECIFIC_L2 = 0,      /**< Specific L2 fields removal */
1213*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
1214*852ba100SJustin Hibbits     e_FM_PCD_MANIP_RMV_BY_HDR_CAPWAP,                  /**< CAPWAP removal */
1215*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
1216*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11) || ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
1217*852ba100SJustin Hibbits     e_FM_PCD_MANIP_RMV_BY_HDR_FROM_START,           /**< Locate from data that is not the header */
1218*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) || ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */
1219*852ba100SJustin Hibbits } e_FmPcdManipHdrRmvByHdrType;
1220*852ba100SJustin Hibbits 
1221*852ba100SJustin Hibbits /**************************************************************************//**
1222*852ba100SJustin Hibbits  @Description   Enumeration type for selecting type of timeout mode
12230aeed3e9SJustin Hibbits *//***************************************************************************/
12240aeed3e9SJustin Hibbits typedef enum e_FmPcdManipReassemTimeOutMode {
1225*852ba100SJustin Hibbits     e_FM_PCD_MANIP_TIME_OUT_BETWEEN_FRAMES, /**< Limits the time of the reassembly process
1226*852ba100SJustin Hibbits                                                  from the first fragment to the last */
1227*852ba100SJustin Hibbits     e_FM_PCD_MANIP_TIME_OUT_BETWEEN_FRAG    /**< Limits the time of receiving the fragment */
12280aeed3e9SJustin Hibbits } e_FmPcdManipReassemTimeOutMode;
12290aeed3e9SJustin Hibbits 
12300aeed3e9SJustin Hibbits /**************************************************************************//**
1231*852ba100SJustin Hibbits  @Description   Enumeration type for selecting type of WaysNumber mode
12320aeed3e9SJustin Hibbits *//***************************************************************************/
12330aeed3e9SJustin Hibbits typedef enum e_FmPcdManipReassemWaysNumber {
1234*852ba100SJustin Hibbits     e_FM_PCD_MANIP_ONE_WAY_HASH = 1,    /**< One way hash    */
1235*852ba100SJustin Hibbits     e_FM_PCD_MANIP_TWO_WAYS_HASH,       /**< Two ways hash   */
1236*852ba100SJustin Hibbits     e_FM_PCD_MANIP_THREE_WAYS_HASH,     /**< Three ways hash */
1237*852ba100SJustin Hibbits     e_FM_PCD_MANIP_FOUR_WAYS_HASH,      /**< Four ways hash  */
1238*852ba100SJustin Hibbits     e_FM_PCD_MANIP_FIVE_WAYS_HASH,      /**< Five ways hash  */
1239*852ba100SJustin Hibbits     e_FM_PCD_MANIP_SIX_WAYS_HASH,       /**< Six ways hash   */
1240*852ba100SJustin Hibbits     e_FM_PCD_MANIP_SEVEN_WAYS_HASH,     /**< Seven ways hash */
1241*852ba100SJustin Hibbits     e_FM_PCD_MANIP_EIGHT_WAYS_HASH      /**< Eight ways hash */
12420aeed3e9SJustin Hibbits } e_FmPcdManipReassemWaysNumber;
12430aeed3e9SJustin Hibbits 
1244*852ba100SJustin Hibbits #if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
12450aeed3e9SJustin Hibbits /**************************************************************************//**
1246*852ba100SJustin Hibbits  @Description   Enumeration type for selecting type of statistics mode
12470aeed3e9SJustin Hibbits *//***************************************************************************/
12480aeed3e9SJustin Hibbits typedef enum e_FmPcdStatsType {
1249*852ba100SJustin Hibbits     e_FM_PCD_STATS_PER_FLOWID = 0       /**< Flow ID is used as index for getting statistics */
12500aeed3e9SJustin Hibbits } e_FmPcdStatsType;
1251*852ba100SJustin Hibbits #endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */
12520aeed3e9SJustin Hibbits 
1253*852ba100SJustin Hibbits /**************************************************************************//**
1254*852ba100SJustin Hibbits  @Description   Enumeration type for selecting manipulation type
1255*852ba100SJustin Hibbits *//***************************************************************************/
1256*852ba100SJustin Hibbits typedef enum e_FmPcdManipType {
1257*852ba100SJustin Hibbits     e_FM_PCD_MANIP_HDR = 0,             /**< Header manipulation */
1258*852ba100SJustin Hibbits     e_FM_PCD_MANIP_REASSEM,             /**< Reassembly */
1259*852ba100SJustin Hibbits     e_FM_PCD_MANIP_FRAG,                /**< Fragmentation */
1260*852ba100SJustin Hibbits     e_FM_PCD_MANIP_SPECIAL_OFFLOAD      /**< Special Offloading */
1261*852ba100SJustin Hibbits } e_FmPcdManipType;
1262*852ba100SJustin Hibbits 
1263*852ba100SJustin Hibbits /**************************************************************************//**
1264*852ba100SJustin Hibbits  @Description   Enumeration type for selecting type of statistics mode
1265*852ba100SJustin Hibbits *//***************************************************************************/
1266*852ba100SJustin Hibbits typedef enum e_FmPcdCcStatsMode {
1267*852ba100SJustin Hibbits     e_FM_PCD_CC_STATS_MODE_NONE = 0,        /**< No statistics support */
1268*852ba100SJustin Hibbits     e_FM_PCD_CC_STATS_MODE_FRAME,           /**< Frame count statistics */
1269*852ba100SJustin Hibbits     e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME,  /**< Byte and frame count statistics */
1270*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
1271*852ba100SJustin Hibbits     e_FM_PCD_CC_STATS_MODE_RMON,            /**< Byte and frame length range count statistics;
1272*852ba100SJustin Hibbits                                                  This mode is supported only on B4860 device */
1273*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
1274*852ba100SJustin Hibbits } e_FmPcdCcStatsMode;
1275*852ba100SJustin Hibbits 
1276*852ba100SJustin Hibbits /**************************************************************************//**
1277*852ba100SJustin Hibbits  @Description   Enumeration type for determining the action in case an IP packet
1278*852ba100SJustin Hibbits                 is larger than MTU but its DF (Don't Fragment) bit is set.
1279*852ba100SJustin Hibbits *//***************************************************************************/
1280*852ba100SJustin Hibbits typedef enum e_FmPcdManipDontFragAction {
1281*852ba100SJustin Hibbits     e_FM_PCD_MANIP_DISCARD_PACKET = 0,                  /**< Discard packet */
1282*852ba100SJustin Hibbits     e_FM_PCD_MANIP_ENQ_TO_ERR_Q_OR_DISCARD_PACKET = e_FM_PCD_MANIP_DISCARD_PACKET,
1283*852ba100SJustin Hibbits                                                         /**< Obsolete, cannot enqueue to error queue;
1284*852ba100SJustin Hibbits                                                              In practice, selects to discard packets;
1285*852ba100SJustin Hibbits                                                              Will be removed in the future */
1286*852ba100SJustin Hibbits     e_FM_PCD_MANIP_FRAGMENT_PACKET,                     /**< Fragment packet and continue normal processing */
1287*852ba100SJustin Hibbits     e_FM_PCD_MANIP_CONTINUE_WITHOUT_FRAG                /**< Continue normal processing without fragmenting the packet */
1288*852ba100SJustin Hibbits } e_FmPcdManipDontFragAction;
1289*852ba100SJustin Hibbits 
1290*852ba100SJustin Hibbits /**************************************************************************//**
1291*852ba100SJustin Hibbits  @Description   Enumeration type for selecting type of special offload manipulation
1292*852ba100SJustin Hibbits *//***************************************************************************/
1293*852ba100SJustin Hibbits typedef enum e_FmPcdManipSpecialOffloadType {
1294*852ba100SJustin Hibbits     e_FM_PCD_MANIP_SPECIAL_OFFLOAD_IPSEC,    /**< IPSec offload manipulation */
1295*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
1296*852ba100SJustin Hibbits     e_FM_PCD_MANIP_SPECIAL_OFFLOAD_CAPWAP    /**< CAPWAP offload manipulation */
1297*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
1298*852ba100SJustin Hibbits } e_FmPcdManipSpecialOffloadType;
12990aeed3e9SJustin Hibbits 
13000aeed3e9SJustin Hibbits 
13010aeed3e9SJustin Hibbits /**************************************************************************//**
13020aeed3e9SJustin Hibbits  @Description   A Union of protocol dependent special options
13030aeed3e9SJustin Hibbits *//***************************************************************************/
13040aeed3e9SJustin Hibbits typedef union u_FmPcdHdrProtocolOpt {
13050aeed3e9SJustin Hibbits     ethProtocolOpt_t    ethOpt;     /**< Ethernet options */
1306*852ba100SJustin Hibbits     vlanProtocolOpt_t   vlanOpt;    /**< VLAN options */
13070aeed3e9SJustin Hibbits     mplsProtocolOpt_t   mplsOpt;    /**< MPLS options */
13080aeed3e9SJustin Hibbits     ipv4ProtocolOpt_t   ipv4Opt;    /**< IPv4 options */
13090aeed3e9SJustin Hibbits     ipv6ProtocolOpt_t   ipv6Opt;    /**< IPv6 options */
1310*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
1311*852ba100SJustin Hibbits     capwapProtocolOpt_t capwapOpt;  /**< CAPWAP options */
1312*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
13130aeed3e9SJustin Hibbits } u_FmPcdHdrProtocolOpt;
13140aeed3e9SJustin Hibbits 
13150aeed3e9SJustin Hibbits /**************************************************************************//**
1316*852ba100SJustin Hibbits  @Description   A union holding protocol fields
1317*852ba100SJustin Hibbits 
1318*852ba100SJustin Hibbits 
1319*852ba100SJustin Hibbits                 Fields supported as "full fields":
1320*852ba100SJustin Hibbits                     HEADER_TYPE_ETH:
1321*852ba100SJustin Hibbits                         NET_HEADER_FIELD_ETH_DA
1322*852ba100SJustin Hibbits                         NET_HEADER_FIELD_ETH_SA
1323*852ba100SJustin Hibbits                         NET_HEADER_FIELD_ETH_TYPE
1324*852ba100SJustin Hibbits 
1325*852ba100SJustin Hibbits                     HEADER_TYPE_LLC_SNAP:
1326*852ba100SJustin Hibbits                         NET_HEADER_FIELD_LLC_SNAP_TYPE
1327*852ba100SJustin Hibbits 
1328*852ba100SJustin Hibbits                     HEADER_TYPE_VLAN:
1329*852ba100SJustin Hibbits                         NET_HEADER_FIELD_VLAN_TCI
1330*852ba100SJustin Hibbits                                 (index may apply:
1331*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,
1332*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_LAST)
1333*852ba100SJustin Hibbits 
1334*852ba100SJustin Hibbits                     HEADER_TYPE_MPLS:
1335*852ba100SJustin Hibbits                         NET_HEADER_FIELD_MPLS_LABEL_STACK
1336*852ba100SJustin Hibbits                                 (index may apply:
1337*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,
1338*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_2,
1339*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_LAST)
1340*852ba100SJustin Hibbits 
1341*852ba100SJustin Hibbits                     HEADER_TYPE_IPv4:
1342*852ba100SJustin Hibbits                         NET_HEADER_FIELD_IPv4_SRC_IP
1343*852ba100SJustin Hibbits                         NET_HEADER_FIELD_IPv4_DST_IP
1344*852ba100SJustin Hibbits                         NET_HEADER_FIELD_IPv4_PROTO
1345*852ba100SJustin Hibbits                         NET_HEADER_FIELD_IPv4_TOS
1346*852ba100SJustin Hibbits                                 (index may apply:
1347*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,
1348*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_2/e_FM_PCD_HDR_INDEX_LAST)
1349*852ba100SJustin Hibbits 
1350*852ba100SJustin Hibbits                     HEADER_TYPE_IPv6:
1351*852ba100SJustin Hibbits                         NET_HEADER_FIELD_IPv6_SRC_IP
1352*852ba100SJustin Hibbits                         NET_HEADER_FIELD_IPv6_DST_IP
1353*852ba100SJustin Hibbits                         NET_HEADER_FIELD_IPv6_NEXT_HDR
1354*852ba100SJustin Hibbits                         NET_HEADER_FIELD_IPv6_VER | NET_HEADER_FIELD_IPv6_FL | NET_HEADER_FIELD_IPv6_TC (must come together!)
1355*852ba100SJustin Hibbits                                 (index may apply:
1356*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,
1357*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_2/e_FM_PCD_HDR_INDEX_LAST)
1358*852ba100SJustin Hibbits 
1359*852ba100SJustin Hibbits                                 (Note that starting from DPAA 1-1, NET_HEADER_FIELD_IPv6_NEXT_HDR applies to
1360*852ba100SJustin Hibbits                                  the last next header indication, meaning the next L4, which may be
1361*852ba100SJustin Hibbits                                  present at the Ipv6 last extension. On earlier revisions this field
1362*852ba100SJustin Hibbits                                  applies to the Next-Header field of the main IPv6 header)
1363*852ba100SJustin Hibbits 
1364*852ba100SJustin Hibbits                     HEADER_TYPE_IP:
1365*852ba100SJustin Hibbits                         NET_HEADER_FIELD_IP_PROTO
1366*852ba100SJustin Hibbits                                 (index may apply:
1367*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_LAST)
1368*852ba100SJustin Hibbits                         NET_HEADER_FIELD_IP_DSCP
1369*852ba100SJustin Hibbits                                 (index may apply:
1370*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1)
1371*852ba100SJustin Hibbits                     HEADER_TYPE_GRE:
1372*852ba100SJustin Hibbits                         NET_HEADER_FIELD_GRE_TYPE
1373*852ba100SJustin Hibbits 
1374*852ba100SJustin Hibbits                     HEADER_TYPE_MINENCAP
1375*852ba100SJustin Hibbits                         NET_HEADER_FIELD_MINENCAP_SRC_IP
1376*852ba100SJustin Hibbits                         NET_HEADER_FIELD_MINENCAP_DST_IP
1377*852ba100SJustin Hibbits                         NET_HEADER_FIELD_MINENCAP_TYPE
1378*852ba100SJustin Hibbits 
1379*852ba100SJustin Hibbits                     HEADER_TYPE_TCP:
1380*852ba100SJustin Hibbits                         NET_HEADER_FIELD_TCP_PORT_SRC
1381*852ba100SJustin Hibbits                         NET_HEADER_FIELD_TCP_PORT_DST
1382*852ba100SJustin Hibbits                         NET_HEADER_FIELD_TCP_FLAGS
1383*852ba100SJustin Hibbits 
1384*852ba100SJustin Hibbits                     HEADER_TYPE_UDP:
1385*852ba100SJustin Hibbits                         NET_HEADER_FIELD_UDP_PORT_SRC
1386*852ba100SJustin Hibbits                         NET_HEADER_FIELD_UDP_PORT_DST
1387*852ba100SJustin Hibbits 
1388*852ba100SJustin Hibbits                     HEADER_TYPE_UDP_LITE:
1389*852ba100SJustin Hibbits                         NET_HEADER_FIELD_UDP_LITE_PORT_SRC
1390*852ba100SJustin Hibbits                         NET_HEADER_FIELD_UDP_LITE_PORT_DST
1391*852ba100SJustin Hibbits 
1392*852ba100SJustin Hibbits                     HEADER_TYPE_IPSEC_AH:
1393*852ba100SJustin Hibbits                         NET_HEADER_FIELD_IPSEC_AH_SPI
1394*852ba100SJustin Hibbits                         NET_HEADER_FIELD_IPSEC_AH_NH
1395*852ba100SJustin Hibbits 
1396*852ba100SJustin Hibbits                     HEADER_TYPE_IPSEC_ESP:
1397*852ba100SJustin Hibbits                         NET_HEADER_FIELD_IPSEC_ESP_SPI
1398*852ba100SJustin Hibbits 
1399*852ba100SJustin Hibbits                     HEADER_TYPE_SCTP:
1400*852ba100SJustin Hibbits                         NET_HEADER_FIELD_SCTP_PORT_SRC
1401*852ba100SJustin Hibbits                         NET_HEADER_FIELD_SCTP_PORT_DST
1402*852ba100SJustin Hibbits 
1403*852ba100SJustin Hibbits                     HEADER_TYPE_DCCP:
1404*852ba100SJustin Hibbits                         NET_HEADER_FIELD_DCCP_PORT_SRC
1405*852ba100SJustin Hibbits                         NET_HEADER_FIELD_DCCP_PORT_DST
1406*852ba100SJustin Hibbits 
1407*852ba100SJustin Hibbits                     HEADER_TYPE_PPPoE:
1408*852ba100SJustin Hibbits                         NET_HEADER_FIELD_PPPoE_PID
1409*852ba100SJustin Hibbits                         NET_HEADER_FIELD_PPPoE_SID
1410*852ba100SJustin Hibbits 
1411*852ba100SJustin Hibbits         *****************************************************************
1412*852ba100SJustin Hibbits                 Fields supported as "from fields":
1413*852ba100SJustin Hibbits                     HEADER_TYPE_ETH (with or without validation):
1414*852ba100SJustin Hibbits                         NET_HEADER_FIELD_ETH_TYPE
1415*852ba100SJustin Hibbits 
1416*852ba100SJustin Hibbits                     HEADER_TYPE_VLAN (with or without validation):
1417*852ba100SJustin Hibbits                         NET_HEADER_FIELD_VLAN_TCI
1418*852ba100SJustin Hibbits                                 (index may apply:
1419*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,
1420*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_LAST)
1421*852ba100SJustin Hibbits 
1422*852ba100SJustin Hibbits                     HEADER_TYPE_IPv4 (without validation):
1423*852ba100SJustin Hibbits                         NET_HEADER_FIELD_IPv4_PROTO
1424*852ba100SJustin Hibbits                                 (index may apply:
1425*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,
1426*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_2/e_FM_PCD_HDR_INDEX_LAST)
1427*852ba100SJustin Hibbits 
1428*852ba100SJustin Hibbits                     HEADER_TYPE_IPv6 (without validation):
1429*852ba100SJustin Hibbits                         NET_HEADER_FIELD_IPv6_NEXT_HDR
1430*852ba100SJustin Hibbits                                 (index may apply:
1431*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,
1432*852ba100SJustin Hibbits                                  e_FM_PCD_HDR_INDEX_2/e_FM_PCD_HDR_INDEX_LAST)
1433*852ba100SJustin Hibbits 
14340aeed3e9SJustin Hibbits *//***************************************************************************/
14350aeed3e9SJustin Hibbits typedef union t_FmPcdFields {
1436*852ba100SJustin Hibbits     headerFieldEth_t            eth;            /**< Ethernet               */
1437*852ba100SJustin Hibbits     headerFieldVlan_t           vlan;           /**< VLAN                   */
1438*852ba100SJustin Hibbits     headerFieldLlcSnap_t        llcSnap;        /**< LLC SNAP               */
1439*852ba100SJustin Hibbits     headerFieldPppoe_t          pppoe;          /**< PPPoE                  */
1440*852ba100SJustin Hibbits     headerFieldMpls_t           mpls;           /**< MPLS                   */
1441*852ba100SJustin Hibbits     headerFieldIp_t             ip;             /**< IP                     */
1442*852ba100SJustin Hibbits     headerFieldIpv4_t           ipv4;           /**< IPv4                   */
1443*852ba100SJustin Hibbits     headerFieldIpv6_t           ipv6;           /**< IPv6                   */
1444*852ba100SJustin Hibbits     headerFieldUdp_t            udp;            /**< UDP                    */
1445*852ba100SJustin Hibbits     headerFieldUdpLite_t        udpLite;        /**< UDP Lite               */
1446*852ba100SJustin Hibbits     headerFieldTcp_t            tcp;            /**< TCP                    */
1447*852ba100SJustin Hibbits     headerFieldSctp_t           sctp;           /**< SCTP                   */
1448*852ba100SJustin Hibbits     headerFieldDccp_t           dccp;           /**< DCCP                   */
1449*852ba100SJustin Hibbits     headerFieldGre_t            gre;            /**< GRE                    */
1450*852ba100SJustin Hibbits     headerFieldMinencap_t       minencap;       /**< Minimal Encapsulation  */
1451*852ba100SJustin Hibbits     headerFieldIpsecAh_t        ipsecAh;        /**< IPSec AH               */
1452*852ba100SJustin Hibbits     headerFieldIpsecEsp_t       ipsecEsp;       /**< IPSec ESP              */
1453*852ba100SJustin Hibbits     headerFieldUdpEncapEsp_t    udpEncapEsp;    /**< UDP Encapsulation ESP  */
14540aeed3e9SJustin Hibbits } t_FmPcdFields;
14550aeed3e9SJustin Hibbits 
14560aeed3e9SJustin Hibbits /**************************************************************************//**
1457*852ba100SJustin Hibbits  @Description   Parameters for defining header extraction for key generation
14580aeed3e9SJustin Hibbits *//***************************************************************************/
14590aeed3e9SJustin Hibbits typedef struct t_FmPcdFromHdr {
14600aeed3e9SJustin Hibbits     uint8_t             size;           /**< Size in byte */
14610aeed3e9SJustin Hibbits     uint8_t             offset;         /**< Byte offset */
14620aeed3e9SJustin Hibbits } t_FmPcdFromHdr;
14630aeed3e9SJustin Hibbits 
14640aeed3e9SJustin Hibbits /**************************************************************************//**
1465*852ba100SJustin Hibbits  @Description   Parameters for defining field extraction for key generation
14660aeed3e9SJustin Hibbits *//***************************************************************************/
14670aeed3e9SJustin Hibbits typedef struct t_FmPcdFromField {
14680aeed3e9SJustin Hibbits     t_FmPcdFields       field;          /**< Field selection */
14690aeed3e9SJustin Hibbits     uint8_t             size;           /**< Size in byte */
14700aeed3e9SJustin Hibbits     uint8_t             offset;         /**< Byte offset */
14710aeed3e9SJustin Hibbits } t_FmPcdFromField;
14720aeed3e9SJustin Hibbits 
14730aeed3e9SJustin Hibbits /**************************************************************************//**
1474*852ba100SJustin Hibbits  @Description   Parameters for defining a single network environment unit
1475*852ba100SJustin Hibbits 
1476*852ba100SJustin Hibbits                 A distinction unit should be defined if it will later be used
1477*852ba100SJustin Hibbits                 by one or more PCD engines to distinguish between flows.
14780aeed3e9SJustin Hibbits *//***************************************************************************/
14790aeed3e9SJustin Hibbits typedef struct t_FmPcdDistinctionUnit {
14800aeed3e9SJustin Hibbits     struct {
14810aeed3e9SJustin Hibbits         e_NetHeaderType         hdr;        /**< One of the headers supported by the FM */
1482*852ba100SJustin Hibbits         u_FmPcdHdrProtocolOpt   opt;        /**< Select only one option ! */
14830aeed3e9SJustin Hibbits     } hdrs[FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS];
14840aeed3e9SJustin Hibbits } t_FmPcdDistinctionUnit;
14850aeed3e9SJustin Hibbits 
14860aeed3e9SJustin Hibbits /**************************************************************************//**
1487*852ba100SJustin Hibbits  @Description   Parameters for defining all different distinction units supported
1488*852ba100SJustin Hibbits                 by a specific PCD Network Environment Characteristics module.
1489*852ba100SJustin Hibbits 
1490*852ba100SJustin Hibbits                 Each unit represent a protocol or a group of protocols that may
1491*852ba100SJustin Hibbits                 be used later by the different PCD engines to distinguish
1492*852ba100SJustin Hibbits                 between flows.
14930aeed3e9SJustin Hibbits *//***************************************************************************/
14940aeed3e9SJustin Hibbits typedef struct t_FmPcdNetEnvParams {
14950aeed3e9SJustin Hibbits     uint8_t                 numOfDistinctionUnits;                      /**< Number of different units to be identified */
14960aeed3e9SJustin Hibbits     t_FmPcdDistinctionUnit  units[FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS]; /**< An array of numOfDistinctionUnits of the
14970aeed3e9SJustin Hibbits                                                                              different units to be identified */
14980aeed3e9SJustin Hibbits } t_FmPcdNetEnvParams;
14990aeed3e9SJustin Hibbits 
15000aeed3e9SJustin Hibbits /**************************************************************************//**
1501*852ba100SJustin Hibbits  @Description   Parameters for defining a single extraction action when
1502*852ba100SJustin Hibbits                 creating a key
15030aeed3e9SJustin Hibbits *//***************************************************************************/
15040aeed3e9SJustin Hibbits typedef struct t_FmPcdExtractEntry {
15050aeed3e9SJustin Hibbits     e_FmPcdExtractType                  type;           /**< Extraction type select */
15060aeed3e9SJustin Hibbits     union {
15070aeed3e9SJustin Hibbits         struct {
15080aeed3e9SJustin Hibbits             e_NetHeaderType             hdr;            /**< Header selection */
15090aeed3e9SJustin Hibbits             bool                        ignoreProtocolValidation;
15100aeed3e9SJustin Hibbits                                                         /**< Ignore protocol validation */
15110aeed3e9SJustin Hibbits             e_FmPcdHdrIndex             hdrIndex;       /**< Relevant only for MPLS, VLAN and tunneled
15120aeed3e9SJustin Hibbits                                                              IP. Otherwise should be cleared. */
15130aeed3e9SJustin Hibbits             e_FmPcdExtractByHdrType     type;           /**< Header extraction type select */
15140aeed3e9SJustin Hibbits             union {
15150aeed3e9SJustin Hibbits                 t_FmPcdFromHdr          fromHdr;        /**< Extract bytes from header parameters */
15160aeed3e9SJustin Hibbits                 t_FmPcdFromField        fromField;      /**< Extract bytes from field parameters */
15170aeed3e9SJustin Hibbits                 t_FmPcdFields           fullField;      /**< Extract full filed parameters */
15180aeed3e9SJustin Hibbits             } extractByHdrType;
15190aeed3e9SJustin Hibbits         } extractByHdr;                                 /**< used when type = e_FM_PCD_KG_EXTRACT_BY_HDR */
15200aeed3e9SJustin Hibbits         struct {
15210aeed3e9SJustin Hibbits             e_FmPcdExtractFrom          src;            /**< Non-header extraction source */
15220aeed3e9SJustin Hibbits             e_FmPcdAction               action;         /**< Relevant for CC Only */
1523*852ba100SJustin Hibbits             uint16_t                    icIndxMask;     /**< Relevant only for CC when
1524*852ba100SJustin Hibbits                                                              action = e_FM_PCD_ACTION_INDEXED_LOOKUP;
1525*852ba100SJustin Hibbits                                                              Note that the number of bits that are set within
1526*852ba100SJustin Hibbits                                                              this mask must be log2 of the CC-node 'numOfKeys'.
1527*852ba100SJustin Hibbits                                                              Note that the mask cannot be set on the lower bits. */
15280aeed3e9SJustin Hibbits             uint8_t                     offset;         /**< Byte offset */
15290aeed3e9SJustin Hibbits             uint8_t                     size;           /**< Size in byte */
15300aeed3e9SJustin Hibbits         } extractNonHdr;                                /**< used when type = e_FM_PCD_KG_EXTRACT_NON_HDR */
15310aeed3e9SJustin Hibbits     };
15320aeed3e9SJustin Hibbits } t_FmPcdExtractEntry;
15330aeed3e9SJustin Hibbits 
15340aeed3e9SJustin Hibbits /**************************************************************************//**
1535*852ba100SJustin Hibbits  @Description   Parameters for defining masks for each extracted field in the key.
15360aeed3e9SJustin Hibbits *//***************************************************************************/
15370aeed3e9SJustin Hibbits typedef struct t_FmPcdKgExtractMask {
15380aeed3e9SJustin Hibbits     uint8_t                             extractArrayIndex;  /**< Index in the extraction array, as initialized by user */
15390aeed3e9SJustin Hibbits     uint8_t                             offset;             /**< Byte offset */
15400aeed3e9SJustin Hibbits     uint8_t                             mask;               /**< A byte mask (selected bits will be used) */
15410aeed3e9SJustin Hibbits } t_FmPcdKgExtractMask;
15420aeed3e9SJustin Hibbits 
15430aeed3e9SJustin Hibbits /**************************************************************************//**
1544*852ba100SJustin Hibbits  @Description   Parameters for defining default selection per groups of fields
15450aeed3e9SJustin Hibbits *//***************************************************************************/
15460aeed3e9SJustin Hibbits typedef struct t_FmPcdKgExtractDflt {
15470aeed3e9SJustin Hibbits     e_FmPcdKgKnownFieldsDfltTypes       type;                /**< Default type select */
15480aeed3e9SJustin Hibbits     e_FmPcdKgExtractDfltSelect          dfltSelect;          /**< Default register select */
15490aeed3e9SJustin Hibbits } t_FmPcdKgExtractDflt;
15500aeed3e9SJustin Hibbits 
15510aeed3e9SJustin Hibbits /**************************************************************************//**
1552*852ba100SJustin Hibbits  @Description   Parameters for defining key extraction and hashing
15530aeed3e9SJustin Hibbits *//***************************************************************************/
15540aeed3e9SJustin Hibbits typedef struct t_FmPcdKgKeyExtractAndHashParams {
15550aeed3e9SJustin Hibbits     uint32_t                    privateDflt0;                /**< Scheme default register 0 */
15560aeed3e9SJustin Hibbits     uint32_t                    privateDflt1;                /**< Scheme default register 1 */
15570aeed3e9SJustin Hibbits     uint8_t                     numOfUsedExtracts;           /**< defines the valid size of the following array */
15580aeed3e9SJustin Hibbits     t_FmPcdExtractEntry         extractArray [FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY]; /**< An array of extractions definition. */
15590aeed3e9SJustin Hibbits     uint8_t                     numOfUsedDflts;              /**< defines the valid size of the following array */
15600aeed3e9SJustin Hibbits     t_FmPcdKgExtractDflt        dflts[FM_PCD_KG_NUM_OF_DEFAULT_GROUPS];
15610aeed3e9SJustin Hibbits                                                              /**< For each extraction used in this scheme, specify the required
15620aeed3e9SJustin Hibbits                                                                   default register to be used when header is not found.
15630aeed3e9SJustin Hibbits                                                                   types not specified in this array will get undefined value. */
15640aeed3e9SJustin Hibbits     uint8_t                     numOfUsedMasks;              /**< defines the valid size of the following array */
15650aeed3e9SJustin Hibbits     t_FmPcdKgExtractMask        masks[FM_PCD_KG_NUM_OF_EXTRACT_MASKS];
15660aeed3e9SJustin Hibbits     uint8_t                     hashShift;                   /**< hash result right shift. Select the 24 bits out of the 64 hash
15670aeed3e9SJustin Hibbits                                                                   result. 0 means using the 24 LSB's, otherwise use the
15680aeed3e9SJustin Hibbits                                                                   24 LSB's after shifting right.*/
15690aeed3e9SJustin Hibbits     uint32_t                    hashDistributionNumOfFqids;  /**< must be > 1 and a power of 2. Represents the range
15700aeed3e9SJustin Hibbits                                                                   of queues for the key and hash functionality */
15710aeed3e9SJustin Hibbits     uint8_t                     hashDistributionFqidsShift;  /**< selects the FQID bits that will be effected by the hash */
15720aeed3e9SJustin Hibbits     bool                        symmetricHash;               /**< TRUE to generate the same hash for frames with swapped source and
15730aeed3e9SJustin Hibbits                                                                   destination fields on all layers; If TRUE, driver will check that for
15740aeed3e9SJustin Hibbits                                                                   all layers, if SRC extraction is selected, DST extraction must also be
15750aeed3e9SJustin Hibbits                                                                   selected, and vice versa. */
15760aeed3e9SJustin Hibbits } t_FmPcdKgKeyExtractAndHashParams;
15770aeed3e9SJustin Hibbits 
15780aeed3e9SJustin Hibbits /**************************************************************************//**
1579*852ba100SJustin Hibbits  @Description   Parameters for defining a single FQID mask (extracted OR).
15800aeed3e9SJustin Hibbits *//***************************************************************************/
15810aeed3e9SJustin Hibbits typedef struct t_FmPcdKgExtractedOrParams {
15820aeed3e9SJustin Hibbits     e_FmPcdExtractType              type;               /**< Extraction type select */
15830aeed3e9SJustin Hibbits     union {
15840aeed3e9SJustin Hibbits         struct {                                        /**< used when type = e_FM_PCD_KG_EXTRACT_BY_HDR */
15850aeed3e9SJustin Hibbits             e_NetHeaderType         hdr;
15860aeed3e9SJustin Hibbits             e_FmPcdHdrIndex         hdrIndex;           /**< Relevant only for MPLS, VLAN and tunneled
15870aeed3e9SJustin Hibbits                                                              IP. Otherwise should be cleared.*/
15880aeed3e9SJustin Hibbits             bool                    ignoreProtocolValidation;
15890aeed3e9SJustin Hibbits                                                         /**< continue extraction even if protocol is not recognized */
1590*852ba100SJustin Hibbits         } extractByHdr;                                 /**< Header to extract by */
15910aeed3e9SJustin Hibbits         e_FmPcdExtractFrom          src;                /**< used when type = e_FM_PCD_KG_EXTRACT_NON_HDR */
15920aeed3e9SJustin Hibbits     };
15930aeed3e9SJustin Hibbits     uint8_t                         extractionOffset;   /**< Offset for extraction (in bytes).  */
15940aeed3e9SJustin Hibbits     e_FmPcdKgExtractDfltSelect      dfltValue;          /**< Select register from which extraction is taken if
15950aeed3e9SJustin Hibbits                                                              field not found */
15960aeed3e9SJustin Hibbits     uint8_t                         mask;               /**< Extraction mask (specified bits are used) */
15970aeed3e9SJustin Hibbits     uint8_t                         bitOffsetInFqid;    /**< 0-31, Selects which bits of the 24 FQID bits to effect using
15980aeed3e9SJustin Hibbits                                                              the extracted byte; Assume byte is placed as the 8 MSB's in
15990aeed3e9SJustin Hibbits                                                              a 32 bit word where the lower bits
16000aeed3e9SJustin Hibbits                                                              are the FQID; i.e if bitOffsetInFqid=1 than its LSB
16010aeed3e9SJustin Hibbits                                                              will effect the FQID MSB, if bitOffsetInFqid=24 than the
16020aeed3e9SJustin Hibbits                                                              extracted byte will effect the 8 LSB's of the FQID,
16030aeed3e9SJustin Hibbits                                                              if bitOffsetInFqid=31 than the byte's MSB will effect
16040aeed3e9SJustin Hibbits                                                              the FQID's LSB; 0 means - no effect on FQID;
16050aeed3e9SJustin Hibbits                                                              Note that one, and only one of
16060aeed3e9SJustin Hibbits                                                              bitOffsetInFqid or bitOffsetInPlcrProfile must be set (i.e,
16070aeed3e9SJustin Hibbits                                                              extracted byte must effect either FQID or Policer profile).*/
16080aeed3e9SJustin Hibbits     uint8_t                         bitOffsetInPlcrProfile;
16090aeed3e9SJustin Hibbits                                                         /**< 0-15, Selects which bits of the 8 policer profile id bits to
16100aeed3e9SJustin Hibbits                                                              effect using the extracted byte; Assume byte is placed
16110aeed3e9SJustin Hibbits                                                              as the 8 MSB's in a 16 bit word where the lower bits
16120aeed3e9SJustin Hibbits                                                              are the policer profile id; i.e if bitOffsetInPlcrProfile=1
16130aeed3e9SJustin Hibbits                                                              than its LSB will effect the profile MSB, if bitOffsetInFqid=8
16140aeed3e9SJustin Hibbits                                                              than the extracted byte will effect the whole policer profile id,
16150aeed3e9SJustin Hibbits                                                              if bitOffsetInFqid=15 than the byte's MSB will effect
16160aeed3e9SJustin Hibbits                                                              the Policer Profile id's LSB;
16170aeed3e9SJustin Hibbits                                                              0 means - no effect on policer profile; Note that one, and only one of
16180aeed3e9SJustin Hibbits                                                              bitOffsetInFqid or bitOffsetInPlcrProfile must be set (i.e,
16190aeed3e9SJustin Hibbits                                                              extracted byte must effect either FQID or Policer profile).*/
16200aeed3e9SJustin Hibbits } t_FmPcdKgExtractedOrParams;
16210aeed3e9SJustin Hibbits 
16220aeed3e9SJustin Hibbits /**************************************************************************//**
1623*852ba100SJustin Hibbits  @Description   Parameters for configuring a scheme counter
16240aeed3e9SJustin Hibbits *//***************************************************************************/
16250aeed3e9SJustin Hibbits typedef struct t_FmPcdKgSchemeCounter {
16260aeed3e9SJustin Hibbits     bool        update;     /**< FALSE to keep the current counter state
16270aeed3e9SJustin Hibbits                                  and continue from that point, TRUE to update/reset
16280aeed3e9SJustin Hibbits                                  the counter when the scheme is written. */
16290aeed3e9SJustin Hibbits     uint32_t    value;      /**< If update=TRUE, this value will be written into the
16300aeed3e9SJustin Hibbits                                  counter. clear this field to reset the counter. */
16310aeed3e9SJustin Hibbits } t_FmPcdKgSchemeCounter;
16320aeed3e9SJustin Hibbits 
16330aeed3e9SJustin Hibbits /**************************************************************************//**
1634*852ba100SJustin Hibbits  @Description   Parameters for configuring a policer profile for a KeyGen scheme
1635*852ba100SJustin Hibbits                 (when policer is the next engine after this scheme).
16360aeed3e9SJustin Hibbits *//***************************************************************************/
16370aeed3e9SJustin Hibbits typedef struct t_FmPcdKgPlcrProfile {
16380aeed3e9SJustin Hibbits     bool                sharedProfile;              /**< TRUE if this profile is shared between ports
1639*852ba100SJustin Hibbits                                                          (managed by master partition); Must not be TRUE
16400aeed3e9SJustin Hibbits                                                          if profile is after Coarse Classification*/
16410aeed3e9SJustin Hibbits     bool                direct;                     /**< if TRUE, directRelativeProfileId only selects the profile
16420aeed3e9SJustin Hibbits                                                          id, if FALSE fqidOffsetRelativeProfileIdBase is used
16430aeed3e9SJustin Hibbits                                                          together with fqidOffsetShift and numOfProfiles
16440aeed3e9SJustin Hibbits                                                          parameters, to define a range of profiles from
1645*852ba100SJustin Hibbits                                                          which the KeyGen result will determine the
16460aeed3e9SJustin Hibbits                                                          destination policer profile.  */
16470aeed3e9SJustin Hibbits     union {
16480aeed3e9SJustin Hibbits         uint16_t        directRelativeProfileId;    /**< Used if 'direct' is TRUE, to select policer profile.
1649*852ba100SJustin Hibbits                                                          should indicate the policer profile offset within the
1650*852ba100SJustin Hibbits                                                          port's policer profiles or shared window. */
16510aeed3e9SJustin Hibbits         struct {
1652*852ba100SJustin Hibbits             uint8_t     fqidOffsetShift;            /**< Shift on the KeyGen create FQID offset (i.e. not the
1653*852ba100SJustin Hibbits                                                          final FQID - without the FQID base). */
16540aeed3e9SJustin Hibbits             uint8_t     fqidOffsetRelativeProfileIdBase;
1655*852ba100SJustin Hibbits                                                     /**< The base of the FMan Port's relative Storage-Profile ID;
1656*852ba100SJustin Hibbits                                                          this value will be "OR'ed" with the KeyGen create FQID
1657*852ba100SJustin Hibbits                                                          offset (i.e. not the final FQID - without the FQID base);
1658*852ba100SJustin Hibbits                                                          the final result should indicate the Storage-Profile offset
1659*852ba100SJustin Hibbits                                                          within the FMan Port's relative Storage-Profiles window/
1660*852ba100SJustin Hibbits                                                          (or the SHARED window depends on 'sharedProfile'). */
16610aeed3e9SJustin Hibbits             uint8_t     numOfProfiles;              /**< Range of profiles starting at base */
1662*852ba100SJustin Hibbits         } indirectProfile;                          /**< Indirect profile parameters */
1663*852ba100SJustin Hibbits     } profileSelect;                                /**< Direct/indirect profile selection and parameters */
16640aeed3e9SJustin Hibbits } t_FmPcdKgPlcrProfile;
16650aeed3e9SJustin Hibbits 
1666*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
16670aeed3e9SJustin Hibbits /**************************************************************************//**
1668*852ba100SJustin Hibbits  @Description   Parameters for configuring a storage profile for a KeyGen scheme.
1669*852ba100SJustin Hibbits *//***************************************************************************/
1670*852ba100SJustin Hibbits typedef struct t_FmPcdKgStorageProfile {
1671*852ba100SJustin Hibbits     bool                direct;                     /**< If TRUE, directRelativeProfileId only selects the
1672*852ba100SJustin Hibbits                                                          profile id;
1673*852ba100SJustin Hibbits                                                          If FALSE, fqidOffsetRelativeProfileIdBase is used
1674*852ba100SJustin Hibbits                                                          together with fqidOffsetShift and numOfProfiles
1675*852ba100SJustin Hibbits                                                          parameters to define a range of profiles from which
1676*852ba100SJustin Hibbits                                                          the KeyGen result will determine the destination
1677*852ba100SJustin Hibbits                                                          storage profile. */
1678*852ba100SJustin Hibbits     union {
1679*852ba100SJustin Hibbits         uint16_t        directRelativeProfileId;    /**< Used when 'direct' is TRUE, to select a storage profile;
1680*852ba100SJustin Hibbits                                                          should indicate the storage profile offset within the
1681*852ba100SJustin Hibbits                                                          port's storage profiles window. */
1682*852ba100SJustin Hibbits         struct {
1683*852ba100SJustin Hibbits             uint8_t     fqidOffsetShift;            /**< Shift on the KeyGen create FQID offset (i.e. not the
1684*852ba100SJustin Hibbits                                                          final FQID - without the FQID base). */
1685*852ba100SJustin Hibbits             uint8_t     fqidOffsetRelativeProfileIdBase;
1686*852ba100SJustin Hibbits                                                     /**< The base of the FMan Port's relative Storage-Profile ID;
1687*852ba100SJustin Hibbits                                                          this value will be "OR'ed" with the KeyGen create FQID
1688*852ba100SJustin Hibbits                                                          offset (i.e. not the final FQID - without the FQID base);
1689*852ba100SJustin Hibbits                                                          the final result should indicate the Storage-Profile offset
1690*852ba100SJustin Hibbits                                                          within the FMan Port's relative Storage-Profiles window. */
1691*852ba100SJustin Hibbits             uint8_t     numOfProfiles;              /**< Range of profiles starting at base. */
1692*852ba100SJustin Hibbits         } indirectProfile;                          /**< Indirect profile parameters. */
1693*852ba100SJustin Hibbits     } profileSelect;                                /**< Direct/indirect profile selection and parameters. */
1694*852ba100SJustin Hibbits } t_FmPcdKgStorageProfile;
1695*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
1696*852ba100SJustin Hibbits 
1697*852ba100SJustin Hibbits /**************************************************************************//**
1698*852ba100SJustin Hibbits  @Description   Parameters for defining CC as the next engine after KeyGen
16990aeed3e9SJustin Hibbits *//***************************************************************************/
17000aeed3e9SJustin Hibbits typedef struct t_FmPcdKgCc {
17010aeed3e9SJustin Hibbits     t_Handle                h_CcTree;                       /**< A handle to a CC Tree */
17020aeed3e9SJustin Hibbits     uint8_t                 grpId;                          /**< CC group id within the CC tree */
17030aeed3e9SJustin Hibbits     bool                    plcrNext;                       /**< TRUE if after CC, in case of data frame,
17040aeed3e9SJustin Hibbits                                                                  policing is required. */
1705*852ba100SJustin Hibbits     bool                    bypassPlcrProfileGeneration;    /**< TRUE to bypass KeyGen policer profile generation;
1706*852ba100SJustin Hibbits                                                                  selected profile is the one set at port initialization. */
1707*852ba100SJustin Hibbits     t_FmPcdKgPlcrProfile    plcrProfile;                    /**< Valid only if plcrNext = TRUE and
1708*852ba100SJustin Hibbits                                                                  bypassPlcrProfileGeneration = FALSE */
17090aeed3e9SJustin Hibbits } t_FmPcdKgCc;
17100aeed3e9SJustin Hibbits 
17110aeed3e9SJustin Hibbits /**************************************************************************//**
1712*852ba100SJustin Hibbits  @Description   Parameters for defining initializing a KeyGen scheme
17130aeed3e9SJustin Hibbits *//***************************************************************************/
17140aeed3e9SJustin Hibbits typedef struct t_FmPcdKgSchemeParams {
17150aeed3e9SJustin Hibbits     bool                                modify;                 /**< TRUE to change an existing scheme */
17160aeed3e9SJustin Hibbits     union
17170aeed3e9SJustin Hibbits     {
17180aeed3e9SJustin Hibbits         uint8_t                         relativeSchemeId;       /**< if modify=FALSE:Partition relative scheme id */
17190aeed3e9SJustin Hibbits         t_Handle                        h_Scheme;               /**< if modify=TRUE: a handle of the existing scheme */
17200aeed3e9SJustin Hibbits     } id;
1721*852ba100SJustin Hibbits     bool                                alwaysDirect;           /**< This scheme is reached only directly, i.e. no need
1722*852ba100SJustin Hibbits                                                                      for match vector; KeyGen will ignore it when matching */
17230aeed3e9SJustin Hibbits     struct {                                                    /**< HL Relevant only if alwaysDirect = FALSE */
17240aeed3e9SJustin Hibbits         t_Handle                        h_NetEnv;               /**< A handle to the Network environment as returned
1725*852ba100SJustin Hibbits                                                                      by FM_PCD_NetEnvCharacteristicsSet() */
1726*852ba100SJustin Hibbits         uint8_t                         numOfDistinctionUnits;  /**< Number of NetEnv units listed in unitIds array */
17270aeed3e9SJustin Hibbits         uint8_t                         unitIds[FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS];
17280aeed3e9SJustin Hibbits                                                                 /**< Indexes as passed to SetNetEnvCharacteristics array*/
17290aeed3e9SJustin Hibbits     } netEnvParams;
1730*852ba100SJustin Hibbits     bool                                useHash;                /**< use the KeyGen Hash functionality  */
17310aeed3e9SJustin Hibbits     t_FmPcdKgKeyExtractAndHashParams    keyExtractAndHashParams;
17320aeed3e9SJustin Hibbits                                                                 /**< used only if useHash = TRUE */
17330aeed3e9SJustin Hibbits     bool                                bypassFqidGeneration;   /**< Normally - FALSE, TRUE to avoid FQID update in the IC;
1734*852ba100SJustin Hibbits                                                                      In such a case FQID after KeyGen will be the default FQID
17350aeed3e9SJustin Hibbits                                                                      defined for the relevant port, or the FQID defined by CC
17360aeed3e9SJustin Hibbits                                                                      in cases where CC was the previous engine. */
17370aeed3e9SJustin Hibbits     uint32_t                            baseFqid;               /**< Base FQID; Relevant only if bypassFqidGeneration = FALSE;
17380aeed3e9SJustin Hibbits                                                                      If hash is used and an even distribution is expected
17390aeed3e9SJustin Hibbits                                                                      according to hashDistributionNumOfFqids, baseFqid must be aligned to
17400aeed3e9SJustin Hibbits                                                                      hashDistributionNumOfFqids. */
1741*852ba100SJustin Hibbits     uint8_t                             numOfUsedExtractedOrs;  /**< Number of FQID masks listed in extractedOrs array */
17420aeed3e9SJustin Hibbits     t_FmPcdKgExtractedOrParams          extractedOrs[FM_PCD_KG_NUM_OF_GENERIC_REGS];
1743*852ba100SJustin Hibbits                                                                 /**< FM_PCD_KG_NUM_OF_GENERIC_REGS
17440aeed3e9SJustin Hibbits                                                                      registers are shared between qidMasks
17450aeed3e9SJustin Hibbits                                                                      functionality and some of the extraction
17460aeed3e9SJustin Hibbits                                                                      actions; Normally only some will be used
17470aeed3e9SJustin Hibbits                                                                      for qidMask. Driver will return error if
17480aeed3e9SJustin Hibbits                                                                      resource is full at initialization time. */
1749*852ba100SJustin Hibbits 
1750*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
1751*852ba100SJustin Hibbits     bool                                overrideStorageProfile; /**< TRUE if KeyGen override previously decided storage profile */
1752*852ba100SJustin Hibbits     t_FmPcdKgStorageProfile             storageProfile;         /**< Used when overrideStorageProfile TRUE */
1753*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
1754*852ba100SJustin Hibbits 
17550aeed3e9SJustin Hibbits     e_FmPcdEngine                       nextEngine;             /**< may be BMI, PLCR or CC */
17560aeed3e9SJustin Hibbits     union {                                                     /**< depends on nextEngine */
17570aeed3e9SJustin Hibbits         e_FmPcdDoneAction               doneAction;             /**< Used when next engine is BMI (done) */
17580aeed3e9SJustin Hibbits         t_FmPcdKgPlcrProfile            plcrProfile;            /**< Used when next engine is PLCR */
17590aeed3e9SJustin Hibbits         t_FmPcdKgCc                     cc;                     /**< Used when next engine is CC */
17600aeed3e9SJustin Hibbits     } kgNextEngineParams;
17610aeed3e9SJustin Hibbits     t_FmPcdKgSchemeCounter              schemeCounter;          /**< A structure of parameters for updating
17620aeed3e9SJustin Hibbits                                                                      the scheme counter */
17630aeed3e9SJustin Hibbits } t_FmPcdKgSchemeParams;
17640aeed3e9SJustin Hibbits 
17650aeed3e9SJustin Hibbits /**************************************************************************//**
1766*852ba100SJustin Hibbits  @Collection    Definitions for CC statistics
1767*852ba100SJustin Hibbits *//***************************************************************************/
1768*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
1769*852ba100SJustin Hibbits #define FM_PCD_CC_STATS_MAX_NUM_OF_FLR      10  /* Maximal supported number of frame length ranges */
1770*852ba100SJustin Hibbits #define FM_PCD_CC_STATS_FLR_SIZE            2   /* Size in bytes of a frame length range limit */
1771*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
1772*852ba100SJustin Hibbits #define FM_PCD_CC_STATS_COUNTER_SIZE        4   /* Size in bytes of a frame length range counter */
1773*852ba100SJustin Hibbits /* @} */
1774*852ba100SJustin Hibbits 
1775*852ba100SJustin Hibbits /**************************************************************************//**
1776*852ba100SJustin Hibbits  @Description   Parameters for defining CC as the next engine after a CC node.
17770aeed3e9SJustin Hibbits *//***************************************************************************/
17780aeed3e9SJustin Hibbits typedef struct t_FmPcdCcNextCcParams {
17790aeed3e9SJustin Hibbits     t_Handle    h_CcNode;               /**< A handle of the next CC node */
17800aeed3e9SJustin Hibbits } t_FmPcdCcNextCcParams;
17810aeed3e9SJustin Hibbits 
1782*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
17830aeed3e9SJustin Hibbits /**************************************************************************//**
1784*852ba100SJustin Hibbits  @Description   Parameters for defining Frame replicator as the next engine after a CC node.
1785*852ba100SJustin Hibbits *//***************************************************************************/
1786*852ba100SJustin Hibbits typedef struct t_FmPcdCcNextFrParams {
1787*852ba100SJustin Hibbits     t_Handle    h_FrmReplic;               /**< A handle of the next frame replicator group */
1788*852ba100SJustin Hibbits } t_FmPcdCcNextFrParams;
1789*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
1790*852ba100SJustin Hibbits 
1791*852ba100SJustin Hibbits /**************************************************************************//**
1792*852ba100SJustin Hibbits  @Description   Parameters for defining Policer as the next engine after a CC node.
17930aeed3e9SJustin Hibbits *//***************************************************************************/
17940aeed3e9SJustin Hibbits typedef struct t_FmPcdCcNextPlcrParams {
17950aeed3e9SJustin Hibbits     bool        overrideParams;         /**< TRUE if CC override previously decided parameters*/
17960aeed3e9SJustin Hibbits     bool        sharedProfile;          /**< Relevant only if overrideParams=TRUE:
17970aeed3e9SJustin Hibbits                                              TRUE if this profile is shared between ports */
17980aeed3e9SJustin Hibbits     uint16_t    newRelativeProfileId;   /**< Relevant only if overrideParams=TRUE:
1799*852ba100SJustin Hibbits                                              (otherwise profile id is taken from KeyGen);
18000aeed3e9SJustin Hibbits                                              This parameter should indicate the policer
18010aeed3e9SJustin Hibbits                                              profile offset within the port's
18020aeed3e9SJustin Hibbits                                              policer profiles or from SHARED window.*/
18030aeed3e9SJustin Hibbits     uint32_t    newFqid;                /**< Relevant only if overrideParams=TRUE:
18040aeed3e9SJustin Hibbits                                              FQID for enqueuing the frame;
18050aeed3e9SJustin Hibbits                                              In earlier chips  if policer next engine is KEYGEN,
18060aeed3e9SJustin Hibbits                                              this parameter can be 0, because the KEYGEN
18070aeed3e9SJustin Hibbits                                              always decides the enqueue FQID.*/
1808*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
1809*852ba100SJustin Hibbits     uint8_t     newRelativeStorageProfileId;
1810*852ba100SJustin Hibbits                                         /**< Indicates the relative storage profile offset within
1811*852ba100SJustin Hibbits                                              the port's storage profiles window;
1812*852ba100SJustin Hibbits                                              Relevant only if the port was configured with VSP. */
1813*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
18140aeed3e9SJustin Hibbits } t_FmPcdCcNextPlcrParams;
18150aeed3e9SJustin Hibbits 
18160aeed3e9SJustin Hibbits /**************************************************************************//**
1817*852ba100SJustin Hibbits  @Description   Parameters for defining enqueue as the next action after a CC node.
18180aeed3e9SJustin Hibbits *//***************************************************************************/
18190aeed3e9SJustin Hibbits typedef struct t_FmPcdCcNextEnqueueParams {
18200aeed3e9SJustin Hibbits     e_FmPcdDoneAction    action;        /**< Action - when next engine is BMI (done) */
1821*852ba100SJustin Hibbits     bool                 overrideFqid;  /**< TRUE if CC override previously decided fqid and vspid,
18220aeed3e9SJustin Hibbits                                              relevant if action = e_FM_PCD_ENQ_FRAME */
18230aeed3e9SJustin Hibbits     uint32_t             newFqid;       /**< Valid if overrideFqid=TRUE, FQID for enqueuing the frame
1824*852ba100SJustin Hibbits                                              (otherwise FQID is taken from KeyGen),
18250aeed3e9SJustin Hibbits                                              relevant if action = e_FM_PCD_ENQ_FRAME */
1826*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
1827*852ba100SJustin Hibbits     uint8_t              newRelativeStorageProfileId;
1828*852ba100SJustin Hibbits                                         /**< Valid if overrideFqid=TRUE, Indicates the relative virtual
1829*852ba100SJustin Hibbits                                              storage profile offset within the port's storage profiles
1830*852ba100SJustin Hibbits                                              window; Relevant only if the port was configured with VSP. */
1831*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
18320aeed3e9SJustin Hibbits } t_FmPcdCcNextEnqueueParams;
18330aeed3e9SJustin Hibbits 
18340aeed3e9SJustin Hibbits /**************************************************************************//**
1835*852ba100SJustin Hibbits  @Description   Parameters for defining KeyGen as the next engine after a CC node.
18360aeed3e9SJustin Hibbits *//***************************************************************************/
18370aeed3e9SJustin Hibbits typedef struct t_FmPcdCcNextKgParams {
1838*852ba100SJustin Hibbits     bool        overrideFqid;           /**< TRUE if CC override previously decided fqid and vspid,
18390aeed3e9SJustin Hibbits                                              Note - this parameters irrelevant for earlier chips */
18400aeed3e9SJustin Hibbits     uint32_t    newFqid;                /**< Valid if overrideFqid=TRUE, FQID for enqueuing the frame
1841*852ba100SJustin Hibbits                                              (otherwise FQID is taken from KeyGen),
18420aeed3e9SJustin Hibbits                                              Note - this parameters irrelevant for earlier chips */
1843*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
1844*852ba100SJustin Hibbits     uint8_t     newRelativeStorageProfileId;
1845*852ba100SJustin Hibbits                                         /**< Valid if overrideFqid=TRUE, Indicates the relative virtual
1846*852ba100SJustin Hibbits                                              storage profile offset within the port's storage profiles
1847*852ba100SJustin Hibbits                                              window; Relevant only if the port was configured with VSP. */
1848*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
1849*852ba100SJustin Hibbits 
18500aeed3e9SJustin Hibbits     t_Handle    h_DirectScheme;         /**< Direct scheme handle to go to. */
18510aeed3e9SJustin Hibbits } t_FmPcdCcNextKgParams;
18520aeed3e9SJustin Hibbits 
18530aeed3e9SJustin Hibbits /**************************************************************************//**
1854*852ba100SJustin Hibbits  @Description   Parameters for defining the next engine after a CC node.
18550aeed3e9SJustin Hibbits *//***************************************************************************/
18560aeed3e9SJustin Hibbits typedef struct t_FmPcdCcNextEngineParams {
18570aeed3e9SJustin Hibbits     e_FmPcdEngine                       nextEngine;     /**< User has to initialize parameters
18580aeed3e9SJustin Hibbits                                                              according to nextEngine definition */
18590aeed3e9SJustin Hibbits     union {
18600aeed3e9SJustin Hibbits         t_FmPcdCcNextCcParams           ccParams;       /**< Parameters in case next engine is CC */
18610aeed3e9SJustin Hibbits         t_FmPcdCcNextPlcrParams         plcrParams;     /**< Parameters in case next engine is PLCR */
18620aeed3e9SJustin Hibbits         t_FmPcdCcNextEnqueueParams      enqueueParams;  /**< Parameters in case next engine is BMI */
18630aeed3e9SJustin Hibbits         t_FmPcdCcNextKgParams           kgParams;       /**< Parameters in case next engine is KG */
1864*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
1865*852ba100SJustin Hibbits         t_FmPcdCcNextFrParams           frParams;       /**< Parameters in case next engine is FR */
1866*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
1867*852ba100SJustin Hibbits     } params;                                           /**< union used for all the next-engine parameters options */
1868*852ba100SJustin Hibbits 
1869*852ba100SJustin Hibbits     t_Handle                            h_Manip;        /**< Handle to Manipulation object.
1870*852ba100SJustin Hibbits                                                              Relevant if next engine is of type result
18710aeed3e9SJustin Hibbits                                                              (e_FM_PCD_PLCR, e_FM_PCD_KG, e_FM_PCD_DONE) */
1872*852ba100SJustin Hibbits 
1873*852ba100SJustin Hibbits     bool                                statisticsEn;   /**< If TRUE, statistics counters are incremented
1874*852ba100SJustin Hibbits                                                              for each frame passing through this
1875*852ba100SJustin Hibbits                                                              Coarse Classification entry. */
18760aeed3e9SJustin Hibbits } t_FmPcdCcNextEngineParams;
18770aeed3e9SJustin Hibbits 
18780aeed3e9SJustin Hibbits /**************************************************************************//**
1879*852ba100SJustin Hibbits  @Description   Parameters for defining a single CC key
18800aeed3e9SJustin Hibbits *//***************************************************************************/
18810aeed3e9SJustin Hibbits typedef struct t_FmPcdCcKeyParams {
1882*852ba100SJustin Hibbits     uint8_t                     *p_Key;     /**< Relevant only if 'action' = e_FM_PCD_ACTION_EXACT_MATCH;
1883*852ba100SJustin Hibbits                                                  pointer to the key of the size defined in keySize */
1884*852ba100SJustin Hibbits     uint8_t                     *p_Mask;    /**< Relevant only if 'action' = e_FM_PCD_ACTION_EXACT_MATCH;
1885*852ba100SJustin Hibbits                                                  pointer to the Mask per key  of the size defined
18860aeed3e9SJustin Hibbits                                                  in keySize. p_Key and p_Mask (if defined) has to be
1887*852ba100SJustin Hibbits                                                  of the same size defined in the keySize;
1888*852ba100SJustin Hibbits                                                  NOTE that if this value is equal for all entries whithin
1889*852ba100SJustin Hibbits                                                  this table, the driver will automatically use global-mask
1890*852ba100SJustin Hibbits                                                  (i.e. one common mask for all entries) instead of private
1891*852ba100SJustin Hibbits                                                  one; that is done in order to spare some memory and for
1892*852ba100SJustin Hibbits                                                  better performance. */
18930aeed3e9SJustin Hibbits     t_FmPcdCcNextEngineParams   ccNextEngineParams;
18940aeed3e9SJustin Hibbits                                             /**< parameters for the next for the defined Key in
18950aeed3e9SJustin Hibbits                                                  the p_Key */
18960aeed3e9SJustin Hibbits } t_FmPcdCcKeyParams;
18970aeed3e9SJustin Hibbits 
18980aeed3e9SJustin Hibbits /**************************************************************************//**
1899*852ba100SJustin Hibbits  @Description   Parameters for defining CC keys parameters
1900*852ba100SJustin Hibbits                 The driver supports two methods for CC node allocation: dynamic and static.
1901*852ba100SJustin Hibbits                 Static mode was created in order to prevent runtime alloc/free
1902*852ba100SJustin Hibbits                 of FMan memory (MURAM), which may cause fragmentation; in this mode,
1903*852ba100SJustin Hibbits                 the driver automatically allocates the memory according to
1904*852ba100SJustin Hibbits                 'maxNumOfKeys' parameter. The driver calculates the maximal memory
1905*852ba100SJustin Hibbits                 size that may be used for this CC-Node taking into consideration
1906*852ba100SJustin Hibbits                 'maskSupport' and 'statisticsMode' parameters.
1907*852ba100SJustin Hibbits                 When 'action' = e_FM_PCD_ACTION_INDEXED_LOOKUP in the extraction
1908*852ba100SJustin Hibbits                 parameters of this node, 'maxNumOfKeys' must be equal to 'numOfKeys'.
1909*852ba100SJustin Hibbits                 In dynamic mode, 'maxNumOfKeys' must be zero. At initialization,
1910*852ba100SJustin Hibbits                 all required structures are allocated according to 'numOfKeys'
1911*852ba100SJustin Hibbits                 parameter. During runtime modification, these structures are
1912*852ba100SJustin Hibbits                 re-allocated according to the updated number of keys.
1913*852ba100SJustin Hibbits 
1914*852ba100SJustin Hibbits                 Please note that 'action' and 'icIndxMask' mentioned in the
1915*852ba100SJustin Hibbits                 specific parameter explanations are passed in the extraction
1916*852ba100SJustin Hibbits                 parameters of the node (fields of extractCcParams.extractNonHdr).
19170aeed3e9SJustin Hibbits *//***************************************************************************/
19180aeed3e9SJustin Hibbits typedef struct t_KeysParams {
1919*852ba100SJustin Hibbits     uint16_t                    maxNumOfKeys;   /**< Maximum number of keys that will (ever) be used in this CC-Node;
1920*852ba100SJustin Hibbits                                                      A value of zero may be used for dynamic memory allocation. */
1921*852ba100SJustin Hibbits     bool                        maskSupport;    /**< This parameter is relevant only if a node is initialized with
1922*852ba100SJustin Hibbits                                                      'action' = e_FM_PCD_ACTION_EXACT_MATCH and maxNumOfKeys > 0;
1923*852ba100SJustin Hibbits                                                      Should be TRUE to reserve table memory for key masks, even if
1924*852ba100SJustin Hibbits                                                      initial keys do not contain masks, or if the node was initialized
1925*852ba100SJustin Hibbits                                                      as 'empty' (without keys); this will allow user to add keys with
1926*852ba100SJustin Hibbits                                                      masks at runtime.
1927*852ba100SJustin Hibbits                                                      NOTE that if user want to use only global-masks (i.e. one common mask
1928*852ba100SJustin Hibbits                                                      for all the entries within this table, this parameter should set to 'FALSE'. */
1929*852ba100SJustin Hibbits     e_FmPcdCcStatsMode          statisticsMode; /**< Determines the supported statistics mode for all node's keys.
1930*852ba100SJustin Hibbits                                                      To enable statistics gathering, statistics should be enabled per
1931*852ba100SJustin Hibbits                                                      every key, using 'statisticsEn' in next engine parameters structure
1932*852ba100SJustin Hibbits                                                      of that key;
1933*852ba100SJustin Hibbits                                                      If 'maxNumOfKeys' is set, all required structures will be
1934*852ba100SJustin Hibbits                                                      preallocated for all keys. */
1935*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
1936*852ba100SJustin Hibbits     uint16_t                    frameLengthRanges[FM_PCD_CC_STATS_MAX_NUM_OF_FLR];
1937*852ba100SJustin Hibbits                                                 /**< Relevant only for 'RMON' statistics mode
1938*852ba100SJustin Hibbits                                                      (this feature is supported only on B4860 device);
1939*852ba100SJustin Hibbits                                                      Holds a list of programmable thresholds - for each received frame,
1940*852ba100SJustin Hibbits                                                      its length in bytes is examined against these range thresholds and
1941*852ba100SJustin Hibbits                                                      the appropriate counter is incremented by 1 - for example, to belong
1942*852ba100SJustin Hibbits                                                      to range i, the following should hold:
1943*852ba100SJustin Hibbits                                                      range i-1 threshold < frame length <= range i threshold
1944*852ba100SJustin Hibbits                                                      Each range threshold must be larger then its preceding range
1945*852ba100SJustin Hibbits                                                      threshold, and last range threshold must be 0xFFFF. */
1946*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
1947*852ba100SJustin Hibbits     uint16_t                    numOfKeys;      /**< Number of initial keys;
1948*852ba100SJustin Hibbits                                                      Note that in case of 'action' = e_FM_PCD_ACTION_INDEXED_LOOKUP,
1949*852ba100SJustin Hibbits                                                      this field should be power-of-2 of the number of bits that are
1950*852ba100SJustin Hibbits                                                      set in 'icIndxMask'. */
1951*852ba100SJustin Hibbits     uint8_t                     keySize;        /**< Size of key - for extraction of type FULL_FIELD, 'keySize' has
1952*852ba100SJustin Hibbits                                                      to be the standard size of the selected key; For other extraction
1953*852ba100SJustin Hibbits                                                      types, 'keySize' has to be as size of extraction; When 'action' =
1954*852ba100SJustin Hibbits                                                      e_FM_PCD_ACTION_INDEXED_LOOKUP, 'keySize' must be 2. */
19550aeed3e9SJustin Hibbits     t_FmPcdCcKeyParams          keyParams[FM_PCD_MAX_NUM_OF_KEYS];
1956*852ba100SJustin Hibbits                                                 /**< An array with 'numOfKeys' entries, each entry specifies the
1957*852ba100SJustin Hibbits                                                      corresponding key parameters;
1958*852ba100SJustin Hibbits                                                      When 'action' = e_FM_PCD_ACTION_EXACT_MATCH, this value must not
1959*852ba100SJustin Hibbits                                                      exceed 255 (FM_PCD_MAX_NUM_OF_KEYS-1) as the last entry is saved
1960*852ba100SJustin Hibbits                                                      for the 'miss' entry. */
19610aeed3e9SJustin Hibbits     t_FmPcdCcNextEngineParams   ccNextEngineParamsForMiss;
1962*852ba100SJustin Hibbits                                                 /**< Parameters for defining the next engine when a key is not matched;
1963*852ba100SJustin Hibbits                                                      Not relevant if action = e_FM_PCD_ACTION_INDEXED_LOOKUP. */
19640aeed3e9SJustin Hibbits } t_KeysParams;
19650aeed3e9SJustin Hibbits 
1966*852ba100SJustin Hibbits 
19670aeed3e9SJustin Hibbits /**************************************************************************//**
1968*852ba100SJustin Hibbits  @Description   Parameters for defining a CC node
19690aeed3e9SJustin Hibbits *//***************************************************************************/
19700aeed3e9SJustin Hibbits typedef struct t_FmPcdCcNodeParams {
1971*852ba100SJustin Hibbits     t_FmPcdExtractEntry         extractCcParams;    /**< Extraction parameters */
1972*852ba100SJustin Hibbits     t_KeysParams                keysParams;         /**< Keys definition matching the selected extraction */
19730aeed3e9SJustin Hibbits } t_FmPcdCcNodeParams;
19740aeed3e9SJustin Hibbits 
19750aeed3e9SJustin Hibbits /**************************************************************************//**
1976*852ba100SJustin Hibbits  @Description   Parameters for defining a hash table
1977*852ba100SJustin Hibbits *//***************************************************************************/
1978*852ba100SJustin Hibbits typedef struct t_FmPcdHashTableParams {
1979*852ba100SJustin Hibbits     uint16_t                    maxNumOfKeys;               /**< Maximum Number Of Keys that will (ever) be used in this Hash-table */
1980*852ba100SJustin Hibbits     e_FmPcdCcStatsMode          statisticsMode;             /**< If not e_FM_PCD_CC_STATS_MODE_NONE, the required structures for the
1981*852ba100SJustin Hibbits                                                                  requested statistics mode will be allocated according to maxNumOfKeys. */
1982*852ba100SJustin Hibbits     uint8_t                     kgHashShift;                /**< KG-Hash-shift as it was configured in the KG-scheme
1983*852ba100SJustin Hibbits                                                                  that leads to this hash-table. */
1984*852ba100SJustin Hibbits     uint16_t                    hashResMask;                /**< Mask that will be used on the hash-result;
1985*852ba100SJustin Hibbits                                                                  The number-of-sets for this hash will be calculated
1986*852ba100SJustin Hibbits                                                                  as (2^(number of bits set in 'hashResMask'));
1987*852ba100SJustin Hibbits                                                                  The 4 lower bits must be cleared. */
1988*852ba100SJustin Hibbits     uint8_t                     hashShift;                  /**< Byte offset from the beginning of the KeyGen hash result to the
1989*852ba100SJustin Hibbits                                                                  2-bytes to be used as hash index. */
1990*852ba100SJustin Hibbits     uint8_t                     matchKeySize;               /**< Size of the exact match keys held by the hash buckets */
1991*852ba100SJustin Hibbits 
1992*852ba100SJustin Hibbits     t_FmPcdCcNextEngineParams   ccNextEngineParamsForMiss;  /**< Parameters for defining the next engine when a key is not matched */
1993*852ba100SJustin Hibbits 
1994*852ba100SJustin Hibbits } t_FmPcdHashTableParams;
1995*852ba100SJustin Hibbits 
1996*852ba100SJustin Hibbits /**************************************************************************//**
1997*852ba100SJustin Hibbits  @Description   Parameters for defining a CC tree group.
1998*852ba100SJustin Hibbits 
1999*852ba100SJustin Hibbits                 This structure defines a CC group in terms of NetEnv units
2000*852ba100SJustin Hibbits                 and the action to be taken in each case. The unitIds list must
2001*852ba100SJustin Hibbits                 be given in order from low to high indices.
20020aeed3e9SJustin Hibbits 
20030aeed3e9SJustin Hibbits                 t_FmPcdCcNextEngineParams is a list of 2^numOfDistinctionUnits
20040aeed3e9SJustin Hibbits                 structures where each defines the next action to be taken for
20050aeed3e9SJustin Hibbits                 each units combination. for example:
20060aeed3e9SJustin Hibbits                 numOfDistinctionUnits = 2
20070aeed3e9SJustin Hibbits                 unitIds = {1,3}
20080aeed3e9SJustin Hibbits                 p_NextEnginePerEntriesInGrp[0] = t_FmPcdCcNextEngineParams for the case that
20090aeed3e9SJustin Hibbits                                                         unit 1 - not found; unit 3 - not found;
20100aeed3e9SJustin Hibbits                 p_NextEnginePerEntriesInGrp[1] = t_FmPcdCcNextEngineParams for the case that
20110aeed3e9SJustin Hibbits                                                         unit 1 - not found; unit 3 - found;
20120aeed3e9SJustin Hibbits                 p_NextEnginePerEntriesInGrp[2] = t_FmPcdCcNextEngineParams for the case that
20130aeed3e9SJustin Hibbits                                                         unit 1 - found; unit 3 - not found;
20140aeed3e9SJustin Hibbits                 p_NextEnginePerEntriesInGrp[3] = t_FmPcdCcNextEngineParams for the case that
20150aeed3e9SJustin Hibbits                                                         unit 1 - found; unit 3 - found;
20160aeed3e9SJustin Hibbits *//***************************************************************************/
20170aeed3e9SJustin Hibbits typedef struct t_FmPcdCcGrpParams {
2018*852ba100SJustin Hibbits     uint8_t                     numOfDistinctionUnits;          /**< Up to 4 */
20190aeed3e9SJustin Hibbits     uint8_t                     unitIds[FM_PCD_MAX_NUM_OF_CC_UNITS];
2020*852ba100SJustin Hibbits                                                                 /**< Indices of the units as defined in
2021*852ba100SJustin Hibbits                                                                      FM_PCD_NetEnvCharacteristicsSet() */
20220aeed3e9SJustin Hibbits     t_FmPcdCcNextEngineParams   nextEnginePerEntriesInGrp[FM_PCD_MAX_NUM_OF_CC_ENTRIES_IN_GRP];
2023*852ba100SJustin Hibbits                                                                 /**< Maximum entries per group is 16 */
20240aeed3e9SJustin Hibbits } t_FmPcdCcGrpParams;
20250aeed3e9SJustin Hibbits 
20260aeed3e9SJustin Hibbits /**************************************************************************//**
2027*852ba100SJustin Hibbits  @Description   Parameters for defining CC tree groups
20280aeed3e9SJustin Hibbits *//***************************************************************************/
20290aeed3e9SJustin Hibbits typedef struct t_FmPcdCcTreeParams {
20300aeed3e9SJustin Hibbits     t_Handle                h_NetEnv;                   /**< A handle to the Network environment as returned
2031*852ba100SJustin Hibbits                                                              by FM_PCD_NetEnvCharacteristicsSet() */
20320aeed3e9SJustin Hibbits     uint8_t                 numOfGrps;                  /**< Number of CC groups within the CC tree */
2033*852ba100SJustin Hibbits     t_FmPcdCcGrpParams      ccGrpParams[FM_PCD_MAX_NUM_OF_CC_GROUPS];
2034*852ba100SJustin Hibbits                                                         /**< Parameters for each group. */
20350aeed3e9SJustin Hibbits } t_FmPcdCcTreeParams;
20360aeed3e9SJustin Hibbits 
2037*852ba100SJustin Hibbits 
20380aeed3e9SJustin Hibbits /**************************************************************************//**
2039*852ba100SJustin Hibbits  @Description   CC key statistics structure
2040*852ba100SJustin Hibbits *//***************************************************************************/
2041*852ba100SJustin Hibbits typedef struct t_FmPcdCcKeyStatistics {
2042*852ba100SJustin Hibbits     uint32_t    byteCount;      /**< This counter reflects byte count of frames that
2043*852ba100SJustin Hibbits                                      were matched by this key. */
2044*852ba100SJustin Hibbits     uint32_t    frameCount;     /**< This counter reflects count of frames that
2045*852ba100SJustin Hibbits                                      were matched by this key. */
2046*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
2047*852ba100SJustin Hibbits     uint32_t    frameLengthRangeCount[FM_PCD_CC_STATS_MAX_NUM_OF_FLR];
2048*852ba100SJustin Hibbits                                 /**< These counters reflect how many frames matched
2049*852ba100SJustin Hibbits                                      this key in 'RMON' statistics mode:
2050*852ba100SJustin Hibbits                                      Each counter holds the number of frames of a
2051*852ba100SJustin Hibbits                                      specific frames length range, according to the
2052*852ba100SJustin Hibbits                                      ranges provided at initialization. */
2053*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
2054*852ba100SJustin Hibbits } t_FmPcdCcKeyStatistics;
2055*852ba100SJustin Hibbits 
2056*852ba100SJustin Hibbits /**************************************************************************//**
2057*852ba100SJustin Hibbits  @Description   Parameters for defining policer byte rate
20580aeed3e9SJustin Hibbits *//***************************************************************************/
20590aeed3e9SJustin Hibbits typedef struct t_FmPcdPlcrByteRateModeParams {
20600aeed3e9SJustin Hibbits     e_FmPcdPlcrFrameLengthSelect    frameLengthSelection;   /**< Frame length selection */
20610aeed3e9SJustin Hibbits     e_FmPcdPlcrRollBackFrameSelect  rollBackFrameSelection; /**< relevant option only e_FM_PCD_PLCR_L2_FRM_LEN,
20620aeed3e9SJustin Hibbits                                                                  e_FM_PCD_PLCR_FULL_FRM_LEN */
20630aeed3e9SJustin Hibbits } t_FmPcdPlcrByteRateModeParams;
20640aeed3e9SJustin Hibbits 
20650aeed3e9SJustin Hibbits /**************************************************************************//**
2066*852ba100SJustin Hibbits  @Description   Parameters for defining the policer profile (based on
2067*852ba100SJustin Hibbits                 RFC-2698 or RFC-4115 attributes).
20680aeed3e9SJustin Hibbits *//***************************************************************************/
20690aeed3e9SJustin Hibbits typedef struct t_FmPcdPlcrNonPassthroughAlgParams {
2070*852ba100SJustin Hibbits     e_FmPcdPlcrRateMode              rateMode;                       /**< Byte mode or Packet mode */
20710aeed3e9SJustin Hibbits     t_FmPcdPlcrByteRateModeParams    byteModeParams;                 /**< Valid for Byte NULL for Packet */
2072*852ba100SJustin Hibbits     uint32_t                         committedInfoRate;              /**< KBits/Second or Packets/Second */
2073*852ba100SJustin Hibbits     uint32_t                         committedBurstSize;             /**< Bytes/Packets */
2074*852ba100SJustin Hibbits     uint32_t                         peakOrExcessInfoRate;           /**< KBits/Second or Packets/Second */
2075*852ba100SJustin Hibbits     uint32_t                         peakOrExcessBurstSize;          /**< Bytes/Packets */
20760aeed3e9SJustin Hibbits } t_FmPcdPlcrNonPassthroughAlgParams;
20770aeed3e9SJustin Hibbits 
20780aeed3e9SJustin Hibbits /**************************************************************************//**
2079*852ba100SJustin Hibbits  @Description   Parameters for defining the next engine after policer
20800aeed3e9SJustin Hibbits *//***************************************************************************/
20810aeed3e9SJustin Hibbits typedef union u_FmPcdPlcrNextEngineParams {
20820aeed3e9SJustin Hibbits     e_FmPcdDoneAction               action;             /**< Action - when next engine is BMI (done) */
20830aeed3e9SJustin Hibbits     t_Handle                        h_Profile;          /**< Policer profile handle -  used when next engine
2084*852ba100SJustin Hibbits                                                              is Policer, must be a SHARED profile */
2085*852ba100SJustin Hibbits     t_Handle                        h_DirectScheme;     /**< Direct scheme select - when next engine is KeyGen */
20860aeed3e9SJustin Hibbits } u_FmPcdPlcrNextEngineParams;
20870aeed3e9SJustin Hibbits 
20880aeed3e9SJustin Hibbits /**************************************************************************//**
2089*852ba100SJustin Hibbits  @Description   Parameters for defining the policer profile entry
20900aeed3e9SJustin Hibbits *//***************************************************************************/
20910aeed3e9SJustin Hibbits typedef struct t_FmPcdPlcrProfileParams {
20920aeed3e9SJustin Hibbits     bool                                modify;                     /**< TRUE to change an existing profile */
20930aeed3e9SJustin Hibbits     union {
20940aeed3e9SJustin Hibbits         struct {
20950aeed3e9SJustin Hibbits             e_FmPcdProfileTypeSelection profileType;                /**< Type of policer profile */
20960aeed3e9SJustin Hibbits             t_Handle                    h_FmPort;                   /**< Relevant for per-port profiles only */
20970aeed3e9SJustin Hibbits             uint16_t                    relativeProfileId;          /**< Profile id - relative to shared group or to port */
20980aeed3e9SJustin Hibbits         } newParams;                                                /**< use it when modify = FALSE */
20990aeed3e9SJustin Hibbits         t_Handle                        h_Profile;                  /**< A handle to a profile - use it when modify=TRUE */
21000aeed3e9SJustin Hibbits     } id;
21010aeed3e9SJustin Hibbits     e_FmPcdPlcrAlgorithmSelection       algSelection;               /**< Profile Algorithm PASS_THROUGH, RFC_2698, RFC_4115 */
21020aeed3e9SJustin Hibbits     e_FmPcdPlcrColorMode                colorMode;                  /**< COLOR_BLIND, COLOR_AWARE */
21030aeed3e9SJustin Hibbits 
21040aeed3e9SJustin Hibbits     union {
2105*852ba100SJustin Hibbits         e_FmPcdPlcrColor                dfltColor;                  /**< For Color-Blind Pass-Through mode; the policer will re-color
21060aeed3e9SJustin Hibbits                                                                          any incoming packet with the default value. */
2107*852ba100SJustin Hibbits         e_FmPcdPlcrColor                override;                   /**< For Color-Aware modes; the profile response to a
21080aeed3e9SJustin Hibbits                                                                          pre-color value of 2'b11. */
21090aeed3e9SJustin Hibbits     } color;
21100aeed3e9SJustin Hibbits 
2111*852ba100SJustin Hibbits     t_FmPcdPlcrNonPassthroughAlgParams  nonPassthroughAlgParams;    /**< RFC2698 or RFC4115 parameters */
21120aeed3e9SJustin Hibbits 
2113*852ba100SJustin Hibbits     e_FmPcdEngine                       nextEngineOnGreen;          /**< Next engine for green-colored frames */
2114*852ba100SJustin Hibbits     u_FmPcdPlcrNextEngineParams         paramsOnGreen;              /**< Next engine parameters for green-colored frames  */
21150aeed3e9SJustin Hibbits 
2116*852ba100SJustin Hibbits     e_FmPcdEngine                       nextEngineOnYellow;         /**< Next engine for yellow-colored frames */
2117*852ba100SJustin Hibbits     u_FmPcdPlcrNextEngineParams         paramsOnYellow;             /**< Next engine parameters for yellow-colored frames  */
21180aeed3e9SJustin Hibbits 
2119*852ba100SJustin Hibbits     e_FmPcdEngine                       nextEngineOnRed;            /**< Next engine for red-colored frames */
2120*852ba100SJustin Hibbits     u_FmPcdPlcrNextEngineParams         paramsOnRed;                /**< Next engine parameters for red-colored frames  */
21210aeed3e9SJustin Hibbits 
2122*852ba100SJustin Hibbits     bool                                trapProfileOnFlowA;         /**< Obsolete - do not use */
2123*852ba100SJustin Hibbits     bool                                trapProfileOnFlowB;         /**< Obsolete - do not use */
2124*852ba100SJustin Hibbits     bool                                trapProfileOnFlowC;         /**< Obsolete - do not use */
21250aeed3e9SJustin Hibbits } t_FmPcdPlcrProfileParams;
21260aeed3e9SJustin Hibbits 
21270aeed3e9SJustin Hibbits /**************************************************************************//**
2128*852ba100SJustin Hibbits  @Description   Parameters for selecting a location for requested manipulation
21290aeed3e9SJustin Hibbits *//***************************************************************************/
2130*852ba100SJustin Hibbits typedef struct t_FmManipHdrInfo {
21310aeed3e9SJustin Hibbits     e_NetHeaderType                     hdr;            /**< Header selection */
2132*852ba100SJustin Hibbits     e_FmPcdHdrIndex                     hdrIndex;       /**< Relevant only for MPLS, VLAN and tunneled IP. Otherwise should be cleared. */
21330aeed3e9SJustin Hibbits     bool                                byField;        /**< TRUE if the location of manipulation is according to some field in the specific header*/
21340aeed3e9SJustin Hibbits     t_FmPcdFields                       fullField;      /**< Relevant only when byField = TRUE: Extract field */
2135*852ba100SJustin Hibbits } t_FmManipHdrInfo;
21360aeed3e9SJustin Hibbits 
2137*852ba100SJustin Hibbits #if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
21380aeed3e9SJustin Hibbits /**************************************************************************//**
2139*852ba100SJustin Hibbits  @Description   Parameters for defining an insertion manipulation
2140*852ba100SJustin Hibbits                 of type e_FM_PCD_MANIP_INSRT_TO_START_OF_FRAME_TEMPLATE
21410aeed3e9SJustin Hibbits *//***************************************************************************/
2142*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrInsrtByTemplateParams {
2143*852ba100SJustin Hibbits     uint8_t         size;                               /**< Size of insert template to the start of the frame. */
21440aeed3e9SJustin Hibbits     uint8_t         hdrTemplate[FM_PCD_MAX_MANIP_INSRT_TEMPLATE_SIZE];
2145*852ba100SJustin Hibbits                                                         /**< Array of the insertion template. */
21460aeed3e9SJustin Hibbits 
21470aeed3e9SJustin Hibbits     bool            modifyOuterIp;                      /**< TRUE if user want to modify some fields in outer IP. */
21480aeed3e9SJustin Hibbits     struct {
2149*852ba100SJustin Hibbits         uint16_t    ipOuterOffset;                      /**< Offset of outer IP in the insert template, relevant if modifyOuterIp = TRUE.*/
21500aeed3e9SJustin Hibbits         uint16_t    dscpEcn;                            /**< value of dscpEcn in IP outer, relevant if modifyOuterIp = TRUE.
21510aeed3e9SJustin Hibbits                                                              in IPV4 dscpEcn only byte - it has to be adjusted to the right*/
21520aeed3e9SJustin Hibbits         bool        udpPresent;                         /**< TRUE if UDP is present in the insert template, relevant if modifyOuterIp = TRUE.*/
2153*852ba100SJustin Hibbits         uint8_t     udpOffset;                          /**< Offset in the insert template of UDP, relevant if modifyOuterIp = TRUE and udpPresent=TRUE.*/
21540aeed3e9SJustin Hibbits         uint8_t     ipIdentGenId;                       /**< Used by FMan-CTRL to calculate IP-identification field,relevant if modifyOuterIp = TRUE.*/
21550aeed3e9SJustin Hibbits         bool        recalculateLength;                  /**< TRUE if recalculate length has to be performed due to the engines in the path which can change the frame later, relevant if modifyOuterIp = TRUE.*/
21560aeed3e9SJustin Hibbits         struct {
2157*852ba100SJustin Hibbits             uint8_t blockSize;                          /**< The CAAM block-size; Used by FMan-CTRL to calculate the IP Total Length field.*/
2158*852ba100SJustin Hibbits             uint8_t extraBytesAddedAlignedToBlockSize;  /**< Used by FMan-CTRL to calculate the IP Total Length field and UDP length*/
2159*852ba100SJustin Hibbits             uint8_t extraBytesAddedNotAlignedToBlockSize;/**< Used by FMan-CTRL to calculate the IP Total Length field and UDP length.*/
2160*852ba100SJustin Hibbits         } recalculateLengthParams;                      /**< Recalculate length parameters - relevant if modifyOuterIp = TRUE and recalculateLength = TRUE */
21610aeed3e9SJustin Hibbits     } modifyOuterIpParams;                              /**< Outer IP modification parameters - ignored if modifyOuterIp is FALSE */
21620aeed3e9SJustin Hibbits 
2163*852ba100SJustin Hibbits     bool            modifyOuterVlan;                    /**< TRUE if user wants to modify VPri field in the outer VLAN header*/
21640aeed3e9SJustin Hibbits     struct {
2165*852ba100SJustin Hibbits         uint8_t     vpri;                               /**< Value of VPri, relevant if modifyOuterVlan = TRUE
2166*852ba100SJustin Hibbits                                                              VPri only 3 bits, it has to be adjusted to the right*/
21670aeed3e9SJustin Hibbits     } modifyOuterVlanParams;
2168*852ba100SJustin Hibbits } t_FmPcdManipHdrInsrtByTemplateParams;
21690aeed3e9SJustin Hibbits 
21700aeed3e9SJustin Hibbits /**************************************************************************//**
2171*852ba100SJustin Hibbits  @Description   Parameters for defining CAPWAP fragmentation
21720aeed3e9SJustin Hibbits *//***************************************************************************/
21730aeed3e9SJustin Hibbits typedef struct t_CapwapFragmentationParams {
21740aeed3e9SJustin Hibbits     uint16_t         sizeForFragmentation;              /**< if length of the frame is greater than this value, CAPWAP fragmentation will be executed.*/
21750aeed3e9SJustin Hibbits     bool             headerOptionsCompr;                /**< TRUE - first fragment include the CAPWAP header options field,
21760aeed3e9SJustin Hibbits                                                              and all other fragments exclude the CAPWAP options field,
21770aeed3e9SJustin Hibbits                                                              FALSE - all fragments include CAPWAP header options field. */
21780aeed3e9SJustin Hibbits } t_CapwapFragmentationParams;
21790aeed3e9SJustin Hibbits 
21800aeed3e9SJustin Hibbits /**************************************************************************//**
2181*852ba100SJustin Hibbits  @Description   Parameters for defining CAPWAP reassembly
21820aeed3e9SJustin Hibbits *//***************************************************************************/
21830aeed3e9SJustin Hibbits typedef struct t_CapwapReassemblyParams {
2184*852ba100SJustin Hibbits     uint16_t                        maxNumFramesInProcess;  /**< Number of frames which can be reassembled concurrently; must be power of 2.
2185*852ba100SJustin Hibbits                                                                  In case numOfFramesPerHashEntry == e_FM_PCD_MANIP_FOUR_WAYS_HASH,
21860aeed3e9SJustin Hibbits                                                                  maxNumFramesInProcess has to be in the range of 4 - 512,
2187*852ba100SJustin Hibbits                                                                  In case numOfFramesPerHashEntry == e_FM_PCD_MANIP_EIGHT_WAYS_HASH,
21880aeed3e9SJustin Hibbits                                                                  maxNumFramesInProcess has to be in the range of 8 - 2048 */
2189*852ba100SJustin Hibbits     bool                            haltOnDuplicationFrag;  /**< If TRUE, reassembly process will be halted due to duplicated fragment,
2190*852ba100SJustin Hibbits                                                                  and all processed fragments will be enqueued with error indication;
2191*852ba100SJustin Hibbits                                                                  If FALSE, only duplicated fragments will be enqueued with error indication. */
21920aeed3e9SJustin Hibbits 
2193*852ba100SJustin Hibbits     e_FmPcdManipReassemTimeOutMode  timeOutMode;            /**< Expiration delay initialized by the reassembly process */
2194*852ba100SJustin Hibbits     uint32_t                        fqidForTimeOutFrames;   /**< FQID in which time out frames will enqueue during Time Out Process  */
21950aeed3e9SJustin Hibbits     uint32_t                        timeoutRoutineRequestTime;
21960aeed3e9SJustin Hibbits                                                             /**< Represents the time interval in microseconds between consecutive
21970aeed3e9SJustin Hibbits                                                                  timeout routine requests It has to be power of 2. */
21980aeed3e9SJustin Hibbits     uint32_t                        timeoutThresholdForReassmProcess;
2199*852ba100SJustin Hibbits                                                             /**< Time interval (microseconds) for marking frames in process as too old;
2200*852ba100SJustin Hibbits                                                                  Frames in process are those for which at least one fragment was received
2201*852ba100SJustin Hibbits                                                                  but not all fragments. */
22020aeed3e9SJustin Hibbits 
2203*852ba100SJustin Hibbits     e_FmPcdManipReassemWaysNumber   numOfFramesPerHashEntry;/**< Number of frames per hash entry (needed for the reassembly process) */
22040aeed3e9SJustin Hibbits } t_CapwapReassemblyParams;
22050aeed3e9SJustin Hibbits 
22060aeed3e9SJustin Hibbits /**************************************************************************//**
2207*852ba100SJustin Hibbits  @Description   Parameters for defining fragmentation/reassembly manipulation
22080aeed3e9SJustin Hibbits *//***************************************************************************/
22090aeed3e9SJustin Hibbits typedef struct t_FmPcdManipFragOrReasmParams {
22100aeed3e9SJustin Hibbits     bool                                frag;               /**< TRUE if using the structure for fragmentation,
22110aeed3e9SJustin Hibbits                                                                  otherwise this structure is used for reassembly */
2212*852ba100SJustin Hibbits     uint8_t                             sgBpid;             /**< Scatter/Gather buffer pool id;
2213*852ba100SJustin Hibbits                                                                  Same LIODN number is used for these buffers as for
2214*852ba100SJustin Hibbits                                                                  the received frames buffers, so buffers of this pool
2215*852ba100SJustin Hibbits                                                                  need to be allocated in the same memory area as the
2216*852ba100SJustin Hibbits                                                                  received buffers. If the received buffers arrive
2217*852ba100SJustin Hibbits                                                                  from different sources, the Scatter/Gather BP id
2218*852ba100SJustin Hibbits                                                                  should be mutual to all these sources. */
22190aeed3e9SJustin Hibbits     e_NetHeaderType                     hdr;                /**< Header selection */
22200aeed3e9SJustin Hibbits     union {
2221*852ba100SJustin Hibbits         t_CapwapFragmentationParams     capwapFragParams;   /**< Structure for CAPWAP fragmentation,
2222*852ba100SJustin Hibbits                                                                  relevant if 'frag' = TRUE, 'hdr' = HEADER_TYPE_CAPWAP */
2223*852ba100SJustin Hibbits         t_CapwapReassemblyParams        capwapReasmParams;  /**< Structure for CAPWAP reassembly,
2224*852ba100SJustin Hibbits                                                                  relevant if 'frag' = FALSE, 'hdr' = HEADER_TYPE_CAPWAP */
2225*852ba100SJustin Hibbits     } u;
22260aeed3e9SJustin Hibbits } t_FmPcdManipFragOrReasmParams;
2227*852ba100SJustin Hibbits #endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */
2228*852ba100SJustin Hibbits 
22290aeed3e9SJustin Hibbits 
22300aeed3e9SJustin Hibbits /**************************************************************************//**
2231*852ba100SJustin Hibbits  @Description   Parameters for defining header removal by header type
22320aeed3e9SJustin Hibbits *//***************************************************************************/
2233*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrRmvByHdrParams {
2234*852ba100SJustin Hibbits     e_FmPcdManipHdrRmvByHdrType         type;           /**< Selection of header removal location */
22350aeed3e9SJustin Hibbits     union {
2236*852ba100SJustin Hibbits #if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
2237*852ba100SJustin Hibbits         struct {
2238*852ba100SJustin Hibbits             bool                        include;        /**< If FALSE, remove until the specified header (not including the header);
2239*852ba100SJustin Hibbits                                                              If TRUE, remove also the specified header. */
2240*852ba100SJustin Hibbits             t_FmManipHdrInfo            hdrInfo;
2241*852ba100SJustin Hibbits         } fromStartByHdr;                               /**< Relevant when type = e_FM_PCD_MANIP_RMV_BY_HDR_FROM_START */
2242*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) || ... */
2243*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
2244*852ba100SJustin Hibbits         t_FmManipHdrInfo                hdrInfo;        /**< Relevant when type = e_FM_PCD_MANIP_RMV_BY_HDR_FROM_START */
2245*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
2246*852ba100SJustin Hibbits         e_FmPcdManipHdrRmvSpecificL2    specificL2;     /**< Relevant when type = e_FM_PCD_MANIP_BY_HDR_SPECIFIC_L2;
2247*852ba100SJustin Hibbits                                                              Defines which L2 headers to remove. */
2248*852ba100SJustin Hibbits     } u;
2249*852ba100SJustin Hibbits } t_FmPcdManipHdrRmvByHdrParams;
22500aeed3e9SJustin Hibbits 
22510aeed3e9SJustin Hibbits /**************************************************************************//**
2252*852ba100SJustin Hibbits  @Description   Parameters for configuring IP fragmentation manipulation
2253*852ba100SJustin Hibbits 
2254*852ba100SJustin Hibbits  Restrictions:
2255*852ba100SJustin Hibbits      - IP Fragmentation output fragments must not be forwarded to application directly.
2256*852ba100SJustin Hibbits      - Maximum number of fragments per frame is 16.
2257*852ba100SJustin Hibbits      - Fragmentation of IP fragments is not supported.
2258*852ba100SJustin Hibbits      - IPv4 packets containing header Option fields are fragmented by copying all option
2259*852ba100SJustin Hibbits        fields to each fragment, regardless of the copy bit value.
2260*852ba100SJustin Hibbits      - Transmit confirmation is not supported.
2261*852ba100SJustin Hibbits      - Fragmentation after SEC can't handle S/G frames.
2262*852ba100SJustin Hibbits      - Fragmentation nodes must be set as the last PCD action (i.e. the
2263*852ba100SJustin Hibbits        corresponding CC node key must have next engine set to e_FM_PCD_DONE).
2264*852ba100SJustin Hibbits      - Only BMan buffers shall be used for frames to be fragmented.
2265*852ba100SJustin Hibbits      - IPF does not support VSP. Therefore, on the same port where we have IPF
2266*852ba100SJustin Hibbits        we cannot support VSP.
2267*852ba100SJustin Hibbits      - NOTE: The following comment is relevant only for FMAN v3 devices: IPF
2268*852ba100SJustin Hibbits        does not support VSP. Therefore, on the same port where we have IPF we
2269*852ba100SJustin Hibbits        cannot support VSP.
22700aeed3e9SJustin Hibbits *//***************************************************************************/
2271*852ba100SJustin Hibbits typedef struct t_FmPcdManipFragIpParams {
2272*852ba100SJustin Hibbits     uint16_t                    sizeForFragmentation;   /**< If length of the frame is greater than this value,
2273*852ba100SJustin Hibbits                                                              IP fragmentation will be executed.*/
2274*852ba100SJustin Hibbits #if (DPAA_VERSION == 10)
2275*852ba100SJustin Hibbits     uint8_t                     scratchBpid;            /**< Absolute buffer pool id according to BM configuration.*/
2276*852ba100SJustin Hibbits #endif /* (DPAA_VERSION == 10) */
2277*852ba100SJustin Hibbits     bool                        sgBpidEn;               /**< Enable a dedicated buffer pool id for the Scatter/Gather buffer allocation;
2278*852ba100SJustin Hibbits                                                              If disabled, the Scatter/Gather buffer will be allocated from the same pool as the
2279*852ba100SJustin Hibbits                                                              received frame's buffer. */
2280*852ba100SJustin Hibbits     uint8_t                     sgBpid;                 /**< Scatter/Gather buffer pool id;
2281*852ba100SJustin Hibbits                                                              This parameters is relevant when 'sgBpidEn=TRUE';
2282*852ba100SJustin Hibbits                                                              Same LIODN number is used for these buffers as for the received frames buffers, so buffers
2283*852ba100SJustin Hibbits                                                              of this pool need to be allocated in the same memory area as the received buffers.
2284*852ba100SJustin Hibbits                                                              If the received buffers arrive from different sources, the Scatter/Gather BP id should be
2285*852ba100SJustin Hibbits                                                              mutual to all these sources. */
2286*852ba100SJustin Hibbits     e_FmPcdManipDontFragAction  dontFragAction;         /**< Don't Fragment Action - If an IP packet is larger
2287*852ba100SJustin Hibbits                                                              than MTU and its DF bit is set, then this field will
2288*852ba100SJustin Hibbits                                                              determine the action to be taken.*/
2289*852ba100SJustin Hibbits } t_FmPcdManipFragIpParams;
22900aeed3e9SJustin Hibbits 
22910aeed3e9SJustin Hibbits /**************************************************************************//**
2292*852ba100SJustin Hibbits  @Description   Parameters for configuring IP reassembly manipulation.
2293*852ba100SJustin Hibbits 
2294*852ba100SJustin Hibbits                 This is a common structure for both IPv4 and IPv6 reassembly
2295*852ba100SJustin Hibbits                 manipulation. For reassembly of both IPv4 and IPv6, make sure to
2296*852ba100SJustin Hibbits                 set the 'hdr' field in t_FmPcdManipReassemParams to HEADER_TYPE_IPv6.
2297*852ba100SJustin Hibbits 
2298*852ba100SJustin Hibbits  Restrictions:
2299*852ba100SJustin Hibbits     - Application must define at least one scheme to catch the reassembled frames.
2300*852ba100SJustin Hibbits     - Maximum number of fragments per frame is 16.
2301*852ba100SJustin Hibbits     - Reassembly of IPv4 fragments containing Option fields is supported.
2302*852ba100SJustin Hibbits 
2303*852ba100SJustin Hibbits *//***************************************************************************/
2304*852ba100SJustin Hibbits typedef struct t_FmPcdManipReassemIpParams {
2305*852ba100SJustin Hibbits     uint8_t                         relativeSchemeId[2];    /**< Partition relative scheme id:
2306*852ba100SJustin Hibbits                                                                  relativeSchemeId[0] -  Relative scheme ID for IPV4 Reassembly manipulation;
2307*852ba100SJustin Hibbits                                                                  relativeSchemeId[1] -  Relative scheme ID for IPV6 Reassembly manipulation;
2308*852ba100SJustin Hibbits                                                                  NOTE: The following comment is relevant only for FMAN v2 devices:
2309*852ba100SJustin Hibbits                                                                  Relative scheme ID for IPv4/IPv6 Reassembly manipulation must be smaller than
2310*852ba100SJustin Hibbits                                                                  the user schemes id to ensure that the reassembly schemes will be first match;
2311*852ba100SJustin Hibbits                                                                  Rest schemes, if defined, should have higher relative scheme ID. */
2312*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
2313*852ba100SJustin Hibbits     uint32_t                        nonConsistentSpFqid;    /**< In case that other fragments of the frame corresponds to different storage
2314*852ba100SJustin Hibbits                                                                  profile than the opening fragment (Non-Consistent-SP state)
2315*852ba100SJustin Hibbits                                                                  then one of two possible scenarios occurs:
2316*852ba100SJustin Hibbits                                                                  if 'nonConsistentSpFqid != 0', the reassembled frame will be enqueued to
2317*852ba100SJustin Hibbits                                                                  this fqid, otherwise a 'Non Consistent SP' bit will be set in the FD[status].*/
2318*852ba100SJustin Hibbits #else
2319*852ba100SJustin Hibbits     uint8_t                         sgBpid;                 /**< Buffer pool id for the S/G frame created by the reassembly process */
2320*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
2321*852ba100SJustin Hibbits     uint8_t                         dataMemId;              /**< Memory partition ID for the IPR's external tables structure */
2322*852ba100SJustin Hibbits     uint16_t                        dataLiodnOffset;        /**< LIODN offset for access the IPR's external tables structure. */
2323*852ba100SJustin Hibbits     uint16_t                        minFragSize[2];         /**< Minimum fragment size:
2324*852ba100SJustin Hibbits                                                                  minFragSize[0] - for ipv4, minFragSize[1] - for ipv6 */
2325*852ba100SJustin Hibbits     e_FmPcdManipReassemWaysNumber   numOfFramesPerHashEntry[2];
2326*852ba100SJustin Hibbits                                                             /**< Number of frames per hash entry needed for reassembly process:
2327*852ba100SJustin Hibbits                                                                  numOfFramesPerHashEntry[0] - for ipv4 (max value is e_FM_PCD_MANIP_EIGHT_WAYS_HASH);
2328*852ba100SJustin Hibbits                                                                  numOfFramesPerHashEntry[1] - for ipv6 (max value is e_FM_PCD_MANIP_SIX_WAYS_HASH). */
2329*852ba100SJustin Hibbits     uint16_t                        maxNumFramesInProcess;  /**< Number of frames which can be processed by Reassembly in the same time;
2330*852ba100SJustin Hibbits                                                                  Must be power of 2;
2331*852ba100SJustin Hibbits                                                                  In the case numOfFramesPerHashEntry == e_FM_PCD_MANIP_FOUR_WAYS_HASH,
2332*852ba100SJustin Hibbits                                                                  maxNumFramesInProcess has to be in the range of 4 - 512;
2333*852ba100SJustin Hibbits                                                                  In the case numOfFramesPerHashEntry == e_FM_PCD_MANIP_EIGHT_WAYS_HASH,
2334*852ba100SJustin Hibbits                                                                  maxNumFramesInProcess has to be in the range of 8 - 2048. */
2335*852ba100SJustin Hibbits     e_FmPcdManipReassemTimeOutMode  timeOutMode;            /**< Expiration delay initialized by Reassembly process */
2336*852ba100SJustin Hibbits     uint32_t                        fqidForTimeOutFrames;   /**< FQID in which time out frames will enqueue during Time Out Process;
2337*852ba100SJustin Hibbits                                                                  Recommended value for this field is 0; in this way timed-out frames will be discarded */
2338*852ba100SJustin Hibbits     uint32_t                        timeoutThresholdForReassmProcess;
2339*852ba100SJustin Hibbits                                                             /**< Represents the time interval in microseconds which defines
2340*852ba100SJustin Hibbits                                                                  if opened frame (at least one fragment was processed but not all the fragments)is found as too old*/
2341*852ba100SJustin Hibbits } t_FmPcdManipReassemIpParams;
2342*852ba100SJustin Hibbits 
2343*852ba100SJustin Hibbits /**************************************************************************//**
2344*852ba100SJustin Hibbits  @Description   structure for defining IPSEC manipulation
2345*852ba100SJustin Hibbits *//***************************************************************************/
2346*852ba100SJustin Hibbits typedef struct t_FmPcdManipSpecialOffloadIPSecParams {
2347*852ba100SJustin Hibbits     bool        decryption;                     /**< TRUE if being used in decryption direction;
2348*852ba100SJustin Hibbits                                                      FALSE if being used in encryption direction. */
2349*852ba100SJustin Hibbits     bool        ecnCopy;                        /**< TRUE to copy the ECN bits from inner/outer to outer/inner
2350*852ba100SJustin Hibbits                                                      (direction depends on the 'decryption' field). */
2351*852ba100SJustin Hibbits     bool        dscpCopy;                       /**< TRUE to copy the DSCP bits from inner/outer to outer/inner
2352*852ba100SJustin Hibbits                                                      (direction depends on the 'decryption' field). */
2353*852ba100SJustin Hibbits     bool        variableIpHdrLen;               /**< TRUE for supporting variable IP header length in decryption. */
2354*852ba100SJustin Hibbits     bool        variableIpVersion;              /**< TRUE for supporting both IP version on the same SA in encryption */
2355*852ba100SJustin Hibbits     uint8_t     outerIPHdrLen;                  /**< if 'variableIpVersion == TRUE' then this field must be set to non-zero value;
2356*852ba100SJustin Hibbits                                                      It is specifies the length of the outer IP header that was configured in the
2357*852ba100SJustin Hibbits                                                      corresponding SA. */
2358*852ba100SJustin Hibbits     uint16_t    arwSize;                        /**< if <> '0' then will perform ARW check for this SA;
2359*852ba100SJustin Hibbits                                                      The value must be a multiplication of 16 */
2360*852ba100SJustin Hibbits     uintptr_t   arwAddr;                        /**< if arwSize <> '0' then this field must be set to non-zero value;
2361*852ba100SJustin Hibbits                                                      MUST be allocated from FMAN's MURAM that the post-sec op-port belongs to;
2362*852ba100SJustin Hibbits                                                      Must be 4B aligned. Required MURAM size is 'NEXT_POWER_OF_2(arwSize+32))/8+4' Bytes */
2363*852ba100SJustin Hibbits } t_FmPcdManipSpecialOffloadIPSecParams;
2364*852ba100SJustin Hibbits 
2365*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
2366*852ba100SJustin Hibbits /**************************************************************************//**
2367*852ba100SJustin Hibbits  @Description   Parameters for configuring CAPWAP fragmentation manipulation
2368*852ba100SJustin Hibbits 
2369*852ba100SJustin Hibbits  Restrictions:
2370*852ba100SJustin Hibbits      - Maximum number of fragments per frame is 16.
2371*852ba100SJustin Hibbits      - Transmit confirmation is not supported.
2372*852ba100SJustin Hibbits      - Fragmentation nodes must be set as the last PCD action (i.e. the
2373*852ba100SJustin Hibbits        corresponding CC node key must have next engine set to e_FM_PCD_DONE).
2374*852ba100SJustin Hibbits      - Only BMan buffers shall be used for frames to be fragmented.
2375*852ba100SJustin Hibbits      - NOTE: The following comment is relevant only for FMAN v3 devices: IPF
2376*852ba100SJustin Hibbits        does not support VSP. Therefore, on the same port where we have IPF we
2377*852ba100SJustin Hibbits        cannot support VSP.
2378*852ba100SJustin Hibbits *//***************************************************************************/
2379*852ba100SJustin Hibbits typedef struct t_FmPcdManipFragCapwapParams {
2380*852ba100SJustin Hibbits     uint16_t                    sizeForFragmentation;   /**< If length of the frame is greater than this value,
2381*852ba100SJustin Hibbits                                                              CAPWAP fragmentation will be executed.*/
2382*852ba100SJustin Hibbits     bool                        sgBpidEn;               /**< Enable a dedicated buffer pool id for the Scatter/Gather buffer allocation;
2383*852ba100SJustin Hibbits                                                              If disabled, the Scatter/Gather buffer will be allocated from the same pool as the
2384*852ba100SJustin Hibbits                                                              received frame's buffer. */
2385*852ba100SJustin Hibbits     uint8_t                     sgBpid;                 /**< Scatter/Gather buffer pool id;
2386*852ba100SJustin Hibbits                                                              This parameters is relevant when 'sgBpidEn=TRUE';
2387*852ba100SJustin Hibbits                                                              Same LIODN number is used for these buffers as for the received frames buffers, so buffers
2388*852ba100SJustin Hibbits                                                              of this pool need to be allocated in the same memory area as the received buffers.
2389*852ba100SJustin Hibbits                                                              If the received buffers arrive from different sources, the Scatter/Gather BP id should be
2390*852ba100SJustin Hibbits                                                              mutual to all these sources. */
2391*852ba100SJustin Hibbits     bool                        compressModeEn;         /**< CAPWAP Header Options Compress Enable mode;
2392*852ba100SJustin Hibbits                                                              When this mode is enabled then only the first fragment include the CAPWAP header options
2393*852ba100SJustin Hibbits                                                              field (if user provides it in the input frame) and all other fragments exclude the CAPWAP
2394*852ba100SJustin Hibbits                                                              options field (CAPWAP header is updated accordingly).*/
2395*852ba100SJustin Hibbits } t_FmPcdManipFragCapwapParams;
2396*852ba100SJustin Hibbits 
2397*852ba100SJustin Hibbits /**************************************************************************//**
2398*852ba100SJustin Hibbits  @Description   Parameters for configuring CAPWAP reassembly manipulation.
2399*852ba100SJustin Hibbits 
2400*852ba100SJustin Hibbits  Restrictions:
2401*852ba100SJustin Hibbits     - Application must define one scheme to catch the reassembled frames.
2402*852ba100SJustin Hibbits     - Maximum number of fragments per frame is 16.
2403*852ba100SJustin Hibbits 
2404*852ba100SJustin Hibbits *//***************************************************************************/
2405*852ba100SJustin Hibbits typedef struct t_FmPcdManipReassemCapwapParams {
2406*852ba100SJustin Hibbits     uint8_t                         relativeSchemeId;    /**< Partition relative scheme id;
2407*852ba100SJustin Hibbits                                                                  NOTE: this id must be smaller than the user schemes id to ensure that the reassembly scheme will be first match;
2408*852ba100SJustin Hibbits                                                                  Rest schemes, if defined, should have higher relative scheme ID. */
2409*852ba100SJustin Hibbits     uint8_t                         dataMemId;              /**< Memory partition ID for the IPR's external tables structure */
2410*852ba100SJustin Hibbits     uint16_t                        dataLiodnOffset;        /**< LIODN offset for access the IPR's external tables structure. */
2411*852ba100SJustin Hibbits     uint16_t                        maxReassembledFrameLength;/**< The maximum CAPWAP reassembled frame length in bytes;
2412*852ba100SJustin Hibbits                                                                    If maxReassembledFrameLength == 0, any successful reassembled frame length is
2413*852ba100SJustin Hibbits                                                                    considered as a valid length;
2414*852ba100SJustin Hibbits                                                                    if maxReassembledFrameLength > 0, a successful reassembled frame which its length
2415*852ba100SJustin Hibbits                                                                    exceeds this value is considered as an error frame (FD status[CRE] bit is set). */
2416*852ba100SJustin Hibbits     e_FmPcdManipReassemWaysNumber   numOfFramesPerHashEntry;
2417*852ba100SJustin Hibbits                                                             /**< Number of frames per hash entry needed for reassembly process */
2418*852ba100SJustin Hibbits     uint16_t                        maxNumFramesInProcess;  /**< Number of frames which can be processed by reassembly in the same time;
2419*852ba100SJustin Hibbits                                                                  Must be power of 2;
2420*852ba100SJustin Hibbits                                                                  In the case numOfFramesPerHashEntry == e_FM_PCD_MANIP_FOUR_WAYS_HASH,
2421*852ba100SJustin Hibbits                                                                  maxNumFramesInProcess has to be in the range of 4 - 512;
2422*852ba100SJustin Hibbits                                                                  In the case numOfFramesPerHashEntry == e_FM_PCD_MANIP_EIGHT_WAYS_HASH,
2423*852ba100SJustin Hibbits                                                                  maxNumFramesInProcess has to be in the range of 8 - 2048. */
2424*852ba100SJustin Hibbits     e_FmPcdManipReassemTimeOutMode  timeOutMode;            /**< Expiration delay initialized by Reassembly process */
2425*852ba100SJustin Hibbits     uint32_t                        fqidForTimeOutFrames;   /**< FQID in which time out frames will enqueue during Time Out Process;
2426*852ba100SJustin Hibbits                                                                  Recommended value for this field is 0; in this way timed-out frames will be discarded */
2427*852ba100SJustin Hibbits     uint32_t                        timeoutThresholdForReassmProcess;
2428*852ba100SJustin Hibbits                                                             /**< Represents the time interval in microseconds which defines
2429*852ba100SJustin Hibbits                                                                  if opened frame (at least one fragment was processed but not all the fragments)is found as too old*/
2430*852ba100SJustin Hibbits } t_FmPcdManipReassemCapwapParams;
2431*852ba100SJustin Hibbits 
2432*852ba100SJustin Hibbits /**************************************************************************//**
2433*852ba100SJustin Hibbits  @Description   structure for defining CAPWAP manipulation
2434*852ba100SJustin Hibbits *//***************************************************************************/
2435*852ba100SJustin Hibbits typedef struct t_FmPcdManipSpecialOffloadCapwapParams {
2436*852ba100SJustin Hibbits     bool                    dtls;   /**< TRUE if continue to SEC DTLS encryption */
2437*852ba100SJustin Hibbits     e_FmPcdManipHdrQosSrc   qosSrc; /**< TODO */
2438*852ba100SJustin Hibbits } t_FmPcdManipSpecialOffloadCapwapParams;
2439*852ba100SJustin Hibbits 
2440*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
2441*852ba100SJustin Hibbits 
2442*852ba100SJustin Hibbits 
2443*852ba100SJustin Hibbits /**************************************************************************//**
2444*852ba100SJustin Hibbits  @Description   Parameters for defining special offload manipulation
2445*852ba100SJustin Hibbits *//***************************************************************************/
2446*852ba100SJustin Hibbits typedef struct t_FmPcdManipSpecialOffloadParams {
2447*852ba100SJustin Hibbits     e_FmPcdManipSpecialOffloadType              type;       /**< Type of special offload manipulation */
2448*852ba100SJustin Hibbits     union
2449*852ba100SJustin Hibbits     {
2450*852ba100SJustin Hibbits         t_FmPcdManipSpecialOffloadIPSecParams   ipsec;      /**< Parameters for IPSec; Relevant when
2451*852ba100SJustin Hibbits                                                                  type = e_FM_PCD_MANIP_SPECIAL_OFFLOAD_IPSEC */
2452*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
2453*852ba100SJustin Hibbits         t_FmPcdManipSpecialOffloadCapwapParams  capwap;     /**< Parameters for CAPWAP; Relevant when
2454*852ba100SJustin Hibbits                                                                  type = e_FM_PCD_MANIP_SPECIAL_OFFLOAD_CAPWAP */
2455*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
2456*852ba100SJustin Hibbits     } u;
2457*852ba100SJustin Hibbits } t_FmPcdManipSpecialOffloadParams;
2458*852ba100SJustin Hibbits 
2459*852ba100SJustin Hibbits /**************************************************************************//**
2460*852ba100SJustin Hibbits  @Description   Parameters for defining insertion manipulation
2461*852ba100SJustin Hibbits *//***************************************************************************/
2462*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrInsrt {
2463*852ba100SJustin Hibbits     uint8_t size;           /**< size of inserted section */
2464*852ba100SJustin Hibbits     uint8_t *p_Data;        /**< data to be inserted */
2465*852ba100SJustin Hibbits } t_FmPcdManipHdrInsrt;
2466*852ba100SJustin Hibbits 
2467*852ba100SJustin Hibbits 
2468*852ba100SJustin Hibbits /**************************************************************************//**
2469*852ba100SJustin Hibbits  @Description   Parameters for defining generic removal manipulation
2470*852ba100SJustin Hibbits *//***************************************************************************/
2471*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrRmvGenericParams {
2472*852ba100SJustin Hibbits     uint8_t                         offset;         /**< Offset from beginning of header to the start
2473*852ba100SJustin Hibbits                                                          location of the removal */
2474*852ba100SJustin Hibbits     uint8_t                         size;           /**< Size of removed section */
2475*852ba100SJustin Hibbits } t_FmPcdManipHdrRmvGenericParams;
2476*852ba100SJustin Hibbits 
2477*852ba100SJustin Hibbits /**************************************************************************//**
2478*852ba100SJustin Hibbits  @Description   Parameters for defining generic insertion manipulation
2479*852ba100SJustin Hibbits *//***************************************************************************/
2480*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrInsrtGenericParams {
2481*852ba100SJustin Hibbits     uint8_t                         offset;         /**< Offset from beginning of header to the start
2482*852ba100SJustin Hibbits                                                          location of the insertion */
2483*852ba100SJustin Hibbits     uint8_t                         size;           /**< Size of inserted section */
2484*852ba100SJustin Hibbits     bool                            replace;        /**< TRUE to override (replace) existing data at
2485*852ba100SJustin Hibbits                                                          'offset', FALSE to insert */
2486*852ba100SJustin Hibbits     uint8_t                         *p_Data;        /**< Pointer to data to be inserted */
2487*852ba100SJustin Hibbits } t_FmPcdManipHdrInsrtGenericParams;
2488*852ba100SJustin Hibbits 
2489*852ba100SJustin Hibbits /**************************************************************************//**
2490*852ba100SJustin Hibbits  @Description   Parameters for defining header manipulation VLAN DSCP To Vpri translation
2491*852ba100SJustin Hibbits *//***************************************************************************/
2492*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrFieldUpdateVlanDscpToVpri {
2493*852ba100SJustin Hibbits     uint8_t                         dscpToVpriTable[FM_PCD_MANIP_DSCP_TO_VLAN_TRANS];
2494*852ba100SJustin Hibbits                                                         /**< A table of VPri values for each DSCP value;
2495*852ba100SJustin Hibbits                                                              The index is the DSCP value (0-0x3F) and the
2496*852ba100SJustin Hibbits                                                              value is the corresponding VPRI (0-15). */
2497*852ba100SJustin Hibbits     uint8_t                         vpriDefVal;         /**< 0-7, Relevant only if if updateType =
2498*852ba100SJustin Hibbits                                                              e_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN,
2499*852ba100SJustin Hibbits                                                              this field is the Q Tag default value if the
2500*852ba100SJustin Hibbits                                                              IP header is not found. */
2501*852ba100SJustin Hibbits } t_FmPcdManipHdrFieldUpdateVlanDscpToVpri;
2502*852ba100SJustin Hibbits 
2503*852ba100SJustin Hibbits /**************************************************************************//**
2504*852ba100SJustin Hibbits  @Description   Parameters for defining header manipulation VLAN fields updates
2505*852ba100SJustin Hibbits *//***************************************************************************/
2506*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrFieldUpdateVlan {
2507*852ba100SJustin Hibbits     e_FmPcdManipHdrFieldUpdateVlan                  updateType; /**< Selects VLAN update type */
2508*852ba100SJustin Hibbits     union {
2509*852ba100SJustin Hibbits         uint8_t                                     vpri;       /**< 0-7, Relevant only if If updateType =
2510*852ba100SJustin Hibbits                                                                      e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN_PRI, this
2511*852ba100SJustin Hibbits                                                                      is the new VLAN pri. */
2512*852ba100SJustin Hibbits         t_FmPcdManipHdrFieldUpdateVlanDscpToVpri    dscpToVpri; /**< Parameters structure, Relevant only if updateType
2513*852ba100SJustin Hibbits                                                                      = e_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN. */
2514*852ba100SJustin Hibbits     } u;
2515*852ba100SJustin Hibbits } t_FmPcdManipHdrFieldUpdateVlan;
2516*852ba100SJustin Hibbits 
2517*852ba100SJustin Hibbits /**************************************************************************//**
2518*852ba100SJustin Hibbits  @Description   Parameters for defining header manipulation IPV4 fields updates
2519*852ba100SJustin Hibbits *//***************************************************************************/
2520*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrFieldUpdateIpv4 {
2521*852ba100SJustin Hibbits     ipv4HdrManipUpdateFlags_t       validUpdates;       /**< ORed flag, selecting the required updates */
2522*852ba100SJustin Hibbits     uint8_t                         tos;                /**< 8 bit New TOS; Relevant if validUpdates contains
2523*852ba100SJustin Hibbits                                                              HDR_MANIP_IPV4_TOS */
2524*852ba100SJustin Hibbits     uint16_t                        id;                 /**< 16 bit New IP ID; Relevant only if validUpdates
2525*852ba100SJustin Hibbits                                                              contains HDR_MANIP_IPV4_ID */
2526*852ba100SJustin Hibbits     uint32_t                        src;                /**< 32 bit New IP SRC; Relevant only if validUpdates
2527*852ba100SJustin Hibbits                                                              contains HDR_MANIP_IPV4_SRC */
2528*852ba100SJustin Hibbits     uint32_t                        dst;                /**< 32 bit New IP DST; Relevant only if validUpdates
2529*852ba100SJustin Hibbits                                                              contains HDR_MANIP_IPV4_DST */
2530*852ba100SJustin Hibbits } t_FmPcdManipHdrFieldUpdateIpv4;
2531*852ba100SJustin Hibbits 
2532*852ba100SJustin Hibbits /**************************************************************************//**
2533*852ba100SJustin Hibbits  @Description   Parameters for defining header manipulation IPV6 fields updates
2534*852ba100SJustin Hibbits *//***************************************************************************/
2535*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrFieldUpdateIpv6 {
2536*852ba100SJustin Hibbits     ipv6HdrManipUpdateFlags_t   validUpdates;           /**< ORed flag, selecting the required updates */
2537*852ba100SJustin Hibbits     uint8_t                     trafficClass;           /**< 8 bit New Traffic Class; Relevant if validUpdates contains
2538*852ba100SJustin Hibbits                                                              HDR_MANIP_IPV6_TC */
2539*852ba100SJustin Hibbits     uint8_t                     src[NET_HEADER_FIELD_IPv6_ADDR_SIZE];
2540*852ba100SJustin Hibbits                                                         /**< 16 byte new IP SRC; Relevant only if validUpdates
2541*852ba100SJustin Hibbits                                                              contains HDR_MANIP_IPV6_SRC */
2542*852ba100SJustin Hibbits     uint8_t                     dst[NET_HEADER_FIELD_IPv6_ADDR_SIZE];
2543*852ba100SJustin Hibbits                                                         /**< 16 byte new IP DST; Relevant only if validUpdates
2544*852ba100SJustin Hibbits                                                              contains HDR_MANIP_IPV6_DST */
2545*852ba100SJustin Hibbits } t_FmPcdManipHdrFieldUpdateIpv6;
2546*852ba100SJustin Hibbits 
2547*852ba100SJustin Hibbits /**************************************************************************//**
2548*852ba100SJustin Hibbits  @Description   Parameters for defining header manipulation TCP/UDP fields updates
2549*852ba100SJustin Hibbits *//***************************************************************************/
2550*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrFieldUpdateTcpUdp {
2551*852ba100SJustin Hibbits     tcpUdpHdrManipUpdateFlags_t     validUpdates;       /**< ORed flag, selecting the required updates */
2552*852ba100SJustin Hibbits     uint16_t                        src;                /**< 16 bit New TCP/UDP SRC; Relevant only if validUpdates
2553*852ba100SJustin Hibbits                                                              contains HDR_MANIP_TCP_UDP_SRC */
2554*852ba100SJustin Hibbits     uint16_t                        dst;                /**< 16 bit New TCP/UDP DST; Relevant only if validUpdates
2555*852ba100SJustin Hibbits                                                              contains HDR_MANIP_TCP_UDP_DST */
2556*852ba100SJustin Hibbits } t_FmPcdManipHdrFieldUpdateTcpUdp;
2557*852ba100SJustin Hibbits 
2558*852ba100SJustin Hibbits /**************************************************************************//**
2559*852ba100SJustin Hibbits  @Description   Parameters for defining header manipulation fields updates
2560*852ba100SJustin Hibbits *//***************************************************************************/
2561*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrFieldUpdateParams {
2562*852ba100SJustin Hibbits     e_FmPcdManipHdrFieldUpdateType                  type;           /**< Type of header field update manipulation */
2563*852ba100SJustin Hibbits     union {
2564*852ba100SJustin Hibbits         t_FmPcdManipHdrFieldUpdateVlan              vlan;           /**< Parameters for VLAN update. Relevant when
2565*852ba100SJustin Hibbits                                                                          type = e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN */
2566*852ba100SJustin Hibbits         t_FmPcdManipHdrFieldUpdateIpv4              ipv4;           /**< Parameters for IPv4 update. Relevant when
2567*852ba100SJustin Hibbits                                                                          type = e_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV4 */
2568*852ba100SJustin Hibbits         t_FmPcdManipHdrFieldUpdateIpv6              ipv6;           /**< Parameters for IPv6 update. Relevant when
2569*852ba100SJustin Hibbits                                                                          type = e_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV6 */
2570*852ba100SJustin Hibbits         t_FmPcdManipHdrFieldUpdateTcpUdp            tcpUdp;         /**< Parameters for TCP/UDP update. Relevant when
2571*852ba100SJustin Hibbits                                                                          type = e_FM_PCD_MANIP_HDR_FIELD_UPDATE_TCP_UDP */
2572*852ba100SJustin Hibbits     } u;
2573*852ba100SJustin Hibbits } t_FmPcdManipHdrFieldUpdateParams;
2574*852ba100SJustin Hibbits 
2575*852ba100SJustin Hibbits 
2576*852ba100SJustin Hibbits 
2577*852ba100SJustin Hibbits /**************************************************************************//**
2578*852ba100SJustin Hibbits  @Description   Parameters for defining custom header manipulation for generic field replacement
2579*852ba100SJustin Hibbits *//***************************************************************************/
2580*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrCustomGenFieldReplace {
2581*852ba100SJustin Hibbits     uint8_t                         srcOffset;          /**< Location of new data - Offset from
2582*852ba100SJustin Hibbits                                                              Parse Result  (>= 16, srcOffset+size <= 32, ) */
2583*852ba100SJustin Hibbits     uint8_t                         dstOffset;          /**< Location of data to be overwritten - Offset from
2584*852ba100SJustin Hibbits                                                              start of frame (dstOffset + size <= 256). */
2585*852ba100SJustin Hibbits     uint8_t                         size;               /**< The number of bytes (<=16) to be replaced */
2586*852ba100SJustin Hibbits     uint8_t                         mask;               /**< Optional 1 byte mask. Set to select bits for
2587*852ba100SJustin Hibbits                                                              replacement (1 - bit will be replaced);
2588*852ba100SJustin Hibbits                                                              Clear to use field as is. */
2589*852ba100SJustin Hibbits     uint8_t                         maskOffset;         /**< Relevant if mask != 0;
2590*852ba100SJustin Hibbits                                                              Mask offset within the replaces "size" */
2591*852ba100SJustin Hibbits } t_FmPcdManipHdrCustomGenFieldReplace;
2592*852ba100SJustin Hibbits 
2593*852ba100SJustin Hibbits /**************************************************************************//**
2594*852ba100SJustin Hibbits  @Description   Parameters for defining custom header manipulation for IP replacement
2595*852ba100SJustin Hibbits *//***************************************************************************/
2596*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrCustomIpHdrReplace {
2597*852ba100SJustin Hibbits     e_FmPcdManipHdrCustomIpReplace  replaceType;        /**< Selects replace update type */
2598*852ba100SJustin Hibbits     bool                            decTtlHl;           /**< Decrement TTL (IPV4) or Hop limit (IPV6) by 1  */
2599*852ba100SJustin Hibbits     bool                            updateIpv4Id;       /**< Relevant when replaceType =
2600*852ba100SJustin Hibbits                                                              e_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV6_BY_IPV4 */
2601*852ba100SJustin Hibbits     uint16_t                        id;                 /**< 16 bit New IP ID; Relevant only if
2602*852ba100SJustin Hibbits                                                              updateIpv4Id = TRUE */
2603*852ba100SJustin Hibbits     uint8_t                         hdrSize;            /**< The size of the new IP header */
2604*852ba100SJustin Hibbits     uint8_t                         hdr[FM_PCD_MANIP_MAX_HDR_SIZE];
2605*852ba100SJustin Hibbits                                                         /**< The new IP header */
2606*852ba100SJustin Hibbits } t_FmPcdManipHdrCustomIpHdrReplace;
2607*852ba100SJustin Hibbits 
2608*852ba100SJustin Hibbits /**************************************************************************//**
2609*852ba100SJustin Hibbits  @Description   Parameters for defining custom header manipulation
2610*852ba100SJustin Hibbits *//***************************************************************************/
2611*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrCustomParams {
2612*852ba100SJustin Hibbits     e_FmPcdManipHdrCustomType                   type;           /**< Type of header field update manipulation */
2613*852ba100SJustin Hibbits     union {
2614*852ba100SJustin Hibbits         t_FmPcdManipHdrCustomIpHdrReplace       ipHdrReplace;   /**< Parameters IP header replacement */
2615*852ba100SJustin Hibbits         t_FmPcdManipHdrCustomGenFieldReplace    genFieldReplace;   /**< Parameters IP header replacement */
2616*852ba100SJustin Hibbits     } u;
2617*852ba100SJustin Hibbits } t_FmPcdManipHdrCustomParams;
2618*852ba100SJustin Hibbits 
2619*852ba100SJustin Hibbits /**************************************************************************//**
2620*852ba100SJustin Hibbits  @Description   Parameters for defining specific L2 insertion manipulation
2621*852ba100SJustin Hibbits *//***************************************************************************/
2622*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrInsrtSpecificL2Params {
2623*852ba100SJustin Hibbits     e_FmPcdManipHdrInsrtSpecificL2  specificL2;     /**< Selects which L2 headers to insert */
2624*852ba100SJustin Hibbits     bool                            update;         /**< TRUE to update MPLS header */
2625*852ba100SJustin Hibbits     uint8_t                         size;           /**< size of inserted section */
2626*852ba100SJustin Hibbits     uint8_t                         *p_Data;        /**< data to be inserted */
2627*852ba100SJustin Hibbits } t_FmPcdManipHdrInsrtSpecificL2Params;
2628*852ba100SJustin Hibbits 
2629*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
2630*852ba100SJustin Hibbits /**************************************************************************//**
2631*852ba100SJustin Hibbits  @Description   Parameters for defining IP insertion manipulation
2632*852ba100SJustin Hibbits *//***************************************************************************/
2633*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrInsrtIpParams {
2634*852ba100SJustin Hibbits     bool                            calcL4Checksum; /**< Calculate L4 checksum. */
2635*852ba100SJustin Hibbits     e_FmPcdManipHdrQosMappingMode   mappingMode;    /**< TODO */
2636*852ba100SJustin Hibbits     uint8_t                         lastPidOffset;  /**< the offset of the last Protocol within
2637*852ba100SJustin Hibbits                                                          the inserted header */
2638*852ba100SJustin Hibbits     uint16_t                        id;         /**< 16 bit New IP ID */
2639*852ba100SJustin Hibbits     bool                            dontFragOverwrite;
2640*852ba100SJustin Hibbits     /**< IPv4 only. DF is overwritten with the hash-result next-to-last byte.
2641*852ba100SJustin Hibbits      * This byte is configured to be overwritten when RPD is set. */
2642*852ba100SJustin Hibbits     uint8_t                         lastDstOffset;
2643*852ba100SJustin Hibbits     /**< IPv6 only. if routing extension exist, user should set the offset of the destination address
2644*852ba100SJustin Hibbits      * in order to calculate UDP checksum pseudo header;
2645*852ba100SJustin Hibbits      * Otherwise set it to '0'. */
2646*852ba100SJustin Hibbits     t_FmPcdManipHdrInsrt            insrt;      /**< size and data to be inserted. */
2647*852ba100SJustin Hibbits } t_FmPcdManipHdrInsrtIpParams;
2648*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
2649*852ba100SJustin Hibbits 
2650*852ba100SJustin Hibbits /**************************************************************************//**
2651*852ba100SJustin Hibbits  @Description   Parameters for defining header insertion manipulation by header type
2652*852ba100SJustin Hibbits *//***************************************************************************/
2653*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrInsrtByHdrParams {
2654*852ba100SJustin Hibbits     e_FmPcdManipHdrInsrtByHdrType               type;   /**< Selects manipulation type */
2655*852ba100SJustin Hibbits     union {
2656*852ba100SJustin Hibbits 
2657*852ba100SJustin Hibbits         t_FmPcdManipHdrInsrtSpecificL2Params    specificL2Params;
2658*852ba100SJustin Hibbits                                                              /**< Used when type = e_FM_PCD_MANIP_INSRT_BY_HDR_SPECIFIC_L2:
2659*852ba100SJustin Hibbits                                                               Selects which L2 headers to insert */
2660*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
2661*852ba100SJustin Hibbits         t_FmPcdManipHdrInsrtIpParams            ipParams;  /**< Used when type = e_FM_PCD_MANIP_INSRT_BY_HDR_IP */
2662*852ba100SJustin Hibbits         t_FmPcdManipHdrInsrt                    insrt;     /**< Used when type is one of e_FM_PCD_MANIP_INSRT_BY_HDR_UDP,
2663*852ba100SJustin Hibbits                                                                 e_FM_PCD_MANIP_INSRT_BY_HDR_UDP_LITE, or
2664*852ba100SJustin Hibbits                                                                 e_FM_PCD_MANIP_INSRT_BY_HDR_CAPWAP */
2665*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
2666*852ba100SJustin Hibbits     } u;
2667*852ba100SJustin Hibbits } t_FmPcdManipHdrInsrtByHdrParams;
2668*852ba100SJustin Hibbits 
2669*852ba100SJustin Hibbits /**************************************************************************//**
2670*852ba100SJustin Hibbits  @Description   Parameters for defining header insertion manipulation
2671*852ba100SJustin Hibbits *//***************************************************************************/
2672*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrInsrtParams {
2673*852ba100SJustin Hibbits     e_FmPcdManipHdrInsrtType                    type;       /**< Type of insertion manipulation */
2674*852ba100SJustin Hibbits     union {
2675*852ba100SJustin Hibbits         t_FmPcdManipHdrInsrtByHdrParams         byHdr;      /**< Parameters for defining header insertion manipulation by header type,
2676*852ba100SJustin Hibbits                                                                  relevant if 'type' = e_FM_PCD_MANIP_INSRT_BY_HDR */
2677*852ba100SJustin Hibbits         t_FmPcdManipHdrInsrtGenericParams       generic;    /**< Parameters for defining generic header insertion manipulation,
2678*852ba100SJustin Hibbits                                                                  relevant if 'type' = e_FM_PCD_MANIP_INSRT_GENERIC */
2679*852ba100SJustin Hibbits #if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
2680*852ba100SJustin Hibbits         t_FmPcdManipHdrInsrtByTemplateParams    byTemplate; /**< Parameters for defining header insertion manipulation by template,
2681*852ba100SJustin Hibbits                                                                  relevant if 'type' = e_FM_PCD_MANIP_INSRT_BY_TEMPLATE */
2682*852ba100SJustin Hibbits #endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */
2683*852ba100SJustin Hibbits     } u;
2684*852ba100SJustin Hibbits } t_FmPcdManipHdrInsrtParams;
2685*852ba100SJustin Hibbits 
2686*852ba100SJustin Hibbits /**************************************************************************//**
2687*852ba100SJustin Hibbits  @Description   Parameters for defining header removal manipulation
2688*852ba100SJustin Hibbits *//***************************************************************************/
2689*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrRmvParams {
2690*852ba100SJustin Hibbits     e_FmPcdManipHdrRmvType                  type;       /**< Type of header removal manipulation */
2691*852ba100SJustin Hibbits     union {
2692*852ba100SJustin Hibbits         t_FmPcdManipHdrRmvByHdrParams       byHdr;      /**< Parameters for defining header removal manipulation by header type,
2693*852ba100SJustin Hibbits                                                              relevant if type = e_FM_PCD_MANIP_RMV_BY_HDR */
2694*852ba100SJustin Hibbits         t_FmPcdManipHdrRmvGenericParams     generic;    /**< Parameters for defining generic header removal manipulation,
2695*852ba100SJustin Hibbits                                                              relevant if type = e_FM_PCD_MANIP_RMV_GENERIC */
2696*852ba100SJustin Hibbits     } u;
2697*852ba100SJustin Hibbits } t_FmPcdManipHdrRmvParams;
2698*852ba100SJustin Hibbits 
2699*852ba100SJustin Hibbits /**************************************************************************//**
2700*852ba100SJustin Hibbits  @Description   Parameters for defining header manipulation node
2701*852ba100SJustin Hibbits *//***************************************************************************/
2702*852ba100SJustin Hibbits typedef struct t_FmPcdManipHdrParams {
2703*852ba100SJustin Hibbits     bool                                        rmv;                /**< TRUE, to define removal manipulation */
2704*852ba100SJustin Hibbits     t_FmPcdManipHdrRmvParams                    rmvParams;          /**< Parameters for removal manipulation, relevant if 'rmv' = TRUE */
2705*852ba100SJustin Hibbits 
2706*852ba100SJustin Hibbits     bool                                        insrt;              /**< TRUE, to define insertion manipulation */
2707*852ba100SJustin Hibbits     t_FmPcdManipHdrInsrtParams                  insrtParams;        /**< Parameters for insertion manipulation, relevant if 'insrt' = TRUE */
2708*852ba100SJustin Hibbits 
2709*852ba100SJustin Hibbits     bool                                        fieldUpdate;        /**< TRUE, to define field update manipulation */
2710*852ba100SJustin Hibbits     t_FmPcdManipHdrFieldUpdateParams            fieldUpdateParams;  /**< Parameters for field update manipulation, relevant if 'fieldUpdate' = TRUE */
2711*852ba100SJustin Hibbits 
2712*852ba100SJustin Hibbits     bool                                        custom;             /**< TRUE, to define custom manipulation */
2713*852ba100SJustin Hibbits     t_FmPcdManipHdrCustomParams                 customParams;       /**< Parameters for custom manipulation, relevant if 'custom' = TRUE */
2714*852ba100SJustin Hibbits 
2715*852ba100SJustin Hibbits     bool                                        dontParseAfterManip;/**< TRUE to de-activate the parser after the manipulation defined in this node.
2716*852ba100SJustin Hibbits                                                                                           Restrictions:
2717*852ba100SJustin Hibbits                                                                                           1. MUST be set if the next engine after the CC is not another CC node
2718*852ba100SJustin Hibbits                                                                                           (but rather Policer or Keygen), and this is the last (no h_NextManip) in a chain
2719*852ba100SJustin Hibbits                                                                                           of manipulation nodes. This includes single nodes (i.e. no h_NextManip and
2720*852ba100SJustin Hibbits                                                                                           also never pointed as h_NextManip of other manipulation nodes)
2721*852ba100SJustin Hibbits                                                                                           2. MUST be set if the next engine after the CC is another CC node, and
2722*852ba100SJustin Hibbits                                                                                           this is NOT the last manipulation node (i.e. it has h_NextManip).*/
2723*852ba100SJustin Hibbits } t_FmPcdManipHdrParams;
2724*852ba100SJustin Hibbits 
2725*852ba100SJustin Hibbits /**************************************************************************//**
2726*852ba100SJustin Hibbits  @Description   Parameters for defining fragmentation manipulation
2727*852ba100SJustin Hibbits *//***************************************************************************/
2728*852ba100SJustin Hibbits typedef struct t_FmPcdManipFragParams {
2729*852ba100SJustin Hibbits     e_NetHeaderType                     hdr;          /**< Header selection */
2730*852ba100SJustin Hibbits     union {
2731*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
2732*852ba100SJustin Hibbits         t_FmPcdManipFragCapwapParams    capwapFrag;   /**< Parameters for defining CAPWAP fragmentation,
2733*852ba100SJustin Hibbits                                                            relevant if 'hdr' = HEADER_TYPE_CAPWAP */
2734*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
2735*852ba100SJustin Hibbits         t_FmPcdManipFragIpParams        ipFrag;       /**< Parameters for defining IP fragmentation,
2736*852ba100SJustin Hibbits                                                            relevant if 'hdr' = HEADER_TYPE_Ipv4 or HEADER_TYPE_Ipv6 */
2737*852ba100SJustin Hibbits     } u;
2738*852ba100SJustin Hibbits } t_FmPcdManipFragParams;
2739*852ba100SJustin Hibbits 
2740*852ba100SJustin Hibbits /**************************************************************************//**
2741*852ba100SJustin Hibbits  @Description   Parameters for defining reassembly manipulation
2742*852ba100SJustin Hibbits *//***************************************************************************/
2743*852ba100SJustin Hibbits typedef struct t_FmPcdManipReassemParams {
2744*852ba100SJustin Hibbits     e_NetHeaderType                     hdr;          /**< Header selection */
2745*852ba100SJustin Hibbits     union {
2746*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
2747*852ba100SJustin Hibbits         t_FmPcdManipReassemCapwapParams capwapReassem;  /**< Parameters for defining CAPWAP reassembly,
2748*852ba100SJustin Hibbits                                                            relevant if 'hdr' = HEADER_TYPE_CAPWAP */
2749*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
2750*852ba100SJustin Hibbits 
2751*852ba100SJustin Hibbits         t_FmPcdManipReassemIpParams     ipReassem;    /**< Parameters for defining IP reassembly,
2752*852ba100SJustin Hibbits                                                            relevant if 'hdr' = HEADER_TYPE_Ipv4 or HEADER_TYPE_Ipv6 */
2753*852ba100SJustin Hibbits     } u;
2754*852ba100SJustin Hibbits } t_FmPcdManipReassemParams;
2755*852ba100SJustin Hibbits 
2756*852ba100SJustin Hibbits /**************************************************************************//**
2757*852ba100SJustin Hibbits  @Description   Parameters for defining a manipulation node
27580aeed3e9SJustin Hibbits *//***************************************************************************/
27590aeed3e9SJustin Hibbits typedef struct t_FmPcdManipParams {
2760*852ba100SJustin Hibbits     e_FmPcdManipType                        type;               /**< Selects type of manipulation node */
2761*852ba100SJustin Hibbits     union{
2762*852ba100SJustin Hibbits         t_FmPcdManipHdrParams               hdr;                /**< Parameters for defining header manipulation node */
2763*852ba100SJustin Hibbits         t_FmPcdManipReassemParams           reassem;            /**< Parameters for defining reassembly manipulation node */
2764*852ba100SJustin Hibbits         t_FmPcdManipFragParams              frag;               /**< Parameters for defining fragmentation manipulation node */
2765*852ba100SJustin Hibbits         t_FmPcdManipSpecialOffloadParams    specialOffload;     /**< Parameters for defining special offload manipulation node */
2766*852ba100SJustin Hibbits     } u;
27670aeed3e9SJustin Hibbits 
2768*852ba100SJustin Hibbits     t_Handle                                h_NextManip;        /**< Supported for Header Manipulation only;
2769*852ba100SJustin Hibbits                                                                      Handle to another (previously defined) manipulation node;
2770*852ba100SJustin Hibbits                                                                      Allows concatenation of manipulation actions;
2771*852ba100SJustin Hibbits                                                                      This parameter is optional and may be NULL. */
2772*852ba100SJustin Hibbits #if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
27730aeed3e9SJustin Hibbits     bool                                    fragOrReasm;        /**< TRUE, if defined fragmentation/reassembly manipulation */
2774*852ba100SJustin Hibbits     t_FmPcdManipFragOrReasmParams           fragOrReasmParams;  /**< Parameters for fragmentation/reassembly manipulation,
2775*852ba100SJustin Hibbits                                                                      relevant if fragOrReasm = TRUE */
2776*852ba100SJustin Hibbits #endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */
27770aeed3e9SJustin Hibbits } t_FmPcdManipParams;
27780aeed3e9SJustin Hibbits 
27790aeed3e9SJustin Hibbits /**************************************************************************//**
2780*852ba100SJustin Hibbits  @Description   Structure for retrieving IP reassembly statistics
2781*852ba100SJustin Hibbits *//***************************************************************************/
2782*852ba100SJustin Hibbits typedef struct t_FmPcdManipReassemIpStats {
2783*852ba100SJustin Hibbits     /* common counters for both IPv4 and IPv6 */
2784*852ba100SJustin Hibbits     uint32_t        timeout;                    /**< Counts the number of timeout occurrences */
2785*852ba100SJustin Hibbits     uint32_t        rfdPoolBusy;                /**< Counts the number of failed attempts to allocate
2786*852ba100SJustin Hibbits                                                      a Reassembly Frame Descriptor */
2787*852ba100SJustin Hibbits     uint32_t        internalBufferBusy;         /**< Counts the number of times an internal buffer busy occurred */
2788*852ba100SJustin Hibbits     uint32_t        externalBufferBusy;         /**< Counts the number of times external buffer busy occurred */
2789*852ba100SJustin Hibbits     uint32_t        sgFragments;                /**< Counts the number of Scatter/Gather fragments */
2790*852ba100SJustin Hibbits     uint32_t        dmaSemaphoreDepletion;      /**< Counts the number of failed attempts to allocate a DMA semaphore */
2791*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
2792*852ba100SJustin Hibbits     uint32_t        nonConsistentSp;            /**< Counts the number of Non Consistent Storage Profile events for
2793*852ba100SJustin Hibbits                                                      successfully reassembled frames */
2794*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
2795*852ba100SJustin Hibbits     struct {
2796*852ba100SJustin Hibbits         uint32_t    successfullyReassembled;    /**< Counts the number of successfully reassembled frames */
2797*852ba100SJustin Hibbits         uint32_t    validFragments;             /**< Counts the total number of valid fragments that
2798*852ba100SJustin Hibbits                                                      have been processed for all frames */
2799*852ba100SJustin Hibbits         uint32_t    processedFragments;         /**< Counts the number of processed fragments
2800*852ba100SJustin Hibbits                                                      (valid and error fragments) for all frames */
2801*852ba100SJustin Hibbits         uint32_t    malformedFragments;         /**< Counts the number of malformed fragments processed for all frames */
2802*852ba100SJustin Hibbits         uint32_t    discardedFragments;         /**< Counts the number of fragments discarded by the reassembly process */
2803*852ba100SJustin Hibbits         uint32_t    autoLearnBusy;              /**< Counts the number of times a busy condition occurs when attempting
2804*852ba100SJustin Hibbits                                                      to access an IP-Reassembly Automatic Learning Hash set */
2805*852ba100SJustin Hibbits         uint32_t    moreThan16Fragments;        /**< Counts the fragment occurrences in which the number of fragments-per-frame
2806*852ba100SJustin Hibbits                                                      exceeds 16 */
2807*852ba100SJustin Hibbits     } specificHdrStatistics[2];                 /**< slot '0' is for IPv4, slot '1' is for IPv6 */
2808*852ba100SJustin Hibbits } t_FmPcdManipReassemIpStats;
2809*852ba100SJustin Hibbits 
2810*852ba100SJustin Hibbits /**************************************************************************//**
2811*852ba100SJustin Hibbits  @Description   Structure for retrieving IP fragmentation statistics
2812*852ba100SJustin Hibbits *//***************************************************************************/
2813*852ba100SJustin Hibbits typedef struct t_FmPcdManipFragIpStats {
2814*852ba100SJustin Hibbits     uint32_t    totalFrames;            /**< Number of frames that passed through the manipulation node */
2815*852ba100SJustin Hibbits     uint32_t    fragmentedFrames;       /**< Number of frames that were fragmented */
2816*852ba100SJustin Hibbits     uint32_t    generatedFragments;     /**< Number of fragments that were generated */
2817*852ba100SJustin Hibbits } t_FmPcdManipFragIpStats;
2818*852ba100SJustin Hibbits 
2819*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
2820*852ba100SJustin Hibbits /**************************************************************************//**
2821*852ba100SJustin Hibbits  @Description   Structure for retrieving CAPWAP reassembly statistics
2822*852ba100SJustin Hibbits *//***************************************************************************/
2823*852ba100SJustin Hibbits typedef struct t_FmPcdManipReassemCapwapStats {
2824*852ba100SJustin Hibbits     uint32_t    timeout;                    /**< Counts the number of timeout occurrences */
2825*852ba100SJustin Hibbits     uint32_t    rfdPoolBusy;                /**< Counts the number of failed attempts to allocate
2826*852ba100SJustin Hibbits                                                  a Reassembly Frame Descriptor */
2827*852ba100SJustin Hibbits     uint32_t    internalBufferBusy;         /**< Counts the number of times an internal buffer busy occurred */
2828*852ba100SJustin Hibbits     uint32_t    externalBufferBusy;         /**< Counts the number of times external buffer busy occurred */
2829*852ba100SJustin Hibbits     uint32_t    sgFragments;                /**< Counts the number of Scatter/Gather fragments */
2830*852ba100SJustin Hibbits     uint32_t    dmaSemaphoreDepletion;      /**< Counts the number of failed attempts to allocate a DMA semaphore */
2831*852ba100SJustin Hibbits     uint32_t    successfullyReassembled;    /**< Counts the number of successfully reassembled frames */
2832*852ba100SJustin Hibbits     uint32_t    validFragments;             /**< Counts the total number of valid fragments that
2833*852ba100SJustin Hibbits                                                  have been processed for all frames */
2834*852ba100SJustin Hibbits     uint32_t    processedFragments;         /**< Counts the number of processed fragments
2835*852ba100SJustin Hibbits                                                  (valid and error fragments) for all frames */
2836*852ba100SJustin Hibbits     uint32_t    malformedFragments;         /**< Counts the number of malformed fragments processed for all frames */
2837*852ba100SJustin Hibbits     uint32_t    autoLearnBusy;              /**< Counts the number of times a busy condition occurs when attempting
2838*852ba100SJustin Hibbits                                                  to access an Reassembly Automatic Learning Hash set */
2839*852ba100SJustin Hibbits     uint32_t    discardedFragments;         /**< Counts the number of fragments discarded by the reassembly process */
2840*852ba100SJustin Hibbits     uint32_t    moreThan16Fragments;        /**< Counts the fragment occurrences in which the number of fragments-per-frame
2841*852ba100SJustin Hibbits                                                  exceeds 16 */
2842*852ba100SJustin Hibbits     uint32_t    exceedMaxReassemblyFrameLen;/**< ounts the number of times that a successful reassembled frame
2843*852ba100SJustin Hibbits                                                  length exceeds MaxReassembledFrameLength value */
2844*852ba100SJustin Hibbits } t_FmPcdManipReassemCapwapStats;
2845*852ba100SJustin Hibbits 
2846*852ba100SJustin Hibbits /**************************************************************************//**
2847*852ba100SJustin Hibbits  @Description   Structure for retrieving CAPWAP fragmentation statistics
2848*852ba100SJustin Hibbits *//***************************************************************************/
2849*852ba100SJustin Hibbits typedef struct t_FmPcdManipFragCapwapStats {
2850*852ba100SJustin Hibbits     uint32_t    totalFrames;            /**< Number of frames that passed through the manipulation node */
2851*852ba100SJustin Hibbits     uint32_t    fragmentedFrames;       /**< Number of frames that were fragmented */
2852*852ba100SJustin Hibbits     uint32_t    generatedFragments;     /**< Number of fragments that were generated */
2853*852ba100SJustin Hibbits #if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
2854*852ba100SJustin Hibbits     uint8_t     sgAllocationFailure;    /**< Number of allocation failure of s/g buffers */
2855*852ba100SJustin Hibbits #endif /* (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0)) */
2856*852ba100SJustin Hibbits } t_FmPcdManipFragCapwapStats;
2857*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
2858*852ba100SJustin Hibbits 
2859*852ba100SJustin Hibbits /**************************************************************************//**
2860*852ba100SJustin Hibbits  @Description   Structure for retrieving reassembly statistics
2861*852ba100SJustin Hibbits *//***************************************************************************/
2862*852ba100SJustin Hibbits typedef struct t_FmPcdManipReassemStats {
2863*852ba100SJustin Hibbits     union {
2864*852ba100SJustin Hibbits         t_FmPcdManipReassemIpStats  ipReassem;  /**< Structure for IP reassembly statistics */
2865*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
2866*852ba100SJustin Hibbits         t_FmPcdManipReassemCapwapStats  capwapReassem;  /**< Structure for CAPWAP reassembly statistics */
2867*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
2868*852ba100SJustin Hibbits     } u;
2869*852ba100SJustin Hibbits } t_FmPcdManipReassemStats;
2870*852ba100SJustin Hibbits 
2871*852ba100SJustin Hibbits /**************************************************************************//**
2872*852ba100SJustin Hibbits  @Description   Structure for retrieving fragmentation statistics
2873*852ba100SJustin Hibbits *//***************************************************************************/
2874*852ba100SJustin Hibbits typedef struct t_FmPcdManipFragStats {
2875*852ba100SJustin Hibbits     union {
2876*852ba100SJustin Hibbits         t_FmPcdManipFragIpStats     ipFrag;     /**< Structure for IP fragmentation statistics */
2877*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
2878*852ba100SJustin Hibbits         t_FmPcdManipFragCapwapStats capwapFrag; /**< Structure for CAPWAP fragmentation statistics */
2879*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
2880*852ba100SJustin Hibbits     } u;
2881*852ba100SJustin Hibbits } t_FmPcdManipFragStats;
2882*852ba100SJustin Hibbits 
2883*852ba100SJustin Hibbits /**************************************************************************//**
2884*852ba100SJustin Hibbits  @Description   Structure for selecting manipulation statistics
2885*852ba100SJustin Hibbits *//***************************************************************************/
2886*852ba100SJustin Hibbits typedef struct t_FmPcdManipStats {
2887*852ba100SJustin Hibbits     union {
2888*852ba100SJustin Hibbits         t_FmPcdManipReassemStats    reassem;    /**< Structure for reassembly statistics */
2889*852ba100SJustin Hibbits         t_FmPcdManipFragStats       frag;       /**< Structure for fragmentation statistics */
2890*852ba100SJustin Hibbits     } u;
2891*852ba100SJustin Hibbits } t_FmPcdManipStats;
2892*852ba100SJustin Hibbits 
2893*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
2894*852ba100SJustin Hibbits /**************************************************************************//**
2895*852ba100SJustin Hibbits  @Description   Parameters for defining frame replicator group and its members
2896*852ba100SJustin Hibbits *//***************************************************************************/
2897*852ba100SJustin Hibbits typedef struct t_FmPcdFrmReplicGroupParams {
2898*852ba100SJustin Hibbits     uint8_t                     maxNumOfEntries;    /**< Maximal number of members in the group;
2899*852ba100SJustin Hibbits                                                          Must be at least 2. */
2900*852ba100SJustin Hibbits     uint8_t                     numOfEntries;       /**< Number of members in the group;
2901*852ba100SJustin Hibbits                                                          Must be at least 1. */
2902*852ba100SJustin Hibbits     t_FmPcdCcNextEngineParams   nextEngineParams[FM_PCD_FRM_REPLIC_MAX_NUM_OF_ENTRIES];
2903*852ba100SJustin Hibbits                                                     /**< Array of members' parameters */
2904*852ba100SJustin Hibbits } t_FmPcdFrmReplicGroupParams;
2905*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
2906*852ba100SJustin Hibbits 
2907*852ba100SJustin Hibbits #if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
2908*852ba100SJustin Hibbits /**************************************************************************//**
29090aeed3e9SJustin Hibbits  @Description   structure for defining statistics node
29100aeed3e9SJustin Hibbits *//***************************************************************************/
29110aeed3e9SJustin Hibbits typedef struct t_FmPcdStatsParams {
29120aeed3e9SJustin Hibbits     e_FmPcdStatsType    type;   /**< type of statistics node */
29130aeed3e9SJustin Hibbits } t_FmPcdStatsParams;
2914*852ba100SJustin Hibbits #endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */
29150aeed3e9SJustin Hibbits 
29160aeed3e9SJustin Hibbits /**************************************************************************//**
2917*852ba100SJustin Hibbits  @Function      FM_PCD_NetEnvCharacteristicsSet
29180aeed3e9SJustin Hibbits 
29190aeed3e9SJustin Hibbits  @Description   Define a set of Network Environment Characteristics.
2920*852ba100SJustin Hibbits 
29210aeed3e9SJustin Hibbits                 When setting an environment it is important to understand its
29220aeed3e9SJustin Hibbits                 application. It is not meant to describe the flows that will run
29230aeed3e9SJustin Hibbits                 on the ports using this environment, but what the user means TO DO
29240aeed3e9SJustin Hibbits                 with the PCD mechanisms in order to parse-classify-distribute those
29250aeed3e9SJustin Hibbits                 frames.
29260aeed3e9SJustin Hibbits                 By specifying a distinction unit, the user means it would use that option
2927*852ba100SJustin Hibbits                 for distinction between frames at either a KeyGen scheme or a coarse
29280aeed3e9SJustin Hibbits                 classification action descriptor. Using interchangeable headers to define a
29290aeed3e9SJustin Hibbits                 unit means that the user is indifferent to which of the interchangeable
2930*852ba100SJustin Hibbits                 headers is present in the frame, and wants the distinction to be based
29310aeed3e9SJustin Hibbits                 on the presence of either one of them.
2932*852ba100SJustin Hibbits 
29330aeed3e9SJustin Hibbits                 Depending on context, there are limitations to the use of environments. A
29340aeed3e9SJustin Hibbits                 port using the PCD functionality is bound to an environment. Some or even
29350aeed3e9SJustin Hibbits                 all ports may share an environment but also an environment per port is
29360aeed3e9SJustin Hibbits                 possible. When initializing a scheme, a classification plan group (see below),
29370aeed3e9SJustin Hibbits                 or a coarse classification tree, one of the initialized environments must be
29380aeed3e9SJustin Hibbits                 stated and related to. When a port is bound to a scheme, a classification
29390aeed3e9SJustin Hibbits                 plan group, or a coarse classification tree, it MUST be bound to the same
29400aeed3e9SJustin Hibbits                 environment.
2941*852ba100SJustin Hibbits 
29420aeed3e9SJustin Hibbits                 The different PCD modules, may relate (for flows definition) ONLY on
29430aeed3e9SJustin Hibbits                 distinction units as defined by their environment. When initializing a
29440aeed3e9SJustin Hibbits                 scheme for example, it may not choose to select IPV4 as a match for
29450aeed3e9SJustin Hibbits                 recognizing flows unless it was defined in the relating environment. In
29460aeed3e9SJustin Hibbits                 fact, to guide the user through the configuration of the PCD, each module's
29470aeed3e9SJustin Hibbits                 characterization in terms of flows is not done using protocol names, but using
29480aeed3e9SJustin Hibbits                 environment indexes.
2949*852ba100SJustin Hibbits 
29500aeed3e9SJustin Hibbits                 In terms of HW implementation, the list of distinction units sets the LCV vectors
29510aeed3e9SJustin Hibbits                 and later used for match vector, classification plan vectors and coarse classification
29520aeed3e9SJustin Hibbits                 indexing.
29530aeed3e9SJustin Hibbits 
29540aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd         FM PCD module descriptor.
29550aeed3e9SJustin Hibbits  @Param[in]     p_NetEnvParams  A structure of parameters for the initialization of
29560aeed3e9SJustin Hibbits                                 the network environment.
29570aeed3e9SJustin Hibbits 
29580aeed3e9SJustin Hibbits  @Return        A handle to the initialized object on success; NULL code otherwise.
29590aeed3e9SJustin Hibbits 
29600aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
29610aeed3e9SJustin Hibbits *//***************************************************************************/
2962*852ba100SJustin Hibbits t_Handle FM_PCD_NetEnvCharacteristicsSet(t_Handle h_FmPcd, t_FmPcdNetEnvParams *p_NetEnvParams);
29630aeed3e9SJustin Hibbits 
29640aeed3e9SJustin Hibbits /**************************************************************************//**
2965*852ba100SJustin Hibbits  @Function      FM_PCD_NetEnvCharacteristicsDelete
29660aeed3e9SJustin Hibbits 
29670aeed3e9SJustin Hibbits  @Description   Deletes a set of Network Environment Characteristics.
29680aeed3e9SJustin Hibbits 
29690aeed3e9SJustin Hibbits  @Param[in]     h_NetEnv        A handle to the Network environment.
29700aeed3e9SJustin Hibbits 
29710aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
29720aeed3e9SJustin Hibbits *//***************************************************************************/
2973*852ba100SJustin Hibbits t_Error FM_PCD_NetEnvCharacteristicsDelete(t_Handle h_NetEnv);
29740aeed3e9SJustin Hibbits 
29750aeed3e9SJustin Hibbits /**************************************************************************//**
2976*852ba100SJustin Hibbits  @Function      FM_PCD_KgSchemeSet
29770aeed3e9SJustin Hibbits 
2978*852ba100SJustin Hibbits  @Description   Initializing or modifying and enabling a scheme for the KeyGen.
29790aeed3e9SJustin Hibbits                 This routine should be called for adding or modifying a scheme.
29800aeed3e9SJustin Hibbits                 When a scheme needs modifying, the API requires that it will be
29810aeed3e9SJustin Hibbits                 rewritten. In such a case 'modify' should be TRUE. If the
29820aeed3e9SJustin Hibbits                 routine is called for a valid scheme and 'modify' is FALSE,
29830aeed3e9SJustin Hibbits                 it will return error.
29840aeed3e9SJustin Hibbits 
2985*852ba100SJustin Hibbits  @Param[in]     h_FmPcd         If this is a new scheme - A handle to an FM PCD Module.
2986*852ba100SJustin Hibbits                                 Otherwise NULL (ignored by driver).
2987*852ba100SJustin Hibbits  @Param[in,out] p_SchemeParams  A structure of parameters for defining the scheme
29880aeed3e9SJustin Hibbits 
29890aeed3e9SJustin Hibbits  @Return        A handle to the initialized scheme on success; NULL code otherwise.
2990*852ba100SJustin Hibbits                 When used as "modify" (rather than for setting a new scheme),
2991*852ba100SJustin Hibbits                 p_SchemeParams->id.h_Scheme will return NULL if action fails due to scheme
2992*852ba100SJustin Hibbits                 BUSY state.
29930aeed3e9SJustin Hibbits 
29940aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
29950aeed3e9SJustin Hibbits *//***************************************************************************/
2996*852ba100SJustin Hibbits t_Handle FM_PCD_KgSchemeSet(t_Handle                h_FmPcd,
2997*852ba100SJustin Hibbits                             t_FmPcdKgSchemeParams   *p_SchemeParams);
29980aeed3e9SJustin Hibbits 
29990aeed3e9SJustin Hibbits /**************************************************************************//**
3000*852ba100SJustin Hibbits  @Function      FM_PCD_KgSchemeDelete
30010aeed3e9SJustin Hibbits 
30020aeed3e9SJustin Hibbits  @Description   Deleting an initialized scheme.
30030aeed3e9SJustin Hibbits 
3004*852ba100SJustin Hibbits  @Param[in]     h_Scheme        scheme handle as returned by FM_PCD_KgSchemeSet()
30050aeed3e9SJustin Hibbits 
30060aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3007*852ba100SJustin Hibbits 
3008*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init() & FM_PCD_KgSchemeSet().
30090aeed3e9SJustin Hibbits *//***************************************************************************/
3010*852ba100SJustin Hibbits t_Error     FM_PCD_KgSchemeDelete(t_Handle h_Scheme);
30110aeed3e9SJustin Hibbits 
30120aeed3e9SJustin Hibbits /**************************************************************************//**
3013*852ba100SJustin Hibbits  @Function      FM_PCD_KgSchemeGetCounter
30140aeed3e9SJustin Hibbits 
30150aeed3e9SJustin Hibbits  @Description   Reads scheme packet counter.
30160aeed3e9SJustin Hibbits 
3017*852ba100SJustin Hibbits  @Param[in]     h_Scheme        scheme handle as returned by FM_PCD_KgSchemeSet().
30180aeed3e9SJustin Hibbits 
30190aeed3e9SJustin Hibbits  @Return        Counter's current value.
30200aeed3e9SJustin Hibbits 
3021*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init() & FM_PCD_KgSchemeSet().
30220aeed3e9SJustin Hibbits *//***************************************************************************/
3023*852ba100SJustin Hibbits uint32_t  FM_PCD_KgSchemeGetCounter(t_Handle h_Scheme);
30240aeed3e9SJustin Hibbits 
30250aeed3e9SJustin Hibbits /**************************************************************************//**
3026*852ba100SJustin Hibbits  @Function      FM_PCD_KgSchemeSetCounter
30270aeed3e9SJustin Hibbits 
30280aeed3e9SJustin Hibbits  @Description   Writes scheme packet counter.
30290aeed3e9SJustin Hibbits 
3030*852ba100SJustin Hibbits  @Param[in]     h_Scheme        scheme handle as returned by FM_PCD_KgSchemeSet().
30310aeed3e9SJustin Hibbits  @Param[in]     value           New scheme counter value - typically '0' for
30320aeed3e9SJustin Hibbits                                 resetting the counter.
30330aeed3e9SJustin Hibbits 
30340aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
30350aeed3e9SJustin Hibbits 
3036*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init() & FM_PCD_KgSchemeSet().
30370aeed3e9SJustin Hibbits *//***************************************************************************/
3038*852ba100SJustin Hibbits t_Error  FM_PCD_KgSchemeSetCounter(t_Handle h_Scheme, uint32_t value);
30390aeed3e9SJustin Hibbits 
30400aeed3e9SJustin Hibbits /**************************************************************************//**
3041*852ba100SJustin Hibbits  @Function      FM_PCD_PlcrProfileSet
30420aeed3e9SJustin Hibbits 
30430aeed3e9SJustin Hibbits  @Description   Sets a profile entry in the policer profile table.
30440aeed3e9SJustin Hibbits                 The routine overrides any existing value.
30450aeed3e9SJustin Hibbits 
30460aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd           A handle to an FM PCD Module.
30470aeed3e9SJustin Hibbits  @Param[in]     p_Profile         A structure of parameters for defining a
30480aeed3e9SJustin Hibbits                                   policer profile entry.
30490aeed3e9SJustin Hibbits 
30500aeed3e9SJustin Hibbits  @Return        A handle to the initialized object on success; NULL code otherwise.
3051*852ba100SJustin Hibbits                 When used as "modify" (rather than for setting a new profile),
3052*852ba100SJustin Hibbits                 p_Profile->id.h_Profile will return NULL if action fails due to profile
3053*852ba100SJustin Hibbits                 BUSY state.
30540aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
30550aeed3e9SJustin Hibbits *//***************************************************************************/
3056*852ba100SJustin Hibbits t_Handle FM_PCD_PlcrProfileSet(t_Handle                  h_FmPcd,
30570aeed3e9SJustin Hibbits                                t_FmPcdPlcrProfileParams  *p_Profile);
30580aeed3e9SJustin Hibbits 
30590aeed3e9SJustin Hibbits /**************************************************************************//**
3060*852ba100SJustin Hibbits  @Function      FM_PCD_PlcrProfileDelete
30610aeed3e9SJustin Hibbits 
30620aeed3e9SJustin Hibbits  @Description   Delete a profile entry in the policer profile table.
30630aeed3e9SJustin Hibbits                 The routine set entry to invalid.
30640aeed3e9SJustin Hibbits 
30650aeed3e9SJustin Hibbits  @Param[in]     h_Profile       A handle to the profile.
30660aeed3e9SJustin Hibbits 
30670aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
30680aeed3e9SJustin Hibbits 
30690aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
30700aeed3e9SJustin Hibbits *//***************************************************************************/
3071*852ba100SJustin Hibbits t_Error FM_PCD_PlcrProfileDelete(t_Handle h_Profile);
30720aeed3e9SJustin Hibbits 
30730aeed3e9SJustin Hibbits /**************************************************************************//**
3074*852ba100SJustin Hibbits  @Function      FM_PCD_PlcrProfileGetCounter
30750aeed3e9SJustin Hibbits 
30760aeed3e9SJustin Hibbits  @Description   Sets an entry in the classification plan.
30770aeed3e9SJustin Hibbits                 The routine overrides any existing value.
30780aeed3e9SJustin Hibbits 
30790aeed3e9SJustin Hibbits  @Param[in]     h_Profile       A handle to the profile.
30800aeed3e9SJustin Hibbits  @Param[in]     counter         Counter selector.
30810aeed3e9SJustin Hibbits 
30820aeed3e9SJustin Hibbits  @Return        specific counter value.
30830aeed3e9SJustin Hibbits 
30840aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
30850aeed3e9SJustin Hibbits *//***************************************************************************/
3086*852ba100SJustin Hibbits uint32_t FM_PCD_PlcrProfileGetCounter(t_Handle                      h_Profile,
3087*852ba100SJustin Hibbits                                       e_FmPcdPlcrProfileCounters    counter);
30880aeed3e9SJustin Hibbits 
30890aeed3e9SJustin Hibbits /**************************************************************************//**
3090*852ba100SJustin Hibbits  @Function      FM_PCD_PlcrProfileSetCounter
30910aeed3e9SJustin Hibbits 
30920aeed3e9SJustin Hibbits  @Description   Sets an entry in the classification plan.
30930aeed3e9SJustin Hibbits                 The routine overrides any existing value.
30940aeed3e9SJustin Hibbits 
30950aeed3e9SJustin Hibbits  @Param[in]     h_Profile       A handle to the profile.
30960aeed3e9SJustin Hibbits  @Param[in]     counter         Counter selector.
30970aeed3e9SJustin Hibbits  @Param[in]     value           value to set counter with.
30980aeed3e9SJustin Hibbits 
30990aeed3e9SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
31000aeed3e9SJustin Hibbits 
31010aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
31020aeed3e9SJustin Hibbits *//***************************************************************************/
3103*852ba100SJustin Hibbits t_Error FM_PCD_PlcrProfileSetCounter(t_Handle                   h_Profile,
3104*852ba100SJustin Hibbits                                      e_FmPcdPlcrProfileCounters counter,
3105*852ba100SJustin Hibbits                                      uint32_t                   value);
31060aeed3e9SJustin Hibbits 
31070aeed3e9SJustin Hibbits /**************************************************************************//**
3108*852ba100SJustin Hibbits  @Function      FM_PCD_CcRootBuild
3109*852ba100SJustin Hibbits 
3110*852ba100SJustin Hibbits  @Description   This routine must be called to define a complete coarse
3111*852ba100SJustin Hibbits                 classification tree. This is the way to define coarse
3112*852ba100SJustin Hibbits                 classification to a certain flow - the KeyGen schemes
3113*852ba100SJustin Hibbits                 may point only to trees defined in this way.
3114*852ba100SJustin Hibbits 
3115*852ba100SJustin Hibbits  @Param[in]     h_FmPcd         FM PCD module descriptor.
3116*852ba100SJustin Hibbits  @Param[in]     p_Params        A structure of parameters to define the tree.
3117*852ba100SJustin Hibbits 
3118*852ba100SJustin Hibbits  @Return        A handle to the initialized object on success; NULL code otherwise.
3119*852ba100SJustin Hibbits 
3120*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
3121*852ba100SJustin Hibbits *//***************************************************************************/
3122*852ba100SJustin Hibbits t_Handle FM_PCD_CcRootBuild (t_Handle             h_FmPcd,
3123*852ba100SJustin Hibbits                              t_FmPcdCcTreeParams  *p_Params);
3124*852ba100SJustin Hibbits 
3125*852ba100SJustin Hibbits /**************************************************************************//**
3126*852ba100SJustin Hibbits  @Function      FM_PCD_CcRootDelete
3127*852ba100SJustin Hibbits 
3128*852ba100SJustin Hibbits  @Description   Deleting an built tree.
3129*852ba100SJustin Hibbits 
3130*852ba100SJustin Hibbits  @Param[in]     h_CcTree        A handle to a CC tree.
3131*852ba100SJustin Hibbits 
3132*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3133*852ba100SJustin Hibbits 
3134*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
3135*852ba100SJustin Hibbits *//***************************************************************************/
3136*852ba100SJustin Hibbits t_Error FM_PCD_CcRootDelete(t_Handle h_CcTree);
3137*852ba100SJustin Hibbits 
3138*852ba100SJustin Hibbits /**************************************************************************//**
3139*852ba100SJustin Hibbits  @Function      FM_PCD_CcRootModifyNextEngine
3140*852ba100SJustin Hibbits 
3141*852ba100SJustin Hibbits  @Description   Modify the Next Engine Parameters in the entry of the tree.
3142*852ba100SJustin Hibbits 
3143*852ba100SJustin Hibbits  @Param[in]     h_CcTree                    A handle to the tree
3144*852ba100SJustin Hibbits  @Param[in]     grpId                       A Group index in the tree
3145*852ba100SJustin Hibbits  @Param[in]     index                       Entry index in the group defined by grpId
3146*852ba100SJustin Hibbits  @Param[in]     p_FmPcdCcNextEngineParams   Pointer to new next engine parameters
3147*852ba100SJustin Hibbits 
3148*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3149*852ba100SJustin Hibbits 
3150*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_CcBuildTree().
3151*852ba100SJustin Hibbits *//***************************************************************************/
3152*852ba100SJustin Hibbits t_Error FM_PCD_CcRootModifyNextEngine(t_Handle                  h_CcTree,
3153*852ba100SJustin Hibbits                                       uint8_t                   grpId,
3154*852ba100SJustin Hibbits                                       uint8_t                   index,
3155*852ba100SJustin Hibbits                                       t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);
3156*852ba100SJustin Hibbits 
3157*852ba100SJustin Hibbits /**************************************************************************//**
3158*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableSet
3159*852ba100SJustin Hibbits 
3160*852ba100SJustin Hibbits  @Description   This routine should be called for each CC (coarse classification)
3161*852ba100SJustin Hibbits                 node. The whole CC tree should be built bottom up so that each
3162*852ba100SJustin Hibbits                 node points to already defined nodes.
3163*852ba100SJustin Hibbits 
3164*852ba100SJustin Hibbits  @Param[in]     h_FmPcd         FM PCD module descriptor.
3165*852ba100SJustin Hibbits  @Param[in]     p_Param         A structure of parameters defining the CC node
3166*852ba100SJustin Hibbits 
3167*852ba100SJustin Hibbits  @Return        A handle to the initialized object on success; NULL code otherwise.
3168*852ba100SJustin Hibbits 
3169*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
3170*852ba100SJustin Hibbits *//***************************************************************************/
3171*852ba100SJustin Hibbits t_Handle   FM_PCD_MatchTableSet(t_Handle h_FmPcd, t_FmPcdCcNodeParams *p_Param);
3172*852ba100SJustin Hibbits 
3173*852ba100SJustin Hibbits /**************************************************************************//**
3174*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableDelete
3175*852ba100SJustin Hibbits 
3176*852ba100SJustin Hibbits  @Description   Deleting an built node.
3177*852ba100SJustin Hibbits 
3178*852ba100SJustin Hibbits  @Param[in]     h_CcNode        A handle to a CC node.
3179*852ba100SJustin Hibbits 
3180*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3181*852ba100SJustin Hibbits 
3182*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
3183*852ba100SJustin Hibbits *//***************************************************************************/
3184*852ba100SJustin Hibbits t_Error FM_PCD_MatchTableDelete(t_Handle h_CcNode);
3185*852ba100SJustin Hibbits 
3186*852ba100SJustin Hibbits /**************************************************************************//**
3187*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableModifyMissNextEngine
3188*852ba100SJustin Hibbits 
3189*852ba100SJustin Hibbits  @Description   Modify the Next Engine Parameters of the Miss key case of the node.
3190*852ba100SJustin Hibbits 
3191*852ba100SJustin Hibbits  @Param[in]     h_CcNode                    A handle to the node
3192*852ba100SJustin Hibbits  @Param[in]     p_FmPcdCcNextEngineParams   Parameters for defining next engine
3193*852ba100SJustin Hibbits 
3194*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3195*852ba100SJustin Hibbits 
3196*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_MatchTableSet();
3197*852ba100SJustin Hibbits                 Not relevant in the case the node is of type 'INDEXED_LOOKUP'.
3198*852ba100SJustin Hibbits                 When configuring nextEngine = e_FM_PCD_CC, note that
3199*852ba100SJustin Hibbits                 p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different
3200*852ba100SJustin Hibbits                 from the currently changed table.
3201*852ba100SJustin Hibbits 
3202*852ba100SJustin Hibbits *//***************************************************************************/
3203*852ba100SJustin Hibbits t_Error FM_PCD_MatchTableModifyMissNextEngine(t_Handle                  h_CcNode,
3204*852ba100SJustin Hibbits                                               t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);
3205*852ba100SJustin Hibbits 
3206*852ba100SJustin Hibbits /**************************************************************************//**
3207*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableRemoveKey
3208*852ba100SJustin Hibbits 
3209*852ba100SJustin Hibbits  @Description   Remove the key (including next engine parameters of this key)
3210*852ba100SJustin Hibbits                 defined by the index of the relevant node.
3211*852ba100SJustin Hibbits 
3212*852ba100SJustin Hibbits  @Param[in]     h_CcNode                    A handle to the node
3213*852ba100SJustin Hibbits  @Param[in]     keyIndex                    Key index for removing
3214*852ba100SJustin Hibbits 
3215*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3216*852ba100SJustin Hibbits 
3217*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_MatchTableSet() was called for this
3218*852ba100SJustin Hibbits                 node and the nodes that lead to it.
3219*852ba100SJustin Hibbits *//***************************************************************************/
3220*852ba100SJustin Hibbits t_Error FM_PCD_MatchTableRemoveKey(t_Handle h_CcNode, uint16_t keyIndex);
3221*852ba100SJustin Hibbits 
3222*852ba100SJustin Hibbits /**************************************************************************//**
3223*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableAddKey
3224*852ba100SJustin Hibbits 
3225*852ba100SJustin Hibbits  @Description   Add the key (including next engine parameters of this key in the
3226*852ba100SJustin Hibbits                 index defined by the keyIndex. Note that 'FM_PCD_LAST_KEY_INDEX'
3227*852ba100SJustin Hibbits                 may be used by user that don't care about the position of the
3228*852ba100SJustin Hibbits                 key in the table - in that case, the key will be automatically
3229*852ba100SJustin Hibbits                 added by the driver in the last available entry.
3230*852ba100SJustin Hibbits 
3231*852ba100SJustin Hibbits  @Param[in]     h_CcNode     A handle to the node
3232*852ba100SJustin Hibbits  @Param[in]     keyIndex     Key index for adding.
3233*852ba100SJustin Hibbits  @Param[in]     keySize      Key size of added key
3234*852ba100SJustin Hibbits  @Param[in]     p_KeyParams  A pointer to the parameters includes
3235*852ba100SJustin Hibbits                              new key with Next Engine Parameters
3236*852ba100SJustin Hibbits 
3237*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3238*852ba100SJustin Hibbits 
3239*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_MatchTableSet() was called for this
3240*852ba100SJustin Hibbits                 node and the nodes that lead to it.
3241*852ba100SJustin Hibbits *//***************************************************************************/
3242*852ba100SJustin Hibbits t_Error FM_PCD_MatchTableAddKey(t_Handle            h_CcNode,
3243*852ba100SJustin Hibbits                                 uint16_t            keyIndex,
3244*852ba100SJustin Hibbits                                 uint8_t             keySize,
3245*852ba100SJustin Hibbits                                 t_FmPcdCcKeyParams  *p_KeyParams);
3246*852ba100SJustin Hibbits 
3247*852ba100SJustin Hibbits /**************************************************************************//**
3248*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableModifyNextEngine
3249*852ba100SJustin Hibbits 
3250*852ba100SJustin Hibbits  @Description   Modify the Next Engine Parameters in the relevant key entry of the node.
3251*852ba100SJustin Hibbits 
3252*852ba100SJustin Hibbits  @Param[in]     h_CcNode                    A handle to the node
3253*852ba100SJustin Hibbits  @Param[in]     keyIndex                    Key index for Next Engine modifications
3254*852ba100SJustin Hibbits  @Param[in]     p_FmPcdCcNextEngineParams   Parameters for defining next engine
3255*852ba100SJustin Hibbits 
3256*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3257*852ba100SJustin Hibbits 
3258*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_MatchTableSet().
3259*852ba100SJustin Hibbits                 When configuring nextEngine = e_FM_PCD_CC, note that
3260*852ba100SJustin Hibbits                 p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different
3261*852ba100SJustin Hibbits                 from the currently changed table.
3262*852ba100SJustin Hibbits 
3263*852ba100SJustin Hibbits *//***************************************************************************/
3264*852ba100SJustin Hibbits t_Error FM_PCD_MatchTableModifyNextEngine(t_Handle                  h_CcNode,
3265*852ba100SJustin Hibbits                                           uint16_t                  keyIndex,
3266*852ba100SJustin Hibbits                                           t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);
3267*852ba100SJustin Hibbits 
3268*852ba100SJustin Hibbits /**************************************************************************//**
3269*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableModifyKeyAndNextEngine
3270*852ba100SJustin Hibbits 
3271*852ba100SJustin Hibbits  @Description   Modify the key and Next Engine Parameters of this key in the
3272*852ba100SJustin Hibbits                 index defined by the keyIndex.
3273*852ba100SJustin Hibbits 
3274*852ba100SJustin Hibbits  @Param[in]     h_CcNode                    A handle to the node
3275*852ba100SJustin Hibbits  @Param[in]     keyIndex                    Key index for adding
3276*852ba100SJustin Hibbits  @Param[in]     keySize                     Key size of added key
3277*852ba100SJustin Hibbits  @Param[in]     p_KeyParams                 A pointer to the parameters includes
3278*852ba100SJustin Hibbits                                             modified key and modified Next Engine Parameters
3279*852ba100SJustin Hibbits 
3280*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3281*852ba100SJustin Hibbits 
3282*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_MatchTableSet() was called for this
3283*852ba100SJustin Hibbits                 node and the nodes that lead to it.
3284*852ba100SJustin Hibbits                 When configuring nextEngine = e_FM_PCD_CC, note that
3285*852ba100SJustin Hibbits                 p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different
3286*852ba100SJustin Hibbits                 from the currently changed table.
3287*852ba100SJustin Hibbits *//***************************************************************************/
3288*852ba100SJustin Hibbits t_Error FM_PCD_MatchTableModifyKeyAndNextEngine(t_Handle            h_CcNode,
3289*852ba100SJustin Hibbits                                                 uint16_t            keyIndex,
3290*852ba100SJustin Hibbits                                                 uint8_t             keySize,
3291*852ba100SJustin Hibbits                                                 t_FmPcdCcKeyParams  *p_KeyParams);
3292*852ba100SJustin Hibbits 
3293*852ba100SJustin Hibbits /**************************************************************************//**
3294*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableModifyKey
3295*852ba100SJustin Hibbits 
3296*852ba100SJustin Hibbits  @Description   Modify the key in the index defined by the keyIndex.
3297*852ba100SJustin Hibbits 
3298*852ba100SJustin Hibbits  @Param[in]     h_CcNode                    A handle to the node
3299*852ba100SJustin Hibbits  @Param[in]     keyIndex                    Key index for adding
3300*852ba100SJustin Hibbits  @Param[in]     keySize                     Key size of added key
3301*852ba100SJustin Hibbits  @Param[in]     p_Key                       A pointer to the new key
3302*852ba100SJustin Hibbits  @Param[in]     p_Mask                      A pointer to the new mask if relevant,
3303*852ba100SJustin Hibbits                                             otherwise pointer to NULL
3304*852ba100SJustin Hibbits 
3305*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3306*852ba100SJustin Hibbits 
3307*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_MatchTableSet() was called for this
3308*852ba100SJustin Hibbits                 node and the nodes that lead to it.
3309*852ba100SJustin Hibbits *//***************************************************************************/
3310*852ba100SJustin Hibbits t_Error FM_PCD_MatchTableModifyKey(t_Handle h_CcNode,
3311*852ba100SJustin Hibbits                                    uint16_t keyIndex,
3312*852ba100SJustin Hibbits                                    uint8_t  keySize,
3313*852ba100SJustin Hibbits                                    uint8_t  *p_Key,
3314*852ba100SJustin Hibbits                                    uint8_t  *p_Mask);
3315*852ba100SJustin Hibbits 
3316*852ba100SJustin Hibbits /**************************************************************************//**
3317*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableFindNRemoveKey
3318*852ba100SJustin Hibbits 
3319*852ba100SJustin Hibbits  @Description   Remove the key (including next engine parameters of this key)
3320*852ba100SJustin Hibbits                 defined by the key and mask. Note that this routine will search
3321*852ba100SJustin Hibbits                 the node to locate the index of the required key (& mask) to remove.
3322*852ba100SJustin Hibbits 
3323*852ba100SJustin Hibbits  @Param[in]     h_CcNode                    A handle to the node
3324*852ba100SJustin Hibbits  @Param[in]     keySize                     Key size of the one to remove.
3325*852ba100SJustin Hibbits  @Param[in]     p_Key                       A pointer to the requested key to remove.
3326*852ba100SJustin Hibbits  @Param[in]     p_Mask                      A pointer to the mask if relevant,
3327*852ba100SJustin Hibbits                                             otherwise pointer to NULL
3328*852ba100SJustin Hibbits 
3329*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3330*852ba100SJustin Hibbits 
3331*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_MatchTableSet() was called for this
3332*852ba100SJustin Hibbits                 node and the nodes that lead to it.
3333*852ba100SJustin Hibbits *//***************************************************************************/
3334*852ba100SJustin Hibbits t_Error FM_PCD_MatchTableFindNRemoveKey(t_Handle h_CcNode,
3335*852ba100SJustin Hibbits                                         uint8_t  keySize,
3336*852ba100SJustin Hibbits                                         uint8_t  *p_Key,
3337*852ba100SJustin Hibbits                                         uint8_t  *p_Mask);
3338*852ba100SJustin Hibbits 
3339*852ba100SJustin Hibbits /**************************************************************************//**
3340*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableFindNModifyNextEngine
3341*852ba100SJustin Hibbits 
3342*852ba100SJustin Hibbits  @Description   Modify the Next Engine Parameters in the relevant key entry of
3343*852ba100SJustin Hibbits                 the node. Note that this routine will search the node to locate
3344*852ba100SJustin Hibbits                 the index of the required key (& mask) to modify.
3345*852ba100SJustin Hibbits 
3346*852ba100SJustin Hibbits  @Param[in]     h_CcNode                    A handle to the node
3347*852ba100SJustin Hibbits  @Param[in]     keySize                     Key size of the one to modify.
3348*852ba100SJustin Hibbits  @Param[in]     p_Key                       A pointer to the requested key to modify.
3349*852ba100SJustin Hibbits  @Param[in]     p_Mask                      A pointer to the mask if relevant,
3350*852ba100SJustin Hibbits                                             otherwise pointer to NULL
3351*852ba100SJustin Hibbits  @Param[in]     p_FmPcdCcNextEngineParams   Parameters for defining next engine
3352*852ba100SJustin Hibbits 
3353*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3354*852ba100SJustin Hibbits 
3355*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_MatchTableSet().
3356*852ba100SJustin Hibbits                 When configuring nextEngine = e_FM_PCD_CC, note that
3357*852ba100SJustin Hibbits                 p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different
3358*852ba100SJustin Hibbits                 from the currently changed table.
3359*852ba100SJustin Hibbits *//***************************************************************************/
3360*852ba100SJustin Hibbits t_Error FM_PCD_MatchTableFindNModifyNextEngine(t_Handle                  h_CcNode,
3361*852ba100SJustin Hibbits                                                uint8_t                   keySize,
3362*852ba100SJustin Hibbits                                                uint8_t                   *p_Key,
3363*852ba100SJustin Hibbits                                                uint8_t                   *p_Mask,
3364*852ba100SJustin Hibbits                                                t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);
3365*852ba100SJustin Hibbits 
3366*852ba100SJustin Hibbits /**************************************************************************//**
3367*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableFindNModifyKeyAndNextEngine
3368*852ba100SJustin Hibbits 
3369*852ba100SJustin Hibbits  @Description   Modify the key and Next Engine Parameters of this key in the
3370*852ba100SJustin Hibbits                 index defined by the keyIndex. Note that this routine will search
3371*852ba100SJustin Hibbits                 the node to locate the index of the required key (& mask) to modify.
3372*852ba100SJustin Hibbits 
3373*852ba100SJustin Hibbits  @Param[in]     h_CcNode                    A handle to the node
3374*852ba100SJustin Hibbits  @Param[in]     keySize                     Key size of the one to modify.
3375*852ba100SJustin Hibbits  @Param[in]     p_Key                       A pointer to the requested key to modify.
3376*852ba100SJustin Hibbits  @Param[in]     p_Mask                      A pointer to the mask if relevant,
3377*852ba100SJustin Hibbits                                             otherwise pointer to NULL
3378*852ba100SJustin Hibbits  @Param[in]     p_KeyParams                 A pointer to the parameters includes
3379*852ba100SJustin Hibbits                                             modified key and modified Next Engine Parameters
3380*852ba100SJustin Hibbits 
3381*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3382*852ba100SJustin Hibbits 
3383*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_MatchTableSet() was called for this
3384*852ba100SJustin Hibbits                 node and the nodes that lead to it.
3385*852ba100SJustin Hibbits                 When configuring nextEngine = e_FM_PCD_CC, note that
3386*852ba100SJustin Hibbits                 p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different
3387*852ba100SJustin Hibbits                 from the currently changed table.
3388*852ba100SJustin Hibbits *//***************************************************************************/
3389*852ba100SJustin Hibbits t_Error FM_PCD_MatchTableFindNModifyKeyAndNextEngine(t_Handle            h_CcNode,
3390*852ba100SJustin Hibbits                                                      uint8_t             keySize,
3391*852ba100SJustin Hibbits                                                      uint8_t             *p_Key,
3392*852ba100SJustin Hibbits                                                      uint8_t             *p_Mask,
3393*852ba100SJustin Hibbits                                                      t_FmPcdCcKeyParams  *p_KeyParams);
3394*852ba100SJustin Hibbits 
3395*852ba100SJustin Hibbits /**************************************************************************//**
3396*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableFindNModifyKey
3397*852ba100SJustin Hibbits 
3398*852ba100SJustin Hibbits  @Description   Modify the key  in the index defined by the keyIndex. Note that
3399*852ba100SJustin Hibbits                 this routine will search the node to locate the index of the
3400*852ba100SJustin Hibbits                 required key (& mask) to modify.
3401*852ba100SJustin Hibbits 
3402*852ba100SJustin Hibbits  @Param[in]     h_CcNode                    A handle to the node
3403*852ba100SJustin Hibbits  @Param[in]     keySize                     Key size of the one to modify.
3404*852ba100SJustin Hibbits  @Param[in]     p_Key                       A pointer to the requested key to modify.
3405*852ba100SJustin Hibbits  @Param[in]     p_Mask                      A pointer to the mask if relevant,
3406*852ba100SJustin Hibbits                                             otherwise pointer to NULL
3407*852ba100SJustin Hibbits  @Param[in]     p_NewKey                    A pointer to the new key
3408*852ba100SJustin Hibbits  @Param[in]     p_NewMask                   A pointer to the new mask if relevant,
3409*852ba100SJustin Hibbits                                             otherwise pointer to NULL
3410*852ba100SJustin Hibbits 
3411*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3412*852ba100SJustin Hibbits 
3413*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_MatchTableSet() was called for this
3414*852ba100SJustin Hibbits                 node and the nodes that lead to it.
3415*852ba100SJustin Hibbits *//***************************************************************************/
3416*852ba100SJustin Hibbits t_Error FM_PCD_MatchTableFindNModifyKey(t_Handle h_CcNode,
3417*852ba100SJustin Hibbits                                         uint8_t  keySize,
3418*852ba100SJustin Hibbits                                         uint8_t  *p_Key,
3419*852ba100SJustin Hibbits                                         uint8_t  *p_Mask,
3420*852ba100SJustin Hibbits                                         uint8_t  *p_NewKey,
3421*852ba100SJustin Hibbits                                         uint8_t  *p_NewMask);
3422*852ba100SJustin Hibbits 
3423*852ba100SJustin Hibbits /**************************************************************************//**
3424*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableGetKeyCounter
3425*852ba100SJustin Hibbits 
3426*852ba100SJustin Hibbits  @Description   This routine may be used to get a counter of specific key in a CC
3427*852ba100SJustin Hibbits                 Node; This counter reflects how many frames passed that were matched
3428*852ba100SJustin Hibbits                 this key.
3429*852ba100SJustin Hibbits 
3430*852ba100SJustin Hibbits  @Param[in]     h_CcNode        A handle to the node
3431*852ba100SJustin Hibbits  @Param[in]     keyIndex        Key index for adding
3432*852ba100SJustin Hibbits 
3433*852ba100SJustin Hibbits  @Return        The specific key counter.
3434*852ba100SJustin Hibbits 
3435*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_MatchTableSet().
3436*852ba100SJustin Hibbits *//***************************************************************************/
3437*852ba100SJustin Hibbits uint32_t FM_PCD_MatchTableGetKeyCounter(t_Handle h_CcNode, uint16_t keyIndex);
3438*852ba100SJustin Hibbits 
3439*852ba100SJustin Hibbits /**************************************************************************//**
3440*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableGetKeyStatistics
3441*852ba100SJustin Hibbits 
3442*852ba100SJustin Hibbits  @Description   This routine may be used to get statistics counters of specific key
3443*852ba100SJustin Hibbits                 in a CC Node.
3444*852ba100SJustin Hibbits 
3445*852ba100SJustin Hibbits                 If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
3446*852ba100SJustin Hibbits                 'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,
3447*852ba100SJustin Hibbits                 these counters reflect how many frames passed that were matched
3448*852ba100SJustin Hibbits                 this key; The total frames count will be returned in the counter
3449*852ba100SJustin Hibbits                 of the first range (as only one frame length range was defined).
3450*852ba100SJustin Hibbits                 If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for this node, the total
3451*852ba100SJustin Hibbits                 frame count will be separated to frame length counters, based on
3452*852ba100SJustin Hibbits                 provided frame length ranges.
3453*852ba100SJustin Hibbits 
3454*852ba100SJustin Hibbits  @Param[in]     h_CcNode        A handle to the node
3455*852ba100SJustin Hibbits  @Param[in]     keyIndex        Key index for adding
3456*852ba100SJustin Hibbits  @Param[out]    p_KeyStatistics Key statistics counters
3457*852ba100SJustin Hibbits 
3458*852ba100SJustin Hibbits  @Return        The specific key statistics.
3459*852ba100SJustin Hibbits 
3460*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_MatchTableSet().
3461*852ba100SJustin Hibbits *//***************************************************************************/
3462*852ba100SJustin Hibbits t_Error FM_PCD_MatchTableGetKeyStatistics(t_Handle                  h_CcNode,
3463*852ba100SJustin Hibbits                                           uint16_t                  keyIndex,
3464*852ba100SJustin Hibbits                                           t_FmPcdCcKeyStatistics    *p_KeyStatistics);
3465*852ba100SJustin Hibbits 
3466*852ba100SJustin Hibbits /**************************************************************************//**
3467*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableGetMissStatistics
3468*852ba100SJustin Hibbits 
3469*852ba100SJustin Hibbits  @Description   This routine may be used to get statistics counters of miss entry
3470*852ba100SJustin Hibbits                 in a CC Node.
3471*852ba100SJustin Hibbits 
3472*852ba100SJustin Hibbits                 If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
3473*852ba100SJustin Hibbits                 'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,
3474*852ba100SJustin Hibbits                 these counters reflect how many frames were not matched to any
3475*852ba100SJustin Hibbits                 existing key and therefore passed through the miss entry; The
3476*852ba100SJustin Hibbits                 total frames count will be returned in the counter of the
3477*852ba100SJustin Hibbits                 first range (as only one frame length range was defined).
3478*852ba100SJustin Hibbits 
3479*852ba100SJustin Hibbits  @Param[in]     h_CcNode            A handle to the node
3480*852ba100SJustin Hibbits  @Param[out]    p_MissStatistics    Statistics counters for 'miss'
3481*852ba100SJustin Hibbits 
3482*852ba100SJustin Hibbits  @Return        The statistics for 'miss'.
3483*852ba100SJustin Hibbits 
3484*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_MatchTableSet().
3485*852ba100SJustin Hibbits *//***************************************************************************/
3486*852ba100SJustin Hibbits t_Error FM_PCD_MatchTableGetMissStatistics(t_Handle                  h_CcNode,
3487*852ba100SJustin Hibbits                                            t_FmPcdCcKeyStatistics    *p_MissStatistics);
3488*852ba100SJustin Hibbits 
3489*852ba100SJustin Hibbits /**************************************************************************//**
3490*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableFindNGetKeyStatistics
3491*852ba100SJustin Hibbits 
3492*852ba100SJustin Hibbits  @Description   This routine may be used to get statistics counters of specific key
3493*852ba100SJustin Hibbits                 in a CC Node.
3494*852ba100SJustin Hibbits 
3495*852ba100SJustin Hibbits                 If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
3496*852ba100SJustin Hibbits                 'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,
3497*852ba100SJustin Hibbits                 these counters reflect how many frames passed that were matched
3498*852ba100SJustin Hibbits                 this key; The total frames count will be returned in the counter
3499*852ba100SJustin Hibbits                 of the first range (as only one frame length range was defined).
3500*852ba100SJustin Hibbits                 If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for this node, the total
3501*852ba100SJustin Hibbits                 frame count will be separated to frame length counters, based on
3502*852ba100SJustin Hibbits                 provided frame length ranges.
3503*852ba100SJustin Hibbits                 Note that this routine will search the node to locate the index
3504*852ba100SJustin Hibbits                 of the required key based on received key parameters.
3505*852ba100SJustin Hibbits 
3506*852ba100SJustin Hibbits  @Param[in]     h_CcNode        A handle to the node
3507*852ba100SJustin Hibbits  @Param[in]     keySize         Size of the requested key
3508*852ba100SJustin Hibbits  @Param[in]     p_Key           A pointer to the requested key
3509*852ba100SJustin Hibbits  @Param[in]     p_Mask          A pointer to the mask if relevant,
3510*852ba100SJustin Hibbits                                 otherwise pointer to NULL
3511*852ba100SJustin Hibbits  @Param[out]    p_KeyStatistics Key statistics counters
3512*852ba100SJustin Hibbits 
3513*852ba100SJustin Hibbits  @Return        The specific key statistics.
3514*852ba100SJustin Hibbits 
3515*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_MatchTableSet().
3516*852ba100SJustin Hibbits *//***************************************************************************/
3517*852ba100SJustin Hibbits t_Error FM_PCD_MatchTableFindNGetKeyStatistics(t_Handle                 h_CcNode,
3518*852ba100SJustin Hibbits                                                uint8_t                  keySize,
3519*852ba100SJustin Hibbits                                                uint8_t                  *p_Key,
3520*852ba100SJustin Hibbits                                                uint8_t                  *p_Mask,
3521*852ba100SJustin Hibbits                                                t_FmPcdCcKeyStatistics   *p_KeyStatistics);
3522*852ba100SJustin Hibbits 
3523*852ba100SJustin Hibbits /**************************************************************************//*
3524*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableGetNextEngine
3525*852ba100SJustin Hibbits 
3526*852ba100SJustin Hibbits  @Description   Gets NextEngine of the relevant keyIndex.
3527*852ba100SJustin Hibbits 
3528*852ba100SJustin Hibbits  @Param[in]     h_CcNode                    A handle to the node.
3529*852ba100SJustin Hibbits  @Param[in]     keyIndex                    keyIndex in the relevant node.
3530*852ba100SJustin Hibbits  @Param[out]    p_FmPcdCcNextEngineParams   here updated nextEngine parameters for
3531*852ba100SJustin Hibbits                                             the relevant keyIndex of the CC Node
3532*852ba100SJustin Hibbits                                             received as parameter to this function
3533*852ba100SJustin Hibbits 
3534*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3535*852ba100SJustin Hibbits 
3536*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
3537*852ba100SJustin Hibbits *//***************************************************************************/
3538*852ba100SJustin Hibbits t_Error FM_PCD_MatchTableGetNextEngine(t_Handle                     h_CcNode,
3539*852ba100SJustin Hibbits                                        uint16_t                     keyIndex,
3540*852ba100SJustin Hibbits                                        t_FmPcdCcNextEngineParams    *p_FmPcdCcNextEngineParams);
3541*852ba100SJustin Hibbits 
3542*852ba100SJustin Hibbits /**************************************************************************//*
3543*852ba100SJustin Hibbits  @Function      FM_PCD_MatchTableGetIndexedHashBucket
3544*852ba100SJustin Hibbits 
3545*852ba100SJustin Hibbits  @Description   This routine simulates KeyGen operation on the provided key and
3546*852ba100SJustin Hibbits                 calculates to which hash bucket it will be mapped.
3547*852ba100SJustin Hibbits 
3548*852ba100SJustin Hibbits  @Param[in]     h_CcNode                A handle to the node.
3549*852ba100SJustin Hibbits  @Param[in]     kgKeySize               Key size as it was configured in the KG
3550*852ba100SJustin Hibbits                                         scheme that leads to this hash.
3551*852ba100SJustin Hibbits  @Param[in]     p_KgKey                 Pointer to the key; must be like the key
3552*852ba100SJustin Hibbits                                         that the KG is generated, i.e. the same
3553*852ba100SJustin Hibbits                                         extraction and with mask if exist.
3554*852ba100SJustin Hibbits  @Param[in]     kgHashShift             Hash-shift as it was configured in the KG
3555*852ba100SJustin Hibbits                                         scheme that leads to this hash.
3556*852ba100SJustin Hibbits  @Param[out]    p_CcNodeBucketHandle    Pointer to the bucket of the provided key.
3557*852ba100SJustin Hibbits  @Param[out]    p_BucketIndex           Index to the bucket of the provided key
3558*852ba100SJustin Hibbits  @Param[out]    p_LastIndex             Pointer to last index in the bucket of the
3559*852ba100SJustin Hibbits                                         provided key.
3560*852ba100SJustin Hibbits 
3561*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3562*852ba100SJustin Hibbits 
3563*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_HashTableSet()
3564*852ba100SJustin Hibbits *//***************************************************************************/
3565*852ba100SJustin Hibbits t_Error FM_PCD_MatchTableGetIndexedHashBucket(t_Handle    h_CcNode,
3566*852ba100SJustin Hibbits                                               uint8_t     kgKeySize,
3567*852ba100SJustin Hibbits                                               uint8_t     *p_KgKey,
3568*852ba100SJustin Hibbits                                               uint8_t     kgHashShift,
3569*852ba100SJustin Hibbits                                               t_Handle    *p_CcNodeBucketHandle,
3570*852ba100SJustin Hibbits                                               uint8_t     *p_BucketIndex,
3571*852ba100SJustin Hibbits                                               uint16_t    *p_LastIndex);
3572*852ba100SJustin Hibbits 
3573*852ba100SJustin Hibbits /**************************************************************************//**
3574*852ba100SJustin Hibbits  @Function      FM_PCD_HashTableSet
3575*852ba100SJustin Hibbits 
3576*852ba100SJustin Hibbits  @Description   This routine initializes a hash table structure.
3577*852ba100SJustin Hibbits                 KeyGen hash result determines the hash bucket.
3578*852ba100SJustin Hibbits                 Next, KeyGen key is compared against all keys of this
3579*852ba100SJustin Hibbits                 bucket (exact match).
3580*852ba100SJustin Hibbits                 Number of sets (number of buckets) of the hash equals to the
3581*852ba100SJustin Hibbits                 number of 1-s in 'hashResMask' in the provided parameters.
3582*852ba100SJustin Hibbits                 Number of hash table ways is then calculated by dividing
3583*852ba100SJustin Hibbits                 'maxNumOfKeys' equally between the hash sets. This is the maximal
3584*852ba100SJustin Hibbits                 number of keys that a hash bucket may hold.
3585*852ba100SJustin Hibbits                 The hash table is initialized empty and keys may be
3586*852ba100SJustin Hibbits                 added to it following the initialization. Keys masks are not
3587*852ba100SJustin Hibbits                 supported in current hash table implementation.
3588*852ba100SJustin Hibbits                 The initialized hash table can be integrated as a node in a
3589*852ba100SJustin Hibbits                 CC tree.
3590*852ba100SJustin Hibbits 
3591*852ba100SJustin Hibbits  @Param[in]     h_FmPcd     FM PCD module descriptor.
3592*852ba100SJustin Hibbits  @Param[in]     p_Param     A structure of parameters defining the hash table
3593*852ba100SJustin Hibbits 
3594*852ba100SJustin Hibbits  @Return        A handle to the initialized object on success; NULL code otherwise.
3595*852ba100SJustin Hibbits 
3596*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
3597*852ba100SJustin Hibbits *//***************************************************************************/
3598*852ba100SJustin Hibbits t_Handle FM_PCD_HashTableSet(t_Handle h_FmPcd, t_FmPcdHashTableParams *p_Param);
3599*852ba100SJustin Hibbits 
3600*852ba100SJustin Hibbits /**************************************************************************//**
3601*852ba100SJustin Hibbits  @Function      FM_PCD_HashTableDelete
3602*852ba100SJustin Hibbits 
3603*852ba100SJustin Hibbits  @Description   This routine deletes the provided hash table and released all
3604*852ba100SJustin Hibbits                 its allocated resources.
3605*852ba100SJustin Hibbits 
3606*852ba100SJustin Hibbits  @Param[in]     h_HashTbl       A handle to a hash table
3607*852ba100SJustin Hibbits 
3608*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3609*852ba100SJustin Hibbits 
3610*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_HashTableSet().
3611*852ba100SJustin Hibbits *//***************************************************************************/
3612*852ba100SJustin Hibbits t_Error FM_PCD_HashTableDelete(t_Handle h_HashTbl);
3613*852ba100SJustin Hibbits 
3614*852ba100SJustin Hibbits /**************************************************************************//**
3615*852ba100SJustin Hibbits  @Function      FM_PCD_HashTableAddKey
3616*852ba100SJustin Hibbits 
3617*852ba100SJustin Hibbits  @Description   This routine adds the provided key (including next engine
3618*852ba100SJustin Hibbits                 parameters of this key) to the hash table.
3619*852ba100SJustin Hibbits                 The key is added as the last key of the bucket that it is
3620*852ba100SJustin Hibbits                 mapped to.
3621*852ba100SJustin Hibbits 
3622*852ba100SJustin Hibbits  @Param[in]     h_HashTbl    A handle to a hash table
3623*852ba100SJustin Hibbits  @Param[in]     keySize      Key size of added key
3624*852ba100SJustin Hibbits  @Param[in]     p_KeyParams  A pointer to the parameters includes
3625*852ba100SJustin Hibbits                              new key with next engine parameters; The pointer
3626*852ba100SJustin Hibbits                              to the key mask must be NULL, as masks are not
3627*852ba100SJustin Hibbits                              supported in hash table implementation.
3628*852ba100SJustin Hibbits 
3629*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3630*852ba100SJustin Hibbits 
3631*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_HashTableSet().
3632*852ba100SJustin Hibbits *//***************************************************************************/
3633*852ba100SJustin Hibbits t_Error FM_PCD_HashTableAddKey(t_Handle            h_HashTbl,
3634*852ba100SJustin Hibbits                                uint8_t             keySize,
3635*852ba100SJustin Hibbits                                t_FmPcdCcKeyParams  *p_KeyParams);
3636*852ba100SJustin Hibbits 
3637*852ba100SJustin Hibbits /**************************************************************************//**
3638*852ba100SJustin Hibbits  @Function      FM_PCD_HashTableRemoveKey
3639*852ba100SJustin Hibbits 
3640*852ba100SJustin Hibbits  @Description   This routine removes the requested key (including next engine
3641*852ba100SJustin Hibbits                 parameters of this key) from the hash table.
3642*852ba100SJustin Hibbits 
3643*852ba100SJustin Hibbits  @Param[in]     h_HashTbl    A handle to a hash table
3644*852ba100SJustin Hibbits  @Param[in]     keySize      Key size of the one to remove.
3645*852ba100SJustin Hibbits  @Param[in]     p_Key        A pointer to the requested key to remove.
3646*852ba100SJustin Hibbits 
3647*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3648*852ba100SJustin Hibbits 
3649*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_HashTableSet().
3650*852ba100SJustin Hibbits *//***************************************************************************/
3651*852ba100SJustin Hibbits t_Error FM_PCD_HashTableRemoveKey(t_Handle h_HashTbl,
3652*852ba100SJustin Hibbits                                   uint8_t  keySize,
3653*852ba100SJustin Hibbits                                   uint8_t  *p_Key);
3654*852ba100SJustin Hibbits 
3655*852ba100SJustin Hibbits /**************************************************************************//**
3656*852ba100SJustin Hibbits  @Function      FM_PCD_HashTableModifyNextEngine
3657*852ba100SJustin Hibbits 
3658*852ba100SJustin Hibbits  @Description   This routine modifies the next engine for the provided key. The
3659*852ba100SJustin Hibbits                 key should be previously added to the hash table.
3660*852ba100SJustin Hibbits 
3661*852ba100SJustin Hibbits  @Param[in]     h_HashTbl                   A handle to a hash table
3662*852ba100SJustin Hibbits  @Param[in]     keySize                     Key size of the key to modify.
3663*852ba100SJustin Hibbits  @Param[in]     p_Key                       A pointer to the requested key to modify.
3664*852ba100SJustin Hibbits  @Param[in]     p_FmPcdCcNextEngineParams   A structure for defining new next engine
3665*852ba100SJustin Hibbits                                             parameters.
3666*852ba100SJustin Hibbits 
3667*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3668*852ba100SJustin Hibbits 
3669*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_HashTableSet().
3670*852ba100SJustin Hibbits                 When configuring nextEngine = e_FM_PCD_CC, note that
3671*852ba100SJustin Hibbits                 p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different
3672*852ba100SJustin Hibbits                 from the currently changed table.
3673*852ba100SJustin Hibbits *//***************************************************************************/
3674*852ba100SJustin Hibbits t_Error FM_PCD_HashTableModifyNextEngine(t_Handle                  h_HashTbl,
3675*852ba100SJustin Hibbits                                          uint8_t                   keySize,
3676*852ba100SJustin Hibbits                                          uint8_t                   *p_Key,
3677*852ba100SJustin Hibbits                                          t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);
3678*852ba100SJustin Hibbits 
3679*852ba100SJustin Hibbits /**************************************************************************//**
3680*852ba100SJustin Hibbits  @Function      FM_PCD_HashTableModifyMissNextEngine
3681*852ba100SJustin Hibbits 
3682*852ba100SJustin Hibbits  @Description   This routine modifies the next engine on key match miss.
3683*852ba100SJustin Hibbits 
3684*852ba100SJustin Hibbits  @Param[in]     h_HashTbl                   A handle to a hash table
3685*852ba100SJustin Hibbits  @Param[in]     p_FmPcdCcNextEngineParams   A structure for defining new next engine
3686*852ba100SJustin Hibbits                                             parameters.
3687*852ba100SJustin Hibbits 
3688*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3689*852ba100SJustin Hibbits 
3690*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_HashTableSet().
3691*852ba100SJustin Hibbits                 When configuring nextEngine = e_FM_PCD_CC, note that
3692*852ba100SJustin Hibbits                 p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different
3693*852ba100SJustin Hibbits                 from the currently changed table.
3694*852ba100SJustin Hibbits *//***************************************************************************/
3695*852ba100SJustin Hibbits t_Error FM_PCD_HashTableModifyMissNextEngine(t_Handle                  h_HashTbl,
3696*852ba100SJustin Hibbits                                              t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);
3697*852ba100SJustin Hibbits 
3698*852ba100SJustin Hibbits /**************************************************************************//*
3699*852ba100SJustin Hibbits  @Function      FM_PCD_HashTableGetMissNextEngine
3700*852ba100SJustin Hibbits 
3701*852ba100SJustin Hibbits  @Description   Gets NextEngine in case of key match miss.
3702*852ba100SJustin Hibbits 
3703*852ba100SJustin Hibbits  @Param[in]     h_HashTbl                   A handle to a hash table
3704*852ba100SJustin Hibbits  @Param[out]    p_FmPcdCcNextEngineParams   Next engine parameters for the specified
3705*852ba100SJustin Hibbits                                             hash table.
3706*852ba100SJustin Hibbits 
3707*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3708*852ba100SJustin Hibbits 
3709*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_HashTableSet().
3710*852ba100SJustin Hibbits *//***************************************************************************/
3711*852ba100SJustin Hibbits t_Error FM_PCD_HashTableGetMissNextEngine(t_Handle                     h_HashTbl,
3712*852ba100SJustin Hibbits                                           t_FmPcdCcNextEngineParams    *p_FmPcdCcNextEngineParams);
3713*852ba100SJustin Hibbits 
3714*852ba100SJustin Hibbits /**************************************************************************//**
3715*852ba100SJustin Hibbits  @Function      FM_PCD_HashTableFindNGetKeyStatistics
3716*852ba100SJustin Hibbits 
3717*852ba100SJustin Hibbits  @Description   This routine may be used to get statistics counters of specific key
3718*852ba100SJustin Hibbits                 in a hash table.
3719*852ba100SJustin Hibbits 
3720*852ba100SJustin Hibbits                 If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
3721*852ba100SJustin Hibbits                 'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,
3722*852ba100SJustin Hibbits                 these counters reflect how many frames passed that were matched
3723*852ba100SJustin Hibbits                 this key; The total frames count will be returned in the counter
3724*852ba100SJustin Hibbits                 of the first range (as only one frame length range was defined).
3725*852ba100SJustin Hibbits                 If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for this node, the total
3726*852ba100SJustin Hibbits                 frame count will be separated to frame length counters, based on
3727*852ba100SJustin Hibbits                 provided frame length ranges.
3728*852ba100SJustin Hibbits                 Note that this routine will identify the bucket of this key in
3729*852ba100SJustin Hibbits                 the hash table and will search the bucket to locate the index
3730*852ba100SJustin Hibbits                 of the required key based on received key parameters.
3731*852ba100SJustin Hibbits 
3732*852ba100SJustin Hibbits  @Param[in]     h_HashTbl       A handle to a hash table
3733*852ba100SJustin Hibbits  @Param[in]     keySize         Size of the requested key
3734*852ba100SJustin Hibbits  @Param[in]     p_Key           A pointer to the requested key
3735*852ba100SJustin Hibbits  @Param[out]    p_KeyStatistics Key statistics counters
3736*852ba100SJustin Hibbits 
3737*852ba100SJustin Hibbits  @Return        The specific key statistics.
3738*852ba100SJustin Hibbits 
3739*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_HashTableSet().
3740*852ba100SJustin Hibbits *//***************************************************************************/
3741*852ba100SJustin Hibbits t_Error FM_PCD_HashTableFindNGetKeyStatistics(t_Handle                 h_HashTbl,
3742*852ba100SJustin Hibbits                                               uint8_t                  keySize,
3743*852ba100SJustin Hibbits                                               uint8_t                  *p_Key,
3744*852ba100SJustin Hibbits                                               t_FmPcdCcKeyStatistics   *p_KeyStatistics);
3745*852ba100SJustin Hibbits 
3746*852ba100SJustin Hibbits /**************************************************************************//**
3747*852ba100SJustin Hibbits  @Function      FM_PCD_HashTableGetMissStatistics
3748*852ba100SJustin Hibbits 
3749*852ba100SJustin Hibbits  @Description   This routine may be used to get statistics counters of 'miss'
3750*852ba100SJustin Hibbits                 entry of the a hash table.
3751*852ba100SJustin Hibbits 
3752*852ba100SJustin Hibbits                 If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
3753*852ba100SJustin Hibbits                 'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,
3754*852ba100SJustin Hibbits                 these counters reflect how many frames were not matched to any
3755*852ba100SJustin Hibbits                 existing key and therefore passed through the miss entry;
3756*852ba100SJustin Hibbits 
3757*852ba100SJustin Hibbits  @Param[in]     h_HashTbl           A handle to a hash table
3758*852ba100SJustin Hibbits  @Param[out]    p_MissStatistics    Statistics counters for 'miss'
3759*852ba100SJustin Hibbits 
3760*852ba100SJustin Hibbits  @Return        The statistics for 'miss'.
3761*852ba100SJustin Hibbits 
3762*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_HashTableSet().
3763*852ba100SJustin Hibbits *//***************************************************************************/
3764*852ba100SJustin Hibbits t_Error FM_PCD_HashTableGetMissStatistics(t_Handle                 h_HashTbl,
3765*852ba100SJustin Hibbits                                           t_FmPcdCcKeyStatistics   *p_MissStatistics);
3766*852ba100SJustin Hibbits 
3767*852ba100SJustin Hibbits /**************************************************************************//**
3768*852ba100SJustin Hibbits  @Function      FM_PCD_ManipNodeSet
37690aeed3e9SJustin Hibbits 
37700aeed3e9SJustin Hibbits  @Description   This routine should be called for defining a manipulation
37710aeed3e9SJustin Hibbits                 node. A manipulation node must be defined before the CC node
37720aeed3e9SJustin Hibbits                 that precedes it.
37730aeed3e9SJustin Hibbits 
37740aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd             FM PCD module descriptor.
37750aeed3e9SJustin Hibbits  @Param[in]     p_FmPcdManipParams  A structure of parameters defining the manipulation
37760aeed3e9SJustin Hibbits 
37770aeed3e9SJustin Hibbits  @Return        A handle to the initialized object on success; NULL code otherwise.
37780aeed3e9SJustin Hibbits 
37790aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
37800aeed3e9SJustin Hibbits *//***************************************************************************/
3781*852ba100SJustin Hibbits t_Handle FM_PCD_ManipNodeSet(t_Handle h_FmPcd, t_FmPcdManipParams *p_FmPcdManipParams);
37820aeed3e9SJustin Hibbits 
37830aeed3e9SJustin Hibbits /**************************************************************************//**
3784*852ba100SJustin Hibbits  @Function      FM_PCD_ManipNodeDelete
37850aeed3e9SJustin Hibbits 
3786*852ba100SJustin Hibbits  @Description   Delete an existing manipulation node.
37870aeed3e9SJustin Hibbits 
3788*852ba100SJustin Hibbits  @Param[in]     h_ManipNode     A handle to a manipulation node.
3789*852ba100SJustin Hibbits 
3790*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3791*852ba100SJustin Hibbits 
3792*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_ManipNodeSet().
3793*852ba100SJustin Hibbits *//***************************************************************************/
3794*852ba100SJustin Hibbits t_Error  FM_PCD_ManipNodeDelete(t_Handle h_ManipNode);
3795*852ba100SJustin Hibbits 
3796*852ba100SJustin Hibbits /**************************************************************************//**
3797*852ba100SJustin Hibbits  @Function      FM_PCD_ManipGetStatistics
3798*852ba100SJustin Hibbits 
3799*852ba100SJustin Hibbits  @Description   Retrieve the manipulation statistics.
3800*852ba100SJustin Hibbits 
3801*852ba100SJustin Hibbits  @Param[in]     h_ManipNode         A handle to a manipulation node.
3802*852ba100SJustin Hibbits  @Param[out]    p_FmPcdManipStats   A structure for retrieving the manipulation statistics
3803*852ba100SJustin Hibbits 
3804*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3805*852ba100SJustin Hibbits 
3806*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_ManipNodeSet().
3807*852ba100SJustin Hibbits *//***************************************************************************/
3808*852ba100SJustin Hibbits t_Error FM_PCD_ManipGetStatistics(t_Handle h_ManipNode, t_FmPcdManipStats *p_FmPcdManipStats);
3809*852ba100SJustin Hibbits 
3810*852ba100SJustin Hibbits /**************************************************************************//**
3811*852ba100SJustin Hibbits  @Function      FM_PCD_ManipNodeReplace
3812*852ba100SJustin Hibbits 
3813*852ba100SJustin Hibbits  @Description   Change existing manipulation node to be according to new requirement.
3814*852ba100SJustin Hibbits 
3815*852ba100SJustin Hibbits  @Param[in]     h_ManipNode         A handle to a manipulation node.
3816*852ba100SJustin Hibbits  @Param[out]    p_ManipParams       A structure of parameters defining the change requirement
3817*852ba100SJustin Hibbits 
3818*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3819*852ba100SJustin Hibbits 
3820*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_ManipNodeSet().
3821*852ba100SJustin Hibbits *//***************************************************************************/
3822*852ba100SJustin Hibbits t_Error FM_PCD_ManipNodeReplace(t_Handle h_ManipNode, t_FmPcdManipParams *p_ManipParams);
3823*852ba100SJustin Hibbits 
3824*852ba100SJustin Hibbits #if (DPAA_VERSION >= 11)
3825*852ba100SJustin Hibbits /**************************************************************************//**
3826*852ba100SJustin Hibbits  @Function      FM_PCD_FrmReplicSetGroup
3827*852ba100SJustin Hibbits 
3828*852ba100SJustin Hibbits  @Description   Initialize a Frame Replicator group.
3829*852ba100SJustin Hibbits 
3830*852ba100SJustin Hibbits  @Param[in]     h_FmPcd                FM PCD module descriptor.
3831*852ba100SJustin Hibbits  @Param[in]     p_FrmReplicGroupParam  A structure of parameters for the initialization of
3832*852ba100SJustin Hibbits                                        the frame replicator group.
3833*852ba100SJustin Hibbits 
3834*852ba100SJustin Hibbits  @Return        A handle to the initialized object on success; NULL code otherwise.
38350aeed3e9SJustin Hibbits 
38360aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
38370aeed3e9SJustin Hibbits *//***************************************************************************/
3838*852ba100SJustin Hibbits t_Handle FM_PCD_FrmReplicSetGroup(t_Handle h_FmPcd, t_FmPcdFrmReplicGroupParams *p_FrmReplicGroupParam);
38390aeed3e9SJustin Hibbits 
3840*852ba100SJustin Hibbits /**************************************************************************//**
3841*852ba100SJustin Hibbits  @Function      FM_PCD_FrmReplicDeleteGroup
38420aeed3e9SJustin Hibbits 
3843*852ba100SJustin Hibbits  @Description   Delete a Frame Replicator group.
3844*852ba100SJustin Hibbits 
3845*852ba100SJustin Hibbits  @Param[in]     h_FrmReplicGroup  A handle to the frame replicator group.
3846*852ba100SJustin Hibbits 
3847*852ba100SJustin Hibbits  @Return        E_OK on success;  Error code otherwise.
3848*852ba100SJustin Hibbits 
3849*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_FrmReplicSetGroup().
3850*852ba100SJustin Hibbits *//***************************************************************************/
3851*852ba100SJustin Hibbits t_Error FM_PCD_FrmReplicDeleteGroup(t_Handle h_FrmReplicGroup);
3852*852ba100SJustin Hibbits 
3853*852ba100SJustin Hibbits /**************************************************************************//**
3854*852ba100SJustin Hibbits  @Function      FM_PCD_FrmReplicAddMember
3855*852ba100SJustin Hibbits 
3856*852ba100SJustin Hibbits  @Description   Add the member in the index defined by the memberIndex.
3857*852ba100SJustin Hibbits 
3858*852ba100SJustin Hibbits  @Param[in]     h_FrmReplicGroup   A handle to the frame replicator group.
3859*852ba100SJustin Hibbits  @Param[in]     memberIndex        member index for adding.
3860*852ba100SJustin Hibbits  @Param[in]     p_MemberParams     A pointer to the new member parameters.
3861*852ba100SJustin Hibbits 
3862*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3863*852ba100SJustin Hibbits 
3864*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_FrmReplicSetGroup() of this group.
3865*852ba100SJustin Hibbits *//***************************************************************************/
3866*852ba100SJustin Hibbits t_Error FM_PCD_FrmReplicAddMember(t_Handle                   h_FrmReplicGroup,
3867*852ba100SJustin Hibbits                                   uint16_t                   memberIndex,
3868*852ba100SJustin Hibbits                                   t_FmPcdCcNextEngineParams *p_MemberParams);
3869*852ba100SJustin Hibbits 
3870*852ba100SJustin Hibbits /**************************************************************************//**
3871*852ba100SJustin Hibbits  @Function      FM_PCD_FrmReplicRemoveMember
3872*852ba100SJustin Hibbits 
3873*852ba100SJustin Hibbits  @Description   Remove the member defined by the index from the relevant group.
3874*852ba100SJustin Hibbits 
3875*852ba100SJustin Hibbits  @Param[in]     h_FrmReplicGroup   A handle to the frame replicator group.
3876*852ba100SJustin Hibbits  @Param[in]     memberIndex        member index for removing.
3877*852ba100SJustin Hibbits 
3878*852ba100SJustin Hibbits  @Return        E_OK on success; Error code otherwise.
3879*852ba100SJustin Hibbits 
3880*852ba100SJustin Hibbits  @Cautions      Allowed only following FM_PCD_FrmReplicSetGroup() of this group.
3881*852ba100SJustin Hibbits *//***************************************************************************/
3882*852ba100SJustin Hibbits t_Error FM_PCD_FrmReplicRemoveMember(t_Handle h_FrmReplicGroup,
3883*852ba100SJustin Hibbits                                      uint16_t memberIndex);
3884*852ba100SJustin Hibbits #endif /* (DPAA_VERSION >= 11) */
3885*852ba100SJustin Hibbits 
3886*852ba100SJustin Hibbits #if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
38870aeed3e9SJustin Hibbits /**************************************************************************//**
38880aeed3e9SJustin Hibbits  @Function      FM_PCD_StatisticsSetNode
38890aeed3e9SJustin Hibbits 
3890*852ba100SJustin Hibbits  @Description   This routine should be called for defining a statistics node.
38910aeed3e9SJustin Hibbits 
38920aeed3e9SJustin Hibbits  @Param[in]     h_FmPcd             FM PCD module descriptor.
38930aeed3e9SJustin Hibbits  @Param[in]     p_FmPcdstatsParams  A structure of parameters defining the statistics
38940aeed3e9SJustin Hibbits 
38950aeed3e9SJustin Hibbits  @Return        A handle to the initialized object on success; NULL code otherwise.
38960aeed3e9SJustin Hibbits 
38970aeed3e9SJustin Hibbits  @Cautions      Allowed only following FM_PCD_Init().
38980aeed3e9SJustin Hibbits *//***************************************************************************/
38990aeed3e9SJustin Hibbits t_Handle FM_PCD_StatisticsSetNode(t_Handle h_FmPcd, t_FmPcdStatsParams *p_FmPcdstatsParams);
3900*852ba100SJustin Hibbits #endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */
39010aeed3e9SJustin Hibbits 
3902*852ba100SJustin Hibbits /** @} */ /* end of FM_PCD_Runtime_build_grp group */
39030aeed3e9SJustin Hibbits /** @} */ /* end of FM_PCD_Runtime_grp group */
39040aeed3e9SJustin Hibbits /** @} */ /* end of FM_PCD_grp group */
39050aeed3e9SJustin Hibbits /** @} */ /* end of FM_grp group */
39060aeed3e9SJustin Hibbits 
39070aeed3e9SJustin Hibbits 
3908*852ba100SJustin Hibbits #ifdef NCSW_BACKWARD_COMPATIBLE_API
3909*852ba100SJustin Hibbits #define FM_PCD_MAX_NUM_OF_INTERCHANGABLE_HDRS   FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS
3910*852ba100SJustin Hibbits #define e_FM_PCD_MANIP_ONE_WAYS_HASH            e_FM_PCD_MANIP_ONE_WAY_HASH
3911*852ba100SJustin Hibbits #define e_FM_PCD_MANIP_TOW_WAYS_HASH            e_FM_PCD_MANIP_TWO_WAYS_HASH
3912*852ba100SJustin Hibbits 
3913*852ba100SJustin Hibbits #define e_FM_PCD_MANIP_FRAGMENT_PACKECT         e_FM_PCD_MANIP_FRAGMENT_PACKET /* Feb13 */
3914*852ba100SJustin Hibbits 
3915*852ba100SJustin Hibbits #define FM_PCD_SetNetEnvCharacteristics(_pcd, _params)  \
3916*852ba100SJustin Hibbits     FM_PCD_NetEnvCharacteristicsSet(_pcd, _params)
3917*852ba100SJustin Hibbits #define FM_PCD_KgSetScheme(_pcd, _params)       FM_PCD_KgSchemeSet(_pcd, _params)
3918*852ba100SJustin Hibbits #define FM_PCD_CcBuildTree(_pcd, _params)       FM_PCD_CcRootBuild(_pcd, _params)
3919*852ba100SJustin Hibbits #define FM_PCD_CcSetNode(_pcd, _params)         FM_PCD_MatchTableSet(_pcd, _params)
3920*852ba100SJustin Hibbits #define FM_PCD_PlcrSetProfile(_pcd, _params)    FM_PCD_PlcrProfileSet(_pcd, _params)
3921*852ba100SJustin Hibbits #define FM_PCD_ManipSetNode(_pcd, _params)      FM_PCD_ManipNodeSet(_pcd, _params)
3922*852ba100SJustin Hibbits 
3923*852ba100SJustin Hibbits #define FM_PCD_DeleteNetEnvCharacteristics(_pcd, ...)   \
3924*852ba100SJustin Hibbits     FM_PCD_NetEnvCharacteristicsDelete(__VA_ARGS__)
3925*852ba100SJustin Hibbits #define FM_PCD_KgDeleteScheme(_pcd, ...)   \
3926*852ba100SJustin Hibbits     FM_PCD_KgSchemeDelete(__VA_ARGS__)
3927*852ba100SJustin Hibbits #define FM_PCD_KgGetSchemeCounter(_pcd, ...)   \
3928*852ba100SJustin Hibbits     FM_PCD_KgSchemeGetCounter(__VA_ARGS__)
3929*852ba100SJustin Hibbits #define FM_PCD_KgSetSchemeCounter(_pcd, ...)   \
3930*852ba100SJustin Hibbits     FM_PCD_KgSchemeSetCounter(__VA_ARGS__)
3931*852ba100SJustin Hibbits #define FM_PCD_PlcrDeleteProfile(_pcd, ...)   \
3932*852ba100SJustin Hibbits     FM_PCD_PlcrProfileDelete(__VA_ARGS__)
3933*852ba100SJustin Hibbits #define FM_PCD_PlcrGetProfileCounter(_pcd, ...)   \
3934*852ba100SJustin Hibbits     FM_PCD_PlcrProfileGetCounter(__VA_ARGS__)
3935*852ba100SJustin Hibbits #define FM_PCD_PlcrSetProfileCounter(_pcd, ...)   \
3936*852ba100SJustin Hibbits     FM_PCD_PlcrProfileSetCounter(__VA_ARGS__)
3937*852ba100SJustin Hibbits #define FM_PCD_CcDeleteTree(_pcd, ...)   \
3938*852ba100SJustin Hibbits     FM_PCD_CcRootDelete(__VA_ARGS__)
3939*852ba100SJustin Hibbits #define FM_PCD_CcTreeModifyNextEngine(_pcd, ...)   \
3940*852ba100SJustin Hibbits     FM_PCD_CcRootModifyNextEngine(__VA_ARGS__)
3941*852ba100SJustin Hibbits #define FM_PCD_CcDeleteNode(_pcd, ...)   \
3942*852ba100SJustin Hibbits     FM_PCD_MatchTableDelete(__VA_ARGS__)
3943*852ba100SJustin Hibbits #define FM_PCD_CcNodeModifyMissNextEngine(_pcd, ...)   \
3944*852ba100SJustin Hibbits     FM_PCD_MatchTableModifyMissNextEngine(__VA_ARGS__)
3945*852ba100SJustin Hibbits #define FM_PCD_CcNodeRemoveKey(_pcd, ...)   \
3946*852ba100SJustin Hibbits     FM_PCD_MatchTableRemoveKey(__VA_ARGS__)
3947*852ba100SJustin Hibbits #define FM_PCD_CcNodeAddKey(_pcd, ...)   \
3948*852ba100SJustin Hibbits     FM_PCD_MatchTableAddKey(__VA_ARGS__)
3949*852ba100SJustin Hibbits #define FM_PCD_CcNodeModifyNextEngine(_pcd, ...)   \
3950*852ba100SJustin Hibbits     FM_PCD_MatchTableModifyNextEngine(__VA_ARGS__)
3951*852ba100SJustin Hibbits #define FM_PCD_CcNodeModifyKeyAndNextEngine(_pcd, ...)   \
3952*852ba100SJustin Hibbits     FM_PCD_MatchTableModifyKeyAndNextEngine(__VA_ARGS__)
3953*852ba100SJustin Hibbits #define FM_PCD_CcNodeModifyKey(_pcd, ...)   \
3954*852ba100SJustin Hibbits     FM_PCD_MatchTableModifyKey(__VA_ARGS__)
3955*852ba100SJustin Hibbits #define FM_PCD_CcNodeFindNRemoveKey(_pcd, ...)   \
3956*852ba100SJustin Hibbits     FM_PCD_MatchTableFindNRemoveKey(__VA_ARGS__)
3957*852ba100SJustin Hibbits #define FM_PCD_CcNodeFindNModifyNextEngine(_pcd, ...)   \
3958*852ba100SJustin Hibbits     FM_PCD_MatchTableFindNModifyNextEngine(__VA_ARGS__)
3959*852ba100SJustin Hibbits #define FM_PCD_CcNodeFindNModifyKeyAndNextEngine(_pcd, ...) \
3960*852ba100SJustin Hibbits     FM_PCD_MatchTableFindNModifyKeyAndNextEngine(__VA_ARGS__)
3961*852ba100SJustin Hibbits #define FM_PCD_CcNodeFindNModifyKey(_pcd, ...)   \
3962*852ba100SJustin Hibbits     FM_PCD_MatchTableFindNModifyKey(__VA_ARGS__)
3963*852ba100SJustin Hibbits #define FM_PCD_CcIndexedHashNodeGetBucket(_pcd, ...)   \
3964*852ba100SJustin Hibbits     FM_PCD_MatchTableGetIndexedHashBucket(__VA_ARGS__)
3965*852ba100SJustin Hibbits #define FM_PCD_CcNodeGetNextEngine(_pcd, ...)   \
3966*852ba100SJustin Hibbits     FM_PCD_MatchTableGetNextEngine(__VA_ARGS__)
3967*852ba100SJustin Hibbits #define FM_PCD_CcNodeGetKeyCounter(_pcd, ...)   \
3968*852ba100SJustin Hibbits     FM_PCD_MatchTableGetKeyCounter(__VA_ARGS__)
3969*852ba100SJustin Hibbits #define FM_PCD_ManipDeleteNode(_pcd, ...)   \
3970*852ba100SJustin Hibbits     FM_PCD_ManipNodeDelete(__VA_ARGS__)
3971*852ba100SJustin Hibbits #endif /* NCSW_BACKWARD_COMPATIBLE_API */
3972*852ba100SJustin Hibbits 
39730aeed3e9SJustin Hibbits 
39740aeed3e9SJustin Hibbits #endif /* __FM_PCD_EXT */
3975