Lines Matching refs:netdev

40 	struct net_device *netdev = vinfo->netdev;  in hfi1_vnic_update_stats()  local
85 netdev->stats.tx_packets = stats->netstats.tx_packets; in hfi1_vnic_update_stats()
86 netdev->stats.tx_bytes = stats->netstats.tx_bytes; in hfi1_vnic_update_stats()
87 netdev->stats.tx_fifo_errors = stats->netstats.tx_fifo_errors; in hfi1_vnic_update_stats()
88 netdev->stats.tx_carrier_errors = stats->netstats.tx_carrier_errors; in hfi1_vnic_update_stats()
89 netdev->stats.tx_errors = stats->netstats.tx_errors; in hfi1_vnic_update_stats()
90 netdev->stats.tx_dropped = stats->netstats.tx_dropped; in hfi1_vnic_update_stats()
92 netdev->stats.rx_packets = stats->netstats.rx_packets; in hfi1_vnic_update_stats()
93 netdev->stats.rx_bytes = stats->netstats.rx_bytes; in hfi1_vnic_update_stats()
94 netdev->stats.rx_fifo_errors = stats->netstats.rx_fifo_errors; in hfi1_vnic_update_stats()
95 netdev->stats.multicast = stats->rx_grp.mcastbcast; in hfi1_vnic_update_stats()
96 netdev->stats.rx_length_errors = stats->rx_oversize + stats->rx_runt; in hfi1_vnic_update_stats()
97 netdev->stats.rx_errors = stats->netstats.rx_errors; in hfi1_vnic_update_stats()
98 netdev->stats.rx_dropped = stats->netstats.rx_dropped; in hfi1_vnic_update_stats()
181 static void hfi1_vnic_get_stats64(struct net_device *netdev, in hfi1_vnic_get_stats64() argument
185 struct hfi1_vnic_vport_info *vinfo = opa_vnic_dev_priv(netdev); in hfi1_vnic_get_stats64()
207 netif_stop_subqueue(vinfo->netdev, q_idx); in hfi1_vnic_maybe_stop_tx()
211 netif_start_subqueue(vinfo->netdev, q_idx); in hfi1_vnic_maybe_stop_tx()
215 struct net_device *netdev) in hfi1_netdev_start_xmit() argument
217 struct hfi1_vnic_vport_info *vinfo = opa_vnic_dev_priv(netdev); in hfi1_netdev_start_xmit()
226 if (unlikely(!netif_oper_up(netdev))) { in hfi1_netdev_start_xmit()
278 static u16 hfi1_vnic_select_queue(struct net_device *netdev, in hfi1_vnic_select_queue() argument
282 struct hfi1_vnic_vport_info *vinfo = opa_vnic_dev_priv(netdev); in hfi1_vnic_select_queue()
296 int max_len = vinfo->netdev->mtu + VLAN_ETH_HLEN; in hfi1_vnic_decap_skb()
371 if (unlikely(!netif_oper_up(vinfo->netdev))) { in hfi1_vnic_bypass_rcv()
376 skb = netdev_alloc_skb(vinfo->netdev, packet->tlen); in hfi1_vnic_bypass_rcv()
399 skb->protocol = eth_type_trans(skb, rxq->netdev); in hfi1_vnic_bypass_rcv()
407 struct net_device *netdev = vinfo->netdev; in hfi1_vnic_up() local
422 netif_carrier_on(netdev); in hfi1_vnic_up()
423 netif_tx_start_all_queues(netdev); in hfi1_vnic_up()
438 netif_carrier_off(vinfo->netdev); in hfi1_vnic_down()
439 netif_tx_disable(vinfo->netdev); in hfi1_vnic_down()
445 static int hfi1_netdev_open(struct net_device *netdev) in hfi1_netdev_open() argument
447 struct hfi1_vnic_vport_info *vinfo = opa_vnic_dev_priv(netdev); in hfi1_netdev_open()
456 static int hfi1_netdev_close(struct net_device *netdev) in hfi1_netdev_close() argument
458 struct hfi1_vnic_vport_info *vinfo = opa_vnic_dev_priv(netdev); in hfi1_netdev_close()
511 static void hfi1_vnic_set_vesw_id(struct net_device *netdev, int id) in hfi1_vnic_set_vesw_id() argument
513 struct hfi1_vnic_vport_info *vinfo = opa_vnic_dev_priv(netdev); in hfi1_vnic_set_vesw_id()
544 static void hfi1_vnic_free_rn(struct net_device *netdev) in hfi1_vnic_free_rn() argument
546 struct hfi1_vnic_vport_info *vinfo = opa_vnic_dev_priv(netdev); in hfi1_vnic_free_rn()
550 free_netdev(netdev); in hfi1_vnic_free_rn()
562 struct net_device *netdev; in hfi1_vnic_alloc_rn() local
576 netdev = alloc_netdev_mqs(size, name, name_assign_type, setup, in hfi1_vnic_alloc_rn()
579 if (!netdev) in hfi1_vnic_alloc_rn()
582 rn = netdev_priv(netdev); in hfi1_vnic_alloc_rn()
583 vinfo = opa_vnic_dev_priv(netdev); in hfi1_vnic_alloc_rn()
587 vinfo->netdev = netdev; in hfi1_vnic_alloc_rn()
591 netdev->features = NETIF_F_HIGHDMA | NETIF_F_SG; in hfi1_vnic_alloc_rn()
592 netdev->hw_features = netdev->features; in hfi1_vnic_alloc_rn()
593 netdev->vlan_features = netdev->features; in hfi1_vnic_alloc_rn()
594 netdev->watchdog_timeo = msecs_to_jiffies(HFI_TX_TIMEOUT_MS); in hfi1_vnic_alloc_rn()
595 netdev->netdev_ops = &hfi1_netdev_ops; in hfi1_vnic_alloc_rn()
603 rxq->netdev = netdev; in hfi1_vnic_alloc_rn()
610 return netdev; in hfi1_vnic_alloc_rn()
613 free_netdev(netdev); in hfi1_vnic_alloc_rn()