<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/bridge, branch v5.12-rc4</title>
<subtitle>Linux Kernel (branches are rebased on master from time to time)</subtitle>
<id>https://sre.ring0.de/linux/atom?h=v5.12-rc4</id>
<link rel='self' href='https://sre.ring0.de/linux/atom?h=v5.12-rc4'/>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/'/>
<updated>2021-02-16T22:47:46Z</updated>
<entry>
<title>bridge: mrp: Update br_mrp to use new return values of br_mrp_switchdev</title>
<updated>2021-02-16T22:47:46Z</updated>
<author>
<name>Horatiu Vultur</name>
<email>horatiu.vultur@microchip.com</email>
</author>
<published>2021-02-16T21:42:02Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=cd605d455a445837edb3372addbdd9a9e38df23b'/>
<id>urn:sha1:cd605d455a445837edb3372addbdd9a9e38df23b</id>
<content type='text'>
Check the return values of the br_mrp_switchdev function.
In case of:
- BR_MRP_NONE, return the error to userspace,
- BR_MRP_SW, continue with SW implementation,
- BR_MRP_HW, continue without SW implementation,

Signed-off-by: Horatiu Vultur &lt;horatiu.vultur@microchip.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: mrp: Extend br_mrp_switchdev to detect better the errors</title>
<updated>2021-02-16T22:47:46Z</updated>
<author>
<name>Horatiu Vultur</name>
<email>horatiu.vultur@microchip.com</email>
</author>
<published>2021-02-16T21:42:01Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=1a3ddb0b751604215630ca121c090d57e8c68169'/>
<id>urn:sha1:1a3ddb0b751604215630ca121c090d57e8c68169</id>
<content type='text'>
This patch extends the br_mrp_switchdev functions to be able to have a
better understanding what cause the issue and if the SW needs to be used
as a backup.

There are the following cases:
- when the code is compiled without CONFIG_NET_SWITCHDEV. In this case
  return success so the SW can continue with the protocol. Depending
  on the function, it returns 0 or BR_MRP_SW.
- when code is compiled with CONFIG_NET_SWITCHDEV and the driver doesn't
  implement any MRP callbacks. In this case the HW can't run MRP so it
  just returns -EOPNOTSUPP. So the SW will stop further to configure the
  node.
- when code is compiled with CONFIG_NET_SWITCHDEV and the driver fully
  supports any MRP functionality. In this case the SW doesn't need to do
  anything. The functions will return 0 or BR_MRP_HW.
- when code is compiled with CONFIG_NET_SWITCHDEV and the HW can't run
  completely the protocol but it can help the SW to run it. For
  example, the HW can't support completely MRM role(can't detect when it
  stops receiving MRP Test frames) but it can redirect these frames to
  CPU. In this case it is possible to have a SW fallback. The SW will
  try initially to call the driver with sw_backup set to false, meaning
  that the HW should implement completely the role. If the driver returns
  -EOPNOTSUPP, the SW will try again with sw_backup set to false,
  meaning that the SW will detect when it stops receiving the frames but
  it needs HW support to redirect the frames to CPU. In case the driver
  returns 0 then the SW will continue to configure the node accordingly.

Signed-off-by: Horatiu Vultur &lt;horatiu.vultur@microchip.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: mrp: Add 'enum br_mrp_hw_support'</title>
<updated>2021-02-16T22:47:46Z</updated>
<author>
<name>Horatiu Vultur</name>
<email>horatiu.vultur@microchip.com</email>
</author>
<published>2021-02-16T21:42:00Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=e1bd99d07e6171ea09b72b13615e0cb25132eefd'/>
<id>urn:sha1:e1bd99d07e6171ea09b72b13615e0cb25132eefd</id>
<content type='text'>
Add the enum br_mrp_hw_support that is used by the br_mrp_switchdev
functions to allow the SW to detect the cases where HW can't implement
the functionality or when SW is used as a backup.

Signed-off-by: Horatiu Vultur &lt;horatiu.vultur@microchip.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: bridge: fix br_vlan_filter_toggle stub when CONFIG_BRIDGE_VLAN_FILTERING=n</title>
<updated>2021-02-15T21:15:10Z</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2021-02-15T21:09:12Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=c97f47e3c198bf442ef63abdccc48f7c5f85945f'/>
<id>urn:sha1:c97f47e3c198bf442ef63abdccc48f7c5f85945f</id>
<content type='text'>
The prototype of br_vlan_filter_toggle was updated to include a netlink
extack, but the stub definition wasn't, which results in a build error
when CONFIG_BRIDGE_VLAN_FILTERING=n.

