Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
/*
 * Copyright 2008-2012 Freescale Semiconductor Inc.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of Freescale Semiconductor nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *
 *
 * ALTERNATIVELY, this software may be distributed under the terms of the
 * GNU General Public License ("GPL") as published by the Free Software
 * Foundation, either version 2 of that License or (at your option) any
 * later version.
 *
 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */


/******************************************************************************
 @File          fm_manip.h

 @Description   FM PCD manip...
*//***************************************************************************/
#ifndef __FM_MANIP_H
#define __FM_MANIP_H

#include "std_ext.h"
#include "error_ext.h"
#include "list_ext.h"

#include "fm_cc.h"


/***********************************************************************/
/*          Header manipulations defines                              */
/***********************************************************************/

#define NUM_OF_SCRATCH_POOL_BUFFERS             1000 /*TODO - Change it!!*/

#if (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10))
#define HMAN_OC_RMV_N_OR_INSRT_INT_FRM_HDR                      0x2e
#define HMAN_OC_INSRT_HDR_BY_TEMPL_N_OR_FRAG_AFTER              0x31
#define HMAN_OC_MV_INT_FRAME_HDR_FROM_FRM_TO_BUFFER_PREFFIX     0x2f
#define HMAN_OC_CAPWAP_RMV_DTLS_IF_EXIST                        0x30
#define HMAN_OC_CAPWAP_REASSEMBLY                               0x11 /* dummy */
#define HMAN_OC_CAPWAP_INDEXED_STATS                            0x32 /* dummy */
#define HMAN_OC_CAPWAP_FRAGMENTATION                            0x33
#else
#define HMAN_OC_CAPWAP_MANIP                                    0x2F
#define HMAN_OC_CAPWAP_FRAG_CHECK                               0x2E
#define HMAN_OC_CAPWAP_FRAGMENTATION                            0x33
#define HMAN_OC_CAPWAP_REASSEMBLY                               0x30
#endif /* (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10)) */
#define HMAN_OC_IP_MANIP                                        0x34
#define HMAN_OC_IP_FRAGMENTATION                                0x74
#define HMAN_OC_IP_REASSEMBLY                                   0xB4
#define HMAN_OC_IPSEC_MANIP                                     0xF4
#define HMAN_OC                                                 0x35

#if (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10))
#define HMAN_RMV_HDR                               0x80000000
#define HMAN_INSRT_INT_FRM_HDR                     0x40000000

#define UDP_CHECKSUM_FIELD_OFFSET_FROM_UDP          6
#define UDP_CHECKSUM_FIELD_SIZE                     2
#define UDP_LENGTH_FIELD_OFFSET_FROM_UDP            4

#define IPv4_DSCECN_FIELD_OFFSET_FROM_IP            1
#define IPv4_TOTALLENGTH_FIELD_OFFSET_FROM_IP       2
#define IPv4_HDRCHECKSUM_FIELD_OFFSET_FROM_IP       10
#define VLAN_TAG_FIELD_OFFSET_FROM_ETH              12
#define IPv4_ID_FIELD_OFFSET_FROM_IP                4

#define IPv6_PAYLOAD_LENGTH_OFFSET_FROM_IP          4
#define IPv6_NEXT_HEADER_OFFSET_FROM_IP             6

#define FM_PCD_MANIP_CAPWAP_REASM_TABLE_SIZE               0x80
#define FM_PCD_MANIP_CAPWAP_REASM_TABLE_ALIGN              8
#define FM_PCD_MANIP_CAPWAP_REASM_RFD_SIZE                 32
#define FM_PCD_MANIP_CAPWAP_REASM_AUTO_LEARNING_HASH_ENTRY_SIZE 4
#define FM_PCD_MANIP_CAPWAP_REASM_TIME_OUT_ENTRY_SIZE      8


#define FM_PCD_MANIP_CAPWAP_REASM_TIME_OUT_BETWEEN_FRAMES          0x40000000
#define FM_PCD_MANIP_CAPWAP_REASM_HALT_ON_DUPLICATE_FRAG           0x10000000
#define FM_PCD_MANIP_CAPWAP_REASM_AUTOMATIC_LEARNIN_HASH_8_WAYS    0x08000000
#define FM_PCD_MANIP_CAPWAP_REASM_PR_COPY                          0x00800000

