mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
RDS: break out rdma and data ops into nested structs in rds_message
Clearly separate rdma-related variables in rm from data-related ones. This is in anticipation of adding atomic support. Signed-off-by: Andy Grover <andy.grover@oracle.com>
This commit is contained in:
parent
8690bfa17a
commit
e779137aa7
7 changed files with 96 additions and 85 deletions
|
@ -166,21 +166,21 @@ int rds_tcp_xmit(struct rds_connection *conn, struct rds_message *rm,
|
|||
goto out;
|
||||
}
|
||||
|
||||
while (sg < rm->m_nents) {
|
||||
while (sg < rm->data.m_nents) {
|
||||
ret = tc->t_sock->ops->sendpage(tc->t_sock,
|
||||
sg_page(&rm->m_sg[sg]),
|
||||
rm->m_sg[sg].offset + off,
|
||||
rm->m_sg[sg].length - off,
|
||||
sg_page(&rm->data.m_sg[sg]),
|
||||
rm->data.m_sg[sg].offset + off,
|
||||
rm->data.m_sg[sg].length - off,
|
||||
MSG_DONTWAIT|MSG_NOSIGNAL);
|
||||
rdsdebug("tcp sendpage %p:%u:%u ret %d\n", (void *)sg_page(&rm->m_sg[sg]),
|
||||
rm->m_sg[sg].offset + off, rm->m_sg[sg].length - off,
|
||||
rdsdebug("tcp sendpage %p:%u:%u ret %d\n", (void *)sg_page(&rm->data.m_sg[sg]),
|
||||
rm->data.m_sg[sg].offset + off, rm->data.m_sg[sg].length - off,
|
||||
ret);
|
||||
if (ret <= 0)
|
||||
break;
|
||||
|
||||
off += ret;
|
||||
done += ret;
|
||||
if (off == rm->m_sg[sg].length) {
|
||||
if (off == rm->data.m_sg[sg].length) {
|
||||
off = 0;
|
||||
sg++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue