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

netlink: add attributes to fdb interface

Later changes need to be able to refer to neighbour attributes
when doing fdb_add.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

stephen hemminger and committed by
David S. Miller
edc7d573 de0a4148

+12 -7
+1 -1
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
··· 6889 6889 return 0; 6890 6890 } 6891 6891 6892 - static int ixgbe_ndo_fdb_add(struct ndmsg *ndm, 6892 + static int ixgbe_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], 6893 6893 struct net_device *dev, 6894 6894 const unsigned char *addr, 6895 6895 u16 flags)
+1 -1
drivers/net/macvlan.c
··· 546 546 return 0; 547 547 } 548 548 549 - static int macvlan_fdb_add(struct ndmsg *ndm, 549 + static int macvlan_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], 550 550 struct net_device *dev, 551 551 const unsigned char *addr, 552 552 u16 flags)
+3 -1
include/linux/netdevice.h
··· 904 904 * feature set might be less than what was returned by ndo_fix_features()). 905 905 * Must return >0 or -errno if it changed dev->features itself. 906 906 * 907 - * int (*ndo_fdb_add)(struct ndmsg *ndm, struct net_device *dev, 907 + * int (*ndo_fdb_add)(struct ndmsg *ndm, struct nlattr *tb[], 908 + * struct net_device *dev, 908 909 * const unsigned char *addr, u16 flags) 909 910 * Adds an FDB entry to dev for addr. 910 911 * int (*ndo_fdb_del)(struct ndmsg *ndm, struct net_device *dev, ··· 1015 1014 void (*ndo_neigh_destroy)(struct neighbour *n); 1016 1015 1017 1016 int (*ndo_fdb_add)(struct ndmsg *ndm, 1017 + struct nlattr *tb[], 1018 1018 struct net_device *dev, 1019 1019 const unsigned char *addr, 1020 1020 u16 flags);
+2 -1
net/bridge/br_fdb.c
··· 608 608 } 609 609 610 610 /* Add new permanent fdb entry with RTM_NEWNEIGH */ 611 - int br_fdb_add(struct ndmsg *ndm, struct net_device *dev, 611 + int br_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], 612 + struct net_device *dev, 612 613 const unsigned char *addr, u16 nlh_flags) 613 614 { 614 615 struct net_bridge_port *p;
+1 -1
net/bridge/br_private.h
··· 364 364 extern int br_fdb_delete(struct ndmsg *ndm, 365 365 struct net_device *dev, 366 366 const unsigned char *addr); 367 - extern int br_fdb_add(struct ndmsg *nlh, 367 + extern int br_fdb_add(struct ndmsg *nlh, struct nlattr *tb[], 368 368 struct net_device *dev, 369 369 const unsigned char *addr, 370 370 u16 nlh_flags);
+4 -2
net/core/rtnetlink.c
··· 2090 2090 if ((!ndm->ndm_flags || ndm->ndm_flags & NTF_MASTER) && 2091 2091 (dev->priv_flags & IFF_BRIDGE_PORT)) { 2092 2092 master = dev->master; 2093 - err = master->netdev_ops->ndo_fdb_add(ndm, dev, addr, 2093 + err = master->netdev_ops->ndo_fdb_add(ndm, tb, 2094 + dev, addr, 2094 2095 nlh->nlmsg_flags); 2095 2096 if (err) 2096 2097 goto out; ··· 2101 2100 2102 2101 /* Embedded bridge, macvlan, and any other device support */ 2103 2102 if ((ndm->ndm_flags & NTF_SELF) && dev->netdev_ops->ndo_fdb_add) { 2104 - err = dev->netdev_ops->ndo_fdb_add(ndm, dev, addr, 2103 + err = dev->netdev_ops->ndo_fdb_add(ndm, tb, 2104 + dev, addr, 2105 2105 nlh->nlmsg_flags); 2106 2106 2107 2107 if (!err) {