Lines Matching refs:netdev

570 	struct net_device *netdev = adapter->netdev;  in ixgbe_dump()  local
587 if (netdev) { in ixgbe_dump()
592 netdev->name, in ixgbe_dump()
593 netdev->state, in ixgbe_dump()
594 dev_trans_start(netdev)); in ixgbe_dump()
606 if (!netdev || !netif_running(netdev)) in ixgbe_dump()
991 tc = netdev_get_prio_tc_map(adapter->netdev, i); in ixgbe_update_xoff_received()
1081 static int ixgbe_tx_maxrate(struct net_device *netdev, in ixgbe_tx_maxrate() argument
1084 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_tx_maxrate()
1237 netif_stop_subqueue(tx_ring->netdev, in ixgbe_clean_tx_irq()
1255 txq = netdev_get_tx_queue(tx_ring->netdev, tx_ring->queue_index); in ixgbe_clean_tx_irq()
1259 !netif_carrier_ok(tx_ring->netdev) || in ixgbe_clean_tx_irq()
1421 if (!(ring->netdev->features & NETIF_F_RXHASH)) in ixgbe_rx_hash()
1471 if (!(ring->netdev->features & NETIF_F_RXCSUM)) in ixgbe_rx_checksum()
1678 struct net_device *dev = rx_ring->netdev; in ixgbe_process_skb_fields()
1876 struct net_device *netdev = rx_ring->netdev; in ixgbe_cleanup_headers() local
1885 if (!netdev || in ixgbe_cleanup_headers()
1888 !(netdev->features & NETIF_F_RXALL)))) { in ixgbe_cleanup_headers()
2224 err = xdp_do_redirect(adapter->netdev, xdp, xdp_prog); in ixgbe_run_xdp()
2230 bpf_warn_invalid_xdp_action(rx_ring->netdev, xdp_prog, act); in ixgbe_run_xdp()
2234 trace_xdp_exception(rx_ring->netdev, xdp_prog, act); in ixgbe_run_xdp()
2399 mss = rx_ring->netdev->mtu - in ixgbe_clean_rx_irq()
3209 struct net_device *netdev = adapter->netdev; in ixgbe_request_msix_irqs() local
3219 "%s-TxRx-%u", netdev->name, ri++); in ixgbe_request_msix_irqs()
3223 "%s-rx-%u", netdev->name, ri++); in ixgbe_request_msix_irqs()
3226 "%s-tx-%u", netdev->name, ti++); in ixgbe_request_msix_irqs()
3247 ixgbe_msix_other, 0, netdev->name, adapter); in ixgbe_request_msix_irqs()
3353 struct net_device *netdev = adapter->netdev; in ixgbe_request_irq() local
3360 netdev->name, adapter); in ixgbe_request_irq()
3363 netdev->name, adapter); in ixgbe_request_irq()
3521 netif_set_xps_queue(ring->netdev, in ixgbe_configure_tx_ring()
4234 ixgbe_ndo_set_vf_spoofchk(adapter->netdev, i, in ixgbe_configure_virtualization()
4238 ixgbe_ndo_set_vf_rss_query_en(adapter->netdev, i, in ixgbe_configure_virtualization()
4246 struct net_device *netdev = adapter->netdev; in ixgbe_set_rx_buffer_len() local
4247 int max_frame = netdev->mtu + ETH_HLEN + ETH_FCS_LEN; in ixgbe_set_rx_buffer_len()
4404 static int ixgbe_vlan_rx_add_vid(struct net_device *netdev, in ixgbe_vlan_rx_add_vid() argument
4407 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_vlan_rx_add_vid()
4463 static int ixgbe_vlan_rx_kill_vid(struct net_device *netdev, in ixgbe_vlan_rx_kill_vid() argument
4466 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_vlan_rx_kill_vid()
4502 if (!netif_is_ixgbe(ring->netdev)) in ixgbe_vlan_strip_disable()
4540 if (!netif_is_ixgbe(ring->netdev)) in ixgbe_vlan_strip_enable()
4672 ixgbe_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), 0); in ixgbe_restore_vlan()
4675 ixgbe_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), vid); in ixgbe_restore_vlan()
4687 static int ixgbe_write_mc_addr_list(struct net_device *netdev) in ixgbe_write_mc_addr_list() argument
4689 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_write_mc_addr_list()
4692 if (!netif_running(netdev)) in ixgbe_write_mc_addr_list()
4696 hw->mac.ops.update_mc_addr_list(hw, netdev); in ixgbe_write_mc_addr_list()
4704 return netdev_mc_count(netdev); in ixgbe_write_mc_addr_list()
4863 static int ixgbe_uc_sync(struct net_device *netdev, const unsigned char *addr) in ixgbe_uc_sync() argument
4865 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_uc_sync()
4873 static int ixgbe_uc_unsync(struct net_device *netdev, const unsigned char *addr) in ixgbe_uc_unsync() argument
4875 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_uc_unsync()
4891 void ixgbe_set_rx_mode(struct net_device *netdev) in ixgbe_set_rx_mode() argument
4893 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_set_rx_mode()
4896 netdev_features_t features = netdev->features; in ixgbe_set_rx_mode()
4910 if (netdev->flags & IFF_PROMISC) { in ixgbe_set_rx_mode()
4916 if (netdev->flags & IFF_ALLMULTI) { in ixgbe_set_rx_mode()
4928 if (__dev_uc_sync(netdev, ixgbe_uc_sync, ixgbe_uc_unsync)) { in ixgbe_set_rx_mode()
4937 count = ixgbe_write_mc_addr_list(netdev); in ixgbe_set_rx_mode()
5041 int max_frame = adapter->netdev->mtu + ETH_HLEN + ETH_FCS_LEN; in ixgbe_configure_dcb()
5045 netif_set_tso_max_size(adapter->netdev, 65536); in ixgbe_configure_dcb()
5050 netif_set_tso_max_size(adapter->netdev, 32768); in ixgbe_configure_dcb()
5053 if (adapter->netdev->features & NETIF_F_FCOE_MTU) in ixgbe_configure_dcb()
5101 struct net_device *dev = adapter->netdev; in ixgbe_hpbthresh()
5162 struct net_device *dev = adapter->netdev; in ixgbe_lpbthresh()
5344 int num_tc = netdev_get_num_tc(adapter->netdev); in ixgbe_fwd_ring_up()
5345 struct net_device *vdev = accel->netdev; in ixgbe_fwd_ring_up()
5358 netdev_bind_sb_channel_queue(adapter->netdev, vdev, in ixgbe_fwd_ring_up()
5362 adapter->rx_ring[baseq + i]->netdev = vdev; in ixgbe_fwd_ring_up()
5381 adapter->rx_ring[baseq + i]->netdev = NULL; in ixgbe_fwd_ring_up()
5386 netdev_unbind_sb_channel(adapter->netdev, vdev); in ixgbe_fwd_ring_up()
5419 netdev_walk_all_upper_dev_rcu(adapter->netdev, in ixgbe_configure_dfwd()
5437 ixgbe_set_rx_mode(adapter->netdev); in ixgbe_configure()
5731 netif_trans_update(adapter->netdev); in ixgbe_reinit_locked()
5967 struct net_device *netdev = adapter->netdev; in ixgbe_reset() local
6007 __dev_uc_unsync(netdev, NULL); in ixgbe_reset()
6020 if (!netif_running(adapter->netdev) && !adapter->wol) in ixgbe_reset()
6143 struct net_device *netdev = adapter->netdev; in ixgbe_down() local
6152 netif_tx_stop_all_queues(netdev); in ixgbe_down()
6155 netif_carrier_off(netdev); in ixgbe_down()
6156 netif_tx_disable(netdev); in ixgbe_down()
6231 static void ixgbe_tx_timeout(struct net_device *netdev, unsigned int __always_unused txqueue) in ixgbe_tx_timeout() argument
6233 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_tx_timeout()
6640 if (xdp_rxq_info_reg(&rx_ring->xdp_rxq, adapter->netdev, in ixgbe_setup_rx_resources()
6793 static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu) in ixgbe_change_mtu() argument
6795 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_change_mtu()
6816 netdev_dbg(netdev, "changing MTU from %d to %d\n", in ixgbe_change_mtu()
6817 netdev->mtu, new_mtu); in ixgbe_change_mtu()
6820 netdev->mtu = new_mtu; in ixgbe_change_mtu()
6822 if (netif_running(netdev)) in ixgbe_change_mtu()
6840 int ixgbe_open(struct net_device *netdev) in ixgbe_open() argument
6842 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_open()
6850 netif_carrier_off(netdev); in ixgbe_open()
6870 err = netif_set_real_num_tx_queues(netdev, queues); in ixgbe_open()
6875 err = netif_set_real_num_rx_queues(netdev, queues); in ixgbe_open()
6883 udp_tunnel_nic_reset_ntf(netdev); in ixgbe_open()
6931 int ixgbe_close(struct net_device *netdev) in ixgbe_close() argument
6933 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_close()
6937 if (netif_device_present(netdev)) in ixgbe_close()
6951 struct net_device *netdev = adapter->netdev; in ixgbe_resume() local
6973 if (!err && netif_running(netdev)) in ixgbe_resume()
6974 err = ixgbe_open(netdev); in ixgbe_resume()
6978 netif_device_attach(netdev); in ixgbe_resume()
6987 struct net_device *netdev = adapter->netdev; in __ixgbe_shutdown() local
6993 netif_device_detach(netdev); in __ixgbe_shutdown()
6995 if (netif_running(netdev)) in __ixgbe_shutdown()
7007 ixgbe_set_rx_mode(netdev); in __ixgbe_shutdown()
7086 struct net_device *netdev = adapter->netdev; in ixgbe_update_stats() local
7129 netdev->stats.rx_bytes = bytes; in ixgbe_update_stats()
7130 netdev->stats.rx_packets = packets; in ixgbe_update_stats()
7157 netdev->stats.tx_bytes = bytes; in ixgbe_update_stats()
7158 netdev->stats.tx_packets = packets; in ixgbe_update_stats()
7311 netdev->stats.multicast = hwstats->mprc; in ixgbe_update_stats()
7314 netdev->stats.rx_errors = hwstats->crcerrs + hwstats->rlec; in ixgbe_update_stats()
7315 netdev->stats.rx_dropped = 0; in ixgbe_update_stats()
7316 netdev->stats.rx_length_errors = hwstats->rlec; in ixgbe_update_stats()
7317 netdev->stats.rx_crc_errors = hwstats->crcerrs; in ixgbe_update_stats()
7318 netdev->stats.rx_missed_errors = total_mpc; in ixgbe_update_stats()
7408 if (netif_carrier_ok(adapter->netdev)) { in ixgbe_check_hang_subtask()
7481 struct net_device *netdev = adapter->netdev; in ixgbe_update_default_up() local
7489 up = dcb_ieee_getapp_mask(netdev, &app); in ixgbe_update_default_up()
7502 struct net_device *netdev = adapter->netdev; in ixgbe_watchdog_link_is_up() local
7509 if (netif_carrier_ok(netdev)) in ixgbe_watchdog_link_is_up()
7572 netif_carrier_on(netdev); in ixgbe_watchdog_link_is_up()
7576 netif_tx_wake_all_queues(adapter->netdev); in ixgbe_watchdog_link_is_up()
7592 struct net_device *netdev = adapter->netdev; in ixgbe_watchdog_link_is_down() local
7599 if (!netif_carrier_ok(netdev)) in ixgbe_watchdog_link_is_down()
7610 netif_carrier_off(netdev); in ixgbe_watchdog_link_is_down()
7673 if (!netif_carrier_ok(adapter->netdev)) { in ixgbe_watchdog_flush_tx()
7716 if (!(netif_carrier_ok(adapter->netdev))) in ixgbe_check_for_bad_vf()
7869 adapter->netdev->reg_state == NETREG_REGISTERED) { in ixgbe_sfp_detection_subtask()
7874 unregister_netdev(adapter->netdev); in ixgbe_sfp_detection_subtask()
7969 netdev_err(adapter->netdev, "Reset adapter\n"); in ixgbe_reset_subtask()
8023 unregister_netdev(adapter->netdev); in ixgbe_service_task()
8265 if (!netif_subqueue_try_stop(tx_ring->netdev, tx_ring->queue_index, in __ixgbe_maybe_stop_tx()
8816 (tx_ring->netdev->features & (NETIF_F_FSO | NETIF_F_FCOE_CRC))) { in ixgbe_xmit_frame_ring()
8864 struct net_device *netdev, in __ixgbe_xmit_frame() argument
8867 struct ixgbe_adapter *adapter = netdev_priv(netdev); in __ixgbe_xmit_frame()
8885 struct net_device *netdev) in ixgbe_xmit_frame() argument
8887 return __ixgbe_xmit_frame(skb, netdev, NULL); in ixgbe_xmit_frame()
8897 static int ixgbe_set_mac(struct net_device *netdev, void *p) in ixgbe_set_mac() argument
8899 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_set_mac()
8906 eth_hw_addr_set(netdev, addr->sa_data); in ixgbe_set_mac()
8907 memcpy(hw->mac.addr, addr->sa_data, netdev->addr_len); in ixgbe_set_mac()
8915 ixgbe_mdio_read(struct net_device *netdev, int prtad, int devad, u16 addr) in ixgbe_mdio_read() argument
8917 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_mdio_read()
8940 static int ixgbe_mdio_write(struct net_device *netdev, int prtad, int devad, in ixgbe_mdio_write() argument
8943 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_mdio_write()
8961 static int ixgbe_ioctl(struct net_device *netdev, struct ifreq *req, int cmd) in ixgbe_ioctl() argument
8963 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_ioctl()
9041 static void ixgbe_get_stats64(struct net_device *netdev, in ixgbe_get_stats64() argument
9044 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_get_stats64()
9077 stats->multicast = netdev->stats.multicast; in ixgbe_get_stats64()
9078 stats->rx_errors = netdev->stats.rx_errors; in ixgbe_get_stats64()
9079 stats->rx_length_errors = netdev->stats.rx_length_errors; in ixgbe_get_stats64()
9080 stats->rx_crc_errors = netdev->stats.rx_crc_errors; in ixgbe_get_stats64()
9081 stats->rx_missed_errors = netdev->stats.rx_missed_errors; in ixgbe_get_stats64()
9084 static int ixgbe_ndo_get_vf_stats(struct net_device *netdev, int vf, in ixgbe_ndo_get_vf_stats() argument
9087 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_ndo_get_vf_stats()
9147 struct net_device *dev = adapter->netdev; in ixgbe_set_prio_tc_map()
9194 netdev_unbind_sb_channel(adapter->netdev, vdev); in ixgbe_reassign_macvlan_pool()
9436 if (netdev_walk_all_upper_dev_rcu(adapter->netdev, in handle_redirect_action()
9760 if (!tc_cls_can_offload_and_chain0(adapter->netdev, type_data)) in ixgbe_setup_tc_block_cb()
9801 struct net_device *netdev = adapter->netdev; in ixgbe_sriov_reinit() local
9804 ixgbe_setup_tc(netdev, adapter->hw_tcs); in ixgbe_sriov_reinit()
9809 void ixgbe_do_reset(struct net_device *netdev) in ixgbe_do_reset() argument
9811 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_do_reset()
9813 if (netif_running(netdev)) in ixgbe_do_reset()
9819 static netdev_features_t ixgbe_fix_features(struct net_device *netdev, in ixgbe_fix_features() argument
9822 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_fix_features()
9853 ixgbe_setup_tc(adapter->netdev, adapter->hw_tcs); in ixgbe_reset_l2fw_offload()
9856 static int ixgbe_set_features(struct net_device *netdev, in ixgbe_set_features() argument
9859 struct ixgbe_adapter *adapter = netdev_priv(netdev); in ixgbe_set_features()
9860 netdev_features_t changed = netdev->features ^ features; in ixgbe_set_features()
9914 netdev->features = features; in ixgbe_set_features()
9919 ixgbe_do_reset(netdev); in ixgbe_set_features()
9922 ixgbe_set_rx_mode(netdev); in ixgbe_set_features()
10150 accel->netdev = vdev; in ixgbe_fwd_add()
10170 ixgbe_del_mac_filter(adapter, accel->netdev->dev_addr, in ixgbe_fwd_del()
10185 if (netif_running(adapter->netdev)) in ixgbe_fwd_del()
10187 ring->netdev = NULL; in ixgbe_fwd_del()
10191 netdev_unbind_sb_channel(pdev, accel->netdev); in ixgbe_fwd_del()
10192 netdev_set_sb_channel(accel->netdev, 0); in ixgbe_fwd_del()
10305 (void)ixgbe_xsk_wakeup(adapter->netdev, i, in ixgbe_xdp_setup()
10798 struct net_device *netdev; in ixgbe_probe() local
10850 netdev = alloc_etherdev_mq(sizeof(struct ixgbe_adapter), indices); in ixgbe_probe()
10851 if (!netdev) { in ixgbe_probe()
10856 SET_NETDEV_DEV(netdev, &pdev->dev); in ixgbe_probe()
10858 adapter = netdev_priv(netdev); in ixgbe_probe()
10860 adapter->netdev = netdev; in ixgbe_probe()
10874 netdev->netdev_ops = &ixgbe_netdev_ops; in ixgbe_probe()
10875 ixgbe_set_ethtool_ops(netdev); in ixgbe_probe()
10876 netdev->watchdog_timeo = 5 * HZ; in ixgbe_probe()
10877 strscpy(netdev->name, pci_name(pdev), sizeof(netdev->name)); in ixgbe_probe()
10904 hw->phy.mdio.dev = netdev; in ixgbe_probe()
10919 netdev->udp_tunnel_nic_info = &ixgbe_udp_tunnels_x550; in ixgbe_probe()
10922 netdev->udp_tunnel_nic_info = &ixgbe_udp_tunnels_x550em_a; in ixgbe_probe()
10986 netdev->features = NETIF_F_SG | in ixgbe_probe()
11000 netdev->gso_partial_features = IXGBE_GSO_PARTIAL_FEATURES; in ixgbe_probe()
11001 netdev->features |= NETIF_F_GSO_PARTIAL | in ixgbe_probe()
11005 netdev->features |= NETIF_F_SCTP_CRC | NETIF_F_GSO_UDP_L4; in ixgbe_probe()
11013 netdev->features |= IXGBE_ESP_FEATURES; in ixgbe_probe()
11016 netdev->hw_features |= netdev->features | in ixgbe_probe()
11024 netdev->hw_features |= NETIF_F_NTUPLE | in ixgbe_probe()
11027 netdev->features |= NETIF_F_HIGHDMA; in ixgbe_probe()
11029 netdev->vlan_features |= netdev->features | NETIF_F_TSO_MANGLEID; in ixgbe_probe()
11030 netdev->hw_enc_features |= netdev->vlan_features; in ixgbe_probe()
11031 netdev->mpls_features |= NETIF_F_SG | in ixgbe_probe()
11035 netdev->mpls_features |= IXGBE_GSO_PARTIAL_FEATURES; in ixgbe_probe()
11038 netdev->features |= NETIF_F_HW_VLAN_CTAG_FILTER | in ixgbe_probe()
11042 netdev->priv_flags |= IFF_UNICAST_FLT; in ixgbe_probe()
11043 netdev->priv_flags |= IFF_SUPP_NOFCS; in ixgbe_probe()
11045 netdev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_REDIRECT | in ixgbe_probe()
11049 netdev->min_mtu = ETH_MIN_MTU; in ixgbe_probe()
11050 netdev->max_mtu = IXGBE_MAX_JUMBO_FRAME_SIZE - (ETH_HLEN + ETH_FCS_LEN); in ixgbe_probe()
11054 netdev->dcbnl_ops = &ixgbe_dcbnl_ops; in ixgbe_probe()
11071 netdev->features |= NETIF_F_FSO | in ixgbe_probe()
11074 netdev->vlan_features |= NETIF_F_FSO | in ixgbe_probe()
11080 netdev->hw_features |= NETIF_F_LRO; in ixgbe_probe()
11082 netdev->features |= NETIF_F_LRO; in ixgbe_probe()
11099 eth_hw_addr_set(netdev, hw->mac.perm_addr); in ixgbe_probe()
11101 if (!is_valid_ether_addr(netdev->dev_addr)) { in ixgbe_probe()
11180 e_dev_info("%pM\n", netdev->dev_addr); in ixgbe_probe()
11193 strcpy(netdev->name, "eth%d"); in ixgbe_probe()
11195 err = register_netdev(netdev); in ixgbe_probe()
11205 netif_carrier_off(netdev); in ixgbe_probe()
11228 ixgbe_add_sanmac_netdev(netdev); in ixgbe_probe()
11252 unregister_netdev(netdev); in ixgbe_probe()
11266 free_netdev(netdev); in ixgbe_probe()
11288 struct net_device *netdev; in ixgbe_remove() local
11296 netdev = adapter->netdev; in ixgbe_remove()
11319 ixgbe_del_sanmac_netdev(netdev); in ixgbe_remove()
11324 if (netdev->reg_state == NETREG_REGISTERED) in ixgbe_remove()
11325 unregister_netdev(netdev); in ixgbe_remove()
11354 free_netdev(netdev); in ixgbe_remove()
11372 struct net_device *netdev = adapter->netdev; in ixgbe_io_error_detected() local
11473 if (!netif_device_present(netdev)) in ixgbe_io_error_detected()
11477 netif_device_detach(netdev); in ixgbe_io_error_detected()
11479 if (netif_running(netdev)) in ixgbe_io_error_detected()
11537 struct net_device *netdev = adapter->netdev; in ixgbe_io_resume() local
11548 if (netif_running(netdev)) in ixgbe_io_resume()
11549 ixgbe_open(netdev); in ixgbe_io_resume()
11551 netif_device_attach(netdev); in ixgbe_io_resume()