diff options
author | John Fastabend <john.r.fastabend@intel.com> | 2012-04-15 06:44:02 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-15 13:06:04 -0400 |
commit | 12a94634453c61fd9a11c4702002e3db6d4feb70 (patch) | |
tree | 1131fded53fdab8b912cd14d8240def52166d2f2 /include | |
parent | 77162022ab26a1f99d3af30c03760a76f86e193d (diff) | |
download | linux-3.10-12a94634453c61fd9a11c4702002e3db6d4feb70.tar.gz linux-3.10-12a94634453c61fd9a11c4702002e3db6d4feb70.tar.bz2 linux-3.10-12a94634453c61fd9a11c4702002e3db6d4feb70.zip |
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')
-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 100c48cca4f..e0b70e961e6 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -2569,6 +2569,7 @@ extern int dev_addr_init(struct net_device *dev); /* Functions used for unicast addresses handling */ extern int dev_uc_add(struct net_device *dev, unsigned char *addr); +extern int dev_uc_add_excl(struct net_device *dev, unsigned char *addr); extern int dev_uc_del(struct net_device *dev, unsigned char *addr); extern int dev_uc_sync(struct net_device *to, struct net_device *from); 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); /* Functions used for multicast addresses handling */ extern int dev_mc_add(struct net_device *dev, unsigned char *addr); extern int dev_mc_add_global(struct net_device *dev, unsigned char *addr); +extern int dev_mc_add_excl(struct net_device *dev, unsigned char *addr); extern int dev_mc_del(struct net_device *dev, unsigned char *addr); extern int dev_mc_del_global(struct net_device *dev, unsigned char *addr); extern int dev_mc_sync(struct net_device *to, struct net_device *from); |