Lines Matching refs:netdev

211 	struct net_device *netdev;  in nfp_tunnel_keep_alive()  local
234 netdev = nfp_app_dev_get(app, port, NULL); in nfp_tunnel_keep_alive()
235 if (!netdev) in nfp_tunnel_keep_alive()
238 n = neigh_lookup(&arp_tbl, &ipv4_addr, netdev); in nfp_tunnel_keep_alive()
253 struct net_device *netdev; in nfp_tunnel_keep_alive_v6() local
276 netdev = nfp_app_dev_get(app, port, NULL); in nfp_tunnel_keep_alive_v6()
277 if (!netdev) in nfp_tunnel_keep_alive_v6()
280 n = neigh_lookup(&nd_tbl, ipv6_add, netdev); in nfp_tunnel_keep_alive_v6()
466 nfp_tun_write_neigh(struct net_device *netdev, struct nfp_app *app, in nfp_tun_write_neigh() argument
480 port_id = nfp_flower_get_port_id_from_netdev(app, netdev); in nfp_tun_write_neigh()
486 nfp_flower_lag_get_info_from_netdev(app, netdev, &lag_info); in nfp_tun_write_neigh()
532 ether_addr_copy(common->src_addr, netdev->dev_addr); in nfp_tun_write_neigh()
533 neigh_ha_snapshot(common->dst_addr, neigh, netdev); in nfp_tun_write_neigh()
599 neigh_ha_snapshot(common->dst_addr, neigh, netdev); in nfp_tun_write_neigh()
753 struct net_device *netdev; in nfp_tunnel_request_route_v4() local
762 netdev = nfp_app_dev_get(app, be32_to_cpu(payload->ingress_port), NULL); in nfp_tunnel_request_route_v4()
763 if (!netdev) in nfp_tunnel_request_route_v4()
765 dev_hold(netdev); in nfp_tunnel_request_route_v4()
772 rt = ip_route_output_key(dev_net(netdev), &flow); in nfp_tunnel_request_route_v4()
789 dev_put(netdev); in nfp_tunnel_request_route_v4()
794 dev_put(netdev); in nfp_tunnel_request_route_v4()
801 struct net_device *netdev; in nfp_tunnel_request_route_v6() local
809 netdev = nfp_app_dev_get(app, be32_to_cpu(payload->ingress_port), NULL); in nfp_tunnel_request_route_v6()
810 if (!netdev) in nfp_tunnel_request_route_v6()
812 dev_hold(netdev); in nfp_tunnel_request_route_v6()
818 dst = ipv6_stub->ipv6_dst_lookup_flow(dev_net(netdev), NULL, &flow, in nfp_tunnel_request_route_v6()
834 dev_put(netdev); in nfp_tunnel_request_route_v6()
839 dev_put(netdev); in nfp_tunnel_request_route_v6()
1056 struct net_device *netdev, bool mod) in nfp_tunnel_offloaded_macs_inc_ref_and_link() argument
1058 if (nfp_netdev_is_nfp_repr(netdev)) { in nfp_tunnel_offloaded_macs_inc_ref_and_link()
1062 repr = netdev_priv(netdev); in nfp_tunnel_offloaded_macs_inc_ref_and_link()
1070 } else if (nfp_flower_is_supported_bridge(netdev)) { in nfp_tunnel_offloaded_macs_inc_ref_and_link()
1078 nfp_tunnel_add_shared_mac(struct nfp_app *app, struct net_device *netdev, in nfp_tunnel_add_shared_mac() argument
1086 entry = nfp_tunnel_lookup_offloaded_macs(app, netdev->dev_addr); in nfp_tunnel_add_shared_mac()
1087 if (entry && (nfp_tunnel_is_mac_idx_global(entry->index) || netif_is_lag_port(netdev))) { in nfp_tunnel_add_shared_mac()
1089 !nfp_flower_is_supported_bridge(netdev)) { in nfp_tunnel_add_shared_mac()
1091 netdev, mod); in nfp_tunnel_add_shared_mac()
1110 if (nfp_flower_is_supported_bridge(netdev)) in nfp_tunnel_add_shared_mac()
1126 ether_addr_copy(entry->addr, netdev->dev_addr); in nfp_tunnel_add_shared_mac()
1137 err = __nfp_tunnel_offload_mac(app, netdev->dev_addr, in nfp_tunnel_add_shared_mac()
1147 nfp_tunnel_offloaded_macs_inc_ref_and_link(entry, netdev, mod); in nfp_tunnel_add_shared_mac()
1164 nfp_tunnel_del_shared_mac(struct nfp_app *app, struct net_device *netdev, in nfp_tunnel_del_shared_mac() argument
1180 if (nfp_netdev_is_nfp_repr(netdev) && !mod) { in nfp_tunnel_del_shared_mac()
1181 repr = netdev_priv(netdev); in nfp_tunnel_del_shared_mac()
1186 if (nfp_flower_is_supported_bridge(netdev)) { in nfp_tunnel_del_shared_mac()
1194 netdev_name(netdev)); in nfp_tunnel_del_shared_mac()
1211 port = nfp_repr_get_port_id(repr->netdev); in nfp_tunnel_del_shared_mac()
1216 netdev_name(netdev)); in nfp_tunnel_del_shared_mac()
1233 if (nfp_flower_is_supported_bridge(netdev)) in nfp_tunnel_del_shared_mac()
1250 nfp_tunnel_offload_mac(struct nfp_app *app, struct net_device *netdev, in nfp_tunnel_offload_mac() argument
1258 if (nfp_netdev_is_nfp_repr(netdev)) { in nfp_tunnel_offload_mac()
1262 repr = netdev_priv(netdev); in nfp_tunnel_offload_mac()
1272 port = nfp_repr_get_port_id(netdev); in nfp_tunnel_offload_mac()
1275 } else if (nfp_fl_is_netdev_to_offload(netdev)) { in nfp_tunnel_offload_mac()
1276 nr_priv = nfp_flower_non_repr_priv_get(app, netdev); in nfp_tunnel_offload_mac()
1287 if (!is_valid_ether_addr(netdev->dev_addr)) { in nfp_tunnel_offload_mac()
1297 err = nfp_tunnel_add_shared_mac(app, netdev, port, false); in nfp_tunnel_offload_mac()
1305 ether_addr_copy(off_mac, netdev->dev_addr); in nfp_tunnel_offload_mac()
1317 err = nfp_tunnel_del_shared_mac(app, netdev, netdev->dev_addr, in nfp_tunnel_offload_mac()
1325 if (ether_addr_equal(netdev->dev_addr, off_mac)) in nfp_tunnel_offload_mac()
1328 err = nfp_tunnel_add_shared_mac(app, netdev, port, true); in nfp_tunnel_offload_mac()
1333 err = nfp_tunnel_del_shared_mac(app, netdev, off_mac, true); in nfp_tunnel_offload_mac()
1336 netdev_name(netdev)); in nfp_tunnel_offload_mac()
1338 ether_addr_copy(off_mac, netdev->dev_addr); in nfp_tunnel_offload_mac()
1358 struct net_device *netdev, in nfp_tunnel_mac_event_handler() argument
1364 err = nfp_tunnel_offload_mac(app, netdev, in nfp_tunnel_mac_event_handler()
1368 netdev_name(netdev)); in nfp_tunnel_mac_event_handler()
1370 err = nfp_tunnel_offload_mac(app, netdev, in nfp_tunnel_mac_event_handler()
1374 netdev_name(netdev)); in nfp_tunnel_mac_event_handler()
1377 if (!(netdev->flags & IFF_UP)) in nfp_tunnel_mac_event_handler()
1380 err = nfp_tunnel_offload_mac(app, netdev, in nfp_tunnel_mac_event_handler()
1384 netdev_name(netdev)); in nfp_tunnel_mac_event_handler()
1397 if (!nfp_netdev_is_nfp_repr(netdev) || in nfp_tunnel_mac_event_handler()
1401 repr = netdev_priv(netdev); in nfp_tunnel_mac_event_handler()
1408 if (nfp_tunnel_offload_mac(app, netdev, in nfp_tunnel_mac_event_handler()
1411 netdev_name(netdev)); in nfp_tunnel_mac_event_handler()
1416 if (!(netdev->flags & IFF_UP)) in nfp_tunnel_mac_event_handler()
1419 if (nfp_tunnel_offload_mac(app, netdev, in nfp_tunnel_mac_event_handler()
1422 netdev_name(netdev)); in nfp_tunnel_mac_event_handler()