#define FM_PCD_MANIP_CAPWAP_FRAG_COMPR_OPTION_FIELD_EN             0x80000000

#define FM_PCD_MANIP_INDEXED_STATS_ENTRY_SIZE               4
#define FM_PCD_MANIP_INDEXED_STATS_CNIA                     0x20000000
#define FM_PCD_MANIP_INDEXED_STATS_DPD                      0x10000000
#endif /* (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10)) */

#if (DPAA_VERSION >= 11)
#define FM_PCD_MANIP_CAPWAP_DTLS                            0x00040000
#define FM_PCD_MANIP_CAPWAP_NADEN                           0x20000000

#define FM_PCD_MANIP_CAPWAP_FRAG_CHECK_MTU_SHIFT            16
#define FM_PCD_MANIP_CAPWAP_FRAG_CHECK_NO_FRAGMENTATION     0xFFFF0000
#define FM_PCD_MANIP_CAPWAP_FRAG_CHECK_CNIA                 0x20000000

#define FM_PCD_MANIP_CAPWAP_FRAG_COMPRESS_EN                0x04000000
#define FM_PCD_MANIP_CAPWAP_FRAG_SCRATCH_BPID               24
#define FM_PCD_MANIP_CAPWAP_FRAG_SG_BDID_EN                 0x08000000
#define FM_PCD_MANIP_CAPWAP_FRAG_SG_BDID_MASK               0xFF000000
#define FM_PCD_MANIP_CAPWAP_FRAG_SG_BDID_SHIFT              24
#endif /* (DPAA_VERSION >= 11) */

#define FM_PCD_MANIP_REASM_TABLE_SIZE                    0x40
#define FM_PCD_MANIP_REASM_TABLE_ALIGN                   8

#define FM_PCD_MANIP_REASM_COMMON_PARAM_TABLE_SIZE       64
#define FM_PCD_MANIP_REASM_COMMON_PARAM_TABLE_ALIGN      8
#define FM_PCD_MANIP_REASM_TIME_OUT_BETWEEN_FRAMES       0x80000000
#define FM_PCD_MANIP_REASM_COUPLING_ENABLE               0x40000000
#define FM_PCD_MANIP_REASM_COUPLING_MASK                 0xFF000000
#define FM_PCD_MANIP_REASM_COUPLING_SHIFT                24
#define FM_PCD_MANIP_REASM_LIODN_MASK                    0x0000003F
#define FM_PCD_MANIP_REASM_LIODN_SHIFT                   56
#define FM_PCD_MANIP_REASM_ELIODN_MASK                   0x000003c0
#define FM_PCD_MANIP_REASM_ELIODN_SHIFT                  38
#define FM_PCD_MANIP_REASM_COMMON_INT_BUFFER_IDX_MASK    0x000000FF
#define FM_PCD_MANIP_REASM_COMMON_INT_BUFFER_IDX_SHIFT   24
#define FM_PCD_MANIP_REASM_TIMEOUT_THREAD_THRESH        1024

#define FM_PCD_MANIP_IP_MTU_SHIFT                           16
#define FM_PCD_MANIP_IP_NO_FRAGMENTATION                    0xFFFF0000
#define FM_PCD_MANIP_IP_CNIA                                0x20000000

#define FM_PCD_MANIP_IP_FRAG_DF_SHIFT                       28
#define FM_PCD_MANIP_IP_FRAG_SCRATCH_BPID                   24
#define FM_PCD_MANIP_IP_FRAG_SG_BDID_EN                     0x08000000
#define FM_PCD_MANIP_IP_FRAG_SG_BDID_MASK                   0xFF000000
#define FM_PCD_MANIP_IP_FRAG_SG_BDID_SHIFT                  24

#define FM_PCD_MANIP_IPSEC_DEC                              0x10000000
#define FM_PCD_MANIP_IPSEC_VIPV_EN                          0x08000000
#define FM_PCD_MANIP_IPSEC_ECN_EN                           0x04000000
#define FM_PCD_MANIP_IPSEC_DSCP_EN                          0x02000000
#define FM_PCD_MANIP_IPSEC_VIPL_EN                          0x01000000
#define FM_PCD_MANIP_IPSEC_NADEN                            0x20000000

