X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fhinic%2Fbase%2Fhinic_pmd_niccfg.h;h=73b16b4d69d09242aa1cb8b015a863233f5d154a;hb=ee2cf75e1be583f22b7614b56e1df73845e96bac;hp=e8ce3325a9bbcbc7903885dfcbb75ac0e73dafbc;hpb=a5d668e6376db327fda591067d929c314466bd8f;p=dpdk.git diff --git a/drivers/net/hinic/base/hinic_pmd_niccfg.h b/drivers/net/hinic/base/hinic_pmd_niccfg.h index e8ce3325a9..73b16b4d69 100644 --- a/drivers/net/hinic/base/hinic_pmd_niccfg.h +++ b/drivers/net/hinic/base/hinic_pmd_niccfg.h @@ -471,6 +471,17 @@ struct hinic_rx_mode_config { u32 rx_mode; }; +#define HINIC_MGMT_VERSION_MAX_LEN 32 +#define HINIC_COMPILE_TIME_LEN 20 +#define HINIC_FW_VERSION_NAME 16 + +struct hinic_version_info { + struct hinic_mgmt_msg_head mgmt_msg_head; + + u8 ver[HINIC_FW_VERSION_NAME]; + u8 time[HINIC_COMPILE_TIME_LEN]; +}; + /* rss */ struct nic_rss_indirect_tbl { u32 group_index; @@ -578,6 +589,13 @@ struct hinic_link_mode_cmd { u16 advertised; }; +struct hinic_set_xsfp_status { + struct hinic_mgmt_msg_head mgmt_msg_head; + + u32 port_id; + u32 xsfp_tx_dis; /* 0: tx enable; 1: tx disable */ +}; + struct hinic_clear_qp_resource { struct hinic_mgmt_msg_head mgmt_msg_head; @@ -732,6 +750,86 @@ struct hinic_fdir_tcam_info { struct tag_pa_action filter_action; }; +#define TCAM_SET 0x1 +#define TCAM_CLEAR 0x2 + +struct hinic_port_qfilter_info { + struct hinic_mgmt_msg_head mgmt_msg_head; + + u16 func_id; + u8 normal_type_enable; + u8 filter_type_enable; + u8 filter_enable; + u8 filter_type; + u8 qid; + u8 fdir_flag; + u32 key; +}; + +struct hinic_port_tcam_info { + struct hinic_mgmt_msg_head mgmt_msg_head; + + u16 func_id; + u8 tcam_enable; + u8 rsvd1; + u32 rsvd2; +}; + +#define HINIC_MAX_TCAM_RULES_NUM (10240) +#define HINIC_TCAM_BLOCK_ENABLE 1 +#define HINIC_TCAM_BLOCK_DISABLE 0 + +struct tag_tcam_result { + u32 qid; + u32 rsvd; +}; + +#define TCAM_FLOW_KEY_SIZE 24 + +struct tag_tcam_key_x_y { + u8 x[TCAM_FLOW_KEY_SIZE]; + u8 y[TCAM_FLOW_KEY_SIZE]; +}; + +struct tag_tcam_cfg_rule { + u32 index; + struct tag_tcam_result data; + struct tag_tcam_key_x_y key; +}; + +struct tag_fdir_add_rule_cmd { + struct hinic_mgmt_msg_head mgmt_msg_head; + struct tag_tcam_cfg_rule rule; +}; + +struct tag_fdir_del_rule_cmd { + struct hinic_mgmt_msg_head mgmt_msg_head; + + u32 index_start; + u32 index_num; +}; + +struct hinic_cmd_flush_tcam_rules { + struct hinic_mgmt_msg_head mgmt_msg_head; + + u16 func_id; + u16 rsvd; +}; + +struct hinic_cmd_ctrl_tcam_block { + struct hinic_mgmt_msg_head mgmt_msg_head; + + u16 func_id; + u8 alloc_en; /* 0: free tcam block, 1: alloc tcam block */ + /* + * 0: alloc 1k size tcam block, + * 1: alloc 128 size tcam block, others rsvd + */ + u8 tcam_type; + u16 tcam_block_index; + u16 rsvd; +}; + int hinic_set_mac(void *hwdev, u8 *mac_addr, u16 vlan_id, u16 func_id); int hinic_del_mac(void *hwdev, u8 *mac_addr, u16 vlan_id, u16 func_id); @@ -761,6 +859,8 @@ int hinic_set_rx_vhd_mode(void *hwdev, u16 vhd_mode, u16 rx_buf_sz); int hinic_set_pause_config(void *hwdev, struct nic_pause_config nic_pause); +int hinic_get_pause_info(void *hwdev, struct nic_pause_config *nic_pause); + int hinic_reset_port_link_cfg(void *hwdev); int hinic_dcb_set_ets(void *hwdev, u8 *up_tc, u8 *pg_bw, u8 *pgid, u8 *up_bw, @@ -800,6 +900,8 @@ int hinic_rss_template_free(void *hwdev, u8 tmpl_idx); int hinic_set_rx_mode(void *hwdev, u32 enable); +int hinic_get_mgmt_version(void *hwdev, char *fw); + int hinic_set_rx_csum_offload(void *hwdev, u32 en); int hinic_set_link_status_follow(void *hwdev, @@ -807,6 +909,8 @@ int hinic_set_link_status_follow(void *hwdev, int hinic_get_link_mode(void *hwdev, u32 *supported, u32 *advertised); +int hinic_set_xsfp_tx_status(void *hwdev, bool enable); + int hinic_flush_qp_res(void *hwdev); int hinic_init_function_table(void *hwdev, u16 rx_buf_sz); @@ -836,4 +940,16 @@ int hinic_set_fdir_tcam(void *hwdev, u16 type_mask, int hinic_clear_fdir_tcam(void *hwdev, u16 type_mask); +int hinic_add_tcam_rule(void *hwdev, struct tag_tcam_cfg_rule *tcam_rule); + +int hinic_del_tcam_rule(void *hwdev, u32 index); + +int hinic_alloc_tcam_block(void *hwdev, u8 block_type, u16 *index); + +int hinic_free_tcam_block(void *hwdev, u8 block_type, u16 *index); + +int hinic_flush_tcam_rule(void *hwdev); + +int hinic_set_fdir_tcam_rule_filter(void *hwdev, bool enable); + #endif /* _HINIC_PMD_NICCFG_H_ */