aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2019-01-16 23:06:50 +0000
committerDavid S. Miller <davem@davemloft.net>2019-01-17 15:18:47 -0800
commit87b0984ebfabafcfe959e52ca5cdab5eeb2d60c0 (patch)
tree154b5fde142fd02c6988e312a51db549a5b9bb45 /net/dsa
parentvxlan: changelink: Delete remote after update (diff)
downloadlinux-dev-87b0984ebfabafcfe959e52ca5cdab5eeb2d60c0.tar.xz
linux-dev-87b0984ebfabafcfe959e52ca5cdab5eeb2d60c0.zip
net: Add extack argument to ndo_fdb_add()
Drivers may not be able to support certain FDB entries, and an error code is insufficient to give clear hints as to the reasons of rejection. In order to make it possible to communicate the rejection reason, extend ndo_fdb_add() with an extack argument. Adapt the existing implementations of ndo_fdb_add() to take the parameter (and ignore it). Pass the extack parameter when invoking ndo_fdb_add() from rtnl_fdb_add(). Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/dsa_priv.h3
-rw-r--r--net/dsa/slave.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index 026a05774bf7..1f4972dab9f2 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -103,7 +103,8 @@ static inline void dsa_legacy_unregister(void) { }
int dsa_legacy_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
struct net_device *dev,
const unsigned char *addr, u16 vid,
- u16 flags);
+ u16 flags,
+ struct netlink_ext_ack *extack);
int dsa_legacy_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
struct net_device *dev,
const unsigned char *addr, u16 vid);
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index a3fcc1d01615..d5680a98a7f0 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -1009,7 +1009,8 @@ static const struct ethtool_ops dsa_slave_ethtool_ops = {
int dsa_legacy_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
struct net_device *dev,
const unsigned char *addr, u16 vid,
- u16 flags)
+ u16 flags,
+ struct netlink_ext_ack *extack)
{
struct dsa_port *dp = dsa_slave_to_port(dev);