Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233885
b: refs/heads/master
c: 6094628
h: refs/heads/master
i:
  233883: 6bba1de
v: v3
  • Loading branch information
Neil Horman authored and David S. Miller committed Mar 8, 2011
1 parent c5cf19d commit 645df16
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 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: 9ac3524a948cab48137a8b40a4fa8ae1092b0a24
refs/heads/master: 6094628bfd94323fc1cea05ec2c6affd98c18f7f
5 changes: 4 additions & 1 deletion trunk/net/rds/ib_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,10 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm,
if (conn->c_loopback
&& rm->m_inc.i_hdr.h_flags & RDS_FLAG_CONG_BITMAP) {
rds_cong_map_updated(conn->c_fcong, ~(u64) 0);
return sizeof(struct rds_header) + RDS_CONG_MAP_BYTES;
scat = &rm->data.op_sg[sg];
ret = sizeof(struct rds_header) + RDS_CONG_MAP_BYTES;
ret = min_t(int, ret, scat->length - conn->c_xmit_data_off);
return ret;
}

/* FIXME we may overallocate here */
Expand Down
11 changes: 8 additions & 3 deletions trunk/net/rds/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,15 @@ static int rds_loop_xmit(struct rds_connection *conn, struct rds_message *rm,
unsigned int hdr_off, unsigned int sg,
unsigned int off)
{
struct scatterlist *sgp = &rm->data.op_sg[sg];
int ret = sizeof(struct rds_header) +
be32_to_cpu(rm->m_inc.i_hdr.h_len);

/* Do not send cong updates to loopback */
if (rm->m_inc.i_hdr.h_flags & RDS_FLAG_CONG_BITMAP) {
rds_cong_map_updated(conn->c_fcong, ~(u64) 0);
return sizeof(struct rds_header) + RDS_CONG_MAP_BYTES;
ret = min_t(int, ret, sgp->length - conn->c_xmit_data_off);
goto out;
}

BUG_ON(hdr_off || sg || off);
Expand All @@ -80,8 +85,8 @@ static int rds_loop_xmit(struct rds_connection *conn, struct rds_message *rm,
NULL);

rds_inc_put(&rm->m_inc);

return sizeof(struct rds_header) + be32_to_cpu(rm->m_inc.i_hdr.h_len);
out:
return ret;
}

/*
Expand Down

0 comments on commit 645df16

Please sign in to comment.