Lines Matching refs:ndev
216 struct cxgbi_device *cxgbi_device_find_by_netdev(struct net_device *ndev, in cxgbi_device_find_by_netdev() argument
223 if (ndev->priv_flags & IFF_802_1Q_VLAN) { in cxgbi_device_find_by_netdev()
224 vdev = ndev; in cxgbi_device_find_by_netdev()
225 ndev = vlan_dev_real_dev(ndev); in cxgbi_device_find_by_netdev()
227 "vlan dev %s -> %s.\n", vdev->name, ndev->name); in cxgbi_device_find_by_netdev()
233 if (ndev == cdev->ports[i]) { in cxgbi_device_find_by_netdev()
244 "ndev 0x%p, %s, NO match found.\n", ndev, ndev->name); in cxgbi_device_find_by_netdev()
249 struct cxgbi_device *cxgbi_device_find_by_netdev_rcu(struct net_device *ndev, in cxgbi_device_find_by_netdev_rcu() argument
256 if (ndev->priv_flags & IFF_802_1Q_VLAN) { in cxgbi_device_find_by_netdev_rcu()
257 vdev = ndev; in cxgbi_device_find_by_netdev_rcu()
258 ndev = vlan_dev_real_dev(ndev); in cxgbi_device_find_by_netdev_rcu()
259 pr_info("vlan dev %s -> %s.\n", vdev->name, ndev->name); in cxgbi_device_find_by_netdev_rcu()
265 if (ndev == cdev->ports[i]) { in cxgbi_device_find_by_netdev_rcu()
277 "ndev 0x%p, %s, NO match found.\n", ndev, ndev->name); in cxgbi_device_find_by_netdev_rcu()
283 static struct cxgbi_device *cxgbi_device_find_by_mac(struct net_device *ndev, in cxgbi_device_find_by_mac() argument
290 if (ndev->priv_flags & IFF_802_1Q_VLAN) { in cxgbi_device_find_by_mac()
291 vdev = ndev; in cxgbi_device_find_by_mac()
292 ndev = vlan_dev_real_dev(ndev); in cxgbi_device_find_by_mac()
293 pr_info("vlan dev %s -> %s.\n", vdev->name, ndev->name); in cxgbi_device_find_by_mac()
299 if (!memcmp(ndev->dev_addr, cdev->ports[i]->dev_addr, in cxgbi_device_find_by_mac()
312 ndev, ndev->name); in cxgbi_device_find_by_mac()
364 chba->ndev = cdev->ports[i]; in cxgbi_hbas_add()
601 struct net_device *ndev; in cxgbi_check_route() local
625 ndev = n->dev; in cxgbi_check_route()
630 ndev->name); in cxgbi_check_route()
635 if (ndev->flags & IFF_LOOPBACK) { in cxgbi_check_route()
636 ndev = ip_dev_find(&init_net, daddr->sin_addr.s_addr); in cxgbi_check_route()
637 mtu = ndev->mtu; in cxgbi_check_route()
639 n->dev->name, ndev->name, mtu); in cxgbi_check_route()
642 cdev = cxgbi_device_find_by_netdev(ndev, &port); in cxgbi_check_route()
645 &daddr->sin_addr.s_addr, ndev->name); in cxgbi_check_route()
652 port, ndev->name, cdev); in cxgbi_check_route()
702 struct net_device *ndev; in cxgbi_check_route6() local
733 ndev = n->dev; in cxgbi_check_route6()
738 ntohs(daddr6->sin6_port), ndev->name); in cxgbi_check_route6()
743 cdev = cxgbi_device_find_by_netdev(ndev, &port); in cxgbi_check_route6()
745 cdev = cxgbi_device_find_by_mac(ndev, &port); in cxgbi_check_route6()
748 daddr6->sin6_addr.s6_addr, ndev->name); in cxgbi_check_route6()
755 ndev->name, cdev); in cxgbi_check_route6()
2118 struct net_device *ndev = cdev->ports[csk->port_id]; in cxgbi_conn_alloc_pdu() local
2119 ndev->stats.tx_dropped++; in cxgbi_conn_alloc_pdu()
2631 if (!chba->ndev) { in cxgbi_set_host_param()
2639 shost, chba, chba->ndev->name, param, buflen, buf); in cxgbi_set_host_param()
2646 "hba %s, req. ipv4 %pI4.\n", chba->ndev->name, &addr); in cxgbi_set_host_param()
2665 if (!chba->ndev) { in cxgbi_get_host_param()
2673 shost, chba, chba->ndev->name, param); in cxgbi_get_host_param()
2677 len = sysfs_format_mac(buf, chba->ndev->dev_addr, 6); in cxgbi_get_host_param()
2680 len = sprintf(buf, "%s\n", chba->ndev->name); in cxgbi_get_host_param()
2691 "hba %s, addr %s.\n", chba->ndev->name, buf); in cxgbi_get_host_param()
2780 ep, cep, csk, hba, hba->ndev->name); in cxgbi_ep_connect()