#define FM_PCD_MANIP_IPSEC_IP_HDR_LEN_MASK                  0x00FF0000
#define FM_PCD_MANIP_IPSEC_IP_HDR_LEN_SHIFT                 16

#define FM_PCD_MANIP_IPSEC_ARW_SIZE_MASK                    0xFFFF0000
#define FM_PCD_MANIP_IPSEC_ARW_SIZE_SHIFT                   16

#define e_FM_MANIP_IP_INDX                                  1

#define HMCD_OPCODE_GENERIC_RMV                 0x01
#define HMCD_OPCODE_GENERIC_INSRT               0x02
#define HMCD_OPCODE_GENERIC_REPLACE             0x05
#define HMCD_OPCODE_L2_RMV                      0x08
#define HMCD_OPCODE_L2_INSRT                    0x09
#define HMCD_OPCODE_VLAN_PRI_UPDATE             0x0B
#define HMCD_OPCODE_IPV4_UPDATE                 0x0C
#define HMCD_OPCODE_IPV6_UPDATE                 0x10
#define HMCD_OPCODE_TCP_UDP_UPDATE              0x0E
#define HMCD_OPCODE_TCP_UDP_CHECKSUM            0x14
#define HMCD_OPCODE_REPLACE_IP                  0x12
#define HMCD_OPCODE_RMV_TILL                    0x15
#define HMCD_OPCODE_UDP_INSRT                   0x16
#define HMCD_OPCODE_IP_INSRT                    0x17
#define HMCD_OPCODE_CAPWAP_RMV                  0x18
#define HMCD_OPCODE_CAPWAP_INSRT                0x18
#define HMCD_OPCODE_GEN_FIELD_REPLACE           0x19

#define HMCD_LAST                               0x00800000

#define HMCD_DSCP_VALUES                        64

#define HMCD_BASIC_SIZE                         4
#define HMCD_PTR_SIZE                           4
#define HMCD_PARAM_SIZE                         4
#define HMCD_IPV4_ADDR_SIZE                     4
#define HMCD_IPV6_ADDR_SIZE                     0x10
#define HMCD_L4_HDR_SIZE                        8

#define HMCD_CAPWAP_INSRT                       0x00010000
#define HMCD_INSRT_UDP_LITE                     0x00010000
#define HMCD_IP_ID_MASK                         0x0000FFFF
#define HMCD_IP_SIZE_MASK                       0x0000FF00
#define HMCD_IP_SIZE_SHIFT                      8
#define HMCD_IP_LAST_PID_MASK                   0x000000FF
#define HMCD_IP_OR_QOS                          0x00010000
#define HMCD_IP_L4_CS_CALC                      0x00040000
#define HMCD_IP_DF_MODE                         0x00400000


#define HMCD_OC_SHIFT                           24

#define HMCD_RMV_OFFSET_SHIFT                   0
#define HMCD_RMV_SIZE_SHIFT                     8

#define HMCD_INSRT_OFFSET_SHIFT                 0
#define HMCD_INSRT_SIZE_SHIFT                   8

#define HMTD_CFG_TYPE                           0x4000
#define HMTD_CFG_EXT_HMCT                       0x0080
#define HMTD_CFG_PRS_AFTER_HM                   0x0040
#define HMTD_CFG_NEXT_AD_EN                     0x0020

#define HMCD_RMV_L2_ETHERNET                    0
#define HMCD_RMV_L2_STACKED_QTAGS               1
#define HMCD_RMV_L2_ETHERNET_AND_MPLS           2
#define HMCD_RMV_L2_MPLS                        3
#define HMCD_RMV_L2_PPPOE                        4

#define HMCD_INSRT_L2_MPLS                      0
#define HMCD_INSRT_N_UPDATE_L2_MPLS             1
#define HMCD_INSRT_L2_PPPOE                     2
#define HMCD_INSRT_L2_SIZE_SHIFT                24

#define HMCD_L2_MODE_SHIFT                      16