Fixes: 9e781401cbfc ("net: bridge: propagate extack through store_bridge_parm")
Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: bridge: propagate extack through switchdev_port_attr_set</title>
<updated>2021-02-15T01:38:11Z</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2021-02-13T20:43:17Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=dcbdf1350e3312c199dbc6a76f41cf8f67e8c09c'/>
<id>urn:sha1:dcbdf1350e3312c199dbc6a76f41cf8f67e8c09c</id>
<content type='text'>
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 &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: bridge: propagate extack through store_bridge_parm</title>
<updated>2021-02-15T01:38:11Z</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2021-02-13T20:43:16Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=9e781401cbfcd83c4d766b4c6c5efce8348d4d13'/>
<id>urn:sha1:9e781401cbfcd83c4d766b4c6c5efce8348d4d13</id>
<content type='text'>
The bridge sysfs interface stores parameters for the STP, VLAN,
multicast etc subsystems using a predefined function prototype.
Sometimes the underlying function being called supports a netlink
extended ack message, and we ignore it.

Let's expand the store_bridge_parm function prototype to include the
extack, and just print it to console, but at least propagate it where
applicable. Where not applicable, create a shim function in the
br_sysfs_br.c file that discards the extra function argument.

This patch allows us to propagate the extack argument to
br_vlan_set_default_pvid, br_vlan_set_proto and br_vlan_filter_toggle,
and from there, further up in br_changelink from br_netlink.c.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: bridge: remove __br_vlan_filter_toggle</title>
<updated>2021-02-15T01:38:11Z</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2021-02-13T20:43:15Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=7a572964e0c454b0ead57174c964bd7a2d498455'/>
<id>urn:sha1:7a572964e0c454b0ead57174c964bd7a2d498455</id>
<content type='text'>
This function is identical with br_vlan_filter_toggle.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Acked-by: Nikolay Aleksandrov &lt;nikolay@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: switchdev: pass flags and mask to both {PRE_,}BRIDGE_FLAGS attributes</title>
<updated>2021-02-13T01:08:04Z</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2021-02-12T15:15:55Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=e18f4c18ab5b0dd47caaf8377c2e36d66f632a8c'/>
<id>urn:sha1:e18f4c18ab5b0dd47caaf8377c2e36d66f632a8c</id>
<content type='text'>
This switchdev attribute offers a counterproductive API for a driver
writer, because although br_switchdev_set_port_flag gets passed a
"flags" and a "mask", those are passed piecemeal to the driver, so while
the PRE_BRIDGE_FLAGS listener knows what changed because it has the
"mask", the BRIDGE_FLAGS listener doesn't, because it only has the final
value. But certain drivers can offload only certain combinations of
settings, like for example they cannot change unicast flooding
independently of multicast flooding - they must be both on or both off.
The way the information is passed to switchdev makes drivers not
expressive enough, and unable to reject this request ahead of time, in
the PRE_BRIDGE_FLAGS notifier, so they are forced to reject it during
the deferred BRIDGE_FLAGS attribute, where the rejection is currently
ignored.

This patch also changes drivers to make use of the "mask" field for edge
detection when possible.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: bridge: don't print in br_switchdev_set_port_flag</title>
<updated>2021-02-13T01:08:04Z</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2021-02-12T15:15:53Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=078bbb851ea6c1dbc95da272daf0a68b06a3c164'/>
<id>urn:sha1:078bbb851ea6c1dbc95da272daf0a68b06a3c164</id>
<content type='text'>
For the netlink interface, propagate errors through extack rather than
simply printing them to the console. For the sysfs interface, we still
print to the console, but at least that's one layer higher than in
switchdev, which also allows us to silently ignore the offloading of
flags if that is ever needed in the future.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Acked-by: Nikolay Aleksandrov &lt;nikolay@nvidia.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: bridge: offload all port flags at once in br_setport</title>
<updated>2021-02-13T01:08:04Z</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2021-02-12T15:15:52Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=304ae3bf1c1abe66faece2040a5525392ea49f68'/>
<id>urn:sha1:304ae3bf1c1abe66faece2040a5525392ea49f68</id>
<content type='text'>
If for example this command:

ip link set swp0 type bridge_slave flood off mcast_flood off learning off

succeeded at configuring BR_FLOOD and BR_MCAST_FLOOD but not at
BR_LEARNING, there would be no attempt to revert the partial state in
any way. Arguably, if the user changes more than one flag through the
same netlink command, this one _should_ be all or nothing, which means
it should be passed through switchdev as all or nothing.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Acked-by: Nikolay Aleksandrov &lt;nikolay@nvidia.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
