Lines Matching full:interface
47 /* General interface statistics */
158 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_get_stat_strings() local
167 if (interface->hw.mac.type != fm10k_mac_vf) in fm10k_get_stat_strings()
170 for (i = 0; i < interface->hw.mac.max_queues; i++) { in fm10k_get_stat_strings()
199 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_get_sset_count() local
200 struct fm10k_hw *hw = &interface->hw; in fm10k_get_sset_count()
264 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_get_ethtool_stats() local
268 fm10k_update_stats(interface); in fm10k_get_ethtool_stats()
272 fm10k_add_ethtool_stats(&data, interface, fm10k_gstrings_global_stats); in fm10k_get_ethtool_stats()
274 fm10k_add_ethtool_stats(&data, &interface->hw.mbx, in fm10k_get_ethtool_stats()
277 if (interface->hw.mac.type != fm10k_mac_vf) { in fm10k_get_ethtool_stats()
278 fm10k_add_ethtool_stats(&data, interface, in fm10k_get_ethtool_stats()
282 for (i = 0; i < interface->hw.mac.max_queues; i++) { in fm10k_get_ethtool_stats()
285 ring = interface->tx_ring[i]; in fm10k_get_ethtool_stats()
289 ring = interface->rx_ring[i]; in fm10k_get_ethtool_stats()
354 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_get_regs() local
355 struct fm10k_hw *hw = &interface->hw; in fm10k_get_regs()
432 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_get_regs_len() local
433 struct fm10k_hw *hw = &interface->hw; in fm10k_get_regs_len()
448 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_get_drvinfo() local
452 strncpy(info->bus_info, pci_name(interface->pdev), in fm10k_get_drvinfo()
459 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_get_pauseparam() local
465 pause->rx_pause = interface->rx_pause ? 1 : 0; in fm10k_get_pauseparam()
471 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_set_pauseparam() local
472 struct fm10k_hw *hw = &interface->hw; in fm10k_set_pauseparam()
479 interface->rx_pause = pause->rx_pause ? ~0 : 0; in fm10k_set_pauseparam()
484 fm10k_update_rx_drop_en(interface); in fm10k_set_pauseparam()
491 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_get_msglevel() local
493 return interface->msg_enable; in fm10k_get_msglevel()
498 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_set_msglevel() local
500 interface->msg_enable = data; in fm10k_set_msglevel()
506 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_get_ringparam() local
512 ring->rx_pending = interface->rx_ring_count; in fm10k_get_ringparam()
513 ring->tx_pending = interface->tx_ring_count; in fm10k_get_ringparam()
521 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_set_ringparam() local
537 if ((new_tx_count == interface->tx_ring_count) && in fm10k_set_ringparam()
538 (new_rx_count == interface->rx_ring_count)) { in fm10k_set_ringparam()
543 while (test_and_set_bit(__FM10K_RESETTING, interface->state)) in fm10k_set_ringparam()
546 if (!netif_running(interface->netdev)) { in fm10k_set_ringparam()
547 for (i = 0; i < interface->num_tx_queues; i++) in fm10k_set_ringparam()
548 interface->tx_ring[i]->count = new_tx_count; in fm10k_set_ringparam()
549 for (i = 0; i < interface->num_rx_queues; i++) in fm10k_set_ringparam()
550 interface->rx_ring[i]->count = new_rx_count; in fm10k_set_ringparam()
551 interface->tx_ring_count = new_tx_count; in fm10k_set_ringparam()
552 interface->rx_ring_count = new_rx_count; in fm10k_set_ringparam()
557 i = max_t(int, interface->num_tx_queues, interface->num_rx_queues); in fm10k_set_ringparam()
565 fm10k_down(interface); in fm10k_set_ringparam()
572 if (new_tx_count != interface->tx_ring_count) { in fm10k_set_ringparam()
573 for (i = 0; i < interface->num_tx_queues; i++) { in fm10k_set_ringparam()
574 memcpy(&temp_ring[i], interface->tx_ring[i], in fm10k_set_ringparam()
588 for (i = 0; i < interface->num_tx_queues; i++) { in fm10k_set_ringparam()
589 fm10k_free_tx_resources(interface->tx_ring[i]); in fm10k_set_ringparam()
591 memcpy(interface->tx_ring[i], &temp_ring[i], in fm10k_set_ringparam()
595 interface->tx_ring_count = new_tx_count; in fm10k_set_ringparam()
599 if (new_rx_count != interface->rx_ring_count) { in fm10k_set_ringparam()
600 for (i = 0; i < interface->num_rx_queues; i++) { in fm10k_set_ringparam()
601 memcpy(&temp_ring[i], interface->rx_ring[i], in fm10k_set_ringparam()
615 for (i = 0; i < interface->num_rx_queues; i++) { in fm10k_set_ringparam()
616 fm10k_free_rx_resources(interface->rx_ring[i]); in fm10k_set_ringparam()
618 memcpy(interface->rx_ring[i], &temp_ring[i], in fm10k_set_ringparam()
622 interface->rx_ring_count = new_rx_count; in fm10k_set_ringparam()
626 fm10k_up(interface); in fm10k_set_ringparam()
629 clear_bit(__FM10K_RESETTING, interface->state); in fm10k_set_ringparam()
636 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_get_coalesce() local
638 ec->use_adaptive_tx_coalesce = ITR_IS_ADAPTIVE(interface->tx_itr); in fm10k_get_coalesce()
639 ec->tx_coalesce_usecs = interface->tx_itr & ~FM10K_ITR_ADAPTIVE; in fm10k_get_coalesce()
641 ec->use_adaptive_rx_coalesce = ITR_IS_ADAPTIVE(interface->rx_itr); in fm10k_get_coalesce()
642 ec->rx_coalesce_usecs = interface->rx_itr & ~FM10K_ITR_ADAPTIVE; in fm10k_get_coalesce()
650 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_set_coalesce() local
670 /* update interface */ in fm10k_set_coalesce()
671 interface->tx_itr = tx_itr; in fm10k_set_coalesce()
672 interface->rx_itr = rx_itr; in fm10k_set_coalesce()
675 for (i = 0; i < interface->num_q_vectors; i++) { in fm10k_set_coalesce()
676 struct fm10k_q_vector *qv = interface->q_vector[i]; in fm10k_set_coalesce()
685 static int fm10k_get_rss_hash_opts(struct fm10k_intfc *interface, in fm10k_get_rss_hash_opts() argument
698 interface->flags)) in fm10k_get_rss_hash_opts()
715 interface->flags)) in fm10k_get_rss_hash_opts()
729 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_get_rxnfc() local
734 cmd->data = interface->num_rx_queues; in fm10k_get_rxnfc()
738 ret = fm10k_get_rss_hash_opts(interface, cmd); in fm10k_get_rxnfc()
747 static int fm10k_set_rss_hash_opt(struct fm10k_intfc *interface, in fm10k_set_rss_hash_opt() argument
751 interface->flags); in fm10k_set_rss_hash_opt()
753 interface->flags); in fm10k_set_rss_hash_opt()
778 interface->flags); in fm10k_set_rss_hash_opt()
782 interface->flags); in fm10k_set_rss_hash_opt()
795 interface->flags); in fm10k_set_rss_hash_opt()
799 interface->flags); in fm10k_set_rss_hash_opt()
828 interface->flags)) || in fm10k_set_rss_hash_opt()
830 interface->flags))) { in fm10k_set_rss_hash_opt()
831 struct fm10k_hw *hw = &interface->hw; in fm10k_set_rss_hash_opt()
842 interface->flags)) { in fm10k_set_rss_hash_opt()
847 interface->flags)) { in fm10k_set_rss_hash_opt()
856 netif_warn(interface, drv, interface->netdev, in fm10k_set_rss_hash_opt()
867 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_set_rxnfc() local
872 ret = fm10k_set_rss_hash_opt(interface, cmd); in fm10k_set_rxnfc()
881 static int fm10k_mbx_test(struct fm10k_intfc *interface, u64 *data) in fm10k_mbx_test() argument
883 struct fm10k_hw *hw = &interface->hw; in fm10k_mbx_test()
900 fm10k_mbx_lock(interface); in fm10k_mbx_test()
903 fm10k_mbx_unlock(interface); in fm10k_mbx_test()
913 fm10k_mbx_lock(interface); in fm10k_mbx_test()
915 fm10k_mbx_unlock(interface); in fm10k_mbx_test()
935 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_self_test() local
936 struct fm10k_hw *hw = &interface->hw; in fm10k_self_test()
941 netif_err(interface, drv, dev, in fm10k_self_test()
942 "Interface removed - test blocked\n"); in fm10k_self_test()
947 if (fm10k_mbx_test(interface, &data[FM10K_TEST_MBX])) in fm10k_self_test()
969 void fm10k_write_reta(struct fm10k_intfc *interface, const u32 *indir) in fm10k_write_reta() argument
971 u16 rss_i = interface->ring_feature[RING_F_RSS].indices; in fm10k_write_reta()
972 struct fm10k_hw *hw = &interface->hw; in fm10k_write_reta()
996 if (interface->reta[i] == reta) in fm10k_write_reta()
999 interface->reta[i] = reta; in fm10k_write_reta()
1006 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_get_reta() local
1013 u32 reta = interface->reta[i]; in fm10k_get_reta()
1026 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_set_reta() local
1034 rss_i = interface->ring_feature[RING_F_RSS].indices; in fm10k_set_reta()
1041 fm10k_write_reta(interface, indir); in fm10k_set_reta()
1054 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_get_rssh() local
1065 *(__le32 *)key = cpu_to_le32(interface->rssrk[i]); in fm10k_get_rssh()
1073 struct fm10k_intfc *interface = netdev_priv(netdev); in fm10k_set_rssh() local
1074 struct fm10k_hw *hw = &interface->hw; in fm10k_set_rssh()
1088 if (interface->rssrk[i] == rssrk) in fm10k_set_rssh()
1091 interface->rssrk[i] = rssrk; in fm10k_set_rssh()
1100 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_max_channels() local
1101 unsigned int max_combined = interface->hw.mac.max_queues; in fm10k_max_channels()
1114 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_get_channels() local
1124 ch->combined_count = interface->ring_feature[RING_F_RSS].indices; in fm10k_get_channels()
1130 struct fm10k_intfc *interface = netdev_priv(dev); in fm10k_set_channels() local
1145 interface->ring_feature[RING_F_RSS].limit = count; in fm10k_set_channels()