#define HMCD_VLAN_PRI_REP_MODE_SHIFT            16
#define HMCD_VLAN_PRI_UPDATE                    0
#define HMCD_VLAN_PRI_UPDATE_DSCP_TO_VPRI       1

#define HMCD_IPV4_UPDATE_TTL                    0x00000001
#define HMCD_IPV4_UPDATE_TOS                    0x00000002
#define HMCD_IPV4_UPDATE_DST                    0x00000020
#define HMCD_IPV4_UPDATE_SRC                    0x00000040
#define HMCD_IPV4_UPDATE_ID                     0x00000080
#define HMCD_IPV4_UPDATE_TOS_SHIFT              8

#define HMCD_IPV6_UPDATE_HL                     0x00000001
#define HMCD_IPV6_UPDATE_TC                     0x00000002
#define HMCD_IPV6_UPDATE_DST                    0x00000040
#define HMCD_IPV6_UPDATE_SRC                    0x00000080
#define HMCD_IPV6_UPDATE_TC_SHIFT               8

#define HMCD_TCP_UDP_UPDATE_DST                 0x00004000
#define HMCD_TCP_UDP_UPDATE_SRC                 0x00008000
#define HMCD_TCP_UDP_UPDATE_SRC_SHIFT           16

#define HMCD_IP_REPLACE_REPLACE_IPV4            0x00000000
#define HMCD_IP_REPLACE_REPLACE_IPV6            0x00010000
#define HMCD_IP_REPLACE_TTL_HL                  0x00200000
#define HMCD_IP_REPLACE_ID                      0x00400000

#define HMCD_IP_REPLACE_L3HDRSIZE_SHIFT         24

#define HMCD_GEN_FIELD_SIZE_SHIFT               16
#define HMCD_GEN_FIELD_SRC_OFF_SHIFT            8
#define HMCD_GEN_FIELD_DST_OFF_SHIFT            0
#define HMCD_GEN_FIELD_MASK_EN                  0x00400000

#define HMCD_GEN_FIELD_MASK_OFF_SHIFT           16
#define HMCD_GEN_FIELD_MASK_SHIFT               24

#define DSCP_TO_VLAN_TABLE_SIZE                    32

#define MANIP_GET_HMCT_SIZE(h_Manip)                    (((t_FmPcdManip *)h_Manip)->tableSize)
#define MANIP_GET_DATA_SIZE(h_Manip)                    (((t_FmPcdManip *)h_Manip)->dataSize)

#define MANIP_GET_HMCT_PTR(h_Manip)                     (((t_FmPcdManip *)h_Manip)->p_Hmct)
#define MANIP_GET_DATA_PTR(h_Manip)                     (((t_FmPcdManip *)h_Manip)->p_Data)

#define MANIP_SET_HMCT_PTR(h_Manip, h_NewPtr)           (((t_FmPcdManip *)h_Manip)->p_Hmct = h_NewPtr)
#define MANIP_SET_DATA_PTR(h_Manip, h_NewPtr)           (((t_FmPcdManip *)h_Manip)->p_Data = h_NewPtr)

#define MANIP_GET_HMTD_PTR(h_Manip)                     (((t_FmPcdManip *)h_Manip)->h_Ad)
#define MANIP_DONT_REPARSE(h_Manip)                     (((t_FmPcdManip *)h_Manip)->dontParseAfterManip)
#define MANIP_SET_PREV(h_Manip, h_Prev)                 (((t_FmPcdManip *)h_Manip)->h_PrevManip = h_Prev)
#define MANIP_GET_OWNERS(h_Manip)                       (((t_FmPcdManip *)h_Manip)->owner)
#define MANIP_GET_TYPE(h_Manip)                         (((t_FmPcdManip *)h_Manip)->type)
#define MANIP_SET_UNIFIED_TBL_PTR_INDICATION(h_Manip)   (((t_FmPcdManip *)h_Manip)->unifiedTablePtr = TRUE)
#define MANIP_GET_MURAM(h_Manip)                        (((t_FmPcd *)((t_FmPcdManip *)h_Manip)->h_FmPcd)->h_FmMuram)
#define MANIP_FREE_HMTD(h_Manip)                        \
        {if (((t_FmPcdManip *)h_Manip)->muramAllocate)    \
            FM_MURAM_FreeMem(((t_FmPcd *)((t_FmPcdManip *)h_Manip)->h_FmPcd)->h_FmMuram, ((t_FmPcdManip *)h_Manip)->h_Ad);\
        else                                            \
            XX_Free(((t_FmPcdManip *)h_Manip)->h_Ad);    \
        ((t_FmPcdManip *)h_Manip)->h_Ad = NULL;            \
        }
