Lines Matching full:interface
48 /* General interface statistics */
159 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_get_stat_strings() local
168 if (interface->hw.mac.type != fm10k_mac_vf) in fm10k_get_stat_strings()
171 for (i = 0; i < interface->hw.mac.max_queues; i++) { in fm10k_get_stat_strings()
200 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_get_sset_count() local
201 struct fm10k_hw *hw = &interface->hw; in fm10k_get_sset_count()
265 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_get_ethtool_stats() local
269 fm10k_update_stats(interface); in fm10k_get_ethtool_stats()
273 fm10k_add_ethtool_stats(&data, interface, fm10k_gstrings_global_stats); in fm10k_get_ethtool_stats()
275 fm10k_add_ethtool_stats(&data, &interface->hw.mbx, in fm10k_get_ethtool_stats()
278 if (interface->hw.mac.type != fm10k_mac_vf) { in fm10k_get_ethtool_stats()
279 fm10k_add_ethtool_stats(&data, interface, in fm10k_get_ethtool_stats()
283 for (i = 0; i < interface->hw.mac.max_queues; i++) { in fm10k_get_ethtool_stats()
286 ring = interface->tx_ring[i]; in fm10k_get_ethtool_stats()
290 ring = interface->rx_ring[i]; in fm10k_get_ethtool_stats()
355 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_get_regs() local
356 struct fm10k_hw *hw = &interface->hw; in fm10k_get_regs()
433 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_get_regs_len() local
434 struct fm10k_hw *hw = &interface->hw; in fm10k_get_regs_len()
449 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_get_drvinfo() local
453 strscpy(info->bus_info, pci_name(interface->pdev), in fm10k_get_drvinfo()
460 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_get_pauseparam() local
466 pause->rx_pause = interface->rx_pause ? 1 : 0; in fm10k_get_pauseparam()
472 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_set_pauseparam() local
473 struct fm10k_hw *hw = &interface->hw; in fm10k_set_pauseparam()
480 interface->rx_pause = pause->rx_pause ? ~0 : 0; in fm10k_set_pauseparam()
485 fm10k_update_rx_drop_en(interface); in fm10k_set_pauseparam()
492 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_get_msglevel() local
494 return interface->msg_enable; in fm10k_get_msglevel()
499 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_set_msglevel() local
501 interface->msg_enable = data; in fm10k_set_msglevel()
509 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_get_ringparam() local
515 ring->rx_pending = interface->rx_ring_count; in fm10k_get_ringparam()
516 ring->tx_pending = interface->tx_ring_count; in fm10k_get_ringparam()
526 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_set_ringparam() local
542 if ((new_tx_count == interface->tx_ring_count) && in fm10k_set_ringparam()
543 (new_rx_count == interface->rx_ring_count)) { in fm10k_set_ringparam()
548 while (test_and_set_bit(__FM10K_RESETTING, interface->state)) in fm10k_set_ringparam()
551 if (!netif_running(interface->netdev)) { in fm10k_set_ringparam()
552 for (i = 0; i < interface->num_tx_queues; i++) in fm10k_set_ringparam()
553 interface->tx_ring[i]->count = new_tx_count; in fm10k_set_ringparam()
554 for (i = 0; i < interface->num_rx_queues; i++) in fm10k_set_ringparam()
555 interface->rx_ring[i]->count = new_rx_count; in fm10k_set_ringparam()
556 interface->tx_ring_count = new_tx_count; in fm10k_set_ringparam()
557 interface->rx_ring_count = new_rx_count; in fm10k_set_ringparam()
562 i = max_t(int, interface->num_tx_queues, interface->num_rx_queues); in fm10k_set_ringparam()
570 fm10k_down(interface); in fm10k_set_ringparam()
577 if (new_tx_count != interface->tx_ring_count) { in fm10k_set_ringparam()
578 for (i = 0; i < interface->num_tx_queues; i++) { in fm10k_set_ringparam()
579 memcpy(&temp_ring[i], interface->tx_ring[i], in fm10k_set_ringparam()
593 for (i = 0; i < interface->num_tx_queues; i++) { in fm10k_set_ringparam()
594 fm10k_free_tx_resources(interface->tx_ring[i]); in fm10k_set_ringparam()
596 memcpy(interface->tx_ring[i], &temp_ring[i], in fm10k_set_ringparam()
600 interface->tx_ring_count = new_tx_count; in fm10k_set_ringparam()
604 if (new_rx_count != interface->rx_ring_count) { in fm10k_set_ringparam()
605 for (i = 0; i < interface->num_rx_queues; i++) { in fm10k_set_ringparam()
606 memcpy(&temp_ring[i], interface->rx_ring[i], in fm10k_set_ringparam()
620 for (i = 0; i < interface->num_rx_queues; i++) { in fm10k_set_ringparam()
621 fm10k_free_rx_resources(interface->rx_ring[i]); in fm10k_set_ringparam()
623 memcpy(interface->rx_ring[i], &temp_ring[i], in fm10k_set_ringparam()
627 interface->rx_ring_count = new_rx_count; in fm10k_set_ringparam()
631 fm10k_up(interface); in fm10k_set_ringparam()
634 clear_bit(__FM10K_RESETTING, interface->state); in fm10k_set_ringparam()
643 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_get_coalesce() local
645 ec->use_adaptive_tx_coalesce = ITR_IS_ADAPTIVE(interface->tx_itr); in fm10k_get_coalesce()
646 ec->tx_coalesce_usecs = interface->tx_itr & ~FM10K_ITR_ADAPTIVE; in fm10k_get_coalesce()
648 ec->use_adaptive_rx_coalesce = ITR_IS_ADAPTIVE(interface->rx_itr); in fm10k_get_coalesce()
649 ec->rx_coalesce_usecs = interface->rx_itr & ~FM10K_ITR_ADAPTIVE; in fm10k_get_coalesce()
659 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_set_coalesce() local
679 /* update interface */ in fm10k_set_coalesce()
680 interface->tx_itr = tx_itr; in fm10k_set_coalesce()
681 interface->rx_itr = rx_itr; in fm10k_set_coalesce()
684 for (i = 0; i < interface->num_q_vectors; i++) { in fm10k_set_coalesce()
685 struct fm10k_q_vector *qv = interface->q_vector[i]; in fm10k_set_coalesce()
694 static int fm10k_get_rss_hash_opts(struct fm10k_intfc *interface, in fm10k_get_rss_hash_opts() argument
707 interface->flags)) in fm10k_get_rss_hash_opts()
724 interface->flags)) in fm10k_get_rss_hash_opts()
738 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_get_rxnfc() local
743 cmd->data = interface->num_rx_queues; in fm10k_get_rxnfc()
747 ret = fm10k_get_rss_hash_opts(interface, cmd); in fm10k_get_rxnfc()
756 static int fm10k_set_rss_hash_opt(struct fm10k_intfc *interface, in fm10k_set_rss_hash_opt() argument
760 interface->flags); in fm10k_set_rss_hash_opt()
762 interface->flags); in fm10k_set_rss_hash_opt()
787 interface->flags); in fm10k_set_rss_hash_opt()
791 interface->flags); in fm10k_set_rss_hash_opt()
804 interface->flags); in fm10k_set_rss_hash_opt()
808 interface->flags); in fm10k_set_rss_hash_opt()
837 interface->flags)) || in fm10k_set_rss_hash_opt()
839 interface->flags))) { in fm10k_set_rss_hash_opt()
840 struct fm10k_hw *hw = &interface->hw; in fm10k_set_rss_hash_opt()
851 interface->flags)) { in fm10k_set_rss_hash_opt()
856 interface->flags)) { in fm10k_set_rss_hash_opt()
865 netif_warn(interface, drv, interface->netdev, in fm10k_set_rss_hash_opt()
876 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_set_rxnfc() local
881 ret = fm10k_set_rss_hash_opt(interface, cmd); in fm10k_set_rxnfc()
890 static int fm10k_mbx_test(struct fm10k_intfc *interface, u64 *data) in fm10k_mbx_test() argument
892 struct fm10k_hw *hw = &interface->hw; in fm10k_mbx_test()
909 fm10k_mbx_lock(interface); in fm10k_mbx_test()
912 fm10k_mbx_unlock(interface); in fm10k_mbx_test()
922 fm10k_mbx_lock(interface); in fm10k_mbx_test()
924 fm10k_mbx_unlock(interface); in fm10k_mbx_test()
944 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_self_test() local
945 struct fm10k_hw *hw = &interface->hw; in fm10k_self_test()
950 netif_err(interface, drv, dev, in fm10k_self_test()
951 "Interface removed - test blocked\n"); in fm10k_self_test()
956 if (fm10k_mbx_test(interface, &data[FM10K_TEST_MBX])) in fm10k_self_test()
978 void fm10k_write_reta(struct fm10k_intfc *interface, const u32 *indir) in fm10k_write_reta() argument
980 u16 rss_i = interface->ring_feature[RING_F_RSS].indices; in fm10k_write_reta()
981 struct fm10k_hw *hw = &interface->hw; in fm10k_write_reta()
1005 if (interface->reta[i] == reta) in fm10k_write_reta()
1008 interface->reta[i] = reta; in fm10k_write_reta()
1015 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_get_reta() local
1022 u32 reta = interface->reta[i]; in fm10k_get_reta()
1035 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_set_reta() local
1043 rss_i = interface->ring_feature[RING_F_RSS].indices; in fm10k_set_reta()
1050 fm10k_write_reta(interface, indir); in fm10k_set_reta()
1063 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_get_rssh() local
1074 *(__le32 *)key = cpu_to_le32(interface->rssrk[i]); in fm10k_get_rssh()
1083 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_set_rssh() local
1084 struct fm10k_hw *hw = &interface->hw; in fm10k_set_rssh()
1099 if (interface->rssrk[i] == rssrk) in fm10k_set_rssh()
1102 interface->rssrk[i] = rssrk; in fm10k_set_rssh()
1111 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_max_channels() local
1112 unsigned int max_combined = interface->hw.mac.max_queues; in fm10k_max_channels()
1125 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_get_channels() local
1135 ch->combined_count = interface->ring_feature[RING_F_RSS].indices; in fm10k_get_channels()
1141 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_set_channels() local
1156 interface->ring_feature[RING_F_RSS].limit = count; in fm10k_set_channels()