aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/loop.c
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-03-22 18:22:04 -0400
committerAndy Grover <andy.grover@oracle.com>2010-09-08 21:12:10 -0400
commit77dd550e5547846604ff6f90c4dc6bba4414e485 (patch)
treeea37afea7f0d857e01f214f703018426f6d8b920 /net/rds/loop.c
parente32b4a70495aac6a612e13f4c21db09dd756ff2c (diff)
RDS: Stop supporting old cong map sending method
We now ask the transport to give us a rm for the congestion map, and then we handle it normally. Previously, the transport defined a function that we would call to send a congestion map. Convert TCP and loop transports to new cong map method. Signed-off-by: Andy Grover <andy.grover@oracle.com>
Diffstat (limited to 'net/rds/loop.c')
-rw-r--r--net/rds/loop.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/net/rds/loop.c b/net/rds/loop.c
index 4a3dd49315b4..c390156b426f 100644
--- a/net/rds/loop.c
+++ b/net/rds/loop.c
@@ -61,6 +61,12 @@ static int rds_loop_xmit(struct rds_connection *conn, struct rds_message *rm,
61 unsigned int hdr_off, unsigned int sg, 61 unsigned int hdr_off, unsigned int sg,
62 unsigned int off) 62 unsigned int off)
63{ 63{
64 /* Do not send cong updates to loopback */
65 if (rm->m_inc.i_hdr.h_flags & RDS_FLAG_CONG_BITMAP) {
66 rds_cong_map_updated(conn->c_fcong, ~(u64) 0);
67 return sizeof(struct rds_header) + RDS_CONG_MAP_BYTES;
68 }
69
64 BUG_ON(hdr_off || sg || off); 70 BUG_ON(hdr_off || sg || off);
65 71
66 rds_inc_init(&rm->m_inc, conn, conn->c_laddr); 72 rds_inc_init(&rm->m_inc, conn, conn->c_laddr);
@@ -88,18 +94,6 @@ static void rds_loop_inc_free(struct rds_incoming *inc)
88 rds_message_put(rm); 94 rds_message_put(rm);
89} 95}
90 96
91static int rds_loop_xmit_cong_map(struct rds_connection *conn,
92 struct rds_cong_map *map,
93 unsigned long offset)
94{
95 BUG_ON(offset);
96 BUG_ON(map != conn->c_lcong);
97
98 rds_cong_map_updated(conn->c_fcong, ~(u64) 0);
99
100 return sizeof(struct rds_header) + RDS_CONG_MAP_BYTES;
101}
102
103/* we need to at least give the thread something to succeed */ 97/* we need to at least give the thread something to succeed */
104static int rds_loop_recv(struct rds_connection *conn) 98static int rds_loop_recv(struct rds_connection *conn)
105{ 99{
@@ -180,7 +174,6 @@ void rds_loop_exit(void)
180 */ 174 */
181struct rds_transport rds_loop_transport = { 175struct rds_transport rds_loop_transport = {
182 .xmit = rds_loop_xmit, 176 .xmit = rds_loop_xmit,
183 .xmit_cong_map = rds_loop_xmit_cong_map,
184 .recv = rds_loop_recv, 177 .recv = rds_loop_recv,
185 .conn_alloc = rds_loop_conn_alloc, 178 .conn_alloc = rds_loop_conn_alloc,
186 .conn_free = rds_loop_conn_free, 179 .conn_free = rds_loop_conn_free,