mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
net: bridge: propagate extack through switchdev_port_attr_set
The benefit is the ability to propagate errors from switchdev drivers for the SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING and SWITCHDEV_ATTR_ID_BRIDGE_VLAN_PROTOCOL attributes. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
9e781401cb
commit
dcbdf1350e
@@ -96,9 +96,11 @@ int br_switchdev_set_port_flag(struct net_bridge_port *p,
|
||||
attr.id = SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS;
|
||||
attr.flags = SWITCHDEV_F_DEFER;
|
||||
|
||||
err = switchdev_port_attr_set(p->dev, &attr);
|
||||
err = switchdev_port_attr_set(p->dev, &attr, extack);
|
||||
if (err) {
|
||||
NL_SET_ERR_MSG_MOD(extack, "error setting offload flag on port");
|
||||
if (extack && !extack->_msg)
|
||||
NL_SET_ERR_MSG_MOD(extack,
|
||||
"error setting offload flag on port");
|
||||
return err;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user