net: bridge: extend the process of special frames
authorHenrik Bjoernlund <henrik.bjoernlund@microchip.com>
Tue, 27 Oct 2020 10:02:42 +0000 (10:02 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 30 Oct 2020 01:39:43 +0000 (18:39 -0700)
commit90c628dd47ff4178f645b34938470bf43d02d123
tree80bf540861d85c147f34e617b2e1499c2a7ea934
parentae8a6e6e881880012705ae114a180592b88b3cfb
net: bridge: extend the process of special frames

This patch extends the processing of frames in the bridge. Currently MRP
frames needs special processing and the current implementation doesn't
allow a nice way to process different frame types. Therefore try to
improve this by adding a list that contains frame types that need
special processing. This list is iterated for each input frame and if
there is a match based on frame type then these functions will be called
and decide what to do with the frame. It can process the frame then the
bridge doesn't need to do anything or don't process so then the bridge
will do normal forwarding.

Signed-off-by: Henrik Bjoernlund <henrik.bjoernlund@microchip.com>
Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/bridge/br_device.c
net/bridge/br_input.c
net/bridge/br_mrp.c
net/bridge/br_private.h