X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fice%2Fice_dcf.h;h=1c7653de3d3c972776e06b95dca887d85910addf;hb=05b405d581486651305551a9f7295f40388d95db;hp=a44a01e90139716783666bb7a7681a4fe71b4d23;hpb=fe98cd9831863afd36b0d065a7ec1473953331a3;p=dpdk.git diff --git a/drivers/net/ice/ice_dcf.h b/drivers/net/ice/ice_dcf.h index a44a01e901..1c7653de3d 100644 --- a/drivers/net/ice/ice_dcf.h +++ b/drivers/net/ice/ice_dcf.h @@ -5,7 +5,8 @@ #ifndef _ICE_DCF_H_ #define _ICE_DCF_H_ -#include +#include +#include #include #include @@ -30,6 +31,49 @@ struct dcf_virtchnl_cmd { volatile int pending; }; +struct ice_dcf_tm_shaper_profile { + TAILQ_ENTRY(ice_dcf_tm_shaper_profile) node; + uint32_t shaper_profile_id; + uint32_t reference_count; + struct rte_tm_shaper_params profile; +}; + +TAILQ_HEAD(ice_dcf_shaper_profile_list, ice_dcf_tm_shaper_profile); + +/* Struct to store Traffic Manager node configuration. */ +struct ice_dcf_tm_node { + TAILQ_ENTRY(ice_dcf_tm_node) node; + uint32_t id; + uint32_t tc; + uint32_t priority; + uint32_t weight; + uint32_t reference_count; + struct ice_dcf_tm_node *parent; + struct ice_dcf_tm_shaper_profile *shaper_profile; + struct rte_tm_node_params params; +}; + +TAILQ_HEAD(ice_dcf_tm_node_list, ice_dcf_tm_node); + +/* node type of Traffic Manager */ +enum ice_dcf_tm_node_type { + ICE_DCF_TM_NODE_TYPE_PORT, + ICE_DCF_TM_NODE_TYPE_TC, + ICE_DCF_TM_NODE_TYPE_VSI, + ICE_DCF_TM_NODE_TYPE_MAX, +}; + +/* Struct to store all the Traffic Manager configuration. */ +struct ice_dcf_tm_conf { + struct ice_dcf_shaper_profile_list shaper_profile_list; + struct ice_dcf_tm_node *root; /* root node - port */ + struct ice_dcf_tm_node_list tc_list; /* node list for all the TCs */ + struct ice_dcf_tm_node_list vsi_list; /* node list for all the queues */ + uint32_t nb_tc_node; + uint32_t nb_vsi_node; + bool committed; +}; + struct ice_dcf_hw { struct iavf_hw avf; @@ -43,7 +87,10 @@ struct ice_dcf_hw { uint16_t num_vfs; uint16_t *vf_vsi_map; + uint16_t pf_vsi_id; + struct ice_dcf_tm_conf tm_conf; + struct ice_aqc_port_ets_elem *ets_config; struct virtchnl_version_info virtchnl_version; struct virtchnl_vf_resource *vf_res; /* VF resource */ struct virtchnl_vsi_resource *vsi_res; /* LAN VSI */ @@ -59,6 +106,10 @@ struct ice_dcf_hw { uint16_t nb_msix; uint16_t rxq_map[16]; struct virtchnl_eth_stats eth_stats_offset; + + /* Link status */ + bool link_up; + uint32_t link_speed; }; int ice_dcf_execute_virtchnl_cmd(struct ice_dcf_hw *hw, @@ -76,5 +127,9 @@ int ice_dcf_disable_queues(struct ice_dcf_hw *hw); int ice_dcf_query_stats(struct ice_dcf_hw *hw, struct virtchnl_eth_stats *pstats); int ice_dcf_add_del_all_mac_addr(struct ice_dcf_hw *hw, bool add); +int ice_dcf_link_update(struct rte_eth_dev *dev, + __rte_unused int wait_to_complete); +void ice_dcf_tm_conf_init(struct rte_eth_dev *dev); +void ice_dcf_tm_conf_uninit(struct rte_eth_dev *dev); #endif /* _ICE_DCF_H_ */