summaryrefslogtreecommitdiffstats
path: root/net/tipc/bearer.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2010-05-11 14:30:16 +0000
committerDavid S. Miller <davem@davemloft.net>2010-05-12 23:02:28 -0700
commitb274f4ab8e674db1757371a21e7217e0766cb574 (patch)
treefec9504a6f3e617c4df0f0281067e68a72464949 /net/tipc/bearer.c
parent43608edc2dbe83057544cf76b765ecdf63d59e8c (diff)
downloadblackbird-op-linux-b274f4ab8e674db1757371a21e7217e0766cb574.tar.gz
blackbird-op-linux-b274f4ab8e674db1757371a21e7217e0766cb574.zip
tipc: Reduce footprint by un-inlining bearer congestion routine
Convert bearer congestion inline routine that is more than one line into a standard function, thereby eliminating some repeated code. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bearer.c')
-rw-r--r--net/tipc/bearer.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index ccec12f0ccc9..52ae17b2583e 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -467,6 +467,18 @@ int tipc_bearer_resolve_congestion(struct bearer *b_ptr, struct link *l_ptr)
return res;
}
+/**
+ * tipc_bearer_congested - determines if bearer is currently congested
+ */
+
+int tipc_bearer_congested(struct bearer *b_ptr, struct link *l_ptr)
+{
+ if (unlikely(b_ptr->publ.blocked))
+ return 1;
+ if (likely(list_empty(&b_ptr->cong_links)))
+ return 0;
+ return !tipc_bearer_resolve_congestion(b_ptr, l_ptr);
+}
/**
* tipc_enable_bearer - enable bearer with the given name
OpenPOWER on IntegriCloud