/* position regarding Manip SW structure */
#define MANIP_IS_FIRST(h_Manip)                         (!(((t_FmPcdManip *)h_Manip)->h_PrevManip))
#define MANIP_IS_CASCADED(h_Manip)                       (((t_FmPcdManip *)h_Manip)->cascaded)
#define MANIP_IS_UNIFIED(h_Manip)                       (!(((t_FmPcdManip *)h_Manip)->unifiedPosition == e_MANIP_UNIFIED_NONE))
#define MANIP_IS_UNIFIED_NON_FIRST(h_Manip)             ((((t_FmPcdManip *)h_Manip)->unifiedPosition == e_MANIP_UNIFIED_MID) || \
                                                         (((t_FmPcdManip *)h_Manip)->unifiedPosition == e_MANIP_UNIFIED_LAST))
#define MANIP_IS_UNIFIED_NON_LAST(h_Manip)              ((((t_FmPcdManip *)h_Manip)->unifiedPosition == e_MANIP_UNIFIED_FIRST) ||\
                                                         (((t_FmPcdManip *)h_Manip)->unifiedPosition == e_MANIP_UNIFIED_MID))
#define MANIP_IS_UNIFIED_FIRST(h_Manip)                    (((t_FmPcdManip *)h_Manip)->unifiedPosition == e_MANIP_UNIFIED_FIRST)
#define MANIP_IS_UNIFIED_LAST(h_Manip)                   (((t_FmPcdManip *)h_Manip)->unifiedPosition == e_MANIP_UNIFIED_LAST)

#define MANIP_UPDATE_UNIFIED_POSITION(h_Manip)          (((t_FmPcdManip *)h_Manip)->unifiedPosition = \
                                                         (((t_FmPcdManip *)h_Manip)->unifiedPosition == e_MANIP_UNIFIED_NONE)? \
                                                            e_MANIP_UNIFIED_LAST : e_MANIP_UNIFIED_MID)

typedef enum e_ManipUnifiedPosition {
    e_MANIP_UNIFIED_NONE = 0,
    e_MANIP_UNIFIED_FIRST,
    e_MANIP_UNIFIED_MID,
    e_MANIP_UNIFIED_LAST
} e_ManipUnifiedPosition;

typedef enum e_ManipInfo {
    e_MANIP_HMTD,
    e_MANIP_HMCT,
    e_MANIP_HANDLER_TABLE_OWNER
}e_ManipInfo;
/***********************************************************************/
/*          Memory map                                                 */
/***********************************************************************/
#if defined(__MWERKS__) && !defined(__GNUC__)
#pragma pack(push,1)
#endif /* defined(__MWERKS__) && ... */

#if (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10))
typedef struct t_CapwapReasmPram {
    volatile uint32_t mode;
    volatile uint32_t autoLearnHashTblPtr;
    volatile uint32_t intStatsTblPtr;
    volatile uint32_t reasmFrmDescPoolTblPtr;
    volatile uint32_t reasmFrmDescIndexPoolTblPtr;
    volatile uint32_t timeOutTblPtr;
    volatile uint32_t bufferPoolIdAndRisc1SetIndexes;
    volatile uint32_t risc23SetIndexes;
    volatile uint32_t risc4SetIndexesAndExtendedStatsTblPtr;
    volatile uint32_t extendedStatsTblPtr;
    volatile uint32_t expirationDelay;
    volatile uint32_t totalProcessedFragCounter;
    volatile uint32_t totalUnsuccessfulReasmFramesCounter;
    volatile uint32_t totalDuplicatedFragCounter;
    volatile uint32_t totalMalformdFragCounter;
    volatile uint32_t totalTimeOutCounter;
    volatile uint32_t totalSetBusyCounter;
    volatile uint32_t totalRfdPoolBusyCounter;
    volatile uint32_t totalDiscardedFragsCounter;
    volatile uint32_t totalMoreThan16FramesCounter;
    volatile uint32_t internalBufferBusy;
    volatile uint32_t externalBufferBusy;
    volatile uint32_t reserved1[4];
} t_CapwapReasmPram;
#endif /* (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10)) */

