net/bnxt: add field opcodes in ULP
Add field opcodes that perform logical evaluation of multiple conditions. Also add more logging especially in error path. Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com> Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com> Reviewed-by: Mike Baucom <michael.baucom@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This commit is contained in:
parent
c6062ec0f7
commit
286569d5ed
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@
|
||||
#ifndef ULP_TEMPLATE_DB_H_
|
||||
#define ULP_TEMPLATE_DB_H_
|
||||
|
||||
#define BNXT_ULP_REGFILE_MAX_SZ 38
|
||||
#define BNXT_ULP_REGFILE_MAX_SZ 40
|
||||
#define BNXT_ULP_MAX_NUM_DEVICES 4
|
||||
#define BNXT_ULP_LOG2_MAX_NUM_DEV 2
|
||||
#define BNXT_ULP_GEN_TBL_MAX_SZ 10
|
||||
@ -29,7 +29,7 @@
|
||||
#define BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ 33
|
||||
#define BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ 27
|
||||
#define BNXT_ULP_RESOURCE_RESV_LIST_MAX_SZ 219
|
||||
#define BNXT_ULP_APP_CAP_TBL_MAX_SZ 2
|
||||
#define BNXT_ULP_APP_CAP_TBL_MAX_SZ 6
|
||||
#define BNXT_ULP_COND_GOTO_REJECT 1023
|
||||
#define BNXT_ULP_COND_GOTO_RF 0x10000
|
||||
#define BNXT_ULP_GLB_FIELD_TBL_SHIFT 7
|
||||
@ -37,16 +37,16 @@
|
||||
#define BNXT_ULP_GLB_FIELD_TBL_SIZE 5595
|
||||
#define ULP_WH_PLUS_CLASS_TMPL_LIST_SIZE 5
|
||||
#define ULP_WH_PLUS_CLASS_TBL_LIST_SIZE 74
|
||||
#define ULP_WH_PLUS_CLASS_KEY_INFO_LIST_SIZE 484
|
||||
#define ULP_WH_PLUS_CLASS_KEY_INFO_LIST_SIZE 495
|
||||
#define ULP_WH_PLUS_CLASS_IDENT_LIST_SIZE 20
|
||||
#define ULP_WH_PLUS_CLASS_RESULT_FIELD_LIST_SIZE 550
|
||||
#define ULP_WH_PLUS_CLASS_COND_LIST_SIZE 41
|
||||
#define ULP_WH_PLUS_CLASS_RESULT_FIELD_LIST_SIZE 546
|
||||
#define ULP_WH_PLUS_CLASS_COND_LIST_SIZE 43
|
||||
#define ULP_THOR_CLASS_TMPL_LIST_SIZE 5
|
||||
#define ULP_THOR_CLASS_TBL_LIST_SIZE 26
|
||||
#define ULP_THOR_CLASS_KEY_INFO_LIST_SIZE 90
|
||||
#define ULP_THOR_CLASS_IDENT_LIST_SIZE 3
|
||||
#define ULP_THOR_CLASS_RESULT_FIELD_LIST_SIZE 138
|
||||
#define ULP_THOR_CLASS_COND_LIST_SIZE 6
|
||||
#define ULP_THOR_CLASS_TBL_LIST_SIZE 13
|
||||
#define ULP_THOR_CLASS_KEY_INFO_LIST_SIZE 0
|
||||
#define ULP_THOR_CLASS_IDENT_LIST_SIZE 0
|
||||
#define ULP_THOR_CLASS_RESULT_FIELD_LIST_SIZE 102
|
||||
#define ULP_THOR_CLASS_COND_LIST_SIZE 1
|
||||
#define ULP_WH_PLUS_ACT_TMPL_LIST_SIZE 7
|
||||
#define ULP_WH_PLUS_ACT_TBL_LIST_SIZE 35
|
||||
#define ULP_WH_PLUS_ACT_KEY_INFO_LIST_SIZE 2
|
||||
@ -148,7 +148,8 @@ enum bnxt_ulp_cc_upd_src {
|
||||
BNXT_ULP_CC_UPD_SRC_REGFILE = 0,
|
||||
BNXT_ULP_CC_UPD_SRC_GLB_REGFILE = 1,
|
||||
BNXT_ULP_CC_UPD_SRC_COMP_FIELD = 2,
|
||||
BNXT_ULP_CC_UPD_SRC_LAST = 3
|
||||
BNXT_ULP_CC_UPD_SRC_CONST = 3,
|
||||
BNXT_ULP_CC_UPD_SRC_LAST = 4
|
||||
};
|
||||
|
||||
enum bnxt_ulp_cf_idx {
|
||||
@ -283,26 +284,19 @@ enum bnxt_ulp_fdb_type {
|
||||
BNXT_ULP_FDB_TYPE_LAST = 3
|
||||
};
|
||||
|
||||
enum bnxt_ulp_field_cond_src {
|
||||
BNXT_ULP_FIELD_COND_SRC_TRUE = 0,
|
||||
BNXT_ULP_FIELD_COND_SRC_CF = 1,
|
||||
BNXT_ULP_FIELD_COND_SRC_RF = 2,
|
||||
BNXT_ULP_FIELD_COND_SRC_ACT_BIT = 3,
|
||||
BNXT_ULP_FIELD_COND_SRC_HDR_BIT = 4,
|
||||
BNXT_ULP_FIELD_COND_SRC_FIELD_BIT = 5,
|
||||
BNXT_ULP_FIELD_COND_SRC_FLOW_PAT_MATCH = 6,
|
||||
BNXT_ULP_FIELD_COND_SRC_ACT_PAT_MATCH = 7,
|
||||
BNXT_ULP_FIELD_COND_SRC_LAST = 8
|
||||
};
|
||||
|
||||
enum bnxt_ulp_field_opc {
|
||||
BNXT_ULP_FIELD_OPC_COND_OP = 0,
|
||||
BNXT_ULP_FIELD_OPC_SRC1_PLUS_CONST = 1,
|
||||
BNXT_ULP_FIELD_OPC_SRC1_MINUS_CONST = 2,
|
||||
BNXT_ULP_FIELD_OPC_SRC1_PLUS_CONST_POST = 3,
|
||||
BNXT_ULP_FIELD_OPC_SRC1_MINUS_CONST_POST = 4,
|
||||
BNXT_ULP_FIELD_OPC_PORT_TABLE = 5,
|
||||
BNXT_ULP_FIELD_OPC_LAST = 6
|
||||
BNXT_ULP_FIELD_OPC_SRC1 = 0,
|
||||
BNXT_ULP_FIELD_OPC_SRC1_THEN_SRC2_ELSE_SRC3 = 1,
|
||||
BNXT_ULP_FIELD_OPC_SRC1_PLUS_SRC2 = 2,
|
||||
BNXT_ULP_FIELD_OPC_SRC1_MINUS_SRC2 = 3,
|
||||
BNXT_ULP_FIELD_OPC_SRC1_PLUS_SRC2_POST = 4,
|
||||
BNXT_ULP_FIELD_OPC_SRC1_MINUS_SRC2_POST = 5,
|
||||
BNXT_ULP_FIELD_OPC_SRC1_OR_SRC2 = 6,
|
||||
BNXT_ULP_FIELD_OPC_SRC1_OR_SRC2_OR_SRC3 = 7,
|
||||
BNXT_ULP_FIELD_OPC_SRC1_AND_SRC2 = 8,
|
||||
BNXT_ULP_FIELD_OPC_SRC1_AND_SRC2_OR_SRC3 = 9,
|
||||
BNXT_ULP_FIELD_OPC_SKIP = 10,
|
||||
BNXT_ULP_FIELD_OPC_LAST = 11
|
||||
};
|
||||
|
||||
enum bnxt_ulp_field_src {
|
||||
@ -321,7 +315,8 @@ enum bnxt_ulp_field_src {
|
||||
BNXT_ULP_FIELD_SRC_FIELD_BIT = 12,
|
||||
BNXT_ULP_FIELD_SRC_SKIP = 13,
|
||||
BNXT_ULP_FIELD_SRC_REJECT = 14,
|
||||
BNXT_ULP_FIELD_SRC_LAST = 15
|
||||
BNXT_ULP_FIELD_SRC_PORT_TABLE = 15,
|
||||
BNXT_ULP_FIELD_SRC_LAST = 16
|
||||
};
|
||||
|
||||
enum bnxt_ulp_generic_tbl_lkup_type {
|
||||
@ -346,11 +341,11 @@ enum bnxt_ulp_glb_rf_idx {
|
||||
BNXT_ULP_GLB_RF_IDX_ENCAP_MAC_PTR = 5,
|
||||
BNXT_ULP_GLB_RF_IDX_APP_GLB_PROF_FUNC_ID_0 = 6,
|
||||
BNXT_ULP_GLB_RF_IDX_APP_GLB_L2_CNTXT_ID_0 = 7,
|
||||
BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_PROFILE_ID_0 = 8,
|
||||
BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_PROFILE_ID_0 = 9,
|
||||
BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_KEY_ID_0 = 10,
|
||||
BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_0 = 11,
|
||||
BNXT_ULP_GLB_RF_IDX_APP_GLB_L2_CNTXT_ID_1 = 12,
|
||||
BNXT_ULP_GLB_RF_IDX_APP_GLB_L2_CNTXT_ID_1 = 8,
|
||||
BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_PROFILE_ID_0 = 9,
|
||||
BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_PROFILE_ID_0 = 10,
|
||||
BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_KEY_ID_0 = 11,
|
||||
BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_0 = 12,
|
||||
BNXT_ULP_GLB_RF_IDX_LAST = 13
|
||||
};
|
||||
|
||||
@ -461,7 +456,9 @@ enum bnxt_ulp_rf_idx {
|
||||
BNXT_ULP_RF_IDX_DRV_FUNC_PARENT_MAC = 35,
|
||||
BNXT_ULP_RF_IDX_DEFAULT_AREC_PTR = 36,
|
||||
BNXT_ULP_RF_IDX_CC = 37,
|
||||
BNXT_ULP_RF_IDX_LAST = 38
|
||||
BNXT_ULP_RF_IDX_CF_FLOW_SIG_ID = 38,
|
||||
BNXT_ULP_RF_IDX_PHY_PORT_VPORT = 39,
|
||||
BNXT_ULP_RF_IDX_LAST = 40
|
||||
};
|
||||
|
||||
enum bnxt_ulp_tcam_tbl_opc {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -12,211 +12,15 @@
|
||||
|
||||
/* Mapper templates for header act list */
|
||||
struct bnxt_ulp_mapper_tmpl_info ulp_thor_act_tmpl_list[] = {
|
||||
/* act_tid: 1, thor, ingress */
|
||||
[1] = {
|
||||
.device_name = BNXT_ULP_DEVICE_ID_THOR,
|
||||
.num_tbls = 2,
|
||||
.start_tbl_idx = 0,
|
||||
.reject_info = {
|
||||
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
|
||||
.cond_start_idx = 0,
|
||||
.cond_nums = 0 }
|
||||
}
|
||||
};
|
||||
|
||||
struct bnxt_ulp_mapper_tbl_info ulp_thor_act_tbl_list[] = {
|
||||
{ /* act_tid: 1, thor, table: int_flow_counter_tbl.0 */
|
||||
.resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
|
||||
.resource_type = TF_TBL_TYPE_ACT_STATS_64,
|
||||
.resource_sub_type =
|
||||
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_INT_COUNT,
|
||||
.direction = TF_DIR_RX,
|
||||
.execute_info = {
|
||||
.cond_true_goto = 1,
|
||||
.cond_false_goto = 1,
|
||||
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_OR,
|
||||
.cond_start_idx = 0,
|
||||
.cond_nums = 1 },
|
||||
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_REGFILE,
|
||||
.tbl_operand = BNXT_ULP_RF_IDX_FLOW_CNTR_PTR_0,
|
||||
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
|
||||
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
|
||||
.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
|
||||
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
|
||||
.result_start_idx = 0,
|
||||
.result_bit_size = 64,
|
||||
.result_num_fields = 1
|
||||
},
|
||||
{ /* act_tid: 1, thor, table: int_full_act_record.0 */
|
||||
.resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
|
||||
.resource_type = TF_TBL_TYPE_FULL_ACT_RECORD,
|
||||
.resource_sub_type =
|
||||
BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
|
||||
.direction = TF_DIR_RX,
|
||||
.execute_info = {
|
||||
.cond_true_goto = 0,
|
||||
.cond_false_goto = 0,
|
||||
.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
|
||||
.cond_start_idx = 1,
|
||||
.cond_nums = 0 },
|
||||
.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
|
||||
.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
|
||||
.accept_opcode = BNXT_ULP_ACCEPT_OPC_ALWAYS,
|
||||
.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
|
||||
.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
|
||||
.byte_order = BNXT_ULP_BYTE_ORDER_LE,
|
||||
.result_start_idx = 1,
|
||||
.result_bit_size = 128,
|
||||
.result_num_fields = 17,
|
||||
.encap_num_fields = 0
|
||||
}
|
||||
};
|
||||
|
||||
struct bnxt_ulp_mapper_cond_info ulp_thor_act_cond_list[] = {
|
||||
/* cond_execute: act_tid: 1, int_flow_counter_tbl.0 */
|
||||
{
|
||||
.cond_opcode = BNXT_ULP_COND_OPC_ACT_BIT_IS_SET,
|
||||
.cond_operand = BNXT_ULP_ACT_BIT_COUNT
|
||||
}
|
||||
};
|
||||
|
||||
struct bnxt_ulp_mapper_field_info ulp_thor_act_result_field_list[] = {
|
||||
/* act_tid: 1, thor, table: int_flow_counter_tbl.0 */
|
||||
{
|
||||
.description = "count",
|
||||
.field_bit_size = 64,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
|
||||
},
|
||||
/* act_tid: 1, thor, table: int_full_act_record.0 */
|
||||
{
|
||||
.description = "sp_rec_ptr",
|
||||
.field_bit_size = 16,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
|
||||
},
|
||||
{
|
||||
.description = "encap_ptr",
|
||||
.field_bit_size = 16,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
|
||||
},
|
||||
{
|
||||
.description = "mod_rec_ptr",
|
||||
.field_bit_size = 16,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
|
||||
},
|
||||
{
|
||||
.description = "rsvd1",
|
||||
.field_bit_size = 16,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
|
||||
},
|
||||
{
|
||||
.description = "rsvd0",
|
||||
.field_bit_size = 8,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
|
||||
},
|
||||
{
|
||||
.description = "decap_func",
|
||||
.field_bit_size = 5,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
|
||||
},
|
||||
{
|
||||
.description = "meter",
|
||||
.field_bit_size = 10,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
|
||||
},
|
||||
{
|
||||
.description = "stats_op",
|
||||
.field_bit_size = 1,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
|
||||
},
|
||||
{
|
||||
.description = "stats_ptr",
|
||||
.field_bit_size = 16,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_RF,
|
||||
.field_opr1 = {
|
||||
(BNXT_ULP_RF_IDX_FLOW_CNTR_PTR_0 >> 8) & 0xff,
|
||||
BNXT_ULP_RF_IDX_FLOW_CNTR_PTR_0 & 0xff}
|
||||
},
|
||||
{
|
||||
.description = "vnic_or_vport",
|
||||
.field_bit_size = 11,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_ACT_PROP,
|
||||
.field_opr1 = {
|
||||
(BNXT_ULP_ACT_PROP_IDX_VNIC >> 8) & 0xff,
|
||||
BNXT_ULP_ACT_PROP_IDX_VNIC & 0xff}
|
||||
},
|
||||
{
|
||||
.description = "use_default",
|
||||
.field_bit_size = 1,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
|
||||
},
|
||||
{
|
||||
.description = "mirror",
|
||||
.field_bit_size = 4,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
|
||||
},
|
||||
{
|
||||
.description = "cnd_copy",
|
||||
.field_bit_size = 1,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
|
||||
},
|
||||
{
|
||||
.description = "vlan_dlt_rpt",
|
||||
.field_bit_size = 2,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
|
||||
},
|
||||
{
|
||||
.description = "drop",
|
||||
.field_bit_size = 1,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
|
||||
},
|
||||
{
|
||||
.description = "hit",
|
||||
.field_bit_size = 1,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
|
||||
},
|
||||
{
|
||||
.description = "type",
|
||||
.field_bit_size = 3,
|
||||
.field_opc = BNXT_ULP_FIELD_OPC_COND_OP,
|
||||
.field_cond_src = BNXT_ULP_FIELD_COND_SRC_TRUE,
|
||||
.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
|
||||
.field_opr1 = {
|
||||
1}
|
||||
}
|
||||
};
|
||||
|
||||
struct
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -287,13 +287,12 @@ struct bnxt_ulp_mapper_field_info {
|
||||
uint8_t description[64];
|
||||
uint16_t field_bit_size;
|
||||
enum bnxt_ulp_field_opc field_opc;
|
||||
enum bnxt_ulp_field_cond_src field_cond_src;
|
||||
uint8_t field_cond_opr[16];
|
||||
enum bnxt_ulp_field_src field_src1;
|
||||
uint8_t field_opr1[16];
|
||||
enum bnxt_ulp_field_src field_src2;
|
||||
uint8_t field_opr2[16];
|
||||
|
||||
enum bnxt_ulp_field_src field_src3;
|
||||
uint8_t field_opr3[16];
|
||||
};
|
||||
|
||||
struct bnxt_ulp_mapper_key_info {
|
||||
|
@ -448,7 +448,7 @@ ulp_blob_push_32(struct ulp_blob *blob,
|
||||
* The offset of the data is updated after each push of data.
|
||||
* NULL returned on error, pointer pushed value otherwise.
|
||||
*/
|
||||
uint32_t
|
||||
int32_t
|
||||
ulp_blob_push_encap(struct ulp_blob *blob,
|
||||
uint8_t *data,
|
||||
uint32_t datalen)
|
||||
@ -460,7 +460,7 @@ ulp_blob_push_encap(struct ulp_blob *blob,
|
||||
if (!blob || !data ||
|
||||
datalen > (uint32_t)(blob->bitlen - blob->write_idx)) {
|
||||
BNXT_TF_DBG(ERR, "invalid argument\n");
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
initial_size = ULP_BYTE_2_BITS(sizeof(uint64_t)) -
|
||||
@ -479,7 +479,7 @@ ulp_blob_push_encap(struct ulp_blob *blob,
|
||||
}
|
||||
if (!ulp_blob_push(blob, val, size)) {
|
||||
BNXT_TF_DBG(ERR, "push field failed\n");
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
val += ULP_BITS_2_BYTE(size);
|
||||
write_size -= size;
|
||||
|
@ -272,7 +272,7 @@ ulp_blob_push_32(struct ulp_blob *blob,
|
||||
* The offset of the data is updated after each push of data.
|
||||
* NULL returned on error, pointer pushed value otherwise.
|
||||
*/
|
||||
uint32_t
|
||||
int32_t
|
||||
ulp_blob_push_encap(struct ulp_blob *blob,
|
||||
uint8_t *data,
|
||||
uint32_t datalen);
|
||||
|
Loading…
Reference in New Issue
Block a user