Lines Matching refs:vsi

92 static int i40e_add_fdir_ethtool(struct i40e_vsi *vsi,
173 (((struct i40e_netdev_priv *)netdev_priv((n)))->vsi->num_queue_pairs \
462 struct i40e_pf *pf = np->vsi->back; in i40e_get_settings()
546 struct i40e_pf *pf = np->vsi->back; in i40e_set_settings()
547 struct i40e_vsi *vsi = np->vsi; in i40e_set_settings() local
564 if (vsi != pf->vsi[pf->lan_vsi]) in i40e_set_settings()
592 while (test_bit(__I40E_CONFIG_BUSY, &vsi->state)) in i40e_set_settings()
702 struct i40e_pf *pf = np->vsi->back; in i40e_nway_reset()
725 struct i40e_pf *pf = np->vsi->back; in i40e_get_pauseparam()
760 struct i40e_pf *pf = np->vsi->back; in i40e_set_pauseparam()
761 struct i40e_vsi *vsi = np->vsi; in i40e_set_pauseparam() local
778 if (vsi != pf->vsi[pf->lan_vsi]) in i40e_set_pauseparam()
850 struct i40e_pf *pf = np->vsi->back; in i40e_get_msglevel()
858 struct i40e_pf *pf = np->vsi->back; in i40e_set_msglevel()
880 struct i40e_pf *pf = np->vsi->back; in i40e_get_regs()
911 struct i40e_hw *hw = &np->vsi->back->hw; in i40e_get_eeprom()
912 struct i40e_pf *pf = np->vsi->back; in i40e_get_eeprom()
1004 struct i40e_hw *hw = &np->vsi->back->hw; in i40e_get_eeprom_len()
1019 struct i40e_hw *hw = &np->vsi->back->hw; in i40e_set_eeprom()
1020 struct i40e_pf *pf = np->vsi->back; in i40e_set_eeprom()
1058 struct i40e_vsi *vsi = np->vsi; in i40e_get_drvinfo() local
1059 struct i40e_pf *pf = vsi->back; in i40e_get_drvinfo()
1075 struct i40e_pf *pf = np->vsi->back; in i40e_get_ringparam()
1076 struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; in i40e_get_ringparam() local
1082 ring->rx_pending = vsi->rx_rings[0]->count; in i40e_get_ringparam()
1083 ring->tx_pending = vsi->tx_rings[0]->count; in i40e_get_ringparam()
1093 struct i40e_vsi *vsi = np->vsi; in i40e_set_ringparam() local
1094 struct i40e_pf *pf = vsi->back; in i40e_set_ringparam()
1116 if ((new_tx_count == vsi->tx_rings[0]->count) && in i40e_set_ringparam()
1117 (new_rx_count == vsi->rx_rings[0]->count)) in i40e_set_ringparam()
1123 if (!netif_running(vsi->netdev)) { in i40e_set_ringparam()
1125 for (i = 0; i < vsi->num_queue_pairs; i++) { in i40e_set_ringparam()
1126 vsi->tx_rings[i]->count = new_tx_count; in i40e_set_ringparam()
1127 vsi->rx_rings[i]->count = new_rx_count; in i40e_set_ringparam()
1138 if (new_tx_count != vsi->tx_rings[0]->count) { in i40e_set_ringparam()
1141 vsi->tx_rings[0]->count, new_tx_count); in i40e_set_ringparam()
1142 tx_rings = kcalloc(vsi->alloc_queue_pairs, in i40e_set_ringparam()
1149 for (i = 0; i < vsi->num_queue_pairs; i++) { in i40e_set_ringparam()
1151 tx_rings[i] = *vsi->tx_rings[i]; in i40e_set_ringparam()
1168 if (new_rx_count != vsi->rx_rings[0]->count) { in i40e_set_ringparam()
1171 vsi->rx_rings[0]->count, new_rx_count); in i40e_set_ringparam()
1172 rx_rings = kcalloc(vsi->alloc_queue_pairs, in i40e_set_ringparam()
1179 for (i = 0; i < vsi->num_queue_pairs; i++) { in i40e_set_ringparam()
1181 rx_rings[i] = *vsi->rx_rings[i]; in i40e_set_ringparam()
1200 i40e_down(vsi); in i40e_set_ringparam()
1203 for (i = 0; i < vsi->num_queue_pairs; i++) { in i40e_set_ringparam()
1204 i40e_free_tx_resources(vsi->tx_rings[i]); in i40e_set_ringparam()
1205 *vsi->tx_rings[i] = tx_rings[i]; in i40e_set_ringparam()
1212 for (i = 0; i < vsi->num_queue_pairs; i++) { in i40e_set_ringparam()
1213 i40e_free_rx_resources(vsi->rx_rings[i]); in i40e_set_ringparam()
1214 *vsi->rx_rings[i] = rx_rings[i]; in i40e_set_ringparam()
1220 i40e_up(vsi); in i40e_set_ringparam()
1225 for (i = 0; i < vsi->num_queue_pairs; i++) in i40e_set_ringparam()
1240 struct i40e_vsi *vsi = np->vsi; in i40e_get_sset_count() local
1241 struct i40e_pf *pf = vsi->back; in i40e_get_sset_count()
1247 if (vsi == pf->vsi[pf->lan_vsi] && pf->hw.partition_id == 1) { in i40e_get_sset_count()
1268 struct i40e_vsi *vsi = np->vsi; in i40e_get_ethtool_stats() local
1269 struct i40e_pf *pf = vsi->back; in i40e_get_ethtool_stats()
1273 struct rtnl_link_stats64 *net_stats = i40e_get_vsi_stats_struct(vsi); in i40e_get_ethtool_stats()
1276 i40e_update_stats(vsi); in i40e_get_ethtool_stats()
1284 p = (char *)vsi + i40e_gstrings_misc_stats[j].stat_offset; in i40e_get_ethtool_stats()
1290 p = (char *)vsi + i40e_gstrings_fcoe_stats[j].stat_offset; in i40e_get_ethtool_stats()
1296 for (j = 0; j < vsi->num_queue_pairs; j++) { in i40e_get_ethtool_stats()
1297 tx_ring = ACCESS_ONCE(vsi->tx_rings[j]); in i40e_get_ethtool_stats()
1320 if (vsi != pf->vsi[pf->lan_vsi] || pf->hw.partition_id != 1) in i40e_get_ethtool_stats()
1353 struct i40e_vsi *vsi = np->vsi; in i40e_get_strings() local
1354 struct i40e_pf *pf = vsi->back; in i40e_get_strings()
1383 for (i = 0; i < vsi->num_queue_pairs; i++) { in i40e_get_strings()
1393 if (vsi != pf->vsi[pf->lan_vsi] || pf->hw.partition_id != 1) in i40e_get_strings()
1485 struct i40e_pf *pf = np->vsi->back; in i40e_link_test()
1499 struct i40e_pf *pf = np->vsi->back; in i40e_reg_test()
1510 struct i40e_pf *pf = np->vsi->back; in i40e_eeprom_test()
1524 struct i40e_pf *pf = np->vsi->back; in i40e_intr_test()
1543 struct i40e_pf *pf = np->vsi->back; in i40e_loopback_test()
1556 struct i40e_pf *pf = np->vsi->back; in i40e_diag_test()
1615 struct i40e_pf *pf = np->vsi->back; in i40e_get_wol()
1638 struct i40e_pf *pf = np->vsi->back; in i40e_set_wol()
1639 struct i40e_vsi *vsi = np->vsi; in i40e_set_wol() local
1649 if (vsi != pf->vsi[pf->lan_vsi]) in i40e_set_wol()
1674 struct i40e_pf *pf = np->vsi->back; in i40e_set_phys_id()
1707 struct i40e_vsi *vsi = np->vsi; in i40e_get_coalesce() local
1709 ec->tx_max_coalesced_frames_irq = vsi->work_limit; in i40e_get_coalesce()
1710 ec->rx_max_coalesced_frames_irq = vsi->work_limit; in i40e_get_coalesce()
1712 if (ITR_IS_DYNAMIC(vsi->rx_itr_setting)) in i40e_get_coalesce()
1715 if (ITR_IS_DYNAMIC(vsi->tx_itr_setting)) in i40e_get_coalesce()
1718 ec->rx_coalesce_usecs = vsi->rx_itr_setting & ~I40E_ITR_DYNAMIC; in i40e_get_coalesce()
1719 ec->tx_coalesce_usecs = vsi->tx_itr_setting & ~I40E_ITR_DYNAMIC; in i40e_get_coalesce()
1729 struct i40e_vsi *vsi = np->vsi; in i40e_set_coalesce() local
1730 struct i40e_pf *pf = vsi->back; in i40e_set_coalesce()
1736 vsi->work_limit = ec->tx_max_coalesced_frames_irq; in i40e_set_coalesce()
1738 vector = vsi->base_vector; in i40e_set_coalesce()
1741 vsi->rx_itr_setting = ec->rx_coalesce_usecs; in i40e_set_coalesce()
1743 vsi->rx_itr_setting = ec->rx_coalesce_usecs; in i40e_set_coalesce()
1753 vsi->tx_itr_setting = ec->tx_coalesce_usecs; in i40e_set_coalesce()
1755 vsi->tx_itr_setting = ec->tx_coalesce_usecs; in i40e_set_coalesce()
1765 vsi->rx_itr_setting |= I40E_ITR_DYNAMIC; in i40e_set_coalesce()
1767 vsi->rx_itr_setting &= ~I40E_ITR_DYNAMIC; in i40e_set_coalesce()
1770 vsi->tx_itr_setting |= I40E_ITR_DYNAMIC; in i40e_set_coalesce()
1772 vsi->tx_itr_setting &= ~I40E_ITR_DYNAMIC; in i40e_set_coalesce()
1774 for (i = 0; i < vsi->num_q_vectors; i++, vector++) { in i40e_set_coalesce()
1775 q_vector = vsi->q_vectors[i]; in i40e_set_coalesce()
1776 q_vector->rx.itr = ITR_TO_REG(vsi->rx_itr_setting); in i40e_set_coalesce()
1778 q_vector->tx.itr = ITR_TO_REG(vsi->tx_itr_setting); in i40e_set_coalesce()
1797 if (pf->vsi[pf->lan_vsi]->rxnfc.data != 0) { in i40e_get_rss_hash_opts()
1798 cmd->data = pf->vsi[pf->lan_vsi]->rxnfc.data; in i40e_get_rss_hash_opts()
1799 cmd->flow_type = pf->vsi[pf->lan_vsi]->rxnfc.flow_type; in i40e_get_rss_hash_opts()
1916 if (rule->dest_vsi != pf->vsi[pf->lan_vsi]->id) { in i40e_get_ethtool_fdir_entry()
1917 struct i40e_vsi *vsi; in i40e_get_ethtool_fdir_entry() local
1919 vsi = i40e_find_vsi_from_id(pf, rule->dest_vsi); in i40e_get_ethtool_fdir_entry()
1920 if (vsi && vsi->type == I40E_VSI_SRIOV) { in i40e_get_ethtool_fdir_entry()
1921 fsp->h_ext.data[1] = htonl(vsi->vf_id); in i40e_get_ethtool_fdir_entry()
1940 struct i40e_vsi *vsi = np->vsi; in i40e_get_rxnfc() local
1941 struct i40e_pf *pf = vsi->back; in i40e_get_rxnfc()
1946 cmd->data = vsi->alloc_queue_pairs; in i40e_get_rxnfc()
2084 pf->vsi[pf->lan_vsi]->rxnfc = *nfc; in i40e_set_rss_hash_opt()
2119 static int i40e_update_ethtool_fdir_entry(struct i40e_vsi *vsi, in i40e_update_ethtool_fdir_entry() argument
2125 struct i40e_pf *pf = vsi->back; in i40e_update_ethtool_fdir_entry()
2143 err = i40e_add_del_fdir(vsi, rule, false); in i40e_update_ethtool_fdir_entry()
2145 err = i40e_add_del_fdir(vsi, rule, false); in i40e_update_ethtool_fdir_entry()
2183 static int i40e_del_fdir_entry(struct i40e_vsi *vsi, in i40e_del_fdir_entry() argument
2188 struct i40e_pf *pf = vsi->back; in i40e_del_fdir_entry()
2198 ret = i40e_update_ethtool_fdir_entry(vsi, NULL, fsp->location, cmd); in i40e_del_fdir_entry()
2212 static int i40e_add_fdir_ethtool(struct i40e_vsi *vsi, in i40e_add_fdir_ethtool() argument
2221 if (!vsi) in i40e_add_fdir_ethtool()
2224 pf = vsi->back; in i40e_add_fdir_ethtool()
2247 (fsp->ring_cookie >= vsi->num_queue_pairs)) in i40e_add_fdir_ethtool()
2266 input->dest_vsi = vsi->id; in i40e_add_fdir_ethtool()
2282 netif_info(pf, drv, vsi->netdev, "Invalid VF id\n"); in i40e_add_fdir_ethtool()
2289 netif_info(pf, drv, vsi->netdev, "Invalid queue id\n"); in i40e_add_fdir_ethtool()
2294 ret = i40e_add_del_fdir(vsi, input, true); in i40e_add_fdir_ethtool()
2299 i40e_update_ethtool_fdir_entry(vsi, input, fsp->location, NULL); in i40e_add_fdir_ethtool()
2314 struct i40e_vsi *vsi = np->vsi; in i40e_set_rxnfc() local
2315 struct i40e_pf *pf = vsi->back; in i40e_set_rxnfc()
2323 ret = i40e_add_fdir_ethtool(vsi, cmd); in i40e_set_rxnfc()
2326 ret = i40e_del_fdir_entry(vsi, cmd); in i40e_set_rxnfc()
2339 static unsigned int i40e_max_channels(struct i40e_vsi *vsi) in i40e_max_channels() argument
2342 return vsi->alloc_queue_pairs; in i40e_max_channels()
2359 struct i40e_vsi *vsi = np->vsi; in i40e_get_channels() local
2360 struct i40e_pf *pf = vsi->back; in i40e_get_channels()
2363 ch->max_combined = i40e_max_channels(vsi); in i40e_get_channels()
2370 ch->combined_count = vsi->num_queue_pairs; in i40e_get_channels()
2386 struct i40e_vsi *vsi = np->vsi; in i40e_set_channels() local
2387 struct i40e_pf *pf = vsi->back; in i40e_set_channels()
2391 if (vsi->type != I40E_VSI_MAIN) in i40e_set_channels()
2403 if (count > i40e_max_channels(vsi)) in i40e_set_channels()
2446 struct i40e_vsi *vsi = np->vsi; in i40e_get_rxfh() local
2447 struct i40e_pf *pf = vsi->back; in i40e_get_rxfh()
2491 struct i40e_vsi *vsi = np->vsi; in i40e_set_rxfh() local
2492 struct i40e_pf *pf = vsi->back; in i40e_set_rxfh()
2536 struct i40e_vsi *vsi = np->vsi; in i40e_get_priv_flags() local
2537 struct i40e_pf *pf = vsi->back; in i40e_get_priv_flags()