Lines Matching defs:netdev

56 #include "netdev.h"
82 struct net_device *netdev = vinfo->netdev;
127 netdev->stats.tx_packets = stats->netstats.tx_packets;
128 netdev->stats.tx_bytes = stats->netstats.tx_bytes;
129 netdev->stats.tx_fifo_errors = stats->netstats.tx_fifo_errors;
130 netdev->stats.tx_carrier_errors = stats->netstats.tx_carrier_errors;
131 netdev->stats.tx_errors = stats->netstats.tx_errors;
132 netdev->stats.tx_dropped = stats->netstats.tx_dropped;
134 netdev->stats.rx_packets = stats->netstats.rx_packets;
135 netdev->stats.rx_bytes = stats->netstats.rx_bytes;
136 netdev->stats.rx_fifo_errors = stats->netstats.rx_fifo_errors;
137 netdev->stats.multicast = stats->rx_grp.mcastbcast;
138 netdev->stats.rx_length_errors = stats->rx_oversize + stats->rx_runt;
139 netdev->stats.rx_errors = stats->netstats.rx_errors;
140 netdev->stats.rx_dropped = stats->netstats.rx_dropped;
223 static void hfi1_vnic_get_stats64(struct net_device *netdev,
227 struct hfi1_vnic_vport_info *vinfo = opa_vnic_dev_priv(netdev);
249 netif_stop_subqueue(vinfo->netdev, q_idx);
253 netif_start_subqueue(vinfo->netdev, q_idx);
257 struct net_device *netdev)
259 struct hfi1_vnic_vport_info *vinfo = opa_vnic_dev_priv(netdev);
268 if (unlikely(!netif_oper_up(netdev))) {
320 static u16 hfi1_vnic_select_queue(struct net_device *netdev,
324 struct hfi1_vnic_vport_info *vinfo = opa_vnic_dev_priv(netdev);
338 int max_len = vinfo->netdev->mtu + VLAN_ETH_HLEN;
413 if (unlikely(!netif_oper_up(vinfo->netdev))) {
418 skb = netdev_alloc_skb(vinfo->netdev, packet->tlen);
441 skb->protocol = eth_type_trans(skb, rxq->netdev);
449 struct net_device *netdev = vinfo->netdev;
464 netif_carrier_on(netdev);
465 netif_tx_start_all_queues(netdev);
480 netif_carrier_off(vinfo->netdev);
481 netif_tx_disable(vinfo->netdev);
487 static int hfi1_netdev_open(struct net_device *netdev)
489 struct hfi1_vnic_vport_info *vinfo = opa_vnic_dev_priv(netdev);
498 static int hfi1_netdev_close(struct net_device *netdev)
500 struct hfi1_vnic_vport_info *vinfo = opa_vnic_dev_priv(netdev);
523 dd_dev_err(dd, "Unable to initialize netdev contexts\n");
553 static void hfi1_vnic_set_vesw_id(struct net_device *netdev, int id)
555 struct hfi1_vnic_vport_info *vinfo = opa_vnic_dev_priv(netdev);
577 /* netdev ops */
586 static void hfi1_vnic_free_rn(struct net_device *netdev)
588 struct hfi1_vnic_vport_info *vinfo = opa_vnic_dev_priv(netdev);
592 free_netdev(netdev);
604 struct net_device *netdev;
618 netdev = alloc_netdev_mqs(size, name, name_assign_type, setup,
621 if (!netdev)
624 rn = netdev_priv(netdev);
625 vinfo = opa_vnic_dev_priv(netdev);
629 vinfo->netdev = netdev;
633 netdev->features = NETIF_F_HIGHDMA | NETIF_F_SG;
634 netdev->hw_features = netdev->features;
635 netdev->vlan_features = netdev->features;
636 netdev->watchdog_timeo = msecs_to_jiffies(HFI_TX_TIMEOUT_MS);
637 netdev->netdev_ops = &hfi1_netdev_ops;
645 rxq->netdev = netdev;
652 return netdev;
655 free_netdev(netdev);