diff options
author | John Fastabend <john.r.fastabend@intel.com> | 2012-04-15 02:44:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-15 13:06:04 -0400 |
commit | 12a94634453c61fd9a11c4702002e3db6d4feb70 (patch) | |
tree | 1131fded53fdab8b912cd14d8240def52166d2f2 /include/linux/netdevice.h | |
parent | 77162022ab26a1f99d3af30c03760a76f86e193d (diff) |
net: addr_list: add exclusive dev_uc_add and dev_mc_add
This adds a dev_uc_add_excl() and dev_mc_add_excl() calls
similar to the original dev_{uc|mc}_add() except it sets
the global bit and returns -EEXIST for duplicat entires.
This is useful for drivers that support SR-IOV, macvlan
devices and any other devices that need to manage the
unicast and multicast lists.
v2: fix typo UNICAST should be MULTICAST in dev_mc_add_excl()
CC: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 100c48cca4fd..e0b70e961e61 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -2569,6 +2569,7 @@ extern int dev_addr_init(struct net_device *dev); | |||
2569 | 2569 | ||
2570 | /* Functions used for unicast addresses handling */ | 2570 | /* Functions used for unicast addresses handling */ |
2571 | extern int dev_uc_add(struct net_device *dev, unsigned char *addr); | 2571 | extern int dev_uc_add(struct net_device *dev, unsigned char *addr); |
2572 | extern int dev_uc_add_excl(struct net_device *dev, unsigned char *addr); | ||
2572 | extern int dev_uc_del(struct net_device *dev, unsigned char *addr); | 2573 | extern int dev_uc_del(struct net_device *dev, unsigned char *addr); |
2573 | extern int dev_uc_sync(struct net_device *to, struct net_device *from); | 2574 | extern int dev_uc_sync(struct net_device *to, struct net_device *from); |
2574 | extern void dev_uc_unsync(struct net_device *to, struct net_device *from); | 2575 | extern void dev_uc_unsync(struct net_device *to, struct net_device *from); |
@@ -2578,6 +2579,7 @@ extern void dev_uc_init(struct net_device *dev); | |||
2578 | /* Functions used for multicast addresses handling */ | 2579 | /* Functions used for multicast addresses handling */ |
2579 | extern int dev_mc_add(struct net_device *dev, unsigned char *addr); | 2580 | extern int dev_mc_add(struct net_device *dev, unsigned char *addr); |
2580 | extern int dev_mc_add_global(struct net_device *dev, unsigned char *addr); | 2581 | extern int dev_mc_add_global(struct net_device *dev, unsigned char *addr); |
2582 | extern int dev_mc_add_excl(struct net_device *dev, unsigned char *addr); | ||
2581 | extern int dev_mc_del(struct net_device *dev, unsigned char *addr); | 2583 | extern int dev_mc_del(struct net_device *dev, unsigned char *addr); |
2582 | extern int dev_mc_del_global(struct net_device *dev, unsigned char *addr); | 2584 | extern int dev_mc_del_global(struct net_device *dev, unsigned char *addr); |
2583 | extern int dev_mc_sync(struct net_device *to, struct net_device *from); | 2585 | extern int dev_mc_sync(struct net_device *to, struct net_device *from); |