Lines Matching refs:netdev

16 static int iavf_close(struct net_device *netdev);
311 static void iavf_tx_timeout(struct net_device *netdev, unsigned int txqueue) in iavf_tx_timeout() argument
313 struct iavf_adapter *adapter = netdev_priv(netdev); in iavf_tx_timeout()
410 struct net_device *netdev = data; in iavf_msix_aq() local
411 struct iavf_adapter *adapter = netdev_priv(netdev); in iavf_msix_aq()
638 struct net_device *netdev = adapter->netdev; in iavf_request_misc_irq() local
646 adapter->misc_vector_name, netdev); in iavf_request_misc_irq()
651 free_irq(adapter->msix_entries[0].vector, netdev); in iavf_request_misc_irq()
687 struct net_device *netdev = adapter->netdev; in iavf_free_misc_irq() local
692 free_irq(adapter->msix_entries[0].vector, netdev); in iavf_free_misc_irq()
725 struct net_device *netdev = adapter->netdev; in iavf_configure_rx() local
738 (netdev->mtu <= ETH_DATA_LEN)) in iavf_configure_rx()
902 static int iavf_vlan_rx_add_vid(struct net_device *netdev, in iavf_vlan_rx_add_vid() argument
905 struct iavf_adapter *adapter = netdev_priv(netdev); in iavf_vlan_rx_add_vid()
915 …netdev_err(netdev, "Max allowed VLAN filters %u. Remove existing VLANs or disable filtering via Et… in iavf_vlan_rx_add_vid()
932 static int iavf_vlan_rx_kill_vid(struct net_device *netdev, in iavf_vlan_rx_kill_vid() argument
935 struct iavf_adapter *adapter = netdev_priv(netdev); in iavf_vlan_rx_kill_vid()
1059 static bool iavf_is_mac_set_handled(struct net_device *netdev, in iavf_is_mac_set_handled() argument
1062 struct iavf_adapter *adapter = netdev_priv(netdev); in iavf_is_mac_set_handled()
1085 static int iavf_set_mac(struct net_device *netdev, void *p) in iavf_set_mac() argument
1087 struct iavf_adapter *adapter = netdev_priv(netdev); in iavf_set_mac()
1100 iavf_is_mac_set_handled(netdev, addr->sa_data), in iavf_set_mac()
1115 if (!ether_addr_equal(netdev->dev_addr, addr->sa_data)) in iavf_set_mac()
1129 static int iavf_addr_sync(struct net_device *netdev, const u8 *addr) in iavf_addr_sync() argument
1131 struct iavf_adapter *adapter = netdev_priv(netdev); in iavf_addr_sync()
1147 static int iavf_addr_unsync(struct net_device *netdev, const u8 *addr) in iavf_addr_unsync() argument
1149 struct iavf_adapter *adapter = netdev_priv(netdev); in iavf_addr_unsync()
1157 if (ether_addr_equal(addr, netdev->dev_addr)) in iavf_addr_unsync()
1174 return (adapter->current_netdev_promisc_flags ^ adapter->netdev->flags) & in iavf_promiscuous_mode_changed()
1182 static void iavf_set_rx_mode(struct net_device *netdev) in iavf_set_rx_mode() argument
1184 struct iavf_adapter *adapter = netdev_priv(netdev); in iavf_set_rx_mode()
1187 __dev_uc_sync(netdev, iavf_addr_sync, iavf_addr_unsync); in iavf_set_rx_mode()
1188 __dev_mc_sync(netdev, iavf_addr_sync, iavf_addr_unsync); in iavf_set_rx_mode()
1238 struct net_device *netdev = adapter->netdev; in iavf_configure() local
1241 iavf_set_rx_mode(netdev); in iavf_configure()
1285 __dev_uc_unsync(adapter->netdev, NULL); in iavf_clear_mac_vlan_filters()
1286 __dev_mc_unsync(adapter->netdev, NULL); in iavf_clear_mac_vlan_filters()
1388 struct net_device *netdev = adapter->netdev; in iavf_down() local
1393 netif_carrier_off(netdev); in iavf_down()
1394 netif_tx_disable(netdev); in iavf_down()
1612 tx_ring->netdev = adapter->netdev; in iavf_alloc_queues()
1621 rx_ring->netdev = adapter->netdev; in iavf_alloc_queues()
1835 netif_napi_add(adapter->netdev, &q_vector->napi, in iavf_alloc_q_vectors()
1958 struct net_device *netdev = adapter->netdev; in iavf_reinit_interrupt_scheme() local
1972 netif_tx_stop_all_queues(netdev); in iavf_reinit_interrupt_scheme()
2005 netdev_update_features(adapter->netdev); in iavf_finish_config()
2012 err = register_netdevice(adapter->netdev); in iavf_finish_config()
2034 netif_set_real_num_rx_queues(adapter->netdev, pairs); in iavf_finish_config()
2035 netif_set_real_num_tx_queues(adapter->netdev, pairs); in iavf_finish_config()
2462 vsi->netdev = adapter->netdev; in iavf_parse_vf_resource_msg()
2636 struct net_device *netdev = adapter->netdev; in iavf_init_config_adapter() local
2649 netdev->netdev_ops = &iavf_netdev_ops; in iavf_init_config_adapter()
2650 iavf_set_ethtool_ops(netdev); in iavf_init_config_adapter()
2651 netdev->watchdog_timeo = 5 * HZ; in iavf_init_config_adapter()
2654 netdev->min_mtu = ETH_MIN_MTU; in iavf_init_config_adapter()
2655 netdev->max_mtu = IAVF_MAX_RXBUFFER - IAVF_PACKET_HDR_PAD; in iavf_init_config_adapter()
2660 eth_hw_addr_random(netdev); in iavf_init_config_adapter()
2661 ether_addr_copy(adapter->hw.mac.addr, netdev->dev_addr); in iavf_init_config_adapter()
2663 eth_hw_addr_set(netdev, adapter->hw.mac.addr); in iavf_init_config_adapter()
2664 ether_addr_copy(netdev->perm_addr, adapter->hw.mac.addr); in iavf_init_config_adapter()
2681 netif_carrier_off(netdev); in iavf_init_config_adapter()
2683 netif_tx_stop_all_queues(netdev); in iavf_init_config_adapter()
2692 if (netdev->features & NETIF_F_GRO) in iavf_init_config_adapter()
2714 iavf_set_vlan_offload_features(adapter, 0, netdev->features); in iavf_init_config_adapter()
2921 netif_carrier_off(adapter->netdev); in iavf_disable_vf()
2922 netif_tx_disable(adapter->netdev); in iavf_disable_vf()
2981 struct net_device *netdev = adapter->netdev; in iavf_reset_task() local
3066 netif_carrier_off(netdev); in iavf_reset_task()
3067 netif_tx_stop_all_queues(netdev); in iavf_reset_task()
3169 err = iavf_request_traffic_irqs(adapter, netdev->name); in iavf_reset_task()
3616 static int __iavf_setup_tc(struct net_device *netdev, void *type_data) in __iavf_setup_tc() argument
3619 struct iavf_adapter *adapter = netdev_priv(netdev); in __iavf_setup_tc()
3634 netdev_reset_tc(netdev); in __iavf_setup_tc()
3636 netif_tx_stop_all_queues(netdev); in __iavf_setup_tc()
3637 netif_tx_disable(netdev); in __iavf_setup_tc()
3699 netif_tx_stop_all_queues(netdev); in __iavf_setup_tc()
3700 netif_tx_disable(netdev); in __iavf_setup_tc()
3702 netdev_reset_tc(netdev); in __iavf_setup_tc()
3704 netdev_set_num_tc(adapter->netdev, num_tc); in __iavf_setup_tc()
3710 netdev_set_tc_queue(netdev, netdev_tc++, qcount, in __iavf_setup_tc()
3718 netif_set_real_num_rx_queues(netdev, total_qps); in __iavf_setup_tc()
3719 netif_set_real_num_tx_queues(netdev, total_qps); in __iavf_setup_tc()
4027 int tc = tc_classid_to_hwtc(adapter->netdev, cls_flower->classid); in iavf_configure_clsflower()
4144 if (!tc_cls_can_offload_and_chain0(adapter->netdev, type_data)) in iavf_setup_tc_block_cb()
4168 static int iavf_setup_tc(struct net_device *netdev, enum tc_setup_type type, in iavf_setup_tc() argument
4171 struct iavf_adapter *adapter = netdev_priv(netdev); in iavf_setup_tc()
4175 return __iavf_setup_tc(netdev, type_data); in iavf_setup_tc()
4225 static int iavf_open(struct net_device *netdev) in iavf_open() argument
4227 struct iavf_adapter *adapter = netdev_priv(netdev); in iavf_open()
4270 err = iavf_request_traffic_irqs(adapter, netdev->name); in iavf_open()
4318 static int iavf_close(struct net_device *netdev) in iavf_close() argument
4320 struct iavf_adapter *adapter = netdev_priv(netdev); in iavf_close()
4379 netdev_warn(netdev, "Device resources not yet released\n"); in iavf_close()
4394 static int iavf_change_mtu(struct net_device *netdev, int new_mtu) in iavf_change_mtu() argument
4396 struct iavf_adapter *adapter = netdev_priv(netdev); in iavf_change_mtu()
4399 netdev_dbg(netdev, "changing MTU from %d to %d\n", in iavf_change_mtu()
4400 netdev->mtu, new_mtu); in iavf_change_mtu()
4401 netdev->mtu = new_mtu; in iavf_change_mtu()
4407 if (netif_running(netdev)) { in iavf_change_mtu()
4411 netdev_warn(netdev, "MTU change interrupted waiting for reset"); in iavf_change_mtu()
4413 netdev_warn(netdev, "MTU change timed out waiting for reset"); in iavf_change_mtu()
4473 static int iavf_set_features(struct net_device *netdev, in iavf_set_features() argument
4476 struct iavf_adapter *adapter = netdev_priv(netdev); in iavf_set_features()
4479 if ((netdev->features & NETIF_VLAN_OFFLOAD_FEATURES) ^ in iavf_set_features()
4481 iavf_set_vlan_offload_features(adapter, netdev->features, in iavf_set_features()
4484 if ((netdev->features & NETIF_F_NTUPLE) ^ (features & NETIF_F_NTUPLE)) { in iavf_set_features()
4766 …netdev_warn(adapter->netdev, "cannot support CTAG and STAG VLAN stripping and/or insertion simulta… in iavf_fix_netdev_vlan_features()
4781 static netdev_features_t iavf_fix_features(struct net_device *netdev, in iavf_fix_features() argument
4784 struct iavf_adapter *adapter = netdev_priv(netdev); in iavf_fix_features()
4842 struct net_device *netdev = adapter->netdev; in iavf_process_config() local
4874 netdev->gso_partial_features |= in iavf_process_config()
4877 netdev->gso_partial_features |= NETIF_F_GSO_GRE_CSUM; in iavf_process_config()
4878 netdev->hw_enc_features |= NETIF_F_TSO_MANGLEID; in iavf_process_config()
4879 netdev->hw_enc_features |= hw_enc_features; in iavf_process_config()
4882 netdev->vlan_features |= hw_enc_features | NETIF_F_TSO_MANGLEID; in iavf_process_config()
4898 netdev->hw_features |= hw_features | hw_vlan_features; in iavf_process_config()
4901 netdev->features |= hw_features | vlan_features; in iavf_process_config()
4904 netdev->features |= NETIF_F_HW_VLAN_CTAG_FILTER; in iavf_process_config()
4907 netdev->hw_features |= NETIF_F_NTUPLE; in iavf_process_config()
4908 netdev->features |= NETIF_F_NTUPLE; in iavf_process_config()
4912 netdev->priv_flags |= IFF_UNICAST_FLT; in iavf_process_config()
4917 if (netdev->wanted_features) { in iavf_process_config()
4918 if (!(netdev->wanted_features & NETIF_F_TSO) || in iavf_process_config()
4919 netdev->mtu < 576) in iavf_process_config()
4920 netdev->features &= ~NETIF_F_TSO; in iavf_process_config()
4921 if (!(netdev->wanted_features & NETIF_F_TSO6) || in iavf_process_config()
4922 netdev->mtu < 576) in iavf_process_config()
4923 netdev->features &= ~NETIF_F_TSO6; in iavf_process_config()
4924 if (!(netdev->wanted_features & NETIF_F_TSO_ECN)) in iavf_process_config()
4925 netdev->features &= ~NETIF_F_TSO_ECN; in iavf_process_config()
4926 if (!(netdev->wanted_features & NETIF_F_GRO)) in iavf_process_config()
4927 netdev->features &= ~NETIF_F_GRO; in iavf_process_config()
4928 if (!(netdev->wanted_features & NETIF_F_GSO)) in iavf_process_config()
4929 netdev->features &= ~NETIF_F_GSO; in iavf_process_config()
4948 struct net_device *netdev; in iavf_probe() local
4973 netdev = alloc_etherdev_mq(sizeof(struct iavf_adapter), in iavf_probe()
4975 if (!netdev) { in iavf_probe()
4980 SET_NETDEV_DEV(netdev, &pdev->dev); in iavf_probe()
4982 pci_set_drvdata(pdev, netdev); in iavf_probe()
4983 adapter = netdev_priv(netdev); in iavf_probe()
4985 adapter->netdev = netdev; in iavf_probe()
5062 free_netdev(netdev); in iavf_probe()
5079 struct net_device *netdev = dev_get_drvdata(dev_d); in iavf_suspend() local
5080 struct iavf_adapter *adapter = netdev_priv(netdev); in iavf_suspend()
5082 netif_device_detach(netdev); in iavf_suspend()
5087 if (netif_running(netdev)) { in iavf_suspend()
5132 netif_device_attach(adapter->netdev); in iavf_resume()
5154 struct net_device *netdev; in iavf_remove() local
5159 netdev = pci_get_drvdata(pdev); in iavf_remove()
5160 if (!netdev) in iavf_remove()
5194 unregister_netdevice(netdev); in iavf_remove()
5293 free_netdev(netdev); in iavf_remove()