X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbnxt%2Ftf_core%2Fhwrm_tf.h;h=a707cd27586599c6cf12a3e17aaa7f49534a1009;hb=7100b0e5511e58269498900aea30bc03e15ba2fd;hp=26836e4887fa9d15719088eeb1ce5beecd90d8e0;hpb=ca5e61bd562dd08389c4dcc23d13916304494946;p=dpdk.git diff --git a/drivers/net/bnxt/tf_core/hwrm_tf.h b/drivers/net/bnxt/tf_core/hwrm_tf.h index 26836e4887..a707cd2758 100644 --- a/drivers/net/bnxt/tf_core/hwrm_tf.h +++ b/drivers/net/bnxt/tf_core/hwrm_tf.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2019 Broadcom + * Copyright(c) 2019-2021 Broadcom * All rights reserved. */ #ifndef _HWRM_TF_H_ @@ -13,10 +13,12 @@ typedef enum tf_type { } tf_type_t; typedef enum tf_subtype { - HWRM_TFT_REG_GET = 821, - HWRM_TFT_REG_SET = 822, + HWRM_TFT_GET_GLOBAL_CFG = 821, + HWRM_TFT_SET_GLOBAL_CFG = 822, HWRM_TFT_TBL_TYPE_BULK_GET = 825, - TF_SUBTYPE_LAST = HWRM_TFT_TBL_TYPE_BULK_GET, + HWRM_TFT_IF_TBL_SET = 827, + HWRM_TFT_IF_TBL_GET = 828, + TF_SUBTYPE_LAST = HWRM_TFT_IF_TBL_GET, } tf_subtype_t; /* Request and Response compile time checking */ @@ -46,7 +48,17 @@ typedef enum tf_subtype { /* WC DMA Address Type */ #define TF_DEV_DATA_TYPE_TF_WC_DMA_ADDR 0x30d0UL /* WC Entry */ -#define TF_DEV_DATA_TYPE_TF_WC_ENTRY 0x30d1UL +#define TF_DEV_DATA_TYPE_TF_WC_ENTRY 0x30d1UL +/* SPIF DFLT L2 CTXT Entry */ +#define TF_DEV_DATA_TYPE_SPIF_DFLT_L2_CTXT 0x3131UL +/* PARIF DFLT ACT REC PTR Entry */ +#define TF_DEV_DATA_TYPE_PARIF_DFLT_ACT_REC 0x3132UL +/* PARIF ERR DFLT ACT REC PTR Entry */ +#define TF_DEV_DATA_TYPE_PARIF_ERR_DFLT_ACT_REC 0x3133UL +/* ILT Entry */ +#define TF_DEV_DATA_TYPE_ILT 0x3134UL +/* VNIC SVIF entry */ +#define TF_DEV_DATA_TYPE_VNIC_SVIF 0x3135UL /* Action Data */ #define TF_DEV_DATA_TYPE_TF_ACTION_DATA 0x3170UL #define TF_DEV_DATA_TYPE_LAST TF_DEV_DATA_TYPE_TF_ACTION_DATA @@ -54,15 +66,66 @@ typedef enum tf_subtype { #define TF_BITS2BYTES(x) (((x) + 7) >> 3) #define TF_BITS2BYTES_WORD_ALIGN(x) ((((x) + 31) >> 5) * 4) +struct tf_set_global_cfg_input; +struct tf_get_global_cfg_input; +struct tf_get_global_cfg_output; struct tf_tbl_type_bulk_get_input; struct tf_tbl_type_bulk_get_output; +struct tf_if_tbl_set_input; +struct tf_if_tbl_get_input; +struct tf_if_tbl_get_output; +/* Input params for global config set */ +typedef struct tf_set_global_cfg_input { + /* Session Id */ + uint32_t fw_session_id; + /* flags */ + uint32_t flags; + /* When set to 0, indicates the query apply to RX */ +#define TF_SET_GLOBAL_CFG_INPUT_FLAGS_DIR_RX (0x0) + /* When set to 1, indicates the query apply to TX */ +#define TF_SET_GLOBAL_CFG_INPUT_FLAGS_DIR_TX (0x1) + /* Config type */ + uint32_t type; + /* Offset of the type */ + uint32_t offset; + /* Size of the data to set in bytes */ + uint16_t size; + /* Data to set */ + uint8_t data[TF_BULK_SEND]; +} tf_set_global_cfg_input_t, *ptf_set_global_cfg_input_t; + +/* Input params for global config to get */ +typedef struct tf_get_global_cfg_input { + /* Session Id */ + uint32_t fw_session_id; + /* flags */ + uint32_t flags; + /* When set to 0, indicates the query apply to RX */ +#define TF_GET_GLOBAL_CFG_INPUT_FLAGS_DIR_RX (0x0) + /* When set to 1, indicates the query apply to TX */ +#define TF_GET_GLOBAL_CFG_INPUT_FLAGS_DIR_TX (0x1) + /* Config to retrieve */ + uint32_t type; + /* Offset to retrieve */ + uint32_t offset; + /* Size of the data to set in bytes */ + uint16_t size; +} tf_get_global_cfg_input_t, *ptf_get_global_cfg_input_t; + +/* Output params for global config */ +typedef struct tf_get_global_cfg_output { + /* Size of the total data read in bytes */ + uint16_t size; + /* Data to get */ + uint8_t data[TF_BULK_SEND]; +} tf_get_global_cfg_output_t, *ptf_get_global_cfg_output_t; /* Input params for table type get */ typedef struct tf_tbl_type_bulk_get_input { /* Session Id */ uint32_t fw_session_id; /* flags */ - uint16_t flags; + uint32_t flags; /* When set to 0, indicates the get apply to RX */ #define TF_TBL_TYPE_BULK_GET_INPUT_FLAGS_DIR_RX (0x0) /* When set to 1, indicates the get apply to TX */ @@ -85,4 +148,48 @@ typedef struct tf_tbl_type_bulk_get_output { uint16_t size; } tf_tbl_type_bulk_get_output_t, *ptf_tbl_type_bulk_get_output_t; +/* Input params for if tbl set */ +typedef struct tf_if_tbl_set_input { + /* Session Id */ + uint32_t fw_session_id; + /* flags */ + uint16_t flags; + /* When set to 0, indicates the query apply to RX */ +#define TF_IF_TBL_SET_INPUT_FLAGS_DIR_RX (0x0) + /* When set to 1, indicates the query apply to TX */ +#define TF_IF_TBL_SET_INPUT_FLAGS_DIR_TX (0x1) + /* if table type */ + uint16_t tf_if_tbl_type; + /* index of table entry */ + uint16_t idx; + /* size of the data write to table entry */ + uint32_t data_sz_in_bytes; + /* data to write into table entry */ + uint32_t data[2]; +} tf_if_tbl_set_input_t, *ptf_if_tbl_set_input_t; + +/* Input params for if tbl get */ +typedef struct tf_if_tbl_get_input { + /* Session Id */ + uint32_t fw_session_id; + /* flags */ + uint16_t flags; + /* When set to 0, indicates the query apply to RX */ +#define TF_IF_TBL_GET_INPUT_FLAGS_DIR_RX (0x0) + /* When set to 1, indicates the query apply to TX */ +#define TF_IF_TBL_GET_INPUT_FLAGS_DIR_TX (0x1) + /* if table type */ + uint16_t tf_if_tbl_type; + /* size of the data get from table entry */ + uint32_t data_sz_in_bytes; + /* index of table entry */ + uint16_t idx; +} tf_if_tbl_get_input_t, *ptf_if_tbl_get_input_t; + +/* output params for if tbl get */ +typedef struct tf_if_tbl_get_output { + /* Value read from table entry */ + uint32_t data[2]; +} tf_if_tbl_get_output_t, *ptf_if_tbl_get_output_t; + #endif /* _HWRM_TF_H_ */