Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: add dev arg to ndo_neigh_construct/destroy

As the following patch will allow upper devices to follow the call down
lower devices, we need to add dev here and not rely on n->dev.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jiri Pirko and committed by
David S. Miller
503eebc2 9046a745

+10 -7
+2 -1
drivers/net/ethernet/rocker/rocker_main.c
··· 1996 1996 return 0; 1997 1997 } 1998 1998 1999 - static void rocker_port_neigh_destroy(struct neighbour *n) 1999 + static void rocker_port_neigh_destroy(struct net_device *dev, 2000 + struct neighbour *n) 2000 2001 { 2001 2002 struct rocker_port *rocker_port = netdev_priv(n->dev); 2002 2003 int err;
+4 -2
include/linux/netdevice.h
··· 1209 1209 netdev_features_t features); 1210 1210 int (*ndo_set_features)(struct net_device *dev, 1211 1211 netdev_features_t features); 1212 - int (*ndo_neigh_construct)(struct neighbour *n); 1213 - void (*ndo_neigh_destroy)(struct neighbour *n); 1212 + int (*ndo_neigh_construct)(struct net_device *dev, 1213 + struct neighbour *n); 1214 + void (*ndo_neigh_destroy)(struct net_device *dev, 1215 + struct neighbour *n); 1214 1216 1215 1217 int (*ndo_fdb_add)(struct ndmsg *ndm, 1216 1218 struct nlattr *tb[],
+1 -1
net/atm/clip.c
··· 286 286 .connected_output = neigh_direct_output, 287 287 }; 288 288 289 - static int clip_constructor(struct neighbour *neigh) 289 + static int clip_constructor(struct net_device *dev, struct neighbour *neigh) 290 290 { 291 291 struct atmarp_entry *entry = neighbour_priv(neigh); 292 292
+2 -2
net/core/neighbour.c
··· 473 473 } 474 474 475 475 if (dev->netdev_ops->ndo_neigh_construct) { 476 - error = dev->netdev_ops->ndo_neigh_construct(n); 476 + error = dev->netdev_ops->ndo_neigh_construct(dev, n); 477 477 if (error < 0) { 478 478 rc = ERR_PTR(error); 479 479 goto out_neigh_release; ··· 701 701 neigh->arp_queue_len_bytes = 0; 702 702 703 703 if (dev->netdev_ops->ndo_neigh_destroy) 704 - dev->netdev_ops->ndo_neigh_destroy(neigh); 704 + dev->netdev_ops->ndo_neigh_destroy(dev, neigh); 705 705 706 706 dev_put(dev); 707 707 neigh_parms_put(neigh->parms);
+1 -1
net/ieee802154/6lowpan/core.c
··· 81 81 return 0; 82 82 } 83 83 84 - static int lowpan_neigh_construct(struct neighbour *n) 84 + static int lowpan_neigh_construct(struct net_device *dev, struct neighbour *n) 85 85 { 86 86 struct lowpan_802154_neigh *neigh = lowpan_802154_neigh(neighbour_priv(n)); 87 87