diff options
author | Andy Grover <andy.grover@oracle.com> | 2010-03-11 08:49:59 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-17 00:16:55 -0400 |
commit | 2e7b3b994529d4760231a45a6b88950187bda877 (patch) | |
tree | d073317ace5a9ef948a826aed32e8b35f21e2193 /net/rds/loop.c | |
parent | 8e82376e5f72bb576504c8c6117685e56c1b97db (diff) |
RDS: Fix congestion issues for loopback
We have two kinds of loopback: software (via loop transport)
and hardware (via IB). sw is used for 127.0.0.1, and doesn't
support rdma ops. hw is used for sends to local device IPs,
and supports rdma. Both are used in different cases.
For both of these, when there is a congestion map update, we
want to call rds_cong_map_updated() but not actually send
anything -- since loopback local and foreign congestion maps
point to the same spot, they're already in sync.
The old code never called sw loop's xmit_cong_map(),so
rds_cong_map_updated() wasn't being called for it. sw loop
ports would not work right with the congestion monitor.
Fixing that meant that hw loopback now would send congestion maps
to itself. This is also undesirable (racy), so we check for this
case in the ib-specific xmit code.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/loop.c')
-rw-r--r-- | net/rds/loop.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/net/rds/loop.c b/net/rds/loop.c index 4a61997f554d..93a45f1ce61f 100644 --- a/net/rds/loop.c +++ b/net/rds/loop.c | |||
@@ -80,16 +80,9 @@ static int rds_loop_xmit_cong_map(struct rds_connection *conn, | |||
80 | struct rds_cong_map *map, | 80 | struct rds_cong_map *map, |
81 | unsigned long offset) | 81 | unsigned long offset) |
82 | { | 82 | { |
83 | unsigned long i; | ||
84 | |||
85 | BUG_ON(offset); | 83 | BUG_ON(offset); |
86 | BUG_ON(map != conn->c_lcong); | 84 | BUG_ON(map != conn->c_lcong); |
87 | 85 | ||
88 | for (i = 0; i < RDS_CONG_MAP_PAGES; i++) { | ||
89 | memcpy((void *)conn->c_fcong->m_page_addrs[i], | ||
90 | (void *)map->m_page_addrs[i], PAGE_SIZE); | ||
91 | } | ||
92 | |||
93 | rds_cong_map_updated(conn->c_fcong, ~(u64) 0); | 86 | rds_cong_map_updated(conn->c_fcong, ~(u64) 0); |
94 | 87 | ||
95 | return sizeof(struct rds_header) + RDS_CONG_MAP_BYTES; | 88 | return sizeof(struct rds_header) + RDS_CONG_MAP_BYTES; |