net/bnxt: add initial TruFlow core resource management
- Add TruFlow public API definitions for resources as well as RM infrastructure Signed-off-by: Shahaji Bhosle <sbhosle@broadcom.com> Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This commit is contained in:
parent
80815f8469
commit
f8b6392ad7
@ -51,6 +51,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_core.c
|
||||
SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/bitalloc.c
|
||||
SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_msg.c
|
||||
SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/rand.c
|
||||
SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_rm.c
|
||||
SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tfp.c
|
||||
|
||||
#
|
||||
|
@ -14,6 +14,35 @@
|
||||
#include "bnxt.h"
|
||||
#include "rand.h"
|
||||
|
||||
static inline uint32_t SWAP_WORDS32(uint32_t val32)
|
||||
{
|
||||
return (((val32 & 0x0000ffff) << 16) |
|
||||
((val32 & 0xffff0000) >> 16));
|
||||
}
|
||||
|
||||
static void tf_seeds_init(struct tf_session *session)
|
||||
{
|
||||
int i;
|
||||
uint32_t r;
|
||||
|
||||
/* Initialize the lfsr */
|
||||
rand_init();
|
||||
|
||||
/* RX and TX use the same seed values */
|
||||
session->lkup_lkup3_init_cfg[TF_DIR_RX] =
|
||||
session->lkup_lkup3_init_cfg[TF_DIR_TX] =
|
||||
SWAP_WORDS32(rand32());
|
||||
|
||||
for (i = 0; i < TF_LKUP_SEED_MEM_SIZE / 2; i++) {
|
||||
r = SWAP_WORDS32(rand32());
|
||||
session->lkup_em_seed_mem[TF_DIR_RX][i * 2] = r;
|
||||
session->lkup_em_seed_mem[TF_DIR_TX][i * 2] = r;
|
||||
r = SWAP_WORDS32(rand32());
|
||||
session->lkup_em_seed_mem[TF_DIR_RX][i * 2 + 1] = (r & 0x1);
|
||||
session->lkup_em_seed_mem[TF_DIR_TX][i * 2 + 1] = (r & 0x1);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
tf_open_session(struct tf *tfp,
|
||||
struct tf_open_session_parms *parms)
|
||||
@ -103,6 +132,7 @@ tf_open_session(struct tf *tfp,
|
||||
|
||||
/* Initialize Session */
|
||||
session->device_type = parms->device_type;
|
||||
tf_rm_init(tfp);
|
||||
|
||||
/* Construct the Session ID */
|
||||
session->session_id.internal.domain = domain;
|
||||
@ -119,6 +149,16 @@ tf_open_session(struct tf *tfp,
|
||||
goto cleanup_close;
|
||||
}
|
||||
|
||||
/* Adjust the Session with what firmware allowed us to get */
|
||||
rc = tf_rm_allocate_validate(tfp);
|
||||
if (rc) {
|
||||
/* Log error */
|
||||
goto cleanup_close;
|
||||
}
|
||||
|
||||
/* Setup hash seeds */
|
||||
tf_seeds_init(session);
|
||||
|
||||
session->ref_count++;
|
||||
|
||||
/* Return session ID */
|
||||
@ -189,6 +229,12 @@ tf_close_session(struct tf *tfp)
|
||||
|
||||
tfs = (struct tf_session *)(tfp->session->core_data);
|
||||
|
||||
/* Cleanup if we're last user of the session */
|
||||
if (tfs->ref_count == 1) {
|
||||
/* Cleanup any outstanding resources */
|
||||
rc_close = tf_rm_close(tfp);
|
||||
}
|
||||
|
||||
if (tfs->session_id.id != TF_SESSION_ID_INVALID) {
|
||||
rc = tf_msg_session_close(tfp);
|
||||
if (rc) {
|
||||
|
@ -344,4 +344,129 @@ int tf_attach_session(struct tf *tfp,
|
||||
*/
|
||||
int tf_close_session(struct tf *tfp);
|
||||
|
||||
/**
|
||||
* @page ident Identity Management
|
||||
*
|
||||
* @ref tf_alloc_identifier
|
||||
*
|
||||
* @ref tf_free_identifier
|
||||
*/
|
||||
enum tf_identifier_type {
|
||||
/** The L2 Context is returned from the L2 Ctxt TCAM lookup
|
||||
* and can be used in WC TCAM or EM keys to virtualize further
|
||||
* lookups.
|
||||
*/
|
||||
TF_IDENT_TYPE_L2_CTXT,
|
||||
/** The WC profile func is returned from the L2 Ctxt TCAM lookup
|
||||
* to enable virtualization of the profile TCAM.
|
||||
*/
|
||||
TF_IDENT_TYPE_PROF_FUNC,
|
||||
/** The WC profile ID is included in the WC lookup key
|
||||
* to enable virtualization of the WC TCAM hardware.
|
||||
*/
|
||||
TF_IDENT_TYPE_WC_PROF,
|
||||
/** The EM profile ID is included in the EM lookup key
|
||||
* to enable virtualization of the EM hardware. (not required for Brd4
|
||||
* as it has table scope)
|
||||
*/
|
||||
TF_IDENT_TYPE_EM_PROF,
|
||||
/** The L2 func is included in the ILT result and from recycling to
|
||||
* enable virtualization of further lookups.
|
||||
*/
|
||||
TF_IDENT_TYPE_L2_FUNC
|
||||
};
|
||||
|
||||
/**
|
||||
* TCAM table type
|
||||
*/
|
||||
enum tf_tcam_tbl_type {
|
||||
TF_TCAM_TBL_TYPE_L2_CTXT_TCAM,
|
||||
TF_TCAM_TBL_TYPE_PROF_TCAM,
|
||||
TF_TCAM_TBL_TYPE_WC_TCAM,
|
||||
TF_TCAM_TBL_TYPE_SP_TCAM,
|
||||
TF_TCAM_TBL_TYPE_CT_RULE_TCAM,
|
||||
TF_TCAM_TBL_TYPE_VEB_TCAM,
|
||||
TF_TCAM_TBL_TYPE_MAX
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Enumeration of TruFlow table types. A table type is used to identify a
|
||||
* resource object.
|
||||
*
|
||||
* NOTE: The table type TF_TBL_TYPE_EXT is unique in that it is
|
||||
* the only table type that is connected with a table scope.
|
||||
*/
|
||||
enum tf_tbl_type {
|
||||
/** Wh+/Brd2 Action Record */
|
||||
TF_TBL_TYPE_FULL_ACT_RECORD,
|
||||
/** Multicast Groups */
|
||||
TF_TBL_TYPE_MCAST_GROUPS,
|
||||
/** Action Encap 8 Bytes */
|
||||
TF_TBL_TYPE_ACT_ENCAP_8B,
|
||||
/** Action Encap 16 Bytes */
|
||||
TF_TBL_TYPE_ACT_ENCAP_16B,
|
||||
/** Action Encap 64 Bytes */
|
||||
TF_TBL_TYPE_ACT_ENCAP_32B,
|
||||
/** Action Encap 64 Bytes */
|
||||
TF_TBL_TYPE_ACT_ENCAP_64B,
|
||||
/** Action Source Properties SMAC */
|
||||
TF_TBL_TYPE_ACT_SP_SMAC,
|
||||
/** Action Source Properties SMAC IPv4 */
|
||||
TF_TBL_TYPE_ACT_SP_SMAC_IPV4,
|
||||
/** Action Source Properties SMAC IPv6 */
|
||||
TF_TBL_TYPE_ACT_SP_SMAC_IPV6,
|
||||
/** Action Statistics 64 Bits */
|
||||
TF_TBL_TYPE_ACT_STATS_64,
|
||||
/** Action Modify L4 Src Port */
|
||||
TF_TBL_TYPE_ACT_MODIFY_SPORT,
|
||||
/** Action Modify L4 Dest Port */
|
||||
TF_TBL_TYPE_ACT_MODIFY_DPORT,
|
||||
/** Action Modify IPv4 Source */
|
||||
TF_TBL_TYPE_ACT_MODIFY_IPV4_SRC,
|
||||
/** Action _Modify L4 Dest Port */
|
||||
TF_TBL_TYPE_ACT_MODIFY_IPV4_DEST,
|
||||
/** Action Modify IPv6 Source */
|
||||
TF_TBL_TYPE_ACT_MODIFY_IPV6_SRC,
|
||||
/** Action Modify IPv6 Destination */
|
||||
TF_TBL_TYPE_ACT_MODIFY_IPV6_DEST,
|
||||
|
||||
/* HW */
|
||||
|
||||
/** Meter Profiles */
|
||||
TF_TBL_TYPE_METER_PROF,
|
||||
/** Meter Instance */
|
||||
TF_TBL_TYPE_METER_INST,
|
||||
/** Mirror Config */
|
||||
TF_TBL_TYPE_MIRROR_CONFIG,
|
||||
/** UPAR */
|
||||
TF_TBL_TYPE_UPAR,
|
||||
/** Brd4 Epoch 0 table */
|
||||
TF_TBL_TYPE_EPOCH0,
|
||||
/** Brd4 Epoch 1 table */
|
||||
TF_TBL_TYPE_EPOCH1,
|
||||
/** Brd4 Metadata */
|
||||
TF_TBL_TYPE_METADATA,
|
||||
/** Brd4 CT State */
|
||||
TF_TBL_TYPE_CT_STATE,
|
||||
/** Brd4 Range Profile */
|
||||
TF_TBL_TYPE_RANGE_PROF,
|
||||
/** Brd4 Range Entry */
|
||||
TF_TBL_TYPE_RANGE_ENTRY,
|
||||
/** Brd4 LAG Entry */
|
||||
TF_TBL_TYPE_LAG,
|
||||
/** Brd4 only VNIC/SVIF Table */
|
||||
TF_TBL_TYPE_VNIC_SVIF,
|
||||
|
||||
/* External */
|
||||
|
||||
/** External table type - initially 1 poolsize entries.
|
||||
* All External table types are associated with a table
|
||||
* scope. Internal types are not.
|
||||
*/
|
||||
TF_TBL_TYPE_EXT,
|
||||
/** Future - external pool of size0 entries */
|
||||
TF_TBL_TYPE_EXT_0,
|
||||
TF_TBL_TYPE_MAX
|
||||
};
|
||||
#endif /* _TF_CORE_H_ */
|
||||
|
1731
drivers/net/bnxt/tf_core/tf_rm.c
Normal file
1731
drivers/net/bnxt/tf_core/tf_rm.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -106,6 +106,54 @@ struct tf_rm_sram_alloc {
|
||||
uint16_t sram_num[TF_RESC_TYPE_SRAM_MAX];
|
||||
};
|
||||
|
||||
/**
|
||||
* Resource Manager arrays for a single direction
|
||||
*/
|
||||
struct tf_rm_resc {
|
||||
/** array of HW resource entries */
|
||||
struct tf_rm_entry hw_entry[TF_RESC_TYPE_HW_MAX];
|
||||
/** array of SRAM resource entries */
|
||||
struct tf_rm_entry sram_entry[TF_RESC_TYPE_SRAM_MAX];
|
||||
};
|
||||
|
||||
/**
|
||||
* Resource Manager Database
|
||||
*/
|
||||
struct tf_rm_db {
|
||||
struct tf_rm_resc rx;
|
||||
struct tf_rm_resc tx;
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper function converting direction to text string
|
||||
*/
|
||||
const char
|
||||
*tf_dir_2_str(enum tf_dir dir);
|
||||
|
||||
/**
|
||||
* Helper function converting identifier to text string
|
||||
*/
|
||||
const char
|
||||
*tf_ident_2_str(enum tf_identifier_type id_type);
|
||||
|
||||
/**
|
||||
* Helper function converting tcam type to text string
|
||||
*/
|
||||
const char
|
||||
*tf_tcam_tbl_2_str(enum tf_tcam_tbl_type tcam_type);
|
||||
|
||||
/**
|
||||
* Helper function used to convert HW HCAPI resource type to a string.
|
||||
*/
|
||||
const char
|
||||
*tf_hcapi_hw_2_str(enum tf_resource_type_hw hw_type);
|
||||
|
||||
/**
|
||||
* Helper function used to convert SRAM HCAPI resource type to a string.
|
||||
*/
|
||||
const char
|
||||
*tf_hcapi_sram_2_str(enum tf_resource_type_sram sram_type);
|
||||
|
||||
/**
|
||||
* Initializes the Resource Manager and the associated database
|
||||
* entries for HW and SRAM resources. Must be called before any other
|
||||
@ -143,4 +191,131 @@ int tf_rm_allocate_validate(struct tf *tfp);
|
||||
* - (-ENOTEMPTY) if resources are not cleaned up before close
|
||||
*/
|
||||
int tf_rm_close(struct tf *tfp);
|
||||
|
||||
#if (TF_SHADOW == 1)
|
||||
/**
|
||||
* Initializes Shadow DB of configuration elements
|
||||
*
|
||||
* [in] tfs
|
||||
* Pointer to TF Session
|
||||
*
|
||||
* Returns:
|
||||
* 0 - Success
|
||||
*/
|
||||
int tf_rm_shadow_db_init(struct tf_session *tfs);
|
||||
#endif /* TF_SHADOW */
|
||||
|
||||
/**
|
||||
* Perform a Session Pool lookup using the Tcam table type.
|
||||
*
|
||||
* Function will print error msg if tcam type is unsupported or lookup
|
||||
* failed.
|
||||
*
|
||||
* [in] tfs
|
||||
* Pointer to TF Session
|
||||
*
|
||||
* [in] type
|
||||
* Type of the object
|
||||
*
|
||||
* [in] dir
|
||||
* Receive or transmit direction
|
||||
*
|
||||
* [in/out] session_pool
|
||||
* Session pool
|
||||
*
|
||||
* Returns:
|
||||
* 0 - Success will set the **pool
|
||||
* -EOPNOTSUPP - Type is not supported
|
||||
*/
|
||||
int
|
||||
tf_rm_lookup_tcam_type_pool(struct tf_session *tfs,
|
||||
enum tf_dir dir,
|
||||
enum tf_tcam_tbl_type type,
|
||||
struct bitalloc **pool);
|
||||
|
||||
/**
|
||||
* Perform a Session Pool lookup using the Table type.
|
||||
*
|
||||
* Function will print error msg if table type is unsupported or
|
||||
* lookup failed.
|
||||
*
|
||||
* [in] tfs
|
||||
* Pointer to TF Session
|
||||
*
|
||||
* [in] type
|
||||
* Type of the object
|
||||
*
|
||||
* [in] dir
|
||||
* Receive or transmit direction
|
||||
*
|
||||
* [in/out] session_pool
|
||||
* Session pool
|
||||
*
|
||||
* Returns:
|
||||
* 0 - Success will set the **pool
|
||||
* -EOPNOTSUPP - Type is not supported
|
||||
*/
|
||||
int
|
||||
tf_rm_lookup_tbl_type_pool(struct tf_session *tfs,
|
||||
enum tf_dir dir,
|
||||
enum tf_tbl_type type,
|
||||
struct bitalloc **pool);
|
||||
|
||||
/**
|
||||
* Converts the TF Table Type to internal HCAPI_TYPE
|
||||
*
|
||||
* [in] type
|
||||
* Type to be converted
|
||||
*
|
||||
* [in/out] hcapi_type
|
||||
* Converted type
|
||||
*
|
||||
* Returns:
|
||||
* 0 - Success will set the *hcapi_type
|
||||
* -EOPNOTSUPP - Type is not supported
|
||||
*/
|
||||
int
|
||||
tf_rm_convert_tbl_type(enum tf_tbl_type type,
|
||||
uint32_t *hcapi_type);
|
||||
|
||||
/**
|
||||
* TF RM Convert of index methods.
|
||||
*/
|
||||
enum tf_rm_convert_type {
|
||||
/** Adds the base of the Session Pool to the index */
|
||||
TF_RM_CONVERT_ADD_BASE,
|
||||
/** Removes the Session Pool base from the index */
|
||||
TF_RM_CONVERT_RM_BASE
|
||||
};
|
||||
|
||||
/**
|
||||
* Provides conversion of the Table Type index in relation to the
|
||||
* Session Pool base.
|
||||
*
|
||||
* [in] tfs
|
||||
* Pointer to TF Session
|
||||
*
|
||||
* [in] dir
|
||||
* Receive or transmit direction
|
||||
*
|
||||
* [in] type
|
||||
* Type of the object
|
||||
*
|
||||
* [in] c_type
|
||||
* Type of conversion to perform
|
||||
*
|
||||
* [in] index
|
||||
* Index to be converted
|
||||
*
|
||||
* [in/out] convert_index
|
||||
* Pointer to the converted index
|
||||
*/
|
||||
int
|
||||
tf_rm_convert_index(struct tf_session *tfs,
|
||||
enum tf_dir dir,
|
||||
enum tf_tbl_type type,
|
||||
enum tf_rm_convert_type c_type,
|
||||
uint32_t index,
|
||||
uint32_t *convert_index);
|
||||
|
||||
#endif /* TF_RM_H_ */
|
||||
|
@ -76,11 +76,215 @@ struct tf_session {
|
||||
*/
|
||||
uint8_t ref_count;
|
||||
|
||||
/** Session HW and SRAM resources */
|
||||
struct tf_rm_db resc;
|
||||
|
||||
/* Session HW resource pools */
|
||||
|
||||
/** RX L2 CTXT TCAM Pool */
|
||||
BITALLOC_INST(TF_L2_CTXT_TCAM_POOL_NAME_RX, TF_NUM_L2_CTXT_TCAM);
|
||||
/** TX L2 CTXT TCAM Pool */
|
||||
BITALLOC_INST(TF_L2_CTXT_TCAM_POOL_NAME_TX, TF_NUM_L2_CTXT_TCAM);
|
||||
|
||||
/** RX Profile Func Pool */
|
||||
BITALLOC_INST(TF_PROF_FUNC_POOL_NAME_RX, TF_NUM_PROF_FUNC);
|
||||
/** TX Profile Func Pool */
|
||||
BITALLOC_INST(TF_PROF_FUNC_POOL_NAME_TX, TF_NUM_PROF_FUNC);
|
||||
|
||||
/** RX Profile TCAM Pool */
|
||||
BITALLOC_INST(TF_PROF_TCAM_POOL_NAME_RX, TF_NUM_PROF_TCAM);
|
||||
/** TX Profile TCAM Pool */
|
||||
BITALLOC_INST(TF_PROF_TCAM_POOL_NAME_TX, TF_NUM_PROF_TCAM);
|
||||
|
||||
/** RX EM Profile ID Pool */
|
||||
BITALLOC_INST(TF_EM_PROF_ID_POOL_NAME_RX, TF_NUM_EM_PROF_ID);
|
||||
/** TX EM Key Pool */
|
||||
BITALLOC_INST(TF_EM_PROF_ID_POOL_NAME_TX, TF_NUM_EM_PROF_ID);
|
||||
|
||||
/** RX WC Profile Pool */
|
||||
BITALLOC_INST(TF_WC_TCAM_PROF_ID_POOL_NAME_RX, TF_NUM_WC_PROF_ID);
|
||||
/** TX WC Profile Pool */
|
||||
BITALLOC_INST(TF_WC_TCAM_PROF_ID_POOL_NAME_TX, TF_NUM_WC_PROF_ID);
|
||||
|
||||
/* TBD, how do we want to handle EM records ?*/
|
||||
/* EM Records are not controlled by way of a pool */
|
||||
|
||||
/** RX WC TCAM Pool */
|
||||
BITALLOC_INST(TF_WC_TCAM_POOL_NAME_RX, TF_NUM_WC_TCAM_ROW);
|
||||
/** TX WC TCAM Pool */
|
||||
BITALLOC_INST(TF_WC_TCAM_POOL_NAME_TX, TF_NUM_WC_TCAM_ROW);
|
||||
|
||||
/** RX Meter Profile Pool */
|
||||
BITALLOC_INST(TF_METER_PROF_POOL_NAME_RX, TF_NUM_METER_PROF);
|
||||
/** TX Meter Profile Pool */
|
||||
BITALLOC_INST(TF_METER_PROF_POOL_NAME_TX, TF_NUM_METER_PROF);
|
||||
|
||||
/** RX Meter Instance Pool */
|
||||
BITALLOC_INST(TF_METER_INST_POOL_NAME_RX, TF_NUM_METER);
|
||||
/** TX Meter Pool */
|
||||
BITALLOC_INST(TF_METER_INST_POOL_NAME_TX, TF_NUM_METER);
|
||||
|
||||
/** RX Mirror Configuration Pool*/
|
||||
BITALLOC_INST(TF_MIRROR_POOL_NAME_RX, TF_NUM_MIRROR);
|
||||
/** RX Mirror Configuration Pool */
|
||||
BITALLOC_INST(TF_MIRROR_POOL_NAME_TX, TF_NUM_MIRROR);
|
||||
|
||||
/** RX UPAR Pool */
|
||||
BITALLOC_INST(TF_UPAR_POOL_NAME_RX, TF_NUM_UPAR);
|
||||
/** TX UPAR Pool */
|
||||
BITALLOC_INST(TF_UPAR_POOL_NAME_TX, TF_NUM_UPAR);
|
||||
|
||||
/** RX SP TCAM Pool */
|
||||
BITALLOC_INST(TF_SP_TCAM_POOL_NAME_RX, TF_NUM_SP_TCAM);
|
||||
/** TX SP TCAM Pool */
|
||||
BITALLOC_INST(TF_SP_TCAM_POOL_NAME_TX, TF_NUM_SP_TCAM);
|
||||
|
||||
/** RX FKB Pool */
|
||||
BITALLOC_INST(TF_FKB_POOL_NAME_RX, TF_NUM_FKB);
|
||||
/** TX FKB Pool */
|
||||
BITALLOC_INST(TF_FKB_POOL_NAME_TX, TF_NUM_FKB);
|
||||
|
||||
/** RX Table Scope Pool */
|
||||
BITALLOC_INST(TF_TBL_SCOPE_POOL_NAME_RX, TF_NUM_TBL_SCOPE);
|
||||
/** TX Table Scope Pool */
|
||||
BITALLOC_INST(TF_TBL_SCOPE_POOL_NAME_TX, TF_NUM_TBL_SCOPE);
|
||||
|
||||
/** RX L2 Func Pool */
|
||||
BITALLOC_INST(TF_L2_FUNC_POOL_NAME_RX, TF_NUM_L2_FUNC);
|
||||
/** TX L2 Func Pool */
|
||||
BITALLOC_INST(TF_L2_FUNC_POOL_NAME_TX, TF_NUM_L2_FUNC);
|
||||
|
||||
/** RX Epoch0 Pool */
|
||||
BITALLOC_INST(TF_EPOCH0_POOL_NAME_RX, TF_NUM_EPOCH0);
|
||||
/** TX Epoch0 Pool */
|
||||
BITALLOC_INST(TF_EPOCH0_POOL_NAME_TX, TF_NUM_EPOCH0);
|
||||
|
||||
/** TX Epoch1 Pool */
|
||||
BITALLOC_INST(TF_EPOCH1_POOL_NAME_RX, TF_NUM_EPOCH1);
|
||||
/** TX Epoch1 Pool */
|
||||
BITALLOC_INST(TF_EPOCH1_POOL_NAME_TX, TF_NUM_EPOCH1);
|
||||
|
||||
/** RX MetaData Profile Pool */
|
||||
BITALLOC_INST(TF_METADATA_POOL_NAME_RX, TF_NUM_METADATA);
|
||||
/** TX MetaData Profile Pool */
|
||||
BITALLOC_INST(TF_METADATA_POOL_NAME_TX, TF_NUM_METADATA);
|
||||
|
||||
/** RX Connection Tracking State Pool */
|
||||
BITALLOC_INST(TF_CT_STATE_POOL_NAME_RX, TF_NUM_CT_STATE);
|
||||
/** TX Connection Tracking State Pool */
|
||||
BITALLOC_INST(TF_CT_STATE_POOL_NAME_TX, TF_NUM_CT_STATE);
|
||||
|
||||
/** RX Range Profile Pool */
|
||||
BITALLOC_INST(TF_RANGE_PROF_POOL_NAME_RX, TF_NUM_RANGE_PROF);
|
||||
/** TX Range Profile Pool */
|
||||
BITALLOC_INST(TF_RANGE_PROF_POOL_NAME_TX, TF_NUM_RANGE_PROF);
|
||||
|
||||
/** RX Range Pool */
|
||||
BITALLOC_INST(TF_RANGE_ENTRY_POOL_NAME_RX, TF_NUM_RANGE_ENTRY);
|
||||
/** TX Range Pool */
|
||||
BITALLOC_INST(TF_RANGE_ENTRY_POOL_NAME_TX, TF_NUM_RANGE_ENTRY);
|
||||
|
||||
/** RX LAG Pool */
|
||||
BITALLOC_INST(TF_LAG_ENTRY_POOL_NAME_RX, TF_NUM_LAG_ENTRY);
|
||||
/** TX LAG Pool */
|
||||
BITALLOC_INST(TF_LAG_ENTRY_POOL_NAME_TX, TF_NUM_LAG_ENTRY);
|
||||
|
||||
/* Session SRAM pools */
|
||||
|
||||
/** RX Full Action Record Pool */
|
||||
BITALLOC_INST(TF_SRAM_FULL_ACTION_POOL_NAME_RX,
|
||||
TF_RSVD_SRAM_FULL_ACTION_RX);
|
||||
/** TX Full Action Record Pool */
|
||||
BITALLOC_INST(TF_SRAM_FULL_ACTION_POOL_NAME_TX,
|
||||
TF_RSVD_SRAM_FULL_ACTION_TX);
|
||||
|
||||
/** RX Multicast Group Pool, only RX is supported */
|
||||
BITALLOC_INST(TF_SRAM_MCG_POOL_NAME_RX,
|
||||
TF_RSVD_SRAM_MCG_RX);
|
||||
|
||||
/** RX Encap 8B Pool*/
|
||||
BITALLOC_INST(TF_SRAM_ENCAP_8B_POOL_NAME_RX,
|
||||
TF_RSVD_SRAM_ENCAP_8B_RX);
|
||||
/** TX Encap 8B Pool*/
|
||||
BITALLOC_INST(TF_SRAM_ENCAP_8B_POOL_NAME_TX,
|
||||
TF_RSVD_SRAM_ENCAP_8B_TX);
|
||||
|
||||
/** RX Encap 16B Pool */
|
||||
BITALLOC_INST(TF_SRAM_ENCAP_16B_POOL_NAME_RX,
|
||||
TF_RSVD_SRAM_ENCAP_16B_RX);
|
||||
/** TX Encap 16B Pool */
|
||||
BITALLOC_INST(TF_SRAM_ENCAP_16B_POOL_NAME_TX,
|
||||
TF_RSVD_SRAM_ENCAP_16B_TX);
|
||||
|
||||
/** TX Encap 64B Pool, only TX is supported */
|
||||
BITALLOC_INST(TF_SRAM_ENCAP_64B_POOL_NAME_TX,
|
||||
TF_RSVD_SRAM_ENCAP_64B_TX);
|
||||
|
||||
/** RX Source Properties SMAC Pool */
|
||||
BITALLOC_INST(TF_SRAM_SP_SMAC_POOL_NAME_RX,
|
||||
TF_RSVD_SRAM_SP_SMAC_RX);
|
||||
/** TX Source Properties SMAC Pool */
|
||||
BITALLOC_INST(TF_SRAM_SP_SMAC_POOL_NAME_TX,
|
||||
TF_RSVD_SRAM_SP_SMAC_TX);
|
||||
|
||||
/** TX Source Properties SMAC IPv4 Pool, only TX is supported */
|
||||
BITALLOC_INST(TF_SRAM_SP_SMAC_IPV4_POOL_NAME_TX,
|
||||
TF_RSVD_SRAM_SP_SMAC_IPV4_TX);
|
||||
|
||||
/** TX Source Properties SMAC IPv6 Pool, only TX is supported */
|
||||
BITALLOC_INST(TF_SRAM_SP_SMAC_IPV6_POOL_NAME_TX,
|
||||
TF_RSVD_SRAM_SP_SMAC_IPV6_TX);
|
||||
|
||||
/** RX Counter 64B Pool */
|
||||
BITALLOC_INST(TF_SRAM_STATS_64B_POOL_NAME_RX,
|
||||
TF_RSVD_SRAM_COUNTER_64B_RX);
|
||||
/** TX Counter 64B Pool */
|
||||
BITALLOC_INST(TF_SRAM_STATS_64B_POOL_NAME_TX,
|
||||
TF_RSVD_SRAM_COUNTER_64B_TX);
|
||||
|
||||
/** RX NAT Source Port Pool */
|
||||
BITALLOC_INST(TF_SRAM_NAT_SPORT_POOL_NAME_RX,
|
||||
TF_RSVD_SRAM_NAT_SPORT_RX);
|
||||
/** TX NAT Source Port Pool */
|
||||
BITALLOC_INST(TF_SRAM_NAT_SPORT_POOL_NAME_TX,
|
||||
TF_RSVD_SRAM_NAT_SPORT_TX);
|
||||
|
||||
/** RX NAT Destination Port Pool */
|
||||
BITALLOC_INST(TF_SRAM_NAT_DPORT_POOL_NAME_RX,
|
||||
TF_RSVD_SRAM_NAT_DPORT_RX);
|
||||
/** TX NAT Destination Port Pool */
|
||||
BITALLOC_INST(TF_SRAM_NAT_DPORT_POOL_NAME_TX,
|
||||
TF_RSVD_SRAM_NAT_DPORT_TX);
|
||||
|
||||
/** RX NAT Source IPv4 Pool */
|
||||
BITALLOC_INST(TF_SRAM_NAT_S_IPV4_POOL_NAME_RX,
|
||||
TF_RSVD_SRAM_NAT_S_IPV4_RX);
|
||||
/** TX NAT Source IPv4 Pool */
|
||||
BITALLOC_INST(TF_SRAM_NAT_S_IPV4_POOL_NAME_TX,
|
||||
TF_RSVD_SRAM_NAT_S_IPV4_TX);
|
||||
|
||||
/** RX NAT Destination IPv4 Pool */
|
||||
BITALLOC_INST(TF_SRAM_NAT_D_IPV4_POOL_NAME_RX,
|
||||
TF_RSVD_SRAM_NAT_D_IPV4_RX);
|
||||
/** TX NAT IPv4 Destination Pool */
|
||||
BITALLOC_INST(TF_SRAM_NAT_D_IPV4_POOL_NAME_TX,
|
||||
TF_RSVD_SRAM_NAT_D_IPV4_TX);
|
||||
|
||||
/**
|
||||
* Pools not allocated from HCAPI RM
|
||||
*/
|
||||
|
||||
/** RX L2 Ctx Remap ID Pool */
|
||||
BITALLOC_INST(TF_L2_CTXT_REMAP_POOL_NAME_RX, TF_NUM_L2_CTXT_TCAM);
|
||||
/** TX L2 Ctx Remap ID Pool */
|
||||
BITALLOC_INST(TF_L2_CTXT_REMAP_POOL_NAME_TX, TF_NUM_L2_CTXT_TCAM);
|
||||
|
||||
/** CRC32 seed table */
|
||||
#define TF_LKUP_SEED_MEM_SIZE 512
|
||||
uint32_t lkup_em_seed_mem[TF_DIR_MAX][TF_LKUP_SEED_MEM_SIZE];
|
||||
|
||||
/** Lookup3 init values */
|
||||
uint32_t lkup_lkup3_init_cfg[TF_DIR_MAX];
|
||||
|
||||
};
|
||||
|
||||
#endif /* _TF_SESSION_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user