aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_input.c
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2017-02-07 08:46:46 -0800
committerDavid S. Miller <davem@davemloft.net>2017-02-07 14:16:05 -0500
commitca6d4480f87db9d9470d3d7bbe445953fa105e57 (patch)
treed72ac5c90c2b1ea913b528a7425db874d70c270c /net/bridge/br_input.c
parentspectrum: acl_tcam: Fix catchall prio value (diff)
downloadlinux-dev-ca6d4480f87db9d9470d3d7bbe445953fa105e57.tar.xz
linux-dev-ca6d4480f87db9d9470d3d7bbe445953fa105e57.zip
bridge: avoid unnecessary read of jiffies
Jiffies is volatile so read it once. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Acked-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, 4 insertions, 2 deletions
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index 220943f920d2..4615a9b3e26c 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -195,11 +195,13 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb
}
if (dst) {
+ unsigned long now = jiffies;
+
if (dst->is_local)
return br_pass_frame_up(skb);
- if (jiffies != dst->used)
- dst->used = jiffies;
+ if (now != dst->used)
+ dst->used = now;
br_forward(dst->dst, skb, local_rcv, false);
} else {
if (!mcast_hit)