]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: fix link notification skb size calculation to include vlan ranges
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Thu, 26 Feb 2015 07:55:40 +0000 (23:55 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Feb 2015 16:25:43 +0000 (11:25 -0500)
commit2693e5bebfd80da1529f5f63a9f4cc486b0c4b10
tree2240c310159853566c8916a6f324cb5f89ff342d
parent844bc12589f90503de072924e840a1e7e1fe36d1
bridge: fix link notification skb size calculation to include vlan ranges

my previous patch skipped vlan range optimizations during skb size
calculations for simplicity.

This incremental patch considers vlan ranges during
skb size calculations. This leads to a bit of code duplication
in the fill and size calculation functions. But, I could not find a
prettier way to do this. will take any suggestions.

Previously, I had reused the existing br_get_link_af_size size calculation
function to calculate skb size for notifications. Reusing it this time
around creates some change in behaviour issues for the usual
.get_link_af_size callback.

This patch adds a new br_get_link_af_size_filtered() function to
base the size calculation on the incoming filter flag and include
vlan ranges.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Reviewed-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_netlink.c