Lines Matching full:vp
69 struct vnet *vp = netdev_priv(dev); in vnet_get_msglevel() local
71 return vp->msg_enable; in vnet_get_msglevel()
76 struct vnet *vp = netdev_priv(dev); in vnet_set_msglevel() local
78 vp->msg_enable = value; in vnet_set_msglevel()
102 struct vnet *vp = (struct vnet *)netdev_priv(dev); in vnet_get_sset_count() local
107 + (NUM_VNET_PORT_STATS * vp->nports); in vnet_get_sset_count()
115 struct vnet *vp = (struct vnet *)netdev_priv(dev); in vnet_get_strings() local
124 list_for_each_entry_rcu(port, &vp->port_list, list) { in vnet_get_strings()
146 struct vnet *vp = (struct vnet *)netdev_priv(dev); in vnet_get_ethtool_stats() local
163 data[i++] = vp->nports; in vnet_get_ethtool_stats()
166 list_for_each_entry_rcu(port, &vp->port_list, list) { in vnet_get_ethtool_stats()
191 static struct vnet_port *__tx_port_find(struct vnet *vp, struct sk_buff *skb) in __tx_port_find() argument
194 struct hlist_head *hp = &vp->port_hash[hash]; in __tx_port_find()
203 list_for_each_entry_rcu(port, &vp->port_list, list) { in __tx_port_find()
217 struct vnet *vp = netdev_priv(dev); in vnet_tx_port_find() local
219 return __tx_port_find(vp, skb); in vnet_tx_port_find()
225 struct vnet *vp = netdev_priv(dev); in vnet_select_queue() local
226 struct vnet_port *port = __tx_port_find(vp, skb); in vnet_select_queue()
242 struct vnet *vp = netdev_priv(dev); in vnet_set_rx_mode() local
244 return sunvnet_set_rx_mode_common(dev, vp); in vnet_set_rx_mode()
250 struct vnet *vp = netdev_priv(dev); in vnet_poll_controller() local
252 return sunvnet_poll_controller_common(dev, vp); in vnet_poll_controller()
275 struct vnet *vp; in vnet_new() local
278 dev = alloc_etherdev_mqs(sizeof(*vp), VNET_MAX_TXQS, 1); in vnet_new()
288 vp = netdev_priv(dev); in vnet_new()
290 spin_lock_init(&vp->lock); in vnet_new()
291 vp->dev = dev; in vnet_new()
293 INIT_LIST_HEAD(&vp->port_list); in vnet_new()
295 INIT_HLIST_HEAD(&vp->port_hash[i]); in vnet_new()
296 INIT_LIST_HEAD(&vp->list); in vnet_new()
297 vp->local_mac = *local_mac; in vnet_new()
321 list_add(&vp->list, &vnet_list); in vnet_new()
323 return vp; in vnet_new()
334 struct vnet *iter, *vp; in vnet_find_or_create() local
337 vp = NULL; in vnet_find_or_create()
340 vp = iter; in vnet_find_or_create()
344 if (!vp) in vnet_find_or_create()
345 vp = vnet_new(local_mac, vdev); in vnet_find_or_create()
348 return vp; in vnet_find_or_create()
353 struct vnet *vp; in vnet_cleanup() local
358 vp = list_first_entry(&vnet_list, struct vnet, list); in vnet_cleanup()
359 list_del(&vp->list); in vnet_cleanup()
360 dev = vp->dev; in vnet_cleanup()
362 BUG_ON(!list_empty(&vp->port_list)); in vnet_cleanup()
416 struct vnet *vp; in vnet_port_probe() local
425 vp = vnet_find_parent(hp, vdev->mp, vdev); in vnet_port_probe()
426 if (IS_ERR(vp)) { in vnet_port_probe()
428 err = PTR_ERR(vp); in vnet_port_probe()
447 port->vp = vp; in vnet_port_probe()
451 &vnet_vio_ops, vp->dev->name); in vnet_port_probe()
459 netif_napi_add(port->vp->dev, &port->napi, sunvnet_poll_common); in vnet_port_probe()
471 spin_lock_irqsave(&vp->lock, flags); in vnet_port_probe()
473 list_add_rcu(&port->list, &vp->port_list); in vnet_port_probe()
475 list_add_tail_rcu(&port->list, &vp->port_list); in vnet_port_probe()
477 &vp->port_hash[vnet_hashfn(port->raddr)]); in vnet_port_probe()
479 spin_unlock_irqrestore(&vp->lock, flags); in vnet_port_probe()
484 vp->dev->name, port->raddr, switch_port ? " switch-port" : ""); in vnet_port_probe()