Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195032
b: refs/heads/master
c: b274f4a
h: refs/heads/master
v: v3
  • Loading branch information
Allan Stephens authored and David S. Miller committed May 13, 2010
1 parent d89ac12 commit bfb71b9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 43608edc2dbe83057544cf76b765ecdf63d59e8c
refs/heads/master: b274f4ab8e674db1757371a21e7217e0766cb574
12 changes: 12 additions & 0 deletions trunk/net/tipc/bearer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 2 additions & 14 deletions trunk/net/tipc/bearer.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ void tipc_bearer_remove_dest(struct bearer *b_ptr, u32 dest);
void tipc_bearer_schedule(struct bearer *b_ptr, struct link *l_ptr);
struct bearer *tipc_bearer_find_interface(const char *if_name);
int tipc_bearer_resolve_congestion(struct bearer *b_ptr, struct link *l_ptr);
int tipc_bearer_congested(struct bearer *b_ptr, struct link *l_ptr);
int tipc_bearer_init(void);
void tipc_bearer_stop(void);
void tipc_bearer_lock_push(struct bearer *b_ptr);
Expand Down Expand Up @@ -154,17 +155,4 @@ static inline int tipc_bearer_send(struct bearer *b_ptr, struct sk_buff *buf,
return !b_ptr->media->send_msg(buf, &b_ptr->publ, dest);
}

/**
* tipc_bearer_congested - determines if bearer is currently congested
*/

static inline 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);
}

#endif
#endif /* _TIPC_BEARER_H */

0 comments on commit bfb71b9

Please sign in to comment.