1 /* Copyright (c) 2008-2012 Freescale Semiconductor, Inc
2  * All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *     * Redistributions of source code must retain the above copyright
7  *       notice, this list of conditions and the following disclaimer.
8  *     * Redistributions in binary form must reproduce the above copyright
9  *       notice, this list of conditions and the following disclaimer in the
10  *       documentation and/or other materials provided with the distribution.
11  *     * Neither the name of Freescale Semiconductor nor the
12  *       names of its contributors may be used to endorse or promote products
13  *       derived from this software without specific prior written permission.
14  *
15  *
16  * ALTERNATIVELY, this software may be distributed under the terms of the
17  * GNU General Public License ("GPL") as published by the Free Software
18  * Foundation, either version 2 of that License or (at your option) any
19  * later version.
20  *
21  * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
22  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24  * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
25  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
28  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 
34 /**************************************************************************//**
35  @File          fm_pcd_ext.h
36 
37  @Description   FM PCD API definitions
38 *//***************************************************************************/
39 #ifndef __FM_PCD_EXT
40 #define __FM_PCD_EXT
41 
42 #include "std_ext.h"
43 #include "net_ext.h"
44 #include "list_ext.h"
45 #include "fm_ext.h"
46 #include "fsl_fman_kg.h"
47 
48 
49 /**************************************************************************//**
50  @Group         FM_grp Frame Manager API
51 
52  @Description   Frame Manager Application Programming Interface
53 
54  @{
55 *//***************************************************************************/
56 
57 /**************************************************************************//**
58  @Group         FM_PCD_grp FM PCD
59 
60  @Description   Frame Manager PCD (Parse-Classify-Distribute) API.
61 
62                 The FM PCD module is responsible for the initialization of all
63                 global classifying FM modules. This includes the parser general and
64                 common registers, the key generator global and common registers,
65                 and the policer global and common registers.
66                 In addition, the FM PCD SW module will initialize all required
67                 key generator schemes, coarse classification flows, and policer
68                 profiles. When FM module is configured to work with one of these
69                 entities, it will register to it using the FM PORT API. The PCD
70                 module will manage the PCD resources - i.e. resource management of
71                 KeyGen schemes, etc.
72 
73  @{
74 *//***************************************************************************/
75 
76 /**************************************************************************//**
77  @Collection    General PCD defines
78 *//***************************************************************************/
79 #define FM_PCD_MAX_NUM_OF_PRIVATE_HDRS              2                   /**< Number of units/headers saved for user */
80 
81 #define FM_PCD_PRS_NUM_OF_HDRS                      16                  /**< Number of headers supported by HW parser */
82 #define FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS         (32 - FM_PCD_MAX_NUM_OF_PRIVATE_HDRS)
83                                                                         /**< Number of distinction units is limited by
84                                                                              register size (32 bits) minus reserved bits
85                                                                              for private headers. */
86 #define FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS      4                   /**< Maximum number of interchangeable headers
87                                                                              in a distinction unit */
88 #define FM_PCD_KG_NUM_OF_GENERIC_REGS               FM_KG_NUM_OF_GENERIC_REGS /**< Total number of generic KeyGen registers */
89 #define FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY       35                  /**< Max number allowed on any configuration;
90                                                                              For HW implementation reasons, in most
91                                                                              cases less than this will be allowed; The
92                                                                              driver will return an initialization error
93                                                                              if resource is unavailable. */
94 #define FM_PCD_KG_NUM_OF_EXTRACT_MASKS              4                   /**< Total number of masks allowed on KeyGen extractions. */
95 #define FM_PCD_KG_NUM_OF_DEFAULT_GROUPS             16                  /**< Number of default value logical groups */
96 
97 #define FM_PCD_PRS_NUM_OF_LABELS                    32                  /**< Maximum number of SW parser labels */
98 #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                                                                         /**< Maximum size of SW parser code */
100 
101 #define FM_PCD_MAX_MANIP_INSRT_TEMPLATE_SIZE        128                 /**< Maximum size of insertion template for
102                                                                              insert manipulation */
103 
104 #if (DPAA_VERSION >= 11)
105 #define FM_PCD_FRM_REPLIC_MAX_NUM_OF_ENTRIES        64                  /**< Maximum possible entries for frame replicator group */
106 #endif /* (DPAA_VERSION >= 11) */
107 /* @} */
108 
109 
110 /**************************************************************************//**
111  @Group         FM_PCD_init_grp FM PCD Initialization Unit
112 
113  @Description   Frame Manager PCD Initialization Unit API
114 
115  @{
116 *//***************************************************************************/
117 
118 /**************************************************************************//**
119  @Description   PCD counters
120 *//***************************************************************************/
121 typedef enum e_FmPcdCounters {
122     e_FM_PCD_KG_COUNTERS_TOTAL,                                 /**< KeyGen counter */
123     e_FM_PCD_PLCR_COUNTERS_RED,                                 /**< Policer counter - counts the total number of RED packets that exit the Policer. */
124     e_FM_PCD_PLCR_COUNTERS_YELLOW,                              /**< Policer counter - counts the total number of YELLOW packets that exit the Policer. */
125     e_FM_PCD_PLCR_COUNTERS_RECOLORED_TO_RED,                    /**< Policer counter - counts the number of packets that changed color to RED by the Policer;
126                                                                      This is a subset of e_FM_PCD_PLCR_COUNTERS_RED packet count, indicating active color changes. */
127     e_FM_PCD_PLCR_COUNTERS_RECOLORED_TO_YELLOW,                 /**< Policer counter - counts the number of packets that changed color to YELLOW by the Policer;
128                                                                      This is a subset of e_FM_PCD_PLCR_COUNTERS_YELLOW packet count, indicating active color changes. */
129     e_FM_PCD_PLCR_COUNTERS_TOTAL,                               /**< Policer counter - counts the total number of packets passed in the Policer. */
130     e_FM_PCD_PLCR_COUNTERS_LENGTH_MISMATCH,                     /**< Policer counter - counts the number of packets with length mismatch. */
131     e_FM_PCD_PRS_COUNTERS_PARSE_DISPATCH,                       /**< Parser counter - counts the number of times the parser block is dispatched. */
132     e_FM_PCD_PRS_COUNTERS_L2_PARSE_RESULT_RETURNED,             /**< Parser counter - counts the number of times L2 parse result is returned (including errors). */
133     e_FM_PCD_PRS_COUNTERS_L3_PARSE_RESULT_RETURNED,             /**< Parser counter - counts the number of times L3 parse result is returned (including errors). */
134     e_FM_PCD_PRS_COUNTERS_L4_PARSE_RESULT_RETURNED,             /**< Parser counter - counts the number of times L4 parse result is returned (including errors). */
135     e_FM_PCD_PRS_COUNTERS_SHIM_PARSE_RESULT_RETURNED,           /**< Parser counter - counts the number of times SHIM parse result is returned (including errors). */
136     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     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     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     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     e_FM_PCD_PRS_COUNTERS_SOFT_PRS_CYCLES,                      /**< Parser counter - counts the number of cycles spent executing soft parser instruction (including stall cycles). */
141     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     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     e_FM_PCD_PRS_COUNTERS_MURAM_READ_CYCLES,                    /**< MURAM counter - counts the number of cycles while performing FMan Memory read. */
144     e_FM_PCD_PRS_COUNTERS_MURAM_READ_STALL_CYCLES,              /**< MURAM counter - counts the number of cycles stalled while performing FMan Memory read. */
145     e_FM_PCD_PRS_COUNTERS_MURAM_WRITE_CYCLES,                   /**< MURAM counter - counts the number of cycles while performing FMan Memory write. */
146     e_FM_PCD_PRS_COUNTERS_MURAM_WRITE_STALL_CYCLES,             /**< MURAM counter - counts the number of cycles stalled while performing FMan Memory write. */
147     e_FM_PCD_PRS_COUNTERS_FPM_COMMAND_STALL_CYCLES              /**< FPM counter - counts the number of cycles stalled while performing a FPM Command. */
148 } e_FmPcdCounters;
149 
150 /**************************************************************************//**
151  @Description   PCD interrupts
152 *//***************************************************************************/
153 typedef enum e_FmPcdExceptions {
154     e_FM_PCD_KG_EXCEPTION_DOUBLE_ECC,                   /**< KeyGen double-bit ECC error is detected on internal memory read access. */
155     e_FM_PCD_KG_EXCEPTION_KEYSIZE_OVERFLOW,             /**< KeyGen scheme configuration error indicating a key size larger than 56 bytes. */
156     e_FM_PCD_PLCR_EXCEPTION_DOUBLE_ECC,                 /**< Policer double-bit ECC error has been detected on PRAM read access. */
157     e_FM_PCD_PLCR_EXCEPTION_INIT_ENTRY_ERROR,           /**< Policer access to a non-initialized profile has been detected. */
158     e_FM_PCD_PLCR_EXCEPTION_PRAM_SELF_INIT_COMPLETE,    /**< Policer RAM self-initialization complete */
159     e_FM_PCD_PLCR_EXCEPTION_ATOMIC_ACTION_COMPLETE,     /**< Policer atomic action complete */
160     e_FM_PCD_PRS_EXCEPTION_DOUBLE_ECC,                  /**< Parser double-bit ECC error */
161     e_FM_PCD_PRS_EXCEPTION_SINGLE_ECC                   /**< Parser single-bit ECC error */
162 } e_FmPcdExceptions;
163 
164 
165 /**************************************************************************//**
166  @Description   Exceptions user callback routine, will be called upon an
167                 exception passing the exception identification.
168 
169  @Param[in]     h_App      - User's application descriptor.
170  @Param[in]     exception  - The exception.
171   *//***************************************************************************/
172 typedef void (t_FmPcdExceptionCallback) (t_Handle h_App, e_FmPcdExceptions exception);
173 
174 /**************************************************************************//**
175  @Description   Exceptions user callback routine, will be called upon an exception
176                 passing the exception identification.
177 
178  @Param[in]     h_App           - User's application descriptor.
179  @Param[in]     exception       - The exception.
180  @Param[in]     index           - id of the relevant source (may be scheme or profile id).
181  *//***************************************************************************/
182 typedef void (t_FmPcdIdExceptionCallback) ( t_Handle           h_App,
183                                             e_FmPcdExceptions  exception,
184                                             uint16_t           index);
185 
186 /**************************************************************************//**
187  @Description   A callback for enqueuing frame onto a QM queue.
188 
189  @Param[in]     h_QmArg         - Application's handle passed to QM module on enqueue.
190  @Param[in]     p_Fd            - Frame descriptor for the frame.
191 
192  @Return        E_OK on success; Error code otherwise.
193  *//***************************************************************************/
194 typedef t_Error (t_FmPcdQmEnqueueCallback) (t_Handle h_QmArg, void *p_Fd);
195 
196 /**************************************************************************//**
197  @Description   Host-Command parameters structure.
198 
199                 When using Host command for PCD functionalities, a dedicated port
200                 must be used. If this routine is called for a PCD in a single partition
201                 environment, or it is the Master partition in a Multi-partition
202                 environment, The port will be initialized by the PCD driver
203                 initialization routine.
204  *//***************************************************************************/
205 typedef struct t_FmPcdHcParams {
206     uintptr_t                   portBaseAddr;       /**< Virtual Address of Host-Command Port memory mapped registers.*/
207     uint8_t                     portId;             /**< Port Id (0-6 relative to Host-Command/Offline-Parsing ports);
208                                                          NOTE: When configuring Host Command port for
209                                                          FMANv3 devices (DPAA_VERSION 11 and higher),
210                                                          portId=0 MUST be used. */
211     uint16_t                    liodnBase;          /**< LIODN base for this port, to be used together with LIODN offset
212                                                          (irrelevant for P4080 revision 1.0) */
213     uint32_t                    errFqid;            /**< Host-Command Port error queue Id. */
214     uint32_t                    confFqid;           /**< Host-Command Port confirmation queue Id. */
215     uint32_t                    qmChannel;          /**< QM channel dedicated to this Host-Command port;
216                                                          will be used by the FM for dequeue. */
217     t_FmPcdQmEnqueueCallback    *f_QmEnqueue;       /**< Callback routine for enqueuing a frame to the QM */
218     t_Handle                    h_QmArg;            /**< Application's handle passed to QM module on enqueue */
219 } t_FmPcdHcParams;
220 
221 /**************************************************************************//**
222  @Description   The main structure for PCD initialization
223  *//***************************************************************************/
224 typedef struct t_FmPcdParams {
225     bool                        prsSupport;             /**< TRUE if Parser will be used for any of the FM ports. */
226     bool                        ccSupport;              /**< TRUE if Coarse Classification will be used for any
227                                                              of the FM ports. */
228     bool                        kgSupport;              /**< TRUE if KeyGen will be used for any of the FM ports. */
229     bool                        plcrSupport;            /**< TRUE if Policer will be used for any of the FM ports. */
230     t_Handle                    h_Fm;                   /**< A handle to the FM module. */
231     uint8_t                     numOfSchemes;           /**< Number of schemes dedicated to this partition.
232                                                              this parameter is relevant if 'kgSupport'=TRUE. */
233     bool                        useHostCommand;         /**< Optional for single partition, Mandatory for Multi partition */
234     t_FmPcdHcParams             hc;                     /**< Host Command parameters, relevant only if 'useHostCommand'=TRUE;
235                                                              Relevant when FM not runs in "guest-mode". */
236 
237     t_FmPcdExceptionCallback    *f_Exception;           /**< Callback routine for general PCD exceptions;
238                                                              Relevant when FM not runs in "guest-mode". */
239     t_FmPcdIdExceptionCallback  *f_ExceptionId;         /**< Callback routine for specific KeyGen scheme or
240                                                              Policer profile exceptions;
241                                                              Relevant when FM not runs in "guest-mode". */
242     t_Handle                    h_App;                  /**< A handle to an application layer object; This handle will
243                                                              be passed by the driver upon calling the above callbacks;
244                                                              Relevant when FM not runs in "guest-mode". */
245     uint8_t                     partPlcrProfilesBase;   /**< The first policer-profile-id dedicated to this partition.
246                                                              this parameter is relevant if 'plcrSupport'=TRUE.
247                                                              NOTE: this parameter relevant only when working with multiple partitions. */
248     uint16_t                    partNumOfPlcrProfiles;  /**< Number of policer-profiles dedicated to this partition.
249                                                              this parameter is relevant if 'plcrSupport'=TRUE.
250                                                              NOTE: this parameter relevant only when working with multiple partitions. */
251 } t_FmPcdParams;
252 
253 
254 /**************************************************************************//**
255  @Function      FM_PCD_Config
256 
257  @Description   Basic configuration of the PCD module.
258                 Creates descriptor for the FM PCD module.
259 
260  @Param[in]     p_FmPcdParams    A structure of parameters for the initialization of PCD.
261 
262  @Return        A handle to the initialized module.
263 *//***************************************************************************/
264 t_Handle FM_PCD_Config(t_FmPcdParams *p_FmPcdParams);
265 
266 /**************************************************************************//**
267  @Function      FM_PCD_Init
268 
269  @Description   Initialization of the PCD module.
270 
271  @Param[in]     h_FmPcd - FM PCD module descriptor.
272 
273  @Return        E_OK on success; Error code otherwise.
274 *//***************************************************************************/
275 t_Error FM_PCD_Init(t_Handle h_FmPcd);
276 
277 /**************************************************************************//**
278  @Function      FM_PCD_Free
279 
280  @Description   Frees all resources that were assigned to FM module.
281 
282                 Calling this routine invalidates the descriptor.
283 
284  @Param[in]     h_FmPcd - FM PCD module descriptor.
285 
286  @Return        E_OK on success; Error code otherwise.
287 *//***************************************************************************/
288 t_Error FM_PCD_Free(t_Handle h_FmPcd);
289 
290 /**************************************************************************//**
291  @Group         FM_PCD_advanced_cfg_grp    FM PCD Advanced Configuration Unit
292 
293  @Description   Frame Manager PCD Advanced Configuration API.
294 
295  @{
296 *//***************************************************************************/
297 
298 /**************************************************************************//**
299  @Function      FM_PCD_ConfigException
300 
301  @Description   Calling this routine changes the internal driver data base
302                 from its default selection of exceptions enabling.
303                 [DEFAULT_numOfSharedPlcrProfiles].
304 
305  @Param[in]     h_FmPcd         FM PCD module descriptor.
306  @Param[in]     exception       The exception to be selected.
307  @Param[in]     enable          TRUE to enable interrupt, FALSE to mask it.
308 
309  @Return        E_OK on success; Error code otherwise.
310 
311  @Cautions      This routine should NOT be called from guest-partition
312                 (i.e. guestId != NCSW_MASTER_ID)
313 *//***************************************************************************/
314 t_Error FM_PCD_ConfigException(t_Handle h_FmPcd, e_FmPcdExceptions exception, bool enable);
315 
316 /**************************************************************************//**
317  @Function      FM_PCD_ConfigHcFramesDataMemory
318 
319  @Description   Configures memory-partition-id for FMan-Controller Host-Command
320                 frames. Calling this routine changes the internal driver data
321                 base from its default configuration [0].
322 
323  @Param[in]     h_FmPcd         FM PCD module descriptor.
324  @Param[in]     memId           Memory partition ID.
325 
326  @Return        E_OK on success; Error code otherwise.
327 
328  @Cautions      This routine may be called only if 'useHostCommand' was TRUE
329                 when FM_PCD_Config() routine was called.
330 *//***************************************************************************/
331 t_Error FM_PCD_ConfigHcFramesDataMemory(t_Handle h_FmPcd, uint8_t memId);
332 
333 /**************************************************************************//**
334  @Function      FM_PCD_ConfigPlcrNumOfSharedProfiles
335 
336  @Description   Calling this routine changes the internal driver data base
337                 from its default selection of exceptions enablement.
338                 [DEFAULT_numOfSharedPlcrProfiles].
339 
340  @Param[in]     h_FmPcd                     FM PCD module descriptor.
341  @Param[in]     numOfSharedPlcrProfiles     Number of profiles to
342                                             be shared between ports on this partition
343 
344  @Return        E_OK on success; Error code otherwise.
345 *//***************************************************************************/
346 t_Error FM_PCD_ConfigPlcrNumOfSharedProfiles(t_Handle h_FmPcd, uint16_t numOfSharedPlcrProfiles);
347 
348 /**************************************************************************//**
349  @Function      FM_PCD_ConfigPlcrAutoRefreshMode
350 
351  @Description   Calling this routine changes the internal driver data base
352                 from its default selection of exceptions enablement.
353                 By default auto-refresh is [DEFAULT_plcrAutoRefresh].
354 
355  @Param[in]     h_FmPcd         FM PCD module descriptor.
356  @Param[in]     enable          TRUE to enable, FALSE to disable
357 
358  @Return        E_OK on success; Error code otherwise.
359 
360  @Cautions      This routine should NOT be called from guest-partition
361                 (i.e. guestId != NCSW_MASTER_ID)
362 *//***************************************************************************/
363 t_Error FM_PCD_ConfigPlcrAutoRefreshMode(t_Handle h_FmPcd, bool enable);
364 
365 /**************************************************************************//**
366  @Function      FM_PCD_ConfigPrsMaxCycleLimit
367 
368  @Description   Calling this routine changes the internal data structure for
369                 the maximum parsing time from its default value
370                 [DEFAULT_MAX_PRS_CYC_LIM].
371 
372  @Param[in]     h_FmPcd         FM PCD module descriptor.
373  @Param[in]     value           0 to disable the mechanism, or new
374                                 maximum parsing time.
375 
376  @Return        E_OK on success; Error code otherwise.
377 
378  @Cautions      This routine should NOT be called from guest-partition
379                 (i.e. guestId != NCSW_MASTER_ID)
380 *//***************************************************************************/
381 t_Error FM_PCD_ConfigPrsMaxCycleLimit(t_Handle h_FmPcd,uint16_t value);
382 
383 /** @} */ /* end of FM_PCD_advanced_cfg_grp group */
384 /** @} */ /* end of FM_PCD_init_grp group */
385 
386 
387 /**************************************************************************//**
388  @Group         FM_PCD_Runtime_grp FM PCD Runtime Unit
389 
390  @Description   Frame Manager PCD Runtime Unit API
391 
392                 The runtime control allows creation of PCD infrastructure modules
393                 such as Network Environment Characteristics, Classification Plan
394                 Groups and Coarse Classification Trees.
395                 It also allows on-the-fly initialization, modification and removal
396                 of PCD modules such as KeyGen schemes, coarse classification nodes
397                 and Policer profiles.
398 
399                 In order to explain the programming model of the PCD driver interface
400                 a few terms should be explained, and will be used below.
401                   - Distinction Header - One of the 16 protocols supported by the FM parser,
402                     or one of the SHIM headers (1 or 2). May be a header with a special
403                     option (see below).
404                   - Interchangeable Headers Group - This is a group of Headers recognized
405                     by either one of them. For example, if in a specific context the user
406                     chooses to treat IPv4 and IPV6 in the same way, they may create an
407                     interchangeable Headers Unit consisting of these 2 headers.
408                   - A Distinction Unit - a Distinction Header or an Interchangeable Headers
409                     Group.
410                   - Header with special option - applies to Ethernet, MPLS, VLAN, IPv4 and
411                     IPv6, includes multicast, broadcast and other protocol specific options.
412                     In terms of hardware it relates to the options available in the classification
413                     plan.
414                   - Network Environment Characteristics - a set of Distinction Units that define
415                     the total recognizable header selection for a certain environment. This is
416                     NOT the list of all headers that will ever appear in a flow, but rather
417                     everything that needs distinction in a flow, where distinction is made by KeyGen
418                     schemes and coarse classification action descriptors.
419 
420                 The PCD runtime modules initialization is done in stages. The first stage after
421                 initializing the PCD module itself is to establish a Network Flows Environment
422                 Definition. The application may choose to establish one or more such environments.
423                 Later, when needed, the application will have to state, for some of its modules,
424                 to which single environment it belongs.
425 
426  @{
427 *//***************************************************************************/
428 
429 /**************************************************************************//**
430  @Description   A structure for SW parser labels
431  *//***************************************************************************/
432 typedef struct t_FmPcdPrsLabelParams {
433     uint32_t                instructionOffset;              /**< SW parser label instruction offset (2 bytes
434                                                                  resolution), relative to Parser RAM. */
435     e_NetHeaderType         hdr;                            /**< The existence of this header will invoke
436                                                                  the SW parser code; Use  HEADER_TYPE_NONE
437                                                                  to indicate that sw parser is to run
438                                                                  independent of the existence of any protocol
439                                                                  (run before HW parser). */
440     uint8_t                 indexPerHdr;                    /**< Normally 0, if more than one SW parser
441                                                                  attachments for the same header, use this
442                                                                  index to distinguish between them. */
443 } t_FmPcdPrsLabelParams;
444 
445 /**************************************************************************//**
446  @Description   A structure for SW parser
447  *//***************************************************************************/
448 typedef struct t_FmPcdPrsSwParams {
449     bool                    override;                   /**< FALSE to invoke a check that nothing else
450                                                              was loaded to this address, including
451                                                              internal patches.
452                                                              TRUE to override any existing code.*/
453     uint32_t                size;                       /**< SW parser code size */
454     uint16_t                base;                       /**< SW parser base (in instruction counts!
455                                                              must be larger than 0x20)*/
456     uint8_t                 *p_Code;                    /**< SW parser code */
457     uint32_t                swPrsDataParams[FM_PCD_PRS_NUM_OF_HDRS];
458                                                         /**< SW parser data (parameters) */
459     uint8_t                 numOfLabels;                /**< Number of labels for SW parser. */
460     t_FmPcdPrsLabelParams   labelsTable[FM_PCD_PRS_NUM_OF_LABELS];
461                                                         /**< SW parser labels table, containing
462                                                              numOfLabels entries */
463 } t_FmPcdPrsSwParams;
464 
465 
466 /**************************************************************************//**
467  @Function      FM_PCD_Enable
468 
469  @Description   This routine should be called after PCD is initialized for enabling all
470                 PCD engines according to their existing configuration.
471 
472  @Param[in]     h_FmPcd         FM PCD module descriptor.
473 
474  @Return        E_OK on success; Error code otherwise.
475 
476  @Cautions      Allowed only following FM_PCD_Init() and when PCD is disabled.
477 *//***************************************************************************/
478 t_Error FM_PCD_Enable(t_Handle h_FmPcd);
479 
480 /**************************************************************************//**
481  @Function      FM_PCD_Disable
482 
483  @Description   This routine may be called when PCD is enabled in order to
484                 disable all PCD engines. It may be called
485                 only when none of the ports in the system are using the PCD.
486 
487  @Param[in]     h_FmPcd         FM PCD module descriptor.
488 
489  @Return        E_OK on success; Error code otherwise.
490 
491  @Cautions      Allowed only following FM_PCD_Init() and when PCD is enabled.
492 *//***************************************************************************/
493 t_Error FM_PCD_Disable(t_Handle h_FmPcd);
494 
495 /**************************************************************************//**
496  @Function      FM_PCD_GetCounter
497 
498  @Description   Reads one of the FM PCD counters.
499 
500  @Param[in]     h_FmPcd     FM PCD module descriptor.
501  @Param[in]     counter     The requested counter.
502 
503  @Return        Counter's current value.
504 
505  @Cautions      Allowed only following FM_PCD_Init().
506                 Note that it is user's responsibility to call this routine only
507                 for enabled counters, and there will be no indication if a
508                 disabled counter is accessed.
509 *//***************************************************************************/
510 uint32_t FM_PCD_GetCounter(t_Handle h_FmPcd, e_FmPcdCounters counter);
511 
512 /**************************************************************************//**
513 @Function       FM_PCD_PrsLoadSw
514 
515 @Description    This routine may be called in order to load software parsing code.
516 
517 
518 @Param[in]      h_FmPcd        FM PCD module descriptor.
519 @Param[in]      p_SwPrs        A pointer to a structure of software
520                                parser parameters, including the software
521                                parser image.
522 
523 @Return         E_OK on success; Error code otherwise.
524 
525 @Cautions       Allowed only following FM_PCD_Init() and when PCD is disabled.
526                 This routine should NOT be called from guest-partition
527                 (i.e. guestId != NCSW_MASTER_ID)
528 *//***************************************************************************/
529 t_Error FM_PCD_PrsLoadSw(t_Handle h_FmPcd, t_FmPcdPrsSwParams *p_SwPrs);
530 
531 /**************************************************************************//**
532 @Function      FM_PCD_SetAdvancedOffloadSupport
533 
534 @Description   This routine must be called in order to support the following features:
535                IP-fragmentation, IP-reassembly, IPsec, Header-manipulation, frame-replicator.
536 
537 @Param[in]     h_FmPcd         FM PCD module descriptor.
538 
539 @Return        E_OK on success; Error code otherwise.
540 
541 @Cautions      Allowed only following FM_PCD_Init() and when PCD is disabled.
542                This routine should NOT be called from guest-partition
543                (i.e. guestId != NCSW_MASTER_ID)
544 *//***************************************************************************/
545 t_Error FM_PCD_SetAdvancedOffloadSupport(t_Handle h_FmPcd);
546 
547 /**************************************************************************//**
548  @Function      FM_PCD_KgSetDfltValue
549 
550  @Description   Calling this routine sets a global default value to be used
551                 by the KeyGen when parser does not recognize a required
552                 field/header.
553                 By default default values are 0.
554 
555  @Param[in]     h_FmPcd         FM PCD module descriptor.
556  @Param[in]     valueId         0,1 - one of 2 global default values.
557  @Param[in]     value           The requested default value.
558 
559  @Return        E_OK on success; Error code otherwise.
560 
561  @Cautions      Allowed only following FM_PCD_Init() and when PCD is disabled.
562                 This routine should NOT be called from guest-partition
563                 (i.e. guestId != NCSW_MASTER_ID)
564 *//***************************************************************************/
565 t_Error FM_PCD_KgSetDfltValue(t_Handle h_FmPcd, uint8_t valueId, uint32_t value);
566 
567 /**************************************************************************//**
568  @Function      FM_PCD_KgSetAdditionalDataAfterParsing
569 
570  @Description   Calling this routine allows the KeyGen to access data past
571                 the parser finishing point.
572 
573  @Param[in]     h_FmPcd         FM PCD module descriptor.
574  @Param[in]     payloadOffset   the number of bytes beyond the parser location.
575 
576  @Return        E_OK on success; Error code otherwise.
577 
578  @Cautions      Allowed only following FM_PCD_Init() and when PCD is disabled.
579                 This routine should NOT be called from guest-partition
580                 (i.e. guestId != NCSW_MASTER_ID)
581 *//***************************************************************************/
582 t_Error FM_PCD_KgSetAdditionalDataAfterParsing(t_Handle h_FmPcd, uint8_t payloadOffset);
583 
584 /**************************************************************************//**
585  @Function      FM_PCD_SetException
586 
587  @Description   Calling this routine enables/disables PCD interrupts.
588 
589  @Param[in]     h_FmPcd         FM PCD module descriptor.
590  @Param[in]     exception       The exception to be selected.
591  @Param[in]     enable          TRUE to enable interrupt, FALSE to mask it.
592 
593  @Return        E_OK on success; Error code otherwise.
594 
595  @Cautions      Allowed only following FM_PCD_Init().
596                 This routine should NOT be called from guest-partition
597                 (i.e. guestId != NCSW_MASTER_ID)
598 *//***************************************************************************/
599 t_Error FM_PCD_SetException(t_Handle h_FmPcd, e_FmPcdExceptions exception, bool enable);
600 
601 /**************************************************************************//**
602  @Function      FM_PCD_ModifyCounter
603 
604  @Description   Sets a value to an enabled counter. Use "0" to reset the counter.
605 
606  @Param[in]     h_FmPcd     FM PCD module descriptor.
607  @Param[in]     counter     The requested counter.
608  @Param[in]     value       The requested value to be written into the counter.
609 
610  @Return        E_OK on success; Error code otherwise.
611 
612  @Cautions      Allowed only following FM_PCD_Init().
613                 This routine should NOT be called from guest-partition
614                 (i.e. guestId != NCSW_MASTER_ID)
615 *//***************************************************************************/
616 t_Error FM_PCD_ModifyCounter(t_Handle h_FmPcd, e_FmPcdCounters counter, uint32_t value);
617 
618 /**************************************************************************//**
619  @Function      FM_PCD_SetPlcrStatistics
620 
621  @Description   This routine may be used to enable/disable policer statistics
622                 counter. By default the statistics is enabled.
623 
624  @Param[in]     h_FmPcd         FM PCD module descriptor
625  @Param[in]     enable          TRUE to enable, FALSE to disable.
626 
627  @Return        E_OK on success; Error code otherwise.
628 
629  @Cautions      Allowed only following FM_PCD_Init().
630                 This routine should NOT be called from guest-partition
631                 (i.e. guestId != NCSW_MASTER_ID)
632 *//***************************************************************************/
633 t_Error FM_PCD_SetPlcrStatistics(t_Handle h_FmPcd, bool enable);
634 
635 /**************************************************************************//**
636  @Function      FM_PCD_SetPrsStatistics
637 
638  @Description   Defines whether to gather parser statistics including all ports.
639 
640  @Param[in]     h_FmPcd     FM PCD module descriptor.
641  @Param[in]     enable      TRUE to enable, FALSE to disable.
642 
643  @Return        None
644 
645  @Cautions      Allowed only following FM_PCD_Init().
646                 This routine should NOT be called from guest-partition
647                 (i.e. guestId != NCSW_MASTER_ID)
648 *//***************************************************************************/
649 void FM_PCD_SetPrsStatistics(t_Handle h_FmPcd, bool enable);
650 
651 /**************************************************************************//**
652  @Function      FM_PCD_HcTxConf
653 
654  @Description   This routine should be called to confirm frames that were
655                  received on the HC confirmation queue.
656 
657  @Param[in]     h_FmPcd         A handle to an FM PCD Module.
658  @Param[in]     p_Fd            Frame descriptor of the received frame.
659 
660  @Cautions      Allowed only following FM_PCD_Init(). Allowed only if 'useHostCommand'
661                 option was selected in the initialization.
662 *//***************************************************************************/
663 void FM_PCD_HcTxConf(t_Handle h_FmPcd, t_DpaaFD *p_Fd);
664 
665 /**************************************************************************//*
666  @Function      FM_PCD_ForceIntr
667 
668  @Description   Causes an interrupt event on the requested source.
669 
670  @Param[in]     h_FmPcd     FM PCD module descriptor.
671  @Param[in]     exception       An exception to be forced.
672 
673  @Return        E_OK on success; Error code if the exception is not enabled,
674                 or is not able to create interrupt.
675 
676  @Cautions      Allowed only following FM_PCD_Init().
677                 This routine should NOT be called from guest-partition
678                 (i.e. guestId != NCSW_MASTER_ID)
679 *//***************************************************************************/
680 t_Error FM_PCD_ForceIntr (t_Handle h_FmPcd, e_FmPcdExceptions exception);
681 
682 #if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
683 /**************************************************************************//**
684  @Function      FM_PCD_DumpRegs
685 
686  @Description   Dumps all PCD registers
687 
688  @Param[in]     h_FmPcd         A handle to an FM PCD Module.
689 
690  @Return        E_OK on success; Error code otherwise.
691 
692  @Cautions      Allowed only following FM_PCD_Init().
693                 NOTE: this routine may be called only for FM in master mode
694                 (i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers
695                 are mapped.
696 *//***************************************************************************/
697 t_Error FM_PCD_DumpRegs(t_Handle h_FmPcd);
698 
699 /**************************************************************************//**
700  @Function      FM_PCD_KgDumpRegs
701 
702  @Description   Dumps all PCD KG registers
703 
704  @Param[in]     h_FmPcd         A handle to an FM PCD Module.
705 
706  @Return        E_OK on success; Error code otherwise.
707 
708  @Cautions      Allowed only following FM_PCD_Init().
709                 NOTE: this routine may be called only for FM in master mode
710                 (i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers
711                 are mapped.
712 *//***************************************************************************/
713 t_Error FM_PCD_KgDumpRegs(t_Handle h_FmPcd);
714 
715 /**************************************************************************//**
716  @Function      FM_PCD_PlcrDumpRegs
717 
718  @Description   Dumps all PCD Policer registers
719 
720  @Param[in]     h_FmPcd         A handle to an FM PCD Module.
721 
722  @Return        E_OK on success; Error code otherwise.
723 
724  @Cautions      Allowed only following FM_PCD_Init().
725                 NOTE: this routine may be called only for FM in master mode
726                 (i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers
727                 are mapped.
728 *//***************************************************************************/
729 t_Error FM_PCD_PlcrDumpRegs(t_Handle h_FmPcd);
730 
731 /**************************************************************************//**
732  @Function      FM_PCD_PlcrProfileDumpRegs
733 
734  @Description   Dumps all PCD Policer profile registers
735 
736  @Param[in]     h_Profile       A handle to a Policer profile.
737 
738  @Return        E_OK on success; Error code otherwise.
739 
740  @Cautions      Allowed only following FM_PCD_Init().
741                 NOTE: this routine may be called only for FM in master mode
742                 (i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers
743                 are mapped.
744 *//***************************************************************************/
745 t_Error FM_PCD_PlcrProfileDumpRegs(t_Handle h_Profile);
746 
747 /**************************************************************************//**
748  @Function      FM_PCD_PrsDumpRegs
749 
750  @Description   Dumps all PCD Parser registers
751 
752  @Param[in]     h_FmPcd         A handle to an FM PCD Module.
753 
754  @Return        E_OK on success; Error code otherwise.
755 
756  @Cautions      Allowed only following FM_PCD_Init().
757                 NOTE: this routine may be called only for FM in master mode
758                 (i.e. 'guestId'=NCSW_MASTER_ID) or in a case that the registers
759                 are mapped.
760 *//***************************************************************************/
761 t_Error FM_PCD_PrsDumpRegs(t_Handle h_FmPcd);
762 
763 /**************************************************************************//**
764  @Function      FM_PCD_HcDumpRegs
765 
766  @Description   Dumps HC Port registers
767 
768  @Param[in]     h_FmPcd         A handle to an FM PCD Module.
769 
770  @Return        E_OK on success; Error code otherwise.
771 
772  @Cautions      Allowed only following FM_PCD_Init().
773                 NOTE: this routine may be called only for FM in master mode
774                 (i.e. 'guestId'=NCSW_MASTER_ID).
775 *//***************************************************************************/
776 t_Error     FM_PCD_HcDumpRegs(t_Handle h_FmPcd);
777 #endif /* (defined(DEBUG_ERRORS) && ... */
778 
779 
780 
781 /**************************************************************************//**
782  KeyGen         FM_PCD_Runtime_build_grp FM PCD Runtime Building Unit
783 
784  @Description   Frame Manager PCD Runtime Building API
785 
786                 This group contains routines for setting, deleting and modifying
787                 PCD resources, for defining the total PCD tree.
788  @{
789 *//***************************************************************************/
790 
791 /**************************************************************************//**
792  @Collection    Definitions of coarse classification
793                 parameters as required by KeyGen (when coarse classification
794                 is the next engine after this scheme).
795 *//***************************************************************************/
796 #define FM_PCD_MAX_NUM_OF_CC_TREES              8
797 #define FM_PCD_MAX_NUM_OF_CC_GROUPS             16
798 #define FM_PCD_MAX_NUM_OF_CC_UNITS              4
799 #define FM_PCD_MAX_NUM_OF_KEYS                  256
800 #define FM_PCD_MAX_NUM_OF_FLOWS                 (4*KILOBYTE)
801 #define FM_PCD_MAX_SIZE_OF_KEY                  56
802 #define FM_PCD_MAX_NUM_OF_CC_ENTRIES_IN_GRP     16
803 #define FM_PCD_LAST_KEY_INDEX                   0xffff
804 
805 #define FM_PCD_MAX_NUM_OF_CC_NODES              255 /* Obsolete, not used - will be removed in the future */
806 /* @} */
807 
808 /**************************************************************************//**
809  @Collection    A set of definitions to allow protocol
810                 special option description.
811 *//***************************************************************************/
812 typedef uint32_t        protocolOpt_t;          /**< A general type to define a protocol option. */
813 
814 typedef protocolOpt_t   ethProtocolOpt_t;       /**< Ethernet protocol options. */
815 #define ETH_BROADCAST               0x80000000  /**< Ethernet Broadcast. */
816 #define ETH_MULTICAST               0x40000000  /**< Ethernet Multicast. */
817 
818 typedef protocolOpt_t   vlanProtocolOpt_t;      /**< VLAN protocol options. */
819 #define VLAN_STACKED                0x20000000  /**< Stacked VLAN. */
820 
821 typedef protocolOpt_t   mplsProtocolOpt_t;      /**< MPLS protocol options. */
822 #define MPLS_STACKED                0x10000000  /**< Stacked MPLS. */
823 
824 typedef protocolOpt_t   ipv4ProtocolOpt_t;      /**< IPv4 protocol options. */
825 #define IPV4_BROADCAST_1            0x08000000  /**< IPv4 Broadcast. */
826 #define IPV4_MULTICAST_1            0x04000000  /**< IPv4 Multicast. */
827 #define IPV4_UNICAST_2              0x02000000  /**< Tunneled IPv4 - Unicast. */
828 #define IPV4_MULTICAST_BROADCAST_2  0x01000000  /**< Tunneled IPv4 - Broadcast/Multicast. */
829 
830 #define IPV4_FRAG_1                 0x00000008  /**< IPV4 reassembly option.
831                                                      IPV4 Reassembly manipulation requires network
832                                                      environment with IPV4 header and IPV4_FRAG_1 option  */
833 
834 typedef protocolOpt_t   ipv6ProtocolOpt_t;      /**< IPv6 protocol options. */
835 #define IPV6_MULTICAST_1            0x00800000  /**< IPv6 Multicast. */
836 #define IPV6_UNICAST_2              0x00400000  /**< Tunneled IPv6 - Unicast. */
837 #define IPV6_MULTICAST_2            0x00200000  /**< Tunneled IPv6 - Multicast. */
838 
839 #define IPV6_FRAG_1                 0x00000004  /**< IPV6 reassembly option.
840                                                      IPV6 Reassembly manipulation requires network
841                                                      environment with IPV6 header and IPV6_FRAG_1 option;
842                                                      in case where fragment found, the fragment-extension offset
843                                                      may be found at 'shim2' (in parser-result). */
844 #if (DPAA_VERSION >= 11)
845 typedef protocolOpt_t   capwapProtocolOpt_t;      /**< CAPWAP protocol options. */
846 #define CAPWAP_FRAG_1               0x00000008  /**< CAPWAP reassembly option.
847                                                      CAPWAP Reassembly manipulation requires network
848                                                      environment with CAPWAP header and CAPWAP_FRAG_1 option;
849                                                      in case where fragment found, the fragment-extension offset
850                                                      may be found at 'shim2' (in parser-result). */
851 #endif /* (DPAA_VERSION >= 11) */
852 
853 
854 /* @} */
855 
856 #define FM_PCD_MANIP_MAX_HDR_SIZE               256
857 #define FM_PCD_MANIP_DSCP_TO_VLAN_TRANS         64
858 
859 /**************************************************************************//**
860  @Collection    A set of definitions to support Header Manipulation selection.
861 *//***************************************************************************/
862 typedef uint32_t                hdrManipFlags_t;            /**< A general type to define a HMan update command flags. */
863 
864 typedef hdrManipFlags_t         ipv4HdrManipUpdateFlags_t;  /**< IPv4 protocol HMan update command flags. */
865 
866 #define HDR_MANIP_IPV4_TOS      0x80000000                  /**< update TOS with the given value ('tos' field
867                                                                  of t_FmPcdManipHdrFieldUpdateIpv4) */
868 #define HDR_MANIP_IPV4_ID       0x40000000                  /**< update IP ID with the given value ('id' field
869                                                                  of t_FmPcdManipHdrFieldUpdateIpv4) */
870 #define HDR_MANIP_IPV4_TTL      0x20000000                  /**< Decrement TTL by 1 */
871 #define HDR_MANIP_IPV4_SRC      0x10000000                  /**< update IP source address with the given value
872                                                                  ('src' field of t_FmPcdManipHdrFieldUpdateIpv4) */
873 #define HDR_MANIP_IPV4_DST      0x08000000                  /**< update IP destination address with the given value
874                                                                  ('dst' field of t_FmPcdManipHdrFieldUpdateIpv4) */
875 
876 typedef hdrManipFlags_t         ipv6HdrManipUpdateFlags_t;  /**< IPv6 protocol HMan update command flags. */
877 
878 #define HDR_MANIP_IPV6_TC       0x80000000                  /**< update Traffic Class address with the given value
879                                                                  ('trafficClass' field of t_FmPcdManipHdrFieldUpdateIpv6) */
880 #define HDR_MANIP_IPV6_HL       0x40000000                  /**< Decrement Hop Limit by 1 */
881 #define HDR_MANIP_IPV6_SRC      0x20000000                  /**< update IP source address with the given value
882                                                                  ('src' field of t_FmPcdManipHdrFieldUpdateIpv6) */
883 #define HDR_MANIP_IPV6_DST      0x10000000                  /**< update IP destination address with the given value
884                                                                  ('dst' field of t_FmPcdManipHdrFieldUpdateIpv6) */
885 
886 typedef hdrManipFlags_t         tcpUdpHdrManipUpdateFlags_t;/**< TCP/UDP protocol HMan update command flags. */
887 
888 #define HDR_MANIP_TCP_UDP_SRC       0x80000000              /**< update TCP/UDP source address with the given value
889                                                                  ('src' field of t_FmPcdManipHdrFieldUpdateTcpUdp) */
890 #define HDR_MANIP_TCP_UDP_DST       0x40000000              /**< update TCP/UDP destination address with the given value
891                                                                  ('dst' field of t_FmPcdManipHdrFieldUpdateTcpUdp) */
892 #define HDR_MANIP_TCP_UDP_CHECKSUM  0x20000000             /**< update TCP/UDP checksum */
893 
894 /* @} */
895 
896 /**************************************************************************//**
897  @Description   A type used for returning the order of the key extraction.
898                 each value in this array represents the index of the extraction
899                 command as defined by the user in the initialization extraction array.
900                 The valid size of this array is the user define number of extractions
901                 required (also marked by the second '0' in this array).
902 *//***************************************************************************/
903 typedef    uint8_t    t_FmPcdKgKeyOrder [FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY];
904 
905 /**************************************************************************//**
906  @Description   All PCD engines
907 *//***************************************************************************/
908 typedef enum e_FmPcdEngine {
909     e_FM_PCD_INVALID = 0,   /**< Invalid PCD engine */
910     e_FM_PCD_DONE,          /**< No PCD Engine indicated */
911     e_FM_PCD_KG,            /**< KeyGen */
912     e_FM_PCD_CC,            /**< Coarse classifier */
913     e_FM_PCD_PLCR,          /**< Policer */
914     e_FM_PCD_PRS,           /**< Parser */
915 #if (DPAA_VERSION >= 11)
916     e_FM_PCD_FR,            /**< Frame-Replicator */
917 #endif /* (DPAA_VERSION >= 11) */
918     e_FM_PCD_HASH           /**< Hash table */
919 } e_FmPcdEngine;
920 
921 /**************************************************************************//**
922  @Description   Enumeration type for selecting extraction by header types
923 *//***************************************************************************/
924 typedef enum e_FmPcdExtractByHdrType {
925     e_FM_PCD_EXTRACT_FROM_HDR,      /**< Extract bytes from header */
926     e_FM_PCD_EXTRACT_FROM_FIELD,    /**< Extract bytes from header field */
927     e_FM_PCD_EXTRACT_FULL_FIELD     /**< Extract a full field */
928 } e_FmPcdExtractByHdrType;
929 
930 /**************************************************************************//**
931  @Description   Enumeration type for selecting extraction source
932                 (when it is not the header)
933 *//***************************************************************************/
934 typedef enum e_FmPcdExtractFrom {
935     e_FM_PCD_EXTRACT_FROM_FRAME_START,          /**< KG & CC: Extract from beginning of frame */
936     e_FM_PCD_EXTRACT_FROM_DFLT_VALUE,           /**< KG only: Extract from a default value */
937     e_FM_PCD_EXTRACT_FROM_CURR_END_OF_PARSE,    /**< KG & CC: Extract from the point where parsing had finished */
938     e_FM_PCD_EXTRACT_FROM_KEY,                  /**< CC only: Field where saved KEY */
939     e_FM_PCD_EXTRACT_FROM_HASH,                 /**< CC only: Field where saved HASH */
940     e_FM_PCD_EXTRACT_FROM_PARSE_RESULT,         /**< KG only: Extract from the parser result */
941     e_FM_PCD_EXTRACT_FROM_ENQ_FQID,             /**< KG & CC: Extract from enqueue FQID */
942     e_FM_PCD_EXTRACT_FROM_FLOW_ID               /**< CC only: Field where saved Dequeue FQID */
943 } e_FmPcdExtractFrom;
944 
945 /**************************************************************************//**
946  @Description   Enumeration type for selecting extraction type
947 *//***************************************************************************/
948 typedef enum e_FmPcdExtractType {
949     e_FM_PCD_EXTRACT_BY_HDR,                /**< Extract according to header */
950     e_FM_PCD_EXTRACT_NON_HDR,               /**< Extract from data that is not the header */
951     e_FM_PCD_KG_EXTRACT_PORT_PRIVATE_INFO   /**< Extract private info as specified by user */
952 } e_FmPcdExtractType;
953 
954 /**************************************************************************//**
955  @Description   Enumeration type for selecting default extraction value
956 *//***************************************************************************/
957 typedef enum e_FmPcdKgExtractDfltSelect {
958     e_FM_PCD_KG_DFLT_GBL_0,          /**< Default selection is KG register 0 */
959     e_FM_PCD_KG_DFLT_GBL_1,          /**< Default selection is KG register 1 */
960     e_FM_PCD_KG_DFLT_PRIVATE_0,      /**< Default selection is a per scheme register 0 */
961     e_FM_PCD_KG_DFLT_PRIVATE_1,      /**< Default selection is a per scheme register 1 */
962     e_FM_PCD_KG_DFLT_ILLEGAL         /**< Illegal selection */
963 } e_FmPcdKgExtractDfltSelect;
964 
965 /**************************************************************************//**
966  @Description   Enumeration type defining all default groups - each group shares
967                 a default value, one of four user-initialized values.
968 *//***************************************************************************/
969 typedef enum e_FmPcdKgKnownFieldsDfltTypes {
970     e_FM_PCD_KG_MAC_ADDR,               /**< MAC Address */
971     e_FM_PCD_KG_TCI,                    /**< TCI field */
972     e_FM_PCD_KG_ENET_TYPE,              /**< ENET Type */
973     e_FM_PCD_KG_PPP_SESSION_ID,         /**< PPP Session id */
974     e_FM_PCD_KG_PPP_PROTOCOL_ID,        /**< PPP Protocol id */
975     e_FM_PCD_KG_MPLS_LABEL,             /**< MPLS label */
976     e_FM_PCD_KG_IP_ADDR,                /**< IP address */
977     e_FM_PCD_KG_PROTOCOL_TYPE,          /**< Protocol type */
978     e_FM_PCD_KG_IP_TOS_TC,              /**< TOS or TC */
979     e_FM_PCD_KG_IPV6_FLOW_LABEL,        /**< IPV6 flow label */
980     e_FM_PCD_KG_IPSEC_SPI,              /**< IPSEC SPI */
981     e_FM_PCD_KG_L4_PORT,                /**< L4 Port */
982     e_FM_PCD_KG_TCP_FLAG,               /**< TCP Flag */
983     e_FM_PCD_KG_GENERIC_FROM_DATA,      /**< grouping implemented by SW,
984                                              any data extraction that is not the full
985                                              field described above  */
986     e_FM_PCD_KG_GENERIC_FROM_DATA_NO_V, /**< grouping implemented by SW,
987                                              any data extraction without validation */
988     e_FM_PCD_KG_GENERIC_NOT_FROM_DATA   /**< grouping implemented by SW,
989                                              extraction from parser result or
990                                              direct use of default value  */
991 } e_FmPcdKgKnownFieldsDfltTypes;
992 
993 /**************************************************************************//**
994  @Description   Enumeration type for defining header index for scenarios with
995                 multiple (tunneled) headers
996 *//***************************************************************************/
997 typedef enum e_FmPcdHdrIndex {
998     e_FM_PCD_HDR_INDEX_NONE = 0,        /**< used when multiple headers not used, also
999                                              to specify regular IP (not tunneled). */
1000     e_FM_PCD_HDR_INDEX_1,               /**< may be used for VLAN, MPLS, tunneled IP */
1001     e_FM_PCD_HDR_INDEX_2,               /**< may be used for MPLS, tunneled IP */
1002     e_FM_PCD_HDR_INDEX_3,               /**< may be used for MPLS */
1003     e_FM_PCD_HDR_INDEX_LAST = 0xFF      /**< may be used for VLAN, MPLS */
1004 } e_FmPcdHdrIndex;
1005 
1006 /**************************************************************************//**
1007  @Description   Enumeration type for selecting the policer profile functional type
1008 *//***************************************************************************/
1009 typedef enum e_FmPcdProfileTypeSelection {
1010     e_FM_PCD_PLCR_PORT_PRIVATE,         /**< Port dedicated profile */
1011     e_FM_PCD_PLCR_SHARED                /**< Shared profile (shared within partition) */
1012 } e_FmPcdProfileTypeSelection;
1013 
1014 /**************************************************************************//**
1015  @Description   Enumeration type for selecting the policer profile algorithm
1016 *//***************************************************************************/
1017 typedef enum e_FmPcdPlcrAlgorithmSelection {
1018     e_FM_PCD_PLCR_PASS_THROUGH,         /**< Policer pass through */
1019     e_FM_PCD_PLCR_RFC_2698,             /**< Policer algorithm RFC 2698 */
1020     e_FM_PCD_PLCR_RFC_4115              /**< Policer algorithm RFC 4115 */
1021 } e_FmPcdPlcrAlgorithmSelection;
1022 
1023 /**************************************************************************//**
1024  @Description   Enumeration type for selecting a policer profile color mode
1025 *//***************************************************************************/
1026 typedef enum e_FmPcdPlcrColorMode {
1027     e_FM_PCD_PLCR_COLOR_BLIND,          /**< Color blind */
1028     e_FM_PCD_PLCR_COLOR_AWARE           /**< Color aware */
1029 } e_FmPcdPlcrColorMode;
1030 
1031 /**************************************************************************//**
1032  @Description   Enumeration type for selecting a policer profile color
1033 *//***************************************************************************/
1034 typedef enum e_FmPcdPlcrColor {
1035     e_FM_PCD_PLCR_GREEN,                /**< Green color code */
1036     e_FM_PCD_PLCR_YELLOW,               /**< Yellow color code */
1037     e_FM_PCD_PLCR_RED,                  /**< Red color code */
1038     e_FM_PCD_PLCR_OVERRIDE              /**< Color override code */
1039 } e_FmPcdPlcrColor;
1040 
1041 /**************************************************************************//**
1042  @Description   Enumeration type for selecting the policer profile packet frame length selector
1043 *//***************************************************************************/
1044 typedef enum e_FmPcdPlcrFrameLengthSelect {
1045   e_FM_PCD_PLCR_L2_FRM_LEN,             /**< L2 frame length */
1046   e_FM_PCD_PLCR_L3_FRM_LEN,             /**< L3 frame length */
1047   e_FM_PCD_PLCR_L4_FRM_LEN,             /**< L4 frame length */
1048   e_FM_PCD_PLCR_FULL_FRM_LEN            /**< Full frame length */
1049 } e_FmPcdPlcrFrameLengthSelect;
1050 
1051 /**************************************************************************//**
1052  @Description   Enumeration type for selecting roll-back frame
1053 *//***************************************************************************/
1054 typedef enum e_FmPcdPlcrRollBackFrameSelect {
1055   e_FM_PCD_PLCR_ROLLBACK_L2_FRM_LEN,    /**< Roll-back L2 frame length */
1056   e_FM_PCD_PLCR_ROLLBACK_FULL_FRM_LEN   /**< Roll-back Full frame length */
1057 } e_FmPcdPlcrRollBackFrameSelect;
1058 
1059 /**************************************************************************//**
1060  @Description   Enumeration type for selecting the policer profile packet or byte mode
1061 *//***************************************************************************/
1062 typedef enum e_FmPcdPlcrRateMode {
1063     e_FM_PCD_PLCR_BYTE_MODE,            /**< Byte mode */
1064     e_FM_PCD_PLCR_PACKET_MODE           /**< Packet mode */
1065 } e_FmPcdPlcrRateMode;
1066 
1067 /**************************************************************************//**
1068  @Description   Enumeration type for defining action of frame
1069 *//***************************************************************************/
1070 typedef enum e_FmPcdDoneAction {
1071     e_FM_PCD_ENQ_FRAME = 0,        /**< Enqueue frame */
1072     e_FM_PCD_DROP_FRAME            /**< Mark this frame as error frame and continue
1073                                         to error flow; 'FM_PORT_FRM_ERR_CLS_DISCARD'
1074                                         flag will be set for this frame. */
1075 } e_FmPcdDoneAction;
1076 
1077 /**************************************************************************//**
1078  @Description   Enumeration type for selecting the policer counter
1079 *//***************************************************************************/
1080 typedef enum e_FmPcdPlcrProfileCounters {
1081     e_FM_PCD_PLCR_PROFILE_GREEN_PACKET_TOTAL_COUNTER,               /**< Green packets counter */
1082     e_FM_PCD_PLCR_PROFILE_YELLOW_PACKET_TOTAL_COUNTER,              /**< Yellow packets counter */
1083     e_FM_PCD_PLCR_PROFILE_RED_PACKET_TOTAL_COUNTER,                 /**< Red packets counter */
1084     e_FM_PCD_PLCR_PROFILE_RECOLOURED_YELLOW_PACKET_TOTAL_COUNTER,   /**< Recolored yellow packets counter */
1085     e_FM_PCD_PLCR_PROFILE_RECOLOURED_RED_PACKET_TOTAL_COUNTER       /**< Recolored red packets counter */
1086 } e_FmPcdPlcrProfileCounters;
1087 
1088 /**************************************************************************//**
1089  @Description   Enumeration type for selecting the PCD action after extraction
1090 *//***************************************************************************/
1091 typedef enum e_FmPcdAction {
1092     e_FM_PCD_ACTION_NONE,                           /**< NONE  */
1093     e_FM_PCD_ACTION_EXACT_MATCH,                    /**< Exact match on the selected extraction */
1094     e_FM_PCD_ACTION_INDEXED_LOOKUP                  /**< Indexed lookup on the selected extraction */
1095 } e_FmPcdAction;
1096 
1097 /**************************************************************************//**
1098  @Description   Enumeration type for selecting type of insert manipulation
1099 *//***************************************************************************/
1100 typedef enum e_FmPcdManipHdrInsrtType {
1101     e_FM_PCD_MANIP_INSRT_GENERIC,                   /**< Insert according to offset & size */
1102     e_FM_PCD_MANIP_INSRT_BY_HDR,                    /**< Insert according to protocol */
1103 #if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
1104     e_FM_PCD_MANIP_INSRT_BY_TEMPLATE                /**< Insert template to start of frame */
1105 #endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */
1106 } e_FmPcdManipHdrInsrtType;
1107 
1108 /**************************************************************************//**
1109  @Description   Enumeration type for selecting type of remove manipulation
1110 *//***************************************************************************/
1111 typedef enum e_FmPcdManipHdrRmvType {
1112     e_FM_PCD_MANIP_RMV_GENERIC,                     /**< Remove according to offset & size */
1113     e_FM_PCD_MANIP_RMV_BY_HDR                       /**< Remove according to offset & size */
1114 } e_FmPcdManipHdrRmvType;
1115 
1116 /**************************************************************************//**
1117  @Description   Enumeration type for selecting specific L2 fields removal
1118 *//***************************************************************************/
1119 typedef enum e_FmPcdManipHdrRmvSpecificL2 {
1120     e_FM_PCD_MANIP_HDR_RMV_ETHERNET,                /**< Ethernet/802.3 MAC */
1121     e_FM_PCD_MANIP_HDR_RMV_STACKED_QTAGS,           /**< stacked QTags */
1122     e_FM_PCD_MANIP_HDR_RMV_ETHERNET_AND_MPLS,       /**< MPLS and Ethernet/802.3 MAC header until
1123                                                          the header which follows the MPLS header */
1124     e_FM_PCD_MANIP_HDR_RMV_MPLS,                     /**< Remove MPLS header (Unlimited MPLS labels) */
1125     e_FM_PCD_MANIP_HDR_RMV_PPPOE                     /**< Remove the PPPoE header and PPP protocol field. */
1126 } e_FmPcdManipHdrRmvSpecificL2;
1127 
1128 /**************************************************************************//**
1129  @Description   Enumeration type for selecting specific fields updates
1130 *//***************************************************************************/
1131 typedef enum e_FmPcdManipHdrFieldUpdateType {
1132     e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN,               /**< VLAN updates */
1133     e_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV4,               /**< IPV4 updates */
1134     e_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV6,               /**< IPV6 updates */
1135     e_FM_PCD_MANIP_HDR_FIELD_UPDATE_TCP_UDP,            /**< TCP_UDP updates */
1136 } e_FmPcdManipHdrFieldUpdateType;
1137 
1138 /**************************************************************************//**
1139  @Description   Enumeration type for selecting VLAN updates
1140 *//***************************************************************************/
1141 typedef enum e_FmPcdManipHdrFieldUpdateVlan {
1142     e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN_VPRI,      /**< Replace VPri of outer most VLAN tag. */
1143     e_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN    /**< DSCP to VLAN priority bits translation */
1144 } e_FmPcdManipHdrFieldUpdateVlan;
1145 
1146 /**************************************************************************//**
1147  @Description   Enumeration type for selecting specific L2 header insertion
1148 *//***************************************************************************/
1149 typedef enum e_FmPcdManipHdrInsrtSpecificL2 {
1150     e_FM_PCD_MANIP_HDR_INSRT_MPLS,                   /**< Insert MPLS header (Unlimited MPLS labels) */
1151     e_FM_PCD_MANIP_HDR_INSRT_PPPOE                   /**< Insert PPPOE */
1152 } e_FmPcdManipHdrInsrtSpecificL2;
1153 
1154 #if (DPAA_VERSION >= 11)
1155 /**************************************************************************//**
1156  @Description   Enumeration type for selecting QoS mapping mode
1157 
1158                 Note: In all cases except 'e_FM_PCD_MANIP_HDR_QOS_MAPPING_NONE'
1159                 User should instruct the port to read the hash-result
1160 *//***************************************************************************/
1161 typedef enum e_FmPcdManipHdrQosMappingMode {
1162     e_FM_PCD_MANIP_HDR_QOS_MAPPING_NONE = 0,   /**< No mapping, QoS field will not be changed */
1163     e_FM_PCD_MANIP_HDR_QOS_MAPPING_AS_IS, /**< QoS field will be overwritten by the last byte in the hash-result. */
1164 } e_FmPcdManipHdrQosMappingMode;
1165 
1166 /**************************************************************************//**
1167  @Description   Enumeration type for selecting QoS source
1168 
1169                 Note: In all cases except 'e_FM_PCD_MANIP_HDR_QOS_SRC_NONE'
1170                 User should left room for the hash-result on input/output buffer
1171                 and instruct the port to read/write the hash-result to the buffer (RPD should be set)
1172 *//***************************************************************************/
1173 typedef enum e_FmPcdManipHdrQosSrc {
1174     e_FM_PCD_MANIP_HDR_QOS_SRC_NONE = 0,        /**< TODO */
1175     e_FM_PCD_MANIP_HDR_QOS_SRC_USER_DEFINED,    /**< QoS will be taken from the last byte in the hash-result. */
1176 } e_FmPcdManipHdrQosSrc;
1177 #endif /* (DPAA_VERSION >= 11) */
1178 
1179 /**************************************************************************//**
1180  @Description   Enumeration type for selecting type of header insertion
1181 *//***************************************************************************/
1182 typedef enum e_FmPcdManipHdrInsrtByHdrType {
1183     e_FM_PCD_MANIP_INSRT_BY_HDR_SPECIFIC_L2,        /**< Specific L2 fields insertion */
1184 #if (DPAA_VERSION >= 11)
1185     e_FM_PCD_MANIP_INSRT_BY_HDR_IP,                 /**< IP insertion */
1186     e_FM_PCD_MANIP_INSRT_BY_HDR_UDP,                /**< UDP insertion */
1187     e_FM_PCD_MANIP_INSRT_BY_HDR_UDP_LITE,             /**< UDP lite insertion */
1188     e_FM_PCD_MANIP_INSRT_BY_HDR_CAPWAP                 /**< CAPWAP insertion */
1189 #endif /* (DPAA_VERSION >= 11) */
1190 } e_FmPcdManipHdrInsrtByHdrType;
1191 
1192 /**************************************************************************//**
1193  @Description   Enumeration type for selecting specific customCommand
1194 *//***************************************************************************/
1195 typedef enum e_FmPcdManipHdrCustomType {
1196     e_FM_PCD_MANIP_HDR_CUSTOM_IP_REPLACE,           /**< Replace IPv4/IPv6 */
1197     e_FM_PCD_MANIP_HDR_CUSTOM_GEN_FIELD_REPLACE,     /**< Replace IPv4/IPv6 */
1198 } e_FmPcdManipHdrCustomType;
1199 
1200 /**************************************************************************//**
1201  @Description   Enumeration type for selecting specific customCommand
1202 *//***************************************************************************/
1203 typedef enum e_FmPcdManipHdrCustomIpReplace {
1204     e_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV4_BY_IPV6,           /**< Replace IPv4 by IPv6 */
1205     e_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV6_BY_IPV4            /**< Replace IPv6 by IPv4 */
1206 } e_FmPcdManipHdrCustomIpReplace;
1207 
1208 /**************************************************************************//**
1209  @Description   Enumeration type for selecting type of header removal
1210 *//***************************************************************************/
1211 typedef enum e_FmPcdManipHdrRmvByHdrType {
1212     e_FM_PCD_MANIP_RMV_BY_HDR_SPECIFIC_L2 = 0,      /**< Specific L2 fields removal */
1213 #if (DPAA_VERSION >= 11)
1214     e_FM_PCD_MANIP_RMV_BY_HDR_CAPWAP,                  /**< CAPWAP removal */
1215 #endif /* (DPAA_VERSION >= 11) */
1216 #if (DPAA_VERSION >= 11) || ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
1217     e_FM_PCD_MANIP_RMV_BY_HDR_FROM_START,           /**< Locate from data that is not the header */
1218 #endif /* (DPAA_VERSION >= 11) || ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */
1219 } e_FmPcdManipHdrRmvByHdrType;
1220 
1221 /**************************************************************************//**
1222  @Description   Enumeration type for selecting type of timeout mode
1223 *//***************************************************************************/
1224 typedef enum e_FmPcdManipReassemTimeOutMode {
1225     e_FM_PCD_MANIP_TIME_OUT_BETWEEN_FRAMES, /**< Limits the time of the reassembly process
1226                                                  from the first fragment to the last */
1227     e_FM_PCD_MANIP_TIME_OUT_BETWEEN_FRAG    /**< Limits the time of receiving the fragment */
1228 } e_FmPcdManipReassemTimeOutMode;
1229 
1230 /**************************************************************************//**
1231  @Description   Enumeration type for selecting type of WaysNumber mode
1232 *//***************************************************************************/
1233 typedef enum e_FmPcdManipReassemWaysNumber {
1234     e_FM_PCD_MANIP_ONE_WAY_HASH = 1,    /**< One way hash    */
1235     e_FM_PCD_MANIP_TWO_WAYS_HASH,       /**< Two ways hash   */
1236     e_FM_PCD_MANIP_THREE_WAYS_HASH,     /**< Three ways hash */
1237     e_FM_PCD_MANIP_FOUR_WAYS_HASH,      /**< Four ways hash  */
1238     e_FM_PCD_MANIP_FIVE_WAYS_HASH,      /**< Five ways hash  */
1239     e_FM_PCD_MANIP_SIX_WAYS_HASH,       /**< Six ways hash   */
1240     e_FM_PCD_MANIP_SEVEN_WAYS_HASH,     /**< Seven ways hash */
1241     e_FM_PCD_MANIP_EIGHT_WAYS_HASH      /**< Eight ways hash */
1242 } e_FmPcdManipReassemWaysNumber;
1243 
1244 #if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
1245 /**************************************************************************//**
1246  @Description   Enumeration type for selecting type of statistics mode
1247 *//***************************************************************************/
1248 typedef enum e_FmPcdStatsType {
1249     e_FM_PCD_STATS_PER_FLOWID = 0       /**< Flow ID is used as index for getting statistics */
1250 } e_FmPcdStatsType;
1251 #endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */
1252 
1253 /**************************************************************************//**
1254  @Description   Enumeration type for selecting manipulation type
1255 *//***************************************************************************/
1256 typedef enum e_FmPcdManipType {
1257     e_FM_PCD_MANIP_HDR = 0,             /**< Header manipulation */
1258     e_FM_PCD_MANIP_REASSEM,             /**< Reassembly */
1259     e_FM_PCD_MANIP_FRAG,                /**< Fragmentation */
1260     e_FM_PCD_MANIP_SPECIAL_OFFLOAD      /**< Special Offloading */
1261 } e_FmPcdManipType;
1262 
1263 /**************************************************************************//**
1264  @Description   Enumeration type for selecting type of statistics mode
1265 *//***************************************************************************/
1266 typedef enum e_FmPcdCcStatsMode {
1267     e_FM_PCD_CC_STATS_MODE_NONE = 0,        /**< No statistics support */
1268     e_FM_PCD_CC_STATS_MODE_FRAME,           /**< Frame count statistics */
1269     e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME,  /**< Byte and frame count statistics */
1270 #if (DPAA_VERSION >= 11)
1271     e_FM_PCD_CC_STATS_MODE_RMON,            /**< Byte and frame length range count statistics;
1272                                                  This mode is supported only on B4860 device */
1273 #endif /* (DPAA_VERSION >= 11) */
1274 } e_FmPcdCcStatsMode;
1275 
1276 /**************************************************************************//**
1277  @Description   Enumeration type for determining the action in case an IP packet
1278                 is larger than MTU but its DF (Don't Fragment) bit is set.
1279 *//***************************************************************************/
1280 typedef enum e_FmPcdManipDontFragAction {
1281     e_FM_PCD_MANIP_DISCARD_PACKET = 0,                  /**< Discard packet */
1282     e_FM_PCD_MANIP_ENQ_TO_ERR_Q_OR_DISCARD_PACKET = e_FM_PCD_MANIP_DISCARD_PACKET,
1283                                                         /**< Obsolete, cannot enqueue to error queue;
1284                                                              In practice, selects to discard packets;
1285                                                              Will be removed in the future */
1286     e_FM_PCD_MANIP_FRAGMENT_PACKET,                     /**< Fragment packet and continue normal processing */
1287     e_FM_PCD_MANIP_CONTINUE_WITHOUT_FRAG                /**< Continue normal processing without fragmenting the packet */
1288 } e_FmPcdManipDontFragAction;
1289 
1290 /**************************************************************************//**
1291  @Description   Enumeration type for selecting type of special offload manipulation
1292 *//***************************************************************************/
1293 typedef enum e_FmPcdManipSpecialOffloadType {
1294     e_FM_PCD_MANIP_SPECIAL_OFFLOAD_IPSEC,    /**< IPSec offload manipulation */
1295 #if (DPAA_VERSION >= 11)
1296     e_FM_PCD_MANIP_SPECIAL_OFFLOAD_CAPWAP    /**< CAPWAP offload manipulation */
1297 #endif /* (DPAA_VERSION >= 11) */
1298 } e_FmPcdManipSpecialOffloadType;
1299 
1300 
1301 /**************************************************************************//**
1302  @Description   A Union of protocol dependent special options
1303 *//***************************************************************************/
1304 typedef union u_FmPcdHdrProtocolOpt {
1305     ethProtocolOpt_t    ethOpt;     /**< Ethernet options */
1306     vlanProtocolOpt_t   vlanOpt;    /**< VLAN options */
1307     mplsProtocolOpt_t   mplsOpt;    /**< MPLS options */
1308     ipv4ProtocolOpt_t   ipv4Opt;    /**< IPv4 options */
1309     ipv6ProtocolOpt_t   ipv6Opt;    /**< IPv6 options */
1310 #if (DPAA_VERSION >= 11)
1311     capwapProtocolOpt_t capwapOpt;  /**< CAPWAP options */
1312 #endif /* (DPAA_VERSION >= 11) */
1313 } u_FmPcdHdrProtocolOpt;
1314 
1315 /**************************************************************************//**
1316  @Description   A union holding protocol fields
1317 
1318 
1319                 Fields supported as "full fields":
1320                     HEADER_TYPE_ETH:
1321                         NET_HEADER_FIELD_ETH_DA
1322                         NET_HEADER_FIELD_ETH_SA
1323                         NET_HEADER_FIELD_ETH_TYPE
1324 
1325                     HEADER_TYPE_LLC_SNAP:
1326                         NET_HEADER_FIELD_LLC_SNAP_TYPE
1327 
1328                     HEADER_TYPE_VLAN:
1329                         NET_HEADER_FIELD_VLAN_TCI
1330                                 (index may apply:
1331                                  e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,
1332                                  e_FM_PCD_HDR_INDEX_LAST)
1333 
1334                     HEADER_TYPE_MPLS:
1335                         NET_HEADER_FIELD_MPLS_LABEL_STACK
1336                                 (index may apply:
1337                                  e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,
1338                                  e_FM_PCD_HDR_INDEX_2,
1339                                  e_FM_PCD_HDR_INDEX_LAST)
1340 
1341                     HEADER_TYPE_IPv4:
1342                         NET_HEADER_FIELD_IPv4_SRC_IP
1343                         NET_HEADER_FIELD_IPv4_DST_IP
1344                         NET_HEADER_FIELD_IPv4_PROTO
1345                         NET_HEADER_FIELD_IPv4_TOS
1346                                 (index may apply:
1347                                  e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,
1348                                  e_FM_PCD_HDR_INDEX_2/e_FM_PCD_HDR_INDEX_LAST)
1349 
1350                     HEADER_TYPE_IPv6:
1351                         NET_HEADER_FIELD_IPv6_SRC_IP
1352                         NET_HEADER_FIELD_IPv6_DST_IP
1353                         NET_HEADER_FIELD_IPv6_NEXT_HDR
1354                         NET_HEADER_FIELD_IPv6_VER | NET_HEADER_FIELD_IPv6_FL | NET_HEADER_FIELD_IPv6_TC (must come together!)
1355                                 (index may apply:
1356                                  e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,
1357                                  e_FM_PCD_HDR_INDEX_2/e_FM_PCD_HDR_INDEX_LAST)
1358 
1359                                 (Note that starting from DPAA 1-1, NET_HEADER_FIELD_IPv6_NEXT_HDR applies to
1360                                  the last next header indication, meaning the next L4, which may be
1361                                  present at the Ipv6 last extension. On earlier revisions this field
1362                                  applies to the Next-Header field of the main IPv6 header)
1363 
1364                     HEADER_TYPE_IP:
1365                         NET_HEADER_FIELD_IP_PROTO
1366                                 (index may apply:
1367                                  e_FM_PCD_HDR_INDEX_LAST)
1368                         NET_HEADER_FIELD_IP_DSCP
1369                                 (index may apply:
1370                                  e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1)
1371                     HEADER_TYPE_GRE:
1372                         NET_HEADER_FIELD_GRE_TYPE
1373 
1374                     HEADER_TYPE_MINENCAP
1375                         NET_HEADER_FIELD_MINENCAP_SRC_IP
1376                         NET_HEADER_FIELD_MINENCAP_DST_IP
1377                         NET_HEADER_FIELD_MINENCAP_TYPE
1378 
1379                     HEADER_TYPE_TCP:
1380                         NET_HEADER_FIELD_TCP_PORT_SRC
1381                         NET_HEADER_FIELD_TCP_PORT_DST
1382                         NET_HEADER_FIELD_TCP_FLAGS
1383 
1384                     HEADER_TYPE_UDP:
1385                         NET_HEADER_FIELD_UDP_PORT_SRC
1386                         NET_HEADER_FIELD_UDP_PORT_DST
1387 
1388                     HEADER_TYPE_UDP_LITE:
1389                         NET_HEADER_FIELD_UDP_LITE_PORT_SRC
1390                         NET_HEADER_FIELD_UDP_LITE_PORT_DST
1391 
1392                     HEADER_TYPE_IPSEC_AH:
1393                         NET_HEADER_FIELD_IPSEC_AH_SPI
1394                         NET_HEADER_FIELD_IPSEC_AH_NH
1395 
1396                     HEADER_TYPE_IPSEC_ESP:
1397                         NET_HEADER_FIELD_IPSEC_ESP_SPI
1398 
1399                     HEADER_TYPE_SCTP:
1400                         NET_HEADER_FIELD_SCTP_PORT_SRC
1401                         NET_HEADER_FIELD_SCTP_PORT_DST
1402 
1403                     HEADER_TYPE_DCCP:
1404                         NET_HEADER_FIELD_DCCP_PORT_SRC
1405                         NET_HEADER_FIELD_DCCP_PORT_DST
1406 
1407                     HEADER_TYPE_PPPoE:
1408                         NET_HEADER_FIELD_PPPoE_PID
1409                         NET_HEADER_FIELD_PPPoE_SID
1410 
1411         *****************************************************************
1412                 Fields supported as "from fields":
1413                     HEADER_TYPE_ETH (with or without validation):
1414                         NET_HEADER_FIELD_ETH_TYPE
1415 
1416                     HEADER_TYPE_VLAN (with or without validation):
1417                         NET_HEADER_FIELD_VLAN_TCI
1418                                 (index may apply:
1419                                  e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,
1420                                  e_FM_PCD_HDR_INDEX_LAST)
1421 
1422                     HEADER_TYPE_IPv4 (without validation):
1423                         NET_HEADER_FIELD_IPv4_PROTO
1424                                 (index may apply:
1425                                  e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,
1426                                  e_FM_PCD_HDR_INDEX_2/e_FM_PCD_HDR_INDEX_LAST)
1427 
1428                     HEADER_TYPE_IPv6 (without validation):
1429                         NET_HEADER_FIELD_IPv6_NEXT_HDR
1430                                 (index may apply:
1431                                  e_FM_PCD_HDR_INDEX_NONE/e_FM_PCD_HDR_INDEX_1,
1432                                  e_FM_PCD_HDR_INDEX_2/e_FM_PCD_HDR_INDEX_LAST)
1433 
1434 *//***************************************************************************/
1435 typedef union t_FmPcdFields {
1436     headerFieldEth_t            eth;            /**< Ethernet               */
1437     headerFieldVlan_t           vlan;           /**< VLAN                   */
1438     headerFieldLlcSnap_t        llcSnap;        /**< LLC SNAP               */
1439     headerFieldPppoe_t          pppoe;          /**< PPPoE                  */
1440     headerFieldMpls_t           mpls;           /**< MPLS                   */
1441     headerFieldIp_t             ip;             /**< IP                     */
1442     headerFieldIpv4_t           ipv4;           /**< IPv4                   */
1443     headerFieldIpv6_t           ipv6;           /**< IPv6                   */
1444     headerFieldUdp_t            udp;            /**< UDP                    */
1445     headerFieldUdpLite_t        udpLite;        /**< UDP Lite               */
1446     headerFieldTcp_t            tcp;            /**< TCP                    */
1447     headerFieldSctp_t           sctp;           /**< SCTP                   */
1448     headerFieldDccp_t           dccp;           /**< DCCP                   */
1449     headerFieldGre_t            gre;            /**< GRE                    */
1450     headerFieldMinencap_t       minencap;       /**< Minimal Encapsulation  */
1451     headerFieldIpsecAh_t        ipsecAh;        /**< IPSec AH               */
1452     headerFieldIpsecEsp_t       ipsecEsp;       /**< IPSec ESP              */
1453     headerFieldUdpEncapEsp_t    udpEncapEsp;    /**< UDP Encapsulation ESP  */
1454 } t_FmPcdFields;
1455 
1456 /**************************************************************************//**
1457  @Description   Parameters for defining header extraction for key generation
1458 *//***************************************************************************/
1459 typedef struct t_FmPcdFromHdr {
1460     uint8_t             size;           /**< Size in byte */
1461     uint8_t             offset;         /**< Byte offset */
1462 } t_FmPcdFromHdr;
1463 
1464 /**************************************************************************//**
1465  @Description   Parameters for defining field extraction for key generation
1466 *//***************************************************************************/
1467 typedef struct t_FmPcdFromField {
1468     t_FmPcdFields       field;          /**< Field selection */
1469     uint8_t             size;           /**< Size in byte */
1470     uint8_t             offset;         /**< Byte offset */
1471 } t_FmPcdFromField;
1472 
1473 /**************************************************************************//**
1474  @Description   Parameters for defining a single network environment unit
1475 
1476                 A distinction unit should be defined if it will later be used
1477                 by one or more PCD engines to distinguish between flows.
1478 *//***************************************************************************/
1479 typedef struct t_FmPcdDistinctionUnit {
1480     struct {
1481         e_NetHeaderType         hdr;        /**< One of the headers supported by the FM */
1482         u_FmPcdHdrProtocolOpt   opt;        /**< Select only one option ! */
1483     } hdrs[FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS];
1484 } t_FmPcdDistinctionUnit;
1485 
1486 /**************************************************************************//**
1487  @Description   Parameters for defining all different distinction units supported
1488                 by a specific PCD Network Environment Characteristics module.
1489 
1490                 Each unit represent a protocol or a group of protocols that may
1491                 be used later by the different PCD engines to distinguish
1492                 between flows.
1493 *//***************************************************************************/
1494 typedef struct t_FmPcdNetEnvParams {
1495     uint8_t                 numOfDistinctionUnits;                      /**< Number of different units to be identified */
1496     t_FmPcdDistinctionUnit  units[FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS]; /**< An array of numOfDistinctionUnits of the
1497                                                                              different units to be identified */
1498 } t_FmPcdNetEnvParams;
1499 
1500 /**************************************************************************//**
1501  @Description   Parameters for defining a single extraction action when
1502                 creating a key
1503 *//***************************************************************************/
1504 typedef struct t_FmPcdExtractEntry {
1505     e_FmPcdExtractType                  type;           /**< Extraction type select */
1506     union {
1507         struct {
1508             e_NetHeaderType             hdr;            /**< Header selection */
1509             bool                        ignoreProtocolValidation;
1510                                                         /**< Ignore protocol validation */
1511             e_FmPcdHdrIndex             hdrIndex;       /**< Relevant only for MPLS, VLAN and tunneled
1512                                                              IP. Otherwise should be cleared. */
1513             e_FmPcdExtractByHdrType     type;           /**< Header extraction type select */
1514             union {
1515                 t_FmPcdFromHdr          fromHdr;        /**< Extract bytes from header parameters */
1516                 t_FmPcdFromField        fromField;      /**< Extract bytes from field parameters */
1517                 t_FmPcdFields           fullField;      /**< Extract full filed parameters */
1518             } extractByHdrType;
1519         } extractByHdr;                                 /**< used when type = e_FM_PCD_KG_EXTRACT_BY_HDR */
1520         struct {
1521             e_FmPcdExtractFrom          src;            /**< Non-header extraction source */
1522             e_FmPcdAction               action;         /**< Relevant for CC Only */
1523             uint16_t                    icIndxMask;     /**< Relevant only for CC when
1524                                                              action = e_FM_PCD_ACTION_INDEXED_LOOKUP;
1525                                                              Note that the number of bits that are set within
1526                                                              this mask must be log2 of the CC-node 'numOfKeys'.
1527                                                              Note that the mask cannot be set on the lower bits. */
1528             uint8_t                     offset;         /**< Byte offset */
1529             uint8_t                     size;           /**< Size in byte */
1530         } extractNonHdr;                                /**< used when type = e_FM_PCD_KG_EXTRACT_NON_HDR */
1531     };
1532 } t_FmPcdExtractEntry;
1533 
1534 /**************************************************************************//**
1535  @Description   Parameters for defining masks for each extracted field in the key.
1536 *//***************************************************************************/
1537 typedef struct t_FmPcdKgExtractMask {
1538     uint8_t                             extractArrayIndex;  /**< Index in the extraction array, as initialized by user */
1539     uint8_t                             offset;             /**< Byte offset */
1540     uint8_t                             mask;               /**< A byte mask (selected bits will be used) */
1541 } t_FmPcdKgExtractMask;
1542 
1543 /**************************************************************************//**
1544  @Description   Parameters for defining default selection per groups of fields
1545 *//***************************************************************************/
1546 typedef struct t_FmPcdKgExtractDflt {
1547     e_FmPcdKgKnownFieldsDfltTypes       type;                /**< Default type select */
1548     e_FmPcdKgExtractDfltSelect          dfltSelect;          /**< Default register select */
1549 } t_FmPcdKgExtractDflt;
1550 
1551 /**************************************************************************//**
1552  @Description   Parameters for defining key extraction and hashing
1553 *//***************************************************************************/
1554 typedef struct t_FmPcdKgKeyExtractAndHashParams {
1555     uint32_t                    privateDflt0;                /**< Scheme default register 0 */
1556     uint32_t                    privateDflt1;                /**< Scheme default register 1 */
1557     uint8_t                     numOfUsedExtracts;           /**< defines the valid size of the following array */
1558     t_FmPcdExtractEntry         extractArray [FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY]; /**< An array of extractions definition. */
1559     uint8_t                     numOfUsedDflts;              /**< defines the valid size of the following array */
1560     t_FmPcdKgExtractDflt        dflts[FM_PCD_KG_NUM_OF_DEFAULT_GROUPS];
1561                                                              /**< For each extraction used in this scheme, specify the required
1562                                                                   default register to be used when header is not found.
1563                                                                   types not specified in this array will get undefined value. */
1564     uint8_t                     numOfUsedMasks;              /**< defines the valid size of the following array */
1565     t_FmPcdKgExtractMask        masks[FM_PCD_KG_NUM_OF_EXTRACT_MASKS];
1566     uint8_t                     hashShift;                   /**< hash result right shift. Select the 24 bits out of the 64 hash
1567                                                                   result. 0 means using the 24 LSB's, otherwise use the
1568                                                                   24 LSB's after shifting right.*/
1569     uint32_t                    hashDistributionNumOfFqids;  /**< must be > 1 and a power of 2. Represents the range
1570                                                                   of queues for the key and hash functionality */
1571     uint8_t                     hashDistributionFqidsShift;  /**< selects the FQID bits that will be effected by the hash */
1572     bool                        symmetricHash;               /**< TRUE to generate the same hash for frames with swapped source and
1573                                                                   destination fields on all layers; If TRUE, driver will check that for
1574                                                                   all layers, if SRC extraction is selected, DST extraction must also be
1575                                                                   selected, and vice versa. */
1576 } t_FmPcdKgKeyExtractAndHashParams;
1577 
1578 /**************************************************************************//**
1579  @Description   Parameters for defining a single FQID mask (extracted OR).
1580 *//***************************************************************************/
1581 typedef struct t_FmPcdKgExtractedOrParams {
1582     e_FmPcdExtractType              type;               /**< Extraction type select */
1583     union {
1584         struct {                                        /**< used when type = e_FM_PCD_KG_EXTRACT_BY_HDR */
1585             e_NetHeaderType         hdr;
1586             e_FmPcdHdrIndex         hdrIndex;           /**< Relevant only for MPLS, VLAN and tunneled
1587                                                              IP. Otherwise should be cleared.*/
1588             bool                    ignoreProtocolValidation;
1589                                                         /**< continue extraction even if protocol is not recognized */
1590         } extractByHdr;                                 /**< Header to extract by */
1591         e_FmPcdExtractFrom          src;                /**< used when type = e_FM_PCD_KG_EXTRACT_NON_HDR */
1592     };
1593     uint8_t                         extractionOffset;   /**< Offset for extraction (in bytes).  */
1594     e_FmPcdKgExtractDfltSelect      dfltValue;          /**< Select register from which extraction is taken if
1595                                                              field not found */
1596     uint8_t                         mask;               /**< Extraction mask (specified bits are used) */
1597     uint8_t                         bitOffsetInFqid;    /**< 0-31, Selects which bits of the 24 FQID bits to effect using
1598                                                              the extracted byte; Assume byte is placed as the 8 MSB's in
1599                                                              a 32 bit word where the lower bits
1600                                                              are the FQID; i.e if bitOffsetInFqid=1 than its LSB
1601                                                              will effect the FQID MSB, if bitOffsetInFqid=24 than the
1602                                                              extracted byte will effect the 8 LSB's of the FQID,
1603                                                              if bitOffsetInFqid=31 than the byte's MSB will effect
1604                                                              the FQID's LSB; 0 means - no effect on FQID;
1605                                                              Note that one, and only one of
1606                                                              bitOffsetInFqid or bitOffsetInPlcrProfile must be set (i.e,
1607                                                              extracted byte must effect either FQID or Policer profile).*/
1608     uint8_t                         bitOffsetInPlcrProfile;
1609                                                         /**< 0-15, Selects which bits of the 8 policer profile id bits to
1610                                                              effect using the extracted byte; Assume byte is placed
1611                                                              as the 8 MSB's in a 16 bit word where the lower bits
1612                                                              are the policer profile id; i.e if bitOffsetInPlcrProfile=1
1613                                                              than its LSB will effect the profile MSB, if bitOffsetInFqid=8
1614                                                              than the extracted byte will effect the whole policer profile id,
1615                                                              if bitOffsetInFqid=15 than the byte's MSB will effect
1616                                                              the Policer Profile id's LSB;
1617                                                              0 means - no effect on policer profile; Note that one, and only one of
1618                                                              bitOffsetInFqid or bitOffsetInPlcrProfile must be set (i.e,
1619                                                              extracted byte must effect either FQID or Policer profile).*/
1620 } t_FmPcdKgExtractedOrParams;
1621 
1622 /**************************************************************************//**
1623  @Description   Parameters for configuring a scheme counter
1624 *//***************************************************************************/
1625 typedef struct t_FmPcdKgSchemeCounter {
1626     bool        update;     /**< FALSE to keep the current counter state
1627                                  and continue from that point, TRUE to update/reset
1628                                  the counter when the scheme is written. */
1629     uint32_t    value;      /**< If update=TRUE, this value will be written into the
1630                                  counter. clear this field to reset the counter. */
1631 } t_FmPcdKgSchemeCounter;
1632 
1633 /**************************************************************************//**
1634  @Description   Parameters for configuring a policer profile for a KeyGen scheme
1635                 (when policer is the next engine after this scheme).
1636 *//***************************************************************************/
1637 typedef struct t_FmPcdKgPlcrProfile {
1638     bool                sharedProfile;              /**< TRUE if this profile is shared between ports
1639                                                          (managed by master partition); Must not be TRUE
1640                                                          if profile is after Coarse Classification*/
1641     bool                direct;                     /**< if TRUE, directRelativeProfileId only selects the profile
1642                                                          id, if FALSE fqidOffsetRelativeProfileIdBase is used
1643                                                          together with fqidOffsetShift and numOfProfiles
1644                                                          parameters, to define a range of profiles from
1645                                                          which the KeyGen result will determine the
1646                                                          destination policer profile.  */
1647     union {
1648         uint16_t        directRelativeProfileId;    /**< Used if 'direct' is TRUE, to select policer profile.
1649                                                          should indicate the policer profile offset within the
1650                                                          port's policer profiles or shared window. */
1651         struct {
1652             uint8_t     fqidOffsetShift;            /**< Shift on the KeyGen create FQID offset (i.e. not the
1653                                                          final FQID - without the FQID base). */
1654             uint8_t     fqidOffsetRelativeProfileIdBase;
1655                                                     /**< The base of the FMan Port's relative Storage-Profile ID;
1656                                                          this value will be "OR'ed" with the KeyGen create FQID
1657                                                          offset (i.e. not the final FQID - without the FQID base);
1658                                                          the final result should indicate the Storage-Profile offset
1659                                                          within the FMan Port's relative Storage-Profiles window/
1660                                                          (or the SHARED window depends on 'sharedProfile'). */
1661             uint8_t     numOfProfiles;              /**< Range of profiles starting at base */
1662         } indirectProfile;                          /**< Indirect profile parameters */
1663     } profileSelect;                                /**< Direct/indirect profile selection and parameters */
1664 } t_FmPcdKgPlcrProfile;
1665 
1666 #if (DPAA_VERSION >= 11)
1667 /**************************************************************************//**
1668  @Description   Parameters for configuring a storage profile for a KeyGen scheme.
1669 *//***************************************************************************/
1670 typedef struct t_FmPcdKgStorageProfile {
1671     bool                direct;                     /**< If TRUE, directRelativeProfileId only selects the
1672                                                          profile id;
1673                                                          If FALSE, fqidOffsetRelativeProfileIdBase is used
1674                                                          together with fqidOffsetShift and numOfProfiles
1675                                                          parameters to define a range of profiles from which
1676                                                          the KeyGen result will determine the destination
1677                                                          storage profile. */
1678     union {
1679         uint16_t        directRelativeProfileId;    /**< Used when 'direct' is TRUE, to select a storage profile;
1680                                                          should indicate the storage profile offset within the
1681                                                          port's storage profiles window. */
1682         struct {
1683             uint8_t     fqidOffsetShift;            /**< Shift on the KeyGen create FQID offset (i.e. not the
1684                                                          final FQID - without the FQID base). */
1685             uint8_t     fqidOffsetRelativeProfileIdBase;
1686                                                     /**< The base of the FMan Port's relative Storage-Profile ID;
1687                                                          this value will be "OR'ed" with the KeyGen create FQID
1688                                                          offset (i.e. not the final FQID - without the FQID base);
1689                                                          the final result should indicate the Storage-Profile offset
1690                                                          within the FMan Port's relative Storage-Profiles window. */
1691             uint8_t     numOfProfiles;              /**< Range of profiles starting at base. */
1692         } indirectProfile;                          /**< Indirect profile parameters. */
1693     } profileSelect;                                /**< Direct/indirect profile selection and parameters. */
1694 } t_FmPcdKgStorageProfile;
1695 #endif /* (DPAA_VERSION >= 11) */
1696 
1697 /**************************************************************************//**
1698  @Description   Parameters for defining CC as the next engine after KeyGen
1699 *//***************************************************************************/
1700 typedef struct t_FmPcdKgCc {
1701     t_Handle                h_CcTree;                       /**< A handle to a CC Tree */
1702     uint8_t                 grpId;                          /**< CC group id within the CC tree */
1703     bool                    plcrNext;                       /**< TRUE if after CC, in case of data frame,
1704                                                                  policing is required. */
1705     bool                    bypassPlcrProfileGeneration;    /**< TRUE to bypass KeyGen policer profile generation;
1706                                                                  selected profile is the one set at port initialization. */
1707     t_FmPcdKgPlcrProfile    plcrProfile;                    /**< Valid only if plcrNext = TRUE and
1708                                                                  bypassPlcrProfileGeneration = FALSE */
1709 } t_FmPcdKgCc;
1710 
1711 /**************************************************************************//**
1712  @Description   Parameters for defining initializing a KeyGen scheme
1713 *//***************************************************************************/
1714 typedef struct t_FmPcdKgSchemeParams {
1715     bool                                modify;                 /**< TRUE to change an existing scheme */
1716     union
1717     {
1718         uint8_t                         relativeSchemeId;       /**< if modify=FALSE:Partition relative scheme id */
1719         t_Handle                        h_Scheme;               /**< if modify=TRUE: a handle of the existing scheme */
1720     } id;
1721     bool                                alwaysDirect;           /**< This scheme is reached only directly, i.e. no need
1722                                                                      for match vector; KeyGen will ignore it when matching */
1723     struct {                                                    /**< HL Relevant only if alwaysDirect = FALSE */
1724         t_Handle                        h_NetEnv;               /**< A handle to the Network environment as returned
1725                                                                      by FM_PCD_NetEnvCharacteristicsSet() */
1726         uint8_t                         numOfDistinctionUnits;  /**< Number of NetEnv units listed in unitIds array */
1727         uint8_t                         unitIds[FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS];
1728                                                                 /**< Indexes as passed to SetNetEnvCharacteristics array*/
1729     } netEnvParams;
1730     bool                                useHash;                /**< use the KeyGen Hash functionality  */
1731     t_FmPcdKgKeyExtractAndHashParams    keyExtractAndHashParams;
1732                                                                 /**< used only if useHash = TRUE */
1733     bool                                bypassFqidGeneration;   /**< Normally - FALSE, TRUE to avoid FQID update in the IC;
1734                                                                      In such a case FQID after KeyGen will be the default FQID
1735                                                                      defined for the relevant port, or the FQID defined by CC
1736                                                                      in cases where CC was the previous engine. */
1737     uint32_t                            baseFqid;               /**< Base FQID; Relevant only if bypassFqidGeneration = FALSE;
1738                                                                      If hash is used and an even distribution is expected
1739                                                                      according to hashDistributionNumOfFqids, baseFqid must be aligned to
1740                                                                      hashDistributionNumOfFqids. */
1741     uint8_t                             numOfUsedExtractedOrs;  /**< Number of FQID masks listed in extractedOrs array */
1742     t_FmPcdKgExtractedOrParams          extractedOrs[FM_PCD_KG_NUM_OF_GENERIC_REGS];
1743                                                                 /**< FM_PCD_KG_NUM_OF_GENERIC_REGS
1744                                                                      registers are shared between qidMasks
1745                                                                      functionality and some of the extraction
1746                                                                      actions; Normally only some will be used
1747                                                                      for qidMask. Driver will return error if
1748                                                                      resource is full at initialization time. */
1749 
1750 #if (DPAA_VERSION >= 11)
1751     bool                                overrideStorageProfile; /**< TRUE if KeyGen override previously decided storage profile */
1752     t_FmPcdKgStorageProfile             storageProfile;         /**< Used when overrideStorageProfile TRUE */
1753 #endif /* (DPAA_VERSION >= 11) */
1754 
1755     e_FmPcdEngine                       nextEngine;             /**< may be BMI, PLCR or CC */
1756     union {                                                     /**< depends on nextEngine */
1757         e_FmPcdDoneAction               doneAction;             /**< Used when next engine is BMI (done) */
1758         t_FmPcdKgPlcrProfile            plcrProfile;            /**< Used when next engine is PLCR */
1759         t_FmPcdKgCc                     cc;                     /**< Used when next engine is CC */
1760     } kgNextEngineParams;
1761     t_FmPcdKgSchemeCounter              schemeCounter;          /**< A structure of parameters for updating
1762                                                                      the scheme counter */
1763 } t_FmPcdKgSchemeParams;
1764 
1765 /**************************************************************************//**
1766  @Collection    Definitions for CC statistics
1767 *//***************************************************************************/
1768 #if (DPAA_VERSION >= 11)
1769 #define FM_PCD_CC_STATS_MAX_NUM_OF_FLR      10  /* Maximal supported number of frame length ranges */
1770 #define FM_PCD_CC_STATS_FLR_SIZE            2   /* Size in bytes of a frame length range limit */
1771 #endif /* (DPAA_VERSION >= 11) */
1772 #define FM_PCD_CC_STATS_COUNTER_SIZE        4   /* Size in bytes of a frame length range counter */
1773 /* @} */
1774 
1775 /**************************************************************************//**
1776  @Description   Parameters for defining CC as the next engine after a CC node.
1777 *//***************************************************************************/
1778 typedef struct t_FmPcdCcNextCcParams {
1779     t_Handle    h_CcNode;               /**< A handle of the next CC node */
1780 } t_FmPcdCcNextCcParams;
1781 
1782 #if (DPAA_VERSION >= 11)
1783 /**************************************************************************//**
1784  @Description   Parameters for defining Frame replicator as the next engine after a CC node.
1785 *//***************************************************************************/
1786 typedef struct t_FmPcdCcNextFrParams {
1787     t_Handle    h_FrmReplic;               /**< A handle of the next frame replicator group */
1788 } t_FmPcdCcNextFrParams;
1789 #endif /* (DPAA_VERSION >= 11) */
1790 
1791 /**************************************************************************//**
1792  @Description   Parameters for defining Policer as the next engine after a CC node.
1793 *//***************************************************************************/
1794 typedef struct t_FmPcdCcNextPlcrParams {
1795     bool        overrideParams;         /**< TRUE if CC override previously decided parameters*/
1796     bool        sharedProfile;          /**< Relevant only if overrideParams=TRUE:
1797                                              TRUE if this profile is shared between ports */
1798     uint16_t    newRelativeProfileId;   /**< Relevant only if overrideParams=TRUE:
1799                                              (otherwise profile id is taken from KeyGen);
1800                                              This parameter should indicate the policer
1801                                              profile offset within the port's
1802                                              policer profiles or from SHARED window.*/
1803     uint32_t    newFqid;                /**< Relevant only if overrideParams=TRUE:
1804                                              FQID for enqueuing the frame;
1805                                              In earlier chips  if policer next engine is KEYGEN,
1806                                              this parameter can be 0, because the KEYGEN
1807                                              always decides the enqueue FQID.*/
1808 #if (DPAA_VERSION >= 11)
1809     uint8_t     newRelativeStorageProfileId;
1810                                         /**< Indicates the relative storage profile offset within
1811                                              the port's storage profiles window;
1812                                              Relevant only if the port was configured with VSP. */
1813 #endif /* (DPAA_VERSION >= 11) */
1814 } t_FmPcdCcNextPlcrParams;
1815 
1816 /**************************************************************************//**
1817  @Description   Parameters for defining enqueue as the next action after a CC node.
1818 *//***************************************************************************/
1819 typedef struct t_FmPcdCcNextEnqueueParams {
1820     e_FmPcdDoneAction    action;        /**< Action - when next engine is BMI (done) */
1821     bool                 overrideFqid;  /**< TRUE if CC override previously decided fqid and vspid,
1822                                              relevant if action = e_FM_PCD_ENQ_FRAME */
1823     uint32_t             newFqid;       /**< Valid if overrideFqid=TRUE, FQID for enqueuing the frame
1824                                              (otherwise FQID is taken from KeyGen),
1825                                              relevant if action = e_FM_PCD_ENQ_FRAME */
1826 #if (DPAA_VERSION >= 11)
1827     uint8_t              newRelativeStorageProfileId;
1828                                         /**< Valid if overrideFqid=TRUE, Indicates the relative virtual
1829                                              storage profile offset within the port's storage profiles
1830                                              window; Relevant only if the port was configured with VSP. */
1831 #endif /* (DPAA_VERSION >= 11) */
1832 } t_FmPcdCcNextEnqueueParams;
1833 
1834 /**************************************************************************//**
1835  @Description   Parameters for defining KeyGen as the next engine after a CC node.
1836 *//***************************************************************************/
1837 typedef struct t_FmPcdCcNextKgParams {
1838     bool        overrideFqid;           /**< TRUE if CC override previously decided fqid and vspid,
1839                                              Note - this parameters irrelevant for earlier chips */
1840     uint32_t    newFqid;                /**< Valid if overrideFqid=TRUE, FQID for enqueuing the frame
1841                                              (otherwise FQID is taken from KeyGen),
1842                                              Note - this parameters irrelevant for earlier chips */
1843 #if (DPAA_VERSION >= 11)
1844     uint8_t     newRelativeStorageProfileId;
1845                                         /**< Valid if overrideFqid=TRUE, Indicates the relative virtual
1846                                              storage profile offset within the port's storage profiles
1847                                              window; Relevant only if the port was configured with VSP. */
1848 #endif /* (DPAA_VERSION >= 11) */
1849 
1850     t_Handle    h_DirectScheme;         /**< Direct scheme handle to go to. */
1851 } t_FmPcdCcNextKgParams;
1852 
1853 /**************************************************************************//**
1854  @Description   Parameters for defining the next engine after a CC node.
1855 *//***************************************************************************/
1856 typedef struct t_FmPcdCcNextEngineParams {
1857     e_FmPcdEngine                       nextEngine;     /**< User has to initialize parameters
1858                                                              according to nextEngine definition */
1859     union {
1860         t_FmPcdCcNextCcParams           ccParams;       /**< Parameters in case next engine is CC */
1861         t_FmPcdCcNextPlcrParams         plcrParams;     /**< Parameters in case next engine is PLCR */
1862         t_FmPcdCcNextEnqueueParams      enqueueParams;  /**< Parameters in case next engine is BMI */
1863         t_FmPcdCcNextKgParams           kgParams;       /**< Parameters in case next engine is KG */
1864 #if (DPAA_VERSION >= 11)
1865         t_FmPcdCcNextFrParams           frParams;       /**< Parameters in case next engine is FR */
1866 #endif /* (DPAA_VERSION >= 11) */
1867     } params;                                           /**< union used for all the next-engine parameters options */
1868 
1869     t_Handle                            h_Manip;        /**< Handle to Manipulation object.
1870                                                              Relevant if next engine is of type result
1871                                                              (e_FM_PCD_PLCR, e_FM_PCD_KG, e_FM_PCD_DONE) */
1872 
1873     bool                                statisticsEn;   /**< If TRUE, statistics counters are incremented
1874                                                              for each frame passing through this
1875                                                              Coarse Classification entry. */
1876 } t_FmPcdCcNextEngineParams;
1877 
1878 /**************************************************************************//**
1879  @Description   Parameters for defining a single CC key
1880 *//***************************************************************************/
1881 typedef struct t_FmPcdCcKeyParams {
1882     uint8_t                     *p_Key;     /**< Relevant only if 'action' = e_FM_PCD_ACTION_EXACT_MATCH;
1883                                                  pointer to the key of the size defined in keySize */
1884     uint8_t                     *p_Mask;    /**< Relevant only if 'action' = e_FM_PCD_ACTION_EXACT_MATCH;
1885                                                  pointer to the Mask per key  of the size defined
1886                                                  in keySize. p_Key and p_Mask (if defined) has to be
1887                                                  of the same size defined in the keySize;
1888                                                  NOTE that if this value is equal for all entries whithin
1889                                                  this table, the driver will automatically use global-mask
1890                                                  (i.e. one common mask for all entries) instead of private
1891                                                  one; that is done in order to spare some memory and for
1892                                                  better performance. */
1893     t_FmPcdCcNextEngineParams   ccNextEngineParams;
1894                                             /**< parameters for the next for the defined Key in
1895                                                  the p_Key */
1896 } t_FmPcdCcKeyParams;
1897 
1898 /**************************************************************************//**
1899  @Description   Parameters for defining CC keys parameters
1900                 The driver supports two methods for CC node allocation: dynamic and static.
1901                 Static mode was created in order to prevent runtime alloc/free
1902                 of FMan memory (MURAM), which may cause fragmentation; in this mode,
1903                 the driver automatically allocates the memory according to
1904                 'maxNumOfKeys' parameter. The driver calculates the maximal memory
1905                 size that may be used for this CC-Node taking into consideration
1906                 'maskSupport' and 'statisticsMode' parameters.
1907                 When 'action' = e_FM_PCD_ACTION_INDEXED_LOOKUP in the extraction
1908                 parameters of this node, 'maxNumOfKeys' must be equal to 'numOfKeys'.
1909                 In dynamic mode, 'maxNumOfKeys' must be zero. At initialization,
1910                 all required structures are allocated according to 'numOfKeys'
1911                 parameter. During runtime modification, these structures are
1912                 re-allocated according to the updated number of keys.
1913 
1914                 Please note that 'action' and 'icIndxMask' mentioned in the
1915                 specific parameter explanations are passed in the extraction
1916                 parameters of the node (fields of extractCcParams.extractNonHdr).
1917 *//***************************************************************************/
1918 typedef struct t_KeysParams {
1919     uint16_t                    maxNumOfKeys;   /**< Maximum number of keys that will (ever) be used in this CC-Node;
1920                                                      A value of zero may be used for dynamic memory allocation. */
1921     bool                        maskSupport;    /**< This parameter is relevant only if a node is initialized with
1922                                                      'action' = e_FM_PCD_ACTION_EXACT_MATCH and maxNumOfKeys > 0;
1923                                                      Should be TRUE to reserve table memory for key masks, even if
1924                                                      initial keys do not contain masks, or if the node was initialized
1925                                                      as 'empty' (without keys); this will allow user to add keys with
1926                                                      masks at runtime.
1927                                                      NOTE that if user want to use only global-masks (i.e. one common mask
1928                                                      for all the entries within this table, this parameter should set to 'FALSE'. */
1929     e_FmPcdCcStatsMode          statisticsMode; /**< Determines the supported statistics mode for all node's keys.
1930                                                      To enable statistics gathering, statistics should be enabled per
1931                                                      every key, using 'statisticsEn' in next engine parameters structure
1932                                                      of that key;
1933                                                      If 'maxNumOfKeys' is set, all required structures will be
1934                                                      preallocated for all keys. */
1935 #if (DPAA_VERSION >= 11)
1936     uint16_t                    frameLengthRanges[FM_PCD_CC_STATS_MAX_NUM_OF_FLR];
1937                                                 /**< Relevant only for 'RMON' statistics mode
1938                                                      (this feature is supported only on B4860 device);
1939                                                      Holds a list of programmable thresholds - for each received frame,
1940                                                      its length in bytes is examined against these range thresholds and
1941                                                      the appropriate counter is incremented by 1 - for example, to belong
1942                                                      to range i, the following should hold:
1943                                                      range i-1 threshold < frame length <= range i threshold
1944                                                      Each range threshold must be larger then its preceding range
1945                                                      threshold, and last range threshold must be 0xFFFF. */
1946 #endif /* (DPAA_VERSION >= 11) */
1947     uint16_t                    numOfKeys;      /**< Number of initial keys;
1948                                                      Note that in case of 'action' = e_FM_PCD_ACTION_INDEXED_LOOKUP,
1949                                                      this field should be power-of-2 of the number of bits that are
1950                                                      set in 'icIndxMask'. */
1951     uint8_t                     keySize;        /**< Size of key - for extraction of type FULL_FIELD, 'keySize' has
1952                                                      to be the standard size of the selected key; For other extraction
1953                                                      types, 'keySize' has to be as size of extraction; When 'action' =
1954                                                      e_FM_PCD_ACTION_INDEXED_LOOKUP, 'keySize' must be 2. */
1955     t_FmPcdCcKeyParams          keyParams[FM_PCD_MAX_NUM_OF_KEYS];
1956                                                 /**< An array with 'numOfKeys' entries, each entry specifies the
1957                                                      corresponding key parameters;
1958                                                      When 'action' = e_FM_PCD_ACTION_EXACT_MATCH, this value must not
1959                                                      exceed 255 (FM_PCD_MAX_NUM_OF_KEYS-1) as the last entry is saved
1960                                                      for the 'miss' entry. */
1961     t_FmPcdCcNextEngineParams   ccNextEngineParamsForMiss;
1962                                                 /**< Parameters for defining the next engine when a key is not matched;
1963                                                      Not relevant if action = e_FM_PCD_ACTION_INDEXED_LOOKUP. */
1964 } t_KeysParams;
1965 
1966 
1967 /**************************************************************************//**
1968  @Description   Parameters for defining a CC node
1969 *//***************************************************************************/
1970 typedef struct t_FmPcdCcNodeParams {
1971     t_FmPcdExtractEntry         extractCcParams;    /**< Extraction parameters */
1972     t_KeysParams                keysParams;         /**< Keys definition matching the selected extraction */
1973 } t_FmPcdCcNodeParams;
1974 
1975 /**************************************************************************//**
1976  @Description   Parameters for defining a hash table
1977 *//***************************************************************************/
1978 typedef struct t_FmPcdHashTableParams {
1979     uint16_t                    maxNumOfKeys;               /**< Maximum Number Of Keys that will (ever) be used in this Hash-table */
1980     e_FmPcdCcStatsMode          statisticsMode;             /**< If not e_FM_PCD_CC_STATS_MODE_NONE, the required structures for the
1981                                                                  requested statistics mode will be allocated according to maxNumOfKeys. */
1982     uint8_t                     kgHashShift;                /**< KG-Hash-shift as it was configured in the KG-scheme
1983                                                                  that leads to this hash-table. */
1984     uint16_t                    hashResMask;                /**< Mask that will be used on the hash-result;
1985                                                                  The number-of-sets for this hash will be calculated
1986                                                                  as (2^(number of bits set in 'hashResMask'));
1987                                                                  The 4 lower bits must be cleared. */
1988     uint8_t                     hashShift;                  /**< Byte offset from the beginning of the KeyGen hash result to the
1989                                                                  2-bytes to be used as hash index. */
1990     uint8_t                     matchKeySize;               /**< Size of the exact match keys held by the hash buckets */
1991 
1992     t_FmPcdCcNextEngineParams   ccNextEngineParamsForMiss;  /**< Parameters for defining the next engine when a key is not matched */
1993 
1994 } t_FmPcdHashTableParams;
1995 
1996 /**************************************************************************//**
1997  @Description   Parameters for defining a CC tree group.
1998 
1999                 This structure defines a CC group in terms of NetEnv units
2000                 and the action to be taken in each case. The unitIds list must
2001                 be given in order from low to high indices.
2002 
2003                 t_FmPcdCcNextEngineParams is a list of 2^numOfDistinctionUnits
2004                 structures where each defines the next action to be taken for
2005                 each units combination. for example:
2006                 numOfDistinctionUnits = 2
2007                 unitIds = {1,3}
2008                 p_NextEnginePerEntriesInGrp[0] = t_FmPcdCcNextEngineParams for the case that
2009                                                         unit 1 - not found; unit 3 - not found;
2010                 p_NextEnginePerEntriesInGrp[1] = t_FmPcdCcNextEngineParams for the case that
2011                                                         unit 1 - not found; unit 3 - found;
2012                 p_NextEnginePerEntriesInGrp[2] = t_FmPcdCcNextEngineParams for the case that
2013                                                         unit 1 - found; unit 3 - not found;
2014                 p_NextEnginePerEntriesInGrp[3] = t_FmPcdCcNextEngineParams for the case that
2015                                                         unit 1 - found; unit 3 - found;
2016 *//***************************************************************************/
2017 typedef struct t_FmPcdCcGrpParams {
2018     uint8_t                     numOfDistinctionUnits;          /**< Up to 4 */
2019     uint8_t                     unitIds[FM_PCD_MAX_NUM_OF_CC_UNITS];
2020                                                                 /**< Indices of the units as defined in
2021                                                                      FM_PCD_NetEnvCharacteristicsSet() */
2022     t_FmPcdCcNextEngineParams   nextEnginePerEntriesInGrp[FM_PCD_MAX_NUM_OF_CC_ENTRIES_IN_GRP];
2023                                                                 /**< Maximum entries per group is 16 */
2024 } t_FmPcdCcGrpParams;
2025 
2026 /**************************************************************************//**
2027  @Description   Parameters for defining CC tree groups
2028 *//***************************************************************************/
2029 typedef struct t_FmPcdCcTreeParams {
2030     t_Handle                h_NetEnv;                   /**< A handle to the Network environment as returned
2031                                                              by FM_PCD_NetEnvCharacteristicsSet() */
2032     uint8_t                 numOfGrps;                  /**< Number of CC groups within the CC tree */
2033     t_FmPcdCcGrpParams      ccGrpParams[FM_PCD_MAX_NUM_OF_CC_GROUPS];
2034                                                         /**< Parameters for each group. */
2035 } t_FmPcdCcTreeParams;
2036 
2037 
2038 /**************************************************************************//**
2039  @Description   CC key statistics structure
2040 *//***************************************************************************/
2041 typedef struct t_FmPcdCcKeyStatistics {
2042     uint32_t    byteCount;      /**< This counter reflects byte count of frames that
2043                                      were matched by this key. */
2044     uint32_t    frameCount;     /**< This counter reflects count of frames that
2045                                      were matched by this key. */
2046 #if (DPAA_VERSION >= 11)
2047     uint32_t    frameLengthRangeCount[FM_PCD_CC_STATS_MAX_NUM_OF_FLR];
2048                                 /**< These counters reflect how many frames matched
2049                                      this key in 'RMON' statistics mode:
2050                                      Each counter holds the number of frames of a
2051                                      specific frames length range, according to the
2052                                      ranges provided at initialization. */
2053 #endif /* (DPAA_VERSION >= 11) */
2054 } t_FmPcdCcKeyStatistics;
2055 
2056 /**************************************************************************//**
2057  @Description   Parameters for defining policer byte rate
2058 *//***************************************************************************/
2059 typedef struct t_FmPcdPlcrByteRateModeParams {
2060     e_FmPcdPlcrFrameLengthSelect    frameLengthSelection;   /**< Frame length selection */
2061     e_FmPcdPlcrRollBackFrameSelect  rollBackFrameSelection; /**< relevant option only e_FM_PCD_PLCR_L2_FRM_LEN,
2062                                                                  e_FM_PCD_PLCR_FULL_FRM_LEN */
2063 } t_FmPcdPlcrByteRateModeParams;
2064 
2065 /**************************************************************************//**
2066  @Description   Parameters for defining the policer profile (based on
2067                 RFC-2698 or RFC-4115 attributes).
2068 *//***************************************************************************/
2069 typedef struct t_FmPcdPlcrNonPassthroughAlgParams {
2070     e_FmPcdPlcrRateMode              rateMode;                       /**< Byte mode or Packet mode */
2071     t_FmPcdPlcrByteRateModeParams    byteModeParams;                 /**< Valid for Byte NULL for Packet */
2072     uint32_t                         committedInfoRate;              /**< KBits/Second or Packets/Second */
2073     uint32_t                         committedBurstSize;             /**< Bytes/Packets */
2074     uint32_t                         peakOrExcessInfoRate;           /**< KBits/Second or Packets/Second */
2075     uint32_t                         peakOrExcessBurstSize;          /**< Bytes/Packets */
2076 } t_FmPcdPlcrNonPassthroughAlgParams;
2077 
2078 /**************************************************************************//**
2079  @Description   Parameters for defining the next engine after policer
2080 *//***************************************************************************/
2081 typedef union u_FmPcdPlcrNextEngineParams {
2082     e_FmPcdDoneAction               action;             /**< Action - when next engine is BMI (done) */
2083     t_Handle                        h_Profile;          /**< Policer profile handle -  used when next engine
2084                                                              is Policer, must be a SHARED profile */
2085     t_Handle                        h_DirectScheme;     /**< Direct scheme select - when next engine is KeyGen */
2086 } u_FmPcdPlcrNextEngineParams;
2087 
2088 /**************************************************************************//**
2089  @Description   Parameters for defining the policer profile entry
2090 *//***************************************************************************/
2091 typedef struct t_FmPcdPlcrProfileParams {
2092     bool                                modify;                     /**< TRUE to change an existing profile */
2093     union {
2094         struct {
2095             e_FmPcdProfileTypeSelection profileType;                /**< Type of policer profile */
2096             t_Handle                    h_FmPort;                   /**< Relevant for per-port profiles only */
2097             uint16_t                    relativeProfileId;          /**< Profile id - relative to shared group or to port */
2098         } newParams;                                                /**< use it when modify = FALSE */
2099         t_Handle                        h_Profile;                  /**< A handle to a profile - use it when modify=TRUE */
2100     } id;
2101     e_FmPcdPlcrAlgorithmSelection       algSelection;               /**< Profile Algorithm PASS_THROUGH, RFC_2698, RFC_4115 */
2102     e_FmPcdPlcrColorMode                colorMode;                  /**< COLOR_BLIND, COLOR_AWARE */
2103 
2104     union {
2105         e_FmPcdPlcrColor                dfltColor;                  /**< For Color-Blind Pass-Through mode; the policer will re-color
2106                                                                          any incoming packet with the default value. */
2107         e_FmPcdPlcrColor                override;                   /**< For Color-Aware modes; the profile response to a
2108                                                                          pre-color value of 2'b11. */
2109     } color;
2110 
2111     t_FmPcdPlcrNonPassthroughAlgParams  nonPassthroughAlgParams;    /**< RFC2698 or RFC4115 parameters */
2112 
2113     e_FmPcdEngine                       nextEngineOnGreen;          /**< Next engine for green-colored frames */
2114     u_FmPcdPlcrNextEngineParams         paramsOnGreen;              /**< Next engine parameters for green-colored frames  */
2115 
2116     e_FmPcdEngine                       nextEngineOnYellow;         /**< Next engine for yellow-colored frames */
2117     u_FmPcdPlcrNextEngineParams         paramsOnYellow;             /**< Next engine parameters for yellow-colored frames  */
2118 
2119     e_FmPcdEngine                       nextEngineOnRed;            /**< Next engine for red-colored frames */
2120     u_FmPcdPlcrNextEngineParams         paramsOnRed;                /**< Next engine parameters for red-colored frames  */
2121 
2122     bool                                trapProfileOnFlowA;         /**< Obsolete - do not use */
2123     bool                                trapProfileOnFlowB;         /**< Obsolete - do not use */
2124     bool                                trapProfileOnFlowC;         /**< Obsolete - do not use */
2125 } t_FmPcdPlcrProfileParams;
2126 
2127 /**************************************************************************//**
2128  @Description   Parameters for selecting a location for requested manipulation
2129 *//***************************************************************************/
2130 typedef struct t_FmManipHdrInfo {
2131     e_NetHeaderType                     hdr;            /**< Header selection */
2132     e_FmPcdHdrIndex                     hdrIndex;       /**< Relevant only for MPLS, VLAN and tunneled IP. Otherwise should be cleared. */
2133     bool                                byField;        /**< TRUE if the location of manipulation is according to some field in the specific header*/
2134     t_FmPcdFields                       fullField;      /**< Relevant only when byField = TRUE: Extract field */
2135 } t_FmManipHdrInfo;
2136 
2137 #if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
2138 /**************************************************************************//**
2139  @Description   Parameters for defining an insertion manipulation
2140                 of type e_FM_PCD_MANIP_INSRT_TO_START_OF_FRAME_TEMPLATE
2141 *//***************************************************************************/
2142 typedef struct t_FmPcdManipHdrInsrtByTemplateParams {
2143     uint8_t         size;                               /**< Size of insert template to the start of the frame. */
2144     uint8_t         hdrTemplate[FM_PCD_MAX_MANIP_INSRT_TEMPLATE_SIZE];
2145                                                         /**< Array of the insertion template. */
2146 
2147     bool            modifyOuterIp;                      /**< TRUE if user want to modify some fields in outer IP. */
2148     struct {
2149         uint16_t    ipOuterOffset;                      /**< Offset of outer IP in the insert template, relevant if modifyOuterIp = TRUE.*/
2150         uint16_t    dscpEcn;                            /**< value of dscpEcn in IP outer, relevant if modifyOuterIp = TRUE.
2151                                                              in IPV4 dscpEcn only byte - it has to be adjusted to the right*/
2152         bool        udpPresent;                         /**< TRUE if UDP is present in the insert template, relevant if modifyOuterIp = TRUE.*/
2153         uint8_t     udpOffset;                          /**< Offset in the insert template of UDP, relevant if modifyOuterIp = TRUE and udpPresent=TRUE.*/
2154         uint8_t     ipIdentGenId;                       /**< Used by FMan-CTRL to calculate IP-identification field,relevant if modifyOuterIp = TRUE.*/
2155         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.*/
2156         struct {
2157             uint8_t blockSize;                          /**< The CAAM block-size; Used by FMan-CTRL to calculate the IP Total Length field.*/
2158             uint8_t extraBytesAddedAlignedToBlockSize;  /**< Used by FMan-CTRL to calculate the IP Total Length field and UDP length*/
2159             uint8_t extraBytesAddedNotAlignedToBlockSize;/**< Used by FMan-CTRL to calculate the IP Total Length field and UDP length.*/
2160         } recalculateLengthParams;                      /**< Recalculate length parameters - relevant if modifyOuterIp = TRUE and recalculateLength = TRUE */
2161     } modifyOuterIpParams;                              /**< Outer IP modification parameters - ignored if modifyOuterIp is FALSE */
2162 
2163     bool            modifyOuterVlan;                    /**< TRUE if user wants to modify VPri field in the outer VLAN header*/
2164     struct {
2165         uint8_t     vpri;                               /**< Value of VPri, relevant if modifyOuterVlan = TRUE
2166                                                              VPri only 3 bits, it has to be adjusted to the right*/
2167     } modifyOuterVlanParams;
2168 } t_FmPcdManipHdrInsrtByTemplateParams;
2169 
2170 /**************************************************************************//**
2171  @Description   Parameters for defining CAPWAP fragmentation
2172 *//***************************************************************************/
2173 typedef struct t_CapwapFragmentationParams {
2174     uint16_t         sizeForFragmentation;              /**< if length of the frame is greater than this value, CAPWAP fragmentation will be executed.*/
2175     bool             headerOptionsCompr;                /**< TRUE - first fragment include the CAPWAP header options field,
2176                                                              and all other fragments exclude the CAPWAP options field,
2177                                                              FALSE - all fragments include CAPWAP header options field. */
2178 } t_CapwapFragmentationParams;
2179 
2180 /**************************************************************************//**
2181  @Description   Parameters for defining CAPWAP reassembly
2182 *//***************************************************************************/
2183 typedef struct t_CapwapReassemblyParams {
2184     uint16_t                        maxNumFramesInProcess;  /**< Number of frames which can be reassembled concurrently; must be power of 2.
2185                                                                  In case numOfFramesPerHashEntry == e_FM_PCD_MANIP_FOUR_WAYS_HASH,
2186                                                                  maxNumFramesInProcess has to be in the range of 4 - 512,
2187                                                                  In case numOfFramesPerHashEntry == e_FM_PCD_MANIP_EIGHT_WAYS_HASH,
2188                                                                  maxNumFramesInProcess has to be in the range of 8 - 2048 */
2189     bool                            haltOnDuplicationFrag;  /**< If TRUE, reassembly process will be halted due to duplicated fragment,
2190                                                                  and all processed fragments will be enqueued with error indication;
2191                                                                  If FALSE, only duplicated fragments will be enqueued with error indication. */
2192 
2193     e_FmPcdManipReassemTimeOutMode  timeOutMode;            /**< Expiration delay initialized by the reassembly process */
2194     uint32_t                        fqidForTimeOutFrames;   /**< FQID in which time out frames will enqueue during Time Out Process  */
2195     uint32_t                        timeoutRoutineRequestTime;
2196                                                             /**< Represents the time interval in microseconds between consecutive
2197                                                                  timeout routine requests It has to be power of 2. */
2198     uint32_t                        timeoutThresholdForReassmProcess;
2199                                                             /**< Time interval (microseconds) for marking frames in process as too old;
2200                                                                  Frames in process are those for which at least one fragment was received
2201                                                                  but not all fragments. */
2202 
2203     e_FmPcdManipReassemWaysNumber   numOfFramesPerHashEntry;/**< Number of frames per hash entry (needed for the reassembly process) */
2204 } t_CapwapReassemblyParams;
2205 
2206 /**************************************************************************//**
2207  @Description   Parameters for defining fragmentation/reassembly manipulation
2208 *//***************************************************************************/
2209 typedef struct t_FmPcdManipFragOrReasmParams {
2210     bool                                frag;               /**< TRUE if using the structure for fragmentation,
2211                                                                  otherwise this structure is used for reassembly */
2212     uint8_t                             sgBpid;             /**< Scatter/Gather buffer pool id;
2213                                                                  Same LIODN number is used for these buffers as for
2214                                                                  the received frames buffers, so buffers of this pool
2215                                                                  need to be allocated in the same memory area as the
2216                                                                  received buffers. If the received buffers arrive
2217                                                                  from different sources, the Scatter/Gather BP id
2218                                                                  should be mutual to all these sources. */
2219     e_NetHeaderType                     hdr;                /**< Header selection */
2220     union {
2221         t_CapwapFragmentationParams     capwapFragParams;   /**< Structure for CAPWAP fragmentation,
2222                                                                  relevant if 'frag' = TRUE, 'hdr' = HEADER_TYPE_CAPWAP */
2223         t_CapwapReassemblyParams        capwapReasmParams;  /**< Structure for CAPWAP reassembly,
2224                                                                  relevant if 'frag' = FALSE, 'hdr' = HEADER_TYPE_CAPWAP */
2225     } u;
2226 } t_FmPcdManipFragOrReasmParams;
2227 #endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */
2228 
2229 
2230 /**************************************************************************//**
2231  @Description   Parameters for defining header removal by header type
2232 *//***************************************************************************/
2233 typedef struct t_FmPcdManipHdrRmvByHdrParams {
2234     e_FmPcdManipHdrRmvByHdrType         type;           /**< Selection of header removal location */
2235     union {
2236 #if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
2237         struct {
2238             bool                        include;        /**< If FALSE, remove until the specified header (not including the header);
2239                                                              If TRUE, remove also the specified header. */
2240             t_FmManipHdrInfo            hdrInfo;
2241         } fromStartByHdr;                               /**< Relevant when type = e_FM_PCD_MANIP_RMV_BY_HDR_FROM_START */
2242 #endif /* (DPAA_VERSION >= 11) || ... */
2243 #if (DPAA_VERSION >= 11)
2244         t_FmManipHdrInfo                hdrInfo;        /**< Relevant when type = e_FM_PCD_MANIP_RMV_BY_HDR_FROM_START */
2245 #endif /* (DPAA_VERSION >= 11) */
2246         e_FmPcdManipHdrRmvSpecificL2    specificL2;     /**< Relevant when type = e_FM_PCD_MANIP_BY_HDR_SPECIFIC_L2;
2247                                                              Defines which L2 headers to remove. */
2248     } u;
2249 } t_FmPcdManipHdrRmvByHdrParams;
2250 
2251 /**************************************************************************//**
2252  @Description   Parameters for configuring IP fragmentation manipulation
2253 
2254  Restrictions:
2255      - IP Fragmentation output fragments must not be forwarded to application directly.
2256      - Maximum number of fragments per frame is 16.
2257      - Fragmentation of IP fragments is not supported.
2258      - IPv4 packets containing header Option fields are fragmented by copying all option
2259        fields to each fragment, regardless of the copy bit value.
2260      - Transmit confirmation is not supported.
2261      - Fragmentation after SEC can't handle S/G frames.
2262      - Fragmentation nodes must be set as the last PCD action (i.e. the
2263        corresponding CC node key must have next engine set to e_FM_PCD_DONE).
2264      - Only BMan buffers shall be used for frames to be fragmented.
2265      - IPF does not support VSP. Therefore, on the same port where we have IPF
2266        we cannot support VSP.
2267      - NOTE: The following comment is relevant only for FMAN v3 devices: IPF
2268        does not support VSP. Therefore, on the same port where we have IPF we
2269        cannot support VSP.
2270 *//***************************************************************************/
2271 typedef struct t_FmPcdManipFragIpParams {
2272     uint16_t                    sizeForFragmentation;   /**< If length of the frame is greater than this value,
2273                                                              IP fragmentation will be executed.*/
2274 #if (DPAA_VERSION == 10)
2275     uint8_t                     scratchBpid;            /**< Absolute buffer pool id according to BM configuration.*/
2276 #endif /* (DPAA_VERSION == 10) */
2277     bool                        sgBpidEn;               /**< Enable a dedicated buffer pool id for the Scatter/Gather buffer allocation;
2278                                                              If disabled, the Scatter/Gather buffer will be allocated from the same pool as the
2279                                                              received frame's buffer. */
2280     uint8_t                     sgBpid;                 /**< Scatter/Gather buffer pool id;
2281                                                              This parameters is relevant when 'sgBpidEn=TRUE';
2282                                                              Same LIODN number is used for these buffers as for the received frames buffers, so buffers
2283                                                              of this pool need to be allocated in the same memory area as the received buffers.
2284                                                              If the received buffers arrive from different sources, the Scatter/Gather BP id should be
2285                                                              mutual to all these sources. */
2286     e_FmPcdManipDontFragAction  dontFragAction;         /**< Don't Fragment Action - If an IP packet is larger
2287                                                              than MTU and its DF bit is set, then this field will
2288                                                              determine the action to be taken.*/
2289 } t_FmPcdManipFragIpParams;
2290 
2291 /**************************************************************************//**
2292  @Description   Parameters for configuring IP reassembly manipulation.
2293 
2294                 This is a common structure for both IPv4 and IPv6 reassembly
2295                 manipulation. For reassembly of both IPv4 and IPv6, make sure to
2296                 set the 'hdr' field in t_FmPcdManipReassemParams to HEADER_TYPE_IPv6.
2297 
2298  Restrictions:
2299     - Application must define at least one scheme to catch the reassembled frames.
2300     - Maximum number of fragments per frame is 16.
2301     - Reassembly of IPv4 fragments containing Option fields is supported.
2302 
2303 *//***************************************************************************/
2304 typedef struct t_FmPcdManipReassemIpParams {
2305     uint8_t                         relativeSchemeId[2];    /**< Partition relative scheme id:
2306                                                                  relativeSchemeId[0] -  Relative scheme ID for IPV4 Reassembly manipulation;
2307                                                                  relativeSchemeId[1] -  Relative scheme ID for IPV6 Reassembly manipulation;
2308                                                                  NOTE: The following comment is relevant only for FMAN v2 devices:
2309                                                                  Relative scheme ID for IPv4/IPv6 Reassembly manipulation must be smaller than
2310                                                                  the user schemes id to ensure that the reassembly schemes will be first match;
2311                                                                  Rest schemes, if defined, should have higher relative scheme ID. */
2312 #if (DPAA_VERSION >= 11)
2313     uint32_t                        nonConsistentSpFqid;    /**< In case that other fragments of the frame corresponds to different storage
2314                                                                  profile than the opening fragment (Non-Consistent-SP state)
2315                                                                  then one of two possible scenarios occurs:
2316                                                                  if 'nonConsistentSpFqid != 0', the reassembled frame will be enqueued to
2317                                                                  this fqid, otherwise a 'Non Consistent SP' bit will be set in the FD[status].*/
2318 #else
2319     uint8_t                         sgBpid;                 /**< Buffer pool id for the S/G frame created by the reassembly process */
2320 #endif /* (DPAA_VERSION >= 11) */
2321     uint8_t                         dataMemId;              /**< Memory partition ID for the IPR's external tables structure */
2322     uint16_t                        dataLiodnOffset;        /**< LIODN offset for access the IPR's external tables structure. */
2323     uint16_t                        minFragSize[2];         /**< Minimum fragment size:
2324                                                                  minFragSize[0] - for ipv4, minFragSize[1] - for ipv6 */
2325     e_FmPcdManipReassemWaysNumber   numOfFramesPerHashEntry[2];
2326                                                             /**< Number of frames per hash entry needed for reassembly process:
2327                                                                  numOfFramesPerHashEntry[0] - for ipv4 (max value is e_FM_PCD_MANIP_EIGHT_WAYS_HASH);
2328                                                                  numOfFramesPerHashEntry[1] - for ipv6 (max value is e_FM_PCD_MANIP_SIX_WAYS_HASH). */
2329     uint16_t                        maxNumFramesInProcess;  /**< Number of frames which can be processed by Reassembly in the same time;
2330                                                                  Must be power of 2;
2331                                                                  In the case numOfFramesPerHashEntry == e_FM_PCD_MANIP_FOUR_WAYS_HASH,
2332                                                                  maxNumFramesInProcess has to be in the range of 4 - 512;
2333                                                                  In the case numOfFramesPerHashEntry == e_FM_PCD_MANIP_EIGHT_WAYS_HASH,
2334                                                                  maxNumFramesInProcess has to be in the range of 8 - 2048. */
2335     e_FmPcdManipReassemTimeOutMode  timeOutMode;            /**< Expiration delay initialized by Reassembly process */
2336     uint32_t                        fqidForTimeOutFrames;   /**< FQID in which time out frames will enqueue during Time Out Process;
2337                                                                  Recommended value for this field is 0; in this way timed-out frames will be discarded */
2338     uint32_t                        timeoutThresholdForReassmProcess;
2339                                                             /**< Represents the time interval in microseconds which defines
2340                                                                  if opened frame (at least one fragment was processed but not all the fragments)is found as too old*/
2341 } t_FmPcdManipReassemIpParams;
2342 
2343 /**************************************************************************//**
2344  @Description   structure for defining IPSEC manipulation
2345 *//***************************************************************************/
2346 typedef struct t_FmPcdManipSpecialOffloadIPSecParams {
2347     bool        decryption;                     /**< TRUE if being used in decryption direction;
2348                                                      FALSE if being used in encryption direction. */
2349     bool        ecnCopy;                        /**< TRUE to copy the ECN bits from inner/outer to outer/inner
2350                                                      (direction depends on the 'decryption' field). */
2351     bool        dscpCopy;                       /**< TRUE to copy the DSCP bits from inner/outer to outer/inner
2352                                                      (direction depends on the 'decryption' field). */
2353     bool        variableIpHdrLen;               /**< TRUE for supporting variable IP header length in decryption. */
2354     bool        variableIpVersion;              /**< TRUE for supporting both IP version on the same SA in encryption */
2355     uint8_t     outerIPHdrLen;                  /**< if 'variableIpVersion == TRUE' then this field must be set to non-zero value;
2356                                                      It is specifies the length of the outer IP header that was configured in the
2357                                                      corresponding SA. */
2358     uint16_t    arwSize;                        /**< if <> '0' then will perform ARW check for this SA;
2359                                                      The value must be a multiplication of 16 */
2360     uintptr_t   arwAddr;                        /**< if arwSize <> '0' then this field must be set to non-zero value;
2361                                                      MUST be allocated from FMAN's MURAM that the post-sec op-port belongs to;
2362                                                      Must be 4B aligned. Required MURAM size is 'NEXT_POWER_OF_2(arwSize+32))/8+4' Bytes */
2363 } t_FmPcdManipSpecialOffloadIPSecParams;
2364 
2365 #if (DPAA_VERSION >= 11)
2366 /**************************************************************************//**
2367  @Description   Parameters for configuring CAPWAP fragmentation manipulation
2368 
2369  Restrictions:
2370      - Maximum number of fragments per frame is 16.
2371      - Transmit confirmation is not supported.
2372      - Fragmentation nodes must be set as the last PCD action (i.e. the
2373        corresponding CC node key must have next engine set to e_FM_PCD_DONE).
2374      - Only BMan buffers shall be used for frames to be fragmented.
2375      - NOTE: The following comment is relevant only for FMAN v3 devices: IPF
2376        does not support VSP. Therefore, on the same port where we have IPF we
2377        cannot support VSP.
2378 *//***************************************************************************/
2379 typedef struct t_FmPcdManipFragCapwapParams {
2380     uint16_t                    sizeForFragmentation;   /**< If length of the frame is greater than this value,
2381                                                              CAPWAP fragmentation will be executed.*/
2382     bool                        sgBpidEn;               /**< Enable a dedicated buffer pool id for the Scatter/Gather buffer allocation;
2383                                                              If disabled, the Scatter/Gather buffer will be allocated from the same pool as the
2384                                                              received frame's buffer. */
2385     uint8_t                     sgBpid;                 /**< Scatter/Gather buffer pool id;
2386                                                              This parameters is relevant when 'sgBpidEn=TRUE';
2387                                                              Same LIODN number is used for these buffers as for the received frames buffers, so buffers
2388                                                              of this pool need to be allocated in the same memory area as the received buffers.
2389                                                              If the received buffers arrive from different sources, the Scatter/Gather BP id should be
2390                                                              mutual to all these sources. */
2391     bool                        compressModeEn;         /**< CAPWAP Header Options Compress Enable mode;
2392                                                              When this mode is enabled then only the first fragment include the CAPWAP header options
2393                                                              field (if user provides it in the input frame) and all other fragments exclude the CAPWAP
2394                                                              options field (CAPWAP header is updated accordingly).*/
2395 } t_FmPcdManipFragCapwapParams;
2396 
2397 /**************************************************************************//**
2398  @Description   Parameters for configuring CAPWAP reassembly manipulation.
2399 
2400  Restrictions:
2401     - Application must define one scheme to catch the reassembled frames.
2402     - Maximum number of fragments per frame is 16.
2403 
2404 *//***************************************************************************/
2405 typedef struct t_FmPcdManipReassemCapwapParams {
2406     uint8_t                         relativeSchemeId;    /**< Partition relative scheme id;
2407                                                                  NOTE: this id must be smaller than the user schemes id to ensure that the reassembly scheme will be first match;
2408                                                                  Rest schemes, if defined, should have higher relative scheme ID. */
2409     uint8_t                         dataMemId;              /**< Memory partition ID for the IPR's external tables structure */
2410     uint16_t                        dataLiodnOffset;        /**< LIODN offset for access the IPR's external tables structure. */
2411     uint16_t                        maxReassembledFrameLength;/**< The maximum CAPWAP reassembled frame length in bytes;
2412                                                                    If maxReassembledFrameLength == 0, any successful reassembled frame length is
2413                                                                    considered as a valid length;
2414                                                                    if maxReassembledFrameLength > 0, a successful reassembled frame which its length
2415                                                                    exceeds this value is considered as an error frame (FD status[CRE] bit is set). */
2416     e_FmPcdManipReassemWaysNumber   numOfFramesPerHashEntry;
2417                                                             /**< Number of frames per hash entry needed for reassembly process */
2418     uint16_t                        maxNumFramesInProcess;  /**< Number of frames which can be processed by reassembly in the same time;
2419                                                                  Must be power of 2;
2420                                                                  In the case numOfFramesPerHashEntry == e_FM_PCD_MANIP_FOUR_WAYS_HASH,
2421                                                                  maxNumFramesInProcess has to be in the range of 4 - 512;
2422                                                                  In the case numOfFramesPerHashEntry == e_FM_PCD_MANIP_EIGHT_WAYS_HASH,
2423                                                                  maxNumFramesInProcess has to be in the range of 8 - 2048. */
2424     e_FmPcdManipReassemTimeOutMode  timeOutMode;            /**< Expiration delay initialized by Reassembly process */
2425     uint32_t                        fqidForTimeOutFrames;   /**< FQID in which time out frames will enqueue during Time Out Process;
2426                                                                  Recommended value for this field is 0; in this way timed-out frames will be discarded */
2427     uint32_t                        timeoutThresholdForReassmProcess;
2428                                                             /**< Represents the time interval in microseconds which defines
2429                                                                  if opened frame (at least one fragment was processed but not all the fragments)is found as too old*/
2430 } t_FmPcdManipReassemCapwapParams;
2431 
2432 /**************************************************************************//**
2433  @Description   structure for defining CAPWAP manipulation
2434 *//***************************************************************************/
2435 typedef struct t_FmPcdManipSpecialOffloadCapwapParams {
2436     bool                    dtls;   /**< TRUE if continue to SEC DTLS encryption */
2437     e_FmPcdManipHdrQosSrc   qosSrc; /**< TODO */
2438 } t_FmPcdManipSpecialOffloadCapwapParams;
2439 
2440 #endif /* (DPAA_VERSION >= 11) */
2441 
2442 
2443 /**************************************************************************//**
2444  @Description   Parameters for defining special offload manipulation
2445 *//***************************************************************************/
2446 typedef struct t_FmPcdManipSpecialOffloadParams {
2447     e_FmPcdManipSpecialOffloadType              type;       /**< Type of special offload manipulation */
2448     union
2449     {
2450         t_FmPcdManipSpecialOffloadIPSecParams   ipsec;      /**< Parameters for IPSec; Relevant when
2451                                                                  type = e_FM_PCD_MANIP_SPECIAL_OFFLOAD_IPSEC */
2452 #if (DPAA_VERSION >= 11)
2453         t_FmPcdManipSpecialOffloadCapwapParams  capwap;     /**< Parameters for CAPWAP; Relevant when
2454                                                                  type = e_FM_PCD_MANIP_SPECIAL_OFFLOAD_CAPWAP */
2455 #endif /* (DPAA_VERSION >= 11) */
2456     } u;
2457 } t_FmPcdManipSpecialOffloadParams;
2458 
2459 /**************************************************************************//**
2460  @Description   Parameters for defining insertion manipulation
2461 *//***************************************************************************/
2462 typedef struct t_FmPcdManipHdrInsrt {
2463     uint8_t size;           /**< size of inserted section */
2464     uint8_t *p_Data;        /**< data to be inserted */
2465 } t_FmPcdManipHdrInsrt;
2466 
2467 
2468 /**************************************************************************//**
2469  @Description   Parameters for defining generic removal manipulation
2470 *//***************************************************************************/
2471 typedef struct t_FmPcdManipHdrRmvGenericParams {
2472     uint8_t                         offset;         /**< Offset from beginning of header to the start
2473                                                          location of the removal */
2474     uint8_t                         size;           /**< Size of removed section */
2475 } t_FmPcdManipHdrRmvGenericParams;
2476 
2477 /**************************************************************************//**
2478  @Description   Parameters for defining generic insertion manipulation
2479 *//***************************************************************************/
2480 typedef struct t_FmPcdManipHdrInsrtGenericParams {
2481     uint8_t                         offset;         /**< Offset from beginning of header to the start
2482                                                          location of the insertion */
2483     uint8_t                         size;           /**< Size of inserted section */
2484     bool                            replace;        /**< TRUE to override (replace) existing data at
2485                                                          'offset', FALSE to insert */
2486     uint8_t                         *p_Data;        /**< Pointer to data to be inserted */
2487 } t_FmPcdManipHdrInsrtGenericParams;
2488 
2489 /**************************************************************************//**
2490  @Description   Parameters for defining header manipulation VLAN DSCP To Vpri translation
2491 *//***************************************************************************/
2492 typedef struct t_FmPcdManipHdrFieldUpdateVlanDscpToVpri {
2493     uint8_t                         dscpToVpriTable[FM_PCD_MANIP_DSCP_TO_VLAN_TRANS];
2494                                                         /**< A table of VPri values for each DSCP value;
2495                                                              The index is the DSCP value (0-0x3F) and the
2496                                                              value is the corresponding VPRI (0-15). */
2497     uint8_t                         vpriDefVal;         /**< 0-7, Relevant only if if updateType =
2498                                                              e_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN,
2499                                                              this field is the Q Tag default value if the
2500                                                              IP header is not found. */
2501 } t_FmPcdManipHdrFieldUpdateVlanDscpToVpri;
2502 
2503 /**************************************************************************//**
2504  @Description   Parameters for defining header manipulation VLAN fields updates
2505 *//***************************************************************************/
2506 typedef struct t_FmPcdManipHdrFieldUpdateVlan {
2507     e_FmPcdManipHdrFieldUpdateVlan                  updateType; /**< Selects VLAN update type */
2508     union {
2509         uint8_t                                     vpri;       /**< 0-7, Relevant only if If updateType =
2510                                                                      e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN_PRI, this
2511                                                                      is the new VLAN pri. */
2512         t_FmPcdManipHdrFieldUpdateVlanDscpToVpri    dscpToVpri; /**< Parameters structure, Relevant only if updateType
2513                                                                      = e_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN. */
2514     } u;
2515 } t_FmPcdManipHdrFieldUpdateVlan;
2516 
2517 /**************************************************************************//**
2518  @Description   Parameters for defining header manipulation IPV4 fields updates
2519 *//***************************************************************************/
2520 typedef struct t_FmPcdManipHdrFieldUpdateIpv4 {
2521     ipv4HdrManipUpdateFlags_t       validUpdates;       /**< ORed flag, selecting the required updates */
2522     uint8_t                         tos;                /**< 8 bit New TOS; Relevant if validUpdates contains
2523                                                              HDR_MANIP_IPV4_TOS */
2524     uint16_t                        id;                 /**< 16 bit New IP ID; Relevant only if validUpdates
2525                                                              contains HDR_MANIP_IPV4_ID */
2526     uint32_t                        src;                /**< 32 bit New IP SRC; Relevant only if validUpdates
2527                                                              contains HDR_MANIP_IPV4_SRC */
2528     uint32_t                        dst;                /**< 32 bit New IP DST; Relevant only if validUpdates
2529                                                              contains HDR_MANIP_IPV4_DST */
2530 } t_FmPcdManipHdrFieldUpdateIpv4;
2531 
2532 /**************************************************************************//**
2533  @Description   Parameters for defining header manipulation IPV6 fields updates
2534 *//***************************************************************************/
2535 typedef struct t_FmPcdManipHdrFieldUpdateIpv6 {
2536     ipv6HdrManipUpdateFlags_t   validUpdates;           /**< ORed flag, selecting the required updates */
2537     uint8_t                     trafficClass;           /**< 8 bit New Traffic Class; Relevant if validUpdates contains
2538                                                              HDR_MANIP_IPV6_TC */
2539     uint8_t                     src[NET_HEADER_FIELD_IPv6_ADDR_SIZE];
2540                                                         /**< 16 byte new IP SRC; Relevant only if validUpdates
2541                                                              contains HDR_MANIP_IPV6_SRC */
2542     uint8_t                     dst[NET_HEADER_FIELD_IPv6_ADDR_SIZE];
2543                                                         /**< 16 byte new IP DST; Relevant only if validUpdates
2544                                                              contains HDR_MANIP_IPV6_DST */
2545 } t_FmPcdManipHdrFieldUpdateIpv6;
2546 
2547 /**************************************************************************//**
2548  @Description   Parameters for defining header manipulation TCP/UDP fields updates
2549 *//***************************************************************************/
2550 typedef struct t_FmPcdManipHdrFieldUpdateTcpUdp {
2551     tcpUdpHdrManipUpdateFlags_t     validUpdates;       /**< ORed flag, selecting the required updates */
2552     uint16_t                        src;                /**< 16 bit New TCP/UDP SRC; Relevant only if validUpdates
2553                                                              contains HDR_MANIP_TCP_UDP_SRC */
2554     uint16_t                        dst;                /**< 16 bit New TCP/UDP DST; Relevant only if validUpdates
2555                                                              contains HDR_MANIP_TCP_UDP_DST */
2556 } t_FmPcdManipHdrFieldUpdateTcpUdp;
2557 
2558 /**************************************************************************//**
2559  @Description   Parameters for defining header manipulation fields updates
2560 *//***************************************************************************/
2561 typedef struct t_FmPcdManipHdrFieldUpdateParams {
2562     e_FmPcdManipHdrFieldUpdateType                  type;           /**< Type of header field update manipulation */
2563     union {
2564         t_FmPcdManipHdrFieldUpdateVlan              vlan;           /**< Parameters for VLAN update. Relevant when
2565                                                                          type = e_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN */
2566         t_FmPcdManipHdrFieldUpdateIpv4              ipv4;           /**< Parameters for IPv4 update. Relevant when
2567                                                                          type = e_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV4 */
2568         t_FmPcdManipHdrFieldUpdateIpv6              ipv6;           /**< Parameters for IPv6 update. Relevant when
2569                                                                          type = e_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV6 */
2570         t_FmPcdManipHdrFieldUpdateTcpUdp            tcpUdp;         /**< Parameters for TCP/UDP update. Relevant when
2571                                                                          type = e_FM_PCD_MANIP_HDR_FIELD_UPDATE_TCP_UDP */
2572     } u;
2573 } t_FmPcdManipHdrFieldUpdateParams;
2574 
2575 
2576 
2577 /**************************************************************************//**
2578  @Description   Parameters for defining custom header manipulation for generic field replacement
2579 *//***************************************************************************/
2580 typedef struct t_FmPcdManipHdrCustomGenFieldReplace {
2581     uint8_t                         srcOffset;          /**< Location of new data - Offset from
2582                                                              Parse Result  (>= 16, srcOffset+size <= 32, ) */
2583     uint8_t                         dstOffset;          /**< Location of data to be overwritten - Offset from
2584                                                              start of frame (dstOffset + size <= 256). */
2585     uint8_t                         size;               /**< The number of bytes (<=16) to be replaced */
2586     uint8_t                         mask;               /**< Optional 1 byte mask. Set to select bits for
2587                                                              replacement (1 - bit will be replaced);
2588                                                              Clear to use field as is. */
2589     uint8_t                         maskOffset;         /**< Relevant if mask != 0;
2590                                                              Mask offset within the replaces "size" */
2591 } t_FmPcdManipHdrCustomGenFieldReplace;
2592 
2593 /**************************************************************************//**
2594  @Description   Parameters for defining custom header manipulation for IP replacement
2595 *//***************************************************************************/
2596 typedef struct t_FmPcdManipHdrCustomIpHdrReplace {
2597     e_FmPcdManipHdrCustomIpReplace  replaceType;        /**< Selects replace update type */
2598     bool                            decTtlHl;           /**< Decrement TTL (IPV4) or Hop limit (IPV6) by 1  */
2599     bool                            updateIpv4Id;       /**< Relevant when replaceType =
2600                                                              e_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV6_BY_IPV4 */
2601     uint16_t                        id;                 /**< 16 bit New IP ID; Relevant only if
2602                                                              updateIpv4Id = TRUE */
2603     uint8_t                         hdrSize;            /**< The size of the new IP header */
2604     uint8_t                         hdr[FM_PCD_MANIP_MAX_HDR_SIZE];
2605                                                         /**< The new IP header */
2606 } t_FmPcdManipHdrCustomIpHdrReplace;
2607 
2608 /**************************************************************************//**
2609  @Description   Parameters for defining custom header manipulation
2610 *//***************************************************************************/
2611 typedef struct t_FmPcdManipHdrCustomParams {
2612     e_FmPcdManipHdrCustomType                   type;           /**< Type of header field update manipulation */
2613     union {
2614         t_FmPcdManipHdrCustomIpHdrReplace       ipHdrReplace;   /**< Parameters IP header replacement */
2615         t_FmPcdManipHdrCustomGenFieldReplace    genFieldReplace;   /**< Parameters IP header replacement */
2616     } u;
2617 } t_FmPcdManipHdrCustomParams;
2618 
2619 /**************************************************************************//**
2620  @Description   Parameters for defining specific L2 insertion manipulation
2621 *//***************************************************************************/
2622 typedef struct t_FmPcdManipHdrInsrtSpecificL2Params {
2623     e_FmPcdManipHdrInsrtSpecificL2  specificL2;     /**< Selects which L2 headers to insert */
2624     bool                            update;         /**< TRUE to update MPLS header */
2625     uint8_t                         size;           /**< size of inserted section */
2626     uint8_t                         *p_Data;        /**< data to be inserted */
2627 } t_FmPcdManipHdrInsrtSpecificL2Params;
2628 
2629 #if (DPAA_VERSION >= 11)
2630 /**************************************************************************//**
2631  @Description   Parameters for defining IP insertion manipulation
2632 *//***************************************************************************/
2633 typedef struct t_FmPcdManipHdrInsrtIpParams {
2634     bool                            calcL4Checksum; /**< Calculate L4 checksum. */
2635     e_FmPcdManipHdrQosMappingMode   mappingMode;    /**< TODO */
2636     uint8_t                         lastPidOffset;  /**< the offset of the last Protocol within
2637                                                          the inserted header */
2638     uint16_t                        id;         /**< 16 bit New IP ID */
2639     bool                            dontFragOverwrite;
2640     /**< IPv4 only. DF is overwritten with the hash-result next-to-last byte.
2641      * This byte is configured to be overwritten when RPD is set. */
2642     uint8_t                         lastDstOffset;
2643     /**< IPv6 only. if routing extension exist, user should set the offset of the destination address
2644      * in order to calculate UDP checksum pseudo header;
2645      * Otherwise set it to '0'. */
2646     t_FmPcdManipHdrInsrt            insrt;      /**< size and data to be inserted. */
2647 } t_FmPcdManipHdrInsrtIpParams;
2648 #endif /* (DPAA_VERSION >= 11) */
2649 
2650 /**************************************************************************//**
2651  @Description   Parameters for defining header insertion manipulation by header type
2652 *//***************************************************************************/
2653 typedef struct t_FmPcdManipHdrInsrtByHdrParams {
2654     e_FmPcdManipHdrInsrtByHdrType               type;   /**< Selects manipulation type */
2655     union {
2656 
2657         t_FmPcdManipHdrInsrtSpecificL2Params    specificL2Params;
2658                                                              /**< Used when type = e_FM_PCD_MANIP_INSRT_BY_HDR_SPECIFIC_L2:
2659                                                               Selects which L2 headers to insert */
2660 #if (DPAA_VERSION >= 11)
2661         t_FmPcdManipHdrInsrtIpParams            ipParams;  /**< Used when type = e_FM_PCD_MANIP_INSRT_BY_HDR_IP */
2662         t_FmPcdManipHdrInsrt                    insrt;     /**< Used when type is one of e_FM_PCD_MANIP_INSRT_BY_HDR_UDP,
2663                                                                 e_FM_PCD_MANIP_INSRT_BY_HDR_UDP_LITE, or
2664                                                                 e_FM_PCD_MANIP_INSRT_BY_HDR_CAPWAP */
2665 #endif /* (DPAA_VERSION >= 11) */
2666     } u;
2667 } t_FmPcdManipHdrInsrtByHdrParams;
2668 
2669 /**************************************************************************//**
2670  @Description   Parameters for defining header insertion manipulation
2671 *//***************************************************************************/
2672 typedef struct t_FmPcdManipHdrInsrtParams {
2673     e_FmPcdManipHdrInsrtType                    type;       /**< Type of insertion manipulation */
2674     union {
2675         t_FmPcdManipHdrInsrtByHdrParams         byHdr;      /**< Parameters for defining header insertion manipulation by header type,
2676                                                                  relevant if 'type' = e_FM_PCD_MANIP_INSRT_BY_HDR */
2677         t_FmPcdManipHdrInsrtGenericParams       generic;    /**< Parameters for defining generic header insertion manipulation,
2678                                                                  relevant if 'type' = e_FM_PCD_MANIP_INSRT_GENERIC */
2679 #if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
2680         t_FmPcdManipHdrInsrtByTemplateParams    byTemplate; /**< Parameters for defining header insertion manipulation by template,
2681                                                                  relevant if 'type' = e_FM_PCD_MANIP_INSRT_BY_TEMPLATE */
2682 #endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */
2683     } u;
2684 } t_FmPcdManipHdrInsrtParams;
2685 
2686 /**************************************************************************//**
2687  @Description   Parameters for defining header removal manipulation
2688 *//***************************************************************************/
2689 typedef struct t_FmPcdManipHdrRmvParams {
2690     e_FmPcdManipHdrRmvType                  type;       /**< Type of header removal manipulation */
2691     union {
2692         t_FmPcdManipHdrRmvByHdrParams       byHdr;      /**< Parameters for defining header removal manipulation by header type,
2693                                                              relevant if type = e_FM_PCD_MANIP_RMV_BY_HDR */
2694         t_FmPcdManipHdrRmvGenericParams     generic;    /**< Parameters for defining generic header removal manipulation,
2695                                                              relevant if type = e_FM_PCD_MANIP_RMV_GENERIC */
2696     } u;
2697 } t_FmPcdManipHdrRmvParams;
2698 
2699 /**************************************************************************//**
2700  @Description   Parameters for defining header manipulation node
2701 *//***************************************************************************/
2702 typedef struct t_FmPcdManipHdrParams {
2703     bool                                        rmv;                /**< TRUE, to define removal manipulation */
2704     t_FmPcdManipHdrRmvParams                    rmvParams;          /**< Parameters for removal manipulation, relevant if 'rmv' = TRUE */
2705 
2706     bool                                        insrt;              /**< TRUE, to define insertion manipulation */
2707     t_FmPcdManipHdrInsrtParams                  insrtParams;        /**< Parameters for insertion manipulation, relevant if 'insrt' = TRUE */
2708 
2709     bool                                        fieldUpdate;        /**< TRUE, to define field update manipulation */
2710     t_FmPcdManipHdrFieldUpdateParams            fieldUpdateParams;  /**< Parameters for field update manipulation, relevant if 'fieldUpdate' = TRUE */
2711 
2712     bool                                        custom;             /**< TRUE, to define custom manipulation */
2713     t_FmPcdManipHdrCustomParams                 customParams;       /**< Parameters for custom manipulation, relevant if 'custom' = TRUE */
2714 
2715     bool                                        dontParseAfterManip;/**< TRUE to de-activate the parser after the manipulation defined in this node.
2716                                                                                           Restrictions:
2717                                                                                           1. MUST be set if the next engine after the CC is not another CC node
2718                                                                                           (but rather Policer or Keygen), and this is the last (no h_NextManip) in a chain
2719                                                                                           of manipulation nodes. This includes single nodes (i.e. no h_NextManip and
2720                                                                                           also never pointed as h_NextManip of other manipulation nodes)
2721                                                                                           2. MUST be set if the next engine after the CC is another CC node, and
2722                                                                                           this is NOT the last manipulation node (i.e. it has h_NextManip).*/
2723 } t_FmPcdManipHdrParams;
2724 
2725 /**************************************************************************//**
2726  @Description   Parameters for defining fragmentation manipulation
2727 *//***************************************************************************/
2728 typedef struct t_FmPcdManipFragParams {
2729     e_NetHeaderType                     hdr;          /**< Header selection */
2730     union {
2731 #if (DPAA_VERSION >= 11)
2732         t_FmPcdManipFragCapwapParams    capwapFrag;   /**< Parameters for defining CAPWAP fragmentation,
2733                                                            relevant if 'hdr' = HEADER_TYPE_CAPWAP */
2734 #endif /* (DPAA_VERSION >= 11) */
2735         t_FmPcdManipFragIpParams        ipFrag;       /**< Parameters for defining IP fragmentation,
2736                                                            relevant if 'hdr' = HEADER_TYPE_Ipv4 or HEADER_TYPE_Ipv6 */
2737     } u;
2738 } t_FmPcdManipFragParams;
2739 
2740 /**************************************************************************//**
2741  @Description   Parameters for defining reassembly manipulation
2742 *//***************************************************************************/
2743 typedef struct t_FmPcdManipReassemParams {
2744     e_NetHeaderType                     hdr;          /**< Header selection */
2745     union {
2746 #if (DPAA_VERSION >= 11)
2747         t_FmPcdManipReassemCapwapParams capwapReassem;  /**< Parameters for defining CAPWAP reassembly,
2748                                                            relevant if 'hdr' = HEADER_TYPE_CAPWAP */
2749 #endif /* (DPAA_VERSION >= 11) */
2750 
2751         t_FmPcdManipReassemIpParams     ipReassem;    /**< Parameters for defining IP reassembly,
2752                                                            relevant if 'hdr' = HEADER_TYPE_Ipv4 or HEADER_TYPE_Ipv6 */
2753     } u;
2754 } t_FmPcdManipReassemParams;
2755 
2756 /**************************************************************************//**
2757  @Description   Parameters for defining a manipulation node
2758 *//***************************************************************************/
2759 typedef struct t_FmPcdManipParams {
2760     e_FmPcdManipType                        type;               /**< Selects type of manipulation node */
2761     union{
2762         t_FmPcdManipHdrParams               hdr;                /**< Parameters for defining header manipulation node */
2763         t_FmPcdManipReassemParams           reassem;            /**< Parameters for defining reassembly manipulation node */
2764         t_FmPcdManipFragParams              frag;               /**< Parameters for defining fragmentation manipulation node */
2765         t_FmPcdManipSpecialOffloadParams    specialOffload;     /**< Parameters for defining special offload manipulation node */
2766     } u;
2767 
2768     t_Handle                                h_NextManip;        /**< Supported for Header Manipulation only;
2769                                                                      Handle to another (previously defined) manipulation node;
2770                                                                      Allows concatenation of manipulation actions;
2771                                                                      This parameter is optional and may be NULL. */
2772 #if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
2773     bool                                    fragOrReasm;        /**< TRUE, if defined fragmentation/reassembly manipulation */
2774     t_FmPcdManipFragOrReasmParams           fragOrReasmParams;  /**< Parameters for fragmentation/reassembly manipulation,
2775                                                                      relevant if fragOrReasm = TRUE */
2776 #endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */
2777 } t_FmPcdManipParams;
2778 
2779 /**************************************************************************//**
2780  @Description   Structure for retrieving IP reassembly statistics
2781 *//***************************************************************************/
2782 typedef struct t_FmPcdManipReassemIpStats {
2783     /* common counters for both IPv4 and IPv6 */
2784     uint32_t        timeout;                    /**< Counts the number of timeout occurrences */
2785     uint32_t        rfdPoolBusy;                /**< Counts the number of failed attempts to allocate
2786                                                      a Reassembly Frame Descriptor */
2787     uint32_t        internalBufferBusy;         /**< Counts the number of times an internal buffer busy occurred */
2788     uint32_t        externalBufferBusy;         /**< Counts the number of times external buffer busy occurred */
2789     uint32_t        sgFragments;                /**< Counts the number of Scatter/Gather fragments */
2790     uint32_t        dmaSemaphoreDepletion;      /**< Counts the number of failed attempts to allocate a DMA semaphore */
2791 #if (DPAA_VERSION >= 11)
2792     uint32_t        nonConsistentSp;            /**< Counts the number of Non Consistent Storage Profile events for
2793                                                      successfully reassembled frames */
2794 #endif /* (DPAA_VERSION >= 11) */
2795     struct {
2796         uint32_t    successfullyReassembled;    /**< Counts the number of successfully reassembled frames */
2797         uint32_t    validFragments;             /**< Counts the total number of valid fragments that
2798                                                      have been processed for all frames */
2799         uint32_t    processedFragments;         /**< Counts the number of processed fragments
2800                                                      (valid and error fragments) for all frames */
2801         uint32_t    malformedFragments;         /**< Counts the number of malformed fragments processed for all frames */
2802         uint32_t    discardedFragments;         /**< Counts the number of fragments discarded by the reassembly process */
2803         uint32_t    autoLearnBusy;              /**< Counts the number of times a busy condition occurs when attempting
2804                                                      to access an IP-Reassembly Automatic Learning Hash set */
2805         uint32_t    moreThan16Fragments;        /**< Counts the fragment occurrences in which the number of fragments-per-frame
2806                                                      exceeds 16 */
2807     } specificHdrStatistics[2];                 /**< slot '0' is for IPv4, slot '1' is for IPv6 */
2808 } t_FmPcdManipReassemIpStats;
2809 
2810 /**************************************************************************//**
2811  @Description   Structure for retrieving IP fragmentation statistics
2812 *//***************************************************************************/
2813 typedef struct t_FmPcdManipFragIpStats {
2814     uint32_t    totalFrames;            /**< Number of frames that passed through the manipulation node */
2815     uint32_t    fragmentedFrames;       /**< Number of frames that were fragmented */
2816     uint32_t    generatedFragments;     /**< Number of fragments that were generated */
2817 } t_FmPcdManipFragIpStats;
2818 
2819 #if (DPAA_VERSION >= 11)
2820 /**************************************************************************//**
2821  @Description   Structure for retrieving CAPWAP reassembly statistics
2822 *//***************************************************************************/
2823 typedef struct t_FmPcdManipReassemCapwapStats {
2824     uint32_t    timeout;                    /**< Counts the number of timeout occurrences */
2825     uint32_t    rfdPoolBusy;                /**< Counts the number of failed attempts to allocate
2826                                                  a Reassembly Frame Descriptor */
2827     uint32_t    internalBufferBusy;         /**< Counts the number of times an internal buffer busy occurred */
2828     uint32_t    externalBufferBusy;         /**< Counts the number of times external buffer busy occurred */
2829     uint32_t    sgFragments;                /**< Counts the number of Scatter/Gather fragments */
2830     uint32_t    dmaSemaphoreDepletion;      /**< Counts the number of failed attempts to allocate a DMA semaphore */
2831     uint32_t    successfullyReassembled;    /**< Counts the number of successfully reassembled frames */
2832     uint32_t    validFragments;             /**< Counts the total number of valid fragments that
2833                                                  have been processed for all frames */
2834     uint32_t    processedFragments;         /**< Counts the number of processed fragments
2835                                                  (valid and error fragments) for all frames */
2836     uint32_t    malformedFragments;         /**< Counts the number of malformed fragments processed for all frames */
2837     uint32_t    autoLearnBusy;              /**< Counts the number of times a busy condition occurs when attempting
2838                                                  to access an Reassembly Automatic Learning Hash set */
2839     uint32_t    discardedFragments;         /**< Counts the number of fragments discarded by the reassembly process */
2840     uint32_t    moreThan16Fragments;        /**< Counts the fragment occurrences in which the number of fragments-per-frame
2841                                                  exceeds 16 */
2842     uint32_t    exceedMaxReassemblyFrameLen;/**< ounts the number of times that a successful reassembled frame
2843                                                  length exceeds MaxReassembledFrameLength value */
2844 } t_FmPcdManipReassemCapwapStats;
2845 
2846 /**************************************************************************//**
2847  @Description   Structure for retrieving CAPWAP fragmentation statistics
2848 *//***************************************************************************/
2849 typedef struct t_FmPcdManipFragCapwapStats {
2850     uint32_t    totalFrames;            /**< Number of frames that passed through the manipulation node */
2851     uint32_t    fragmentedFrames;       /**< Number of frames that were fragmented */
2852     uint32_t    generatedFragments;     /**< Number of fragments that were generated */
2853 #if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
2854     uint8_t     sgAllocationFailure;    /**< Number of allocation failure of s/g buffers */
2855 #endif /* (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0)) */
2856 } t_FmPcdManipFragCapwapStats;
2857 #endif /* (DPAA_VERSION >= 11) */
2858 
2859 /**************************************************************************//**
2860  @Description   Structure for retrieving reassembly statistics
2861 *//***************************************************************************/
2862 typedef struct t_FmPcdManipReassemStats {
2863     union {
2864         t_FmPcdManipReassemIpStats  ipReassem;  /**< Structure for IP reassembly statistics */
2865 #if (DPAA_VERSION >= 11)
2866         t_FmPcdManipReassemCapwapStats  capwapReassem;  /**< Structure for CAPWAP reassembly statistics */
2867 #endif /* (DPAA_VERSION >= 11) */
2868     } u;
2869 } t_FmPcdManipReassemStats;
2870 
2871 /**************************************************************************//**
2872  @Description   Structure for retrieving fragmentation statistics
2873 *//***************************************************************************/
2874 typedef struct t_FmPcdManipFragStats {
2875     union {
2876         t_FmPcdManipFragIpStats     ipFrag;     /**< Structure for IP fragmentation statistics */
2877 #if (DPAA_VERSION >= 11)
2878         t_FmPcdManipFragCapwapStats capwapFrag; /**< Structure for CAPWAP fragmentation statistics */
2879 #endif /* (DPAA_VERSION >= 11) */
2880     } u;
2881 } t_FmPcdManipFragStats;
2882 
2883 /**************************************************************************//**
2884  @Description   Structure for selecting manipulation statistics
2885 *//***************************************************************************/
2886 typedef struct t_FmPcdManipStats {
2887     union {
2888         t_FmPcdManipReassemStats    reassem;    /**< Structure for reassembly statistics */
2889         t_FmPcdManipFragStats       frag;       /**< Structure for fragmentation statistics */
2890     } u;
2891 } t_FmPcdManipStats;
2892 
2893 #if (DPAA_VERSION >= 11)
2894 /**************************************************************************//**
2895  @Description   Parameters for defining frame replicator group and its members
2896 *//***************************************************************************/
2897 typedef struct t_FmPcdFrmReplicGroupParams {
2898     uint8_t                     maxNumOfEntries;    /**< Maximal number of members in the group;
2899                                                          Must be at least 2. */
2900     uint8_t                     numOfEntries;       /**< Number of members in the group;
2901                                                          Must be at least 1. */
2902     t_FmPcdCcNextEngineParams   nextEngineParams[FM_PCD_FRM_REPLIC_MAX_NUM_OF_ENTRIES];
2903                                                     /**< Array of members' parameters */
2904 } t_FmPcdFrmReplicGroupParams;
2905 #endif /* (DPAA_VERSION >= 11) */
2906 
2907 #if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
2908 /**************************************************************************//**
2909  @Description   structure for defining statistics node
2910 *//***************************************************************************/
2911 typedef struct t_FmPcdStatsParams {
2912     e_FmPcdStatsType    type;   /**< type of statistics node */
2913 } t_FmPcdStatsParams;
2914 #endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */
2915 
2916 /**************************************************************************//**
2917  @Function      FM_PCD_NetEnvCharacteristicsSet
2918 
2919  @Description   Define a set of Network Environment Characteristics.
2920 
2921                 When setting an environment it is important to understand its
2922                 application. It is not meant to describe the flows that will run
2923                 on the ports using this environment, but what the user means TO DO
2924                 with the PCD mechanisms in order to parse-classify-distribute those
2925                 frames.
2926                 By specifying a distinction unit, the user means it would use that option
2927                 for distinction between frames at either a KeyGen scheme or a coarse
2928                 classification action descriptor. Using interchangeable headers to define a
2929                 unit means that the user is indifferent to which of the interchangeable
2930                 headers is present in the frame, and wants the distinction to be based
2931                 on the presence of either one of them.
2932 
2933                 Depending on context, there are limitations to the use of environments. A
2934                 port using the PCD functionality is bound to an environment. Some or even
2935                 all ports may share an environment but also an environment per port is
2936                 possible. When initializing a scheme, a classification plan group (see below),
2937                 or a coarse classification tree, one of the initialized environments must be
2938                 stated and related to. When a port is bound to a scheme, a classification
2939                 plan group, or a coarse classification tree, it MUST be bound to the same
2940                 environment.
2941 
2942                 The different PCD modules, may relate (for flows definition) ONLY on
2943                 distinction units as defined by their environment. When initializing a
2944                 scheme for example, it may not choose to select IPV4 as a match for
2945                 recognizing flows unless it was defined in the relating environment. In
2946                 fact, to guide the user through the configuration of the PCD, each module's
2947                 characterization in terms of flows is not done using protocol names, but using
2948                 environment indexes.
2949 
2950                 In terms of HW implementation, the list of distinction units sets the LCV vectors
2951                 and later used for match vector, classification plan vectors and coarse classification
2952                 indexing.
2953 
2954  @Param[in]     h_FmPcd         FM PCD module descriptor.
2955  @Param[in]     p_NetEnvParams  A structure of parameters for the initialization of
2956                                 the network environment.
2957 
2958  @Return        A handle to the initialized object on success; NULL code otherwise.
2959 
2960  @Cautions      Allowed only following FM_PCD_Init().
2961 *//***************************************************************************/
2962 t_Handle FM_PCD_NetEnvCharacteristicsSet(t_Handle h_FmPcd, t_FmPcdNetEnvParams *p_NetEnvParams);
2963 
2964 /**************************************************************************//**
2965  @Function      FM_PCD_NetEnvCharacteristicsDelete
2966 
2967  @Description   Deletes a set of Network Environment Characteristics.
2968 
2969  @Param[in]     h_NetEnv        A handle to the Network environment.
2970 
2971  @Return        E_OK on success; Error code otherwise.
2972 *//***************************************************************************/
2973 t_Error FM_PCD_NetEnvCharacteristicsDelete(t_Handle h_NetEnv);
2974 
2975 /**************************************************************************//**
2976  @Function      FM_PCD_KgSchemeSet
2977 
2978  @Description   Initializing or modifying and enabling a scheme for the KeyGen.
2979                 This routine should be called for adding or modifying a scheme.
2980                 When a scheme needs modifying, the API requires that it will be
2981                 rewritten. In such a case 'modify' should be TRUE. If the
2982                 routine is called for a valid scheme and 'modify' is FALSE,
2983                 it will return error.
2984 
2985  @Param[in]     h_FmPcd         If this is a new scheme - A handle to an FM PCD Module.
2986                                 Otherwise NULL (ignored by driver).
2987  @Param[in,out] p_SchemeParams  A structure of parameters for defining the scheme
2988 
2989  @Return        A handle to the initialized scheme on success; NULL code otherwise.
2990                 When used as "modify" (rather than for setting a new scheme),
2991                 p_SchemeParams->id.h_Scheme will return NULL if action fails due to scheme
2992                 BUSY state.
2993 
2994  @Cautions      Allowed only following FM_PCD_Init().
2995 *//***************************************************************************/
2996 t_Handle FM_PCD_KgSchemeSet(t_Handle                h_FmPcd,
2997                             t_FmPcdKgSchemeParams   *p_SchemeParams);
2998 
2999 /**************************************************************************//**
3000  @Function      FM_PCD_KgSchemeDelete
3001 
3002  @Description   Deleting an initialized scheme.
3003 
3004  @Param[in]     h_Scheme        scheme handle as returned by FM_PCD_KgSchemeSet()
3005 
3006  @Return        E_OK on success; Error code otherwise.
3007 
3008  @Cautions      Allowed only following FM_PCD_Init() & FM_PCD_KgSchemeSet().
3009 *//***************************************************************************/
3010 t_Error     FM_PCD_KgSchemeDelete(t_Handle h_Scheme);
3011 
3012 /**************************************************************************//**
3013  @Function      FM_PCD_KgSchemeGetCounter
3014 
3015  @Description   Reads scheme packet counter.
3016 
3017  @Param[in]     h_Scheme        scheme handle as returned by FM_PCD_KgSchemeSet().
3018 
3019  @Return        Counter's current value.
3020 
3021  @Cautions      Allowed only following FM_PCD_Init() & FM_PCD_KgSchemeSet().
3022 *//***************************************************************************/
3023 uint32_t  FM_PCD_KgSchemeGetCounter(t_Handle h_Scheme);
3024 
3025 /**************************************************************************//**
3026  @Function      FM_PCD_KgSchemeSetCounter
3027 
3028  @Description   Writes scheme packet counter.
3029 
3030  @Param[in]     h_Scheme        scheme handle as returned by FM_PCD_KgSchemeSet().
3031  @Param[in]     value           New scheme counter value - typically '0' for
3032                                 resetting the counter.
3033 
3034  @Return        E_OK on success; Error code otherwise.
3035 
3036  @Cautions      Allowed only following FM_PCD_Init() & FM_PCD_KgSchemeSet().
3037 *//***************************************************************************/
3038 t_Error  FM_PCD_KgSchemeSetCounter(t_Handle h_Scheme, uint32_t value);
3039 
3040 /**************************************************************************//**
3041  @Function      FM_PCD_PlcrProfileSet
3042 
3043  @Description   Sets a profile entry in the policer profile table.
3044                 The routine overrides any existing value.
3045 
3046  @Param[in]     h_FmPcd           A handle to an FM PCD Module.
3047  @Param[in]     p_Profile         A structure of parameters for defining a
3048                                   policer profile entry.
3049 
3050  @Return        A handle to the initialized object on success; NULL code otherwise.
3051                 When used as "modify" (rather than for setting a new profile),
3052                 p_Profile->id.h_Profile will return NULL if action fails due to profile
3053                 BUSY state.
3054  @Cautions      Allowed only following FM_PCD_Init().
3055 *//***************************************************************************/
3056 t_Handle FM_PCD_PlcrProfileSet(t_Handle                  h_FmPcd,
3057                                t_FmPcdPlcrProfileParams  *p_Profile);
3058 
3059 /**************************************************************************//**
3060  @Function      FM_PCD_PlcrProfileDelete
3061 
3062  @Description   Delete a profile entry in the policer profile table.
3063                 The routine set entry to invalid.
3064 
3065  @Param[in]     h_Profile       A handle to the profile.
3066 
3067  @Return        E_OK on success; Error code otherwise.
3068 
3069  @Cautions      Allowed only following FM_PCD_Init().
3070 *//***************************************************************************/
3071 t_Error FM_PCD_PlcrProfileDelete(t_Handle h_Profile);
3072 
3073 /**************************************************************************//**
3074  @Function      FM_PCD_PlcrProfileGetCounter
3075 
3076  @Description   Sets an entry in the classification plan.
3077                 The routine overrides any existing value.
3078 
3079  @Param[in]     h_Profile       A handle to the profile.
3080  @Param[in]     counter         Counter selector.
3081 
3082  @Return        specific counter value.
3083 
3084  @Cautions      Allowed only following FM_PCD_Init().
3085 *//***************************************************************************/
3086 uint32_t FM_PCD_PlcrProfileGetCounter(t_Handle                      h_Profile,
3087                                       e_FmPcdPlcrProfileCounters    counter);
3088 
3089 /**************************************************************************//**
3090  @Function      FM_PCD_PlcrProfileSetCounter
3091 
3092  @Description   Sets an entry in the classification plan.
3093                 The routine overrides any existing value.
3094 
3095  @Param[in]     h_Profile       A handle to the profile.
3096  @Param[in]     counter         Counter selector.
3097  @Param[in]     value           value to set counter with.
3098 
3099  @Return        E_OK on success; Error code otherwise.
3100 
3101  @Cautions      Allowed only following FM_PCD_Init().
3102 *//***************************************************************************/
3103 t_Error FM_PCD_PlcrProfileSetCounter(t_Handle                   h_Profile,
3104                                      e_FmPcdPlcrProfileCounters counter,
3105                                      uint32_t                   value);
3106 
3107 /**************************************************************************//**
3108  @Function      FM_PCD_CcRootBuild
3109 
3110  @Description   This routine must be called to define a complete coarse
3111                 classification tree. This is the way to define coarse
3112                 classification to a certain flow - the KeyGen schemes
3113                 may point only to trees defined in this way.
3114 
3115  @Param[in]     h_FmPcd         FM PCD module descriptor.
3116  @Param[in]     p_Params        A structure of parameters to define the tree.
3117 
3118  @Return        A handle to the initialized object on success; NULL code otherwise.
3119 
3120  @Cautions      Allowed only following FM_PCD_Init().
3121 *//***************************************************************************/
3122 t_Handle FM_PCD_CcRootBuild (t_Handle             h_FmPcd,
3123                              t_FmPcdCcTreeParams  *p_Params);
3124 
3125 /**************************************************************************//**
3126  @Function      FM_PCD_CcRootDelete
3127 
3128  @Description   Deleting an built tree.
3129 
3130  @Param[in]     h_CcTree        A handle to a CC tree.
3131 
3132  @Return        E_OK on success; Error code otherwise.
3133 
3134  @Cautions      Allowed only following FM_PCD_Init().
3135 *//***************************************************************************/
3136 t_Error FM_PCD_CcRootDelete(t_Handle h_CcTree);
3137 
3138 /**************************************************************************//**
3139  @Function      FM_PCD_CcRootModifyNextEngine
3140 
3141  @Description   Modify the Next Engine Parameters in the entry of the tree.
3142 
3143  @Param[in]     h_CcTree                    A handle to the tree
3144  @Param[in]     grpId                       A Group index in the tree
3145  @Param[in]     index                       Entry index in the group defined by grpId
3146  @Param[in]     p_FmPcdCcNextEngineParams   Pointer to new next engine parameters
3147 
3148  @Return        E_OK on success; Error code otherwise.
3149 
3150  @Cautions      Allowed only following FM_PCD_CcBuildTree().
3151 *//***************************************************************************/
3152 t_Error FM_PCD_CcRootModifyNextEngine(t_Handle                  h_CcTree,
3153                                       uint8_t                   grpId,
3154                                       uint8_t                   index,
3155                                       t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);
3156 
3157 /**************************************************************************//**
3158  @Function      FM_PCD_MatchTableSet
3159 
3160  @Description   This routine should be called for each CC (coarse classification)
3161                 node. The whole CC tree should be built bottom up so that each
3162                 node points to already defined nodes.
3163 
3164  @Param[in]     h_FmPcd         FM PCD module descriptor.
3165  @Param[in]     p_Param         A structure of parameters defining the CC node
3166 
3167  @Return        A handle to the initialized object on success; NULL code otherwise.
3168 
3169  @Cautions      Allowed only following FM_PCD_Init().
3170 *//***************************************************************************/
3171 t_Handle   FM_PCD_MatchTableSet(t_Handle h_FmPcd, t_FmPcdCcNodeParams *p_Param);
3172 
3173 /**************************************************************************//**
3174  @Function      FM_PCD_MatchTableDelete
3175 
3176  @Description   Deleting an built node.
3177 
3178  @Param[in]     h_CcNode        A handle to a CC node.
3179 
3180  @Return        E_OK on success; Error code otherwise.
3181 
3182  @Cautions      Allowed only following FM_PCD_Init().
3183 *//***************************************************************************/
3184 t_Error FM_PCD_MatchTableDelete(t_Handle h_CcNode);
3185 
3186 /**************************************************************************//**
3187  @Function      FM_PCD_MatchTableModifyMissNextEngine
3188 
3189  @Description   Modify the Next Engine Parameters of the Miss key case of the node.
3190 
3191  @Param[in]     h_CcNode                    A handle to the node
3192  @Param[in]     p_FmPcdCcNextEngineParams   Parameters for defining next engine
3193 
3194  @Return        E_OK on success; Error code otherwise.
3195 
3196  @Cautions      Allowed only following FM_PCD_MatchTableSet();
3197                 Not relevant in the case the node is of type 'INDEXED_LOOKUP'.
3198                 When configuring nextEngine = e_FM_PCD_CC, note that
3199                 p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different
3200                 from the currently changed table.
3201 
3202 *//***************************************************************************/
3203 t_Error FM_PCD_MatchTableModifyMissNextEngine(t_Handle                  h_CcNode,
3204                                               t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);
3205 
3206 /**************************************************************************//**
3207  @Function      FM_PCD_MatchTableRemoveKey
3208 
3209  @Description   Remove the key (including next engine parameters of this key)
3210                 defined by the index of the relevant node.
3211 
3212  @Param[in]     h_CcNode                    A handle to the node
3213  @Param[in]     keyIndex                    Key index for removing
3214 
3215  @Return        E_OK on success; Error code otherwise.
3216 
3217  @Cautions      Allowed only following FM_PCD_MatchTableSet() was called for this
3218                 node and the nodes that lead to it.
3219 *//***************************************************************************/
3220 t_Error FM_PCD_MatchTableRemoveKey(t_Handle h_CcNode, uint16_t keyIndex);
3221 
3222 /**************************************************************************//**
3223  @Function      FM_PCD_MatchTableAddKey
3224 
3225  @Description   Add the key (including next engine parameters of this key in the
3226                 index defined by the keyIndex. Note that 'FM_PCD_LAST_KEY_INDEX'
3227                 may be used by user that don't care about the position of the
3228                 key in the table - in that case, the key will be automatically
3229                 added by the driver in the last available entry.
3230 
3231  @Param[in]     h_CcNode     A handle to the node
3232  @Param[in]     keyIndex     Key index for adding.
3233  @Param[in]     keySize      Key size of added key
3234  @Param[in]     p_KeyParams  A pointer to the parameters includes
3235                              new key with Next Engine Parameters
3236 
3237  @Return        E_OK on success; Error code otherwise.
3238 
3239  @Cautions      Allowed only following FM_PCD_MatchTableSet() was called for this
3240                 node and the nodes that lead to it.
3241 *//***************************************************************************/
3242 t_Error FM_PCD_MatchTableAddKey(t_Handle            h_CcNode,
3243                                 uint16_t            keyIndex,
3244                                 uint8_t             keySize,
3245                                 t_FmPcdCcKeyParams  *p_KeyParams);
3246 
3247 /**************************************************************************//**
3248  @Function      FM_PCD_MatchTableModifyNextEngine
3249 
3250  @Description   Modify the Next Engine Parameters in the relevant key entry of the node.
3251 
3252  @Param[in]     h_CcNode                    A handle to the node
3253  @Param[in]     keyIndex                    Key index for Next Engine modifications
3254  @Param[in]     p_FmPcdCcNextEngineParams   Parameters for defining next engine
3255 
3256  @Return        E_OK on success; Error code otherwise.
3257 
3258  @Cautions      Allowed only following FM_PCD_MatchTableSet().
3259                 When configuring nextEngine = e_FM_PCD_CC, note that
3260                 p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different
3261                 from the currently changed table.
3262 
3263 *//***************************************************************************/
3264 t_Error FM_PCD_MatchTableModifyNextEngine(t_Handle                  h_CcNode,
3265                                           uint16_t                  keyIndex,
3266                                           t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);
3267 
3268 /**************************************************************************//**
3269  @Function      FM_PCD_MatchTableModifyKeyAndNextEngine
3270 
3271  @Description   Modify the key and Next Engine Parameters of this key in the
3272                 index defined by the keyIndex.
3273 
3274  @Param[in]     h_CcNode                    A handle to the node
3275  @Param[in]     keyIndex                    Key index for adding
3276  @Param[in]     keySize                     Key size of added key
3277  @Param[in]     p_KeyParams                 A pointer to the parameters includes
3278                                             modified key and modified Next Engine Parameters
3279 
3280  @Return        E_OK on success; Error code otherwise.
3281 
3282  @Cautions      Allowed only following FM_PCD_MatchTableSet() was called for this
3283                 node and the nodes that lead to it.
3284                 When configuring nextEngine = e_FM_PCD_CC, note that
3285                 p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different
3286                 from the currently changed table.
3287 *//***************************************************************************/
3288 t_Error FM_PCD_MatchTableModifyKeyAndNextEngine(t_Handle            h_CcNode,
3289                                                 uint16_t            keyIndex,
3290                                                 uint8_t             keySize,
3291                                                 t_FmPcdCcKeyParams  *p_KeyParams);
3292 
3293 /**************************************************************************//**
3294  @Function      FM_PCD_MatchTableModifyKey
3295 
3296  @Description   Modify the key in the index defined by the keyIndex.
3297 
3298  @Param[in]     h_CcNode                    A handle to the node
3299  @Param[in]     keyIndex                    Key index for adding
3300  @Param[in]     keySize                     Key size of added key
3301  @Param[in]     p_Key                       A pointer to the new key
3302  @Param[in]     p_Mask                      A pointer to the new mask if relevant,
3303                                             otherwise pointer to NULL
3304 
3305  @Return        E_OK on success; Error code otherwise.
3306 
3307  @Cautions      Allowed only following FM_PCD_MatchTableSet() was called for this
3308                 node and the nodes that lead to it.
3309 *//***************************************************************************/
3310 t_Error FM_PCD_MatchTableModifyKey(t_Handle h_CcNode,
3311                                    uint16_t keyIndex,
3312                                    uint8_t  keySize,
3313                                    uint8_t  *p_Key,
3314                                    uint8_t  *p_Mask);
3315 
3316 /**************************************************************************//**
3317  @Function      FM_PCD_MatchTableFindNRemoveKey
3318 
3319  @Description   Remove the key (including next engine parameters of this key)
3320                 defined by the key and mask. Note that this routine will search
3321                 the node to locate the index of the required key (& mask) to remove.
3322 
3323  @Param[in]     h_CcNode                    A handle to the node
3324  @Param[in]     keySize                     Key size of the one to remove.
3325  @Param[in]     p_Key                       A pointer to the requested key to remove.
3326  @Param[in]     p_Mask                      A pointer to the mask if relevant,
3327                                             otherwise pointer to NULL
3328 
3329  @Return        E_OK on success; Error code otherwise.
3330 
3331  @Cautions      Allowed only following FM_PCD_MatchTableSet() was called for this
3332                 node and the nodes that lead to it.
3333 *//***************************************************************************/
3334 t_Error FM_PCD_MatchTableFindNRemoveKey(t_Handle h_CcNode,
3335                                         uint8_t  keySize,
3336                                         uint8_t  *p_Key,
3337                                         uint8_t  *p_Mask);
3338 
3339 /**************************************************************************//**
3340  @Function      FM_PCD_MatchTableFindNModifyNextEngine
3341 
3342  @Description   Modify the Next Engine Parameters in the relevant key entry of
3343                 the node. Note that this routine will search the node to locate
3344                 the index of the required key (& mask) to modify.
3345 
3346  @Param[in]     h_CcNode                    A handle to the node
3347  @Param[in]     keySize                     Key size of the one to modify.
3348  @Param[in]     p_Key                       A pointer to the requested key to modify.
3349  @Param[in]     p_Mask                      A pointer to the mask if relevant,
3350                                             otherwise pointer to NULL
3351  @Param[in]     p_FmPcdCcNextEngineParams   Parameters for defining next engine
3352 
3353  @Return        E_OK on success; Error code otherwise.
3354 
3355  @Cautions      Allowed only following FM_PCD_MatchTableSet().
3356                 When configuring nextEngine = e_FM_PCD_CC, note that
3357                 p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different
3358                 from the currently changed table.
3359 *//***************************************************************************/
3360 t_Error FM_PCD_MatchTableFindNModifyNextEngine(t_Handle                  h_CcNode,
3361                                                uint8_t                   keySize,
3362                                                uint8_t                   *p_Key,
3363                                                uint8_t                   *p_Mask,
3364                                                t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);
3365 
3366 /**************************************************************************//**
3367  @Function      FM_PCD_MatchTableFindNModifyKeyAndNextEngine
3368 
3369  @Description   Modify the key and Next Engine Parameters of this key in the
3370                 index defined by the keyIndex. Note that this routine will search
3371                 the node to locate the index of the required key (& mask) to modify.
3372 
3373  @Param[in]     h_CcNode                    A handle to the node
3374  @Param[in]     keySize                     Key size of the one to modify.
3375  @Param[in]     p_Key                       A pointer to the requested key to modify.
3376  @Param[in]     p_Mask                      A pointer to the mask if relevant,
3377                                             otherwise pointer to NULL
3378  @Param[in]     p_KeyParams                 A pointer to the parameters includes
3379                                             modified key and modified Next Engine Parameters
3380 
3381  @Return        E_OK on success; Error code otherwise.
3382 
3383  @Cautions      Allowed only following FM_PCD_MatchTableSet() was called for this
3384                 node and the nodes that lead to it.
3385                 When configuring nextEngine = e_FM_PCD_CC, note that
3386                 p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different
3387                 from the currently changed table.
3388 *//***************************************************************************/
3389 t_Error FM_PCD_MatchTableFindNModifyKeyAndNextEngine(t_Handle            h_CcNode,
3390                                                      uint8_t             keySize,
3391                                                      uint8_t             *p_Key,
3392                                                      uint8_t             *p_Mask,
3393                                                      t_FmPcdCcKeyParams  *p_KeyParams);
3394 
3395 /**************************************************************************//**
3396  @Function      FM_PCD_MatchTableFindNModifyKey
3397 
3398  @Description   Modify the key  in the index defined by the keyIndex. Note that
3399                 this routine will search the node to locate the index of the
3400                 required key (& mask) to modify.
3401 
3402  @Param[in]     h_CcNode                    A handle to the node
3403  @Param[in]     keySize                     Key size of the one to modify.
3404  @Param[in]     p_Key                       A pointer to the requested key to modify.
3405  @Param[in]     p_Mask                      A pointer to the mask if relevant,
3406                                             otherwise pointer to NULL
3407  @Param[in]     p_NewKey                    A pointer to the new key
3408  @Param[in]     p_NewMask                   A pointer to the new mask if relevant,
3409                                             otherwise pointer to NULL
3410 
3411  @Return        E_OK on success; Error code otherwise.
3412 
3413  @Cautions      Allowed only following FM_PCD_MatchTableSet() was called for this
3414                 node and the nodes that lead to it.
3415 *//***************************************************************************/
3416 t_Error FM_PCD_MatchTableFindNModifyKey(t_Handle h_CcNode,
3417                                         uint8_t  keySize,
3418                                         uint8_t  *p_Key,
3419                                         uint8_t  *p_Mask,
3420                                         uint8_t  *p_NewKey,
3421                                         uint8_t  *p_NewMask);
3422 
3423 /**************************************************************************//**
3424  @Function      FM_PCD_MatchTableGetKeyCounter
3425 
3426  @Description   This routine may be used to get a counter of specific key in a CC
3427                 Node; This counter reflects how many frames passed that were matched
3428                 this key.
3429 
3430  @Param[in]     h_CcNode        A handle to the node
3431  @Param[in]     keyIndex        Key index for adding
3432 
3433  @Return        The specific key counter.
3434 
3435  @Cautions      Allowed only following FM_PCD_MatchTableSet().
3436 *//***************************************************************************/
3437 uint32_t FM_PCD_MatchTableGetKeyCounter(t_Handle h_CcNode, uint16_t keyIndex);
3438 
3439 /**************************************************************************//**
3440  @Function      FM_PCD_MatchTableGetKeyStatistics
3441 
3442  @Description   This routine may be used to get statistics counters of specific key
3443                 in a CC Node.
3444 
3445                 If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
3446                 'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,
3447                 these counters reflect how many frames passed that were matched
3448                 this key; The total frames count will be returned in the counter
3449                 of the first range (as only one frame length range was defined).
3450                 If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for this node, the total
3451                 frame count will be separated to frame length counters, based on
3452                 provided frame length ranges.
3453 
3454  @Param[in]     h_CcNode        A handle to the node
3455  @Param[in]     keyIndex        Key index for adding
3456  @Param[out]    p_KeyStatistics Key statistics counters
3457 
3458  @Return        The specific key statistics.
3459 
3460  @Cautions      Allowed only following FM_PCD_MatchTableSet().
3461 *//***************************************************************************/
3462 t_Error FM_PCD_MatchTableGetKeyStatistics(t_Handle                  h_CcNode,
3463                                           uint16_t                  keyIndex,
3464                                           t_FmPcdCcKeyStatistics    *p_KeyStatistics);
3465 
3466 /**************************************************************************//**
3467  @Function      FM_PCD_MatchTableGetMissStatistics
3468 
3469  @Description   This routine may be used to get statistics counters of miss entry
3470                 in a CC Node.
3471 
3472                 If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
3473                 'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,
3474                 these counters reflect how many frames were not matched to any
3475                 existing key and therefore passed through the miss entry; The
3476                 total frames count will be returned in the counter of the
3477                 first range (as only one frame length range was defined).
3478 
3479  @Param[in]     h_CcNode            A handle to the node
3480  @Param[out]    p_MissStatistics    Statistics counters for 'miss'
3481 
3482  @Return        The statistics for 'miss'.
3483 
3484  @Cautions      Allowed only following FM_PCD_MatchTableSet().
3485 *//***************************************************************************/
3486 t_Error FM_PCD_MatchTableGetMissStatistics(t_Handle                  h_CcNode,
3487                                            t_FmPcdCcKeyStatistics    *p_MissStatistics);
3488 
3489 /**************************************************************************//**
3490  @Function      FM_PCD_MatchTableFindNGetKeyStatistics
3491 
3492  @Description   This routine may be used to get statistics counters of specific key
3493                 in a CC Node.
3494 
3495                 If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
3496                 'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,
3497                 these counters reflect how many frames passed that were matched
3498                 this key; The total frames count will be returned in the counter
3499                 of the first range (as only one frame length range was defined).
3500                 If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for this node, the total
3501                 frame count will be separated to frame length counters, based on
3502                 provided frame length ranges.
3503                 Note that this routine will search the node to locate the index
3504                 of the required key based on received key parameters.
3505 
3506  @Param[in]     h_CcNode        A handle to the node
3507  @Param[in]     keySize         Size of the requested key
3508  @Param[in]     p_Key           A pointer to the requested key
3509  @Param[in]     p_Mask          A pointer to the mask if relevant,
3510                                 otherwise pointer to NULL
3511  @Param[out]    p_KeyStatistics Key statistics counters
3512 
3513  @Return        The specific key statistics.
3514 
3515  @Cautions      Allowed only following FM_PCD_MatchTableSet().
3516 *//***************************************************************************/
3517 t_Error FM_PCD_MatchTableFindNGetKeyStatistics(t_Handle                 h_CcNode,
3518                                                uint8_t                  keySize,
3519                                                uint8_t                  *p_Key,
3520                                                uint8_t                  *p_Mask,
3521                                                t_FmPcdCcKeyStatistics   *p_KeyStatistics);
3522 
3523 /**************************************************************************//*
3524  @Function      FM_PCD_MatchTableGetNextEngine
3525 
3526  @Description   Gets NextEngine of the relevant keyIndex.
3527 
3528  @Param[in]     h_CcNode                    A handle to the node.
3529  @Param[in]     keyIndex                    keyIndex in the relevant node.
3530  @Param[out]    p_FmPcdCcNextEngineParams   here updated nextEngine parameters for
3531                                             the relevant keyIndex of the CC Node
3532                                             received as parameter to this function
3533 
3534  @Return        E_OK on success; Error code otherwise.
3535 
3536  @Cautions      Allowed only following FM_PCD_Init().
3537 *//***************************************************************************/
3538 t_Error FM_PCD_MatchTableGetNextEngine(t_Handle                     h_CcNode,
3539                                        uint16_t                     keyIndex,
3540                                        t_FmPcdCcNextEngineParams    *p_FmPcdCcNextEngineParams);
3541 
3542 /**************************************************************************//*
3543  @Function      FM_PCD_MatchTableGetIndexedHashBucket
3544 
3545  @Description   This routine simulates KeyGen operation on the provided key and
3546                 calculates to which hash bucket it will be mapped.
3547 
3548  @Param[in]     h_CcNode                A handle to the node.
3549  @Param[in]     kgKeySize               Key size as it was configured in the KG
3550                                         scheme that leads to this hash.
3551  @Param[in]     p_KgKey                 Pointer to the key; must be like the key
3552                                         that the KG is generated, i.e. the same
3553                                         extraction and with mask if exist.
3554  @Param[in]     kgHashShift             Hash-shift as it was configured in the KG
3555                                         scheme that leads to this hash.
3556  @Param[out]    p_CcNodeBucketHandle    Pointer to the bucket of the provided key.
3557  @Param[out]    p_BucketIndex           Index to the bucket of the provided key
3558  @Param[out]    p_LastIndex             Pointer to last index in the bucket of the
3559                                         provided key.
3560 
3561  @Return        E_OK on success; Error code otherwise.
3562 
3563  @Cautions      Allowed only following FM_PCD_HashTableSet()
3564 *//***************************************************************************/
3565 t_Error FM_PCD_MatchTableGetIndexedHashBucket(t_Handle    h_CcNode,
3566                                               uint8_t     kgKeySize,
3567                                               uint8_t     *p_KgKey,
3568                                               uint8_t     kgHashShift,
3569                                               t_Handle    *p_CcNodeBucketHandle,
3570                                               uint8_t     *p_BucketIndex,
3571                                               uint16_t    *p_LastIndex);
3572 
3573 /**************************************************************************//**
3574  @Function      FM_PCD_HashTableSet
3575 
3576  @Description   This routine initializes a hash table structure.
3577                 KeyGen hash result determines the hash bucket.
3578                 Next, KeyGen key is compared against all keys of this
3579                 bucket (exact match).
3580                 Number of sets (number of buckets) of the hash equals to the
3581                 number of 1-s in 'hashResMask' in the provided parameters.
3582                 Number of hash table ways is then calculated by dividing
3583                 'maxNumOfKeys' equally between the hash sets. This is the maximal
3584                 number of keys that a hash bucket may hold.
3585                 The hash table is initialized empty and keys may be
3586                 added to it following the initialization. Keys masks are not
3587                 supported in current hash table implementation.
3588                 The initialized hash table can be integrated as a node in a
3589                 CC tree.
3590 
3591  @Param[in]     h_FmPcd     FM PCD module descriptor.
3592  @Param[in]     p_Param     A structure of parameters defining the hash table
3593 
3594  @Return        A handle to the initialized object on success; NULL code otherwise.
3595 
3596  @Cautions      Allowed only following FM_PCD_Init().
3597 *//***************************************************************************/
3598 t_Handle FM_PCD_HashTableSet(t_Handle h_FmPcd, t_FmPcdHashTableParams *p_Param);
3599 
3600 /**************************************************************************//**
3601  @Function      FM_PCD_HashTableDelete
3602 
3603  @Description   This routine deletes the provided hash table and released all
3604                 its allocated resources.
3605 
3606  @Param[in]     h_HashTbl       A handle to a hash table
3607 
3608  @Return        E_OK on success; Error code otherwise.
3609 
3610  @Cautions      Allowed only following FM_PCD_HashTableSet().
3611 *//***************************************************************************/
3612 t_Error FM_PCD_HashTableDelete(t_Handle h_HashTbl);
3613 
3614 /**************************************************************************//**
3615  @Function      FM_PCD_HashTableAddKey
3616 
3617  @Description   This routine adds the provided key (including next engine
3618                 parameters of this key) to the hash table.
3619                 The key is added as the last key of the bucket that it is
3620                 mapped to.
3621 
3622  @Param[in]     h_HashTbl    A handle to a hash table
3623  @Param[in]     keySize      Key size of added key
3624  @Param[in]     p_KeyParams  A pointer to the parameters includes
3625                              new key with next engine parameters; The pointer
3626                              to the key mask must be NULL, as masks are not
3627                              supported in hash table implementation.
3628 
3629  @Return        E_OK on success; Error code otherwise.
3630 
3631  @Cautions      Allowed only following FM_PCD_HashTableSet().
3632 *//***************************************************************************/
3633 t_Error FM_PCD_HashTableAddKey(t_Handle            h_HashTbl,
3634                                uint8_t             keySize,
3635                                t_FmPcdCcKeyParams  *p_KeyParams);
3636 
3637 /**************************************************************************//**
3638  @Function      FM_PCD_HashTableRemoveKey
3639 
3640  @Description   This routine removes the requested key (including next engine
3641                 parameters of this key) from the hash table.
3642 
3643  @Param[in]     h_HashTbl    A handle to a hash table
3644  @Param[in]     keySize      Key size of the one to remove.
3645  @Param[in]     p_Key        A pointer to the requested key to remove.
3646 
3647  @Return        E_OK on success; Error code otherwise.
3648 
3649  @Cautions      Allowed only following FM_PCD_HashTableSet().
3650 *//***************************************************************************/
3651 t_Error FM_PCD_HashTableRemoveKey(t_Handle h_HashTbl,
3652                                   uint8_t  keySize,
3653                                   uint8_t  *p_Key);
3654 
3655 /**************************************************************************//**
3656  @Function      FM_PCD_HashTableModifyNextEngine
3657 
3658  @Description   This routine modifies the next engine for the provided key. The
3659                 key should be previously added to the hash table.
3660 
3661  @Param[in]     h_HashTbl                   A handle to a hash table
3662  @Param[in]     keySize                     Key size of the key to modify.
3663  @Param[in]     p_Key                       A pointer to the requested key to modify.
3664  @Param[in]     p_FmPcdCcNextEngineParams   A structure for defining new next engine
3665                                             parameters.
3666 
3667  @Return        E_OK on success; Error code otherwise.
3668 
3669  @Cautions      Allowed only following FM_PCD_HashTableSet().
3670                 When configuring nextEngine = e_FM_PCD_CC, note that
3671                 p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different
3672                 from the currently changed table.
3673 *//***************************************************************************/
3674 t_Error FM_PCD_HashTableModifyNextEngine(t_Handle                  h_HashTbl,
3675                                          uint8_t                   keySize,
3676                                          uint8_t                   *p_Key,
3677                                          t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);
3678 
3679 /**************************************************************************//**
3680  @Function      FM_PCD_HashTableModifyMissNextEngine
3681 
3682  @Description   This routine modifies the next engine on key match miss.
3683 
3684  @Param[in]     h_HashTbl                   A handle to a hash table
3685  @Param[in]     p_FmPcdCcNextEngineParams   A structure for defining new next engine
3686                                             parameters.
3687 
3688  @Return        E_OK on success; Error code otherwise.
3689 
3690  @Cautions      Allowed only following FM_PCD_HashTableSet().
3691                 When configuring nextEngine = e_FM_PCD_CC, note that
3692                 p_FmPcdCcNextEngineParams->ccParams.h_CcNode must be different
3693                 from the currently changed table.
3694 *//***************************************************************************/
3695 t_Error FM_PCD_HashTableModifyMissNextEngine(t_Handle                  h_HashTbl,
3696                                              t_FmPcdCcNextEngineParams *p_FmPcdCcNextEngineParams);
3697 
3698 /**************************************************************************//*
3699  @Function      FM_PCD_HashTableGetMissNextEngine
3700 
3701  @Description   Gets NextEngine in case of key match miss.
3702 
3703  @Param[in]     h_HashTbl                   A handle to a hash table
3704  @Param[out]    p_FmPcdCcNextEngineParams   Next engine parameters for the specified
3705                                             hash table.
3706 
3707  @Return        E_OK on success; Error code otherwise.
3708 
3709  @Cautions      Allowed only following FM_PCD_HashTableSet().
3710 *//***************************************************************************/
3711 t_Error FM_PCD_HashTableGetMissNextEngine(t_Handle                     h_HashTbl,
3712                                           t_FmPcdCcNextEngineParams    *p_FmPcdCcNextEngineParams);
3713 
3714 /**************************************************************************//**
3715  @Function      FM_PCD_HashTableFindNGetKeyStatistics
3716 
3717  @Description   This routine may be used to get statistics counters of specific key
3718                 in a hash table.
3719 
3720                 If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
3721                 'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,
3722                 these counters reflect how many frames passed that were matched
3723                 this key; The total frames count will be returned in the counter
3724                 of the first range (as only one frame length range was defined).
3725                 If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for this node, the total
3726                 frame count will be separated to frame length counters, based on
3727                 provided frame length ranges.
3728                 Note that this routine will identify the bucket of this key in
3729                 the hash table and will search the bucket to locate the index
3730                 of the required key based on received key parameters.
3731 
3732  @Param[in]     h_HashTbl       A handle to a hash table
3733  @Param[in]     keySize         Size of the requested key
3734  @Param[in]     p_Key           A pointer to the requested key
3735  @Param[out]    p_KeyStatistics Key statistics counters
3736 
3737  @Return        The specific key statistics.
3738 
3739  @Cautions      Allowed only following FM_PCD_HashTableSet().
3740 *//***************************************************************************/
3741 t_Error FM_PCD_HashTableFindNGetKeyStatistics(t_Handle                 h_HashTbl,
3742                                               uint8_t                  keySize,
3743                                               uint8_t                  *p_Key,
3744                                               t_FmPcdCcKeyStatistics   *p_KeyStatistics);
3745 
3746 /**************************************************************************//**
3747  @Function      FM_PCD_HashTableGetMissStatistics
3748 
3749  @Description   This routine may be used to get statistics counters of 'miss'
3750                 entry of the a hash table.
3751 
3752                 If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
3753                 'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this node,
3754                 these counters reflect how many frames were not matched to any
3755                 existing key and therefore passed through the miss entry;
3756 
3757  @Param[in]     h_HashTbl           A handle to a hash table
3758  @Param[out]    p_MissStatistics    Statistics counters for 'miss'
3759 
3760  @Return        The statistics for 'miss'.
3761 
3762  @Cautions      Allowed only following FM_PCD_HashTableSet().
3763 *//***************************************************************************/
3764 t_Error FM_PCD_HashTableGetMissStatistics(t_Handle                 h_HashTbl,
3765                                           t_FmPcdCcKeyStatistics   *p_MissStatistics);
3766 
3767 /**************************************************************************//**
3768  @Function      FM_PCD_ManipNodeSet
3769 
3770  @Description   This routine should be called for defining a manipulation
3771                 node. A manipulation node must be defined before the CC node
3772                 that precedes it.
3773 
3774  @Param[in]     h_FmPcd             FM PCD module descriptor.
3775  @Param[in]     p_FmPcdManipParams  A structure of parameters defining the manipulation
3776 
3777  @Return        A handle to the initialized object on success; NULL code otherwise.
3778 
3779  @Cautions      Allowed only following FM_PCD_Init().
3780 *//***************************************************************************/
3781 t_Handle FM_PCD_ManipNodeSet(t_Handle h_FmPcd, t_FmPcdManipParams *p_FmPcdManipParams);
3782 
3783 /**************************************************************************//**
3784  @Function      FM_PCD_ManipNodeDelete
3785 
3786  @Description   Delete an existing manipulation node.
3787 
3788  @Param[in]     h_ManipNode     A handle to a manipulation node.
3789 
3790  @Return        E_OK on success; Error code otherwise.
3791 
3792  @Cautions      Allowed only following FM_PCD_ManipNodeSet().
3793 *//***************************************************************************/
3794 t_Error  FM_PCD_ManipNodeDelete(t_Handle h_ManipNode);
3795 
3796 /**************************************************************************//**
3797  @Function      FM_PCD_ManipGetStatistics
3798 
3799  @Description   Retrieve the manipulation statistics.
3800 
3801  @Param[in]     h_ManipNode         A handle to a manipulation node.
3802  @Param[out]    p_FmPcdManipStats   A structure for retrieving the manipulation statistics
3803 
3804  @Return        E_OK on success; Error code otherwise.
3805 
3806  @Cautions      Allowed only following FM_PCD_ManipNodeSet().
3807 *//***************************************************************************/
3808 t_Error FM_PCD_ManipGetStatistics(t_Handle h_ManipNode, t_FmPcdManipStats *p_FmPcdManipStats);
3809 
3810 /**************************************************************************//**
3811  @Function      FM_PCD_ManipNodeReplace
3812 
3813  @Description   Change existing manipulation node to be according to new requirement.
3814 
3815  @Param[in]     h_ManipNode         A handle to a manipulation node.
3816  @Param[out]    p_ManipParams       A structure of parameters defining the change requirement
3817 
3818  @Return        E_OK on success; Error code otherwise.
3819 
3820  @Cautions      Allowed only following FM_PCD_ManipNodeSet().
3821 *//***************************************************************************/
3822 t_Error FM_PCD_ManipNodeReplace(t_Handle h_ManipNode, t_FmPcdManipParams *p_ManipParams);
3823 
3824 #if (DPAA_VERSION >= 11)
3825 /**************************************************************************//**
3826  @Function      FM_PCD_FrmReplicSetGroup
3827 
3828  @Description   Initialize a Frame Replicator group.
3829 
3830  @Param[in]     h_FmPcd                FM PCD module descriptor.
3831  @Param[in]     p_FrmReplicGroupParam  A structure of parameters for the initialization of
3832                                        the frame replicator group.
3833 
3834  @Return        A handle to the initialized object on success; NULL code otherwise.
3835 
3836  @Cautions      Allowed only following FM_PCD_Init().
3837 *//***************************************************************************/
3838 t_Handle FM_PCD_FrmReplicSetGroup(t_Handle h_FmPcd, t_FmPcdFrmReplicGroupParams *p_FrmReplicGroupParam);
3839 
3840 /**************************************************************************//**
3841  @Function      FM_PCD_FrmReplicDeleteGroup
3842 
3843  @Description   Delete a Frame Replicator group.
3844 
3845  @Param[in]     h_FrmReplicGroup  A handle to the frame replicator group.
3846 
3847  @Return        E_OK on success;  Error code otherwise.
3848 
3849  @Cautions      Allowed only following FM_PCD_FrmReplicSetGroup().
3850 *//***************************************************************************/
3851 t_Error FM_PCD_FrmReplicDeleteGroup(t_Handle h_FrmReplicGroup);
3852 
3853 /**************************************************************************//**
3854  @Function      FM_PCD_FrmReplicAddMember
3855 
3856  @Description   Add the member in the index defined by the memberIndex.
3857 
3858  @Param[in]     h_FrmReplicGroup   A handle to the frame replicator group.
3859  @Param[in]     memberIndex        member index for adding.
3860  @Param[in]     p_MemberParams     A pointer to the new member parameters.
3861 
3862  @Return        E_OK on success; Error code otherwise.
3863 
3864  @Cautions      Allowed only following FM_PCD_FrmReplicSetGroup() of this group.
3865 *//***************************************************************************/
3866 t_Error FM_PCD_FrmReplicAddMember(t_Handle                   h_FrmReplicGroup,
3867                                   uint16_t                   memberIndex,
3868                                   t_FmPcdCcNextEngineParams *p_MemberParams);
3869 
3870 /**************************************************************************//**
3871  @Function      FM_PCD_FrmReplicRemoveMember
3872 
3873  @Description   Remove the member defined by the index from the relevant group.
3874 
3875  @Param[in]     h_FrmReplicGroup   A handle to the frame replicator group.
3876  @Param[in]     memberIndex        member index for removing.
3877 
3878  @Return        E_OK on success; Error code otherwise.
3879 
3880  @Cautions      Allowed only following FM_PCD_FrmReplicSetGroup() of this group.
3881 *//***************************************************************************/
3882 t_Error FM_PCD_FrmReplicRemoveMember(t_Handle h_FrmReplicGroup,
3883                                      uint16_t memberIndex);
3884 #endif /* (DPAA_VERSION >= 11) */
3885 
3886 #if ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT))
3887 /**************************************************************************//**
3888  @Function      FM_PCD_StatisticsSetNode
3889 
3890  @Description   This routine should be called for defining a statistics node.
3891 
3892  @Param[in]     h_FmPcd             FM PCD module descriptor.
3893  @Param[in]     p_FmPcdstatsParams  A structure of parameters defining the statistics
3894 
3895  @Return        A handle to the initialized object on success; NULL code otherwise.
3896 
3897  @Cautions      Allowed only following FM_PCD_Init().
3898 *//***************************************************************************/
3899 t_Handle FM_PCD_StatisticsSetNode(t_Handle h_FmPcd, t_FmPcdStatsParams *p_FmPcdstatsParams);
3900 #endif /* ((DPAA_VERSION == 10) && defined(FM_CAPWAP_SUPPORT)) */
3901 
3902 /** @} */ /* end of FM_PCD_Runtime_build_grp group */
3903 /** @} */ /* end of FM_PCD_Runtime_grp group */
3904 /** @} */ /* end of FM_PCD_grp group */
3905 /** @} */ /* end of FM_grp group */
3906 
3907 
3908 #ifdef NCSW_BACKWARD_COMPATIBLE_API
3909 #define FM_PCD_MAX_NUM_OF_INTERCHANGABLE_HDRS   FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS
3910 #define e_FM_PCD_MANIP_ONE_WAYS_HASH            e_FM_PCD_MANIP_ONE_WAY_HASH
3911 #define e_FM_PCD_MANIP_TOW_WAYS_HASH            e_FM_PCD_MANIP_TWO_WAYS_HASH
3912 
3913 #define e_FM_PCD_MANIP_FRAGMENT_PACKECT         e_FM_PCD_MANIP_FRAGMENT_PACKET /* Feb13 */
3914 
3915 #define FM_PCD_SetNetEnvCharacteristics(_pcd, _params)  \
3916     FM_PCD_NetEnvCharacteristicsSet(_pcd, _params)
3917 #define FM_PCD_KgSetScheme(_pcd, _params)       FM_PCD_KgSchemeSet(_pcd, _params)
3918 #define FM_PCD_CcBuildTree(_pcd, _params)       FM_PCD_CcRootBuild(_pcd, _params)
3919 #define FM_PCD_CcSetNode(_pcd, _params)         FM_PCD_MatchTableSet(_pcd, _params)
3920 #define FM_PCD_PlcrSetProfile(_pcd, _params)    FM_PCD_PlcrProfileSet(_pcd, _params)
3921 #define FM_PCD_ManipSetNode(_pcd, _params)      FM_PCD_ManipNodeSet(_pcd, _params)
3922 
3923 #define FM_PCD_DeleteNetEnvCharacteristics(_pcd, ...)   \
3924     FM_PCD_NetEnvCharacteristicsDelete(__VA_ARGS__)
3925 #define FM_PCD_KgDeleteScheme(_pcd, ...)   \
3926     FM_PCD_KgSchemeDelete(__VA_ARGS__)
3927 #define FM_PCD_KgGetSchemeCounter(_pcd, ...)   \
3928     FM_PCD_KgSchemeGetCounter(__VA_ARGS__)
3929 #define FM_PCD_KgSetSchemeCounter(_pcd, ...)   \
3930     FM_PCD_KgSchemeSetCounter(__VA_ARGS__)
3931 #define FM_PCD_PlcrDeleteProfile(_pcd, ...)   \
3932     FM_PCD_PlcrProfileDelete(__VA_ARGS__)
3933 #define FM_PCD_PlcrGetProfileCounter(_pcd, ...)   \
3934     FM_PCD_PlcrProfileGetCounter(__VA_ARGS__)
3935 #define FM_PCD_PlcrSetProfileCounter(_pcd, ...)   \
3936     FM_PCD_PlcrProfileSetCounter(__VA_ARGS__)
3937 #define FM_PCD_CcDeleteTree(_pcd, ...)   \
3938     FM_PCD_CcRootDelete(__VA_ARGS__)
3939 #define FM_PCD_CcTreeModifyNextEngine(_pcd, ...)   \
3940     FM_PCD_CcRootModifyNextEngine(__VA_ARGS__)
3941 #define FM_PCD_CcDeleteNode(_pcd, ...)   \
3942     FM_PCD_MatchTableDelete(__VA_ARGS__)
3943 #define FM_PCD_CcNodeModifyMissNextEngine(_pcd, ...)   \
3944     FM_PCD_MatchTableModifyMissNextEngine(__VA_ARGS__)
3945 #define FM_PCD_CcNodeRemoveKey(_pcd, ...)   \
3946     FM_PCD_MatchTableRemoveKey(__VA_ARGS__)
3947 #define FM_PCD_CcNodeAddKey(_pcd, ...)   \
3948     FM_PCD_MatchTableAddKey(__VA_ARGS__)
3949 #define FM_PCD_CcNodeModifyNextEngine(_pcd, ...)   \
3950     FM_PCD_MatchTableModifyNextEngine(__VA_ARGS__)
3951 #define FM_PCD_CcNodeModifyKeyAndNextEngine(_pcd, ...)   \
3952     FM_PCD_MatchTableModifyKeyAndNextEngine(__VA_ARGS__)
3953 #define FM_PCD_CcNodeModifyKey(_pcd, ...)   \
3954     FM_PCD_MatchTableModifyKey(__VA_ARGS__)
3955 #define FM_PCD_CcNodeFindNRemoveKey(_pcd, ...)   \
3956     FM_PCD_MatchTableFindNRemoveKey(__VA_ARGS__)
3957 #define FM_PCD_CcNodeFindNModifyNextEngine(_pcd, ...)   \
3958     FM_PCD_MatchTableFindNModifyNextEngine(__VA_ARGS__)
3959 #define FM_PCD_CcNodeFindNModifyKeyAndNextEngine(_pcd, ...) \
3960     FM_PCD_MatchTableFindNModifyKeyAndNextEngine(__VA_ARGS__)
3961 #define FM_PCD_CcNodeFindNModifyKey(_pcd, ...)   \
3962     FM_PCD_MatchTableFindNModifyKey(__VA_ARGS__)
3963 #define FM_PCD_CcIndexedHashNodeGetBucket(_pcd, ...)   \
3964     FM_PCD_MatchTableGetIndexedHashBucket(__VA_ARGS__)
3965 #define FM_PCD_CcNodeGetNextEngine(_pcd, ...)   \
3966     FM_PCD_MatchTableGetNextEngine(__VA_ARGS__)
3967 #define FM_PCD_CcNodeGetKeyCounter(_pcd, ...)   \
3968     FM_PCD_MatchTableGetKeyCounter(__VA_ARGS__)
3969 #define FM_PCD_ManipDeleteNode(_pcd, ...)   \
3970     FM_PCD_ManipNodeDelete(__VA_ARGS__)
3971 #endif /* NCSW_BACKWARD_COMPATIBLE_API */
3972 
3973 
3974 #endif /* __FM_PCD_EXT */
3975