#include "ulp_template_struct.h"
#include "ulp_mark_mgr.h"
#include "ulp_flow_db.h"
+#include "ulp_mapper.h"
/* Linked list of all TF sessions. */
STAILQ_HEAD(, bnxt_ulp_session_state) bnxt_ulp_session_list =
goto jump_to_error;
}
+ rc = ulp_mapper_init(&bp->ulp_ctx);
+ if (rc) {
+ BNXT_TF_DBG(ERR, "Failed to initialize ulp mapper\n");
+ goto jump_to_error;
+ }
+
return rc;
jump_to_error:
/* Delete the Mark database */
ulp_mark_db_deinit(&bp->ulp_ctx);
+ /* cleanup the ulp mapper */
+ ulp_mapper_deinit(&bp->ulp_ctx);
+
/* Delete the ulp context and tf session */
ulp_ctx_detach(bp, session);
}
return &bp->ulp_ctx;
}
+
+int32_t
+bnxt_ulp_cntxt_ptr2_mapper_data_set(struct bnxt_ulp_context *ulp_ctx,
+ void *mapper_data)
+{
+ if (!ulp_ctx || !ulp_ctx->cfg_data) {
+ BNXT_TF_DBG(ERR, "Invalid ulp context data\n");
+ return -EINVAL;
+ }
+
+ ulp_ctx->cfg_data->mapper_data = mapper_data;
+ return 0;
+}
+
+void *
+bnxt_ulp_cntxt_ptr2_mapper_data_get(struct bnxt_ulp_context *ulp_ctx)
+{
+ if (!ulp_ctx || !ulp_ctx->cfg_data) {
+ BNXT_TF_DBG(ERR, "Invalid ulp context data\n");
+ return NULL;
+ }
+
+ return ulp_ctx->cfg_data->mapper_data;
+}
uint32_t dev_id; /* Hardware device id */
uint32_t ref_cnt;
struct bnxt_ulp_flow_db *flow_db;
+ void *mapper_data;
};
struct bnxt_ulp_context {
struct bnxt_ulp_context *
bnxt_ulp_eth_dev_ptr2_cntxt_get(struct rte_eth_dev *dev);
+/* Function to add the ulp mapper data to the ulp context */
+int32_t
+bnxt_ulp_cntxt_ptr2_mapper_data_set(struct bnxt_ulp_context *ulp_ctx,
+ void *mapper_data);
+
+/* Function to get the ulp mapper data from the ulp context */
+void *
+bnxt_ulp_cntxt_ptr2_mapper_data_get(struct bnxt_ulp_context *ulp_ctx);
+
#endif /* _BNXT_ULP_H_ */
goto parse_error;
ret = ulp_matcher_pattern_match(¶ms, &class_id);
-
if (ret != BNXT_TF_RC_SUCCESS)
goto parse_error;
mapper_cparms.class_tid = class_id;
mapper_cparms.act_tid = act_tmpl;
mapper_cparms.func_id = bnxt_get_fw_func_id(dev->data->port_id);
+ mapper_cparms.dir = params.dir;
- /* call the ulp mapper to create the flow in the hardware */
- ret = ulp_mapper_flow_create(ulp_ctx,
- &mapper_cparms,
- &fid);
+ /* Call the ulp mapper to create the flow in the hardware. */
+ ret = ulp_mapper_flow_create(ulp_ctx, &mapper_cparms, &fid);
if (!ret) {
flow_id = (struct rte_flow *)((uintptr_t)fid);
return flow_id;
*/
#include <rte_log.h>
+#include <rte_malloc.h>
#include "bnxt.h"
#include "ulp_template_db.h"
#include "ulp_template_struct.h"
#include "ulp_flow_db.h"
#include "ulp_mapper.h"
+static struct bnxt_ulp_def_ident_info *
+ulp_mapper_def_ident_info_list_get(uint32_t *num_entries)
+{
+ if (!num_entries)
+ return NULL;
+ *num_entries = BNXT_ULP_DEF_IDENT_INFO_TBL_MAX_SZ;
+ return ulp_def_ident_tbl;
+}
+
+/*
+ * Read a default identifier from the mapper regfile.
+ *
+ * The regval is always returned in big-endian.
+ *
+ * returns 0 on success
+ */
+static int32_t
+ulp_mapper_def_regfile_read(struct bnxt_ulp_mapper_data *mapper_data,
+ enum tf_dir dir,
+ uint16_t idx,
+ uint64_t *regval)
+{
+ if (!mapper_data || !regval ||
+ dir >= TF_DIR_MAX || idx >= BNXT_ULP_DEF_REGFILE_INDEX_LAST)
+ return -EINVAL;
+ *regval = mapper_data->dflt_ids[dir][idx].ident;
+ return 0;
+}
+
+/*
+ * Write a default identifier to the mapper regfile
+ *
+ * The regval value must be in big-endian.
+ *
+ * return 0 on success.
+ */
+static int32_t
+ulp_mapper_def_regfile_write(struct bnxt_ulp_mapper_data *mapper_data,
+ enum tf_dir dir,
+ uint16_t idx,
+ uint64_t regval)
+{
+ if (!mapper_data || dir >= TF_DIR_MAX ||
+ idx >= BNXT_ULP_DEF_REGFILE_INDEX_LAST)
+ return -EINVAL;
+ mapper_data->dflt_ids[dir][idx].ident = regval;
+ return 0;
+}
+
/*
* Get the size of the action property for a given index.
*
static int32_t
ulp_mapper_result_field_process(struct bnxt_ulp_mapper_parms *parms,
+ enum tf_dir dir,
struct bnxt_ulp_mapper_result_field_info *fld,
struct ulp_blob *blob,
const char *name)
return -EINVAL;
}
break;
+ case BNXT_ULP_RESULT_OPC_SET_TO_DEF_REGFILE:
+ if (!ulp_operand_read(fld->result_operand,
+ (uint8_t *)&idx,
+ sizeof(uint16_t))) {
+ BNXT_TF_DBG(ERR, "%s key operand read failed.\n", name);
+ return -EINVAL;
+ }
+ idx = tfp_be_to_cpu_16(idx);
+ if (ulp_mapper_def_regfile_read(parms->mapper_data,
+ dir,
+ idx, ®val)) {
+ BNXT_TF_DBG(ERR, "%s regfile[%d] read failed.\n",
+ name, idx);
+ return -EINVAL;
+ }
+ val = ulp_blob_push_64(blob, ®val, fld->field_bit_size);
+ if (!val) {
+ BNXT_TF_DBG(ERR, "%s push to key blob failed\n", name);
+ return -EINVAL;
+ }
+ break;
default:
return -EINVAL;
}
/* Function to alloc action record and set the table. */
static int32_t
ulp_mapper_keymask_field_process(struct bnxt_ulp_mapper_parms *parms,
+ enum tf_dir dir,
struct bnxt_ulp_mapper_class_key_field_info *f,
struct ulp_blob *blob,
uint8_t is_key,
const char *name)
{
- uint64_t regval;
+ uint64_t val64;
uint16_t idx, bitlen;
uint32_t opcode;
uint8_t *operand;
}
idx = tfp_be_to_cpu_16(idx);
- if (!ulp_regfile_read(regfile, idx, ®val)) {
+ if (!ulp_regfile_read(regfile, idx, &val64)) {
BNXT_TF_DBG(ERR, "%s regfile[%d] read failed.\n",
name, idx);
return -EINVAL;
}
- val = ulp_blob_push_64(blob, ®val, bitlen);
+ val = ulp_blob_push_64(blob, &val64, bitlen);
+ if (!val) {
+ BNXT_TF_DBG(ERR, "%s push to key blob failed\n", name);
+ return -EINVAL;
+ }
+ break;
+ case BNXT_ULP_SPEC_OPC_SET_TO_DEF_REGFILE:
+ if (!ulp_operand_read(operand, (uint8_t *)&idx,
+ sizeof(uint16_t))) {
+ BNXT_TF_DBG(ERR, "%s key operand read failed.\n", name);
+ return -EINVAL;
+ }
+ idx = tfp_be_to_cpu_16(idx);
+ if (ulp_mapper_def_regfile_read(parms->mapper_data,
+ dir,
+ idx, &val64)) {
+ BNXT_TF_DBG(ERR, "%s regfile[%d] read failed.\n",
+ name, idx);
+ return -EINVAL;
+ }
+ val = ulp_blob_push_64(blob, &val64, bitlen);
if (!val) {
BNXT_TF_DBG(ERR, "%s push to key blob failed\n", name);
return -EINVAL;
}
+ break;
default:
break;
}
for (i = 0; i < (num_flds + encap_flds); i++) {
fld = &flds[i];
rc = ulp_mapper_result_field_process(parms,
+ tbl->direction,
fld,
&blob,
"Action");
*/
for (i = 0; i < num_kflds; i++) {
/* Setup the key */
- rc = ulp_mapper_keymask_field_process(parms, &kflds[i],
+ rc = ulp_mapper_keymask_field_process(parms, tbl->direction,
+ &kflds[i],
&key, 1, "TCAM Key");
if (rc) {
BNXT_TF_DBG(ERR, "Key field set failed.\n");
}
/* Setup the mask */
- rc = ulp_mapper_keymask_field_process(parms, &kflds[i],
+ rc = ulp_mapper_keymask_field_process(parms, tbl->direction,
+ &kflds[i],
&mask, 0, "TCAM Mask");
if (rc) {
BNXT_TF_DBG(ERR, "Mask field set failed.\n");
for (i = 0; i < num_dflds; i++) {
rc = ulp_mapper_result_field_process(parms,
+ tbl->direction,
&dflds[i],
&data,
"TCAM Result");
/* create the key */
for (i = 0; i < num_kflds; i++) {
/* Setup the key */
- rc = ulp_mapper_keymask_field_process(parms, &kflds[i],
+ rc = ulp_mapper_keymask_field_process(parms, tbl->direction,
+ &kflds[i],
&key, 1, "EM Key");
if (rc) {
BNXT_TF_DBG(ERR, "Key field set failed.\n");
fld = &dflds[i];
rc = ulp_mapper_result_field_process(parms,
+ tbl->direction,
fld,
&data,
"EM Result");
for (i = 0; i < num_flds; i++) {
rc = ulp_mapper_result_field_process(parms,
+ tbl->direction,
&flds[i],
&data,
"Indexed Result");
return -EINVAL;
}
+ /*
+ * Get the mapper data for dynamic mapper data such as default
+ * ids.
+ */
+ parms.mapper_data = (struct bnxt_ulp_mapper_data *)
+ bnxt_ulp_cntxt_ptr2_mapper_data_get(ulp_ctx);
+ if (!parms.mapper_data) {
+ BNXT_TF_DBG(ERR, "Failed to get the ulp mapper data\n");
+ return -EINVAL;
+ }
+
/* Get the action table entry from device id and act context id */
parms.act_tid = cparms->act_tid;
parms.atbls = ulp_mapper_action_tbl_list_get(parms.dev_id,
return rc;
}
+
+int32_t
+ulp_mapper_init(struct bnxt_ulp_context *ulp_ctx)
+{
+ struct tf_alloc_identifier_parms iparms;
+ struct bnxt_ulp_mapper_data *data;
+ struct bnxt_ulp_def_ident_info *dflt_ids;
+ uint32_t i, num_dflt_ids, reg_idx;
+ uint64_t regval;
+ struct tf *tfp;
+ int32_t rc;
+
+ if (!ulp_ctx)
+ return -EINVAL;
+
+ tfp = bnxt_ulp_cntxt_tfp_get(ulp_ctx);
+ if (!tfp)
+ return -EINVAL;
+
+ data = rte_zmalloc("ulp_mapper_data",
+ sizeof(struct bnxt_ulp_mapper_data), 0);
+ if (!data) {
+ BNXT_TF_DBG(ERR, "Failed to allocate the mapper data\n");
+ return -ENOMEM;
+ }
+
+ if (bnxt_ulp_cntxt_ptr2_mapper_data_set(ulp_ctx, data)) {
+ BNXT_TF_DBG(ERR, "Failed to set mapper data in context\n");
+ /* Don't call deinit since the prof_func wasn't allocated. */
+ rte_free(data);
+ return -ENOMEM;
+ }
+
+ /* Allocate the default ids. */
+ dflt_ids = ulp_mapper_def_ident_info_list_get(&num_dflt_ids);
+ for (i = 0; i < num_dflt_ids; i++) {
+ iparms.ident_type = dflt_ids[i].ident_type;
+ iparms.dir = dflt_ids[i].direction;
+
+ rc = tf_alloc_identifier(tfp, &iparms);
+ if (rc) {
+ BNXT_TF_DBG(ERR, "Failed to alloc dflt "
+ "identifier [%s][%d]\n",
+ (iparms.dir == TF_DIR_RX) ? "RX" : "TX",
+ iparms.ident_type);
+ goto error;
+ }
+ reg_idx = dflt_ids[i].def_regfile_index;
+ /* All regfile entries are stored as 64bit big-endian values. */
+ regval = tfp_cpu_to_be_64((uint64_t)iparms.id);
+ if (ulp_mapper_def_regfile_write(data,
+ iparms.dir,
+ reg_idx,
+ regval)) {
+ BNXT_TF_DBG(ERR, "Failed to write to default "
+ "regfile.\n");
+ goto error;
+ }
+ }
+
+ return 0;
+error:
+ /* Ignore the return code in favor of returning the original error. */
+ ulp_mapper_deinit(ulp_ctx);
+ return rc;
+}
+
+void
+ulp_mapper_deinit(struct bnxt_ulp_context *ulp_ctx)
+{
+ struct tf_free_identifier_parms free_parms;
+ struct bnxt_ulp_def_ident_info *dflt_ids;
+ struct bnxt_ulp_mapper_data *data;
+ uint32_t i, num_dflt_ids, reg_idx;
+ enum tf_dir dir;
+ uint64_t regval;
+ struct tf *tfp;
+
+ if (!ulp_ctx) {
+ BNXT_TF_DBG(ERR,
+ "Failed to acquire ulp context, so data may "
+ "not be released.\n");
+ return;
+ }
+
+ data = (struct bnxt_ulp_mapper_data *)
+ bnxt_ulp_cntxt_ptr2_mapper_data_get(ulp_ctx);
+ if (!data) {
+ /* Go ahead and return since there is no allocated data. */
+ BNXT_TF_DBG(ERR, "No data appears to have been allocated.\n");
+ return;
+ }
+
+ tfp = bnxt_ulp_cntxt_tfp_get(ulp_ctx);
+ if (!tfp) {
+ BNXT_TF_DBG(ERR, "Failed to acquire tfp.\n");
+ /* Free the mapper data regardless of errors. */
+ goto free_mapper_data;
+ }
+
+ /* Free the default prof func ids per direction. */
+ dflt_ids = ulp_mapper_def_ident_info_list_get(&num_dflt_ids);
+ for (i = 0; i < num_dflt_ids; i++) {
+ reg_idx = dflt_ids[i].def_regfile_index;
+ dir = dflt_ids[i].direction;
+ free_parms.ident_type = dflt_ids[i].ident_type;
+ free_parms.dir = dir;
+ if (ulp_mapper_def_regfile_read(data, dir, reg_idx, ®val)) {
+ BNXT_TF_DBG(ERR, "Failed to read def regfile to free "
+ "identifier.\n");
+ continue;
+ }
+ /*
+ * All regfile entries are stored as 64bit big-endian. Need
+ * to convert the value to cpu before calling tf.
+ */
+ regval = tfp_be_to_cpu_64(regval);
+ free_parms.id = (uint16_t)regval;
+ /* Ignore errors and free the remaining identifiers. */
+ tf_free_identifier(tfp, &free_parms);
+ }
+
+free_mapper_data:
+ rte_free(data);
+ /* Reset the data pointer within the ulp_ctx. */
+ bnxt_ulp_cntxt_ptr2_mapper_data_set(ulp_ctx, NULL);
+}
#ifndef _ULP_MAPPER_H_
#define _ULP_MAPPER_H_
-#include <tf_core.h>
#include <rte_log.h>
#include <rte_flow.h>
#include <rte_flow_driver.h>
+#include "tf_core.h"
#include "ulp_template_db.h"
#include "ulp_template_struct.h"
#include "bnxt_ulp.h"
#define ULP_SZ_BITS2BYTES(x) (((x) + 7) / 8)
+struct bnxt_ulp_mapper_def_id_entry {
+ enum tf_identifier_type ident_type;
+ uint64_t ident;
+};
+
+struct bnxt_ulp_mapper_data {
+ struct bnxt_ulp_mapper_def_id_entry
+ dflt_ids[TF_DIR_MAX][BNXT_ULP_DEF_IDENT_INFO_TBL_MAX_SZ];
+};
+
/* Internal Structure for passing the arguments around */
struct bnxt_ulp_mapper_parms {
uint32_t dev_id;
uint8_t encap_byte_swap;
uint32_t fid;
enum bnxt_ulp_flow_db_tables tbl_idx;
+ struct bnxt_ulp_mapper_data *mapper_data;
};
struct bnxt_ulp_mapper_create_parms {
uint32_t class_tid;
uint32_t act_tid;
uint16_t func_id;
+ enum ulp_direction_type dir;
};
+/* Function to initialize any dynamic mapper data. */
+int32_t
+ulp_mapper_init(struct bnxt_ulp_context *ulp_ctx);
+
+/* Function to release all dynamic mapper data. */
+void
+ulp_mapper_deinit(struct bnxt_ulp_context *ulp_ctx);
+
/*
* Function to handle the mapping of the Flow to be compatible
* with the underlying hardware.
}
};
+struct bnxt_ulp_def_ident_info ulp_def_ident_tbl[] = {
+ [0] = {
+ .ident_type = TF_IDENT_TYPE_PROF_FUNC,
+ .def_regfile_index =
+ BNXT_ULP_DEF_REGFILE_INDEX_DEF_PROF_FUNC_ID,
+ .direction = TF_DIR_RX
+ }
+};
+
struct bnxt_ulp_device_params ulp_device_params[] = {
[BNXT_ULP_DEVICE_ID_WH_PLUS] = {
.global_fid_enable = BNXT_ULP_SYM_YES,
.result_bit_size = 64,
.result_num_fields = 13,
.ident_start_idx = 0,
- .ident_nums = 2,
+ .ident_nums = 1,
.mark_enable = BNXT_ULP_MARK_ENABLE_NO,
.critical_resource = 0,
.regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
.result_start_idx = 13,
.result_bit_size = 38,
.result_num_fields = 8,
- .ident_start_idx = 2,
+ .ident_start_idx = 1,
.ident_nums = 1,
.mark_enable = BNXT_ULP_MARK_ENABLE_NO,
.critical_resource = 0,
.result_start_idx = 21,
.result_bit_size = 64,
.result_num_fields = 9,
+ .ident_start_idx = 2,
.ident_nums = 0,
.mark_enable = BNXT_ULP_MARK_ENABLE_YES,
.critical_resource = 1,
.mask_opcode = BNXT_ULP_MASK_OPC_SET_TO_CONSTANT,
.mask_operand = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
- .spec_opcode = BNXT_ULP_SPEC_OPC_SET_TO_REGFILE,
- .spec_operand = {(BNXT_ULP_REGFILE_INDEX_PROF_FUNC_ID_0 >> 8) & 0xff,
- BNXT_ULP_REGFILE_INDEX_PROF_FUNC_ID_0 & 0xff,
+ .spec_opcode = BNXT_ULP_SPEC_OPC_SET_TO_DEF_REGFILE,
+ .spec_operand = {
+ (BNXT_ULP_DEF_REGFILE_INDEX_DEF_PROF_FUNC_ID >> 8) & 0xff,
+ BNXT_ULP_DEF_REGFILE_INDEX_DEF_PROF_FUNC_ID & 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
},
},
{
.field_bit_size = 7,
- .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_REGFILE,
- .result_operand = {(BNXT_ULP_REGFILE_INDEX_PROF_FUNC_ID_0 >> 8) & 0xff,
- BNXT_ULP_REGFILE_INDEX_PROF_FUNC_ID_0 & 0xff,
+ .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_DEF_REGFILE,
+ .result_operand = {
+ (BNXT_ULP_DEF_REGFILE_INDEX_DEF_PROF_FUNC_ID >> 8) & 0xff,
+ BNXT_ULP_DEF_REGFILE_INDEX_DEF_PROF_FUNC_ID & 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
},
};
struct bnxt_ulp_mapper_ident_info ulp_ident_list[] = {
- {
- .resource_func = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
- .ident_type = TF_IDENT_TYPE_PROF_FUNC,
- .regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_PROF_FUNC_ID_0,
- .ident_bit_size = 7,
- .ident_bit_pos = 47
- },
{
.resource_func = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
.ident_type = TF_IDENT_TYPE_L2_CTXT,
#define BNXT_ULP_ACT_HID_SHFTR 0
#define BNXT_ULP_ACT_HID_SHFTL 23
#define BNXT_ULP_ACT_HID_MASK 255
+#define BNXT_ULP_DEF_IDENT_INFO_TBL_MAX_SZ 1
enum bnxt_ulp_action_bit {
BNXT_ULP_ACTION_BIT_MARK = 0x0000000000000001,
BNXT_ULP_CHF_IDX_LAST = 14
};
+enum bnxt_ulp_def_regfile_index {
+ BNXT_ULP_DEF_REGFILE_INDEX_DEF_PROF_FUNC_ID = 0,
+ BNXT_ULP_DEF_REGFILE_INDEX_LAST = 1
+};
+
enum bnxt_ulp_device_id {
BNXT_ULP_DEVICE_ID_WH_PLUS = 0,
BNXT_ULP_DEVICE_ID_THOR = 1,
BNXT_ULP_DEVICE_ID_LAST = 4
};
+enum bnxt_ulp_direction {
+ BNXT_ULP_DIRECTION_INGRESS = 0,
+ BNXT_ULP_DIRECTION_EGRESS = 1,
+ BNXT_ULP_DIRECTION_LAST = 2
+};
+
enum bnxt_ulp_hdr_type {
BNXT_ULP_HDR_TYPE_NOT_SUPPORTED = 0,
BNXT_ULP_HDR_TYPE_SUPPORTED = 1,
BNXT_ULP_MASK_OPC_SET_TO_CONSTANT = 0,
BNXT_ULP_MASK_OPC_SET_TO_HDR_FIELD = 1,
BNXT_ULP_MASK_OPC_SET_TO_REGFILE = 2,
- BNXT_ULP_MASK_OPC_ADD_PAD = 3,
- BNXT_ULP_MASK_OPC_LAST = 4
+ BNXT_ULP_MASK_OPC_SET_TO_DEF_REGFILE = 3,
+ BNXT_ULP_MASK_OPC_ADD_PAD = 4,
+ BNXT_ULP_MASK_OPC_LAST = 5
};
enum bnxt_ulp_match_type {
BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP = 1,
BNXT_ULP_RESULT_OPC_SET_TO_ENCAP_ACT_PROP_SZ = 2,
BNXT_ULP_RESULT_OPC_SET_TO_REGFILE = 3,
- BNXT_ULP_RESULT_OPC_LAST = 4
+ BNXT_ULP_RESULT_OPC_SET_TO_DEF_REGFILE = 4,
+ BNXT_ULP_RESULT_OPC_LAST = 5
};
enum bnxt_ulp_search_before_alloc {
BNXT_ULP_SPEC_OPC_SET_TO_CONSTANT = 0,
BNXT_ULP_SPEC_OPC_SET_TO_HDR_FIELD = 1,
BNXT_ULP_SPEC_OPC_SET_TO_REGFILE = 2,
- BNXT_ULP_SPEC_OPC_ADD_PAD = 3,
- BNXT_ULP_SPEC_OPC_LAST = 4
+ BNXT_ULP_SPEC_OPC_SET_TO_DEF_REGFILE = 3,
+ BNXT_ULP_SPEC_OPC_ADD_PAD = 4,
+ BNXT_ULP_SPEC_OPC_LAST = 5
};
enum bnxt_ulp_encap_vtag_encoding {
enum bnxt_ulp_regfile_index regfile_wr_idx;
};
+struct bnxt_ulp_def_ident_info {
+ enum tf_dir direction;
+ enum tf_identifier_type ident_type;
+ enum bnxt_ulp_def_regfile_index def_regfile_index;
+};
+
/*
* Flow Mapper Static Data Externs:
* Access to the below static data should be done through access functions and
*/
extern uint32_t ulp_act_prop_map_table[];
+/*
+ * The ulp_def_ident_tbl provides the list of default identifiers that need to
+ * be initialized and where to store them.
+ */
+extern struct bnxt_ulp_def_ident_info ulp_def_ident_tbl[];
#endif /* _ULP_TEMPLATE_STRUCT_H_ */