X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fi40e%2Fi40e_ethdev.h;h=b641882e4f0d82cb2d7f2c36e3a8a1f1ca703668;hb=95cd21f45d1b;hp=be705f779087a0a662bc78ebca4c1256bed80ccf;hpb=f3a4e40eca0c690f5a324a3839ed1f1cbcb8d75e;p=dpdk.git diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h index be705f7790..b641882e4f 100644 --- a/drivers/net/i40e/i40e_ethdev.h +++ b/drivers/net/i40e/i40e_ethdev.h @@ -53,6 +53,9 @@ #define I40E_DEFAULT_QP_NUM_FDIR 1 #define I40E_UINT32_BIT_SIZE (CHAR_BIT * sizeof(uint32_t)) #define I40E_VFTA_SIZE (4096 / I40E_UINT32_BIT_SIZE) +/* Maximun number of MAC addresses */ +#define I40E_NUM_MACADDR_MAX 64 + /* * vlan_id is a 12 bit number. * The VFTA array is actually a 4096 bit array, 128 of 32bit elements. @@ -199,6 +202,19 @@ struct i40e_vsi_list { struct i40e_rx_queue; struct i40e_tx_queue; +/* Bandwidth limit information */ +struct i40e_bw_info { + uint16_t bw_limit; /* BW Limit (0 = disabled) */ + uint8_t bw_max; /* Max BW limit if enabled */ + + /* Relative credits within same TC with respect to other VSIs or Comps */ + uint8_t bw_ets_share_credits[I40E_MAX_TRAFFIC_CLASS]; + /* Bandwidth limit per TC */ + uint8_t bw_ets_credits[I40E_MAX_TRAFFIC_CLASS]; + /* Max bandwidth limit per TC */ + uint8_t bw_ets_max[I40E_MAX_TRAFFIC_CLASS]; +}; + /* Structure that defines a VEB */ struct i40e_veb { struct i40e_vsi_list_head head; @@ -207,6 +223,8 @@ struct i40e_veb { uint16_t uplink_seid; /* The uplink seid of this VEB */ uint16_t stats_idx; struct i40e_eth_stats stats; + uint8_t enabled_tc; /* The traffic class enabled */ + struct i40e_bw_info bw_info; /* VEB bandwidth information */ }; /* i40e MACVLAN filter structure */ @@ -216,19 +234,6 @@ struct i40e_macvlan_filter { uint16_t vlan_id; }; -/* Bandwidth limit information */ -struct i40e_bw_info { - uint16_t bw_limit; /* BW Limit (0 = disabled) */ - uint8_t bw_max_quanta; /* Max Quanta when BW limit is enabled */ - - /* Relative TC credits across VSIs */ - uint8_t bw_ets_share_credits[I40E_MAX_TRAFFIC_CLASS]; - /* TC BW limit credits within VSI */ - uint8_t bw_ets_limit_credits[I40E_MAX_TRAFFIC_CLASS]; - /* TC BW limit max quanta within VSI */ - uint8_t bw_ets_max_quanta[I40E_MAX_TRAFFIC_CLASS]; -}; - /* * Structure that defines a VSI, associated with a adapter. */ @@ -312,6 +317,7 @@ struct i40e_pf_vf { uint16_t vf_idx; /* VF index in pf->vfs */ uint16_t lan_nb_qps; /* Actual queues allocated */ uint16_t reset_cnt; /* Total vf reset times */ + struct ether_addr mac_addr; /* Default MAC address */ }; /* @@ -408,7 +414,7 @@ struct i40e_pf { struct rte_eth_dev_data *dev_data; /* Pointer to the device data */ struct ether_addr dev_addr; /* PF device mac address */ - uint64_t flags; /* PF featuer flags */ + uint64_t flags; /* PF feature flags */ /* All kinds of queue pair setting for different VSIs */ struct i40e_pf_vf *vfs; uint16_t vf_num; @@ -494,7 +500,9 @@ struct i40e_vf { bool link_up; bool vf_reset; volatile uint32_t pend_cmd; /* pending command not finished yet */ + uint32_t cmd_retval; /* return value of the cmd response from PF */ u16 pend_msg; /* flags indicates events from pf not handled yet */ + uint8_t *aq_resp; /* buffer to store the adminq response from PF */ /* VSI info */ struct i40e_virtchnl_vf_resource *vf_res; /* All VSIs */ @@ -551,6 +559,7 @@ void i40e_vsi_queues_unbind_intr(struct i40e_vsi *vsi); int i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi, struct i40e_vsi_vlan_pvid_info *info); int i40e_vsi_config_vlan_stripping(struct i40e_vsi *vsi, bool on); +int i40e_vsi_config_vlan_filter(struct i40e_vsi *vsi, bool on); uint64_t i40e_config_hena(uint64_t flags); uint64_t i40e_parse_hena(uint64_t flags); enum i40e_status_code i40e_fdir_setup_tx_resources(struct i40e_pf *pf); @@ -599,7 +608,7 @@ i40e_get_vsi_from_adapter(struct i40e_adapter *adapter) return NULL; hw = I40E_DEV_PRIVATE_TO_HW(adapter); - if (hw->mac.type == I40E_MAC_VF) { + if (hw->mac.type == I40E_MAC_VF || hw->mac.type == I40E_MAC_X722_VF) { struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(adapter); return &vf->vsi; } else { @@ -656,7 +665,7 @@ i40e_calc_itr_interval(int16_t interval) interval = I40E_QUEUE_ITR_INTERVAL_DEFAULT; /* Convert to hardware count, as writing each 1 represents 2 us */ - return (interval / 2); + return interval / 2; } #define I40E_VALID_FLOW(flow_type) \