fm_port_ext.h revision 296177
1/* Copyright (c) 2008-2011 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 @File          fm_port_ext.h
35
36 @Description   FM-Port Application Programming Interface.
37*//***************************************************************************/
38#ifndef __FM_PORT_EXT
39#define __FM_PORT_EXT
40
41#include "error_ext.h"
42#include "std_ext.h"
43#include "fm_pcd_ext.h"
44#include "fm_ext.h"
45#include "net_ext.h"
46
47
48/**************************************************************************//**
49
50 @Group         FM_grp Frame Manager API
51
52 @Description   FM API functions, definitions and enums
53
54 @{
55*//***************************************************************************/
56
57/**************************************************************************//**
58 @Group         FM_PORT_grp FM Port
59
60 @Description   FM Port API
61
62                The FM uses a general module called "port" to represent a Tx port
63                (MAC), an Rx port (MAC), offline parsing flow or host command
64                flow. There may be up to 17 (may change) ports in an FM - 5 Tx
65                ports (4 for the 1G MACs, 1 for the 10G MAC), 5 Rx Ports, and 7
66                Host command/Offline parsing ports. The SW driver manages these
67                ports as sub-modules of the FM, i.e. after an FM is initialized,
68                its ports may be initialized and operated upon.
69
70                The port is initialized aware of its type, but other functions on
71                a port may be indifferent to its type. When necessary, the driver
72                verifies coherency and returns error if applicable.
73
74                On initialization, user specifies the port type and it's index
75                (relative to the port's type). Host command and Offline parsing
76                ports share the same id range, I.e user may not initialized host
77                command port 0 and offline parsing port 0.
78
79 @{
80*//***************************************************************************/
81
82/**************************************************************************//**
83 @Description   An enum for defining port PCD modes.
84                This enum defines the superset of PCD engines support - i.e. not
85                all engines have to be used, but all have to be enabled. The real
86                flow of a specific frame depends on the PCD configuration and the
87                frame headers and payload.
88*//***************************************************************************/
89typedef enum e_FmPortPcdSupport {
90    e_FM_PORT_PCD_SUPPORT_NONE = 0,             /**< BMI to BMI, PCD is not used */
91    e_FM_PORT_PCD_SUPPORT_PRS_ONLY,             /**< Use only Parser */
92    e_FM_PORT_PCD_SUPPORT_PLCR_ONLY,            /**< Use only Policer */
93    e_FM_PORT_PCD_SUPPORT_PRS_AND_PLCR,         /**< Use Parser and Policer */
94    e_FM_PORT_PCD_SUPPORT_PRS_AND_KG,           /**< Use Parser and Keygen */
95    e_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_CC,    /**< Use Parser, Keygen and Coarse Classification */
96    e_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_CC_AND_PLCR,
97                                                /**< Use all PCD engines */
98    e_FM_PORT_PCD_SUPPORT_PRS_AND_KG_AND_PLCR   /**< Use Parser, Keygen and Policer */
99#ifdef FM_CAPWAP_SUPPORT
100    ,
101    e_FM_PORT_PCD_SUPPORT_CC_ONLY,              /**< Use only Coarse Classification */
102    e_FM_PORT_PCD_SUPPORT_CC_AND_KG,            /**< Use Coarse Classification,and Keygen */
103    e_FM_PORT_PCD_SUPPORT_CC_AND_KG_AND_PLCR    /**< Use Coarse Classification, Keygen and Policer */
104#endif /* FM_CAPWAP_SUPPORT */
105} e_FmPortPcdSupport;
106
107/**************************************************************************//**
108 @Description   Port interrupts
109*//***************************************************************************/
110typedef enum e_FmPortExceptions {
111    e_FM_PORT_EXCEPTION_IM_BUSY                 /**< Independent-Mode Rx-BUSY */
112} e_FmPortExceptions;
113
114
115/**************************************************************************//**
116 @Collection    General FM Port defines
117*//***************************************************************************/
118#define FM_PORT_PRS_RESULT_NUM_OF_WORDS     8   /**< Number of 4 bytes words in parser result */
119/* @} */
120
121/**************************************************************************//**
122 @Collection   FM Frame error
123*//***************************************************************************/
124typedef uint32_t    fmPortFrameErrSelect_t;                         /**< typedef for defining Frame Descriptor errors */
125
126#define FM_PORT_FRM_ERR_UNSUPPORTED_FORMAT              0x04000000  /**< Offline parsing only! Unsupported Format */
127#define FM_PORT_FRM_ERR_LENGTH                          0x02000000  /**< Offline parsing only! Length Error */
128#define FM_PORT_FRM_ERR_DMA                             0x01000000  /**< DMA Data error */
129#ifdef FM_CAPWAP_SUPPORT
130#define FM_PORT_FRM_ERR_NON_FM                          0x00400000  /**< non Frame-Manager error; probably come from SEC that
131                                                                         was chained to FM */
132#endif /* FM_CAPWAP_SUPPORT */
133#define FM_PORT_FRM_ERR_PHYSICAL                        0x00080000  /**< Rx FIFO overflow, FCS error, code error, running disparity
134                                                                         error (SGMII and TBI modes), FIFO parity error. PHY
135                                                                         Sequence error, PHY error control character detected. */
136#define FM_PORT_FRM_ERR_SIZE                            0x00040000  /**< Frame too long OR Frame size exceeds max_length_frame  */
137#define FM_PORT_FRM_ERR_CLS_DISCARD                     0x00020000  /**< classification discard */
138#define FM_PORT_FRM_ERR_EXTRACTION                      0x00008000  /**< Extract Out of Frame */
139#define FM_PORT_FRM_ERR_NO_SCHEME                       0x00004000  /**< No Scheme Selected */
140#define FM_PORT_FRM_ERR_KEYSIZE_OVERFLOW                0x00002000  /**< Keysize Overflow */
141#define FM_PORT_FRM_ERR_COLOR_YELLOW                    0x00000400  /**< Frame color is yellow */
142#define FM_PORT_FRM_ERR_COLOR_RED                       0x00000800  /**< Frame color is red */
143#define FM_PORT_FRM_ERR_ILL_PLCR                        0x00000200  /**< Illegal Policer Profile selected */
144#define FM_PORT_FRM_ERR_PLCR_FRAME_LEN                  0x00000100  /**< Policer frame length error */
145#define FM_PORT_FRM_ERR_PRS_TIMEOUT                     0x00000080  /**< Parser Time out Exceed */
146#define FM_PORT_FRM_ERR_PRS_ILL_INSTRUCT                0x00000040  /**< Invalid Soft Parser instruction */
147#define FM_PORT_FRM_ERR_PRS_HDR_ERR                     0x00000020  /**< Header error was identified during parsing */
148#define FM_PORT_FRM_ERR_BLOCK_LIMIT_EXCEEDED            0x00000008  /**< Frame parsed beyind 256 first bytes */
149#define FM_PORT_FRM_ERR_PROCESS_TIMEOUT                 0x00000001  /**< FPM Frame Processing Timeout Exceeded */
150/* @} */
151
152
153
154/**************************************************************************//**
155 @Group         FM_PORT_init_grp FM Port Initialization Unit
156
157 @Description   FM Port Initialization Unit
158
159 @{
160*//***************************************************************************/
161
162/**************************************************************************//**
163 @Description   Exceptions user callback routine, will be called upon an
164                exception passing the exception identification.
165
166 @Param[in]     h_App      - User's application descriptor.
167 @Param[in]     exception  - The exception.
168  *//***************************************************************************/
169typedef void (t_FmPortExceptionCallback) (t_Handle h_App, e_FmPortExceptions exception);
170
171/**************************************************************************//**
172 @Description   User callback function called by driver with received data.
173
174                User provides this function. Driver invokes it.
175
176 @Param[in]     h_App           Application's handle originally specified to
177                                the API Config function
178 @Param[in]     p_Data          A pointer to data received
179 @Param[in]     length          length of received data
180 @Param[in]     status          receive status and errors
181 @Param[in]     position        position of buffer in frame
182 @Param[in]     h_BufContext    A handle of the user acossiated with this buffer
183
184 @Retval        e_RX_STORE_RESPONSE_CONTINUE - order the driver to continue Rx
185                                               operation for all ready data.
186 @Retval        e_RX_STORE_RESPONSE_PAUSE    - order the driver to stop Rx operation.
187*//***************************************************************************/
188typedef e_RxStoreResponse (t_FmPortImRxStoreCallback) (t_Handle h_App,
189                                                       uint8_t  *p_Data,
190                                                       uint16_t length,
191                                                       uint16_t status,
192                                                       uint8_t  position,
193                                                       t_Handle h_BufContext);
194
195/**************************************************************************//**
196 @Description   User callback function called by driver when transmit completed.
197
198                User provides this function. Driver invokes it.
199
200 @Param[in]     h_App           Application's handle originally specified to
201                                the API Config function
202 @Param[in]     p_Data          A pointer to data received
203 @Param[in]     status          transmit status and errors
204 @Param[in]     lastBuffer      is last buffer in frame
205 @Param[in]     h_BufContext    A handle of the user acossiated with this buffer
206 *//***************************************************************************/
207typedef void (t_FmPortImTxConfCallback) (t_Handle   h_App,
208                                         uint8_t    *p_Data,
209                                         uint16_t   status,
210                                         t_Handle   h_BufContext);
211
212/**************************************************************************//**
213 @Description   A structure of information about each of the external
214                buffer pools used by the port,
215*//***************************************************************************/
216typedef struct t_FmPortExtPoolParams {
217    uint8_t                 id;                 /**< External buffer pool id */
218    uint16_t                size;               /**< External buffer pool buffer size */
219} t_FmPortExtPoolParams;
220
221/**************************************************************************//**
222 @Description   A structure for informing the driver about the external
223                buffer pools allocated in the BM and used by this port.
224*//***************************************************************************/
225typedef struct t_FmPortExtPools {
226    uint8_t                 numOfPoolsUsed;     /**< Number of pools use by this port */
227    t_FmPortExtPoolParams   extBufPool[FM_PORT_MAX_NUM_OF_EXT_POOLS];
228                                                /**< Parameters for each port */
229} t_FmPortExtPools;
230
231/**************************************************************************//**
232 @Description   structure for additional Rx port parameters
233*//***************************************************************************/
234typedef struct t_FmPortRxParams {
235    uint32_t                errFqid;            /**< Error Queue Id. */
236    uint32_t                dfltFqid;           /**< Default Queue Id.  */
237    uint16_t                liodnOffset;        /**< Port's LIODN offset. */
238    t_FmPortExtPools        extBufPools;        /**< Which external buffer pools are used
239                                                     (up to FM_PORT_MAX_NUM_OF_EXT_POOLS), and their sizes. */
240} t_FmPortRxParams;
241
242/**************************************************************************//**
243 @Description   structure for additional non-Rx port parameters
244*//***************************************************************************/
245typedef struct t_FmPortNonRxParams {
246    uint32_t                errFqid;            /**< Error Queue Id. */
247    uint32_t                dfltFqid;           /**< For Tx and HC - Default Confirmation queue,
248                                                     0 means no Tx confirmation for processed
249                                                     frames. For OP - default Rx queue. */
250    uint32_t                qmChannel;          /**< QM-channel dedicated to this port; will be used
251                                                     by the FM for dequeue. */
252#ifdef FM_OP_PARTITION_ERRATA_FMANx8
253    uint16_t                opLiodnOffset;      /**< For Offline Parsing ports only. Port's LIODN offset. */
254#endif  /* FM_OP_PARTITION_ERRATA_FMANx8 */
255} t_FmPortNonRxParams;
256
257/**************************************************************************//**
258 @Description   structure for additional Rx port parameters
259*//***************************************************************************/
260typedef struct t_FmPortImRxTxParams {
261    t_Handle                    h_FmMuram;          /**< A handle of the FM-MURAM partition */
262    uint16_t                    liodnOffset;        /**< For Rx ports only. Port's LIODN Offset. */
263    uint8_t                     dataMemId;          /**< Memory partition ID for data buffers */
264    uint32_t                    dataMemAttributes;  /**< Memory attributes for data buffers */
265    t_BufferPoolInfo            rxPoolParams;       /**< For Rx ports only. */
266    t_FmPortImRxStoreCallback   *f_RxStore;         /**< For Rx ports only. */
267    t_FmPortImTxConfCallback    *f_TxConf;          /**< For Tx ports only. */
268} t_FmPortImRxTxParams;
269
270/**************************************************************************//**
271 @Description   Union for additional parameters depending on port type
272*//***************************************************************************/
273typedef union u_FmPortSpecificParams {
274    t_FmPortImRxTxParams        imRxTxParams;       /**< Rx/Tx Independent-Mode port parameter structure */
275    t_FmPortRxParams            rxParams;           /**< Rx port parameters structure */
276    t_FmPortNonRxParams         nonRxParams;        /**< Non-Rx port parameters structure */
277} u_FmPortSpecificParams;
278
279/**************************************************************************//**
280 @Description   structure representing FM initialization parameters
281*//***************************************************************************/
282typedef struct t_FmPortParams {
283    uintptr_t                   baseAddr;           /**< Virtual Address of memory mapped FM Port registers.*/
284    t_Handle                    h_Fm;               /**< A handle to the FM object this port related to */
285    e_FmPortType                portType;           /**< Port type */
286    uint8_t                     portId;             /**< Port Id - relative to type */
287    bool                        independentModeEnable;
288                                                    /**< This port is Independent-Mode - Used for Rx/Tx ports only! */
289    uint16_t                    liodnBase;          /**< Irrelevant for P4080 rev 1. LIODN base for this port, to be
290                                                         used together with LIODN offset. */
291    u_FmPortSpecificParams      specificParams;     /**< Additional parameters depending on port
292                                                         type. */
293
294    t_FmPortExceptionCallback   *f_Exception;       /**< Callback routine to be called of PCD exception */
295    t_Handle                    h_App;              /**< A handle to an application layer object; This handle will
296                                                         be passed by the driver upon calling the above callbacks */
297} t_FmPortParams;
298
299
300/**************************************************************************//**
301 @Function      FM_PORT_Config
302
303 @Description   Creates descriptor for the FM PORT module.
304
305                The routine returns a handle (descriptor) to the FM PORT object.
306                This descriptor must be passed as first parameter to all other
307                FM PORT function calls.
308
309                No actual initialization or configuration of FM hardware is
310                done by this routine.
311
312 @Param[in]     p_FmPortParams   - Pointer to data structure of parameters
313
314 @Retval        Handle to FM object, or NULL for Failure.
315*//***************************************************************************/
316t_Handle FM_PORT_Config(t_FmPortParams *p_FmPortParams);
317
318/**************************************************************************//**
319 @Function      FM_PORT_Init
320
321 @Description   Initializes the FM PORT module
322
323 @Param[in]     h_FmPort - FM PORT module descriptor
324
325 @Return        E_OK on success; Error code otherwise.
326*//***************************************************************************/
327t_Error FM_PORT_Init(t_Handle h_FmPort);
328
329/**************************************************************************//**
330 @Function      FM_PORT_Free
331
332 @Description   Frees all resources that were assigned to FM PORT module.
333
334                Calling this routine invalidates the descriptor.
335
336 @Param[in]     h_FmPort - FM PORT module descriptor
337
338 @Return        E_OK on success; Error code otherwise.
339*//***************************************************************************/
340t_Error FM_PORT_Free(t_Handle h_FmPort);
341
342
343/**************************************************************************//**
344 @Group         FM_PORT_advanced_init_grp    FM Port Advanced Configuration Unit
345
346 @Description   Configuration functions used to change default values.
347
348 @{
349*//***************************************************************************/
350
351/**************************************************************************//**
352 @Description   enum for defining QM frame dequeue
353*//***************************************************************************/
354typedef enum e_FmPortDeqType {
355   e_FM_PORT_DEQ_TYPE1,             /**< Dequeue from the SP channel - with priority precedence,
356                                         and Intra-Class Scheduling respected. */
357   e_FM_PORT_DEQ_TYPE2,             /**< Dequeue from the SP channel - with active FQ precedence,
358                                         and Intra-Class Scheduling respected. */
359   e_FM_PORT_DEQ_TYPE3              /**< Dequeue from the SP channel - with active FQ precedence,
360                                         and override Intra-Class Scheduling */
361} e_FmPortDeqType;
362
363#ifdef FM_QMI_DEQ_OPTIONS_SUPPORT
364/**************************************************************************//**
365 @Description   enum for defining QM frame dequeue
366*//***************************************************************************/
367typedef enum e_FmPortDeqPrefetchOption {
368   e_FM_PORT_DEQ_NO_PREFETCH,       /**< QMI preforms a dequeue action for a single frame
369                                         only when a dedicated portID Tnum is waiting. */
370   e_FM_PORT_DEQ_PARTIAL_PREFETCH,  /**< QMI preforms a dequeue action for 3 frames when
371                                         one dedicated portId tnum is waiting. */
372   e_FM_PORT_DEQ_FULL_PREFETCH      /**< QMI preforms a dequeue action for 3 frames when
373                                         no dedicated portId tnums are waiting. */
374
375} e_FmPortDeqPrefetchOption;
376#endif /* FM_QMI_DEQ_OPTIONS_SUPPORT */
377
378/**************************************************************************//**
379 @Description   enum for defining port DMA swap mode
380*//***************************************************************************/
381typedef enum e_FmPortDmaSwap {
382    e_FM_PORT_DMA_NO_SWP,           /**< No swap, transfer data as is.*/
383    e_FM_PORT_DMA_SWP_PPC_LE,       /**< The transferred data should be swapped
384                                         in PowerPc Little Endian mode. */
385    e_FM_PORT_DMA_SWP_BE            /**< The transferred data should be swapped
386                                         in Big Endian mode */
387} e_FmPortDmaSwap;
388
389/**************************************************************************//**
390 @Description   enum for defining port DMA cache attributes
391*//***************************************************************************/
392typedef enum e_FmPortDmaCache {
393    e_FM_PORT_DMA_NO_STASH = 0,     /**< Cacheable, no Allocate (No Stashing) */
394    e_FM_PORT_DMA_STASH = 1         /**< Cacheable and Allocate (Stashing on) */
395} e_FmPortDmaCache;
396
397/**************************************************************************//**
398 @Description   enum for defining port default color
399*//***************************************************************************/
400typedef enum e_FmPortColor {
401    e_FM_PORT_COLOR_GREEN,          /**< Default port color is green */
402    e_FM_PORT_COLOR_YELLOW,         /**< Default port color is yellow */
403    e_FM_PORT_COLOR_RED,            /**< Default port color is red */
404    e_FM_PORT_COLOR_OVERRIDE        /**< Ignore color */
405} e_FmPortColor;
406
407/**************************************************************************//**
408 @Description   struct for defining Dual Tx rate limiting scale
409*//***************************************************************************/
410typedef enum e_FmPortDualRateLimiterScaleDown {
411    e_FM_PORT_DUAL_RATE_LIMITER_NONE = 0,           /**< Use only single rate limiter  */
412    e_FM_PORT_DUAL_RATE_LIMITER_SCALE_DOWN_BY_2,    /**< Divide high rate limiter by 2 */
413    e_FM_PORT_DUAL_RATE_LIMITER_SCALE_DOWN_BY_4,    /**< Divide high rate limiter by 4 */
414    e_FM_PORT_DUAL_RATE_LIMITER_SCALE_DOWN_BY_8     /**< Divide high rate limiter by 8 */
415} e_FmPortDualRateLimiterScaleDown;
416
417
418/**************************************************************************//**
419 @Description   struct for defining FM port resources
420*//***************************************************************************/
421typedef struct t_FmPortRsrc {
422    uint32_t    num;                /**< Committed required resource */
423    uint32_t    extra;              /**< Extra (not committed) required resource */
424} t_FmPortRsrc;
425
426/**************************************************************************//**
427 @Description   struct for defining pool depletion criteria
428*//***************************************************************************/
429typedef struct t_FmPortBufPoolDepletion {
430    bool        numberOfPoolsModeEnable;            /**< select mode in which pause frames will be sent after
431                                                         a number of pools are depleted */
432    uint8_t     numOfPools;                         /**< the minimum number of depleted pools that will
433                                                         invoke pause frames transmission. */
434    bool        poolsToConsider[BM_MAX_NUM_OF_POOLS];
435                                                    /**< For each pool, TRUE if it should be considered for
436                                                         depletion (Note - this pool must be used by this port!) */
437    bool        singlePoolModeEnable;               /**< select mode in which pause frames will be sent after
438                                                         a single of pools are depleted */
439    bool        poolsToConsiderForSingleMode[BM_MAX_NUM_OF_POOLS];
440                                                    /**< For each pool, TRUE if it should be considered for
441                                                         depletion (Note - this pool must be used by this port!) */
442} t_FmPortBufPoolDepletion;
443
444/**************************************************************************//**
445 @Description   struct for defining observed pool depletion
446*//***************************************************************************/
447typedef struct t_FmPortObservedBufPoolDepletion {
448    t_FmPortBufPoolDepletion    poolDepletionParams;/**< parameters to define pool depletion */
449    t_FmPortExtPools            poolsParams;        /**< Which external buffer pools are observed
450                                                         (up to FM_PORT_MAX_NUM_OF_OBSERVED_EXT_POOLS),
451                                                         and their sizes. */
452} t_FmPortObservedBufPoolDepletion;
453
454/**************************************************************************//**
455 @Description   struct for defining Tx rate limiting
456*//***************************************************************************/
457typedef struct t_FmPortRateLimit {
458    uint16_t                            maxBurstSize;           /**< in kBytes for Tx ports, in frames
459                                                                     for offline parsing ports. (note that
460                                                                     for early chips burst size is
461                                                                     rounded up to a multiply of 1000 frames).*/
462    uint32_t                            rateLimit;              /**< in Kb/sec for Tx ports, in frame/sec for
463                                                                     offline parsing ports. Rate limit refers to
464                                                                     data rate (rather than line rate). */
465    e_FmPortDualRateLimiterScaleDown    rateLimitDivider;       /**< For offline parsing ports only. Not-valid
466                                                                     for some earlier chip revisions */
467} t_FmPortRateLimit;
468
469/**************************************************************************//**
470 @Description   struct for defining define the parameters of
471                the Rx port performance counters
472*//***************************************************************************/
473typedef struct t_FmPortPerformanceCnt {
474    uint8_t     taskCompVal;            /**< Task compare value */
475    uint8_t     queueCompVal;           /**< Rx queue/Tx confirm queue compare
476                                             value (unused for H/O) */
477    uint8_t     dmaCompVal;             /**< Dma compare value */
478    uint32_t    fifoCompVal;            /**< Fifo compare value (in bytes) */
479} t_FmPortPerformanceCnt;
480
481/**************************************************************************//**
482 @Description   struct for defining buffer content.
483*//***************************************************************************/
484typedef struct t_FmPortBufferPrefixContent {
485    uint16_t    privDataSize;       /**< Number of bytes to be left at the beginning
486                                         of the external buffer */
487    bool        passPrsResult;      /**< TRUE to pass the parse result to/from the FM */
488    bool        passTimeStamp;      /**< TRUE to pass the timeStamp to/from the FM */
489    bool        passHashResult;     /**< TRUE to pass the KG hash result to/from the FM */
490    bool        passAllOtherPCDInfo;/**< Add all other Internal-Context information:
491                                         AD, hash-result, key, etc. */
492    uint16_t    dataAlign;          /**< 0 to use driver's default alignment, other value
493                                         for selecting a data alignment (must be a
494                                         power of 2) */
495#ifdef DEBUG
496    bool        passDebugInfo;      /**< Debug-information */
497#endif /* DEBUG */
498#ifdef FM_CAPWAP_SUPPORT
499    uint8_t     manipExtraSpace;    /**< Maximum extra size needed (insertion-size minus removal-size) */
500#endif /* FM_CAPWAP_SUPPORT */
501} t_FmPortBufferPrefixContent;
502
503/**************************************************************************//**
504 @Description   struct for defining backup Bm Pools.
505*//***************************************************************************/
506typedef struct t_FmPortBackupBmPools {
507    uint8_t     numOfBackupPools;        /**< Number of BM backup pools -
508                                             must be smaller than the total number of
509                                             pools defined for the specified port.*/
510    uint8_t     poolIds[FM_PORT_MAX_NUM_OF_EXT_POOLS];
511                                        /**< numOfBackupPools pool id's, specifying which
512                                             pools should be used only as backup. Pool
513                                             id's specified here must be a subset of the
514                                             pools used by the specified port.*/
515} t_FmPortBackupBmPools;
516
517
518/**************************************************************************//**
519 @Function      FM_PORT_ConfigDeqHighPriority
520
521 @Description   Calling this routine changes the dequeue priority in the
522                internal driver data base from its default configuration
523                [TRUE]
524
525                May be used for Non-Rx ports only
526
527 @Param[in]     h_FmPort    A handle to a FM Port module.
528 @Param[in]     highPri     TRUE to select high priority, FALSE for normal operation.
529
530 @Return        E_OK on success; Error code otherwise.
531
532 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
533*//***************************************************************************/
534t_Error FM_PORT_ConfigDeqHighPriority(t_Handle h_FmPort, bool highPri);
535
536/**************************************************************************//**
537 @Function      FM_PORT_ConfigDeqType
538
539 @Description   Calling this routine changes the dequeue type parameter in the
540                internal driver data base from its default configuration
541                [e_FM_PORT_DEQ_TYPE1].
542
543                May be used for Non-Rx ports only
544
545 @Param[in]     h_FmPort    A handle to a FM Port module.
546 @Param[in]     deqType     According to QM definition.
547
548 @Return        E_OK on success; Error code otherwise.
549
550 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
551*//***************************************************************************/
552t_Error FM_PORT_ConfigDeqType(t_Handle h_FmPort, e_FmPortDeqType deqType);
553
554#ifdef FM_QMI_DEQ_OPTIONS_SUPPORT
555/**************************************************************************//**
556 @Function      FM_PORT_ConfigDeqPrefetchOption
557
558 @Description   Calling this routine changes the dequeue prefetch option parameter in the
559                internal driver data base from its default configuration
560                [e_FM_PORT_DEQ_FULL_PREFETCH]
561                Note: Available for some chips only
562
563                May be used for Non-Rx ports only
564
565 @Param[in]     h_FmPort            A handle to a FM Port module.
566 @Param[in]     deqPrefetchOption   New option
567
568 @Return        E_OK on success; Error code otherwise.
569
570 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
571*//***************************************************************************/
572t_Error FM_PORT_ConfigDeqPrefetchOption(t_Handle h_FmPort, e_FmPortDeqPrefetchOption deqPrefetchOption);
573#endif /* FM_QMI_DEQ_OPTIONS_SUPPORT */
574
575/**************************************************************************//**
576 @Function      FM_PORT_ConfigDeqByteCnt
577
578 @Description   Calling this routine changes the dequeue byte count parameter in
579                the internal driver data base from its default configuration [2000].
580
581                May be used for Non-Rx ports only
582
583 @Param[in]     h_FmPort        A handle to a FM Port module.
584 @Param[in]     deqByteCnt      New byte count
585
586 @Return        E_OK on success; Error code otherwise.
587
588 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
589*//***************************************************************************/
590t_Error FM_PORT_ConfigDeqByteCnt(t_Handle h_FmPort, uint16_t deqByteCnt);
591
592/**************************************************************************//**
593 @Function      FM_PORT_ConfigTxFifoMinFillLevel
594
595 @Description   Calling this routine changes the fifo minimum
596                fill level parameter in the internal driver data base
597                from its default configuration  [0]
598
599                May be used for Tx ports only
600
601 @Param[in]     h_FmPort        A handle to a FM Port module.
602 @Param[in]     minFillLevel    New value
603
604 @Return        E_OK on success; Error code otherwise.
605
606 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
607*//***************************************************************************/
608t_Error FM_PORT_ConfigTxFifoMinFillLevel(t_Handle h_FmPort, uint32_t minFillLevel);
609
610/**************************************************************************//**
611 @Function      FM_PORT_ConfigTxFifoDeqPipelineDepth
612
613 @Description   Calling this routine changes the fifo dequeue
614                pipeline depth parameter in the internal driver data base
615
616                from its default configuration: 1G ports: [2],
617                10G port: [8]
618
619                May be used for Tx ports only
620
621 @Param[in]     h_FmPort            A handle to a FM Port module.
622 @Param[in]     deqPipelineDepth    New value
623
624 @Return        E_OK on success; Error code otherwise.
625
626 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
627*//***************************************************************************/
628t_Error FM_PORT_ConfigTxFifoDeqPipelineDepth(t_Handle h_FmPort, uint8_t deqPipelineDepth);
629
630/**************************************************************************//**
631 @Function      FM_PORT_ConfigTxFifoLowComfLevel
632
633 @Description   Calling this routine changes the fifo low comfort level
634                parameter in internal driver data base
635                from its default configuration  [5]
636
637                May be used for Tx ports only
638
639 @Param[in]     h_FmPort            A handle to a FM Port module.
640 @Param[in]     fifoLowComfLevel    New value
641
642 @Return        E_OK on success; Error code otherwise.
643
644 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
645*//***************************************************************************/
646t_Error FM_PORT_ConfigTxFifoLowComfLevel(t_Handle h_FmPort, uint32_t fifoLowComfLevel);
647
648/**************************************************************************//**
649 @Function      FM_PORT_ConfigRxFifoThreshold
650
651 @Description   Calling this routine changes the threshold of the FIFO
652                fill level parameter in the internal driver data base
653                from its default configuration [BMI_MAX_FIFO_SIZE]
654
655                If the total number of buffers which are
656                currently in use and associated with the
657                specific RX port exceed this threshold, the
658                BMI will signal the MAC to send a pause frame
659                over the link.
660
661                May be used for Rx ports only
662
663 @Param[in]     h_FmPort            A handle to a FM Port module.
664 @Param[in]     fifoThreshold       New value
665
666 @Return        E_OK on success; Error code otherwise.
667
668 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
669*//***************************************************************************/
670t_Error FM_PORT_ConfigRxFifoThreshold(t_Handle h_FmPort, uint32_t fifoThreshold);
671
672/**************************************************************************//**
673 @Function      FM_PORT_ConfigRxFifoPriElevationLevel
674
675 @Description   Calling this routine changes the priority elevation level
676                parameter in the internal driver data base from its default
677                configuration  [BMI_MAX_FIFO_SIZE]
678
679                If the total number of buffers which are currently in use and
680                associated with the specific RX port exceed the amount specified
681                in priElevationLevel, BMI will signal the main FM's DMA to
682                elevate the FM priority on the system bus.
683
684                May be used for Rx ports only
685
686 @Param[in]     h_FmPort            A handle to a FM Port module.
687 @Param[in]     priElevationLevel   New value
688
689 @Return        E_OK on success; Error code otherwise.
690
691 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
692*//***************************************************************************/
693t_Error FM_PORT_ConfigRxFifoPriElevationLevel(t_Handle h_FmPort, uint32_t priElevationLevel);
694
695/**************************************************************************//**
696 @Function      FM_PORT_ConfigBufferPrefixContent
697
698 @Description   Defines the structure, size and content of the application buffer.
699                The prefix will
700                In Tx ports, if 'passPrsResult', the application
701                should set a value to their offsets in the prefix of
702                the FM will save the first 'privDataSize', than,
703                depending on 'passPrsResult' and 'passTimeStamp', copy parse result
704                and timeStamp, and the packet itself (in this order), to the
705                application buffer, and to offset.
706                Calling this routine changes the buffer margins definitions
707                in the internal driver data base from its default
708                configuration: Data size:  [0]
709                               Pass Parser result: [FALSE].
710                               Pass timestamp: [FALSE].
711
712                May be used for all ports
713
714 @Param[in]     h_FmPort                        A handle to a FM Port module.
715 @Param[in,out] p_FmPortBufferPrefixContent     A structure of parameters describing the
716                                                structure of the buffer.
717                                                Out parameter: Start margin - offset
718                                                of data from start of external buffer.
719
720 @Return        E_OK on success; Error code otherwise.
721
722 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
723*//***************************************************************************/
724t_Error FM_PORT_ConfigBufferPrefixContent(t_Handle h_FmPort, t_FmPortBufferPrefixContent *p_FmPortBufferPrefixContent);
725
726
727/**************************************************************************//**
728 @Function      FM_PORT_ConfigCheksumLastBytesIgnore
729
730 @Description   Calling this routine changes the number of checksum bytes to ignore
731                parameter in the internal driver data base from its default configuration
732                [0]
733
734                May be used by Tx & Rx ports only
735
736 @Param[in]     h_FmPort                A handle to a FM Port module.
737 @Param[in]     cheksumLastBytesIgnore    New value
738
739 @Return        E_OK on success; Error code otherwise.
740
741 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
742*//***************************************************************************/
743t_Error FM_PORT_ConfigCheksumLastBytesIgnore(t_Handle h_FmPort, uint8_t cheksumLastBytesIgnore);
744
745/**************************************************************************//**
746 @Function      FM_PORT_ConfigCutBytesFromEnd
747
748 @Description   Calling this routine changes the number of bytes to cut from a
749                frame's end parameter in the internal driver data base
750                from its default configuration  [4]
751                Note that if the result of (frame length before chop - cutBytesFromEnd) is
752                less than 14 bytes, the chop operation is not executed.
753
754                May be used for Rx ports only
755
756 @Param[in]     h_FmPort            A handle to a FM Port module.
757 @Param[in]     cutBytesFromEnd     New value
758
759 @Return        E_OK on success; Error code otherwise.
760
761 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
762*//***************************************************************************/
763t_Error FM_PORT_ConfigCutBytesFromEnd(t_Handle h_FmPort, uint8_t cutBytesFromEnd);
764
765/**************************************************************************//**
766 @Function      FM_PORT_ConfigPoolDepletion
767
768 @Description   Calling this routine enables pause frame generation depending on the
769                depletion status of BM pools. It also defines the conditions to activate
770                this functionality. By default, this functionality is disabled.
771
772                May be used for Rx ports only
773
774 @Param[in]     h_FmPort                A handle to a FM Port module.
775 @Param[in]     p_BufPoolDepletion      A structure of pool depletion parameters
776
777 @Return        E_OK on success; Error code otherwise.
778
779 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
780*//***************************************************************************/
781t_Error FM_PORT_ConfigPoolDepletion(t_Handle h_FmPort, t_FmPortBufPoolDepletion *p_BufPoolDepletion);
782
783/**************************************************************************//**
784 @Function      FM_PORT_ConfigObservedPoolDepletion
785
786 @Description   Calling this routine enables a mechanism to stop port enqueue
787                depending on the depletion status of selected BM pools.
788                It also defines the conditions to activate
789                this functionality. By default, this functionality is disabled.
790
791                Note: Available for some chips only
792
793                May be used for Offline Parsing ports only
794
795 @Param[in]     h_FmPort                            A handle to a FM Port module.
796 @Param[in]     p_FmPortObservedBufPoolDepletion    A structure of parameters for pool depletion.
797
798
799 @Return        E_OK on success; Error code otherwise.
800
801 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
802*//***************************************************************************/
803t_Error FM_PORT_ConfigObservedPoolDepletion(t_Handle h_FmPort, t_FmPortObservedBufPoolDepletion *p_FmPortObservedBufPoolDepletion);
804
805/**************************************************************************//**
806 @Function      FM_PORT_ConfigExtBufPools
807
808 @Description   This routine should be called for offline parsing ports
809                that internally use BM buffer pools. In such cases, e.g. for fragmentation and
810                re-assembly, the FM needs new BM buffers. By calling this routine the user
811                specifies the BM buffer pools that should be used.
812
813                Note: Available for some chips only
814
815                May be used for Offline Parsing ports only
816
817 @Param[in]     h_FmPort            A handle to a FM Port module.
818 @Param[in]     p_FmPortExtPools    A structure of parameters for the external pools.
819
820
821 @Return        E_OK on success; Error code otherwise.
822
823 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
824*//***************************************************************************/
825t_Error FM_PORT_ConfigExtBufPools(t_Handle h_FmPort, t_FmPortExtPools *p_FmPortExtPools);
826
827/**************************************************************************//**
828 @Function      FM_PORT_ConfigBackupPools
829
830 @Description   Calling this routine allows the configuration of some of the BM pools
831                defined for this port as backup pools.
832                A pool configured to be a backup pool will be used only if all other
833                enabled non-backup pools are depleted.
834
835                May be used for Rx ports only
836
837 @Param[in]     h_FmPort                A handle to a FM Port module.
838 @Param[in]     p_FmPortBackupBmPools   An array of pool id's. All pools specified here will
839                                        be defined as backup pools.
840
841 @Return        E_OK on success; Error code otherwise.
842
843 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
844*//***************************************************************************/
845t_Error FM_PORT_ConfigBackupPools(t_Handle h_FmPort, t_FmPortBackupBmPools *p_FmPortBackupBmPools);
846
847/**************************************************************************//**
848 @Function      FM_PORT_ConfigFrmDiscardOverride
849
850 @Description   Calling this routine changes the error frames destination parameter
851                in the internal driver data base from its default configuration:
852                override = [FALSE]
853
854                May be used for Rx and offline parsing ports only
855
856 @Param[in]     h_FmPort    A handle to a FM Port module.
857 @Param[in]     override    TRUE to override dicarding of error frames and
858                            enqueueing them to error queue.
859
860 @Return        E_OK on success; Error code otherwise.
861
862 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
863*//***************************************************************************/
864t_Error FM_PORT_ConfigFrmDiscardOverride(t_Handle h_FmPort, bool override);
865
866/**************************************************************************//**
867 @Function      FM_PORT_ConfigErrorsToDiscard
868
869 @Description   Calling this routine changes the behaviour on error parameter
870                in the internal driver data base from its default configuration:
871                [FM_PORT_FRM_ERR_CLS_DISCARD].
872                If a requested error was previously defined as "ErrorsToEnqueue" it's
873                definition will change and the frame will be discarded.
874                Errors that were not defined either as "ErrorsToEnqueue" nor as
875                "ErrorsToDiscard", will be forwarded to CPU.
876
877
878                May be used for Rx and offline parsing ports only
879
880 @Param[in]     h_FmPort    A handle to a FM Port module.
881 @Param[in]     errs        A list of errors to discard
882
883 @Return        E_OK on success; Error code otherwise.
884
885 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
886*//***************************************************************************/
887t_Error FM_PORT_ConfigErrorsToDiscard(t_Handle h_FmPort, fmPortFrameErrSelect_t errs);
888
889/**************************************************************************//**
890 @Function      FM_PORT_ConfigDmaSwapData
891
892 @Description   Calling this routine changes the DMA swap data aparameter
893                in the internal driver data base from its default
894                configuration  [e_FM_PORT_DMA_NO_SWP]
895
896                May be used for all port types
897
898 @Param[in]     h_FmPort    A handle to a FM Port module.
899 @Param[in]     swapData    New selection
900
901 @Return        E_OK on success; Error code otherwise.
902
903 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
904*//***************************************************************************/
905t_Error FM_PORT_ConfigDmaSwapData(t_Handle h_FmPort, e_FmPortDmaSwap swapData);
906
907/**************************************************************************//**
908 @Function      FM_PORT_ConfigDmaIcCacheAttr
909
910 @Description   Calling this routine changes the internal context cache
911                attribute parameter in the internal driver data base
912                from its default configuration  [e_FM_PORT_DMA_NO_STASH]
913
914                May be used for all port types
915
916 @Param[in]     h_FmPort               A handle to a FM Port module.
917 @Param[in]     intContextCacheAttr    New selection
918
919 @Return        E_OK on success; Error code otherwise.
920
921 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
922*//***************************************************************************/
923t_Error FM_PORT_ConfigDmaIcCacheAttr(t_Handle h_FmPort, e_FmPortDmaCache intContextCacheAttr);
924
925/**************************************************************************//**
926 @Function      FM_PORT_ConfigDmaHdrAttr
927
928 @Description   Calling this routine changes the header cache
929                attribute parameter in the internal driver data base
930                from its default configuration  [e_FM_PORT_DMA_NO_STASH]
931
932                May be used for all port types
933
934 @Param[in]     h_FmPort                    A handle to a FM Port module.
935 @Param[in]     headerCacheAttr             New selection
936
937 @Return        E_OK on success; Error code otherwise.
938
939 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
940*//***************************************************************************/
941t_Error FM_PORT_ConfigDmaHdrAttr(t_Handle h_FmPort, e_FmPortDmaCache headerCacheAttr);
942
943/**************************************************************************//**
944 @Function      FM_PORT_ConfigDmaScatterGatherAttr
945
946 @Description   Calling this routine changes the scatter gather cache
947                attribute parameter in the internal driver data base
948                from its default configuration  [e_FM_PORT_DMA_NO_STASH]
949
950                May be used for all port types
951
952 @Param[in]     h_FmPort                    A handle to a FM Port module.
953 @Param[in]     scatterGatherCacheAttr      New selection
954
955 @Return        E_OK on success; Error code otherwise.
956
957 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
958*//***************************************************************************/
959t_Error FM_PORT_ConfigDmaScatterGatherAttr(t_Handle h_FmPort, e_FmPortDmaCache scatterGatherCacheAttr);
960
961/**************************************************************************//**
962 @Function      FM_PORT_ConfigDmaWriteOptimize
963
964 @Description   Calling this routine changes the write optimization
965                parameter in the internal driver data base
966                from its default configuration:  optimize = [TRUE]
967
968                May be used for non-Tx port types
969
970 @Param[in]     h_FmPort    A handle to a FM Port module.
971 @Param[in]     optimize    TRUE to enable optimization, FALSE for normal operation
972
973 @Return        E_OK on success; Error code otherwise.
974
975 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
976*//***************************************************************************/
977t_Error FM_PORT_ConfigDmaWriteOptimize(t_Handle h_FmPort, bool optimize);
978
979/**************************************************************************//**
980 @Function      FM_PORT_ConfigDfltColor
981
982 @Description   Calling this routine changes the internal default color parameter
983                in the internal driver data base
984                from its default configuration  [e_FM_PORT_COLOR_GREEN]
985
986                May be used for all port types
987
988 @Param[in]     h_FmPort        A handle to a FM Port module.
989 @Param[in]     color           New selection
990
991 @Return        E_OK on success; Error code otherwise.
992
993 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
994*//***************************************************************************/
995t_Error FM_PORT_ConfigDfltColor(t_Handle h_FmPort, e_FmPortColor color);
996
997/**************************************************************************//**
998 @Function      FM_PORT_ConfigSyncReq
999
1000 @Description   Calling this routine changes the synchronization attribute parameter
1001                in the internal driver data base from its default configuration:
1002                syncReq = [TRUE]
1003
1004                May be used for all port types
1005
1006 @Param[in]     h_FmPort        A handle to a FM Port module.
1007 @Param[in]     syncReq         TRUE to request synchronization, FALSE otherwize.
1008
1009 @Return        E_OK on success; Error code otherwise.
1010
1011 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
1012*//***************************************************************************/
1013t_Error FM_PORT_ConfigSyncReq(t_Handle h_FmPort, bool syncReq);
1014
1015/**************************************************************************//**
1016 @Function      FM_PORT_ConfigForwardReuseIntContext
1017
1018 @Description   This routine is relevant for Rx ports that are routed to offline
1019                parsing. It changes the internal context reuse option
1020                in the internal driver data base from its default configuration:
1021                reuse = [FALSE]
1022
1023                May be used for Rx ports only
1024
1025 @Param[in]     h_FmPort        A handle to a FM Port module.
1026 @Param[in]     reuse           TRUE to reuse internal context on frames
1027                                forwarded to offline parsing.
1028
1029 @Return        E_OK on success; Error code otherwise.
1030
1031 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
1032*//***************************************************************************/
1033t_Error FM_PORT_ConfigForwardReuseIntContext(t_Handle h_FmPort, bool reuse);
1034
1035/**************************************************************************//**
1036 @Function      FM_PORT_ConfigDontReleaseTxBufToBM
1037
1038 @Description   This routine should be called if no Tx confirmation
1039                is done, and yet buffers should not be released to the BM.
1040                Normally, buffers are returned using the Tx confirmation
1041                process. When Tx confirmation is not used (defFqid=0),
1042                buffers are typically released to the BM. This routine
1043                may be called to avoid this behavior and not release the
1044                buffers.
1045
1046                May be used for Tx ports only
1047
1048 @Param[in]     h_FmPort        A handle to a FM Port module.
1049
1050 @Return        E_OK on success; Error code otherwise.
1051
1052 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
1053*//***************************************************************************/
1054t_Error FM_PORT_ConfigDontReleaseTxBufToBM(t_Handle h_FmPort);
1055
1056/**************************************************************************//**
1057 @Function      FM_PORT_ConfigIMMaxRxBufLength
1058
1059 @Description   Changes the maximum receive buffer length from its default
1060                configuration: Closest rounded down power of 2 value of the
1061                data buffer size.
1062
1063                The maximum receive buffer length directly affects the structure
1064                of received frames (single- or multi-buffered) and the performance
1065                of both the FM and the driver.
1066
1067                The selection between single- or multi-buffered frames should be
1068                done according to the characteristics of the specific application.
1069                The recommended mode is to use a single data buffer per packet,
1070                as this mode provides the best performance. However, the user can
1071                select to use multiple data buffers per packet.
1072
1073 @Param[in]     h_FmPort        A handle to a FM Port module.
1074 @Param[in]     newVal          Maximum receive buffer length (in bytes).
1075
1076 @Return        E_OK on success; Error code otherwise.
1077
1078 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
1079                This routine is to be used only if Independent-Mode is enabled.
1080*//***************************************************************************/
1081t_Error FM_PORT_ConfigIMMaxRxBufLength(t_Handle h_FmPort, uint16_t newVal);
1082
1083/**************************************************************************//**
1084 @Function      FM_PORT_ConfigIMRxBdRingLength
1085
1086 @Description   Changes the receive BD ring length from its default
1087                configuration:[128]
1088
1089 @Param[in]     h_FmPort        A handle to a FM Port module.
1090 @Param[in]     newVal          The desired BD ring length.
1091
1092 @Return        E_OK on success; Error code otherwise.
1093
1094 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
1095                This routine is to be used only if Independent-Mode is enabled.
1096*//***************************************************************************/
1097t_Error FM_PORT_ConfigIMRxBdRingLength(t_Handle h_FmPort, uint16_t newVal);
1098
1099/**************************************************************************//**
1100 @Function      FM_PORT_ConfigIMTxBdRingLength
1101
1102 @Description   Changes the transmit BD ring length from its default
1103                configuration:[16]
1104
1105 @Param[in]     h_FmPort        A handle to a FM Port module.
1106 @Param[in]     newVal          The desired BD ring length.
1107
1108 @Return        E_OK on success; Error code otherwise.
1109
1110 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
1111                This routine is to be used only if Independent-Mode is enabled.
1112*//***************************************************************************/
1113t_Error FM_PORT_ConfigIMTxBdRingLength(t_Handle h_FmPort, uint16_t newVal);
1114
1115/**************************************************************************//**
1116 @Function      FM_PORT_ConfigIMFmanCtrlExternalStructsMemory
1117
1118 @Description   Configures memory partition and attributes for FMan-Controller
1119                data structures (e.g. BD rings).
1120                Calling this routine changes the internal driver data base
1121                from its default configuration
1122                [0 , MEMORY_ATTR_CACHEABLE].
1123
1124 @Param[in]     h_FmPort        A handle to a FM Port module.
1125 @Param[in]     memId           Memory partition ID.
1126 @Param[in]     memAttributes   Memory attributes mask (a combination of MEMORY_ATTR_x flags).
1127
1128 @Return        E_OK on success; Error code otherwise.
1129*//***************************************************************************/
1130t_Error  FM_PORT_ConfigIMFmanCtrlExternalStructsMemory(t_Handle h_FmPort,
1131                                                       uint8_t  memId,
1132                                                       uint32_t memAttributes);
1133
1134/**************************************************************************//**
1135 @Function      FM_PORT_ConfigIMPolling
1136
1137 @Description   Changes the Rx flow from interrupt driven (default) to polling.
1138
1139 @Param[in]     h_FmPort        A handle to a FM Port module.
1140
1141 @Return        E_OK on success; Error code otherwise.
1142
1143 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
1144                This routine is to be used only if Independent-Mode is enabled.
1145*//***************************************************************************/
1146t_Error FM_PORT_ConfigIMPolling(t_Handle h_FmPort);
1147
1148/** @} */ /* end of FM_PORT_advanced_init_grp group */
1149/** @} */ /* end of FM_PORT_init_grp group */
1150
1151
1152/**************************************************************************//**
1153 @Group         FM_PORT_runtime_control_grp FM Port Runtime Control Unit
1154
1155 @Description   FM Port Runtime control unit API functions, definitions and enums.
1156
1157 @{
1158*//***************************************************************************/
1159
1160/**************************************************************************//**
1161 @Description   enum for defining FM Port counters
1162*//***************************************************************************/
1163typedef enum e_FmPortCounters {
1164    e_FM_PORT_COUNTERS_CYCLE,                       /**< BMI performance counter */
1165    e_FM_PORT_COUNTERS_TASK_UTIL,                   /**< BMI performance counter */
1166    e_FM_PORT_COUNTERS_QUEUE_UTIL,                  /**< BMI performance counter */
1167    e_FM_PORT_COUNTERS_DMA_UTIL,                    /**< BMI performance counter */
1168    e_FM_PORT_COUNTERS_FIFO_UTIL,                   /**< BMI performance counter */
1169    e_FM_PORT_COUNTERS_RX_PAUSE_ACTIVATION,         /**< BMI Rx only performance counter */
1170    e_FM_PORT_COUNTERS_FRAME,                       /**< BMI statistics counter */
1171    e_FM_PORT_COUNTERS_DISCARD_FRAME,               /**< BMI statistics counter */
1172    e_FM_PORT_COUNTERS_DEALLOC_BUF,                 /**< BMI deallocate buffer statistics counter */
1173    e_FM_PORT_COUNTERS_RX_BAD_FRAME,                /**< BMI Rx only statistics counter */
1174    e_FM_PORT_COUNTERS_RX_LARGE_FRAME,              /**< BMI Rx only statistics counter */
1175    e_FM_PORT_COUNTERS_RX_OUT_OF_BUFFERS_DISCARD,   /**< BMI Rx only statistics counter */
1176    e_FM_PORT_COUNTERS_RX_FILTER_FRAME,             /**< BMI Rx & OP only statistics counter */
1177    e_FM_PORT_COUNTERS_RX_LIST_DMA_ERR,             /**< BMI Rx, OP & HC only statistics counter */
1178    e_FM_PORT_COUNTERS_WRED_DISCARD,                /**< BMI OP & HC only statistics counter */
1179    e_FM_PORT_COUNTERS_LENGTH_ERR,                  /**< BMI non-Rx statistics counter */
1180    e_FM_PORT_COUNTERS_UNSUPPRTED_FORMAT,           /**< BMI non-Rx statistics counter */
1181    e_FM_PORT_COUNTERS_DEQ_TOTAL,                   /**< QMI counter */
1182    e_FM_PORT_COUNTERS_ENQ_TOTAL,                   /**< QMI counter */
1183    e_FM_PORT_COUNTERS_DEQ_FROM_DEFAULT,            /**< QMI counter */
1184    e_FM_PORT_COUNTERS_DEQ_CONFIRM                  /**< QMI counter */
1185} e_FmPortCounters;
1186
1187/**************************************************************************//**
1188 @Description   Structure for Port id parameters.
1189                Fields commented 'IN' are passed by the port module to be used
1190                by the FM module.
1191                Fields commented 'OUT' will be filled by FM before returning to port.
1192*//***************************************************************************/
1193typedef struct t_FmPortCongestionGrps {
1194    uint16_t    numOfCongestionGrpsToConsider;          /**< The number of required congestion groups
1195                                                             to define the size of the following array */
1196    uint8_t     congestionGrpsToConsider[FM_PORT_NUM_OF_CONGESTION_GRPS];
1197                                                        /**< An array of 'numOfCongestionGrpsToConsider'
1198                                                             describing the groups */
1199} t_FmPortCongestionGrps;
1200
1201
1202
1203#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
1204/**************************************************************************//**
1205 @Function      FM_PORT_DumpRegs
1206
1207 @Description   Dump all regs.
1208
1209                Calling this routine invalidates the descriptor.
1210
1211 @Param[in]     h_FmPort - FM PORT module descriptor
1212
1213 @Return        E_OK on success; Error code otherwise.
1214
1215 @Cautions      Allowed only following FM_PORT_Init().
1216*//***************************************************************************/
1217t_Error FM_PORT_DumpRegs(t_Handle h_FmPort);
1218#endif /* (defined(DEBUG_ERRORS) && ... */
1219
1220/**************************************************************************//**
1221 @Function      FM_PORT_GetBufferDataOffset
1222
1223 @Description   Relevant for Rx ports.
1224                Returns the data offset from the beginning of the data buffer
1225
1226 @Param[in]     h_FmPort - FM PORT module descriptor
1227
1228 @Return        data offset.
1229
1230 @Cautions      Allowed only following FM_PORT_Init().
1231*//***************************************************************************/
1232uint32_t FM_PORT_GetBufferDataOffset(t_Handle h_FmPort);
1233
1234/**************************************************************************//**
1235 @Function      FM_PORT_GetBufferICInfo
1236
1237 @Description   Returns the Internal Context offset from the beginning of the data buffer
1238
1239 @Param[in]     h_FmPort - FM PORT module descriptor
1240 @Param[in]     p_Data      - A pointer to the data buffer.
1241
1242 @Return        Internal context info pointer on success, NULL if 'allOtherInfo' was not
1243                configured for this port.
1244
1245 @Cautions      Allowed only following FM_PORT_Init().
1246*//***************************************************************************/
1247uint8_t * FM_PORT_GetBufferICInfo(t_Handle h_FmPort, char *p_Data);
1248
1249#ifdef DEBUG
1250/**************************************************************************//**
1251 @Function      FM_PORT_GetBufferDebugInfo
1252
1253 @Description   Returns the debug info offset from the beginning of the data buffer
1254
1255 @Param[in]     h_FmPort - FM PORT module descriptor
1256 @Param[in]     p_Data      - A pointer to the data buffer.
1257
1258 @Return        Debug info pointer on success, NULL if 'passDebugInfo' was not
1259                configured for this port.
1260
1261 @Cautions      Allowed only following FM_PORT_Init().
1262*//***************************************************************************/
1263uint8_t * FM_PORT_GetBufferDebugInfo(t_Handle h_FmPort, char *p_Data);
1264#endif /* DEBUG */
1265
1266/**************************************************************************//**
1267 @Function      FM_PORT_GetBufferPrsResult
1268
1269 @Description   Returns the pointer to the parse result in the data buffer.
1270                In Rx ports this is relevant after reception, if parse
1271                result is configured to be part of the data passed to the
1272                application. For non Rx ports it may be used to get the pointer
1273                of the area in the buffer where parse result should be
1274                initialized - if so configured.
1275                See FM_PORT_ConfigBufferPrefixContent for data buffer prefix
1276                configuration.
1277
1278 @Param[in]     h_FmPort    - FM PORT module descriptor
1279 @Param[in]     p_Data      - A pointer to the data buffer.
1280
1281 @Return        Parse result pointer on success, NULL if parse result was not
1282                configured for this port.
1283
1284 @Cautions      Allowed only following FM_PORT_Init().
1285*//***************************************************************************/
1286t_FmPrsResult * FM_PORT_GetBufferPrsResult(t_Handle h_FmPort, char *p_Data);
1287
1288/**************************************************************************//**
1289 @Function      FM_PORT_GetBufferTimeStamp
1290
1291 @Description   Returns the time stamp in the data buffer.
1292                Relevant for Rx ports for getting the buffer time stamp.
1293                See FM_PORT_ConfigBufferPrefixContent for data buffer prefix
1294                configuration.
1295
1296 @Param[in]     h_FmPort    - FM PORT module descriptor
1297 @Param[in]     p_Data      - A pointer to the data buffer.
1298
1299 @Return        A pointer to the hash result on success, NULL otherwise.
1300
1301 @Cautions      Allowed only following FM_PORT_Init().
1302*//***************************************************************************/
1303uint64_t * FM_PORT_GetBufferTimeStamp(t_Handle h_FmPort, char *p_Data);
1304
1305/**************************************************************************//**
1306 @Function      FM_PORT_GetBufferHashResult
1307
1308 @Description   Given a data buffer, on the condition that hash result was defined
1309                as a part of the buffer content (see FM_PORT_ConfigBufferPrefixContent)
1310                this routine will return the pointer to the hash result location in the
1311                buffer prefix.
1312
1313 @Param[in]     h_FmPort    - FM PORT module descriptor
1314 @Param[in]     p_Data      - A pointer to the data buffer.
1315
1316 @Return        A pointer to the hash result on success, NULL otherwise.
1317
1318 @Cautions      Allowed only following FM_PORT_Init().
1319*//***************************************************************************/
1320uint8_t * FM_PORT_GetBufferHashResult(t_Handle h_FmPort, char *p_Data);
1321
1322/**************************************************************************//**
1323 @Function      FM_PORT_Disable
1324
1325 @Description   Gracefully disable an FM port. The port will not start new tasks after all
1326                tasks associated with the port are terminated.
1327
1328 @Param[in]     h_FmPort    A handle to a FM Port module.
1329
1330 @Return        E_OK on success; Error code otherwise.
1331
1332 @Cautions      Allowed only following FM_PORT_Init().
1333                This is a blocking routine, it returns after port is
1334                gracefully stopped, i.e. the port will not except new frames,
1335                but it will finish all frames or tasks which were already began
1336*//***************************************************************************/
1337t_Error FM_PORT_Disable(t_Handle h_FmPort);
1338
1339/**************************************************************************//**
1340 @Function      FM_PORT_Enable
1341
1342 @Description   A runtime routine provided to allow disable/enable of port.
1343
1344 @Param[in]     h_FmPort    A handle to a FM Port module.
1345
1346 @Return        E_OK on success; Error code otherwise.
1347
1348 @Cautions      Allowed only following FM_PORT_Init().
1349*//***************************************************************************/
1350t_Error FM_PORT_Enable(t_Handle h_FmPort);
1351
1352/**************************************************************************//**
1353 @Function      FM_PORT_SetRateLimit
1354
1355 @Description   Calling this routine enables rate limit algorithm.
1356                By default, this functionality is disabled.
1357                Note that rate-limit mechanism uses the FM time stamp.
1358                The selected rate limit specified here would be
1359                rounded DOWN to the nearest 16M.
1360
1361                May be used for Tx and offline parsing ports only
1362
1363 @Param[in]     h_FmPort        A handle to a FM Port module.
1364 @Param[in]     p_RateLimit     A structure of rate limit parameters
1365
1366 @Return        E_OK on success; Error code otherwise.
1367
1368 @Cautions      Allowed only following FM_PORT_Init().
1369*//***************************************************************************/
1370t_Error FM_PORT_SetRateLimit(t_Handle h_FmPort, t_FmPortRateLimit *p_RateLimit);
1371
1372/**************************************************************************//**
1373 @Function      FM_PORT_DeleteRateLimit
1374
1375 @Description   Calling this routine disables and clears rate limit
1376                initialization.
1377
1378                May be used for Tx and offline parsing ports only
1379
1380 @Param[in]     h_FmPort        A handle to a FM Port module.
1381
1382 @Return        E_OK on success; Error code otherwise.
1383
1384 @Cautions      Allowed only following FM_PORT_Init().
1385*//***************************************************************************/
1386t_Error FM_PORT_DeleteRateLimit(t_Handle h_FmPort);
1387
1388/**************************************************************************//**
1389 @Function      FM_PORT_SetStatisticsCounters
1390
1391 @Description   Calling this routine enables/disables port's statistics counters.
1392                By default, counters are enabled.
1393
1394                May be used for all port types
1395
1396 @Param[in]     h_FmPort    A handle to a FM Port module.
1397 @Param[in]     enable      TRUE to enable, FALSE to disable.
1398
1399 @Return        E_OK on success; Error code otherwise.
1400
1401 @Cautions      Allowed only following FM_PORT_Init().
1402*//***************************************************************************/
1403t_Error FM_PORT_SetStatisticsCounters(t_Handle h_FmPort, bool enable);
1404
1405/**************************************************************************//**
1406 @Function      FM_PORT_SetFrameQueueCounters
1407
1408 @Description   Calling this routine enables/disables port's enqueue/dequeue counters.
1409                By default, counters are enabled.
1410
1411                May be used for all ports
1412
1413 @Param[in]     h_FmPort    A handle to a FM Port module.
1414 @Param[in]     enable      TRUE to enable, FALSE to disable.
1415
1416 @Return        E_OK on success; Error code otherwise.
1417
1418 @Cautions      Allowed only following FM_PORT_Init().
1419*//***************************************************************************/
1420t_Error FM_PORT_SetFrameQueueCounters(t_Handle h_FmPort, bool enable);
1421
1422/**************************************************************************//**
1423 @Function      FM_PORT_SetPerformanceCounters
1424
1425 @Description   Calling this routine enables/disables port's performance counters.
1426                By default, counters are enabled.
1427
1428                May be used for all port types
1429
1430 @Param[in]     h_FmPort                A handle to a FM Port module.
1431 @Param[in]     enable                  TRUE to enable, FALSE to disable.
1432
1433 @Return        E_OK on success; Error code otherwise.
1434
1435 @Cautions      Allowed only following FM_PORT_Init().
1436*//***************************************************************************/
1437t_Error FM_PORT_SetPerformanceCounters(t_Handle h_FmPort, bool enable);
1438
1439/**************************************************************************//**
1440 @Function      FM_PORT_SetPerformanceCounters
1441
1442 @Description   Calling this routine defines port's performance
1443                counters parameters.
1444
1445                May be used for all port types
1446
1447 @Param[in]     h_FmPort                A handle to a FM Port module.
1448 @Param[in]     p_FmPortPerformanceCnt  A pointer to a structure of performance
1449                                        counters parameters.
1450
1451 @Return        E_OK on success; Error code otherwise.
1452
1453 @Cautions      Allowed only following FM_PORT_Init().
1454*//***************************************************************************/
1455t_Error FM_PORT_SetPerformanceCountersParams(t_Handle h_FmPort, t_FmPortPerformanceCnt *p_FmPortPerformanceCnt);
1456
1457/**************************************************************************//**
1458 @Function      FM_PORT_AnalyzePerformanceParams
1459
1460 @Description   User may call this routine to so the driver will analyze if the
1461                basic performance parameters are correct and also the driver may
1462                suggest of improvments; The basic parameters are FIFO sizes, number
1463                of DMAs and number of TNUMs for the port.
1464
1465                May be used for all port types
1466
1467 @Param[in]     h_FmPort                A handle to a FM Port module.
1468
1469 @Return        E_OK on success; Error code otherwise.
1470
1471 @Cautions      Allowed only following FM_PORT_Init().
1472*//***************************************************************************/
1473t_Error FM_PORT_AnalyzePerformanceParams(t_Handle h_FmPort);
1474
1475/**************************************************************************//**
1476 @Function      FM_PORT_SetNumOfOpenDmas
1477
1478 @Description   Calling this routine updates the number of open DMA requested for
1479                this port.
1480
1481
1482                May be used for all port types.
1483
1484 @Param[in]     h_FmPort            A handle to a FM Port module.
1485 @Param[in]     p_NumOfOpenDmas     A structure of resource requested parameters
1486
1487 @Return        E_OK on success; Error code otherwise.
1488
1489 @Cautions      Allowed only following FM_PORT_Init().
1490*//***************************************************************************/
1491t_Error FM_PORT_SetNumOfOpenDmas(t_Handle h_FmPort, t_FmPortRsrc *p_NumOfOpenDmas);
1492
1493/**************************************************************************//**
1494 @Function      FM_PORT_SetNumOfTasks
1495
1496 @Description   Calling this routine updates the number of tasks requested for
1497                this port.
1498
1499                May be used for all port types.
1500
1501 @Param[in]     h_FmPort            A handle to a FM Port module.
1502 @Param[in]     p_NumOfTasks        A structure of resource requested parameters
1503
1504 @Return        E_OK on success; Error code otherwise.
1505
1506 @Cautions      Allowed only following FM_PORT_Init().
1507*//***************************************************************************/
1508t_Error FM_PORT_SetNumOfTasks(t_Handle h_FmPort, t_FmPortRsrc *p_NumOfTasks);
1509
1510/**************************************************************************//**
1511 @Function      FM_PORT_SetSizeOfFifo
1512
1513 @Description   Calling this routine updates the Fifo size resource requested for
1514                this port.
1515
1516                May be used for all port types - note that only Rx has 'extra'
1517                fifo size. For other ports 'extra' field must be disabled.
1518
1519 @Param[in]     h_FmPort            A handle to a FM Port module.
1520 @Param[in]     p_SizeOfFifo        A structure of resource requested parameters
1521
1522 @Return        E_OK on success; Error code otherwise.
1523
1524 @Cautions      Allowed only following FM_PORT_Init().
1525*//***************************************************************************/
1526t_Error FM_PORT_SetSizeOfFifo(t_Handle h_FmPort, t_FmPortRsrc *p_SizeOfFifo);
1527
1528/**************************************************************************//**
1529 @Function      FM_PORT_SetAllocBufCounter
1530
1531 @Description   Calling this routine enables/disables BM pool allocate
1532                buffer counters.
1533                By default, counters are enabled.
1534
1535                May be used for Rx ports only
1536
1537 @Param[in]     h_FmPort    A handle to a FM Port module.
1538 @Param[in]     poolId      BM pool id.
1539 @Param[in]     enable      TRUE to enable, FALSE to disable.
1540
1541 @Return        E_OK on success; Error code otherwise.
1542
1543 @Cautions      Allowed only following FM_PORT_Init().
1544*//***************************************************************************/
1545t_Error FM_PORT_SetAllocBufCounter(t_Handle h_FmPort, uint8_t poolId, bool enable);
1546
1547/**************************************************************************//**
1548 @Function      FM_PORT_GetCounter
1549
1550 @Description   Reads one of the FM PORT counters.
1551
1552 @Param[in]     h_FmPort            A handle to a FM Port module.
1553 @Param[in]     fmPortCounter       The requested counter.
1554
1555 @Return        Counter's current value.
1556
1557 @Cautions      Allowed only following FM_PORT_Init().
1558                Note that it is user's responsibility to call this routine only
1559                for enabled counters, and there will be no indication if a
1560                disabled counter is accessed.
1561*//***************************************************************************/
1562uint32_t FM_PORT_GetCounter(t_Handle h_FmPort, e_FmPortCounters fmPortCounter);
1563
1564/**************************************************************************//**
1565 @Function      FM_PORT_ModifyCounter
1566
1567 @Description   Sets a value to an enabled counter. Use "0" to reset the counter.
1568
1569 @Param[in]     h_FmPort            A handle to a FM Port module.
1570 @Param[in]     fmPortCounter       The requested counter.
1571 @Param[in]     value               The requested value to be written into the counter.
1572
1573 @Return        E_OK on success; Error code otherwise.
1574
1575 @Cautions      Allowed only following FM_PORT_Init().
1576*//***************************************************************************/
1577t_Error FM_PORT_ModifyCounter(t_Handle h_FmPort, e_FmPortCounters fmPortCounter, uint32_t value);
1578
1579/**************************************************************************//**
1580 @Function      FM_PORT_GetAllocBufCounter
1581
1582 @Description   Reads one of the FM PORT buffer counters.
1583
1584 @Param[in]     h_FmPort            A handle to a FM Port module.
1585 @Param[in]     poolId              The requested pool.
1586
1587 @Return        Counter's current value.
1588
1589 @Cautions      Allowed only following FM_PORT_Init().
1590                Note that it is user's responsibility to call this routine only
1591                for enabled counters, and there will be no indication if a
1592                disabled counter is accessed.
1593*//***************************************************************************/
1594uint32_t FM_PORT_GetAllocBufCounter(t_Handle h_FmPort, uint8_t poolId);
1595
1596/**************************************************************************//**
1597 @Function      FM_PORT_ModifyAllocBufCounter
1598
1599 @Description   Sets a value to an enabled counter. Use "0" to reset the counter.
1600
1601 @Param[in]     h_FmPort            A handle to a FM Port module.
1602 @Param[in]     poolId              The requested pool.
1603 @Param[in]     value               The requested value to be written into the counter.
1604
1605 @Return        E_OK on success; Error code otherwise.
1606
1607 @Cautions      Allowed only following FM_PORT_Init().
1608*//***************************************************************************/
1609t_Error FM_PORT_ModifyAllocBufCounter(t_Handle h_FmPort,  uint8_t poolId, uint32_t value);
1610
1611/**************************************************************************//**
1612 @Function      FM_PORT_AddCongestionGrps
1613
1614 @Description   This routine effects the corresponding Tx port.
1615                It should be called in order to enable pause
1616                frame transmission in case of congestion in one or more
1617                of the congestion groups relevant to this port.
1618                Each call to this routine may add one or more congestion
1619                groups to be considered relevant to this port.
1620
1621                May be used for Rx, or  RX+OP ports only (depending on chip)
1622
1623 @Param[in]     h_FmPort            A handle to a FM Port module.
1624 @Param[in]     p_CongestionGrps    A pointer to an array of congestion groups
1625                                    id's to consider.
1626
1627 @Return        E_OK on success; Error code otherwise.
1628
1629 @Cautions      Allowed only following FM_PORT_Init().
1630*//***************************************************************************/
1631t_Error FM_PORT_AddCongestionGrps(t_Handle h_FmPort, t_FmPortCongestionGrps *p_CongestionGrps);
1632
1633/**************************************************************************//**
1634 @Function      FM_PORT_RemoveCongestionGrps
1635
1636 @Description   This routine effects the corresponding Tx port. It should be
1637                called when congestion groups were
1638                defined for this port and are no longer relevant, or pause
1639                frames transmitting is not required on their behalf.
1640                Each call to this routine may remove one or more congestion
1641                groups to be considered relevant to this port.
1642
1643                May be used for Rx, or RX+OP ports only (depending on chip)
1644
1645 @Param[in]     h_FmPort            A handle to a FM Port module.
1646 @Param[in]     p_CongestionGrps    A pointer to an array of congestion groups
1647                                    id's to consider.
1648
1649 @Return        E_OK on success; Error code otherwise.
1650
1651 @Cautions      Allowed only following FM_PORT_Init().
1652*//***************************************************************************/
1653t_Error FM_PORT_RemoveCongestionGrps(t_Handle h_FmPort, t_FmPortCongestionGrps *p_CongestionGrps);
1654
1655/**************************************************************************//**
1656 @Function      FM_PORT_IsStalled
1657
1658 @Description   A routine for checking whether the specified port is stalled.
1659
1660 @Param[in]     h_FmPort            A handle to a FM Port module.
1661
1662 @Return        TRUE if port is stalled, FALSE otherwize
1663
1664 @Cautions      Allowed only following FM_PORT_Init().
1665*//***************************************************************************/
1666bool FM_PORT_IsStalled(t_Handle h_FmPort);
1667
1668/**************************************************************************//**
1669 @Function      FM_PORT_ReleaseStalled
1670
1671 @Description   This routine may be called in case the port was stalled and may
1672                now be released.
1673
1674 @Param[in]     h_FmPort    A handle to a FM Port module.
1675
1676 @Return        E_OK on success; Error code otherwise.
1677
1678 @Cautions      Allowed only following FM_PORT_Init().
1679*//***************************************************************************/
1680t_Error FM_PORT_ReleaseStalled(t_Handle h_FmPort);
1681
1682/**************************************************************************//**
1683 @Function      FM_PORT_SetRxL4ChecksumVerify
1684
1685 @Description   This routine is relevant for Rx ports (1G and 10G). The routine
1686                set/clear the L3/L4 checksum verification (on RX side).
1687                Note that this takes affect only if hw-parser is enabled!
1688
1689 @Param[in]     h_FmPort        A handle to a FM Port module.
1690 @Param[in]     l4Checksum      boolean indicates whether to do L3/L4 checksum
1691                                on frames or not.
1692
1693 @Return        E_OK on success; Error code otherwise.
1694
1695 @Cautions      Allowed only following FM_PORT_Init().
1696*//***************************************************************************/
1697t_Error FM_PORT_SetRxL4ChecksumVerify(t_Handle h_FmPort, bool l4Checksum);
1698
1699/**************************************************************************//**
1700 @Function      FM_PORT_SetErrorsRoute
1701
1702 @Description   Errors selected for this routine will cause a frame with that error
1703                to be enqueued to error queue.
1704                Errors not selected for this routine will cause a frame with that error
1705                to be enqueued to the one of the other port queues.
1706                By default all errors are defined to be enqueued to error queue.
1707                Errors that were configured to be discarded (at initialization)
1708                may not be selected here.
1709
1710                May be used for Rx and offline parsing ports only
1711
1712 @Param[in]     h_FmPort    A handle to a FM Port module.
1713 @Param[in]     errs        A list of errors to enqueue to error queue
1714
1715 @Return        E_OK on success; Error code otherwise.
1716
1717 @Cautions      Allowed only following FM_PORT_Config() and before FM_PORT_Init().
1718*//***************************************************************************/
1719t_Error FM_PORT_SetErrorsRoute(t_Handle h_FmPort, fmPortFrameErrSelect_t errs);
1720
1721/**************************************************************************//**
1722 @Function      FM_PORT_SetIMExceptions
1723
1724 @Description   Calling this routine enables/disables FM PORT interrupts.
1725                Note: Not available for guest partition.
1726
1727 @Param[in]     h_FmPort        FM PORT module descriptor.
1728 @Param[in]     exception       The exception to be selected.
1729 @Param[in]     enable          TRUE to enable interrupt, FALSE to mask it.
1730
1731 @Return        E_OK on success; Error code otherwise.
1732
1733 @Cautions      Allowed only following FM_PORT_Init().
1734*//***************************************************************************/
1735t_Error FM_PORT_SetIMExceptions(t_Handle h_FmPort, e_FmPortExceptions exception, bool enable);
1736
1737
1738
1739/**************************************************************************//**
1740 @Group         FM_PORT_pcd_runtime_control_grp FM Port PCD Runtime Control Unit
1741
1742 @Description   FM Port PCD Runtime control unit API functions, definitions and enums.
1743
1744 @{
1745*//***************************************************************************/
1746
1747/**************************************************************************//**
1748 @Description   A structure defining the KG scheme after the parser.
1749                This is relevant only to change scheme selection mode - from
1750                direct to indirect and vice versa, or when the scheme is selected directly,
1751                to select the scheme id.
1752
1753*//***************************************************************************/
1754typedef struct t_FmPcdKgSchemeSelect {
1755    bool        direct;                 /**< TRUE to use 'h_Scheme' directly, FALSE to use LCV.*/
1756    t_Handle    h_DirectScheme;         /**< Relevant for 'direct'=TRUE only.
1757                                             'h_DirectScheme' selects the scheme after parser. */
1758} t_FmPcdKgSchemeSelect;
1759
1760/**************************************************************************//**
1761 @Description   A structure of scheme parameters
1762*//***************************************************************************/
1763typedef struct t_FmPcdPortSchemesParams {
1764    uint8_t     numOfSchemes;                           /**< Number of schemes for port to be bound to. */
1765    t_Handle    h_Schemes[FM_PCD_KG_NUM_OF_SCHEMES];    /**< Array of 'numOfSchemes' schemes for the
1766                                                             port to be bound to */
1767} t_FmPcdPortSchemesParams;
1768
1769/**************************************************************************//**
1770 @Description   Union for defining port protocol parameters for parser
1771*//***************************************************************************/
1772typedef union u_FmPcdHdrPrsOpts {
1773    /* MPLS */
1774    struct {
1775        bool            labelInterpretationEnable;  /**< When this bit is set, the last MPLS label will be
1776                                                         interpreted as described in HW spec table. When the bit
1777                                                         is cleared, the parser will advance to MPLS next parse */
1778        e_NetHeaderType nextParse;                  /**< must be equal or higher than IPv4 */
1779    } mplsPrsOptions;
1780    /* VLAN */
1781    struct {
1782        uint16_t        tagProtocolId1;             /**< User defined Tag Protocol Identifier, to be recognized
1783                                                         on VLAN TAG on top of 0x8100 and 0x88A8 */
1784        uint16_t        tagProtocolId2;             /**< User defined Tag Protocol Identifier, to be recognized
1785                                                         on VLAN TAG on top of 0x8100 and 0x88A8 */
1786    } vlanPrsOptions;
1787    /* PPP */
1788    struct{
1789        bool            enableMTUCheck;             /**< Check validity of MTU according to RFC2516 */
1790    } pppoePrsOptions;
1791
1792    /* IPV6 */
1793    struct{
1794        bool            routingHdrDisable;          /**< Disable routing header */
1795    } ipv6PrsOptions;
1796
1797    /* UDP */
1798    struct{
1799        bool            padIgnoreChecksum;          /**< TRUE to ignore pad in checksum */
1800    } udpPrsOptions;
1801
1802    /* TCP */
1803    struct {
1804        bool            padIgnoreChecksum;          /**< TRUE to ignore pad in checksum */
1805    } tcpPrsOptions;
1806} u_FmPcdHdrPrsOpts;
1807
1808/**************************************************************************//**
1809 @Description   A structure for defining each header for the parser
1810*//***************************************************************************/
1811typedef struct t_FmPcdPrsAdditionalHdrParams {
1812    e_NetHeaderType         hdr;            /**< Selected header */
1813    bool                    errDisable;     /**< TRUE to disable error indication */
1814    bool                    swPrsEnable;    /**< Enable jump to SW parser when this
1815                                                 header is recognized by the HW parser. */
1816    uint8_t                 indexPerHdr;    /**< Normally 0, if more than one sw parser
1817                                                 attachments exists for the same header,
1818                                                 (in the main sw parser code) use this
1819                                                 index to distinguish between them. */
1820    bool                    usePrsOpts;     /**< TRUE to use parser options. */
1821    u_FmPcdHdrPrsOpts       prsOpts;        /**< A union according to header type,
1822                                                 defining the parser options selected.*/
1823} t_FmPcdPrsAdditionalHdrParams;
1824
1825/**************************************************************************//**
1826 @Description   struct for defining port PCD parameters
1827*//***************************************************************************/
1828typedef struct t_FmPortPcdPrsParams {
1829    uint8_t                         prsResultPrivateInfo;           /**< The private info provides a method of inserting
1830                                                                         port information into the parser result. This information
1831                                                                         may be extracted by Keygen and be used for frames
1832                                                                         distribution when a per-port distinction is required,
1833                                                                         it may also be used as a port logical id for analyzing
1834                                                                         incoming frames. */
1835    uint8_t                         parsingOffset;                  /**< Number of bytes from beginning of packet to start parsing */
1836    e_NetHeaderType                 firstPrsHdr;                    /**< The type of the first header expected at 'parsingOffset' */
1837    bool                            includeInPrsStatistics;         /**< TRUE to include this port in the parser statistics;
1838                                                                         NOTE: this field is not valid when the FN is in "guest" mode. */
1839    uint8_t                         numOfHdrsWithAdditionalParams;  /**< Normally 0, some headers may get
1840                                                                         special parameters */
1841    t_FmPcdPrsAdditionalHdrParams   additionalParams[FM_PCD_PRS_NUM_OF_HDRS];
1842                                                                    /**< 'numOfHdrsWithAdditionalParams'  structures
1843                                                                         of additional parameters
1844                                                                         for each header that requires them */
1845    bool                            setVlanTpid1;                   /**< TRUE to configure user selection of Ethertype to
1846                                                                         indicate a VLAN tag (in addition to the TPID values
1847                                                                         0x8100 and 0x88A8). */
1848    uint16_t                        vlanTpid1;                      /**< extra tag to use if setVlanTpid1=TRUE. */
1849    bool                            setVlanTpid2;                   /**< TRUE to configure user selection of Ethertype to
1850                                                                         indicate a VLAN tag (in addition to the TPID values
1851                                                                         0x8100 and 0x88A8). */
1852    uint16_t                        vlanTpid2;                      /**< extra tag to use if setVlanTpid1=TRUE. */
1853} t_FmPortPcdPrsParams;
1854
1855/**************************************************************************//**
1856 @Description   struct for defining coarse alassification parameters
1857*//***************************************************************************/
1858typedef struct t_FmPortPcdCcParams {
1859    t_Handle            h_CcTree;                       /**< A handle to a CC tree */
1860} t_FmPortPcdCcParams;
1861
1862/**************************************************************************//**
1863 @Description   struct for defining keygen parameters
1864*//***************************************************************************/
1865typedef struct t_FmPortPcdKgParams {
1866    uint8_t             numOfSchemes;                   /**< Number of schemes for port to be bound to. */
1867    t_Handle            h_Schemes[FM_PCD_KG_NUM_OF_SCHEMES];
1868                                                        /**< Array of 'numOfSchemes' schemes handles for the
1869                                                             port to be bound to */
1870    bool                directScheme;                   /**< TRUE for going from parser to a specific scheme,
1871                                                             regardless of parser result */
1872    t_Handle            h_DirectScheme;                 /**< relevant only if direct == TRUE, Scheme handle,
1873                                                             as returned by FM_PCD_KgSetScheme */
1874} t_FmPortPcdKgParams;
1875
1876/**************************************************************************//**
1877 @Description   struct for defining policer parameters
1878*//***************************************************************************/
1879typedef struct t_FmPortPcdPlcrParams {
1880    t_Handle                h_Profile;          /**< Selected profile handle; Relevant for one of
1881                                                     following cases:
1882                                                     e_FM_PORT_PCD_SUPPORT_PLCR_ONLY or
1883                                                     e_FM_PORT_PCD_SUPPORT_PRS_AND_PLCR were selected,
1884                                                     or if any flow uses a KG scheme were policer
1885                                                     profile is not generated
1886                                                     (bypassPlcrProfileGeneration selected) */
1887} t_FmPortPcdPlcrParams;
1888
1889/**************************************************************************//**
1890 @Description   struct for defining port PCD parameters
1891*//***************************************************************************/
1892typedef struct t_FmPortPcdParams {
1893    e_FmPortPcdSupport      pcdSupport;         /**< Relevant for Rx and offline ports only.
1894                                                     Describes the active PCD engines for this port. */
1895    t_Handle                h_NetEnv;           /**< HL Unused in PLCR only mode */
1896    t_FmPortPcdPrsParams    *p_PrsParams;       /**< Parser parameters for this port */
1897    t_FmPortPcdCcParams     *p_CcParams;        /**< Coarse classification parameters for this port */
1898    t_FmPortPcdKgParams     *p_KgParams;        /**< Keygen parameters for this port */
1899    t_FmPortPcdPlcrParams   *p_PlcrParams;      /**< Policer parameters for this port */
1900} t_FmPortPcdParams;
1901
1902/**************************************************************************//**
1903 @Description   A structure for defining the Parser starting point
1904*//***************************************************************************/
1905typedef struct t_FmPcdPrsStart {
1906    uint8_t             parsingOffset;  /**< Number of bytes from beginning of packet to
1907                                             start parsing */
1908    e_NetHeaderType     firstPrsHdr;    /**< The type of the first header axpected at
1909                                             'parsingOffset' */
1910} t_FmPcdPrsStart;
1911
1912
1913/**************************************************************************//**
1914 @Function      FM_PORT_SetPCD
1915
1916 @Description   Calling this routine defines the port's PCD configuration.
1917                It changes it from its default configuration which is PCD
1918                disabled (BMI to BMI) and configures it according to the passed
1919                parameters.
1920
1921                May be used for Rx and offline parsing ports only
1922
1923 @Param[in]     h_FmPort        A handle to a FM Port module.
1924 @Param[in]     p_FmPortPcd     A Structure of parameters defining the port's PCD
1925                                configuration.
1926
1927 @Return        E_OK on success; Error code otherwise.
1928
1929 @Cautions      Allowed only following FM_PORT_Init().
1930*//***************************************************************************/
1931t_Error FM_PORT_SetPCD(t_Handle h_FmPort, t_FmPortPcdParams *p_FmPortPcd);
1932
1933/**************************************************************************//**
1934 @Function      FM_PORT_DeletePCD
1935
1936 @Description   Calling this routine releases the port's PCD configuration.
1937                The port returns to its default configuration which is PCD
1938                disabled (BMI to BMI) and all PCD configuration is removed.
1939
1940                May be used for Rx and offline parsing ports which are
1941                in PCD mode  only
1942
1943 @Param[in]     h_FmPort        A handle to a FM Port module.
1944
1945 @Return        E_OK on success; Error code otherwise.
1946
1947 @Cautions      Allowed only following FM_PORT_Init().
1948*//***************************************************************************/
1949t_Error FM_PORT_DeletePCD(t_Handle h_FmPort);
1950
1951/**************************************************************************//**
1952 @Function      FM_PORT_AttachPCD
1953
1954 @Description   This routine may be called after FM_PORT_DetachPCD was called,
1955                to return to the originally configured PCD support flow.
1956                The couple of routines are used to allow PCD configuration changes
1957                that demand that PCD will not be used while changes take place.
1958
1959                May be used for Rx and offline parsing ports which are
1960                in PCD mode only
1961
1962 @Param[in]     h_FmPort        A handle to a FM Port module.
1963
1964 @Return        E_OK on success; Error code otherwise.
1965
1966 @Cautions      Allowed only following FM_PORT_Init().
1967*//***************************************************************************/
1968t_Error FM_PORT_AttachPCD(t_Handle h_FmPort);
1969
1970/**************************************************************************//**
1971 @Function      FM_PORT_DetachPCD
1972
1973 @Description   Calling this routine detaches the port from its PCD functionality.
1974                The port returns to its default flow which is BMI to BMI.
1975
1976                May be used for Rx and offline parsing ports which are
1977                in PCD mode only
1978
1979 @Param[in]     h_FmPort        A handle to a FM Port module.
1980
1981 @Return        E_OK on success; Error code otherwise.
1982
1983 @Cautions      Allowed only following FM_PORT_AttachPCD().
1984*//***************************************************************************/
1985t_Error FM_PORT_DetachPCD(t_Handle h_FmPort);
1986
1987/**************************************************************************//**
1988 @Function      FM_PORT_PcdPlcrAllocProfiles
1989
1990 @Description   This routine may be called only for ports that use the Policer in
1991                order to allocate private policer profiles.
1992
1993 @Param[in]     h_FmPort            A handle to a FM Port module.
1994 @Param[in]     numOfProfiles       The number of required policer profiles
1995
1996 @Return        E_OK on success; Error code otherwise.
1997
1998 @Cautions      Allowed only following FM_PORT_Init() and FM_PCD_Init(), and before FM_PORT_SetPCD().
1999*//***************************************************************************/
2000t_Error FM_PORT_PcdPlcrAllocProfiles(t_Handle h_FmPort, uint16_t numOfProfiles);
2001
2002/**************************************************************************//**
2003 @Function      FM_PORT_PcdPlcrFreeProfiles
2004
2005 @Description   This routine should be called for freeing private policer profiles.
2006
2007 @Param[in]     h_FmPort            A handle to a FM Port module.
2008
2009 @Return        E_OK on success; Error code otherwise.
2010
2011 @Cautions      Allowed only following FM_PORT_Init() and FM_PCD_Init(), and before FM_PORT_SetPCD().
2012*//***************************************************************************/
2013t_Error FM_PORT_PcdPlcrFreeProfiles(t_Handle h_FmPort);
2014
2015/**************************************************************************//**
2016 @Function      FM_PORT_PcdKgModifyInitialScheme
2017
2018 @Description   This routine may be called only for ports that use the keygen in
2019                order to change the initial scheme frame should be routed to.
2020                The change may be of a scheme id (in case of direct mode),
2021                from direct to indirect, or from indirect to direct - specifying the scheme id.
2022
2023 @Param[in]     h_FmPort            A handle to a FM Port module.
2024 @Param[in]     p_FmPcdKgScheme     A structure of parameters for defining whether
2025                                    a scheme is direct/indirect, and if direct - scheme id.
2026
2027 @Return        E_OK on success; Error code otherwise.
2028
2029 @Cautions      Allowed only following FM_PORT_Init() and FM_PORT_SetPCD().
2030*//***************************************************************************/
2031t_Error FM_PORT_PcdKgModifyInitialScheme (t_Handle h_FmPort, t_FmPcdKgSchemeSelect *p_FmPcdKgScheme);
2032
2033/**************************************************************************//**
2034 @Function      FM_PORT_PcdPlcrModifyInitialProfile
2035
2036 @Description   This routine may be called for ports with flows
2037                e_FM_PORT_PCD_SUPPORT_PLCR_ONLY or e_FM_PORT_PCD_SUPPORT_PRS_AND_PLCR
2038                only, to change the initial Policer profile frame should be
2039                routed to. The change may be of a profile and/or absolute/direct
2040                mode selection.
2041
2042 @Param[in]     h_FmPort                A handle to a FM Port module.
2043 @Param[in]     h_Profile               Policer profile handle
2044
2045 @Return        E_OK on success; Error code otherwise.
2046
2047 @Cautions      Allowed only following FM_PORT_Init() and FM_PORT_SetPCD().
2048*//***************************************************************************/
2049t_Error FM_PORT_PcdPlcrModifyInitialProfile (t_Handle h_FmPort, t_Handle h_Profile);
2050
2051/**************************************************************************//**
2052 @Function      FM_PORT_PcdCcModifyTree
2053
2054 @Description   This routine may be called for ports that use coarse classification tree
2055                if the user wishes to replace the tree. The routine may not be called while port
2056                receives packets using the PCD functionalities, therefor port must be first detached
2057                from the PCD, only than the routine may be called, and than port be attached to PCD again.
2058
2059 @Param[in]     h_FmPort            A handle to a FM Port module.
2060 @Param[in]     h_CcTree            A CC tree that was already built. The tree id as returned from
2061                                    the BuildTree routine.
2062
2063 @Return        E_OK on success; Error code otherwise.
2064
2065 @Cautions      Allowed only following FM_PORT_Init(), FM_PORT_SetPCD() and FM_PORT_DetachPCD()
2066*//***************************************************************************/
2067t_Error FM_PORT_PcdCcModifyTree (t_Handle h_FmPort, t_Handle h_CcTree);
2068
2069/**************************************************************************//**
2070 @Function      FM_PORT_PcdKgBindSchemes
2071
2072 @Description   These routines may be called for adding more schemes for the
2073                port to be bound to. The selected schemes are not added,
2074                just this specific port starts using them.
2075
2076 @Param[in]     h_FmPort        A handle to a FM Port module.
2077 @Param[in]     p_PortScheme    A structure defining the list of schemes to be added.
2078
2079 @Return        E_OK on success; Error code otherwise.
2080
2081 @Cautions      Allowed only following FM_PORT_Init() and FM_PORT_SetPCD().
2082*//***************************************************************************/
2083t_Error FM_PORT_PcdKgBindSchemes (t_Handle h_FmPort, t_FmPcdPortSchemesParams *p_PortScheme);
2084
2085/**************************************************************************//**
2086 @Function      FM_PORT_PcdKgUnbindSchemes
2087
2088 @Description   These routines may be called for adding more schemes for the
2089                port to be bound to. The selected schemes are not removed or invalidated,
2090                just this specific port stops using them.
2091
2092 @Param[in]     h_FmPort        A handle to a FM Port module.
2093 @Param[in]     p_PortScheme    A structure defining the list of schemes to be added.
2094
2095 @Return        E_OK on success; Error code otherwise.
2096
2097 @Cautions      Allowed only following FM_PORT_Init() and FM_PORT_SetPCD().
2098*//***************************************************************************/
2099t_Error FM_PORT_PcdKgUnbindSchemes (t_Handle h_FmPort, t_FmPcdPortSchemesParams *p_PortScheme);
2100
2101/**************************************************************************//**
2102 @Function      FM_PORT_PcdPrsModifyStartOffset
2103
2104 @Description   Runtime change of the parser start offset within the header.
2105                The routine may not be called while port
2106                receives packets using the PCD functionalities, therefore port must be first detached
2107                from the PCD, only than the routine may be called, and than port be attached to PCD again.
2108 @Param[in]     h_FmPort        A handle to a FM Port module.
2109 @Param[in]     p_FmPcdPrsStart A structure of parameters for defining the
2110                                start point for the parser.
2111
2112 @Return        E_OK on success; Error code otherwise.
2113
2114 @Cautions      Allowed only following FM_PORT_Init(), FM_PORT_SetPCD() and FM_PORT_DetatchPCD().
2115*//***************************************************************************/
2116t_Error FM_PORT_PcdPrsModifyStartOffset (t_Handle h_FmPort, t_FmPcdPrsStart *p_FmPcdPrsStart);
2117
2118/** @} */ /* end of FM_PORT_pcd_runtime_control_grp group */
2119/** @} */ /* end of FM_PORT_runtime_control_grp group */
2120
2121
2122/**************************************************************************//**
2123 @Group         FM_PORT_runtime_data_grp FM Port Runtime Data-path Unit
2124
2125 @Description   FM Port Runtime data unit API functions, definitions and enums.
2126                This API is valid only if working in Independent-Mode.
2127
2128 @{
2129*//***************************************************************************/
2130
2131/**************************************************************************//**
2132 @Function      FM_PORT_ImTx
2133
2134 @Description   Tx function, called to transmit a data buffer on the port.
2135
2136 @Param[in]     h_FmPort    A handle to a FM Port module.
2137 @Param[in]     p_Data      A pointer to an LCP data buffer.
2138 @Param[in]     length      Size of data for transmission.
2139 @Param[in]     lastBuffer  Buffer position - TRUE for the last buffer
2140                            of a frame, including a single buffer frame
2141 @Param[in]     h_BufContext  A handle of the user acossiated with this buffer
2142
2143 @Return        E_OK on success; Error code otherwise.
2144
2145 @Cautions      Allowed only following FM_PORT_Init().
2146                NOTE - This routine can be used only when working in
2147                Independent-Mode mode.
2148*//***************************************************************************/
2149t_Error  FM_PORT_ImTx( t_Handle               h_FmPort,
2150                       uint8_t                *p_Data,
2151                       uint16_t               length,
2152                       bool                   lastBuffer,
2153                       t_Handle               h_BufContext);
2154
2155/**************************************************************************//**
2156 @Function      FM_PORT_ImTxConf
2157
2158 @Description   Tx port confirmation routine, optional, may be called to verify
2159                transmission of all frames. The procedure performed by this
2160                routine will be performed automatically on next buffer transmission,
2161                but if desired, calling this routine will invoke this action on
2162                demand.
2163
2164 @Param[in]     h_FmPort            A handle to a FM Port module.
2165
2166 @Cautions      Allowed only following FM_PORT_Init().
2167                NOTE - This routine can be used only when working in
2168                Independent-Mode mode.
2169*//***************************************************************************/
2170void FM_PORT_ImTxConf(t_Handle h_FmPort);
2171
2172/**************************************************************************//**
2173 @Function      FM_PORT_ImRx
2174
2175 @Description   Rx function, may be called to poll for received buffers.
2176                Normally, Rx process is invoked by the driver on Rx interrupt.
2177                Alternatively, this routine may be called on demand.
2178
2179 @Param[in]     h_FmPort            A handle to a FM Port module.
2180
2181 @Return        E_OK on success; Error code otherwise.
2182
2183 @Cautions      Allowed only following FM_PORT_Init().
2184                NOTE - This routine can be used only when working in
2185                Independent-Mode mode.
2186*//***************************************************************************/
2187t_Error  FM_PORT_ImRx(t_Handle h_FmPort);
2188
2189/** @} */ /* end of FM_PORT_runtime_data_grp group */
2190/** @} */ /* end of FM_PORT_grp group */
2191/** @} */ /* end of FM_grp group */
2192
2193
2194
2195
2196#endif /* __FM_PORT_EXT */
2197