aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_input.c
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2016-07-14 06:10:02 +0300
committerDavid S. Miller <davem@davemloft.net>2016-07-16 19:57:38 -0700
commit37b090e6be2dc98ccb55bb663931546282abf2e8 (patch)
tree62c6e3dddb08ece908deb37163613ffd7204ef3f /net/bridge/br_input.c
parentnet: bridge: drop skb2/skb0 variables and use a local_rcv boolean (diff)
downloadlinux-dev-37b090e6be2dc98ccb55bb663931546282abf2e8.tar.xz
linux-dev-37b090e6be2dc98ccb55bb663931546282abf2e8.zip
net: bridge: remove _deliver functions and consolidate forward code
Before this patch we had two flavors of most forwarding functions - _forward and _deliver, the difference being that the latter are used when the packets are locally originated. Instead of all this function pointer passing and code duplication, we can just pass a boolean noting that the packet was locally originated and use that to perform the necessary checks in __br_forward. This gives a minor performance improvement but more importantly consolidates the forwarding paths. Also add a kernel doc comment to explain the exported br_forward()'s arguments. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_input.c')
-rw-r--r--net/bridge/br_input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index dd8885def11b..8b08eec763a5 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -189,12 +189,12 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb
if (dst) {
dst->used = jiffies;
- br_forward(dst->dst, skb, local_rcv);
+ br_forward(dst->dst, skb, local_rcv, false);
} else {
if (!mcast_hit)
- br_flood_forward(br, skb, local_rcv, unicast);
+ br_flood(br, skb, unicast, local_rcv, false);
else
- br_multicast_forward(mdst, skb, local_rcv);
+ br_multicast_flood(mdst, skb, local_rcv, false);
}
if (local_rcv)