diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2022-03-16 22:41:43 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-03-17 17:42:47 -0700 |
commit | 0148bb50b8fd51baf357de8b237c0c6011506540 (patch) | |
tree | 9bb4fc4924c8f73682e88daab91322935de7f012 /net/dsa | |
parent | f2a0e216bee5d95e2c2d916a8815a659cd3703c2 (diff) | |
download | linux-stable-0148bb50b8fd51baf357de8b237c0c6011506540.tar.gz linux-stable-0148bb50b8fd51baf357de8b237c0c6011506540.tar.bz2 linux-stable-0148bb50b8fd51baf357de8b237c0c6011506540.zip |
net: dsa: pass extack to dsa_switch_ops :: port_mirror_add()
Drivers might have error messages to propagate to user space, most
common being that they support a single mirror port.
Propagate the netlink extack so that they can inform user space in a
verbal way of their limitations.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/slave.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 54e5447c86a8..d1a3be158d8d 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -1173,6 +1173,7 @@ dsa_slave_add_cls_matchall_mirred(struct net_device *dev, struct tc_cls_matchall_offload *cls, bool ingress) { + struct netlink_ext_ack *extack = cls->common.extack; struct dsa_port *dp = dsa_slave_to_port(dev); struct dsa_slave_priv *p = netdev_priv(dev); struct dsa_mall_mirror_tc_entry *mirror; @@ -1210,7 +1211,7 @@ dsa_slave_add_cls_matchall_mirred(struct net_device *dev, mirror->to_local_port = to_dp->index; mirror->ingress = ingress; - err = ds->ops->port_mirror_add(ds, dp->index, mirror, ingress); + err = ds->ops->port_mirror_add(ds, dp->index, mirror, ingress, extack); if (err) { kfree(mall_tc_entry); return err; |