Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
6c7cc6e4
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6c7cc6e4
编写于
15年前
作者:
A
Andy Grover
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
RDS: Rename data op members prefix from m_ to op_
For consistency. Signed-off-by:
N
Andy Grover
<
andy.grover@oracle.com
>
上级
f8b3aaf2
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
51 addition
and
51 deletion
+51
-51
net/rds/ib_send.c
net/rds/ib_send.c
+13
-13
net/rds/iw_send.c
net/rds/iw_send.c
+12
-12
net/rds/message.c
net/rds/message.c
+11
-11
net/rds/rds.h
net/rds/rds.h
+3
-3
net/rds/send.c
net/rds/send.c
+5
-5
net/rds/tcp_send.c
net/rds/tcp_send.c
+7
-7
未找到文件。
net/rds/ib_send.c
浏览文件 @
6c7cc6e4
...
...
@@ -76,7 +76,7 @@ static void rds_ib_send_unmap_rm(struct rds_ib_connection *ic,
rdsdebug
(
"ic %p send %p rm %p
\n
"
,
ic
,
send
,
rm
);
ib_dma_unmap_sg
(
ic
->
i_cm_id
->
device
,
rm
->
data
.
m_sg
,
rm
->
data
.
m
_nents
,
rm
->
data
.
op_sg
,
rm
->
data
.
op
_nents
,
DMA_TO_DEVICE
);
if
(
rm
->
rdma
.
op_active
)
{
...
...
@@ -513,20 +513,20 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm,
/* map the message the first time we see it */
if
(
!
ic
->
i_rm
)
{
if
(
rm
->
data
.
m
_nents
)
{
rm
->
data
.
m
_count
=
ib_dma_map_sg
(
dev
,
rm
->
data
.
m
_sg
,
rm
->
data
.
m
_nents
,
DMA_TO_DEVICE
);
rdsdebug
(
"ic %p mapping rm %p: %d
\n
"
,
ic
,
rm
,
rm
->
data
.
m
_count
);
if
(
rm
->
data
.
m
_count
==
0
)
{
if
(
rm
->
data
.
op
_nents
)
{
rm
->
data
.
op
_count
=
ib_dma_map_sg
(
dev
,
rm
->
data
.
op
_sg
,
rm
->
data
.
op
_nents
,
DMA_TO_DEVICE
);
rdsdebug
(
"ic %p mapping rm %p: %d
\n
"
,
ic
,
rm
,
rm
->
data
.
op
_count
);
if
(
rm
->
data
.
op
_count
==
0
)
{
rds_ib_stats_inc
(
s_ib_tx_sg_mapping_failure
);
rds_ib_ring_unalloc
(
&
ic
->
i_send_ring
,
work_alloc
);
ret
=
-
ENOMEM
;
/* XXX ? */
goto
out
;
}
}
else
{
rm
->
data
.
m
_count
=
0
;
rm
->
data
.
op
_count
=
0
;
}
rds_message_addref
(
rm
);
...
...
@@ -583,7 +583,7 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm,
send
=
&
ic
->
i_sends
[
pos
];
first
=
send
;
prev
=
NULL
;
scat
=
&
rm
->
data
.
m
_sg
[
sg
];
scat
=
&
rm
->
data
.
op
_sg
[
sg
];
i
=
0
;
do
{
unsigned
int
len
=
0
;
...
...
@@ -604,7 +604,7 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm,
/* Set up the data, if present */
if
(
i
<
work_alloc
&&
scat
!=
&
rm
->
data
.
m_sg
[
rm
->
data
.
m
_count
])
{
&&
scat
!=
&
rm
->
data
.
op_sg
[
rm
->
data
.
op
_count
])
{
len
=
min
(
RDS_FRAG_SIZE
,
ib_sg_dma_len
(
dev
,
scat
)
-
off
);
send
->
s_wr
.
num_sge
=
2
;
...
...
@@ -649,7 +649,7 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm,
i
++
;
}
while
(
i
<
work_alloc
&&
scat
!=
&
rm
->
data
.
m_sg
[
rm
->
data
.
m
_count
]);
&&
scat
!=
&
rm
->
data
.
op_sg
[
rm
->
data
.
op
_count
]);
/* Account the RDS header in the number of bytes we sent, but just once.
* The caller has no concept of fragmentation. */
...
...
@@ -657,7 +657,7 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm,
bytes_sent
+=
sizeof
(
struct
rds_header
);
/* if we finished the message then send completion owns it */
if
(
scat
==
&
rm
->
data
.
m_sg
[
rm
->
data
.
m
_count
])
{
if
(
scat
==
&
rm
->
data
.
op_sg
[
rm
->
data
.
op
_count
])
{
prev
->
s_rm
=
ic
->
i_rm
;
prev
->
s_wr
.
send_flags
|=
IB_SEND_SOLICITED
;
ic
->
i_rm
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
net/rds/iw_send.c
浏览文件 @
6c7cc6e4
...
...
@@ -82,7 +82,7 @@ static void rds_iw_send_unmap_rm(struct rds_iw_connection *ic,
rdsdebug
(
"ic %p send %p rm %p
\n
"
,
ic
,
send
,
rm
);
ib_dma_unmap_sg
(
ic
->
i_cm_id
->
device
,
rm
->
data
.
m_sg
,
rm
->
data
.
m
_nents
,
rm
->
data
.
op_sg
,
rm
->
data
.
op
_nents
,
DMA_TO_DEVICE
);
if
(
rm
->
rdma
.
op_active
)
{
...
...
@@ -562,20 +562,20 @@ int rds_iw_xmit(struct rds_connection *conn, struct rds_message *rm,
rm->m_inc.i_hdr.h_flags,
be32_to_cpu(rm->m_inc.i_hdr.h_len));
*/
if
(
rm
->
data
.
m
_nents
)
{
rm
->
data
.
m
_count
=
ib_dma_map_sg
(
dev
,
rm
->
data
.
m
_sg
,
rm
->
data
.
m
_nents
,
DMA_TO_DEVICE
);
rdsdebug
(
"ic %p mapping rm %p: %d
\n
"
,
ic
,
rm
,
rm
->
data
.
m
_count
);
if
(
rm
->
data
.
m
_count
==
0
)
{
if
(
rm
->
data
.
op
_nents
)
{
rm
->
data
.
op
_count
=
ib_dma_map_sg
(
dev
,
rm
->
data
.
op
_sg
,
rm
->
data
.
op
_nents
,
DMA_TO_DEVICE
);
rdsdebug
(
"ic %p mapping rm %p: %d
\n
"
,
ic
,
rm
,
rm
->
data
.
op
_count
);
if
(
rm
->
data
.
op
_count
==
0
)
{
rds_iw_stats_inc
(
s_iw_tx_sg_mapping_failure
);
rds_iw_ring_unalloc
(
&
ic
->
i_send_ring
,
work_alloc
);
ret
=
-
ENOMEM
;
/* XXX ? */
goto
out
;
}
}
else
{
rm
->
data
.
m
_count
=
0
;
rm
->
data
.
op
_count
=
0
;
}
ic
->
i_unsignaled_wrs
=
rds_iw_sysctl_max_unsig_wrs
;
...
...
@@ -622,7 +622,7 @@ int rds_iw_xmit(struct rds_connection *conn, struct rds_message *rm,
send
=
&
ic
->
i_sends
[
pos
];
first
=
send
;
prev
=
NULL
;
scat
=
&
rm
->
data
.
m
_sg
[
sg
];
scat
=
&
rm
->
data
.
op
_sg
[
sg
];
sent
=
0
;
i
=
0
;
...
...
@@ -651,7 +651,7 @@ int rds_iw_xmit(struct rds_connection *conn, struct rds_message *rm,
}
/* if there's data reference it with a chain of work reqs */
for
(;
i
<
work_alloc
&&
scat
!=
&
rm
->
data
.
m_sg
[
rm
->
data
.
m
_count
];
i
++
)
{
for
(;
i
<
work_alloc
&&
scat
!=
&
rm
->
data
.
op_sg
[
rm
->
data
.
op
_count
];
i
++
)
{
unsigned
int
len
;
send
=
&
ic
->
i_sends
[
pos
];
...
...
@@ -729,7 +729,7 @@ int rds_iw_xmit(struct rds_connection *conn, struct rds_message *rm,
sent
+=
sizeof
(
struct
rds_header
);
/* if we finished the message then send completion owns it */
if
(
scat
==
&
rm
->
data
.
m_sg
[
rm
->
data
.
m
_count
])
{
if
(
scat
==
&
rm
->
data
.
op_sg
[
rm
->
data
.
op
_count
])
{
prev
->
s_rm
=
ic
->
i_rm
;
prev
->
s_wr
.
send_flags
|=
IB_SEND_SIGNALED
|
IB_SEND_SOLICITED
;
ic
->
i_rm
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
net/rds/message.c
浏览文件 @
6c7cc6e4
...
...
@@ -62,12 +62,12 @@ static void rds_message_purge(struct rds_message *rm)
if
(
unlikely
(
test_bit
(
RDS_MSG_PAGEVEC
,
&
rm
->
m_flags
)))
return
;
for
(
i
=
0
;
i
<
rm
->
data
.
m
_nents
;
i
++
)
{
rdsdebug
(
"putting data page %p
\n
"
,
(
void
*
)
sg_page
(
&
rm
->
data
.
m
_sg
[
i
]));
for
(
i
=
0
;
i
<
rm
->
data
.
op
_nents
;
i
++
)
{
rdsdebug
(
"putting data page %p
\n
"
,
(
void
*
)
sg_page
(
&
rm
->
data
.
op
_sg
[
i
]));
/* XXX will have to put_page for page refs */
__free_page
(
sg_page
(
&
rm
->
data
.
m
_sg
[
i
]));
__free_page
(
sg_page
(
&
rm
->
data
.
op
_sg
[
i
]));
}
rm
->
data
.
m
_nents
=
0
;
rm
->
data
.
op
_nents
=
0
;
if
(
rm
->
rdma
.
op_active
)
rds_rdma_free_op
(
&
rm
->
rdma
);
...
...
@@ -261,11 +261,11 @@ struct rds_message *rds_message_map_pages(unsigned long *page_addrs, unsigned in
set_bit
(
RDS_MSG_PAGEVEC
,
&
rm
->
m_flags
);
rm
->
m_inc
.
i_hdr
.
h_len
=
cpu_to_be32
(
total_len
);
rm
->
data
.
m
_nents
=
ceil
(
total_len
,
PAGE_SIZE
);
rm
->
data
.
m
_sg
=
rds_message_alloc_sgs
(
rm
,
num_sgs
);
rm
->
data
.
op
_nents
=
ceil
(
total_len
,
PAGE_SIZE
);
rm
->
data
.
op
_sg
=
rds_message_alloc_sgs
(
rm
,
num_sgs
);
for
(
i
=
0
;
i
<
rm
->
data
.
m
_nents
;
++
i
)
{
sg_set_page
(
&
rm
->
data
.
m
_sg
[
i
],
for
(
i
=
0
;
i
<
rm
->
data
.
op
_nents
;
++
i
)
{
sg_set_page
(
&
rm
->
data
.
op
_sg
[
i
],
virt_to_page
(
page_addrs
[
i
]),
PAGE_SIZE
,
0
);
}
...
...
@@ -288,7 +288,7 @@ int rds_message_copy_from_user(struct rds_message *rm, struct iovec *first_iov,
/*
* now allocate and copy in the data payload.
*/
sg
=
rm
->
data
.
m
_sg
;
sg
=
rm
->
data
.
op
_sg
;
iov
=
first_iov
;
iov_off
=
0
;
sg_off
=
0
;
/* Dear gcc, sg->page will be null from kzalloc. */
...
...
@@ -299,7 +299,7 @@ int rds_message_copy_from_user(struct rds_message *rm, struct iovec *first_iov,
GFP_HIGHUSER
);
if
(
ret
)
goto
out
;
rm
->
data
.
m
_nents
++
;
rm
->
data
.
op
_nents
++
;
sg_off
=
0
;
}
...
...
@@ -354,7 +354,7 @@ int rds_message_inc_copy_to_user(struct rds_incoming *inc,
iov
=
first_iov
;
iov_off
=
0
;
sg
=
rm
->
data
.
m
_sg
;
sg
=
rm
->
data
.
op
_sg
;
vec_off
=
0
;
copied
=
0
;
...
...
This diff is collapsed.
Click to expand it.
net/rds/rds.h
浏览文件 @
6c7cc6e4
...
...
@@ -339,9 +339,9 @@ struct rds_message {
}
rdma
;
struct
rm_data_op
{
unsigned
int
op_active
:
1
;
unsigned
int
m
_nents
;
unsigned
int
m
_count
;
struct
scatterlist
*
m
_sg
;
unsigned
int
op
_nents
;
unsigned
int
op
_count
;
struct
scatterlist
*
op
_sg
;
}
data
;
};
unsigned
int
m_used_sgs
;
...
...
This diff is collapsed.
Click to expand it.
net/rds/send.c
浏览文件 @
6c7cc6e4
...
...
@@ -166,7 +166,7 @@ int rds_send_xmit(struct rds_connection *conn)
rm
=
conn
->
c_xmit_rm
;
if
(
rm
&&
conn
->
c_xmit_hdr_off
==
sizeof
(
struct
rds_header
)
&&
conn
->
c_xmit_sg
==
rm
->
data
.
m
_nents
)
{
conn
->
c_xmit_sg
==
rm
->
data
.
op
_nents
)
{
conn
->
c_xmit_rm
=
NULL
;
conn
->
c_xmit_sg
=
0
;
conn
->
c_xmit_hdr_off
=
0
;
...
...
@@ -296,7 +296,7 @@ int rds_send_xmit(struct rds_connection *conn)
if
(
rm
->
data
.
op_active
&&
(
conn
->
c_xmit_hdr_off
<
sizeof
(
struct
rds_header
)
||
conn
->
c_xmit_sg
<
rm
->
data
.
m
_nents
))
{
conn
->
c_xmit_sg
<
rm
->
data
.
op
_nents
))
{
ret
=
conn
->
c_trans
->
xmit
(
conn
,
rm
,
conn
->
c_xmit_hdr_off
,
conn
->
c_xmit_sg
,
...
...
@@ -312,7 +312,7 @@ int rds_send_xmit(struct rds_connection *conn)
ret
-=
tmp
;
}
sg
=
&
rm
->
data
.
m
_sg
[
conn
->
c_xmit_sg
];
sg
=
&
rm
->
data
.
op
_sg
[
conn
->
c_xmit_sg
];
while
(
ret
)
{
tmp
=
min_t
(
int
,
ret
,
sg
->
length
-
conn
->
c_xmit_data_off
);
...
...
@@ -323,7 +323,7 @@ int rds_send_xmit(struct rds_connection *conn)
sg
++
;
conn
->
c_xmit_sg
++
;
BUG_ON
(
ret
!=
0
&&
conn
->
c_xmit_sg
==
rm
->
data
.
m
_nents
);
conn
->
c_xmit_sg
==
rm
->
data
.
op
_nents
);
}
}
}
...
...
@@ -959,7 +959,7 @@ int rds_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
goto
out
;
}
rm
->
data
.
m
_sg
=
rds_message_alloc_sgs
(
rm
,
ceil
(
payload_len
,
PAGE_SIZE
));
rm
->
data
.
op
_sg
=
rds_message_alloc_sgs
(
rm
,
ceil
(
payload_len
,
PAGE_SIZE
));
/* XXX fix this to not allocate memory */
ret
=
rds_message_copy_from_user
(
rm
,
msg
->
msg_iov
,
payload_len
);
if
(
ret
)
...
...
This diff is collapsed.
Click to expand it.
net/rds/tcp_send.c
浏览文件 @
6c7cc6e4
...
...
@@ -166,21 +166,21 @@ int rds_tcp_xmit(struct rds_connection *conn, struct rds_message *rm,
goto
out
;
}
while
(
sg
<
rm
->
data
.
m
_nents
)
{
while
(
sg
<
rm
->
data
.
op
_nents
)
{
ret
=
tc
->
t_sock
->
ops
->
sendpage
(
tc
->
t_sock
,
sg_page
(
&
rm
->
data
.
m
_sg
[
sg
]),
rm
->
data
.
m
_sg
[
sg
].
offset
+
off
,
rm
->
data
.
m
_sg
[
sg
].
length
-
off
,
sg_page
(
&
rm
->
data
.
op
_sg
[
sg
]),
rm
->
data
.
op
_sg
[
sg
].
offset
+
off
,
rm
->
data
.
op
_sg
[
sg
].
length
-
off
,
MSG_DONTWAIT
|
MSG_NOSIGNAL
);
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
,
rdsdebug
(
"tcp sendpage %p:%u:%u ret %d
\n
"
,
(
void
*
)
sg_page
(
&
rm
->
data
.
op
_sg
[
sg
]),
rm
->
data
.
op_sg
[
sg
].
offset
+
off
,
rm
->
data
.
op
_sg
[
sg
].
length
-
off
,
ret
);
if
(
ret
<=
0
)
break
;
off
+=
ret
;
done
+=
ret
;
if
(
off
==
rm
->
data
.
m
_sg
[
sg
].
length
)
{
if
(
off
==
rm
->
data
.
op
_sg
[
sg
].
length
)
{
off
=
0
;
sg
++
;
}
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部