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