typedef _Packed struct t_ReassTbl {
    volatile uint16_t waysNumAndSetSize;
    volatile uint16_t autoLearnHashKeyMask;
    volatile uint32_t reassCommonPrmTblPtr;
    volatile uint32_t liodnAlAndAutoLearnHashTblPtrHi;
    volatile uint32_t autoLearnHashTblPtrLow;
    volatile uint32_t liodnSlAndAutoLearnSetLockTblPtrHi;
    volatile uint32_t autoLearnSetLockTblPtrLow;
    volatile uint16_t minFragSize; /* Not relevant for CAPWAP*/
    volatile uint16_t maxReassemblySize; /* Only relevant for CAPWAP*/
    volatile uint32_t totalSuccessfullyReasmFramesCounter;
    volatile uint32_t totalValidFragmentCounter;
    volatile uint32_t totalProcessedFragCounter;
    volatile uint32_t totalMalformdFragCounter;
    volatile uint32_t totalSetBusyCounter;
    volatile uint32_t totalDiscardedFragsCounter;
    volatile uint32_t totalMoreThan16FramesCounter;
    volatile uint32_t reserved2[2];
} _PackedType t_ReassTbl;

typedef struct t_ReassCommonTbl {
    volatile uint32_t timeoutModeAndFqid;
    volatile uint32_t reassFrmDescIndexPoolTblPtr;
    volatile uint32_t liodnAndReassFrmDescPoolPtrHi;
    volatile uint32_t reassFrmDescPoolPtrLow;
    volatile uint32_t timeOutTblPtr;
    volatile uint32_t expirationDelay;
    volatile uint32_t internalBufferManagement;
    volatile uint32_t reserved2;
    volatile uint32_t totalTimeOutCounter;
    volatile uint32_t totalRfdPoolBusyCounter;
    volatile uint32_t totalInternalBufferBusy;
    volatile uint32_t totalExternalBufferBusy;
    volatile uint32_t totalSgFragmentCounter;
    volatile uint32_t totalDmaSemaphoreDepletionCounter;
    volatile uint32_t totalNCSPCounter;
    volatile uint32_t discardMask;
} t_ReassCommonTbl;

typedef _Packed struct t_Hmtd {
    volatile uint16_t   cfg;
    volatile uint8_t    eliodnOffset;
    volatile uint8_t    extHmcdBasePtrHi;
    volatile uint32_t   hmcdBasePtr;
    volatile uint16_t   nextAdIdx;
    volatile uint8_t    res1;
    volatile uint8_t    opCode;
    volatile uint32_t   res2;
} _PackedType t_Hmtd;

#if defined(__MWERKS__) && !defined(__GNUC__)
#pragma pack(pop)
#endif /* defined(__MWERKS__) && ... */


/***********************************************************************/
/*  Driver's internal structures                                       */
/***********************************************************************/
#if (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10))
typedef struct
{
    t_Handle p_AutoLearnHashTbl;
    t_Handle p_ReassmFrmDescrPoolTbl;
    t_Handle p_ReassmFrmDescrIndxPoolTbl;
    t_Handle p_TimeOutTbl;
    uint16_t maxNumFramesInProcess;
    uint8_t  numOfTasks;
    //uint8_t  poolId;
    uint8_t  prOffset;
    uint16_t dataOffset;
    uint8_t  sgBpid;
    uint8_t  hwPortId;
    uint32_t fqidForTimeOutFrames;
    uint32_t timeoutRoutineRequestTime;
    uint32_t bitFor1Micro;
} t_CapwapFragParams;
#endif /* (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10)) */

typedef struct
{
    t_AdOfTypeContLookup    *p_Frag;
#if (DPAA_VERSION == 10)
    uint8_t                 scratchBpid;
#endif /* (DPAA_VERSION == 10) */
} t_FragParams;

typedef struct t_ReassmParams
{
    e_NetHeaderType                 hdr; /* Header selection */
    t_ReassCommonTbl              	*p_ReassCommonTbl;
    uintptr_t                       reassFrmDescrIndxPoolTblAddr;
    uintptr_t                       reassFrmDescrPoolTblAddr;
    uintptr_t                       timeOutTblAddr;
    uintptr_t                       internalBufferPoolManagementIndexAddr;
    uintptr_t                       internalBufferPoolAddr;
    uint32_t                        maxNumFramesInProcess;
    uint8_t                         sgBpid;
    uint8_t                         dataMemId;
    uint16_t                        dataLiodnOffset;
    uint32_t                        fqidForTimeOutFrames;
    e_FmPcdManipReassemTimeOutMode  timeOutMode;
    uint32_t                        timeoutThresholdForReassmProcess;
    union {
	struct {
		t_Handle                h_Ipv4Ad;
	    t_Handle                h_Ipv6Ad;
	    bool                    ipv6Assigned;
	    t_ReassTbl				*p_Ipv4ReassTbl;
	    t_ReassTbl              *p_Ipv6ReassTbl;
	    uintptr_t               ipv4AutoLearnHashTblAddr;
	    uintptr_t               ipv6AutoLearnHashTblAddr;
	    uintptr_t               ipv4AutoLearnSetLockTblAddr;
	    uintptr_t               ipv6AutoLearnSetLockTblAddr;
	    uint16_t                        minFragSize[2];
	    e_FmPcdManipReassemWaysNumber   numOfFramesPerHashEntry[2];
	    uint8_t                         relativeSchemeId[2];
	    t_Handle                        h_Ipv4Scheme;
	    t_Handle                        h_Ipv6Scheme;
	    uint32_t                        nonConsistentSpFqid;
	} ip;
	struct {
		t_Handle                h_Ad;
	    t_ReassTbl				*p_ReassTbl;
	    uintptr_t               autoLearnHashTblAddr;
	    uintptr_t               autoLearnSetLockTblAddr;
	    uint16_t                maxRessembledsSize;
	    e_FmPcdManipReassemWaysNumber   numOfFramesPerHashEntry;
	    uint8_t                 relativeSchemeId;
	    t_Handle                h_Scheme;
	} capwap;
    };
} t_ReassmParams;

typedef struct{
    e_FmPcdManipType        type;
    t_FmPcdManipParams      manipParams;
    bool                    muramAllocate;
    t_Handle                h_Ad;
    uint32_t                opcode;
    bool                    rmv;
    bool                    insrt;
    t_Handle                h_NextManip;
    t_Handle                h_PrevManip;
    e_FmPcdManipType        nextManipType;
    /* HdrManip parameters*/
    uint8_t                 *p_Hmct;
    uint8_t                 *p_Data;
    bool                    dontParseAfterManip;
    bool                    fieldUpdate;
    bool                    custom;
    uint16_t                tableSize;
    uint8_t                 dataSize;
    bool                    cascaded;
    e_ManipUnifiedPosition  unifiedPosition;
    /* end HdrManip */
    uint8_t                 *p_Template;
    uint16_t                owner;
    uint32_t                updateParams;
    uint32_t                shadowUpdateParams;
    bool                    frag;
    bool                    reassm;
    uint16_t                sizeForFragmentation;
#if (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10))
    t_Handle                h_Frag;
    t_CapwapFragParams      capwapFragParams;
#endif /* (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10)) */
    union {
        t_ReassmParams    	reassmParams;
        t_FragParams      	fragParams;
    };
    uint8_t                 icOffset;
    uint16_t                ownerTmp;
    bool                    cnia;
    t_Handle                p_StatsTbl;
    t_Handle                h_FmPcd;
    t_List                  nodesLst;
    t_Handle                h_Spinlock;
} t_FmPcdManip;

typedef struct t_FmPcdCcSavedManipParams
{
    union
    {
        struct
        {
            uint16_t    dataOffset;
            //uint8_t     poolId;
        }capwapParams;
        struct
        {
            uint16_t    dataOffset;
            uint8_t     poolId;
        }ipParams;
    };

} t_FmPcdCcSavedManipParams;


#endif /* __FM_MANIP_H */